Nonce
Durable nonce accounts for offline and delayed transactions on Solana
Durable Nonce Accounts
Normally, Solana transactions require a recent blockhash that expires after about 60-90 seconds. Durable nonces solve this by replacing the recent blockhash with a stored nonce value that never expires until it is used.
Why Use Durable Nonces?
- Offline signing - Sign transactions on an air-gapped machine without worrying about blockhash expiration
- Multi-party signing - Collect signatures from multiple parties over time
- Scheduled transactions - Prepare transactions now and submit them later
- Custodial workflows - Queue transactions that require approval steps before submission
How It Works
- Create a nonce account that stores a nonce value on-chain
- Use that nonce value instead of a recent blockhash when building your transaction
- When the transaction is submitted, the nonce value is automatically advanced so it can't be reused
Operations
- Create Nonce Account - Create a new durable nonce account
- Get Nonce Account - Fetch and read nonce account data
- Use Nonce Account - Send a transaction using a durable nonce
- Never Nonce - Prevent durable nonces in transactions using pinocchio-never-nonce