Txn
Algorand TypeScript / op / Txn
constTxn:object
Defined in: op.ts:3509
Get values for the current executing transaction
Type declaration
Section titled “Type declaration”amount
Section titled “amount”Get Signature
Section titled “Get Signature”get amount():
uint64
microalgos Min AVM version: 1
Returns
Section titled “Returns”applicationId
Section titled “applicationId”Get Signature
Section titled “Get Signature”get applicationId():
Application
ApplicationID from ApplicationCall transaction Min AVM version: 2
Returns
Section titled “Returns”approvalProgram
Section titled “approvalProgram”Get Signature
Section titled “Get Signature”get approvalProgram():
bytes
Approval program Min AVM version: 2
Returns
Section titled “Returns”assetAmount
Section titled “assetAmount”Get Signature
Section titled “Get Signature”get assetAmount():
uint64
value in Asset’s units Min AVM version: 1
Returns
Section titled “Returns”assetCloseTo
Section titled “assetCloseTo”Get Signature
Section titled “Get Signature”get assetCloseTo():
Account
32 byte address Min AVM version: 1
Returns
Section titled “Returns”assetReceiver
Section titled “assetReceiver”Get Signature
Section titled “Get Signature”get assetReceiver():
Account
32 byte address Min AVM version: 1
Returns
Section titled “Returns”assetSender
Section titled “assetSender”Get Signature
Section titled “Get Signature”get assetSender():
Account
32 byte address. Source of assets if Sender is the Asset’s Clawback address. Min AVM version: 1
Returns
Section titled “Returns”clearStateProgram
Section titled “clearStateProgram”Get Signature
Section titled “Get Signature”get clearStateProgram():
bytes
Clear state program Min AVM version: 2
Returns
Section titled “Returns”closeRemainderTo
Section titled “closeRemainderTo”Get Signature
Section titled “Get Signature”get closeRemainderTo():
Account
32 byte address Min AVM version: 1
Returns
Section titled “Returns”configAsset
Section titled “configAsset”Get Signature
Section titled “Get Signature”get configAsset():
Asset
Asset ID in asset config transaction Min AVM version: 2
Returns
Section titled “Returns”configAssetClawback
Section titled “configAssetClawback”Get Signature
Section titled “Get Signature”get configAssetClawback():
Account
32 byte address Min AVM version: 2
Returns
Section titled “Returns”configAssetDecimals
Section titled “configAssetDecimals”Get Signature
Section titled “Get Signature”get configAssetDecimals():
uint64
Number of digits to display after the decimal place when displaying the asset Min AVM version: 2
Returns
Section titled “Returns”configAssetDefaultFrozen
Section titled “configAssetDefaultFrozen”Get Signature
Section titled “Get Signature”get configAssetDefaultFrozen():
boolean
Whether the asset’s slots are frozen by default or not, 0 or 1 Min AVM version: 2
Returns
Section titled “Returns”boolean
configAssetFreeze
Section titled “configAssetFreeze”Get Signature
Section titled “Get Signature”get configAssetFreeze():
Account
32 byte address Min AVM version: 2
Returns
Section titled “Returns”configAssetManager
Section titled “configAssetManager”Get Signature
Section titled “Get Signature”get configAssetManager():
Account
32 byte address Min AVM version: 2
Returns
Section titled “Returns”configAssetMetadataHash
Section titled “configAssetMetadataHash”Get Signature
Section titled “Get Signature”get configAssetMetadataHash():
bytes<32>
32 byte commitment to unspecified asset metadata Min AVM version: 2
Returns
Section titled “Returns”bytes<32>
configAssetName
Section titled “configAssetName”Get Signature
Section titled “Get Signature”get configAssetName():
bytes
The asset name Min AVM version: 2
Returns
Section titled “Returns”configAssetReserve
Section titled “configAssetReserve”Get Signature
Section titled “Get Signature”get configAssetReserve():
Account
32 byte address Min AVM version: 2
Returns
Section titled “Returns”configAssetTotal
Section titled “configAssetTotal”Get Signature
Section titled “Get Signature”get configAssetTotal():
uint64
Total number of units of this asset created Min AVM version: 2
Returns
Section titled “Returns”configAssetUnitName
Section titled “configAssetUnitName”Get Signature
Section titled “Get Signature”get configAssetUnitName():
bytes
Unit name of the asset Min AVM version: 2
Returns
Section titled “Returns”configAssetUrl
Section titled “configAssetUrl”Get Signature
Section titled “Get Signature”get configAssetUrl():
bytes
URL Min AVM version: 2
Returns
Section titled “Returns”createdApplicationId
Section titled “createdApplicationId”Get Signature
Section titled “Get Signature”get createdApplicationId():
Application
ApplicationID allocated by the creation of an application (only with itxn in v5). Application mode only
Min AVM version: 5
Returns
Section titled “Returns”createdAssetId
Section titled “createdAssetId”Get Signature
Section titled “Get Signature”get createdAssetId():
Asset
Asset ID allocated by the creation of an ASA (only with itxn in v5). Application mode only
Min AVM version: 5
Returns
Section titled “Returns”extraProgramPages
Section titled “extraProgramPages”Get Signature
Section titled “Get Signature”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
Returns
Section titled “Returns”Get Signature
Section titled “Get Signature”get fee():
uint64
microalgos Min AVM version: 1
Returns
Section titled “Returns”firstValid
Section titled “firstValid”Get Signature
Section titled “Get Signature”get firstValid():
uint64
round number Min AVM version: 1
Returns
Section titled “Returns”firstValidTime
Section titled “firstValidTime”Get Signature
Section titled “Get Signature”get firstValidTime():
uint64
UNIX timestamp of block before txn.FirstValid. Fails if negative Min AVM version: 7
Returns
Section titled “Returns”freezeAsset
Section titled “freezeAsset”Get Signature
Section titled “Get Signature”get freezeAsset():
Asset
Asset ID being frozen or un-frozen Min AVM version: 2
Returns
Section titled “Returns”freezeAssetAccount
Section titled “freezeAssetAccount”Get Signature
Section titled “Get Signature”get freezeAssetAccount():
Account
32 byte address of the account whose asset slot is being frozen or un-frozen Min AVM version: 2
Returns
Section titled “Returns”freezeAssetFrozen
Section titled “freezeAssetFrozen”Get Signature
Section titled “Get Signature”get freezeAssetFrozen():
boolean
The new frozen value, 0 or 1 Min AVM version: 2
Returns
Section titled “Returns”boolean
globalNumByteSlice
Section titled “globalNumByteSlice”Get Signature
Section titled “Get Signature”get globalNumByteSlice():
uint64
Number of global state byteslices in ApplicationCall Min AVM version: 3
Returns
Section titled “Returns”globalNumUint
Section titled “globalNumUint”Get Signature
Section titled “Get Signature”get globalNumUint():
uint64
Number of global state integers in ApplicationCall Min AVM version: 3
Returns
Section titled “Returns”groupIndex
Section titled “groupIndex”Get Signature
Section titled “Get Signature”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
Returns
Section titled “Returns”lastLog
Section titled “lastLog”Get Signature
Section titled “Get Signature”get lastLog():
bytes
The last message emitted. Empty bytes if none were emitted. Application mode only Min AVM version: 6
Returns
Section titled “Returns”lastValid
Section titled “lastValid”Get Signature
Section titled “Get Signature”get lastValid():
uint64
round number Min AVM version: 1
Returns
Section titled “Returns”Get Signature
Section titled “Get Signature”get lease():
bytes<32>
32 byte lease value Min AVM version: 1
Returns
Section titled “Returns”bytes<32>
localNumByteSlice
Section titled “localNumByteSlice”Get Signature
Section titled “Get Signature”get localNumByteSlice():
uint64
Number of local state byteslices in ApplicationCall Min AVM version: 3
Returns
Section titled “Returns”localNumUint
Section titled “localNumUint”Get Signature
Section titled “Get Signature”get localNumUint():
uint64
Number of local state integers in ApplicationCall Min AVM version: 3
Returns
Section titled “Returns”nonparticipation
Section titled “nonparticipation”Get Signature
Section titled “Get Signature”get nonparticipation():
boolean
Marks an account nonparticipating for rewards Min AVM version: 5
Returns
Section titled “Returns”boolean
Get Signature
Section titled “Get Signature”get note():
bytes
Any data up to 1024 bytes Min AVM version: 1
Returns
Section titled “Returns”numAccounts
Section titled “numAccounts”Get Signature
Section titled “Get Signature”get numAccounts():
uint64
Number of Accounts Min AVM version: 2
Returns
Section titled “Returns”numAppArgs
Section titled “numAppArgs”Get Signature
Section titled “Get Signature”get numAppArgs():
uint64
Number of ApplicationArgs Min AVM version: 2
Returns
Section titled “Returns”numApplications
Section titled “numApplications”Get Signature
Section titled “Get Signature”get numApplications():
uint64
Number of Applications Min AVM version: 3
Returns
Section titled “Returns”numApprovalProgramPages
Section titled “numApprovalProgramPages”Get Signature
Section titled “Get Signature”get numApprovalProgramPages():
uint64
Number of Approval Program pages Min AVM version: 7
Returns
Section titled “Returns”numAssets
Section titled “numAssets”Get Signature
Section titled “Get Signature”get numAssets():
uint64
Number of Assets Min AVM version: 3
Returns
Section titled “Returns”numClearStateProgramPages
Section titled “numClearStateProgramPages”Get Signature
Section titled “Get Signature”get numClearStateProgramPages():
uint64
Number of ClearState Program pages Min AVM version: 7
Returns
Section titled “Returns”numLogs
Section titled “numLogs”Get Signature
Section titled “Get Signature”get numLogs():
uint64
Number of Logs (only with itxn in v5). Application mode only
Min AVM version: 5
Returns
Section titled “Returns”onCompletion
Section titled “onCompletion”Get Signature
Section titled “Get Signature”get onCompletion():
OnCompleteAction
ApplicationCall transaction on completion action Min AVM version: 2
Returns
Section titled “Returns”receiver
Section titled “receiver”Get Signature
Section titled “Get Signature”get receiver():
Account
32 byte address Min AVM version: 1
Returns
Section titled “Returns”rejectVersion
Section titled “rejectVersion”Get Signature
Section titled “Get Signature”get rejectVersion():
uint64
Application version for which the txn must reject Min AVM version: 12
Returns
Section titled “Returns”rekeyTo
Section titled “rekeyTo”Get Signature
Section titled “Get Signature”get rekeyTo():
Account
32 byte Sender’s new AuthAddr Min AVM version: 2
Returns
Section titled “Returns”selectionPk
Section titled “selectionPk”Get Signature
Section titled “Get Signature”get selectionPk():
bytes<32>
32 byte address Min AVM version: 1
Returns
Section titled “Returns”bytes<32>
sender
Section titled “sender”Get Signature
Section titled “Get Signature”get sender():
Account
32 byte address Min AVM version: 1
Returns
Section titled “Returns”stateProofPk
Section titled “stateProofPk”Get Signature
Section titled “Get Signature”get stateProofPk():
bytes<64>
State proof public key Min AVM version: 6
Returns
Section titled “Returns”bytes<64>
Get Signature
Section titled “Get Signature”get txId():
bytes<32>
The computed ID for this transaction. 32 bytes. Min AVM version: 1
Returns
Section titled “Returns”bytes<32>
Get Signature
Section titled “Get Signature”get type():
bytes
Transaction type as bytes Min AVM version: 1
Returns
Section titled “Returns”typeEnum
Section titled “typeEnum”Get Signature
Section titled “Get Signature”get typeEnum():
TransactionType
Transaction type as integer Min AVM version: 1
Returns
Section titled “Returns”voteFirst
Section titled “voteFirst”Get Signature
Section titled “Get Signature”get voteFirst():
uint64
The first round that the participation key is valid. Min AVM version: 1
Returns
Section titled “Returns”voteKeyDilution
Section titled “voteKeyDilution”Get Signature
Section titled “Get Signature”get voteKeyDilution():
uint64
Dilution for the 2-level participation key Min AVM version: 1
Returns
Section titled “Returns”voteLast
Section titled “voteLast”Get Signature
Section titled “Get Signature”get voteLast():
uint64
The last round that the participation key is valid. Min AVM version: 1
Returns
Section titled “Returns”votePk
Section titled “votePk”Get Signature
Section titled “Get Signature”get votePk():
bytes<32>
32 byte address Min AVM version: 1
Returns
Section titled “Returns”bytes<32>
xferAsset
Section titled “xferAsset”Get Signature
Section titled “Get Signature”get xferAsset():
Asset
Asset ID Min AVM version: 1
Returns
Section titled “Returns”accounts()
Section titled “accounts()”accounts(
a):Account
Accounts listed in the ApplicationCall transaction Min AVM version: 2
Parameters
Section titled “Parameters”Returns
Section titled “Returns”applicationArgs()
Section titled “applicationArgs()”applicationArgs(
a):bytes
Arguments passed to the application in the ApplicationCall transaction Min AVM version: 2
Parameters
Section titled “Parameters”Returns
Section titled “Returns”applications()
Section titled “applications()”applications(
a):Application
Foreign Apps listed in the ApplicationCall transaction Min AVM version: 3
Parameters
Section titled “Parameters”Returns
Section titled “Returns”approvalProgramPages()
Section titled “approvalProgramPages()”approvalProgramPages(
a):bytes
Approval Program as an array of pages Min AVM version: 7
Parameters
Section titled “Parameters”Returns
Section titled “Returns”assets()
Section titled “assets()”assets(
a):Asset
Foreign Assets listed in the ApplicationCall transaction Min AVM version: 3
Parameters
Section titled “Parameters”Returns
Section titled “Returns”clearStateProgramPages()
Section titled “clearStateProgramPages()”clearStateProgramPages(
a):bytes
ClearState Program as an array of pages Min AVM version: 7
Parameters
Section titled “Parameters”Returns
Section titled “Returns”logs()
Section titled “logs()”logs(
a):bytes
Log messages emitted by an application call (only with itxn in v5). Application mode only
Min AVM version: 5