Skip to content

types/subscription

Defined in: src/types/subscription.ts:212

The role that an account was playing for a given balance change.

Enumeration MemberValueDescriptionDefined in
AssetCreator"AssetCreator"Account was creating an asset and holds the full asset supplysrc/types/subscription.ts:220
AssetDestroyer"AssetDestroyer"Account was destroying an asset and has removed the full asset supply from circulation. A balance change with this role will always have a 0 amount and use the asset manager address.src/types/subscription.ts:224
CloseTo"CloseTo"Account was having an asset amount closed to itsrc/types/subscription.ts:218
Receiver"Receiver"Account was receiving a transactionsrc/types/subscription.ts:216
Sender"Sender"Account was sending a transaction (sending asset and/or spending fee if asset 0)src/types/subscription.ts:214

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 parentTransactionId field so inner transactions have a reference to their parent
  • Override the type of inner-txns to be SubscribedTransaction[] so inner transactions (recursively) get these extra fields too
  • Add emitted ARC-28 events via arc28Events
  • Balance changes in algo or assets
  • Transaction

new SubscribedTransaction(__namedParameters): SubscribedTransaction

Defined in: src/types/subscription.ts:178

ParameterType
__namedParametersOmit<SubscribedTransaction, "getEncodingSchema" | "toEncodingData">

SubscribedTransaction

algosdk.indexerModels.Transaction.constructor

PropertyTypeDescriptionOverridesInherited fromDefined in
applicationTransaction?TransactionApplicationFields for application transactions. Definition: data/transactions/application.go : ApplicationCallTxnFields-algosdk.indexerModels.Transaction.applicationTransactionnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2176
arc28Events?EmittedArc28Event[]Any ARC-28 events emitted from an app call.--src/types/subscription.ts:172
assetConfigTransaction?TransactionAssetConfigFields 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-algosdk.indexerModels.Transaction.assetConfigTransactionnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2184
assetFreezeTransaction?TransactionAssetFreezeFields for an asset freeze transaction. Definition: data/transactions/asset.go : AssetFreezeTxnFields-algosdk.indexerModels.Transaction.assetFreezeTransactionnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2190
assetTransferTransaction?TransactionAssetTransferFields for an asset transfer transaction. Definition: data/transactions/asset.go : AssetTransferTxnFields-algosdk.indexerModels.Transaction.assetTransferTransactionnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2196
authAddr?Address(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.-algosdk.indexerModels.Transaction.authAddrnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2202
balanceChanges?BalanceChange[]The balance changes in the transaction.--src/types/subscription.ts:176
closeRewards?bigint(rc) rewards applied to close-remainder-to account.-algosdk.indexerModels.Transaction.closeRewardsnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2206
closingAmount?bigint(ca) closing amount for transaction.-algosdk.indexerModels.Transaction.closingAmountnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2210
confirmedRound?bigintRound when the transaction was confirmed.-algosdk.indexerModels.Transaction.confirmedRoundnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2214
createdApplicationIndex?bigintSpecifies an application index (ID) if an application was created with this transaction.-algosdk.indexerModels.Transaction.createdApplicationIndexnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2219
createdAssetIndex?bigintSpecifies an asset index (ID) if an asset was created with this transaction.-algosdk.indexerModels.Transaction.createdAssetIndexnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2223
feebigint(fee) Transaction fee.-algosdk.indexerModels.Transaction.feenode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2158
filtersMatched?string[]The names of any filters that matched the given transaction to result in it being ‘subscribed’.--src/types/subscription.ts:174
firstValidbigint(fv) First valid round for this transaction.-algosdk.indexerModels.Transaction.firstValidnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2162
genesisHash?Uint8Array(gh) Hash of genesis block.-algosdk.indexerModels.Transaction.genesisHashnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2227
genesisId?string(gen) genesis block ID.-algosdk.indexerModels.Transaction.genesisIdnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2231
globalStateDelta?EvalDeltaKeyValue[](gd) Global state key/value changes for the application being executed by this transaction.-algosdk.indexerModels.Transaction.globalStateDeltanode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2236
group?Uint8Array(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.-algosdk.indexerModels.Transaction.groupnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2242
heartbeatTransaction?TransactionHeartbeatFields for a heartbeat transaction. Definition: data/transactions/heartbeat.go : HeartbeatTxnFields-algosdk.indexerModels.Transaction.heartbeatTransactionnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2248
idstringTransaction IDalgosdk.indexerModels.Transaction.id-src/types/subscription.ts:164
innerTxns?SubscribedTransaction[]Inner transactions produced by application execution.algosdk.indexerModels.Transaction.innerTxns-src/types/subscription.ts:170
intraRoundOffset?numberOffset into the round where this transaction was confirmed.-algosdk.indexerModels.Transaction.intraRoundOffsetnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2260
keyregTransaction?TransactionKeyregFields for a keyreg transaction. Definition: data/transactions/keyreg.go : KeyregTxnFields-algosdk.indexerModels.Transaction.keyregTransactionnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2266
lastValidbigint(lv) Last valid round for this transaction.-algosdk.indexerModels.Transaction.lastValidnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2166
lease?Uint8Array(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.-algosdk.indexerModels.Transaction.leasenode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2274
localStateDelta?AccountStateDelta[](ld) Local state key/value changes for the application being executed by this transaction.-algosdk.indexerModels.Transaction.localStateDeltanode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2279
logs?Uint8Array[](lg) Logs for the application being executed by this transaction.-algosdk.indexerModels.Transaction.logsnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2283
note?Uint8Array(note) Free form data.-algosdk.indexerModels.Transaction.notenode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2287
parentIntraRoundOffset?numberThe intra-round offset of the parent of this transaction (if it’s an inner transaction).--src/types/subscription.ts:166
parentTransactionId?stringThe transaction ID of the parent of this transaction (if it’s an inner transaction).--src/types/subscription.ts:168
paymentTransaction?TransactionPaymentFields for a payment transaction. Definition: data/transactions/payment.go : PaymentTxnFields-algosdk.indexerModels.Transaction.paymentTransactionnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2293
receiverRewards?bigint(rr) rewards applied to receiver account.-algosdk.indexerModels.Transaction.receiverRewardsnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2297
rekeyTo?Address(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.-algosdk.indexerModels.Transaction.rekeyTonode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2303
roundTime?numberTime when the block this transaction is in was confirmed.-algosdk.indexerModels.Transaction.roundTimenode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2307
senderstring(snd) Sender’s address.-algosdk.indexerModels.Transaction.sendernode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2170
senderRewards?bigint(rs) rewards applied to sender account.-algosdk.indexerModels.Transaction.senderRewardsnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2311
signature?TransactionSignatureValidation signature associated with some data. Only one of the signatures should be provided.-algosdk.indexerModels.Transaction.signaturenode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2316
stateProofTransaction?TransactionStateProofFields for a state proof transaction. Definition: data/transactions/stateproof.go : StateProofTxnFields-algosdk.indexerModels.Transaction.stateProofTransactionnode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2322
txType?string(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-algosdk.indexerModels.Transaction.txTypenode_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2336

get static encodingSchema(): Schema

Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2154

Schema

algosdk.indexerModels.Transaction.encodingSchema

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.

Schema

algosdk.indexerModels.Transaction.getEncodingSchema

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.

Map<string, unknown>

algosdk.indexerModels.Transaction.toEncodingData

static fromEncodingData(data): Transaction

Defined in: node_modules/algosdk/dist/types/client/v2/indexer/models/types.d.ts:2456

ParameterType
dataunknown

Transaction

algosdk.indexerModels.Transaction.fromEncodingData

Defined in: src/types/subscription.ts:386

Configuration for an AlgorandSubscriber.

PropertyTypeDescriptionOverridesInherited fromDefined in
arc28Events?Arc28EventGroup[]Any ARC-28 event definitions to process from app call logs-CoreTransactionSubscriptionParams.arc28Eventssrc/types/subscription.ts:260
filtersSubscriberConfigFilter<unknown>[]The set of filters to subscribe to / emit events for, along with optional data mappers.CoreTransactionSubscriptionParams.filters-src/types/subscription.ts:388
frequencyInSeconds?numberThe frequency to poll for new blocks in seconds; defaults to 1s--src/types/subscription.ts:390
maxIndexerRoundsToSync?numberThe maximum number of rounds to sync from indexer when using `syncBehaviour: ‘catchup-with-indexer’. By default there is no limit and it will paginate through all of the rounds. Sometimes this can result in an incredibly long catchup time that may break the service due to execution and memory constraints, particularly for filters that result in a large number of transactions. Instead, this allows indexer catchup to be split into multiple polls, each with a transactionally consistent boundary based on the number of rounds specified here.-CoreTransactionSubscriptionParams.maxIndexerRoundsToSyncsrc/types/subscription.ts:280
maxRoundsToSync?numberThe maximum number of rounds to sync from algod for each subscription pull/poll. Defaults to 500. This gives you control over how many rounds you wait for at a time, your staleness tolerance when using skip-sync-newest or fail, and your catchup speed when using sync-oldest.-CoreTransactionSubscriptionParams.maxRoundsToSyncsrc/types/subscription.ts:269
syncBehaviour"skip-sync-newest" | "sync-oldest" | "sync-oldest-start-now" | "catchup-with-indexer" | "fail"If the current tip of the configured Algorand blockchain is more than maxRoundsToSync past watermark then how should that be handled: _ skip-sync-newest: Discard old blocks/transactions and sync the newest; useful for real-time notification scenarios where you don’t care about history and are happy to lose old transactions. _ sync-oldest: Sync from the oldest rounds forward maxRoundsToSync rounds using algod; note: this will be slow if you are starting from 0 and requires an archival node. _ sync-oldest-start-now: Same as sync-oldest, but if the watermark is 0 then start at the current round i.e. don’t sync historical records, but once subscribing starts sync everything; note: if it falls behind it requires an archival node. _ catchup-with-indexer: Sync to round currentRound - maxRoundsToSync + 1 using indexer (much faster than using algod for long time periods) and then use algod from there. * fail: Throw an error.-CoreTransactionSubscriptionParams.syncBehavioursrc/types/subscription.ts:298
waitForBlockWhenAtTip?booleanWhether to wait via algod /status/wait-for-block-after endpoint when at the tip of the chain; reduces latency of subscription--src/types/subscription.ts:392
watermarkPersistenceobjectMethods to retrieve and persist the current watermark so syncing is resilient and maintains its position in the chain--src/types/subscription.ts:395
watermarkPersistence.get() => Promise<bigint>Returns the current watermark that syncing has previously been processed to--src/types/subscription.ts:397
watermarkPersistence.set(newWatermark) => Promise<void>Persist the new watermark that has been processed--src/types/subscription.ts:399

Defined in: src/types/subscription.ts:200

Represents a balance change effect for a transaction.

PropertyTypeDescriptionDefined in
addressstringThe address that the balance change is for.src/types/subscription.ts:202
amountbigintThe amount of the balance change in smallest divisible unit or microAlgos.src/types/subscription.ts:206
assetIdbigintThe asset ID of the balance change, or 0 for Algos.src/types/subscription.ts:204
rolesBalanceChangeRole[]The roles the account was playing that led to the balance changesrc/types/subscription.ts:208

Defined in: src/types/subscription.ts:228

Metadata about an impending subscription poll.

PropertyTypeDescriptionDefined in
currentRoundbigintThe current round of algodsrc/types/subscription.ts:232
watermarkbigintThe current watermark of the subscribersrc/types/subscription.ts:230

Defined in: src/types/subscription.ts:33

Metadata about a block that was retrieved from algod.

PropertyTypeDescriptionDefined in
fullTransactionCountnumberFull count of transactions and inner transactions (recursively) in this block.src/types/subscription.ts:53
genesisHashstringThe base64 genesis hash of the chain.src/types/subscription.ts:43
genesisIdstringThe genesis ID of the chain.src/types/subscription.ts:41
hash?stringThe base64 block hash.src/types/subscription.ts:35
parentTransactionCountnumberCount of parent transactions in this blocksrc/types/subscription.ts:51
participationUpdates?ParticipationUpdatesParticipation account data that needs to be checked/acted on by the network.src/types/subscription.ts:68
previousBlockHash?stringThe base64 previous block hash.src/types/subscription.ts:45
proposer?stringAddress of the proposer of this blocksrc/types/subscription.ts:70
rewards?BlockRewardsFields relating to rewardssrc/types/subscription.ts:49
roundbigintThe round of the block.src/types/subscription.ts:37
seedstringThe base64 seed of the block.src/types/subscription.ts:47
stateProofTracking?BlockStateProofTracking[]Tracks the status of state proofs.src/types/subscription.ts:64
timestampnumberBlock creation timestamp in seconds since epochsrc/types/subscription.ts:39
transactionsRootstringTransactionsRoot authenticates the set of transactions appearing in the block. More specifically, it’s the root of a merkle tree whose leaves are the block’s Txids, in lexicographic order. For the empty block, it’s 0. Note that the TxnRoot does not authenticate the signatures on the transactions, only the transactions themselves. Two blocks with the same transactions but in a different order and with different signatures will have the same TxnRoot. Pattern : ”^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$“src/types/subscription.ts:58
transactionsRootSha256stringTransactionsRootSHA256 is an auxiliary TransactionRoot, built using a vector commitment instead of a merkle tree, and SHA256 hash function instead of the default SHA512_256. This commitment can be used on environments where only the SHA256 function exists.src/types/subscription.ts:60
txnCounterbigintNumber of the next transaction that will be committed after this block. It is 0 when no transactions have ever been committed (since TxnCounter started being supported).src/types/subscription.ts:55
upgradeState?BlockUpgradeStateFields relating to a protocol upgrade.src/types/subscription.ts:62
upgradeVote?BlockUpgradeVoteFields relating to voting for a protocol upgrade.src/types/subscription.ts:66

Defined in: src/types/subscription.ts:73

PropertyTypeDescriptionDefined in
feeSinkstringFeeSink is an address that accepts transaction fees, it can only spend to the incentive pool.src/types/subscription.ts:75
rewardsCalculationRoundbigintThe number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos for every reward unit in the next round.src/types/subscription.ts:77
rewardsLevelbigintHow many rewards, in MicroAlgos, have been distributed to each RewardUnit of MicroAlgos since genesis.src/types/subscription.ts:79
rewardsPoolstringRewardsPool is an address that accepts periodic injections from the fee-sink and continually redistributes them as rewards.src/types/subscription.ts:81
rewardsRatebigintNumber of new MicroAlgos added to the participation stake from rewards at the next round.src/types/subscription.ts:83
rewardsResiduebigintNumber of leftover MicroAlgos after the distribution of RewardsRate/rewardUnits MicroAlgos for every reward unit in the next round.src/types/subscription.ts:85

Defined in: src/types/subscription.ts:101

PropertyTypeDescriptionDefined in
nextRound?bigint(n) Next round for which we will accept a state proof transaction.src/types/subscription.ts:105
onlineTotalWeight?bigint(t) The total number of microalgos held by the online accounts during the StateProof round.src/types/subscription.ts:111
type?numberState Proof Type. Note the raw object uses map with this as key.src/types/subscription.ts:116
votersCommitment?string(v) Root of a vector commitment containing online accounts that will help sign the proof.src/types/subscription.ts:122

Defined in: src/types/subscription.ts:88

PropertyTypeDescriptionDefined in
currentProtocolstringCurrent protocol versionsrc/types/subscription.ts:90
nextProtocol?stringThe next proposed protocol version.src/types/subscription.ts:92
nextProtocolApprovals?bigintNumber of blocks which approved the protocol upgrade.src/types/subscription.ts:94
nextProtocolSwitchOn?bigintRound on which the protocol upgrade will take effect.src/types/subscription.ts:98
nextProtocolVoteBefore?bigintDeadline round for this protocol upgrade (No votes will be consider after this round).src/types/subscription.ts:96

Defined in: src/types/subscription.ts:125

PropertyTypeDescriptionDefined in
upgradeApprove?boolean(upgradeyes) Indicates a yes vote for the current proposal.src/types/subscription.ts:129
upgradeDelay?bigint(upgradedelay) Indicates the time between acceptance and execution.src/types/subscription.ts:134
upgradePropose?string(upgradeprop) Indicates a proposed upgrade.src/types/subscription.ts:139

Defined in: src/types/subscription.ts:236

Common parameters to control a single subscription pull/poll for both AlgorandSubscriber and getSubscribedTransactions.

PropertyTypeDescriptionDefined in
arc28Events?Arc28EventGroup[]Any ARC-28 event definitions to process from app call logssrc/types/subscription.ts:260
filtersNamedTransactionFilter[]The filter(s) to apply to find transactions of interest. A list of filters with corresponding names. Example filter: [{ name: 'asset-transfers', filter: { type: TransactionType.axfer, //... } }, { name: 'payments', filter: { type: TransactionType.pay, //... } }]src/types/subscription.ts:258
maxIndexerRoundsToSync?numberThe maximum number of rounds to sync from indexer when using `syncBehaviour: ‘catchup-with-indexer’. By default there is no limit and it will paginate through all of the rounds. Sometimes this can result in an incredibly long catchup time that may break the service due to execution and memory constraints, particularly for filters that result in a large number of transactions. Instead, this allows indexer catchup to be split into multiple polls, each with a transactionally consistent boundary based on the number of rounds specified here.src/types/subscription.ts:280
maxRoundsToSync?numberThe maximum number of rounds to sync from algod for each subscription pull/poll. Defaults to 500. This gives you control over how many rounds you wait for at a time, your staleness tolerance when using skip-sync-newest or fail, and your catchup speed when using sync-oldest.src/types/subscription.ts:269
syncBehaviour"skip-sync-newest" | "sync-oldest" | "sync-oldest-start-now" | "catchup-with-indexer" | "fail"If the current tip of the configured Algorand blockchain is more than maxRoundsToSync past watermark then how should that be handled: _ skip-sync-newest: Discard old blocks/transactions and sync the newest; useful for real-time notification scenarios where you don’t care about history and are happy to lose old transactions. _ sync-oldest: Sync from the oldest rounds forward maxRoundsToSync rounds using algod; note: this will be slow if you are starting from 0 and requires an archival node. _ sync-oldest-start-now: Same as sync-oldest, but if the watermark is 0 then start at the current round i.e. don’t sync historical records, but once subscribing starts sync everything; note: if it falls behind it requires an archival node. _ catchup-with-indexer: Sync to round currentRound - maxRoundsToSync + 1 using indexer (much faster than using algod for long time periods) and then use algod from there. * fail: Throw an error.src/types/subscription.ts:298

Defined in: src/types/subscription.ts:302

Specify a named filter to apply to find transactions of interest.

PropertyTypeDescriptionDefined in
filterTransactionFilterThe filter itself.src/types/subscription.ts:306
namestringThe name to give the filter.src/types/subscription.ts:304

Defined in: src/types/subscription.ts:142

PropertyTypeDescriptionDefined in
absentParticipationAccounts?string[](partupabs) a list of online accounts that need to be suspended.src/types/subscription.ts:146
expiredParticipationAccounts?string[](partupdrmv) a list of online accounts that needs to be converted to offline since their participation key expired.src/types/subscription.ts:152

Defined in: src/types/subscription.ts:404

A single event to subscribe to / emit.

Type Parameter
T
PropertyTypeDescriptionInherited fromDefined in
filterTransactionFilterThe filter itself.NamedTransactionFilter.filtersrc/types/subscription.ts:306
mapper?(transaction) => Promise<T[]>An optional data mapper if you want the event data to take a certain shape when subscribing to events with this filter name. If not specified, then the event will simply receive a SubscribedTransaction. Note: if you provide multiple filters with the same name then only the mapper of the first matching filter will be used-src/types/subscription.ts:411
namestringThe name to give the filter.NamedTransactionFilter.namesrc/types/subscription.ts:304

Defined in: src/types/subscription.ts:310

Specify a filter to apply to find transactions of interest.

PropertyTypeDescriptionDefined in
appCallArgumentsMatch?(appCallArguments?) => booleanFilter to app transactions that meet the given app arguments predicate.src/types/subscription.ts:339
appCreate?booleanFilter to transactions that are creating an app.src/types/subscription.ts:322
appId?bigint | bigint[]Filter to transactions against the app with the given ID(s).src/types/subscription.ts:320
appOnComplete?ApplicationOnComplete | ApplicationOnComplete[]Filter to transactions that have given on complete(s).src/types/subscription.ts:324
arc28Events?object[]Filter to app transactions that emit the given ARC-28 events. Note: the definitions for these events must be passed in to the subscription config via arc28Events.src/types/subscription.ts:343
assetCreate?booleanFilter to transactions that are creating an asset.src/types/subscription.ts:328
assetId?bigint | bigint[]Filter to transactions against the asset with the given ID(s).src/types/subscription.ts:326
balanceChanges?object[]Filter to transactions that result in balance changes that match one or more of the given set of balance changes.src/types/subscription.ts:345
customFilter?(transaction) => booleanCatch-all custom filter to filter for things that the rest of the filters don’t provide.src/types/subscription.ts:362
maxAmount?number | bigintFilter to transactions where the amount being transferred is less than or equal to the given maximum (microAlgos or decimal units of an ASA if type: axfer).src/types/subscription.ts:334
methodSignature?string | string[]Filter to app transactions that have the given ARC-0004 method selector(s) for the given method signature as the first app argument.src/types/subscription.ts:337
minAmount?number | bigintFilter to transactions where the amount being transferred is greater than or equal to the given minimum (microAlgos or decimal units of an ASA if type: axfer).src/types/subscription.ts:331
notePrefix?stringFilter to transactions with a note having the given prefix.src/types/subscription.ts:318
receiver?string | string[]Filter to transactions being received by the specified address(es).src/types/subscription.ts:316
sender?string | string[]Filter to transactions sent from the specified address(es).src/types/subscription.ts:314
type?TransactionType | TransactionType[]Filter based on the given transaction type(s).src/types/subscription.ts:312

Defined in: src/types/subscription.ts:366

Parameters to control a single subscription pull/poll.

PropertyTypeDescriptionInherited fromDefined in
arc28Events?Arc28EventGroup[]Any ARC-28 event definitions to process from app call logsCoreTransactionSubscriptionParams.arc28Eventssrc/types/subscription.ts:260
currentRound?bigintThe current tip of the configured Algorand blockchain. If not provided, it will be resolved on demand.-src/types/subscription.ts:382
filtersNamedTransactionFilter[]The filter(s) to apply to find transactions of interest. A list of filters with corresponding names. Example filter: [{ name: 'asset-transfers', filter: { type: TransactionType.axfer, //... } }, { name: 'payments', filter: { type: TransactionType.pay, //... } }]CoreTransactionSubscriptionParams.filterssrc/types/subscription.ts:258
maxIndexerRoundsToSync?numberThe maximum number of rounds to sync from indexer when using `syncBehaviour: ‘catchup-with-indexer’. By default there is no limit and it will paginate through all of the rounds. Sometimes this can result in an incredibly long catchup time that may break the service due to execution and memory constraints, particularly for filters that result in a large number of transactions. Instead, this allows indexer catchup to be split into multiple polls, each with a transactionally consistent boundary based on the number of rounds specified here.CoreTransactionSubscriptionParams.maxIndexerRoundsToSyncsrc/types/subscription.ts:280
maxRoundsToSync?numberThe maximum number of rounds to sync from algod for each subscription pull/poll. Defaults to 500. This gives you control over how many rounds you wait for at a time, your staleness tolerance when using skip-sync-newest or fail, and your catchup speed when using sync-oldest.CoreTransactionSubscriptionParams.maxRoundsToSyncsrc/types/subscription.ts:269
syncBehaviour"skip-sync-newest" | "sync-oldest" | "sync-oldest-start-now" | "catchup-with-indexer" | "fail"If the current tip of the configured Algorand blockchain is more than maxRoundsToSync past watermark then how should that be handled: _ skip-sync-newest: Discard old blocks/transactions and sync the newest; useful for real-time notification scenarios where you don’t care about history and are happy to lose old transactions. _ sync-oldest: Sync from the oldest rounds forward maxRoundsToSync rounds using algod; note: this will be slow if you are starting from 0 and requires an archival node. _ sync-oldest-start-now: Same as sync-oldest, but if the watermark is 0 then start at the current round i.e. don’t sync historical records, but once subscribing starts sync everything; note: if it falls behind it requires an archival node. _ catchup-with-indexer: Sync to round currentRound - maxRoundsToSync + 1 using indexer (much faster than using algod for long time periods) and then use algod from there. * fail: Throw an error.CoreTransactionSubscriptionParams.syncBehavioursrc/types/subscription.ts:298
watermarkbigintThe current round watermark that transactions have previously been synced to. Persist this value as you process transactions processed from this method to allow for resilient and incremental syncing. Syncing will start from watermark + 1. Start from 0 if you want to start from the beginning of time, noting that will be slow if onMaxRounds is sync-oldest.-src/types/subscription.ts:377

Defined in: src/types/subscription.ts:7

The result of a single subscription pull/poll.

PropertyTypeDescriptionDefined in
blockMetadata?BlockMetadata[]The metadata about any blocks that were retrieved from algod as part of the subscription poll.src/types/subscription.ts:29
currentRoundbigintThe current detected tip of the configured Algorand blockchain.src/types/subscription.ts:11
newWatermarkbigintThe new watermark value to persist for the next call to getSubscribedTransactions to continue the sync. Will be equal to syncedRoundRange[1]. Only persist this after processing (or in the same atomic transaction as) subscribed transactions to keep it reliable.src/types/subscription.ts:19
startingWatermarkbigintThe watermark value that was retrieved at the start of the subscription poll.src/types/subscription.ts:13
subscribedTransactionsSubscribedTransaction[]Any transactions that matched the given filter within the synced round range. This substantively uses the indexer transaction format to represent the data with some additional fields.src/types/subscription.ts:25
syncedRoundRange[bigint, bigint]The round range that was synced from/tosrc/types/subscription.ts:9

ErrorListener = (error) => Promise<void> | void

Defined in: src/types/subscription.ts:416

ParameterType
errorunknown

Promise<void> | void


TypedAsyncEventListener<T> = (event, eventName) => Promise<void> | void

Defined in: src/types/subscription.ts:414

Type Parameter
T
ParameterType
eventT
eventNamestring | symbol

Promise<void> | void