Skip to content

Transaction

Defined in: packages/transact/src/transactions/transaction.ts:160

Represents a complete Algorand transaction.

new Transaction(params): Transaction

Defined in: packages/transact/src/transactions/transaction.ts:282

TransactionParams

Transaction

optional appCall: AppCallTransactionFields

Defined in: packages/transact/src/transactions/transaction.ts:260

App call specific fields

TransactionParams.appCall


optional assetConfig: AssetConfigTransactionFields

Defined in: packages/transact/src/transactions/transaction.ts:255

Asset config specific fields

TransactionParams.assetConfig


optional assetFreeze: AssetFreezeTransactionFields

Defined in: packages/transact/src/transactions/transaction.ts:270

Asset freeze specific fields

TransactionParams.assetFreeze


optional assetTransfer: AssetTransferTransactionFields

Defined in: packages/transact/src/transactions/transaction.ts:250

Asset transfer specific fields

TransactionParams.assetTransfer


optional fee: bigint

Defined in: packages/transact/src/transactions/transaction.ts:181

Optional transaction fee in microALGO.

When not set, the fee will be interpreted as 0 by the network.

TransactionParams.fee


firstValid: bigint

Defined in: packages/transact/src/transactions/transaction.ts:186

First round for when the transaction is valid.

TransactionParams.firstValid


optional genesisHash: Uint8Array<ArrayBufferLike>

Defined in: packages/transact/src/transactions/transaction.ts:200

Hash of the genesis block of the network.

Used to identify which network the transaction is for.

TransactionParams.genesisHash


optional genesisId: string

Defined in: packages/transact/src/transactions/transaction.ts:207

Genesis ID of the network.

A human-readable string used alongside genesis hash to identify the network.

TransactionParams.genesisId


optional group: Uint8Array<ArrayBufferLike>

Defined in: packages/transact/src/transactions/transaction.ts:240

Optional group ID for atomic transaction grouping.

Transactions with the same group ID must execute together or not at all.

TransactionParams.group


optional heartbeat: HeartbeatTransactionFields

Defined in: packages/transact/src/transactions/transaction.ts:275

Heartbeat specific fields

TransactionParams.heartbeat


optional keyRegistration: KeyRegistrationTransactionFields

Defined in: packages/transact/src/transactions/transaction.ts:265

Key registration specific fields

TransactionParams.keyRegistration


lastValid: bigint

Defined in: packages/transact/src/transactions/transaction.ts:193

Last round for when the transaction is valid.

After this round, the transaction will be expired.

TransactionParams.lastValid


optional lease: Uint8Array<ArrayBufferLike>

Defined in: packages/transact/src/transactions/transaction.ts:233

Optional lease value to enforce mutual transaction exclusion.

When a transaction with a non-empty lease field is confirmed, the lease is acquired. A lease X is acquired by the sender, generating the (sender, X) lease. The lease is kept active until the last_valid round of the transaction has elapsed. No other transaction sent by the same sender can be confirmed until the lease expires.

TransactionParams.lease


optional note: Uint8Array<ArrayBufferLike>

Defined in: packages/transact/src/transactions/transaction.ts:214

Optional user-defined note field.

Can contain arbitrary data up to 1KB in size.

TransactionParams.note


optional payment: PaymentTransactionFields

Defined in: packages/transact/src/transactions/transaction.ts:245

Payment specific fields

TransactionParams.payment


optional rekeyTo: Address

Defined in: packages/transact/src/transactions/transaction.ts:223

Optional authorized account for future transactions.

If set, only this account will be used for transaction authorization going forward. Reverting back control to the original address must be done by setting this field to the original address.

TransactionParams.rekeyTo


sender: Address

Defined in: packages/transact/src/transactions/transaction.ts:174

The account that authorized the transaction.

Fees are deducted from this account.

TransactionParams.sender


optional stateProof: StateProofTransactionFields

Defined in: packages/transact/src/transactions/transaction.ts:280

State proof specific fields

TransactionParams.stateProof


type: TransactionType

Defined in: packages/transact/src/transactions/transaction.ts:167

The type of transaction

TransactionParams.type

txId(): string

Defined in: packages/transact/src/transactions/transaction.ts:317

Get the transaction ID as a base32-encoded string.

string