Transactions - Algorand Specifications

Keyboard shortcuts

Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help

Algorand Specifications

Just as a block represents a transition between two Ledger states, a transaction TxTx represents a transition between two account states.

Algorand transactions have different transaction types.

Transaction fields are divided into a:

Transaction fields are REQUIRED unless specified as OPTIONAL.

The cryptographic hash of the transaction fields, including the transaction specific fields of the body, is called the transaction identifier. This is written as Hash(Tx)Hash(Tx).

A transaction header contains the following fields:

FIELD CODEC TYPE REQUIRED
Transaction Type type string Yes
Sender snd address Yes
Fee fee uint64 Yes
First Valid Round fv uint64 Yes
Last Valid Round lv uint64 Yes
Genesis Hash gh [32]byte Yes
Lease lx [32]byte No
Genesis Identifier gen string No
Group grp [32]byte No
Rekey-to rekey address No
Note note [32]bytes No

The transaction type TxTypeTxType is a short string indicating the type of transaction.

The following transaction types are supported:

CODEC DESCRIPTION
pay ALGO transfers (payment)
keyreg Consensus keys registration
acfg Asset creation and configuration
axfer Asset transfer
afrz Asset freeze and unfreeze
appl Application calls
stpf State Proof
hb Consensus heartbeat

The sender II identifies the account that authorized the transaction.

The fee ff specifies the processing fee the sender pays to execute the transaction, expressed in μALGO.

The fee MAY be set to 00 if the transaction is part of a group.

The first valid round rfvrfv and last valid round rlvrlv, define a round interval for which the transaction MAY be executed.

The genesis hash GenesisHashGenesisHash defines the Ledger for which this transaction is valid.

The genesis identifier GenesisIDGenesisID ( OPTIONAL) defines the Ledger for which this transaction is valid.

The lease xx ( OPTIONAL) specifies transactions’ mutual exclusion. If x≠0x≠0 (i.e., xx is set) and this transaction is confirmed, then this transaction prevents another transaction from the same sender and with the same lease from being confirmed until rlvrlv is confirmed.

The group TxGTxG ( OPTIONAL) is a commitment whose meaning is described in the Transaction Groups section.

The rekey to RekeyToRekeyTo ( OPTIONAL) is an address. If nonzero, the transaction will set the sender account’s authorization address field to this value. If the RekeyToRekeyTo address matches the sender address, then the authorization address is instead set to zero, and the original spending keys are re-established.

The rekey functionally works as if the account replaces its private spending keys, while its address remains the same. The account is now controlled by the authorization address (i.e., transaction signatures are checked against this address).

The note NN ( OPTIONAL) contains arbitrary data appended to the transaction.