SubscribedTransaction
@algorandfoundation/algokit-subscriber
Class: SubscribedTransaction
Section titled “Class: SubscribedTransaction”Defined in: src/types/subscription.ts:163
The common model used to expose a transaction that is returned from a subscription.
Substantively, based on the Indexer TransactionResult model format with some modifications to:
- Add the
parentTransactionIdfield so inner transactions have a reference to their parent - Override the type of
inner-txnsto beSubscribedTransaction[]so inner transactions (recursively) get these extra fields too - Add emitted ARC-28 events via
arc28Events - Balance changes in algo or assets
Extends
Section titled “Extends”Transaction
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SubscribedTransaction(
__namedParameters):SubscribedTransaction
Defined in: src/types/subscription.ts:178
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”Omit<SubscribedTransaction, "getEncodingSchema" | "toEncodingData">
Returns
Section titled “Returns”SubscribedTransaction
Overrides
Section titled “Overrides”algosdk.indexerModels.Transaction.constructor
Properties
Section titled “Properties”applicationTransaction?
Section titled “applicationTransaction?”
optionalapplicationTransaction:TransactionApplication
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2176
Fields for application transactions. Definition: data/transactions/application.go : ApplicationCallTxnFields
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.applicationTransaction
arc28Events?
Section titled “arc28Events?”
optionalarc28Events:EmittedArc28Event[]
Defined in: src/types/subscription.ts:172
Any ARC-28 events emitted from an app call.
assetConfigTransaction?
Section titled “assetConfigTransaction?”
optionalassetConfigTransaction:TransactionAssetConfig
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2184
Fields for asset allocation, re-configuration, and destruction. A zero value for asset-id indicates asset creation. A zero value for the params indicates asset destruction. Definition: data/transactions/asset.go : AssetConfigTxnFields
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.assetConfigTransaction
assetFreezeTransaction?
Section titled “assetFreezeTransaction?”
optionalassetFreezeTransaction:TransactionAssetFreeze
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2190
Fields for an asset freeze transaction. Definition: data/transactions/asset.go : AssetFreezeTxnFields
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.assetFreezeTransaction
assetTransferTransaction?
Section titled “assetTransferTransaction?”
optionalassetTransferTransaction:TransactionAssetTransfer
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2196
Fields for an asset transfer transaction. Definition: data/transactions/asset.go : AssetTransferTxnFields
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.assetTransferTransaction
authAddr?
Section titled “authAddr?”
optionalauthAddr:Address
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2202
(sgnr) this is included with signed transactions when the signing address does not equal the sender. The backend can use this to ensure that auth addr is equal to the accounts auth addr.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.authAddr
balanceChanges?
Section titled “balanceChanges?”
optionalbalanceChanges:BalanceChange[]
Defined in: src/types/subscription.ts:176
The balance changes in the transaction.
closeRewards?
Section titled “closeRewards?”
optionalcloseRewards:bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2206
(rc) rewards applied to close-remainder-to account.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.closeRewards
closingAmount?
Section titled “closingAmount?”
optionalclosingAmount:bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2210
(ca) closing amount for transaction.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.closingAmount
confirmedRound?
Section titled “confirmedRound?”
optionalconfirmedRound:bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2214
Round when the transaction was confirmed.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.confirmedRound
createdApplicationIndex?
Section titled “createdApplicationIndex?”
optionalcreatedApplicationIndex:bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2219
Specifies an application index (ID) if an application was created with this transaction.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.createdApplicationIndex
createdAssetIndex?
Section titled “createdAssetIndex?”
optionalcreatedAssetIndex:bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2223
Specifies an asset index (ID) if an asset was created with this transaction.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.createdAssetIndex
fee:
bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2158
(fee) Transaction fee.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.fee
filtersMatched?
Section titled “filtersMatched?”
optionalfiltersMatched:string[]
Defined in: src/types/subscription.ts:174
The names of any filters that matched the given transaction to result in it being ‘subscribed’.
firstValid
Section titled “firstValid”firstValid:
bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2162
(fv) First valid round for this transaction.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.firstValid
genesisHash?
Section titled “genesisHash?”
optionalgenesisHash:Uint8Array
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2227
(gh) Hash of genesis block.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.genesisHash
genesisId?
Section titled “genesisId?”
optionalgenesisId:string
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2231
(gen) genesis block ID.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.genesisId
globalStateDelta?
Section titled “globalStateDelta?”
optionalglobalStateDelta:EvalDeltaKeyValue[]
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2236
(gd) Global state key/value changes for the application being executed by this transaction.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.globalStateDelta
group?
Section titled “group?”
optionalgroup:Uint8Array
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2242
(grp) Base64 encoded byte array of a sha512/256 digest. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.group
heartbeatTransaction?
Section titled “heartbeatTransaction?”
optionalheartbeatTransaction:TransactionHeartbeat
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2248
Fields for a heartbeat transaction. Definition: data/transactions/heartbeat.go : HeartbeatTxnFields
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.heartbeatTransaction
id:
string
Defined in: src/types/subscription.ts:164
Transaction ID
Overrides
Section titled “Overrides”algosdk.indexerModels.Transaction.id
innerTxns?
Section titled “innerTxns?”
optionalinnerTxns:SubscribedTransaction[]
Defined in: src/types/subscription.ts:170
Inner transactions produced by application execution.
Overrides
Section titled “Overrides”algosdk.indexerModels.Transaction.innerTxns
intraRoundOffset?
Section titled “intraRoundOffset?”
optionalintraRoundOffset:number
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2260
Offset into the round where this transaction was confirmed.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.intraRoundOffset
keyregTransaction?
Section titled “keyregTransaction?”
optionalkeyregTransaction:TransactionKeyreg
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2266
Fields for a keyreg transaction. Definition: data/transactions/keyreg.go : KeyregTxnFields
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.keyregTransaction
lastValid
Section titled “lastValid”lastValid:
bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2166
(lv) Last valid round for this transaction.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.lastValid
lease?
Section titled “lease?”
optionallease:Uint8Array
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2274
(lx) Base64 encoded 32-byte array. 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.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.lease
localStateDelta?
Section titled “localStateDelta?”
optionallocalStateDelta:AccountStateDelta[]
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2279
(ld) Local state key/value changes for the application being executed by this transaction.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.localStateDelta
optionallogs:Uint8Array[]
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2283
(lg) Logs for the application being executed by this transaction.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.logs
optionalnote:Uint8Array
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2287
(note) Free form data.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.note
parentIntraRoundOffset?
Section titled “parentIntraRoundOffset?”
optionalparentIntraRoundOffset:number
Defined in: src/types/subscription.ts:166
The intra-round offset of the parent of this transaction (if it’s an inner transaction).
parentTransactionId?
Section titled “parentTransactionId?”
optionalparentTransactionId:string
Defined in: src/types/subscription.ts:168
The transaction ID of the parent of this transaction (if it’s an inner transaction).
paymentTransaction?
Section titled “paymentTransaction?”
optionalpaymentTransaction:TransactionPayment
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2293
Fields for a payment transaction. Definition: data/transactions/payment.go : PaymentTxnFields
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.paymentTransaction
receiverRewards?
Section titled “receiverRewards?”
optionalreceiverRewards:bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2297
(rr) rewards applied to receiver account.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.receiverRewards
rekeyTo?
Section titled “rekeyTo?”
optionalrekeyTo:Address
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2303
(rekey) when included in a valid transaction, the accounts auth addr will be updated with this value and future signatures must be signed with the key represented by this address.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.rekeyTo
roundTime?
Section titled “roundTime?”
optionalroundTime:number
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2307
Time when the block this transaction is in was confirmed.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.roundTime
sender
Section titled “sender”sender:
string
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2170
(snd) Sender’s address.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.sender
senderRewards?
Section titled “senderRewards?”
optionalsenderRewards:bigint
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2311
(rs) rewards applied to sender account.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.senderRewards
signature?
Section titled “signature?”
optionalsignature:TransactionSignature
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2316
Validation signature associated with some data. Only one of the signatures should be provided.
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.signature
stateProofTransaction?
Section titled “stateProofTransaction?”
optionalstateProofTransaction:TransactionStateProof
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2322
Fields for a state proof transaction. Definition: data/transactions/stateproof.go : StateProofTxnFields
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.stateProofTransaction
txType?
Section titled “txType?”
optionaltxType:string
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2336
(type) Indicates what type of transaction this is. Different types have different fields. Valid types, and where their fields are stored:
- (pay) payment-transaction
- (keyreg) keyreg-transaction
- (acfg) asset-config-transaction
- (axfer) asset-transfer-transaction
- (afrz) asset-freeze-transaction
- (appl) application-transaction
- (stpf) state-proof-transaction
- (hb) heartbeat-transaction
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.txType
Accessors
Section titled “Accessors”encodingSchema
Section titled “encodingSchema”Get Signature
Section titled “Get Signature”get
staticencodingSchema():Schema
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2154
Returns
Section titled “Returns”Schema
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.encodingSchema
Methods
Section titled “Methods”getEncodingSchema()
Section titled “getEncodingSchema()”getEncodingSchema():
Schema
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2454
Get the encoding Schema for this object, used to prepare the encoding data for msgpack and JSON.
Returns
Section titled “Returns”Schema
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.getEncodingSchema
toEncodingData()
Section titled “toEncodingData()”toEncodingData():
Map<string,unknown>
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2455
Extract the encoding data for this object. This data, after being prepared by the encoding Schema, can be encoded to msgpack or JSON.
Returns
Section titled “Returns”Map<string, unknown>
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.toEncodingData
fromEncodingData()
Section titled “fromEncodingData()”
staticfromEncodingData(data):Transaction
Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2456
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Transaction
Inherited from
Section titled “Inherited from”algosdk.indexerModels.Transaction.fromEncodingData