Skip to content

Transaction Reference

The tables below describe the fields used in Algorand transactions. Each table includes the field name, indicates if the field is required or optional, shows the type used in the protocol code, displays the codec name that appears in transactions, and provides a description of the field’s purpose. While the protocol types are shown in these tables, the input types may be different when using SDKs.

These fields are common to all transactions.

FieldRequiredTypecodecDescription
Feerequireduint64"fee"Paid by the sender to the FeeSink to prevent denial-of-service. The minimum fee on Algorand is currently 1000 microAlgos.
FirstValidrequireduint64"fv"The first round for when the transaction is valid. If the transaction is sent prior to this round it will be rejected by the network.
GenesisHashrequired[32]byte"gh"The hash of the genesis block of the network for which the transaction is valid. See the genesis hash for MainNet, TestNet, and BetaNet.
LastValidrequireduint64"lv"The ending round for which the transaction is valid. After this round, the transaction will be rejected by the network.
SenderrequiredAddress"snd"The address of the account that pays the fee and amount.
TxTyperequiredstring"type"Specifies the type of transaction. This value is automatically generated using any of the developer tools.
GenesisIDoptionalstring"gen"The human-readable string that identifies the network for the transaction. The genesis ID is found in the genesis block. See the genesis ID for MainNet, TestNet, and BetaNet.
Groupoptional[32]byte"grp"The group specifies that the transaction is part of a group and, if so, specifies the hash of the transaction group. Assign a group ID to a transaction through the workflow described in the Atomic Transfers Guide.
Leaseoptional[32]byte"lx"A lease enforces mutual exclusion of transactions. If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes. While this transaction possesses the lease, no other transaction specifying this lease can be confirmed. A lease is often used in the context of Algorand Smart Contracts to prevent replay attacks. Read more about Algorand Smart Contracts. Leases can also be used to safeguard against unintended duplicate spends. For example, if I send a transaction to the network and later realize my fee was too low, I could send another transaction with a higher fee, but the same lease value. This would ensure that only one of those transactions ends up getting confirmed during the validity period.
Noteoptional[]byte"note"Any data up to 1000 bytes.
RekeyTooptionalAddress"rekey"Specifies the authorized address. This address will be used to authorize all future transactions. Learn more about Rekeying accounts.

Transaction Object Type: PaymentTx

Includes all fields in Header and "type" is "pay".

FieldRequiredTypecodecDescription
ReceiverrequiredAddress"rcv"The address of the account that receives the amount.
Amountrequireduint64"amt"The total amount to be sent in microAlgos.
CloseRemainderTooptionalAddress"close"When set, it indicates that the transaction is requesting that the Sender account should be closed, and all remaining funds, after the fee and amount are paid, be transferred to this address.

Transaction Object Type: KeyRegistrationTx

Includes all fields in Header and "type" is "keyreg".

FieldRequiredTypecodecDescription
VotePkrequired for onlineed25519PublicKey"votekey"The root participation public key.
SelectionPKrequired for onlineVrfPubkey"selkey"The VRF public key.
StateProofPkrequired for onlineMerkleSignature Verifier (64 bytes)"sprfkey"The 64 byte state proof public key commitment.
VoteFirstrequired for onlineuint64"votefst"The first round that the participation key is valid. Not to be confused with the FirstValid round of the keyreg transaction.
VoteLastrequired for onlineuint64"votelst"The last round that the participation key is valid. Not to be confused with the LastValid round of the keyreg transaction.
VoteKeyDilutionrequired for onlineuint64"votekd"This is the dilution for the 2-level participation key. It determines the interval (number of rounds) for generating new ephemeral keys.
Nonparticipationoptionalbool"nonpart"All new Algorand accounts are participating by default. This means that they earn rewards. Mark an account nonparticipating by setting this value to true and this account will no longer earn rewards. It is unlikely that you will ever need to do this and exists mainly for economic-related functions on the network.

Transaction Object Type: AssetConfigTx

Includes all fields in Header and "type" is "acfg".

This is used to create, configure and destroy an asset depending on which fields are set.

FieldRequiredTypecodecDescription
ConfigAssetrequired, except on createuint64"caid"For re-configure or destroy transactions, this is the unique asset ID. On asset creation, the ID is set to zero.
AssetParamsrequired, except on destroyAssetParams"apar"See AssetParams table for all available fields.

Object Name: AssetParams

FieldRequiredTypecodecDescription
Totalrequired on creationuint64"t"The total number of base units of the asset to create. This number cannot be changed.
Decimalsrequired on creationuint32"dc"The number of digits to use after the decimal point when displaying the asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths, if 3, the base unit of the asset is in thousandths, and so on up to 19 decimal places
DefaultFrozenrequired on creationbool"df"True to freeze holdings for this asset by default.
UnitNameoptionalstring"un"The name of a unit of this asset. Supplied on creation. Max size is 8 bytes. Example: USDT
AssetNameoptionalstring"an"The name of the asset. Supplied on creation. Max size is 32 bytes. Example: Tether
URLoptionalstring"au"Specifies a URL where more information about the asset can be retrieved. Max size is 96 bytes.
MetaDataHashoptional[]byte"am"This field is intended to be a 32-byte hash of some metadata that is relevant to your asset and/or asset holders. The format of this metadata is up to the application. This field can only be specified upon creation. An example might be the hash of some certificate that acknowledges the digitized asset as the official representation of a particular real-world asset.
ManagerAddroptionalAddress"m"The address of the account that can manage the configuration of the asset and destroy it.
ReserveAddroptionalAddress"r"The address of the account that holds the reserve (non-minted) units of the asset. This address has no specific authority in the protocol itself. It is used in the case where you want to signal to holders of your asset that the non-minted units of the asset reside in an account that is different from the default creator account (the sender).
FreezeAddroptionalAddress"f"The address of the account used to freeze holdings of this asset. If empty, freezing is not permitted.
ClawbackAddroptionalAddress"c"The address of the account that can clawback holdings of this asset. If empty, clawback is not permitted.

Transaction Object Type: AssetTransferTx

Includes all fields in Header and "type" is "axfer".

FieldRequiredTypecodecDescription
XferAssetrequireduint64"xaid"The unique ID of the asset to be transferred.
AssetAmountrequireduint64"aamt"The amount of the asset to be transferred. A zero amount transferred to self allocates that asset in the account’s Asset map.
AssetSenderrequiredAddress"asnd"The sender of the transfer. The regular sender field should be used and this one set to the zero value for regular transfers between accounts. If this value is nonzero, it indicates a clawback transaction where the sender is the asset’s clawback address and the asset sender is the address from which the funds will be withdrawn.
AssetReceiverrequiredAddress"arcv"The recipient of the asset transfer.
AssetCloseTooptionalAddress"aclose"Specify this field to remove the asset holding from the sender account and reduce the account’s minimum balance (i.e. opt-out of the asset).

Transaction Object Type: AssetTransferTx

Includes all fields in Header and "type" is "axfer".

This is a special form of an Asset Transfer Transaction.

FieldRequiredTypecodecDescription
XferAssetrequireduint64"xaid"The unique ID of the asset to opt-in to.
SenderrequiredAddress"snd"The account which is allocating the asset to their account’s Asset map.
AssetReceiverrequiredAddress"arcv"The account which is allocating the asset to their account’s Asset map.

Transaction Object Type: AssetTransferTx

Includes all fields in Header and "type" is "axfer".

This is a special form of an Asset Transfer Transaction.

FieldRequiredTypecodecDescription
SenderrequiredAddress"snd"The sender of this transaction must be the clawback account specified in the asset configuration.
XferAssetrequireduint64"xaid"The unique ID of the asset to be transferred.
AssetAmountrequireduint64"aamt"The amount of the asset to be transferred.
AssetSenderrequiredAddress"asnd"The address from which the funds will be withdrawn.
AssetReceiverrequiredAddress"arcv"The recipient of the asset transfer.

Transaction Object Type: AssetFreezeTx

Includes all fields in Header and "type" is "afrz".

FieldRequiredTypecodecDescription
FreezeAccountrequiredAddress"fadd"The address of the account whose asset is being frozen or unfrozen.
FreezeAssetrequireduint64"faid"The asset ID being frozen or unfrozen.
AssetFrozenrequiredbool"afrz"True to freeze the asset.

Transaction Object Type: ApplicationCallTx

Includes all fields in Header and "type" is "appl".

FieldRequiredTypecodecDescription
Application IDrequireduint64"apid"ID of the application being configured or empty if creating.
OnCompleterequireduint64"apan"Defines what additional actions occur with the transaction.
Accountsoptional[]Address"apat"List of accounts in addition to the sender that may be accessed from the application’s approval-program and clear-state-program.
Approval Programoptional[]byte"apap"Logic executed for every application transaction, except when on-completion is set to “clear”. It can read and write global state for the application, as well as account-specific local state. Approval programs may reject the transaction.
App Argumentsoptional[][]byte"apaa"Transaction specific arguments accessed from the application’s approval-program and clear-state-program.
Clear State Programoptional[]byte"apsu"Logic executed for application transactions with on-completion set to “clear”. It can read and write global state for the application, as well as account-specific local state. Clear state programs cannot reject the transaction.
Foreign Appsoptional[]uint64"apfa"Lists the applications in addition to the application-id whose global states may be accessed by this application’s approval-program and clear-state-program. The access is read-only.
Foreign Assetsoptional[]uint64"apas"Lists the assets whose AssetParams may be accessed by this application’s approval-program and clear-state-program. The access is read-only.
GlobalStateSchemaoptional"apgs"Holds the maximum number of global state values defined within a object. Set on a create, and may be set again on an UpdateApplication call to change the maximum number of global state entries. See Size Changes on Update.
LocalStateSchemaoptional"apls"Holds the maximum number of local state values defined within a object. May only be set on a create.
ExtraProgramPagesoptionaluint64"apep"Number of additional pages allocated to the application’s approval and clear state programs. Each ExtraProgramPages is 2048 bytes. The sum of ApprovalProgram and ClearStateProgram may not exceed 2048*(1+ExtraProgramPages) bytes. Set on a create, and may be set again on an UpdateApplication call to change the number of additional pages allocated. See Size Changes on Update.
Boxesoptional[]BoxRef"apbx"The boxes that should be made available for the runtime of the program.
RejectVersionoptionaluint64"aprv"If the application being called has a version equal to or greater than the provided reject version, the transaction will be rejected.
AccessListoptional[]Resource"al"An array of resources that the application or group can use. Each resource will be one of two types; “simple” or “complex”. The Access List and existing Foreign Reference arrays (apat, apfa, apas, apbx) are mutually exclusive and cannot be used together on the same transaction.

An application call whose OnComplete is UpdateApplication may carry a non-zero ExtraProgramPages, GlobalStateSchema, or both, changing the extra program pages allocated to the application and the maximum number of global state entries it may store. On any other call to an existing application, both fields must be zero; at creation, they are how the initial allocations are set. LocalStateSchema may only be set at creation — a non-zero value on any later call fails with inappropriate non-zero tx.LocalStateSchema.

An update changes allocations only if ExtraProgramPages, GlobalStateSchema.nui, or GlobalStateSchema.nbs is non-zero. An update leaving all three at zero is not treated as a size change and leaves existing allocations untouched, so updates that omit these fields behave as they did before the fields were permitted.

On a size-changing update, both fields are applied absolutely rather than as adjustments, and a field left at zero is applied as zero. Setting GlobalStateSchema while omitting ExtraProgramPages drops the application to zero extra pages; setting ExtraProgramPages while omitting GlobalStateSchema empties the schema. Each field is replaced whole: an application holding nui: 2 that is updated with nbs: 1 alone ends up with nui: 0. A size-changing update must state the complete intended value of both fields.

Two checks constrain the values. The ApprovalProgram and ClearStateProgram carried by the transaction must fit within the page count the same transaction requests, failing otherwise with approval program too long, clear state program too long, or app programs too long. A GlobalStateSchema may not be smaller than the entries the application currently stores, failing otherwise with unable to change global schema, which wraps a count comparison such as store bytes count 2 exceeds schema bytes count 1. Reductions that satisfy both checks release the surplus pages and entries.

The sender of a size-changing update becomes the application’s size sponsor: the account whose minimum balance requirement (MBR) carries the application’s extra-page and global-schema costs — 100,000 microAlgos per extra page, plus 25,000 per schema entry and a further 3,500 per uint or 25,000 per byte slice. The creator’s MBR carries the flat 100,000 microAlgo per-application term regardless of who sponsors the size. A later size-changing update moves the sponsored costs from the previous sponsor’s MBR to the new sender’s in their entirety; the two accounts never each carry a share. When the sender of a size-changing update is the creator, the sponsor is recorded as the zero address and the creator’s MBR carries every term. algod reports the sponsor as the optional size-sponsor field of ApplicationParams, and a program reads it as the AppSizeSponsor field of app_params_get — in both cases zero or absent when the creator is the sponsor.

Object Name: StateSchema

The StateSchema object is required on a create application call transaction, where it must be fully populated for both the GlobalStateSchema and LocalStateSchema fields. GlobalStateSchema may also be supplied on an UpdateApplication call; see Size Changes on Update.

FieldRequiredTypecodecDescription
Number Intsrequireduint64"nui"Maximum number of integer values that may be stored in the [global || local] application key/value store. In LocalStateSchema, immutable after the create. In GlobalStateSchema, may be changed by an UpdateApplication call.
Number ByteSlicesrequireduint64"nbs"Maximum number of byte slices values that may be stored in the [global || local] application key/value store. In LocalStateSchema, immutable after the create. In GlobalStateSchema, may be changed by an UpdateApplication call.

Transaction Object Type: SignedTxn

FieldRequiredTypecodecDescription
Sigrequired, if no other sig specifiedcrypto.Signature"sig"
LogicSigrequired, if no other sig specifiedLogicSig"lsig"A logic signature object: a program plus, for delegation, the signature that authorized it.
Msigrequired, if no other sig specifiedcrypto.MultisigSig"msig"
PQsigrequired, if no other sig specifiedPQSig"pqsig"Scheme-agnostic post-quantum signature envelope containing the scheme identifier (sch), address salt (slt), public key (pk), and signature (sig). Currently Falcon-1024.
TransactionrequiredTransaction"txn"PaymentTx, KeyRegistrationTx, AssetConfigTx, AssetTransferTx, AssetFreezeTx or ApplicationCallTx

Object Name: LogicSig

Carried in the lsig field of a signed transaction. For a contract account, only the program is present and its hash is the account address. For delegation, exactly one of the signature fields below proves that the delegating account authorized the program.

FieldRequiredTypecodecDescription
Logicrequired[]byte"l"The compiled program, evaluated to approve the transaction.
Sigoptionalcrypto.Signature"sig"Ed25519 delegation signature over the program.
Msigoptionalcrypto.MultisigSig"msig"Legacy multisig delegation signature. Rejected since consensus v41; use lmsig instead.
LMsigoptionalcrypto.MultisigSig"lmsig"Multisig delegation signature that binds the authorizing address into the signed payload. Replaces msig as of consensus v41.
PQsigoptionalPQSig"pqsig"Post-quantum delegation signature envelope, also binding the authorizing address into the signed payload.
Argsoptional[][]byte"arg"Arguments made available to the program. Not covered by the delegation signature; the program must validate them.

Transaction Object Type: HeartbeatTx

Includes all fields in Header and "type" is "hbt".

FieldRequiredTypecodecDescription
HbAddressrequiredAddress"hbad"The account this transaction is proving onlineness for.
HbKeyDilutionrequireduint64"hbkd"Must match HbAddress account’s current KeyDilution.
HbProofrequiredHbProofFields"hbpf"The heartbeat proof fields.
HbSeedrequired[]byte"hbsd"Must be the block seed for this transaction’s firstValid block.
HbVoteIDrequired[]byte"hbvid"Must match the HbAddress account’s current VoteID.