seqno
Sequence number on a TON wallet: 32-bit counter / nonce the contract increments on every outgoing transaction to defend against replay attacks.
Aliases: sequence number, ton seqno
seqno (sequence number) is a 32-bit counter stored in every TON wallet’s data cell, incremented by 1 after every outgoing transaction. Signed messages include seqno in the body; if the seqno in the signed message doesn’t equal the current one in storage, the contract rejects the transaction with THROWIFNOT 33.
Why it matters
- Replay protection: an attacker can’t replay your old transaction — its seqno is already used.
- Ordering guarantee: transactions execute strictly in ascending seqno order.
SDK usage
@ton/ton SDK reads seqno from the contract before sending:
const seqno = await walletContract.getSeqno();
await walletContract.sendTransfer({ seqno, secretKey, messages: [...] });
Wallet V5 introduced an extended model: extensions can have their own seqno-namespace and sign independently of the main owner.