agon-cmt-v5— unilateral cumulative commitment for one payment channel.agon-round-v4— cooperative clearing-round message signed by multiple participants.
settle_individual, settle_commitment_bundle, or settle_clearing_round.
Common encoding rules
Every signed message begins with:- A one-byte
kind. - A one-byte
version. - A 16-byte
message_domain.
Message domain
message_domain is derived inside the program as:
Compact unsigned integers
Participant IDs and cumulative amounts use compact unsigned integer encoding in the signed body (seven data bits per byte, continuation bit in the MSB). Reference implementations typically call this helperencodeCompactU64.
Token ID
token_id is encoded as a little-endian u16 in both message types.
agon-cmt-v5
The unilateral cumulative commitment message. Used by:
settle_individualsettle_commitment_bundle
Layout
| Field | Type | Meaning |
|---|---|---|
kind | u8 = 0x01 | Unilateral commitment message |
version | u8 = 0x05 | Current unilateral wire format |
message_domain | [u8; 16] | Deployment-scoped replay boundary |
flags | u8 | Optional-field presence bits |
payer_id | compact u64 | Channel payer participant ID |
payee_id | compact u64 | Channel payee participant ID |
token_id | u16 (LE) | Allowlisted settlement token |
committed_amount | compact u64 | New cumulative target for the channel |
authorized_settler | Pubkey | Optional delegated submitter (present iff flag bit set) |
Flags
| Bit | Meaning |
|---|---|
0x01 | authorized_settler field is present |
Semantics
committed_amountis cumulative, not incremental. If the channel is already settled to1_000_000and the new message says1_250_000, the on-chain delta is250_000.- If the flag bit is set, the appended
authorized_settlerkey is the only non-payee address allowed to submit this commitment on-chain. - Operator or coordinator compensation is not embedded in
agon-cmt-v5. If a flow needs to pay an operator, that payment is expressed as its own ordinary channel commitment.
agon-round-v4
The cooperative clearing-round message. Used by settle_clearing_round.
Layout
| Field | Type | Meaning |
|---|---|---|
kind | u8 = 0x02 | Clearing-round message |
version | u8 = 0x04 | V4 round wire format |
message_domain | [u8; 16] | Deployment-scoped replay boundary |
token_id | u16 (LE) | Token shared by the entire round |
participant_count | u8 | Number of signed participants in the roster |
| per participant block: | ||
participant_id | compact u64 | Participant who owns this block |
entry_count | u8 | Number of outgoing channel targets in this block |
| per entry: | ||
payee_ref | u8 | Index of the payee inside the signed roster |
target_cumulative | compact u64 | New cumulative target for that channel |
Semantics
The round is organized by payer block. Each block says:- Which participant is the payer.
- How many outgoing channel targets that payer is advancing.
- For each target, which signed participant in the roster is the payee.
- What the new cumulative amount for that channel should be.
payee_ref keeps the signed body compact — payee IDs are referenced, not repeated.
Every participant listed in the roster must provide a valid Ed25519 signature over the same body. The program verifies every signature, then applies only the net residual balance changes after the implied payments have cancelled each other out.
See Clearing rounds for a worked example and the settlement semantics.
Which message to use
- Use
agon-cmt-v5when one payer is updating one channel. This includes bundled settlement, which batches manyagon-cmt-v5messages for one payee into one transaction. - Use
agon-round-v4when several participants are willing to sign one shared message so that many channels can be advanced in one on-chain transaction.

