Transaction kinds and public fields
The seven transaction kinds of statement v4 and what each one puts in the public journal.
On this page
The kinds#
| Kind | Name | What it is | Public beyond the common fields |
|---|---|---|---|
| 0 | SPEND | Private transfer, merge or split, with change | Optional fee |
| 1 | ISSUANCE | Creates a plain asset; the whole supply is minted into the two outputs | The asset identifier and a salted commitment to the supply cap |
| 2 | EXCHANGE_PRIVATE | One half of a two-party exchange | An exchange binding; no pair, no quantity |
| 3 | EXCHANGE_PUBLIC | One half of a two-party exchange that publishes pair and quantities | Both assets and both amounts |
| 4 | POOL_BUY | Slippage-bounded intent to buy from a pool | Pool, input asset and exact amount, minimum out, recipient binding, hash of the pool-output envelope |
| 5 | POOL_SELL | The same, selling the pool's token | The same |
| 6 | LAUNCH | A shielded spend bound to one launch | Launch parameters hash, launch fee asset and amount |
Roles: in an exchange, role 0 gives asset A and takes B; role 1 gives B and takes A. Always 0 for other kinds.
Every transaction has#
Two inputs and two outputs, with dummy padding when fewer are real. A single amount may not exceed 2^63 - 1. The note tree has depth 32.
The journal#
The journal is the public statement of a proof: exactly 668 bytes, beginning with the magic LSV4. In order: version (4), kind, role, an expiry height, the chain, a domain, the note-tree root the inputs were proven against, two nullifiers, two output commitments, two envelope hashes, the fee asset and amount, the issuance asset and cap commitment, the exchange binding, the swap terms (kind 3 only), the market reference, the value asset and amount, the minimum out, the recipient binding and the market envelope hash. A field that does not apply to a kind must be zero.
The witness, the private input to the proof, is 3,584 bytes and never leaves the wallet.
Containers and ids#
A transaction container holds one proof (two for an exchange), the claimed journals as hex, the envelopes and, for a launch, the public parameters. The transaction id is a tagged hash of the journals. See Node HTTP API.
Notes#
A note is (asset, amount, owner, salt). Its commitment is a two-layer hash. Its nullifier is a tagged hash of the nullifier key, the chain and the note's leaf; the spend key and nullifier key are separate, so the person who paid you cannot tell when you spend what they paid.
Fields that stay out of public market data#
Nullifiers, change commitments, the ledger-created output commitment, the recipient binding, envelope hashes, the anchor root, the minimum out, the expiry and the transaction id are never in any tape, launch, pool or quote object. They are still in the journals inside blocks, so anyone reading the chain can see them.