Skip to content

Txn

Algorand TypeScript


Algorand TypeScript / op / Txn

const Txn: object

Defined in: op.ts:3509

Get values for the current executing transaction

get amount(): uint64

microalgos Min AVM version: 1

uint64

get applicationId(): Application

ApplicationID from ApplicationCall transaction Min AVM version: 2

Application

get approvalProgram(): bytes

Approval program Min AVM version: 2

bytes

get assetAmount(): uint64

value in Asset’s units Min AVM version: 1

uint64

get assetCloseTo(): Account

32 byte address Min AVM version: 1

Account

get assetReceiver(): Account

32 byte address Min AVM version: 1

Account

get assetSender(): Account

32 byte address. Source of assets if Sender is the Asset’s Clawback address. Min AVM version: 1

Account

get clearStateProgram(): bytes

Clear state program Min AVM version: 2

bytes

get closeRemainderTo(): Account

32 byte address Min AVM version: 1

Account

get configAsset(): Asset

Asset ID in asset config transaction Min AVM version: 2

Asset

get configAssetClawback(): Account

32 byte address Min AVM version: 2

Account

get configAssetDecimals(): uint64

Number of digits to display after the decimal place when displaying the asset Min AVM version: 2

uint64

get configAssetDefaultFrozen(): boolean

Whether the asset’s slots are frozen by default or not, 0 or 1 Min AVM version: 2

boolean

get configAssetFreeze(): Account

32 byte address Min AVM version: 2

Account

get configAssetManager(): Account

32 byte address Min AVM version: 2

Account

get configAssetMetadataHash(): bytes<32>

32 byte commitment to unspecified asset metadata Min AVM version: 2

bytes<32>

get configAssetName(): bytes

The asset name Min AVM version: 2

bytes

get configAssetReserve(): Account

32 byte address Min AVM version: 2

Account

get configAssetTotal(): uint64

Total number of units of this asset created Min AVM version: 2

uint64

get configAssetUnitName(): bytes

Unit name of the asset Min AVM version: 2

bytes

get configAssetUrl(): bytes

URL Min AVM version: 2

bytes

get createdApplicationId(): Application

ApplicationID allocated by the creation of an application (only with itxn in v5). Application mode only Min AVM version: 5

Application

get createdAssetId(): Asset

Asset ID allocated by the creation of an ASA (only with itxn in v5). Application mode only Min AVM version: 5

Asset

get extraProgramPages(): uint64

Number of additional pages for each of the application’s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program. Min AVM version: 4

uint64

get fee(): uint64

microalgos Min AVM version: 1

uint64

get firstValid(): uint64

round number Min AVM version: 1

uint64

get firstValidTime(): uint64

UNIX timestamp of block before txn.FirstValid. Fails if negative Min AVM version: 7

uint64

get freezeAsset(): Asset

Asset ID being frozen or un-frozen Min AVM version: 2

Asset

get freezeAssetAccount(): Account

32 byte address of the account whose asset slot is being frozen or un-frozen Min AVM version: 2

Account

get freezeAssetFrozen(): boolean

The new frozen value, 0 or 1 Min AVM version: 2

boolean

get globalNumByteSlice(): uint64

Number of global state byteslices in ApplicationCall Min AVM version: 3

uint64

get globalNumUint(): uint64

Number of global state integers in ApplicationCall Min AVM version: 3

uint64

get groupIndex(): uint64

Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1 Min AVM version: 1

uint64

get lastLog(): bytes

The last message emitted. Empty bytes if none were emitted. Application mode only Min AVM version: 6

bytes

get lastValid(): uint64

round number Min AVM version: 1

uint64

get lease(): bytes<32>

32 byte lease value Min AVM version: 1

bytes<32>

get localNumByteSlice(): uint64

Number of local state byteslices in ApplicationCall Min AVM version: 3

uint64

get localNumUint(): uint64

Number of local state integers in ApplicationCall Min AVM version: 3

uint64

get nonparticipation(): boolean

Marks an account nonparticipating for rewards Min AVM version: 5

boolean

get note(): bytes

Any data up to 1024 bytes Min AVM version: 1

bytes

get numAccounts(): uint64

Number of Accounts Min AVM version: 2

uint64

get numAppArgs(): uint64

Number of ApplicationArgs Min AVM version: 2

uint64

get numApplications(): uint64

Number of Applications Min AVM version: 3

uint64

get numApprovalProgramPages(): uint64

Number of Approval Program pages Min AVM version: 7

uint64

get numAssets(): uint64

Number of Assets Min AVM version: 3

uint64

get numClearStateProgramPages(): uint64

Number of ClearState Program pages Min AVM version: 7

uint64

get numLogs(): uint64

Number of Logs (only with itxn in v5). Application mode only Min AVM version: 5

uint64

get onCompletion(): OnCompleteAction

ApplicationCall transaction on completion action Min AVM version: 2

OnCompleteAction

get receiver(): Account

32 byte address Min AVM version: 1

Account

get rejectVersion(): uint64

Application version for which the txn must reject Min AVM version: 12

uint64

get rekeyTo(): Account

32 byte Sender’s new AuthAddr Min AVM version: 2

Account

get selectionPk(): bytes<32>

32 byte address Min AVM version: 1

bytes<32>

get sender(): Account

32 byte address Min AVM version: 1

Account

get stateProofPk(): bytes<64>

State proof public key Min AVM version: 6

bytes<64>

get txId(): bytes<32>

The computed ID for this transaction. 32 bytes. Min AVM version: 1

bytes<32>

get type(): bytes

Transaction type as bytes Min AVM version: 1

bytes

get typeEnum(): TransactionType

Transaction type as integer Min AVM version: 1

TransactionType

get voteFirst(): uint64

The first round that the participation key is valid. Min AVM version: 1

uint64

get voteKeyDilution(): uint64

Dilution for the 2-level participation key Min AVM version: 1

uint64

get voteLast(): uint64

The last round that the participation key is valid. Min AVM version: 1

uint64

get votePk(): bytes<32>

32 byte address Min AVM version: 1

bytes<32>

get xferAsset(): Asset

Asset ID Min AVM version: 1

Asset

accounts(a): Account

Accounts listed in the ApplicationCall transaction Min AVM version: 2

uint64

Account

applicationArgs(a): bytes

Arguments passed to the application in the ApplicationCall transaction Min AVM version: 2

uint64

bytes

applications(a): Application

Foreign Apps listed in the ApplicationCall transaction Min AVM version: 3

uint64

Application

approvalProgramPages(a): bytes

Approval Program as an array of pages Min AVM version: 7

uint64

bytes

assets(a): Asset

Foreign Assets listed in the ApplicationCall transaction Min AVM version: 3

uint64

Asset

clearStateProgramPages(a): bytes

ClearState Program as an array of pages Min AVM version: 7

uint64

bytes

logs(a): bytes

Log messages emitted by an application call (only with itxn in v5). Application mode only Min AVM version: 5

uint64

bytes