Stateless Solana program for validating transaction deadlines. Reference implementation for x402 SVM Extension RFC
deadline-validator is an early-stage Rust project in the AI payments / x402 ecosystem, focused on blockchain, deadline-validation, payments, smart-contracts. It currently has 5 GitHub stars and 0 forks, and sits alongside related tools like sati, tdm-integration-kit, chaingpt-claude-skill.
Stateless Solana program for validating transaction deadlines. Enables timeout control beyond blockhash expiration limits (~80-90 seconds).
Program ID: DEADaT1auZ8JjUMWUhhPWjQqFk9HSgHBkt5KaGMVnp1H
Deployed on Mainnet/Devnet. Upgrade authority will be revoked (made immutable) after final verification. 492-1494 CU per call (benchmarks).
This validator is the reference implementation for the x402 SVM Extension RFC, which proposes enabling deadline validation and smart wallet support in the x402 protocol on Solana.
import { TransactionInstruction, PublicKey } from '@solana/web3.js';
const PROGRAM_ID = new PublicKey('DEADaT1auZ8JjUMWUhhPWjQqFk9HSgHBkt5KaGMVnp1H');
function createValidateDeadlineInstruction(deadline: number | bigint): TransactionInstruction {
const data = Buffer.alloc(9);
data.writeUInt8(0, 0);
data.writeBigInt64LE(BigInt(deadline), 1);
return new TransactionInstruction({
keys: [],
programId: PROGRAM_ID,
data,
});
}
// Example: 5 minute deadline
const deadline = Math.floor(Date.now() / 1000) + 300;
transaction.add(createValidateDeadlineInstruction(deadline));
See full example in examples/typescript/
use solana_sdk::{instruction::Instruction, pubkey::Pubkey};
pub const PROGRAM_ID: Pubkey = solana_sdk::pubkey!("DEADaT1auZ8JjUMWUhhPWjQqFk9HSgHBkt5KaGMVnp1H");
pub fn validate_deadline(deadline: i64) -> Instruction {
let mut data = vec![0u8];
data.extend_from_slice(&deadline.to_le_bytes());
Instruction {
program_id: PROGRAM_ID,
accounts: vec![],
data,
}
}
See full example in examples/rust/
Validates current_time <= deadline (Unix timestamp, seconds since epoch).
DeadlineExpired (error code 0) if current time > deadlinedeadline = 0 never expiresUses Clock sysvar for consensus time. No accounts required.
# Build
cargo-build-sbf --manifest-path program/Cargo.toml
# Test
cargo test-sbf --manifest-path program/Cargo.toml
# Deploy
solana program deploy target/deploy/cascade_protocol_deadline_validator.so
Or use the Makefile: make build, make test, make deploy-devnet.
| Code | Name | Description |
|---|---|---|
| 0 | DeadlineExpired | Current time has exceeded the deadline |
| 1 | InvalidInstructionData | Instruction data is malformed |
CC0 1.0 Universal - Public Domain. See LICENSE.
Trust infrastructure for million-agent economies on Solana - identity, reputation, and validation designed for continuous feedback at scale.
Developer integration tools for adding TDM payments to AI agents, apps, and workflows. CLI, MCP server, and copy-paste examples
154 Web3 MCP tools for Claude Code, custody-free. Plus an agent wallet prompt injection can't drain: per-tx, daily, and on-chain (ERC-4337) spending caps the model can't bypass. EVM + Solana + Tron DEX/DeFi, perps, prediction markets, contract deploy + audit.