From 279bf67fef9801e06270e84c1bfa51758cd735c4 Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Wed, 10 Jul 2024 12:49:01 +1000 Subject: [PATCH 01/10] fix: add more fields to blocks metadata --- src/transform.ts | 17 ++++++ src/types/block.ts | 42 +++++++++++++ src/types/subscription.ts | 60 +++++++++++++++++++ tests/scenarios/transform-complex-txn.spec.ts | 22 +++++++ 4 files changed, 141 insertions(+) diff --git a/src/transform.ts b/src/transform.ts index 9d5981f..120cfd5 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -603,6 +603,23 @@ export function blockDataToBlockMetadata(blockData: BlockData): BlockMetadata { txnCounter: block.tc, transactionsRoot: block.txn ? Buffer.from(block.txn).toString('base64') : 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', transactionsRootSha256: block.txn256, + upgradeVote: { + upgradeApprove: block.upgradeyes, + upgradeDelay: block.upgradedelay, + upgradePropose: block.upgradeprop, + }, + participationUpdates: { + absentParticipationAccounts: block.partupdabs ? block.partupdabs.map((addr) => algosdk.encodeAddress(addr)) : undefined, + expiredParticipationAccounts: block.partupdrmv ? block.partupdrmv.map((addr) => algosdk.encodeAddress(addr)) : undefined, + }, + stateProofTracking: block.spt + ? Object.entries(block.spt).map(([key, value]) => ({ + nextRound: value.n, + onlineTotalWeight: value.t ?? 0, + type: Number(key), + votersCommitment: value.v, + })) + : undefined, } } diff --git a/src/types/block.ts b/src/types/block.ts index 54c795a..3229cb7 100644 --- a/src/types/block.ts +++ b/src/types/block.ts @@ -147,6 +147,30 @@ export interface Block { * The transactions within the block. */ txns?: BlockTransaction[] + /** + * AbsentParticipationAccounts contains a list of online accounts that + * needs to be converted to offline since they are not proposing. + */ + partupdabs?: Uint8Array[] + /** + * ExpiredParticipationAccounts contains a list of online accounts that needs to be + * converted to offline since their participation key expired. + */ + partupdrmv?: Uint8Array[] + /** + * UpgradeApprove indicates a yes vote for the current proposal + */ + upgradeyes?: boolean + /** + * UpgradeDelay indicates the time between acceptance and execution + */ + upgradedelay?: number + /** + * UpgradePropose indicates a proposed upgrade + */ + upgradeprop?: string + + spt?: Record } /** Data that is returned in a raw Algorand block for a single transaction @@ -275,6 +299,24 @@ export interface StateProofMessage { v: Uint8Array } +export interface StateProofTracking { + /** StateProofVotersCommitment is the root of a vector commitment containing the + * online accounts that will help sign a state proof. The VC root, and the state proof, + * happen on blocks that are a multiple of ConsensusParams.StateProofRounds. + * For blocks that are not a multiple of ConsensusParams.StateProofRounds, this value is zero. + */ + v?: string + /** StateProofOnlineTotalWeight is the total number of microalgos held by the online accounts + * during the StateProof round (or zero, if the merkle root is zero - no commitment for StateProof voters). + * This is intended for computing the threshold of votes to expect from StateProofVotersCommitment. + */ + t?: number + /** + * StateProofNextRound is the next round for which we will accept a StateProof transaction. + */ + n?: number +} + /** The representation of all important data for a single transaction or inner transaction * and its side effects within a committed block. */ diff --git a/src/types/subscription.ts b/src/types/subscription.ts index bc5e61e..3d0a75d 100644 --- a/src/types/subscription.ts +++ b/src/types/subscription.ts @@ -60,6 +60,12 @@ export interface BlockMetadata { transactionsRootSha256: string /** Fields relating to a protocol upgrade. */ upgradeState?: BlockUpgradeState + /** Tracks the status of state proofs. */ + stateProofTracking?: StateProofTracking[] + /** Fields relating to voting for a protocol upgrade. */ + upgradeVote?: BlockUpgradeVote + /** Participation account data that needs to be checked/acted on by the network. */ + participationUpdates?: ParticipationUpdates } export interface BlockRewards { @@ -90,6 +96,60 @@ export interface BlockUpgradeState { nextProtocolSwitchOn?: number } +export interface StateProofTracking { + /** + * (n) Next round for which we will accept a state proof transaction. + */ + nextRound?: number + + /** + * (t) The total number of microalgos held by the online accounts during the + * StateProof round. + */ + onlineTotalWeight?: number + + /** + * State Proof Type. Note the raw object uses map with this as key. + */ + type?: number + + /** + * (v) Root of a vector commitment containing online accounts that will help sign + * the proof. + */ + votersCommitment?: string +} + +export interface BlockUpgradeVote { + /** + * (upgradeyes) Indicates a yes vote for the current proposal. + */ + upgradeApprove?: boolean + + /** + * (upgradedelay) Indicates the time between acceptance and execution. + */ + upgradeDelay?: number | bigint + + /** + * (upgradeprop) Indicates a proposed upgrade. + */ + upgradePropose?: string +} + +export interface ParticipationUpdates { + /** + * (partupabs) a list of online accounts that need to be suspended. + */ + absentParticipationAccounts?: string[] + + /** + * (partupdrmv) a list of online accounts that needs to be converted to offline + * since their participation key expired. + */ + expiredParticipationAccounts?: string[] +} + /** The common model used to expose a transaction that is returned from a subscription. * * Substantively, based on the Indexer [`TransactionResult` model](https://developer.algorand.org/docs/rest-apis/indexer/#transaction) format with some modifications to: diff --git a/tests/scenarios/transform-complex-txn.spec.ts b/tests/scenarios/transform-complex-txn.spec.ts index a41f8b8..7b5de9d 100644 --- a/tests/scenarios/transform-complex-txn.spec.ts +++ b/tests/scenarios/transform-complex-txn.spec.ts @@ -278,6 +278,10 @@ describe('Complex transaction with many nested inner transactions', () => { "genesisId": "mainnet-v1.0", "hash": "EOq+HX242/G/ADonU6q5lfimxX7twuFKEwtG4rDt+kI=", "parentTransactionCount": 55, + "participationUpdates": { + "absentParticipationAccounts": undefined, + "expiredParticipationAccounts": undefined, + }, "previousBlockHash": "8ReLxqOPxmuKuBfACtllRRr13n2E2r01f8wXt3vFYW0=", "rewards": { "feeSink": "Y76M3MSY6DKBRHBL7C3NNDXGS5IIMQVQVUAB6MP4XEMMGVF2QWNPL226CA", @@ -289,6 +293,14 @@ describe('Complex transaction with many nested inner transactions', () => { }, "round": 35214367, "seed": "Tp6NntUaw17I8GGscaawpAuI0vQDMgp1TBSMAcpohtY=", + "stateProofTracking": [ + { + "nextRound": 35214336, + "onlineTotalWeight": 0, + "type": 0, + "votersCommitment": undefined, + }, + ], "timestamp": 1705252440, "transactionsRoot": "xrzxjhAycO5dLAJ622EAMV4ffb2T1sagFWYQPR1S0IQ=", "transactionsRootSha256": "JfFssH1FIyVOuor0PEX9ZAwiCcMH2FcZbcRTsmqYpa0=", @@ -300,6 +312,11 @@ describe('Complex transaction with many nested inner transactions', () => { "nextProtocolSwitchOn": 35275315, "nextProtocolVoteBefore": 35125315, }, + "upgradeVote": { + "upgradeApprove": undefined, + "upgradeDelay": undefined, + "upgradePropose": undefined, + }, }, ] `) @@ -674,4 +691,9 @@ describe('Complex transaction with many nested inner transactions', () => { expect(transaction.id).toBe('HHQHASIF2YLCSUYIPE6LIMLSNLCVMQBQHF3X46SKTX6F7ZSFKFCQ') expect(transaction.id).toBe(blockTransactions[0].transaction.txID()) }) + // it('just to test', async () => { + // const blocks = await getBlocksBulk({ startRound: 39430981, maxRound: 39430981 }, algod) + // const x = blockDataToBlockMetadata(blocks[0]) + // console.log(x) + // }) }) From 90d4494fd7aa9373fde8e4fbf7e034ee5e592b2a Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Wed, 10 Jul 2024 12:52:06 +1000 Subject: [PATCH 02/10] docs: update docs --- .../types_subscription.BalanceChangeRole.md | 10 +- docs/code/interfaces/types_block.Block.md | 120 +++++++++++++++--- .../types_block.BlockAgreementCertificate.md | 12 +- docs/code/interfaces/types_block.BlockData.md | 4 +- .../types_block.BlockTransaction.md | 24 ++-- .../types_block.BlockTransactionEvalDelta.md | 8 +- .../interfaces/types_block.BlockValueDelta.md | 6 +- docs/code/interfaces/types_block.BlockVote.md | 6 +- docs/code/interfaces/types_block.LogicSig.md | 8 +- .../interfaces/types_block.MultisigSig.md | 6 +- .../code/interfaces/types_block.StateProof.md | 14 +- .../types_block.StateProofMessage.md | 10 +- .../types_block.StateProofTracking.md | 54 ++++++++ .../types_block.TransactionInBlock.md | 90 ++++++++++--- ...s_subscription.AlgorandSubscriberConfig.md | 16 +-- .../types_subscription.BalanceChange.md | 8 +- .../types_subscription.BeforePollMetadata.md | 4 +- .../types_subscription.BlockMetadata.md | 39 ++++++ .../types_subscription.BlockRewards.md | 12 +- ...es_subscription.BlockStateProofTracking.md | 64 ++++++++++ .../types_subscription.BlockUpgradeState.md | 10 +- .../types_subscription.BlockUpgradeVote.md | 49 +++++++ ...ption.CoreTransactionSubscriptionParams.md | 10 +- ...pes_subscription.NamedTransactionFilter.md | 4 +- ...types_subscription.ParticipationUpdates.md | 37 ++++++ ...pes_subscription.SubscriberConfigFilter.md | 6 +- .../types_subscription.TransactionFilter.md | 32 ++--- ...scription.TransactionSubscriptionParams.md | 14 +- docs/code/modules/types.md | 28 ++++ docs/code/modules/types_block.md | 3 +- docs/code/modules/types_subscription.md | 9 +- src/types/subscription.ts | 4 +- 32 files changed, 567 insertions(+), 154 deletions(-) create mode 100644 docs/code/interfaces/types_block.StateProofTracking.md create mode 100644 docs/code/interfaces/types_subscription.BlockStateProofTracking.md create mode 100644 docs/code/interfaces/types_subscription.BlockUpgradeVote.md create mode 100644 docs/code/interfaces/types_subscription.ParticipationUpdates.md diff --git a/docs/code/enums/types_subscription.BalanceChangeRole.md b/docs/code/enums/types_subscription.BalanceChangeRole.md index f2c4f79..9c2deb4 100644 --- a/docs/code/enums/types_subscription.BalanceChangeRole.md +++ b/docs/code/enums/types_subscription.BalanceChangeRole.md @@ -26,7 +26,7 @@ Account was creating an asset and holds the full asset supply #### Defined in -[types/subscription.ts:135](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L135) +[types/subscription.ts:195](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L195) ___ @@ -39,7 +39,7 @@ A balance change with this role will always have a 0 amount and use the asset ma #### Defined in -[types/subscription.ts:139](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L139) +[types/subscription.ts:199](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L199) ___ @@ -51,7 +51,7 @@ Account was having an asset amount closed to it #### Defined in -[types/subscription.ts:133](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L133) +[types/subscription.ts:193](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L193) ___ @@ -63,7 +63,7 @@ Account was receiving a transaction #### Defined in -[types/subscription.ts:131](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L131) +[types/subscription.ts:191](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L191) ___ @@ -75,4 +75,4 @@ Account was sending a transaction (sending asset and/or spending fee if asset `0 #### Defined in -[types/subscription.ts:129](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L129) +[types/subscription.ts:189](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L189) diff --git a/docs/code/interfaces/types_block.Block.md b/docs/code/interfaces/types_block.Block.md index 3715d2d..7c45b9c 100644 --- a/docs/code/interfaces/types_block.Block.md +++ b/docs/code/interfaces/types_block.Block.md @@ -23,6 +23,8 @@ https://github.com/algorand/go-algorand/blob/master/data/bookkeeping/block.go#L3 - [nextproto](types_block.Block.md#nextproto) - [nextswitch](types_block.Block.md#nextswitch) - [nextyes](types_block.Block.md#nextyes) +- [partupdabs](types_block.Block.md#partupdabs) +- [partupdrmv](types_block.Block.md#partupdrmv) - [prev](types_block.Block.md#prev) - [proto](types_block.Block.md#proto) - [rate](types_block.Block.md#rate) @@ -30,11 +32,15 @@ https://github.com/algorand/go-algorand/blob/master/data/bookkeeping/block.go#L3 - [rwcalr](types_block.Block.md#rwcalr) - [rwd](types_block.Block.md#rwd) - [seed](types_block.Block.md#seed) +- [spt](types_block.Block.md#spt) - [tc](types_block.Block.md#tc) - [ts](types_block.Block.md#ts) - [txn](types_block.Block.md#txn) - [txn256](types_block.Block.md#txn256) - [txns](types_block.Block.md#txns) +- [upgradedelay](types_block.Block.md#upgradedelay) +- [upgradeprop](types_block.Block.md#upgradeprop) +- [upgradeyes](types_block.Block.md#upgradeyes) ## Properties @@ -48,7 +54,7 @@ since genesis. #### Defined in -[types/block.ts:87](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L87) +[types/block.ts:88](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L88) ___ @@ -60,7 +66,7 @@ The FeeSink accepts transaction fees. It can only spend to the incentive pool. #### Defined in -[types/block.ts:89](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L89) +[types/block.ts:90](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L90) ___ @@ -73,7 +79,7 @@ MicroAlgos for every reward unit in the next round. #### Defined in -[types/block.ts:93](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L93) +[types/block.ts:94](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L94) ___ @@ -85,7 +91,7 @@ Genesis ID to which this block belongs. #### Defined in -[types/block.ts:95](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L95) +[types/block.ts:96](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L96) ___ @@ -97,7 +103,7 @@ Genesis hash to which this block belongs. #### Defined in -[types/block.ts:97](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L97) +[types/block.ts:98](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L98) ___ @@ -109,7 +115,7 @@ Deadline round for this protocol upgrade (No votes will be considered after this #### Defined in -[types/block.ts:141](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L141) +[types/block.ts:142](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L142) ___ @@ -121,7 +127,7 @@ The next proposed protocol version. #### Defined in -[types/block.ts:133](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L133) +[types/block.ts:134](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L134) ___ @@ -133,7 +139,7 @@ Round on which the protocol upgrade will take effect. #### Defined in -[types/block.ts:145](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L145) +[types/block.ts:146](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L146) ___ @@ -145,7 +151,33 @@ Number of blocks which approved the protocol upgrade. #### Defined in -[types/block.ts:137](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L137) +[types/block.ts:138](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L138) + +___ + +### partupdabs + +• `Optional` **partupdabs**: `Uint8Array`[] + +AbsentParticipationAccounts contains a list of online accounts that +needs to be converted to offline since they are not proposing. + +#### Defined in + +[types/block.ts:155](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L155) + +___ + +### partupdrmv + +• `Optional` **partupdrmv**: `Uint8Array`[] + +ExpiredParticipationAccounts contains a list of online accounts that needs to be +converted to offline since their participation key expired. + +#### Defined in + +[types/block.ts:160](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L160) ___ @@ -157,7 +189,7 @@ The hash of the previous block #### Defined in -[types/block.ts:99](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L99) +[types/block.ts:100](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L100) ___ @@ -169,7 +201,7 @@ UpgradeState tracks the protocol upgrade state machine; proto is the current pro #### Defined in -[types/block.ts:101](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L101) +[types/block.ts:102](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L102) ___ @@ -181,7 +213,7 @@ The number of new MicroAlgos added to the participation stake from rewards at th #### Defined in -[types/block.ts:103](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L103) +[types/block.ts:104](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L104) ___ @@ -193,7 +225,7 @@ Round number. #### Defined in -[types/block.ts:105](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L105) +[types/block.ts:106](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L106) ___ @@ -205,7 +237,7 @@ The round at which the RewardsRate will be recalculated. #### Defined in -[types/block.ts:107](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L107) +[types/block.ts:108](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L108) ___ @@ -218,7 +250,7 @@ FeeSink and continually redistributes them to addresses as rewards. #### Defined in -[types/block.ts:111](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L111) +[types/block.ts:112](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L112) ___ @@ -230,7 +262,17 @@ Sortition seed #### Defined in -[types/block.ts:113](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L113) +[types/block.ts:114](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L114) + +___ + +### spt + +• `Optional` **spt**: `Record`\<`number`, [`StateProofTracking`](types_block.StateProofTracking.md)\> + +#### Defined in + +[types/block.ts:174](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L174) ___ @@ -244,7 +286,7 @@ committed after this block. Genesis blocks can start at either #### Defined in -[types/block.ts:118](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L118) +[types/block.ts:119](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L119) ___ @@ -256,7 +298,7 @@ Round time (unix timestamp) #### Defined in -[types/block.ts:120](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L120) +[types/block.ts:121](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L121) ___ @@ -270,7 +312,7 @@ This value is only set when there are transactions in the block. #### Defined in -[types/block.ts:125](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L125) +[types/block.ts:126](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L126) ___ @@ -282,7 +324,7 @@ Root of transaction vector commitment merkle tree using SHA256 hash function. #### Defined in -[types/block.ts:129](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L129) +[types/block.ts:130](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L130) ___ @@ -294,4 +336,40 @@ The transactions within the block. #### Defined in -[types/block.ts:149](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L149) +[types/block.ts:150](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L150) + +___ + +### upgradedelay + +• `Optional` **upgradedelay**: `number` + +UpgradeDelay indicates the time between acceptance and execution + +#### Defined in + +[types/block.ts:168](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L168) + +___ + +### upgradeprop + +• `Optional` **upgradeprop**: `string` + +UpgradePropose indicates a proposed upgrade + +#### Defined in + +[types/block.ts:172](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L172) + +___ + +### upgradeyes + +• `Optional` **upgradeyes**: `boolean` + +UpgradeApprove indicates a yes vote for the current proposal + +#### Defined in + +[types/block.ts:164](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L164) diff --git a/docs/code/interfaces/types_block.BlockAgreementCertificate.md b/docs/code/interfaces/types_block.BlockAgreementCertificate.md index c5f873d..ad66e8a 100644 --- a/docs/code/interfaces/types_block.BlockAgreementCertificate.md +++ b/docs/code/interfaces/types_block.BlockAgreementCertificate.md @@ -33,7 +33,7 @@ Equivocation votes #### Defined in -[types/block.ts:40](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L40) +[types/block.ts:41](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L41) ___ @@ -45,7 +45,7 @@ Period represents the current period of the source. #### Defined in -[types/block.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L25) +[types/block.ts:26](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L26) ___ @@ -65,7 +65,7 @@ The proposal #### Defined in -[types/block.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L29) +[types/block.ts:30](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L30) ___ @@ -77,7 +77,7 @@ Round number #### Defined in -[types/block.ts:23](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L23) +[types/block.ts:24](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L24) ___ @@ -89,7 +89,7 @@ Step represents the current period of the source. #### Defined in -[types/block.ts:27](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L27) +[types/block.ts:28](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L28) ___ @@ -101,4 +101,4 @@ Votes #### Defined in -[types/block.ts:38](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L38) +[types/block.ts:39](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L39) diff --git a/docs/code/interfaces/types_block.BlockData.md b/docs/code/interfaces/types_block.BlockData.md index ad0d35f..55b7e07 100644 --- a/docs/code/interfaces/types_block.BlockData.md +++ b/docs/code/interfaces/types_block.BlockData.md @@ -23,7 +23,7 @@ The block itself. #### Defined in -[types/block.ts:10](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L10) +[types/block.ts:11](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L11) ___ @@ -35,4 +35,4 @@ The block certification. #### Defined in -[types/block.ts:12](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L12) +[types/block.ts:13](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L13) diff --git a/docs/code/interfaces/types_block.BlockTransaction.md b/docs/code/interfaces/types_block.BlockTransaction.md index 4c5512d..e2a1d19 100644 --- a/docs/code/interfaces/types_block.BlockTransaction.md +++ b/docs/code/interfaces/types_block.BlockTransaction.md @@ -37,7 +37,7 @@ Asset closing amount in decimal units #### Defined in -[types/block.ts:166](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L166) +[types/block.ts:191](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L191) ___ @@ -49,7 +49,7 @@ App ID when an app is created by the transaction #### Defined in -[types/block.ts:164](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L164) +[types/block.ts:189](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L189) ___ @@ -61,7 +61,7 @@ Algo closing amount in microAlgos #### Defined in -[types/block.ts:168](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L168) +[types/block.ts:193](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L193) ___ @@ -73,7 +73,7 @@ Asset ID when an asset is created by the transaction #### Defined in -[types/block.ts:162](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L162) +[types/block.ts:187](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L187) ___ @@ -85,7 +85,7 @@ The eval deltas for the block #### Defined in -[types/block.ts:160](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L160) +[types/block.ts:185](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L185) ___ @@ -97,7 +97,7 @@ Has genesis hash #### Defined in -[types/block.ts:172](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L172) +[types/block.ts:197](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L197) ___ @@ -109,7 +109,7 @@ Has genesis id #### Defined in -[types/block.ts:170](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L170) +[types/block.ts:195](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L195) ___ @@ -121,7 +121,7 @@ Logic signature #### Defined in -[types/block.ts:176](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L176) +[types/block.ts:201](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L201) ___ @@ -133,7 +133,7 @@ Transaction multisig signature #### Defined in -[types/block.ts:178](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L178) +[types/block.ts:203](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L203) ___ @@ -145,7 +145,7 @@ The signer, if signing with a different key than the Transaction type `from` pro #### Defined in -[types/block.ts:180](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L180) +[types/block.ts:205](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L205) ___ @@ -157,7 +157,7 @@ Transaction ED25519 signature #### Defined in -[types/block.ts:174](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L174) +[types/block.ts:199](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L199) ___ @@ -169,4 +169,4 @@ The encoded transaction data #### Defined in -[types/block.ts:158](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L158) +[types/block.ts:183](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L183) diff --git a/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md b/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md index a3960f9..f28c9e7 100644 --- a/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md +++ b/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md @@ -25,7 +25,7 @@ The delta of global state, keyed by key #### Defined in -[types/block.ts:220](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L220) +[types/block.ts:245](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L245) ___ @@ -37,7 +37,7 @@ Inner transactions #### Defined in -[types/block.ts:226](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L226) +[types/block.ts:251](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L251) ___ @@ -49,7 +49,7 @@ The delta of local state keyed by account ID offset in [txn.Sender, ...txn.Accou #### Defined in -[types/block.ts:222](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L222) +[types/block.ts:247](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L247) ___ @@ -61,4 +61,4 @@ Logs #### Defined in -[types/block.ts:224](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L224) +[types/block.ts:249](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L249) diff --git a/docs/code/interfaces/types_block.BlockValueDelta.md b/docs/code/interfaces/types_block.BlockValueDelta.md index b11a71d..c3629f4 100644 --- a/docs/code/interfaces/types_block.BlockValueDelta.md +++ b/docs/code/interfaces/types_block.BlockValueDelta.md @@ -27,7 +27,7 @@ DeltaAction is an enum of actions that may be performed when applying a delta to #### Defined in -[types/block.ts:236](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L236) +[types/block.ts:261](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L261) ___ @@ -39,7 +39,7 @@ Bytes value #### Defined in -[types/block.ts:239](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L239) +[types/block.ts:264](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L264) ___ @@ -51,4 +51,4 @@ Uint64 value #### Defined in -[types/block.ts:242](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L242) +[types/block.ts:267](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L267) diff --git a/docs/code/interfaces/types_block.BlockVote.md b/docs/code/interfaces/types_block.BlockVote.md index 6119da5..d00e810 100644 --- a/docs/code/interfaces/types_block.BlockVote.md +++ b/docs/code/interfaces/types_block.BlockVote.md @@ -38,7 +38,7 @@ https://github.com/algorand/go-algorand/blob/master/data/committee/credential.go #### Defined in -[types/block.ts:54](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L54) +[types/block.ts:55](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L55) ___ @@ -54,7 +54,7 @@ https://github.com/algorand/go-algorand/blob/master/crypto/onetimesig.go #### Defined in -[types/block.ts:62](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L62) +[types/block.ts:63](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L63) ___ @@ -66,4 +66,4 @@ Sender of the vote #### Defined in -[types/block.ts:49](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L49) +[types/block.ts:50](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L50) diff --git a/docs/code/interfaces/types_block.LogicSig.md b/docs/code/interfaces/types_block.LogicSig.md index 9e5dda6..e15057e 100644 --- a/docs/code/interfaces/types_block.LogicSig.md +++ b/docs/code/interfaces/types_block.LogicSig.md @@ -29,7 +29,7 @@ Arguments passed into the logic signature #### Defined in -[types/block.ts:194](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L194) +[types/block.ts:219](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L219) ___ @@ -41,7 +41,7 @@ Logic sig code #### Defined in -[types/block.ts:188](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L188) +[types/block.ts:213](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L213) ___ @@ -53,7 +53,7 @@ Multisig signature for delegated operations #### Defined in -[types/block.ts:192](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L192) +[types/block.ts:217](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L217) ___ @@ -65,4 +65,4 @@ ED25519 signature for delegated operations #### Defined in -[types/block.ts:190](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L190) +[types/block.ts:215](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L215) diff --git a/docs/code/interfaces/types_block.MultisigSig.md b/docs/code/interfaces/types_block.MultisigSig.md index d6c778a..6aeb495 100644 --- a/docs/code/interfaces/types_block.MultisigSig.md +++ b/docs/code/interfaces/types_block.MultisigSig.md @@ -28,7 +28,7 @@ Sub-signatures #### Defined in -[types/block.ts:206](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L206) +[types/block.ts:231](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L231) ___ @@ -40,7 +40,7 @@ Multisig threshold #### Defined in -[types/block.ts:204](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L204) +[types/block.ts:229](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L229) ___ @@ -52,4 +52,4 @@ Multisig version #### Defined in -[types/block.ts:202](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L202) +[types/block.ts:227](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L227) diff --git a/docs/code/interfaces/types_block.StateProof.md b/docs/code/interfaces/types_block.StateProof.md index 28389b9..a409205 100644 --- a/docs/code/interfaces/types_block.StateProof.md +++ b/docs/code/interfaces/types_block.StateProof.md @@ -33,7 +33,7 @@ #### Defined in -[types/block.ts:248](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L248) +[types/block.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L273) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[types/block.ts:265](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L265) +[types/block.ts:290](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L290) ___ @@ -62,7 +62,7 @@ ___ #### Defined in -[types/block.ts:247](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L247) +[types/block.ts:272](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L272) ___ @@ -72,7 +72,7 @@ ___ #### Defined in -[types/block.ts:249](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L249) +[types/block.ts:274](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L274) ___ @@ -82,7 +82,7 @@ ___ #### Defined in -[types/block.ts:250](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L250) +[types/block.ts:275](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L275) ___ @@ -92,7 +92,7 @@ ___ #### Defined in -[types/block.ts:267](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L267) +[types/block.ts:292](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L292) ___ @@ -102,4 +102,4 @@ ___ #### Defined in -[types/block.ts:266](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L266) +[types/block.ts:291](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L291) diff --git a/docs/code/interfaces/types_block.StateProofMessage.md b/docs/code/interfaces/types_block.StateProofMessage.md index 05af6bb..24d0a13 100644 --- a/docs/code/interfaces/types_block.StateProofMessage.md +++ b/docs/code/interfaces/types_block.StateProofMessage.md @@ -22,7 +22,7 @@ #### Defined in -[types/block.ts:274](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L274) +[types/block.ts:299](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L299) ___ @@ -32,7 +32,7 @@ ___ #### Defined in -[types/block.ts:271](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L271) +[types/block.ts:296](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L296) ___ @@ -42,7 +42,7 @@ ___ #### Defined in -[types/block.ts:272](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L272) +[types/block.ts:297](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L297) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[types/block.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L273) +[types/block.ts:298](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L298) ___ @@ -62,4 +62,4 @@ ___ #### Defined in -[types/block.ts:275](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L275) +[types/block.ts:300](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L300) diff --git a/docs/code/interfaces/types_block.StateProofTracking.md b/docs/code/interfaces/types_block.StateProofTracking.md new file mode 100644 index 0000000..670a98f --- /dev/null +++ b/docs/code/interfaces/types_block.StateProofTracking.md @@ -0,0 +1,54 @@ +[@algorandfoundation/algokit-subscriber](../README.md) / [types/block](../modules/types_block.md) / StateProofTracking + +# Interface: StateProofTracking + +[types/block](../modules/types_block.md).StateProofTracking + +## Table of contents + +### Properties + +- [n](types_block.StateProofTracking.md#n) +- [t](types_block.StateProofTracking.md#t) +- [v](types_block.StateProofTracking.md#v) + +## Properties + +### n + +• `Optional` **n**: `number` + +StateProofNextRound is the next round for which we will accept a StateProof transaction. + +#### Defined in + +[types/block.ts:318](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L318) + +___ + +### t + +• `Optional` **t**: `number` + +StateProofOnlineTotalWeight is the total number of microalgos held by the online accounts +during the StateProof round (or zero, if the merkle root is zero - no commitment for StateProof voters). +This is intended for computing the threshold of votes to expect from StateProofVotersCommitment. + +#### Defined in + +[types/block.ts:314](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L314) + +___ + +### v + +• `Optional` **v**: `string` + +StateProofVotersCommitment is the root of a vector commitment containing the +online accounts that will help sign a state proof. The VC root, and the state proof, +happen on blocks that are a multiple of ConsensusParams.StateProofRounds. +For blocks that are not a multiple of ConsensusParams.StateProofRounds, this value is zero. + +#### Defined in + +[types/block.ts:309](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L309) diff --git a/docs/code/interfaces/types_block.TransactionInBlock.md b/docs/code/interfaces/types_block.TransactionInBlock.md index 6d4a3ac..c673b00 100644 --- a/docs/code/interfaces/types_block.TransactionInBlock.md +++ b/docs/code/interfaces/types_block.TransactionInBlock.md @@ -14,17 +14,22 @@ and its side effects within a committed block. - [assetCloseAmount](types_block.TransactionInBlock.md#assetcloseamount) - [blockTransaction](types_block.TransactionInBlock.md#blocktransaction) - [closeAmount](types_block.TransactionInBlock.md#closeamount) +- [closeRewards](types_block.TransactionInBlock.md#closerewards) - [createdAppId](types_block.TransactionInBlock.md#createdappid) - [createdAssetId](types_block.TransactionInBlock.md#createdassetid) - [genesisHash](types_block.TransactionInBlock.md#genesishash) - [genesisId](types_block.TransactionInBlock.md#genesisid) +- [globalStateDelta](types_block.TransactionInBlock.md#globalstatedelta) +- [localStateDelta](types_block.TransactionInBlock.md#localstatedelta) - [logs](types_block.TransactionInBlock.md#logs) - [parentOffset](types_block.TransactionInBlock.md#parentoffset) - [parentTransactionId](types_block.TransactionInBlock.md#parenttransactionid) +- [receiverRewards](types_block.TransactionInBlock.md#receiverrewards) - [roundIndex](types_block.TransactionInBlock.md#roundindex) - [roundNumber](types_block.TransactionInBlock.md#roundnumber) - [roundOffset](types_block.TransactionInBlock.md#roundoffset) - [roundTimestamp](types_block.TransactionInBlock.md#roundtimestamp) +- [senderRewards](types_block.TransactionInBlock.md#senderrewards) - [transaction](types_block.TransactionInBlock.md#transaction) ## Properties @@ -37,7 +42,7 @@ The asset close amount if the sender asset position was closed from this transac #### Defined in -[types/block.ts:343](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L343) +[types/block.ts:386](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L386) ___ @@ -49,7 +54,7 @@ The block data for the transaction #### Defined in -[types/block.ts:285](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L285) +[types/block.ts:328](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L328) ___ @@ -61,7 +66,19 @@ The ALGO close amount if the sender account was closed from this transaction. #### Defined in -[types/block.ts:345](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L345) +[types/block.ts:388](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L388) + +___ + +### closeRewards + +• `Optional` **closeRewards**: `number` + +Rewards in microalgos applied to the close remainder to account. + +#### Defined in + +[types/block.ts:394](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L394) ___ @@ -73,7 +90,7 @@ The app ID if an app was created from this transaction. #### Defined in -[types/block.ts:341](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L341) +[types/block.ts:384](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L384) ___ @@ -85,7 +102,7 @@ The asset ID if an asset was created from this transaction. #### Defined in -[types/block.ts:339](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L339) +[types/block.ts:382](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L382) ___ @@ -97,7 +114,7 @@ The binary genesis hash of the network the transaction is within. #### Defined in -[types/block.ts:326](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L326) +[types/block.ts:369](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L369) ___ @@ -109,7 +126,30 @@ The string genesis ID of the network the transaction is within. #### Defined in -[types/block.ts:328](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L328) +[types/block.ts:371](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L371) + +___ + +### globalStateDelta + +• `Optional` **globalStateDelta**: `EvalDeltaKeyValue`[] + +#### Defined in + +[types/block.ts:397](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L397) + +___ + +### localStateDelta + +• `Optional` **localStateDelta**: `AccountStateDelta`[] + +Local state key/value changes for the application being executed by this +transaction. + +#### Defined in + +[types/block.ts:402](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L402) ___ @@ -121,7 +161,7 @@ Any logs that were issued as a result of this transaction. #### Defined in -[types/block.ts:347](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L347) +[types/block.ts:390](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L390) ___ @@ -144,7 +184,7 @@ The offset within the parent transaction. #### Defined in -[types/block.ts:324](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L324) +[types/block.ts:367](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L367) ___ @@ -156,7 +196,17 @@ The ID of the parent transaction if this is an inner transaction. #### Defined in -[types/block.ts:312](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L312) +[types/block.ts:355](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L355) + +___ + +### receiverRewards + +• `Optional` **receiverRewards**: `number` + +#### Defined in + +[types/block.ts:396](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L396) ___ @@ -179,7 +229,7 @@ The index within the block.txns array of this transaction or if it's an inner tr #### Defined in -[types/block.ts:308](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L308) +[types/block.ts:351](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L351) ___ @@ -191,7 +241,7 @@ The round number of the block the transaction is within. #### Defined in -[types/block.ts:330](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L330) +[types/block.ts:373](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L373) ___ @@ -214,7 +264,7 @@ The offset of the transaction within the round including inner transactions. #### Defined in -[types/block.ts:296](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L296) +[types/block.ts:339](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L339) ___ @@ -226,7 +276,17 @@ The round unix timestamp of the block the transaction is within. #### Defined in -[types/block.ts:332](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L332) +[types/block.ts:375](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L375) + +___ + +### senderRewards + +• `Optional` **senderRewards**: `number` + +#### Defined in + +[types/block.ts:395](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L395) ___ @@ -238,4 +298,4 @@ The transaction as an algosdk `Transaction` object. #### Defined in -[types/block.ts:337](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L337) +[types/block.ts:380](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L380) diff --git a/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md b/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md index 8374263..8f9c531 100644 --- a/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md +++ b/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md @@ -39,7 +39,7 @@ Any ARC-28 event definitions to process from app call logs #### Defined in -[types/subscription.ts:175](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L175) +[types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) ___ @@ -55,7 +55,7 @@ The set of filters to subscribe to / emit events for, along with optional data m #### Defined in -[types/subscription.ts:303](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L303) +[types/subscription.ts:363](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L363) ___ @@ -67,7 +67,7 @@ The frequency to poll for new blocks in seconds; defaults to 1s #### Defined in -[types/subscription.ts:305](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L305) +[types/subscription.ts:365](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L365) ___ @@ -90,7 +90,7 @@ boundary based on the number of rounds specified here. #### Defined in -[types/subscription.ts:195](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L195) +[types/subscription.ts:255](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L255) ___ @@ -112,7 +112,7 @@ your catchup speed when using `sync-oldest`. #### Defined in -[types/subscription.ts:184](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L184) +[types/subscription.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L244) ___ @@ -143,7 +143,7 @@ past `watermark` then how should that be handled: #### Defined in -[types/subscription.ts:213](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L213) +[types/subscription.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L273) ___ @@ -155,7 +155,7 @@ Whether to wait via algod `/status/wait-for-block-after` endpoint when at the ti #### Defined in -[types/subscription.ts:307](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L307) +[types/subscription.ts:367](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L367) ___ @@ -175,4 +175,4 @@ its position in the chain #### Defined in -[types/subscription.ts:310](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L310) +[types/subscription.ts:370](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L370) diff --git a/docs/code/interfaces/types_subscription.BalanceChange.md b/docs/code/interfaces/types_subscription.BalanceChange.md index 9df87e2..5893eab 100644 --- a/docs/code/interfaces/types_subscription.BalanceChange.md +++ b/docs/code/interfaces/types_subscription.BalanceChange.md @@ -25,7 +25,7 @@ The address that the balance change is for. #### Defined in -[types/subscription.ts:117](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L117) +[types/subscription.ts:177](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L177) ___ @@ -37,7 +37,7 @@ The amount of the balance change in smallest divisible unit or microAlgos. #### Defined in -[types/subscription.ts:121](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L121) +[types/subscription.ts:181](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L181) ___ @@ -49,7 +49,7 @@ The asset ID of the balance change, or 0 for Algos. #### Defined in -[types/subscription.ts:119](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L119) +[types/subscription.ts:179](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L179) ___ @@ -61,4 +61,4 @@ The roles the account was playing that led to the balance change #### Defined in -[types/subscription.ts:123](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L123) +[types/subscription.ts:183](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L183) diff --git a/docs/code/interfaces/types_subscription.BeforePollMetadata.md b/docs/code/interfaces/types_subscription.BeforePollMetadata.md index 02a2150..1e48134 100644 --- a/docs/code/interfaces/types_subscription.BeforePollMetadata.md +++ b/docs/code/interfaces/types_subscription.BeforePollMetadata.md @@ -23,7 +23,7 @@ The current round of algod #### Defined in -[types/subscription.ts:147](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L147) +[types/subscription.ts:207](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L207) ___ @@ -35,4 +35,4 @@ The current watermark of the subscriber #### Defined in -[types/subscription.ts:145](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L145) +[types/subscription.ts:205](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L205) diff --git a/docs/code/interfaces/types_subscription.BlockMetadata.md b/docs/code/interfaces/types_subscription.BlockMetadata.md index 1023725..ce1fe18 100644 --- a/docs/code/interfaces/types_subscription.BlockMetadata.md +++ b/docs/code/interfaces/types_subscription.BlockMetadata.md @@ -15,15 +15,18 @@ Metadata about a block that was retrieved from algod. - [genesisId](types_subscription.BlockMetadata.md#genesisid) - [hash](types_subscription.BlockMetadata.md#hash) - [parentTransactionCount](types_subscription.BlockMetadata.md#parenttransactioncount) +- [participationUpdates](types_subscription.BlockMetadata.md#participationupdates) - [previousBlockHash](types_subscription.BlockMetadata.md#previousblockhash) - [rewards](types_subscription.BlockMetadata.md#rewards) - [round](types_subscription.BlockMetadata.md#round) - [seed](types_subscription.BlockMetadata.md#seed) +- [stateProofTracking](types_subscription.BlockMetadata.md#stateprooftracking) - [timestamp](types_subscription.BlockMetadata.md#timestamp) - [transactionsRoot](types_subscription.BlockMetadata.md#transactionsroot) - [transactionsRootSha256](types_subscription.BlockMetadata.md#transactionsrootsha256) - [txnCounter](types_subscription.BlockMetadata.md#txncounter) - [upgradeState](types_subscription.BlockMetadata.md#upgradestate) +- [upgradeVote](types_subscription.BlockMetadata.md#upgradevote) ## Properties @@ -87,6 +90,18 @@ Count of parent transactions in this block ___ +### participationUpdates + +• `Optional` **participationUpdates**: [`ParticipationUpdates`](types_subscription.ParticipationUpdates.md) + +Participation account data that needs to be checked/acted on by the network. + +#### Defined in + +[types/subscription.ts:68](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L68) + +___ + ### previousBlockHash • `Optional` **previousBlockHash**: `string` @@ -135,6 +150,18 @@ The base64 seed of the block. ___ +### stateProofTracking + +• `Optional` **stateProofTracking**: [`BlockStateProofTracking`](types_subscription.BlockStateProofTracking.md)[] + +Tracks the status of state proofs. + +#### Defined in + +[types/subscription.ts:64](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L64) + +___ + ### timestamp • **timestamp**: `number` @@ -193,3 +220,15 @@ Fields relating to a protocol upgrade. #### Defined in [types/subscription.ts:62](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L62) + +___ + +### upgradeVote + +• `Optional` **upgradeVote**: [`BlockUpgradeVote`](types_subscription.BlockUpgradeVote.md) + +Fields relating to voting for a protocol upgrade. + +#### Defined in + +[types/subscription.ts:66](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L66) diff --git a/docs/code/interfaces/types_subscription.BlockRewards.md b/docs/code/interfaces/types_subscription.BlockRewards.md index 32d84b7..c65291a 100644 --- a/docs/code/interfaces/types_subscription.BlockRewards.md +++ b/docs/code/interfaces/types_subscription.BlockRewards.md @@ -25,7 +25,7 @@ FeeSink is an address that accepts transaction fees, it can only spend to the in #### Defined in -[types/subscription.ts:67](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L67) +[types/subscription.ts:73](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L73) ___ @@ -37,7 +37,7 @@ number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos #### Defined in -[types/subscription.ts:69](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L69) +[types/subscription.ts:75](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L75) ___ @@ -49,7 +49,7 @@ How many rewards, in MicroAlgos, have been distributed to each RewardUnit of Mic #### Defined in -[types/subscription.ts:71](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L71) +[types/subscription.ts:77](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L77) ___ @@ -61,7 +61,7 @@ RewardsPool is an address that accepts periodic injections from the fee-sink and #### Defined in -[types/subscription.ts:73](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L73) +[types/subscription.ts:79](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L79) ___ @@ -73,7 +73,7 @@ Number of new MicroAlgos added to the participation stake from rewards at the ne #### Defined in -[types/subscription.ts:75](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L75) +[types/subscription.ts:81](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L81) ___ @@ -85,4 +85,4 @@ Number of leftover MicroAlgos after the distribution of RewardsRate/rewardUnits #### Defined in -[types/subscription.ts:77](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L77) +[types/subscription.ts:83](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L83) diff --git a/docs/code/interfaces/types_subscription.BlockStateProofTracking.md b/docs/code/interfaces/types_subscription.BlockStateProofTracking.md new file mode 100644 index 0000000..e2ba325 --- /dev/null +++ b/docs/code/interfaces/types_subscription.BlockStateProofTracking.md @@ -0,0 +1,64 @@ +[@algorandfoundation/algokit-subscriber](../README.md) / [types/subscription](../modules/types_subscription.md) / BlockStateProofTracking + +# Interface: BlockStateProofTracking + +[types/subscription](../modules/types_subscription.md).BlockStateProofTracking + +## Table of contents + +### Properties + +- [nextRound](types_subscription.BlockStateProofTracking.md#nextround) +- [onlineTotalWeight](types_subscription.BlockStateProofTracking.md#onlinetotalweight) +- [type](types_subscription.BlockStateProofTracking.md#type) +- [votersCommitment](types_subscription.BlockStateProofTracking.md#voterscommitment) + +## Properties + +### nextRound + +• `Optional` **nextRound**: `number` + +(n) Next round for which we will accept a state proof transaction. + +#### Defined in + +[types/subscription.ts:103](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L103) + +___ + +### onlineTotalWeight + +• `Optional` **onlineTotalWeight**: `number` + +(t) The total number of microalgos held by the online accounts during the +StateProof round. + +#### Defined in + +[types/subscription.ts:109](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L109) + +___ + +### type + +• `Optional` **type**: `number` + +State Proof Type. Note the raw object uses map with this as key. + +#### Defined in + +[types/subscription.ts:114](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L114) + +___ + +### votersCommitment + +• `Optional` **votersCommitment**: `string` + +(v) Root of a vector commitment containing online accounts that will help sign +the proof. + +#### Defined in + +[types/subscription.ts:120](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L120) diff --git a/docs/code/interfaces/types_subscription.BlockUpgradeState.md b/docs/code/interfaces/types_subscription.BlockUpgradeState.md index 57e2262..1e78cbb 100644 --- a/docs/code/interfaces/types_subscription.BlockUpgradeState.md +++ b/docs/code/interfaces/types_subscription.BlockUpgradeState.md @@ -24,7 +24,7 @@ Current protocol version #### Defined in -[types/subscription.ts:82](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L82) +[types/subscription.ts:88](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L88) ___ @@ -36,7 +36,7 @@ The next proposed protocol version. #### Defined in -[types/subscription.ts:84](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L84) +[types/subscription.ts:90](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L90) ___ @@ -48,7 +48,7 @@ Number of blocks which approved the protocol upgrade. #### Defined in -[types/subscription.ts:86](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L86) +[types/subscription.ts:92](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L92) ___ @@ -60,7 +60,7 @@ Round on which the protocol upgrade will take effect. #### Defined in -[types/subscription.ts:90](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L90) +[types/subscription.ts:96](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L96) ___ @@ -72,4 +72,4 @@ Deadline round for this protocol upgrade (No votes will be consider after this r #### Defined in -[types/subscription.ts:88](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L88) +[types/subscription.ts:94](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L94) diff --git a/docs/code/interfaces/types_subscription.BlockUpgradeVote.md b/docs/code/interfaces/types_subscription.BlockUpgradeVote.md new file mode 100644 index 0000000..3eac5a5 --- /dev/null +++ b/docs/code/interfaces/types_subscription.BlockUpgradeVote.md @@ -0,0 +1,49 @@ +[@algorandfoundation/algokit-subscriber](../README.md) / [types/subscription](../modules/types_subscription.md) / BlockUpgradeVote + +# Interface: BlockUpgradeVote + +[types/subscription](../modules/types_subscription.md).BlockUpgradeVote + +## Table of contents + +### Properties + +- [upgradeApprove](types_subscription.BlockUpgradeVote.md#upgradeapprove) +- [upgradeDelay](types_subscription.BlockUpgradeVote.md#upgradedelay) +- [upgradePropose](types_subscription.BlockUpgradeVote.md#upgradepropose) + +## Properties + +### upgradeApprove + +• `Optional` **upgradeApprove**: `boolean` + +(upgradeyes) Indicates a yes vote for the current proposal. + +#### Defined in + +[types/subscription.ts:127](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L127) + +___ + +### upgradeDelay + +• `Optional` **upgradeDelay**: `number` \| `bigint` + +(upgradedelay) Indicates the time between acceptance and execution. + +#### Defined in + +[types/subscription.ts:132](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L132) + +___ + +### upgradePropose + +• `Optional` **upgradePropose**: `string` + +(upgradeprop) Indicates a proposed upgrade. + +#### Defined in + +[types/subscription.ts:137](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L137) diff --git a/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md b/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md index 3bedaba..580511b 100644 --- a/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md +++ b/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md @@ -34,7 +34,7 @@ Any ARC-28 event definitions to process from app call logs #### Defined in -[types/subscription.ts:175](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L175) +[types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) ___ @@ -65,7 +65,7 @@ A list of filters with corresponding names. #### Defined in -[types/subscription.ts:173](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L173) +[types/subscription.ts:233](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L233) ___ @@ -84,7 +84,7 @@ boundary based on the number of rounds specified here. #### Defined in -[types/subscription.ts:195](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L195) +[types/subscription.ts:255](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L255) ___ @@ -102,7 +102,7 @@ your catchup speed when using `sync-oldest`. #### Defined in -[types/subscription.ts:184](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L184) +[types/subscription.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L244) ___ @@ -129,4 +129,4 @@ past `watermark` then how should that be handled: #### Defined in -[types/subscription.ts:213](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L213) +[types/subscription.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L273) diff --git a/docs/code/interfaces/types_subscription.NamedTransactionFilter.md b/docs/code/interfaces/types_subscription.NamedTransactionFilter.md index 38a779f..1036e5d 100644 --- a/docs/code/interfaces/types_subscription.NamedTransactionFilter.md +++ b/docs/code/interfaces/types_subscription.NamedTransactionFilter.md @@ -29,7 +29,7 @@ The filter itself. #### Defined in -[types/subscription.ts:221](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L221) +[types/subscription.ts:281](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L281) ___ @@ -41,4 +41,4 @@ The name to give the filter. #### Defined in -[types/subscription.ts:219](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L219) +[types/subscription.ts:279](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L279) diff --git a/docs/code/interfaces/types_subscription.ParticipationUpdates.md b/docs/code/interfaces/types_subscription.ParticipationUpdates.md new file mode 100644 index 0000000..912a116 --- /dev/null +++ b/docs/code/interfaces/types_subscription.ParticipationUpdates.md @@ -0,0 +1,37 @@ +[@algorandfoundation/algokit-subscriber](../README.md) / [types/subscription](../modules/types_subscription.md) / ParticipationUpdates + +# Interface: ParticipationUpdates + +[types/subscription](../modules/types_subscription.md).ParticipationUpdates + +## Table of contents + +### Properties + +- [absentParticipationAccounts](types_subscription.ParticipationUpdates.md#absentparticipationaccounts) +- [expiredParticipationAccounts](types_subscription.ParticipationUpdates.md#expiredparticipationaccounts) + +## Properties + +### absentParticipationAccounts + +• `Optional` **absentParticipationAccounts**: `string`[] + +(partupabs) a list of online accounts that need to be suspended. + +#### Defined in + +[types/subscription.ts:144](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L144) + +___ + +### expiredParticipationAccounts + +• `Optional` **expiredParticipationAccounts**: `string`[] + +(partupdrmv) a list of online accounts that needs to be converted to offline +since their participation key expired. + +#### Defined in + +[types/subscription.ts:150](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L150) diff --git a/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md b/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md index 92dcd03..8dc6489 100644 --- a/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md +++ b/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md @@ -40,7 +40,7 @@ The filter itself. #### Defined in -[types/subscription.ts:221](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L221) +[types/subscription.ts:281](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L281) ___ @@ -70,7 +70,7 @@ Note: if you provide multiple filters with the same name then only the mapper of #### Defined in -[types/subscription.ts:326](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L326) +[types/subscription.ts:386](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L386) ___ @@ -86,4 +86,4 @@ The name to give the filter. #### Defined in -[types/subscription.ts:219](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L219) +[types/subscription.ts:279](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L279) diff --git a/docs/code/interfaces/types_subscription.TransactionFilter.md b/docs/code/interfaces/types_subscription.TransactionFilter.md index c0e54d1..5bbb10c 100644 --- a/docs/code/interfaces/types_subscription.TransactionFilter.md +++ b/docs/code/interfaces/types_subscription.TransactionFilter.md @@ -51,7 +51,7 @@ Filter to app transactions that meet the given app arguments predicate. #### Defined in -[types/subscription.ts:254](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L254) +[types/subscription.ts:314](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L314) ___ @@ -63,7 +63,7 @@ Filter to transactions that are creating an app. #### Defined in -[types/subscription.ts:237](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L237) +[types/subscription.ts:297](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L297) ___ @@ -75,7 +75,7 @@ Filter to transactions against the app with the given ID(s). #### Defined in -[types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) +[types/subscription.ts:295](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L295) ___ @@ -87,7 +87,7 @@ Filter to transactions that have given on complete(s). #### Defined in -[types/subscription.ts:239](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L239) +[types/subscription.ts:299](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L299) ___ @@ -100,7 +100,7 @@ Note: the definitions for these events must be passed in to the subscription con #### Defined in -[types/subscription.ts:258](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L258) +[types/subscription.ts:318](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L318) ___ @@ -112,7 +112,7 @@ Filter to transactions that are creating an asset. #### Defined in -[types/subscription.ts:243](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L243) +[types/subscription.ts:303](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L303) ___ @@ -124,7 +124,7 @@ Filter to transactions against the asset with the given ID(s). #### Defined in -[types/subscription.ts:241](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L241) +[types/subscription.ts:301](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L301) ___ @@ -136,7 +136,7 @@ Filter to transactions that result in balance changes that match one or more of #### Defined in -[types/subscription.ts:260](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L260) +[types/subscription.ts:320](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L320) ___ @@ -162,7 +162,7 @@ Catch-all custom filter to filter for things that the rest of the filters don't #### Defined in -[types/subscription.ts:277](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L277) +[types/subscription.ts:337](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L337) ___ @@ -175,7 +175,7 @@ or equal to the given maximum (microAlgos or decimal units of an ASA if type: ax #### Defined in -[types/subscription.ts:249](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L249) +[types/subscription.ts:309](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L309) ___ @@ -188,7 +188,7 @@ the given method signature as the first app argument. #### Defined in -[types/subscription.ts:252](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L252) +[types/subscription.ts:312](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L312) ___ @@ -201,7 +201,7 @@ than or equal to the given minimum (microAlgos or decimal units of an ASA if typ #### Defined in -[types/subscription.ts:246](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L246) +[types/subscription.ts:306](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L306) ___ @@ -213,7 +213,7 @@ Filter to transactions with a note having the given prefix. #### Defined in -[types/subscription.ts:233](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L233) +[types/subscription.ts:293](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L293) ___ @@ -225,7 +225,7 @@ Filter to transactions being received by the specified address(es). #### Defined in -[types/subscription.ts:231](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L231) +[types/subscription.ts:291](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L291) ___ @@ -237,7 +237,7 @@ Filter to transactions sent from the specified address(es). #### Defined in -[types/subscription.ts:229](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L229) +[types/subscription.ts:289](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L289) ___ @@ -249,4 +249,4 @@ Filter based on the given transaction type(s). #### Defined in -[types/subscription.ts:227](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L227) +[types/subscription.ts:287](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L287) diff --git a/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md b/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md index 9f079e7..b57a666 100644 --- a/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md +++ b/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md @@ -38,7 +38,7 @@ Any ARC-28 event definitions to process from app call logs #### Defined in -[types/subscription.ts:175](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L175) +[types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) ___ @@ -51,7 +51,7 @@ If not provided, it will be resolved on demand. #### Defined in -[types/subscription.ts:297](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L297) +[types/subscription.ts:357](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L357) ___ @@ -86,7 +86,7 @@ A list of filters with corresponding names. #### Defined in -[types/subscription.ts:173](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L173) +[types/subscription.ts:233](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L233) ___ @@ -109,7 +109,7 @@ boundary based on the number of rounds specified here. #### Defined in -[types/subscription.ts:195](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L195) +[types/subscription.ts:255](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L255) ___ @@ -131,7 +131,7 @@ your catchup speed when using `sync-oldest`. #### Defined in -[types/subscription.ts:184](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L184) +[types/subscription.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L244) ___ @@ -162,7 +162,7 @@ past `watermark` then how should that be handled: #### Defined in -[types/subscription.ts:213](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L213) +[types/subscription.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L273) ___ @@ -182,4 +182,4 @@ will be slow if `onMaxRounds` is `sync-oldest`. #### Defined in -[types/subscription.ts:292](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L292) +[types/subscription.ts:352](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L352) diff --git a/docs/code/modules/types.md b/docs/code/modules/types.md index 6262e76..7016363 100644 --- a/docs/code/modules/types.md +++ b/docs/code/modules/types.md @@ -21,9 +21,11 @@ - [BlockInnerTransaction](types.md#blockinnertransaction) - [BlockMetadata](types.md#blockmetadata) - [BlockRewards](types.md#blockrewards) +- [BlockStateProofTracking](types.md#blockstateprooftracking) - [BlockTransaction](types.md#blocktransaction) - [BlockTransactionEvalDelta](types.md#blocktransactionevaldelta) - [BlockUpgradeState](types.md#blockupgradestate) +- [BlockUpgradeVote](types.md#blockupgradevote) - [BlockValueDelta](types.md#blockvaluedelta) - [BlockVote](types.md#blockvote) - [CoreTransactionSubscriptionParams](types.md#coretransactionsubscriptionparams) @@ -32,8 +34,10 @@ - [LogicSig](types.md#logicsig) - [MultisigSig](types.md#multisigsig) - [NamedTransactionFilter](types.md#namedtransactionfilter) +- [ParticipationUpdates](types.md#participationupdates) - [StateProof](types.md#stateproof) - [StateProofMessage](types.md#stateproofmessage) +- [StateProofTracking](types.md#stateprooftracking) - [SubscribedTransaction](types.md#subscribedtransaction) - [SubscriberConfigFilter](types.md#subscriberconfigfilter) - [TransactionFilter](types.md#transactionfilter) @@ -134,6 +138,12 @@ Re-exports [BlockRewards](../interfaces/types_subscription.BlockRewards.md) ___ +### BlockStateProofTracking + +Re-exports [BlockStateProofTracking](../interfaces/types_subscription.BlockStateProofTracking.md) + +___ + ### BlockTransaction Re-exports [BlockTransaction](../interfaces/types_block.BlockTransaction.md) @@ -152,6 +162,12 @@ Re-exports [BlockUpgradeState](../interfaces/types_subscription.BlockUpgradeStat ___ +### BlockUpgradeVote + +Re-exports [BlockUpgradeVote](../interfaces/types_subscription.BlockUpgradeVote.md) + +___ + ### BlockValueDelta Re-exports [BlockValueDelta](../interfaces/types_block.BlockValueDelta.md) @@ -200,6 +216,12 @@ Re-exports [NamedTransactionFilter](../interfaces/types_subscription.NamedTransa ___ +### ParticipationUpdates + +Re-exports [ParticipationUpdates](../interfaces/types_subscription.ParticipationUpdates.md) + +___ + ### StateProof Re-exports [StateProof](../interfaces/types_block.StateProof.md) @@ -212,6 +234,12 @@ Re-exports [StateProofMessage](../interfaces/types_block.StateProofMessage.md) ___ +### StateProofTracking + +Re-exports [StateProofTracking](../interfaces/types_block.StateProofTracking.md) + +___ + ### SubscribedTransaction Re-exports [SubscribedTransaction](types_subscription.md#subscribedtransaction) diff --git a/docs/code/modules/types_block.md b/docs/code/modules/types_block.md index 9096cd1..b090f20 100644 --- a/docs/code/modules/types_block.md +++ b/docs/code/modules/types_block.md @@ -17,6 +17,7 @@ - [MultisigSig](../interfaces/types_block.MultisigSig.md) - [StateProof](../interfaces/types_block.StateProof.md) - [StateProofMessage](../interfaces/types_block.StateProofMessage.md) +- [StateProofTracking](../interfaces/types_block.StateProofTracking.md) - [TransactionInBlock](../interfaces/types_block.TransactionInBlock.md) ### Type Aliases @@ -33,4 +34,4 @@ Data that is returned in a raw Algorand block for a single inner transaction #### Defined in -[types/block.ts:215](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L215) +[types/block.ts:240](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L240) diff --git a/docs/code/modules/types_subscription.md b/docs/code/modules/types_subscription.md index 82d3365..c20601e 100644 --- a/docs/code/modules/types_subscription.md +++ b/docs/code/modules/types_subscription.md @@ -15,9 +15,12 @@ - [BeforePollMetadata](../interfaces/types_subscription.BeforePollMetadata.md) - [BlockMetadata](../interfaces/types_subscription.BlockMetadata.md) - [BlockRewards](../interfaces/types_subscription.BlockRewards.md) +- [BlockStateProofTracking](../interfaces/types_subscription.BlockStateProofTracking.md) - [BlockUpgradeState](../interfaces/types_subscription.BlockUpgradeState.md) +- [BlockUpgradeVote](../interfaces/types_subscription.BlockUpgradeVote.md) - [CoreTransactionSubscriptionParams](../interfaces/types_subscription.CoreTransactionSubscriptionParams.md) - [NamedTransactionFilter](../interfaces/types_subscription.NamedTransactionFilter.md) +- [ParticipationUpdates](../interfaces/types_subscription.ParticipationUpdates.md) - [SubscriberConfigFilter](../interfaces/types_subscription.SubscriberConfigFilter.md) - [TransactionFilter](../interfaces/types_subscription.TransactionFilter.md) - [TransactionSubscriptionParams](../interfaces/types_subscription.TransactionSubscriptionParams.md) @@ -51,7 +54,7 @@ #### Defined in -[types/subscription.ts:331](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L331) +[types/subscription.ts:391](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L391) ___ @@ -69,7 +72,7 @@ Substantively, based on the Indexer [`TransactionResult` model](https://develop #### Defined in -[types/subscription.ts:101](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L101) +[types/subscription.ts:161](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L161) ___ @@ -100,4 +103,4 @@ ___ #### Defined in -[types/subscription.ts:329](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L329) +[types/subscription.ts:389](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L389) diff --git a/src/types/subscription.ts b/src/types/subscription.ts index 3d0a75d..4afaf38 100644 --- a/src/types/subscription.ts +++ b/src/types/subscription.ts @@ -61,7 +61,7 @@ export interface BlockMetadata { /** Fields relating to a protocol upgrade. */ upgradeState?: BlockUpgradeState /** Tracks the status of state proofs. */ - stateProofTracking?: StateProofTracking[] + stateProofTracking?: BlockStateProofTracking[] /** Fields relating to voting for a protocol upgrade. */ upgradeVote?: BlockUpgradeVote /** Participation account data that needs to be checked/acted on by the network. */ @@ -96,7 +96,7 @@ export interface BlockUpgradeState { nextProtocolSwitchOn?: number } -export interface StateProofTracking { +export interface BlockStateProofTracking { /** * (n) Next round for which we will accept a state proof transaction. */ From c71b5276ca43660aea6fa49763e90fe52caf8626 Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Wed, 10 Jul 2024 13:04:59 +1000 Subject: [PATCH 03/10] docs: update docs --- docs/code/interfaces/types_block.Block.md | 54 +++++------ .../types_block.BlockAgreementCertificate.md | 12 +-- docs/code/interfaces/types_block.BlockData.md | 4 +- .../types_block.BlockTransaction.md | 24 ++--- .../types_block.BlockTransactionEvalDelta.md | 8 +- .../interfaces/types_block.BlockValueDelta.md | 6 +- docs/code/interfaces/types_block.BlockVote.md | 6 +- docs/code/interfaces/types_block.LogicSig.md | 8 +- .../interfaces/types_block.MultisigSig.md | 6 +- .../code/interfaces/types_block.StateProof.md | 14 +-- .../types_block.StateProofMessage.md | 10 +-- .../types_block.StateProofTracking.md | 6 +- .../types_block.TransactionInBlock.md | 90 ++++--------------- docs/code/modules/types_block.md | 2 +- 14 files changed, 95 insertions(+), 155 deletions(-) diff --git a/docs/code/interfaces/types_block.Block.md b/docs/code/interfaces/types_block.Block.md index 7c45b9c..e0294c7 100644 --- a/docs/code/interfaces/types_block.Block.md +++ b/docs/code/interfaces/types_block.Block.md @@ -54,7 +54,7 @@ since genesis. #### Defined in -[types/block.ts:88](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L88) +[types/block.ts:87](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L87) ___ @@ -66,7 +66,7 @@ The FeeSink accepts transaction fees. It can only spend to the incentive pool. #### Defined in -[types/block.ts:90](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L90) +[types/block.ts:89](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L89) ___ @@ -79,7 +79,7 @@ MicroAlgos for every reward unit in the next round. #### Defined in -[types/block.ts:94](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L94) +[types/block.ts:93](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L93) ___ @@ -91,7 +91,7 @@ Genesis ID to which this block belongs. #### Defined in -[types/block.ts:96](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L96) +[types/block.ts:95](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L95) ___ @@ -103,7 +103,7 @@ Genesis hash to which this block belongs. #### Defined in -[types/block.ts:98](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L98) +[types/block.ts:97](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L97) ___ @@ -115,7 +115,7 @@ Deadline round for this protocol upgrade (No votes will be considered after this #### Defined in -[types/block.ts:142](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L142) +[types/block.ts:141](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L141) ___ @@ -127,7 +127,7 @@ The next proposed protocol version. #### Defined in -[types/block.ts:134](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L134) +[types/block.ts:133](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L133) ___ @@ -139,7 +139,7 @@ Round on which the protocol upgrade will take effect. #### Defined in -[types/block.ts:146](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L146) +[types/block.ts:145](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L145) ___ @@ -151,7 +151,7 @@ Number of blocks which approved the protocol upgrade. #### Defined in -[types/block.ts:138](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L138) +[types/block.ts:137](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L137) ___ @@ -164,7 +164,7 @@ needs to be converted to offline since they are not proposing. #### Defined in -[types/block.ts:155](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L155) +[types/block.ts:154](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L154) ___ @@ -177,7 +177,7 @@ converted to offline since their participation key expired. #### Defined in -[types/block.ts:160](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L160) +[types/block.ts:159](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L159) ___ @@ -189,7 +189,7 @@ The hash of the previous block #### Defined in -[types/block.ts:100](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L100) +[types/block.ts:99](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L99) ___ @@ -201,7 +201,7 @@ UpgradeState tracks the protocol upgrade state machine; proto is the current pro #### Defined in -[types/block.ts:102](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L102) +[types/block.ts:101](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L101) ___ @@ -213,7 +213,7 @@ The number of new MicroAlgos added to the participation stake from rewards at th #### Defined in -[types/block.ts:104](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L104) +[types/block.ts:103](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L103) ___ @@ -225,7 +225,7 @@ Round number. #### Defined in -[types/block.ts:106](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L106) +[types/block.ts:105](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L105) ___ @@ -237,7 +237,7 @@ The round at which the RewardsRate will be recalculated. #### Defined in -[types/block.ts:108](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L108) +[types/block.ts:107](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L107) ___ @@ -250,7 +250,7 @@ FeeSink and continually redistributes them to addresses as rewards. #### Defined in -[types/block.ts:112](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L112) +[types/block.ts:111](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L111) ___ @@ -262,7 +262,7 @@ Sortition seed #### Defined in -[types/block.ts:114](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L114) +[types/block.ts:113](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L113) ___ @@ -272,7 +272,7 @@ ___ #### Defined in -[types/block.ts:174](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L174) +[types/block.ts:173](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L173) ___ @@ -286,7 +286,7 @@ committed after this block. Genesis blocks can start at either #### Defined in -[types/block.ts:119](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L119) +[types/block.ts:118](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L118) ___ @@ -298,7 +298,7 @@ Round time (unix timestamp) #### Defined in -[types/block.ts:121](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L121) +[types/block.ts:120](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L120) ___ @@ -312,7 +312,7 @@ This value is only set when there are transactions in the block. #### Defined in -[types/block.ts:126](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L126) +[types/block.ts:125](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L125) ___ @@ -324,7 +324,7 @@ Root of transaction vector commitment merkle tree using SHA256 hash function. #### Defined in -[types/block.ts:130](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L130) +[types/block.ts:129](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L129) ___ @@ -336,7 +336,7 @@ The transactions within the block. #### Defined in -[types/block.ts:150](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L150) +[types/block.ts:149](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L149) ___ @@ -348,7 +348,7 @@ UpgradeDelay indicates the time between acceptance and execution #### Defined in -[types/block.ts:168](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L168) +[types/block.ts:167](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L167) ___ @@ -360,7 +360,7 @@ UpgradePropose indicates a proposed upgrade #### Defined in -[types/block.ts:172](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L172) +[types/block.ts:171](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L171) ___ @@ -372,4 +372,4 @@ UpgradeApprove indicates a yes vote for the current proposal #### Defined in -[types/block.ts:164](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L164) +[types/block.ts:163](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L163) diff --git a/docs/code/interfaces/types_block.BlockAgreementCertificate.md b/docs/code/interfaces/types_block.BlockAgreementCertificate.md index ad66e8a..c5f873d 100644 --- a/docs/code/interfaces/types_block.BlockAgreementCertificate.md +++ b/docs/code/interfaces/types_block.BlockAgreementCertificate.md @@ -33,7 +33,7 @@ Equivocation votes #### Defined in -[types/block.ts:41](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L41) +[types/block.ts:40](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L40) ___ @@ -45,7 +45,7 @@ Period represents the current period of the source. #### Defined in -[types/block.ts:26](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L26) +[types/block.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L25) ___ @@ -65,7 +65,7 @@ The proposal #### Defined in -[types/block.ts:30](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L30) +[types/block.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L29) ___ @@ -77,7 +77,7 @@ Round number #### Defined in -[types/block.ts:24](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L24) +[types/block.ts:23](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L23) ___ @@ -89,7 +89,7 @@ Step represents the current period of the source. #### Defined in -[types/block.ts:28](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L28) +[types/block.ts:27](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L27) ___ @@ -101,4 +101,4 @@ Votes #### Defined in -[types/block.ts:39](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L39) +[types/block.ts:38](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L38) diff --git a/docs/code/interfaces/types_block.BlockData.md b/docs/code/interfaces/types_block.BlockData.md index 55b7e07..ad0d35f 100644 --- a/docs/code/interfaces/types_block.BlockData.md +++ b/docs/code/interfaces/types_block.BlockData.md @@ -23,7 +23,7 @@ The block itself. #### Defined in -[types/block.ts:11](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L11) +[types/block.ts:10](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L10) ___ @@ -35,4 +35,4 @@ The block certification. #### Defined in -[types/block.ts:13](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L13) +[types/block.ts:12](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L12) diff --git a/docs/code/interfaces/types_block.BlockTransaction.md b/docs/code/interfaces/types_block.BlockTransaction.md index e2a1d19..bbce4e3 100644 --- a/docs/code/interfaces/types_block.BlockTransaction.md +++ b/docs/code/interfaces/types_block.BlockTransaction.md @@ -37,7 +37,7 @@ Asset closing amount in decimal units #### Defined in -[types/block.ts:191](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L191) +[types/block.ts:190](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L190) ___ @@ -49,7 +49,7 @@ App ID when an app is created by the transaction #### Defined in -[types/block.ts:189](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L189) +[types/block.ts:188](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L188) ___ @@ -61,7 +61,7 @@ Algo closing amount in microAlgos #### Defined in -[types/block.ts:193](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L193) +[types/block.ts:192](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L192) ___ @@ -73,7 +73,7 @@ Asset ID when an asset is created by the transaction #### Defined in -[types/block.ts:187](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L187) +[types/block.ts:186](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L186) ___ @@ -85,7 +85,7 @@ The eval deltas for the block #### Defined in -[types/block.ts:185](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L185) +[types/block.ts:184](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L184) ___ @@ -97,7 +97,7 @@ Has genesis hash #### Defined in -[types/block.ts:197](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L197) +[types/block.ts:196](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L196) ___ @@ -109,7 +109,7 @@ Has genesis id #### Defined in -[types/block.ts:195](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L195) +[types/block.ts:194](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L194) ___ @@ -121,7 +121,7 @@ Logic signature #### Defined in -[types/block.ts:201](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L201) +[types/block.ts:200](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L200) ___ @@ -133,7 +133,7 @@ Transaction multisig signature #### Defined in -[types/block.ts:203](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L203) +[types/block.ts:202](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L202) ___ @@ -145,7 +145,7 @@ The signer, if signing with a different key than the Transaction type `from` pro #### Defined in -[types/block.ts:205](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L205) +[types/block.ts:204](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L204) ___ @@ -157,7 +157,7 @@ Transaction ED25519 signature #### Defined in -[types/block.ts:199](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L199) +[types/block.ts:198](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L198) ___ @@ -169,4 +169,4 @@ The encoded transaction data #### Defined in -[types/block.ts:183](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L183) +[types/block.ts:182](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L182) diff --git a/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md b/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md index f28c9e7..4f52ee9 100644 --- a/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md +++ b/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md @@ -25,7 +25,7 @@ The delta of global state, keyed by key #### Defined in -[types/block.ts:245](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L245) +[types/block.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L244) ___ @@ -37,7 +37,7 @@ Inner transactions #### Defined in -[types/block.ts:251](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L251) +[types/block.ts:250](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L250) ___ @@ -49,7 +49,7 @@ The delta of local state keyed by account ID offset in [txn.Sender, ...txn.Accou #### Defined in -[types/block.ts:247](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L247) +[types/block.ts:246](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L246) ___ @@ -61,4 +61,4 @@ Logs #### Defined in -[types/block.ts:249](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L249) +[types/block.ts:248](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L248) diff --git a/docs/code/interfaces/types_block.BlockValueDelta.md b/docs/code/interfaces/types_block.BlockValueDelta.md index c3629f4..0ccc978 100644 --- a/docs/code/interfaces/types_block.BlockValueDelta.md +++ b/docs/code/interfaces/types_block.BlockValueDelta.md @@ -27,7 +27,7 @@ DeltaAction is an enum of actions that may be performed when applying a delta to #### Defined in -[types/block.ts:261](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L261) +[types/block.ts:260](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L260) ___ @@ -39,7 +39,7 @@ Bytes value #### Defined in -[types/block.ts:264](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L264) +[types/block.ts:263](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L263) ___ @@ -51,4 +51,4 @@ Uint64 value #### Defined in -[types/block.ts:267](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L267) +[types/block.ts:266](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L266) diff --git a/docs/code/interfaces/types_block.BlockVote.md b/docs/code/interfaces/types_block.BlockVote.md index d00e810..6119da5 100644 --- a/docs/code/interfaces/types_block.BlockVote.md +++ b/docs/code/interfaces/types_block.BlockVote.md @@ -38,7 +38,7 @@ https://github.com/algorand/go-algorand/blob/master/data/committee/credential.go #### Defined in -[types/block.ts:55](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L55) +[types/block.ts:54](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L54) ___ @@ -54,7 +54,7 @@ https://github.com/algorand/go-algorand/blob/master/crypto/onetimesig.go #### Defined in -[types/block.ts:63](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L63) +[types/block.ts:62](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L62) ___ @@ -66,4 +66,4 @@ Sender of the vote #### Defined in -[types/block.ts:50](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L50) +[types/block.ts:49](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L49) diff --git a/docs/code/interfaces/types_block.LogicSig.md b/docs/code/interfaces/types_block.LogicSig.md index e15057e..ecd4be1 100644 --- a/docs/code/interfaces/types_block.LogicSig.md +++ b/docs/code/interfaces/types_block.LogicSig.md @@ -29,7 +29,7 @@ Arguments passed into the logic signature #### Defined in -[types/block.ts:219](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L219) +[types/block.ts:218](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L218) ___ @@ -41,7 +41,7 @@ Logic sig code #### Defined in -[types/block.ts:213](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L213) +[types/block.ts:212](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L212) ___ @@ -53,7 +53,7 @@ Multisig signature for delegated operations #### Defined in -[types/block.ts:217](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L217) +[types/block.ts:216](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L216) ___ @@ -65,4 +65,4 @@ ED25519 signature for delegated operations #### Defined in -[types/block.ts:215](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L215) +[types/block.ts:214](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L214) diff --git a/docs/code/interfaces/types_block.MultisigSig.md b/docs/code/interfaces/types_block.MultisigSig.md index 6aeb495..ab7a923 100644 --- a/docs/code/interfaces/types_block.MultisigSig.md +++ b/docs/code/interfaces/types_block.MultisigSig.md @@ -28,7 +28,7 @@ Sub-signatures #### Defined in -[types/block.ts:231](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L231) +[types/block.ts:230](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L230) ___ @@ -40,7 +40,7 @@ Multisig threshold #### Defined in -[types/block.ts:229](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L229) +[types/block.ts:228](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L228) ___ @@ -52,4 +52,4 @@ Multisig version #### Defined in -[types/block.ts:227](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L227) +[types/block.ts:226](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L226) diff --git a/docs/code/interfaces/types_block.StateProof.md b/docs/code/interfaces/types_block.StateProof.md index a409205..f0bd125 100644 --- a/docs/code/interfaces/types_block.StateProof.md +++ b/docs/code/interfaces/types_block.StateProof.md @@ -33,7 +33,7 @@ #### Defined in -[types/block.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L273) +[types/block.ts:272](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L272) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[types/block.ts:290](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L290) +[types/block.ts:289](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L289) ___ @@ -62,7 +62,7 @@ ___ #### Defined in -[types/block.ts:272](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L272) +[types/block.ts:271](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L271) ___ @@ -72,7 +72,7 @@ ___ #### Defined in -[types/block.ts:274](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L274) +[types/block.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L273) ___ @@ -82,7 +82,7 @@ ___ #### Defined in -[types/block.ts:275](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L275) +[types/block.ts:274](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L274) ___ @@ -92,7 +92,7 @@ ___ #### Defined in -[types/block.ts:292](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L292) +[types/block.ts:291](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L291) ___ @@ -102,4 +102,4 @@ ___ #### Defined in -[types/block.ts:291](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L291) +[types/block.ts:290](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L290) diff --git a/docs/code/interfaces/types_block.StateProofMessage.md b/docs/code/interfaces/types_block.StateProofMessage.md index 24d0a13..3b07c36 100644 --- a/docs/code/interfaces/types_block.StateProofMessage.md +++ b/docs/code/interfaces/types_block.StateProofMessage.md @@ -22,7 +22,7 @@ #### Defined in -[types/block.ts:299](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L299) +[types/block.ts:298](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L298) ___ @@ -32,7 +32,7 @@ ___ #### Defined in -[types/block.ts:296](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L296) +[types/block.ts:295](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L295) ___ @@ -42,7 +42,7 @@ ___ #### Defined in -[types/block.ts:297](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L297) +[types/block.ts:296](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L296) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[types/block.ts:298](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L298) +[types/block.ts:297](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L297) ___ @@ -62,4 +62,4 @@ ___ #### Defined in -[types/block.ts:300](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L300) +[types/block.ts:299](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L299) diff --git a/docs/code/interfaces/types_block.StateProofTracking.md b/docs/code/interfaces/types_block.StateProofTracking.md index 670a98f..f29c470 100644 --- a/docs/code/interfaces/types_block.StateProofTracking.md +++ b/docs/code/interfaces/types_block.StateProofTracking.md @@ -22,7 +22,7 @@ StateProofNextRound is the next round for which we will accept a StateProof tran #### Defined in -[types/block.ts:318](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L318) +[types/block.ts:317](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L317) ___ @@ -36,7 +36,7 @@ This is intended for computing the threshold of votes to expect from StateProofV #### Defined in -[types/block.ts:314](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L314) +[types/block.ts:313](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L313) ___ @@ -51,4 +51,4 @@ For blocks that are not a multiple of ConsensusParams.StateProofRounds, this val #### Defined in -[types/block.ts:309](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L309) +[types/block.ts:308](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L308) diff --git a/docs/code/interfaces/types_block.TransactionInBlock.md b/docs/code/interfaces/types_block.TransactionInBlock.md index c673b00..9718f4b 100644 --- a/docs/code/interfaces/types_block.TransactionInBlock.md +++ b/docs/code/interfaces/types_block.TransactionInBlock.md @@ -14,22 +14,17 @@ and its side effects within a committed block. - [assetCloseAmount](types_block.TransactionInBlock.md#assetcloseamount) - [blockTransaction](types_block.TransactionInBlock.md#blocktransaction) - [closeAmount](types_block.TransactionInBlock.md#closeamount) -- [closeRewards](types_block.TransactionInBlock.md#closerewards) - [createdAppId](types_block.TransactionInBlock.md#createdappid) - [createdAssetId](types_block.TransactionInBlock.md#createdassetid) - [genesisHash](types_block.TransactionInBlock.md#genesishash) - [genesisId](types_block.TransactionInBlock.md#genesisid) -- [globalStateDelta](types_block.TransactionInBlock.md#globalstatedelta) -- [localStateDelta](types_block.TransactionInBlock.md#localstatedelta) - [logs](types_block.TransactionInBlock.md#logs) - [parentOffset](types_block.TransactionInBlock.md#parentoffset) - [parentTransactionId](types_block.TransactionInBlock.md#parenttransactionid) -- [receiverRewards](types_block.TransactionInBlock.md#receiverrewards) - [roundIndex](types_block.TransactionInBlock.md#roundindex) - [roundNumber](types_block.TransactionInBlock.md#roundnumber) - [roundOffset](types_block.TransactionInBlock.md#roundoffset) - [roundTimestamp](types_block.TransactionInBlock.md#roundtimestamp) -- [senderRewards](types_block.TransactionInBlock.md#senderrewards) - [transaction](types_block.TransactionInBlock.md#transaction) ## Properties @@ -42,7 +37,7 @@ The asset close amount if the sender asset position was closed from this transac #### Defined in -[types/block.ts:386](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L386) +[types/block.ts:385](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L385) ___ @@ -54,7 +49,7 @@ The block data for the transaction #### Defined in -[types/block.ts:328](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L328) +[types/block.ts:327](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L327) ___ @@ -66,19 +61,7 @@ The ALGO close amount if the sender account was closed from this transaction. #### Defined in -[types/block.ts:388](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L388) - -___ - -### closeRewards - -• `Optional` **closeRewards**: `number` - -Rewards in microalgos applied to the close remainder to account. - -#### Defined in - -[types/block.ts:394](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L394) +[types/block.ts:387](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L387) ___ @@ -90,7 +73,7 @@ The app ID if an app was created from this transaction. #### Defined in -[types/block.ts:384](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L384) +[types/block.ts:383](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L383) ___ @@ -102,7 +85,7 @@ The asset ID if an asset was created from this transaction. #### Defined in -[types/block.ts:382](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L382) +[types/block.ts:381](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L381) ___ @@ -114,7 +97,7 @@ The binary genesis hash of the network the transaction is within. #### Defined in -[types/block.ts:369](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L369) +[types/block.ts:368](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L368) ___ @@ -126,30 +109,7 @@ The string genesis ID of the network the transaction is within. #### Defined in -[types/block.ts:371](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L371) - -___ - -### globalStateDelta - -• `Optional` **globalStateDelta**: `EvalDeltaKeyValue`[] - -#### Defined in - -[types/block.ts:397](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L397) - -___ - -### localStateDelta - -• `Optional` **localStateDelta**: `AccountStateDelta`[] - -Local state key/value changes for the application being executed by this -transaction. - -#### Defined in - -[types/block.ts:402](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L402) +[types/block.ts:370](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L370) ___ @@ -161,7 +121,7 @@ Any logs that were issued as a result of this transaction. #### Defined in -[types/block.ts:390](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L390) +[types/block.ts:389](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L389) ___ @@ -184,7 +144,7 @@ The offset within the parent transaction. #### Defined in -[types/block.ts:367](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L367) +[types/block.ts:366](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L366) ___ @@ -196,17 +156,7 @@ The ID of the parent transaction if this is an inner transaction. #### Defined in -[types/block.ts:355](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L355) - -___ - -### receiverRewards - -• `Optional` **receiverRewards**: `number` - -#### Defined in - -[types/block.ts:396](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L396) +[types/block.ts:354](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L354) ___ @@ -229,7 +179,7 @@ The index within the block.txns array of this transaction or if it's an inner tr #### Defined in -[types/block.ts:351](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L351) +[types/block.ts:350](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L350) ___ @@ -241,7 +191,7 @@ The round number of the block the transaction is within. #### Defined in -[types/block.ts:373](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L373) +[types/block.ts:372](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L372) ___ @@ -264,7 +214,7 @@ The offset of the transaction within the round including inner transactions. #### Defined in -[types/block.ts:339](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L339) +[types/block.ts:338](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L338) ___ @@ -276,17 +226,7 @@ The round unix timestamp of the block the transaction is within. #### Defined in -[types/block.ts:375](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L375) - -___ - -### senderRewards - -• `Optional` **senderRewards**: `number` - -#### Defined in - -[types/block.ts:395](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L395) +[types/block.ts:374](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L374) ___ @@ -298,4 +238,4 @@ The transaction as an algosdk `Transaction` object. #### Defined in -[types/block.ts:380](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L380) +[types/block.ts:379](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L379) diff --git a/docs/code/modules/types_block.md b/docs/code/modules/types_block.md index b090f20..636356b 100644 --- a/docs/code/modules/types_block.md +++ b/docs/code/modules/types_block.md @@ -34,4 +34,4 @@ Data that is returned in a raw Algorand block for a single inner transaction #### Defined in -[types/block.ts:240](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L240) +[types/block.ts:239](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L239) From f93a526933fc8c040b7657f0238bb31298c7ba1b Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Thu, 11 Jul 2024 10:57:43 +1000 Subject: [PATCH 04/10] add more fields to transaction --- .../types_block.TransactionInBlock.md | 39 +++++++++ src/transform.ts | 38 +++++++-- src/types/block.ts | 6 ++ tests/scenarios/transform-complex-txn.spec.ts | 80 +++++++++++++++++-- 4 files changed, 151 insertions(+), 12 deletions(-) diff --git a/docs/code/interfaces/types_block.TransactionInBlock.md b/docs/code/interfaces/types_block.TransactionInBlock.md index 9718f4b..fc84550 100644 --- a/docs/code/interfaces/types_block.TransactionInBlock.md +++ b/docs/code/interfaces/types_block.TransactionInBlock.md @@ -14,6 +14,7 @@ and its side effects within a committed block. - [assetCloseAmount](types_block.TransactionInBlock.md#assetcloseamount) - [blockTransaction](types_block.TransactionInBlock.md#blocktransaction) - [closeAmount](types_block.TransactionInBlock.md#closeamount) +- [closeRewards](types_block.TransactionInBlock.md#closerewards) - [createdAppId](types_block.TransactionInBlock.md#createdappid) - [createdAssetId](types_block.TransactionInBlock.md#createdassetid) - [genesisHash](types_block.TransactionInBlock.md#genesishash) @@ -21,10 +22,12 @@ and its side effects within a committed block. - [logs](types_block.TransactionInBlock.md#logs) - [parentOffset](types_block.TransactionInBlock.md#parentoffset) - [parentTransactionId](types_block.TransactionInBlock.md#parenttransactionid) +- [receiverRewards](types_block.TransactionInBlock.md#receiverrewards) - [roundIndex](types_block.TransactionInBlock.md#roundindex) - [roundNumber](types_block.TransactionInBlock.md#roundnumber) - [roundOffset](types_block.TransactionInBlock.md#roundoffset) - [roundTimestamp](types_block.TransactionInBlock.md#roundtimestamp) +- [senderRewards](types_block.TransactionInBlock.md#senderrewards) - [transaction](types_block.TransactionInBlock.md#transaction) ## Properties @@ -65,6 +68,18 @@ The ALGO close amount if the sender account was closed from this transaction. ___ +### closeRewards + +• `Optional` **closeRewards**: `number` + +Rewards in microalgos applied to the close remainder to account. + +#### Defined in + +[types/block.ts:391](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L391) + +___ + ### createdAppId • `Optional` **createdAppId**: `number` @@ -160,6 +175,18 @@ The ID of the parent transaction if this is an inner transaction. ___ +### receiverRewards + +• `Optional` **receiverRewards**: `number` + +Rewards in microalgos applied to the receiver account. + +#### Defined in + +[types/block.ts:395](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L395) + +___ + ### roundIndex • **roundIndex**: `number` @@ -230,6 +257,18 @@ The round unix timestamp of the block the transaction is within. ___ +### senderRewards + +• `Optional` **senderRewards**: `number` + +Rewards in microalgos applied to the sender account. + +#### Defined in + +[types/block.ts:393](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L393) + +___ + ### transaction • **transaction**: `Transaction` diff --git a/src/transform.ts b/src/transform.ts index 120cfd5..c694214 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -1,4 +1,4 @@ -import type { MultisigTransactionSubSignature, TransactionResult } from '@algorandfoundation/algokit-utils/types/indexer' +import type { EvalDelta, MultisigTransactionSubSignature, TransactionResult } from '@algorandfoundation/algokit-utils/types/indexer' import { ApplicationOnComplete, StateProofTransactionResult } from '@algorandfoundation/algokit-utils/types/indexer' import * as msgpack from 'algorand-msgpack' import algosdk from 'algosdk' @@ -265,6 +265,9 @@ export function getIndexerTransactionFromAlgodTransaction( roundTimestamp, genesisHash, genesisId, + closeRewards, + receiverRewards, + senderRewards, } = t if (!transaction.type) { @@ -545,12 +548,33 @@ export function getIndexerTransactionFromAlgodTransaction( } : undefined), logs: blockTransaction.dt?.lg ? blockTransaction.dt.lg.map((l) => Buffer.from(l).toString('base64')) : undefined, - // todo: do we need any of these? - //"close-rewards" - //"receiver-rewards" - //"sender-rewards" - //"global-state-delta" - //"local-state-delta" + 'close-rewards': closeRewards, + 'receiver-rewards': receiverRewards, + 'sender-rewards': senderRewards, + 'global-state-delta': blockTransaction.dt?.gd + ? (Object.entries(blockTransaction.dt.gd).map(([key, value]) => ({ + key: Buffer.from(key).toString('base64'), + value: { + action: value.at, + bytes: value.bs ? Buffer.from(value.bs).toString('base64') : undefined, + uint: value.ui, + }, + })) as unknown as Record[]) + : undefined, + + 'local-state-delta': blockTransaction.dt?.ld + ? (Object.entries(blockTransaction.dt.ld).map(([address, delta]) => ({ + address, + delta: Object.entries(delta).map(([key, value]) => ({ + key: Buffer.from(address).toString('base64'), + value: { + action: value.at, + bytes: value.bs ? Buffer.from(value.bs).toString('base64') : undefined, + uint: value.ui, + }, + })), + })) as unknown as Record[]) + : undefined, } // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (e: any) { diff --git a/src/types/block.ts b/src/types/block.ts index 3229cb7..94e809e 100644 --- a/src/types/block.ts +++ b/src/types/block.ts @@ -387,4 +387,10 @@ export interface TransactionInBlock { closeAmount?: number /** Any logs that were issued as a result of this transaction. */ logs?: Uint8Array[] + /** Rewards in microalgos applied to the close remainder to account. */ + closeRewards?: number + /** Rewards in microalgos applied to the sender account. */ + senderRewards?: number + /** Rewards in microalgos applied to the receiver account. */ + receiverRewards?: number } diff --git a/tests/scenarios/transform-complex-txn.spec.ts b/tests/scenarios/transform-complex-txn.spec.ts index 7b5de9d..3c6cb9a 100644 --- a/tests/scenarios/transform-complex-txn.spec.ts +++ b/tests/scenarios/transform-complex-txn.spec.ts @@ -212,6 +212,29 @@ describe('Complex transaction with many nested inner transactions', () => { ], "first-valid": 35214365, "genesis-hash": "wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=", + "global-state-delta": [ + { + "key": "", + "value": { + "action": 1, + "bytes": "AAAAAAAAAAQAAAAAAhlUHw==", + }, + }, + { + "key": "AA==", + "value": { + "action": 1, + "bytes": "YC4Bj8ZCXdiWg6+eYEL5yV0gvi3ucnEckrGx2BQXDDIAAAAAUuN3VwAAAAAOsZeDAQAAAABS43dXAAAAAFLkB4YAAAAAAAAAAAAAAAAAAAAA/////5S/nq4AAAAAa0BhUQAAAA91+xl0AAAAAALtZZ8AAAAAAwsGTgAAAAAAAA==", + }, + }, + { + "key": "AQ==", + "value": { + "action": 1, + "bytes": "h2MAAAAAAAAABQAAAAAAAAAZAAAAAAAAAB6KqC3yOXMVr2XD4nTi43RC3Rv0AGIvri+ssClC+HVNQgAAAAAAAAAAAA==", + }, + }, + ], "group": "6ZssGapPFZ+DyccRludq0YjZigi05/FSeUAOFNDGGlo=", "id": "QLYC4KMQW5RZRA7W5GYCJ4CUVWWSZKMK2V4X3XFQYSGYCJH6LI4Q/inner/5", "inner-txns": [ @@ -691,9 +714,56 @@ describe('Complex transaction with many nested inner transactions', () => { expect(transaction.id).toBe('HHQHASIF2YLCSUYIPE6LIMLSNLCVMQBQHF3X46SKTX6F7ZSFKFCQ') expect(transaction.id).toBe(blockTransactions[0].transaction.txID()) }) - // it('just to test', async () => { - // const blocks = await getBlocksBulk({ startRound: 39430981, maxRound: 39430981 }, algod) - // const x = blockDataToBlockMetadata(blocks[0]) - // console.log(x) - // }) + it('Produces the correct state deltas in application transaction', async () => { + const blocks = await getBlocksBulk({ startRound: 39430981, maxRound: 39430981 }, algod) + const blockTransactions = blocks.flatMap((b) => getBlockTransactions(b.block)) + + const transaction = getIndexerTransactionFromAlgodTransaction(blockTransactions[9]) + const localStateDelta = transaction['local-state-delta'] + const globalStateDelta = transaction['global-state-delta'] + expect(globalStateDelta).toMatchInlineSnapshot(`[ + { + "key": "Y3VycmVudF9taW5lcl9lZmZvcnQ=", + "value": { + "action": 2, + "bytes": undefined, + "uint": 412000, + }, + }, + { + "key": "dG90YWxfZWZmb3J0", + "value": { + "action": 2, + "bytes": undefined, + "uint": 2129702852933n, + }, + }, + { + "key": "dG90YWxfdHJhbnNhY3Rpb25z", + "value": { + "action": 2, + "bytes": undefined, + "uint": 324424783, + }, + }, +] + `) + expect(localStateDelta).toMatchInlineSnapshot( + `[ + { + "address": "2", + "delta": [ + { + "key": "Mg==", + "value": { + "action": 2, + "bytes": undefined, + "uint": 412000, + }, + }, + ], + }, +]`, + ) + }) }) From 954f58abe5ac2738792bffe40b5a7abdde5218f9 Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Thu, 11 Jul 2024 14:56:11 +1000 Subject: [PATCH 05/10] fix: local state delta address --- src/transform.ts | 40 ++++++++++++++----- tests/scenarios/transform-complex-txn.spec.ts | 10 ++--- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/transform.ts b/src/transform.ts index c694214..aa59670 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -563,17 +563,35 @@ export function getIndexerTransactionFromAlgodTransaction( : undefined, 'local-state-delta': blockTransaction.dt?.ld - ? (Object.entries(blockTransaction.dt.ld).map(([address, delta]) => ({ - address, - delta: Object.entries(delta).map(([key, value]) => ({ - key: Buffer.from(address).toString('base64'), - value: { - action: value.at, - bytes: value.bs ? Buffer.from(value.bs).toString('base64') : undefined, - uint: value.ui, - }, - })), - })) as unknown as Record[]) + ? (Object.entries(blockTransaction.dt.ld) + .map(([addressIndex, delta]) => { + try { + const addressList = [ + algosdk.encodeAddress(transaction.from.publicKey), + ...(transaction.appAccounts?.map((a) => algosdk.encodeAddress(a.publicKey)) || []), + ] + if (Number(addressIndex) >= addressList.length) { + throw new Error(`Address index ${addressIndex} is out of range`) + } + return { + address: addressList[Number(addressIndex)], + delta: Object.entries(delta).map(([key, value]) => ({ + key: Buffer.from(key).toString('base64'), + value: { + action: value.at, + bytes: value.bs ? Buffer.from(value.bs).toString('base64') : undefined, + uint: value.ui, + }, + })), + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (e: any) { + // eslint-disable-next-line no-console + console.error(`Error processing local state delta: ${e.message}`) + throw e + } + }) + .filter((entry) => entry !== null) as unknown as Record[]) : undefined, } // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/tests/scenarios/transform-complex-txn.spec.ts b/tests/scenarios/transform-complex-txn.spec.ts index 3c6cb9a..3543e8a 100644 --- a/tests/scenarios/transform-complex-txn.spec.ts +++ b/tests/scenarios/transform-complex-txn.spec.ts @@ -748,13 +748,12 @@ describe('Complex transaction with many nested inner transactions', () => { }, ] `) - expect(localStateDelta).toMatchInlineSnapshot( - `[ + expect(localStateDelta).toMatchInlineSnapshot(`[ { - "address": "2", + "address": "R4Q3KN5RBXUQIJWSVMQUJ7FTL7YURP6DY6W724HTD4Z43IRGUCZ2ORANGE", "delta": [ { - "key": "Mg==", + "key": "ZWZmb3J0", "value": { "action": 2, "bytes": undefined, @@ -763,7 +762,6 @@ describe('Complex transaction with many nested inner transactions', () => { }, ], }, -]`, - ) +]`) }) }) From d264f8cf3e0d9c47f7f1c19b784eb2c35e0bb3ca Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Fri, 12 Jul 2024 10:52:34 +1000 Subject: [PATCH 06/10] PR reviews --- docs/code/classes/index.AlgorandSubscriber.md | 120 ++++++++++-------- ...s_async_event_emitter.AsyncEventEmitter.md | 48 +++---- .../types_subscription.BalanceChangeRole.md | 18 +-- .../interfaces/types_arc_28.Arc28Event.md | 6 +- .../types_arc_28.Arc28EventGroup.md | 12 +- .../types_arc_28.Arc28EventToProcess.md | 8 +- .../types_arc_28.EmittedArc28Event.md | 12 +- docs/code/interfaces/types_block.Block.md | 54 ++++---- .../types_block.BlockAgreementCertificate.md | 24 ++-- docs/code/interfaces/types_block.BlockData.md | 2 +- .../types_block.BlockTransaction.md | 22 ++-- .../types_block.BlockTransactionEvalDelta.md | 6 +- .../interfaces/types_block.BlockValueDelta.md | 11 +- docs/code/interfaces/types_block.BlockVote.md | 10 +- docs/code/interfaces/types_block.LogicSig.md | 6 +- .../interfaces/types_block.MultisigSig.md | 6 +- .../code/interfaces/types_block.StateProof.md | 38 +++--- .../types_block.StateProofMessage.md | 8 +- .../types_block.StateProofTracking.md | 6 +- .../types_block.TransactionInBlock.md | 55 +++----- ...s_subscription.AlgorandSubscriberConfig.md | 53 ++++---- .../types_subscription.BalanceChange.md | 6 +- .../types_subscription.BeforePollMetadata.md | 2 +- .../types_subscription.BlockMetadata.md | 36 +++--- .../types_subscription.BlockRewards.md | 10 +- ...es_subscription.BlockStateProofTracking.md | 6 +- .../types_subscription.BlockUpgradeState.md | 8 +- .../types_subscription.BlockUpgradeVote.md | 4 +- ...ption.CoreTransactionSubscriptionParams.md | 68 +++++----- ...pes_subscription.NamedTransactionFilter.md | 2 +- ...types_subscription.ParticipationUpdates.md | 2 +- ...pes_subscription.SubscriberConfigFilter.md | 12 +- .../types_subscription.TransactionFilter.md | 42 +++--- ...scription.TransactionSubscriptionParams.md | 72 ++++++----- ...scription.TransactionSubscriptionResult.md | 10 +- docs/code/modules/index.md | 10 +- docs/code/modules/types.md | 76 +++++------ .../code/modules/types_async_event_emitter.md | 6 +- docs/code/modules/types_block.md | 2 +- docs/code/modules/types_subscription.md | 31 ++--- src/transform.ts | 58 ++++----- tests/scenarios/transform-complex-txn.spec.ts | 4 +- 42 files changed, 493 insertions(+), 499 deletions(-) diff --git a/docs/code/classes/index.AlgorandSubscriber.md b/docs/code/classes/index.AlgorandSubscriber.md index aec9bcb..0fa1b9a 100644 --- a/docs/code/classes/index.AlgorandSubscriber.md +++ b/docs/code/classes/index.AlgorandSubscriber.md @@ -46,11 +46,11 @@ Create a new `AlgorandSubscriber`. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `config` | [`AlgorandSubscriberConfig`](../interfaces/types_subscription.AlgorandSubscriberConfig.md) | The subscriber configuration | -| `algod` | `default` | An algod client | -| `indexer?` | `default` | An (optional) indexer client; only needed if `subscription.syncBehaviour` is `catchup-with-indexer` | +| Name | Type | Description | +| :--------- | :----------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------- | +| `config` | [`AlgorandSubscriberConfig`](../interfaces/types_subscription.AlgorandSubscriberConfig.md) | The subscriber configuration | +| `algod` | `default` | An algod client | +| `indexer?` | `default` | An (optional) indexer client; only needed if `subscription.syncBehaviour` is `catchup-with-indexer` | #### Returns @@ -70,7 +70,7 @@ Create a new `AlgorandSubscriber`. [subscriber.ts:24](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L24) -___ +--- ### algod @@ -80,7 +80,7 @@ ___ [subscriber.ts:21](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L21) -___ +--- ### config @@ -90,17 +90,17 @@ ___ [subscriber.ts:23](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L23) -___ +--- ### errorEventName -• `Private` `Readonly` **errorEventName**: ``"error"`` +• `Private` `Readonly` **errorEventName**: `"error"` #### Defined in [subscriber.ts:30](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L30) -___ +--- ### eventEmitter @@ -110,7 +110,7 @@ ___ [subscriber.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L25) -___ +--- ### filterNames @@ -120,7 +120,7 @@ ___ [subscriber.ts:28](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L28) -___ +--- ### indexer @@ -130,7 +130,7 @@ ___ [subscriber.ts:22](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L22) -___ +--- ### startPromise @@ -140,7 +140,7 @@ ___ [subscriber.ts:27](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L27) -___ +--- ### started @@ -158,8 +158,8 @@ ___ #### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------ | :-------- | | `error` | `unknown` | #### Returns @@ -170,7 +170,7 @@ ___ [subscriber.ts:31](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L31) -___ +--- ### on @@ -182,16 +182,16 @@ The listener can be async and it will be awaited if so. #### Type parameters -| Name | Type | -| :------ | :------ | -| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | +| Name | Type | +| :--- | :-------------------------------------------------------------------------------- | +| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `filterName` | `string` | The name of the filter to subscribe to | -| `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<`T`\> | The listener function to invoke with the subscribed event | +| Name | Type | Description | +| :----------- | :------------------------------------------------------------------------------------------- | :-------------------------------------------------------- | +| `filterName` | `string` | The name of the filter to subscribe to | +| `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<`T`\> | The listener function to invoke with the subscribed event | #### Returns @@ -202,7 +202,9 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.on('my-filter', async (transaction) => { console.log(transaction.id) }) +subscriber.on('my-filter', async (transaction) => { + console.log(transaction.id) +}) ``` **`Example`** @@ -216,7 +218,7 @@ new AlgorandSubscriber({filters: [{name: 'my-filter', filter: {...}, mapper: (t) [subscriber.ts:191](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L191) -___ +--- ### onBatch @@ -232,16 +234,16 @@ The listener can be async and it will be awaited if so. #### Type parameters -| Name | Type | -| :------ | :------ | -| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | +| Name | Type | +| :--- | :-------------------------------------------------------------------------------- | +| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `filterName` | `string` | The name of the filter to subscribe to | -| `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<`T`[]\> | The listener function to invoke with the subscribed events | +| Name | Type | Description | +| :----------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------- | +| `filterName` | `string` | The name of the filter to subscribe to | +| `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<`T`[]\> | The listener function to invoke with the subscribed events | #### Returns @@ -252,7 +254,9 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.onBatch('my-filter', async (transactions) => { console.log(transactions.length) }) +subscriber.onBatch('my-filter', async (transactions) => { + console.log(transactions.length) +}) ``` **`Example`** @@ -266,7 +270,7 @@ new AlgorandSubscriber({filters: [{name: 'my-filter', filter: {...}, mapper: (t) [subscriber.ts:220](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L220) -___ +--- ### onBeforePoll @@ -280,8 +284,8 @@ The listener can be async and it will be awaited if so. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :--------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------- | | `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<[`BeforePollMetadata`](../interfaces/types_subscription.BeforePollMetadata.md)\> | The listener function to invoke with the pre-poll metadata | #### Returns @@ -293,14 +297,16 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.onBeforePoll(async (metadata) => { console.log(metadata.watermark) }) +subscriber.onBeforePoll(async (metadata) => { + console.log(metadata.watermark) +}) ``` #### Defined in [subscriber.ts:238](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L238) -___ +--- ### onError @@ -314,8 +320,8 @@ The listener can be async and it will be awaited if so. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :--------- | :---------------------------------------------------------------- | :------------------------------------------------------------- | | `listener` | [`ErrorListener`](../modules/types_subscription.md#errorlistener) | The listener function to invoke with the error that was thrown | #### Returns @@ -327,7 +333,9 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.onError((error) => { console.error(error) }) +subscriber.onError((error) => { + console.error(error) +}) ``` **`Example`** @@ -351,7 +359,7 @@ subscriber.onError(async (error) => { [subscriber.ts:292](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L292) -___ +--- ### onPoll @@ -368,8 +376,8 @@ The listener can be async and it will be awaited if so. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :--------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------- | | `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<[`TransactionSubscriptionResult`](../interfaces/types_subscription.TransactionSubscriptionResult.md)\> | The listener function to invoke with the poll result | #### Returns @@ -381,14 +389,16 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.onPoll(async (pollResult) => { console.log(pollResult.subscribedTransactions.length, pollResult.syncedRoundRange) }) +subscriber.onPoll(async (pollResult) => { + console.log(pollResult.subscribedTransactions.length, pollResult.syncedRoundRange) +}) ``` #### Defined in [subscriber.ts:259](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L259) -___ +--- ### pollOnce @@ -409,7 +419,7 @@ The poll result [subscriber.ts:67](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L67) -___ +--- ### start @@ -421,10 +431,10 @@ This is useful when running in the context of a long-running process / container #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `inspect?` | (`pollResult`: [`TransactionSubscriptionResult`](../interfaces/types_subscription.TransactionSubscriptionResult.md)) => `void` | A function that is called for each poll so the inner workings can be inspected / logged / etc. | -| `suppressLog?` | `boolean` | - | +| Name | Type | Description | +| :------------- | :----------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | +| `inspect?` | (`pollResult`: [`TransactionSubscriptionResult`](../interfaces/types_subscription.TransactionSubscriptionResult.md)) => `void` | A function that is called for each poll so the inner workings can be inspected / logged / etc. | +| `suppressLog?` | `boolean` | - | #### Returns @@ -436,7 +446,7 @@ An object that contains a promise you can wait for after calling stop [subscriber.ts:113](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L113) -___ +--- ### stop @@ -446,8 +456,8 @@ Stops the subscriber if previously started via `start`. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :------- | :-------- | :----------------------------------------- | | `reason` | `unknown` | The reason the subscriber is being stopped | #### Returns diff --git a/docs/code/classes/types_async_event_emitter.AsyncEventEmitter.md b/docs/code/classes/types_async_event_emitter.AsyncEventEmitter.md index c2fe2a6..61062a9 100644 --- a/docs/code/classes/types_async_event_emitter.AsyncEventEmitter.md +++ b/docs/code/classes/types_async_event_emitter.AsyncEventEmitter.md @@ -47,7 +47,7 @@ Simple asynchronous event emitter class. [types/async-event-emitter.ts:12](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L12) -___ +--- ### listenerWrapperMap @@ -57,7 +57,7 @@ ___ [types/async-event-emitter.ts:11](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L11) -___ +--- ### off @@ -71,10 +71,10 @@ Alias for `removeListener`. ##### Parameters -| Name | Type | -| :------ | :------ | -| `eventName` | `string` \| `symbol` | -| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | +| Name | Type | +| :---------- | :--------------------------------------------------------------------------------- | +| `eventName` | `string` \| `symbol` | +| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | ##### Returns @@ -95,10 +95,10 @@ in the order they were registered. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :---------- | :------------------- | :-------------------- | | `eventName` | `string` \| `symbol` | The name of the event | -| `event` | `unknown` | The event payload | +| `event` | `unknown` | The event payload | #### Returns @@ -108,7 +108,7 @@ in the order they were registered. [types/async-event-emitter.ts:21](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L21) -___ +--- ### on @@ -118,10 +118,10 @@ Register an event listener for the given event. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `eventName` | `string` \| `symbol` | The name of the event | -| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to trigger | +| Name | Type | Description | +| :---------- | :--------------------------------------------------------------------------------- | :---------------------- | +| `eventName` | `string` \| `symbol` | The name of the event | +| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to trigger | #### Returns @@ -133,7 +133,7 @@ The `AsyncEventEmitter` so you can chain registrations [types/async-event-emitter.ts:33](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L33) -___ +--- ### once @@ -143,10 +143,10 @@ Register an event listener for the given event that is only fired once. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `eventName` | `string` \| `symbol` | The name of the event | -| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to trigger | +| Name | Type | Description | +| :---------- | :--------------------------------------------------------------------------------- | :---------------------- | +| `eventName` | `string` \| `symbol` | The name of the event | +| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to trigger | #### Returns @@ -158,7 +158,7 @@ The `AsyncEventEmitter` so you can chain registrations [types/async-event-emitter.ts:45](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L45) -___ +--- ### removeListener @@ -168,10 +168,10 @@ Removes an event listener from the given event. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `eventName` | `string` \| `symbol` | The name of the event | -| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to remove | +| Name | Type | Description | +| :---------- | :--------------------------------------------------------------------------------- | :--------------------- | +| `eventName` | `string` \| `symbol` | The name of the event | +| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to remove | #### Returns diff --git a/docs/code/enums/types_subscription.BalanceChangeRole.md b/docs/code/enums/types_subscription.BalanceChangeRole.md index 9c2deb4..9b8e880 100644 --- a/docs/code/enums/types_subscription.BalanceChangeRole.md +++ b/docs/code/enums/types_subscription.BalanceChangeRole.md @@ -20,7 +20,7 @@ The role that an account was playing for a given balance change. ### AssetCreator -• **AssetCreator** = ``"AssetCreator"`` +• **AssetCreator** = `"AssetCreator"` Account was creating an asset and holds the full asset supply @@ -28,11 +28,11 @@ Account was creating an asset and holds the full asset supply [types/subscription.ts:195](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L195) -___ +--- ### AssetDestroyer -• **AssetDestroyer** = ``"AssetDestroyer"`` +• **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. @@ -41,11 +41,11 @@ A balance change with this role will always have a 0 amount and use the asset ma [types/subscription.ts:199](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L199) -___ +--- ### CloseTo -• **CloseTo** = ``"CloseTo"`` +• **CloseTo** = `"CloseTo"` Account was having an asset amount closed to it @@ -53,11 +53,11 @@ Account was having an asset amount closed to it [types/subscription.ts:193](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L193) -___ +--- ### Receiver -• **Receiver** = ``"Receiver"`` +• **Receiver** = `"Receiver"` Account was receiving a transaction @@ -65,11 +65,11 @@ Account was receiving a transaction [types/subscription.ts:191](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L191) -___ +--- ### Sender -• **Sender** = ``"Sender"`` +• **Sender** = `"Sender"` Account was sending a transaction (sending asset and/or spending fee if asset `0`) diff --git a/docs/code/interfaces/types_arc_28.Arc28Event.md b/docs/code/interfaces/types_arc_28.Arc28Event.md index 666ef37..21d485a 100644 --- a/docs/code/interfaces/types_arc_28.Arc28Event.md +++ b/docs/code/interfaces/types_arc_28.Arc28Event.md @@ -18,7 +18,7 @@ The definition of metadata for an ARC-28 event per https://github.com/algorandfo ### args -• **args**: \{ `desc?`: `string` ; `name?`: `string` ; `type`: `string` }[] +• **args**: \{ `desc?`: `string` ; `name?`: `string` ; `type`: `string` }[] The arguments of the event, in order @@ -26,7 +26,7 @@ The arguments of the event, in order [types/arc-28.ts:14](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L14) -___ +--- ### desc @@ -38,7 +38,7 @@ Optional, user-friendly description for the event [types/arc-28.ts:12](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L12) -___ +--- ### name diff --git a/docs/code/interfaces/types_arc_28.Arc28EventGroup.md b/docs/code/interfaces/types_arc_28.Arc28EventGroup.md index 2784ab0..ee71c60 100644 --- a/docs/code/interfaces/types_arc_28.Arc28EventGroup.md +++ b/docs/code/interfaces/types_arc_28.Arc28EventGroup.md @@ -28,7 +28,7 @@ Whether or not to silently (with warning log) continue if an error is encountere [types/arc-28.ts:55](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L55) -___ +--- ### events @@ -40,7 +40,7 @@ The list of ARC-28 event definitions [types/arc-28.ts:57](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L57) -___ +--- ### groupName @@ -52,7 +52,7 @@ The name to designate for this group of events. [types/arc-28.ts:49](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L49) -___ +--- ### processForAppIds @@ -64,7 +64,7 @@ Optional list of app IDs that this event should apply to [types/arc-28.ts:51](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L51) -___ +--- ### processTransaction @@ -78,8 +78,8 @@ Optional predicate to indicate if these ARC-28 events should be processed for th ##### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------ | :------------------ | | `transaction` | `TransactionResult` | ##### Returns diff --git a/docs/code/interfaces/types_arc_28.Arc28EventToProcess.md b/docs/code/interfaces/types_arc_28.Arc28EventToProcess.md index ee76e81..4b29a88 100644 --- a/docs/code/interfaces/types_arc_28.Arc28EventToProcess.md +++ b/docs/code/interfaces/types_arc_28.Arc28EventToProcess.md @@ -34,7 +34,7 @@ The ARC-28 definition of the event [types/arc-28.ts:35](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L35) -___ +--- ### eventName @@ -46,7 +46,7 @@ The name of the ARC-28 event that was triggered [types/arc-28.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L29) -___ +--- ### eventPrefix @@ -58,7 +58,7 @@ The 4-byte hex prefix for the event [types/arc-28.ts:33](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L33) -___ +--- ### eventSignature @@ -70,7 +70,7 @@ The signature of the event e.g. `EventName(type1,type2)` [types/arc-28.ts:31](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L31) -___ +--- ### groupName diff --git a/docs/code/interfaces/types_arc_28.EmittedArc28Event.md b/docs/code/interfaces/types_arc_28.EmittedArc28Event.md index 55b95fb..0419ee3 100644 --- a/docs/code/interfaces/types_arc_28.EmittedArc28Event.md +++ b/docs/code/interfaces/types_arc_28.EmittedArc28Event.md @@ -36,7 +36,7 @@ The ordered arguments extracted from the event that was emitted [types/arc-28.ts:41](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L41) -___ +--- ### argsByName @@ -48,7 +48,7 @@ The named arguments extracted from the event that was emitted (where the argumen [types/arc-28.ts:43](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L43) -___ +--- ### eventDefinition @@ -64,7 +64,7 @@ The ARC-28 definition of the event [types/arc-28.ts:35](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L35) -___ +--- ### eventName @@ -80,7 +80,7 @@ The name of the ARC-28 event that was triggered [types/arc-28.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L29) -___ +--- ### eventPrefix @@ -96,7 +96,7 @@ The 4-byte hex prefix for the event [types/arc-28.ts:33](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L33) -___ +--- ### eventSignature @@ -112,7 +112,7 @@ The signature of the event e.g. `EventName(type1,type2)` [types/arc-28.ts:31](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L31) -___ +--- ### groupName diff --git a/docs/code/interfaces/types_block.Block.md b/docs/code/interfaces/types_block.Block.md index e0294c7..861bb0f 100644 --- a/docs/code/interfaces/types_block.Block.md +++ b/docs/code/interfaces/types_block.Block.md @@ -56,7 +56,7 @@ since genesis. [types/block.ts:87](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L87) -___ +--- ### fees @@ -68,7 +68,7 @@ The FeeSink accepts transaction fees. It can only spend to the incentive pool. [types/block.ts:89](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L89) -___ +--- ### frac @@ -81,7 +81,7 @@ MicroAlgos for every reward unit in the next round. [types/block.ts:93](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L93) -___ +--- ### gen @@ -93,7 +93,7 @@ Genesis ID to which this block belongs. [types/block.ts:95](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L95) -___ +--- ### gh @@ -105,7 +105,7 @@ Genesis hash to which this block belongs. [types/block.ts:97](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L97) -___ +--- ### nextbefore @@ -117,7 +117,7 @@ Deadline round for this protocol upgrade (No votes will be considered after this [types/block.ts:141](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L141) -___ +--- ### nextproto @@ -129,7 +129,7 @@ The next proposed protocol version. [types/block.ts:133](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L133) -___ +--- ### nextswitch @@ -141,7 +141,7 @@ Round on which the protocol upgrade will take effect. [types/block.ts:145](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L145) -___ +--- ### nextyes @@ -153,7 +153,7 @@ Number of blocks which approved the protocol upgrade. [types/block.ts:137](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L137) -___ +--- ### partupdabs @@ -166,7 +166,7 @@ needs to be converted to offline since they are not proposing. [types/block.ts:154](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L154) -___ +--- ### partupdrmv @@ -179,7 +179,7 @@ converted to offline since their participation key expired. [types/block.ts:159](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L159) -___ +--- ### prev @@ -191,7 +191,7 @@ The hash of the previous block [types/block.ts:99](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L99) -___ +--- ### proto @@ -203,7 +203,7 @@ UpgradeState tracks the protocol upgrade state machine; proto is the current pro [types/block.ts:101](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L101) -___ +--- ### rate @@ -215,7 +215,7 @@ The number of new MicroAlgos added to the participation stake from rewards at th [types/block.ts:103](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L103) -___ +--- ### rnd @@ -227,7 +227,7 @@ Round number. [types/block.ts:105](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L105) -___ +--- ### rwcalr @@ -239,7 +239,7 @@ The round at which the RewardsRate will be recalculated. [types/block.ts:107](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L107) -___ +--- ### rwd @@ -252,7 +252,7 @@ FeeSink and continually redistributes them to addresses as rewards. [types/block.ts:111](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L111) -___ +--- ### seed @@ -264,7 +264,7 @@ Sortition seed [types/block.ts:113](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L113) -___ +--- ### spt @@ -274,21 +274,21 @@ ___ [types/block.ts:173](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L173) -___ +--- ### tc • **tc**: `number` TxnCounter is the number of the next transaction that will be -committed after this block. Genesis blocks can start at either +committed after this block. Genesis blocks can start at either 0 or 1000, depending on a consensus parameter (AppForbidLowResources). #### Defined in [types/block.ts:118](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L118) -___ +--- ### ts @@ -300,7 +300,7 @@ Round time (unix timestamp) [types/block.ts:120](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L120) -___ +--- ### txn @@ -314,7 +314,7 @@ This value is only set when there are transactions in the block. [types/block.ts:125](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L125) -___ +--- ### txn256 @@ -326,7 +326,7 @@ Root of transaction vector commitment merkle tree using SHA256 hash function. [types/block.ts:129](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L129) -___ +--- ### txns @@ -338,7 +338,7 @@ The transactions within the block. [types/block.ts:149](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L149) -___ +--- ### upgradedelay @@ -350,7 +350,7 @@ UpgradeDelay indicates the time between acceptance and execution [types/block.ts:167](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L167) -___ +--- ### upgradeprop @@ -362,7 +362,7 @@ UpgradePropose indicates a proposed upgrade [types/block.ts:171](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L171) -___ +--- ### upgradeyes diff --git a/docs/code/interfaces/types_block.BlockAgreementCertificate.md b/docs/code/interfaces/types_block.BlockAgreementCertificate.md index c5f873d..14e8c0f 100644 --- a/docs/code/interfaces/types_block.BlockAgreementCertificate.md +++ b/docs/code/interfaces/types_block.BlockAgreementCertificate.md @@ -8,9 +8,9 @@ Data this is returned in a raw Algorand block to certify the block. **`See`** - - https://github.com/algorand/go-algorand/blob/master/agreement/certificate.go - - https://github.com/algorand/go-algorand/blob/master/agreement/bundle.go#L31 - - https://github.com/algorand/go-algorand/blob/master/agreement/proposal.go +- https://github.com/algorand/go-algorand/blob/master/agreement/certificate.go +- https://github.com/algorand/go-algorand/blob/master/agreement/bundle.go#L31 +- https://github.com/algorand/go-algorand/blob/master/agreement/proposal.go ## Table of contents @@ -35,7 +35,7 @@ Equivocation votes [types/block.ts:40](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L40) -___ +--- ### per @@ -47,7 +47,7 @@ Period represents the current period of the source. [types/block.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L25) -___ +--- ### prop @@ -57,17 +57,17 @@ The proposal #### Type declaration -| Name | Type | Description | -| :------ | :------ | :------ | -| `dig` | `Uint8Array` | Block digest | +| Name | Type | Description | +| :------- | :----------- | :------------------------------------------------------- | +| `dig` | `Uint8Array` | Block digest | | `encdig` | `Uint8Array` | Encoding digest (the cryptographic hash of the proposal) | -| `oprop` | `Uint8Array` | Original proposer | +| `oprop` | `Uint8Array` | Original proposer | #### Defined in [types/block.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L29) -___ +--- ### rnd @@ -79,7 +79,7 @@ Round number [types/block.ts:23](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L23) -___ +--- ### step @@ -91,7 +91,7 @@ Step represents the current period of the source. [types/block.ts:27](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L27) -___ +--- ### vote diff --git a/docs/code/interfaces/types_block.BlockData.md b/docs/code/interfaces/types_block.BlockData.md index ad0d35f..ffeea7d 100644 --- a/docs/code/interfaces/types_block.BlockData.md +++ b/docs/code/interfaces/types_block.BlockData.md @@ -25,7 +25,7 @@ The block itself. [types/block.ts:10](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L10) -___ +--- ### cert diff --git a/docs/code/interfaces/types_block.BlockTransaction.md b/docs/code/interfaces/types_block.BlockTransaction.md index bbce4e3..ad6907a 100644 --- a/docs/code/interfaces/types_block.BlockTransaction.md +++ b/docs/code/interfaces/types_block.BlockTransaction.md @@ -39,7 +39,7 @@ Asset closing amount in decimal units [types/block.ts:190](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L190) -___ +--- ### apid @@ -51,7 +51,7 @@ App ID when an app is created by the transaction [types/block.ts:188](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L188) -___ +--- ### ca @@ -63,7 +63,7 @@ Algo closing amount in microAlgos [types/block.ts:192](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L192) -___ +--- ### caid @@ -75,7 +75,7 @@ Asset ID when an asset is created by the transaction [types/block.ts:186](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L186) -___ +--- ### dt @@ -87,7 +87,7 @@ The eval deltas for the block [types/block.ts:184](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L184) -___ +--- ### hgh @@ -99,7 +99,7 @@ Has genesis hash [types/block.ts:196](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L196) -___ +--- ### hgi @@ -111,7 +111,7 @@ Has genesis id [types/block.ts:194](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L194) -___ +--- ### lsig @@ -123,7 +123,7 @@ Logic signature [types/block.ts:200](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L200) -___ +--- ### msig @@ -135,7 +135,7 @@ Transaction multisig signature [types/block.ts:202](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L202) -___ +--- ### sgnr @@ -147,7 +147,7 @@ The signer, if signing with a different key than the Transaction type `from` pro [types/block.ts:204](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L204) -___ +--- ### sig @@ -159,7 +159,7 @@ Transaction ED25519 signature [types/block.ts:198](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L198) -___ +--- ### txn diff --git a/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md b/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md index 4f52ee9..4439af3 100644 --- a/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md +++ b/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md @@ -27,7 +27,7 @@ The delta of global state, keyed by key [types/block.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L244) -___ +--- ### itx @@ -39,7 +39,7 @@ Inner transactions [types/block.ts:250](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L250) -___ +--- ### ld @@ -51,7 +51,7 @@ The delta of local state keyed by account ID offset in [txn.Sender, ...txn.Accou [types/block.ts:246](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L246) -___ +--- ### lg diff --git a/docs/code/interfaces/types_block.BlockValueDelta.md b/docs/code/interfaces/types_block.BlockValueDelta.md index 0ccc978..4a05ff0 100644 --- a/docs/code/interfaces/types_block.BlockValueDelta.md +++ b/docs/code/interfaces/types_block.BlockValueDelta.md @@ -21,15 +21,16 @@ A value delta as a result of a block transaction • **at**: `number` DeltaAction is an enum of actions that may be performed when applying a delta to a TEAL key/value store: - * `1`: SetBytesAction indicates that a TEAL byte slice should be stored at a key - * `2`: SetUintAction indicates that a Uint should be stored at a key - * `3`: DeleteAction indicates that the value for a particular key should be deleted + +- `1`: SetBytesAction indicates that a TEAL byte slice should be stored at a key +- `2`: SetUintAction indicates that a Uint should be stored at a key +- `3`: DeleteAction indicates that the value for a particular key should be deleted #### Defined in [types/block.ts:260](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L260) -___ +--- ### bs @@ -41,7 +42,7 @@ Bytes value [types/block.ts:263](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L263) -___ +--- ### ui diff --git a/docs/code/interfaces/types_block.BlockVote.md b/docs/code/interfaces/types_block.BlockVote.md index 6119da5..c71b318 100644 --- a/docs/code/interfaces/types_block.BlockVote.md +++ b/docs/code/interfaces/types_block.BlockVote.md @@ -32,19 +32,19 @@ https://github.com/algorand/go-algorand/blob/master/data/committee/credential.go #### Type declaration -| Name | Type | Description | -| :------ | :------ | :------ | +| Name | Type | Description | +| :--- | :----------- | :-------------------------- | | `pf` | `Uint8Array` | VRF proof of the credential | #### Defined in [types/block.ts:54](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L54) -___ +--- ### sig -• **sig**: \{ `p`: `Uint8Array` ; `p1s`: `Uint8Array` ; `p2`: `Uint8Array` ; `p2s`: `Uint8Array` ; `ps`: `Uint8Array` ; `s`: `Uint8Array` }[] +• **sig**: \{ `p`: `Uint8Array` ; `p1s`: `Uint8Array` ; `p2`: `Uint8Array` ; `p2s`: `Uint8Array` ; `ps`: `Uint8Array` ; `s`: `Uint8Array` }[] One-time signature @@ -56,7 +56,7 @@ https://github.com/algorand/go-algorand/blob/master/crypto/onetimesig.go [types/block.ts:62](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L62) -___ +--- ### snd diff --git a/docs/code/interfaces/types_block.LogicSig.md b/docs/code/interfaces/types_block.LogicSig.md index ecd4be1..8231a6f 100644 --- a/docs/code/interfaces/types_block.LogicSig.md +++ b/docs/code/interfaces/types_block.LogicSig.md @@ -31,7 +31,7 @@ Arguments passed into the logic signature [types/block.ts:218](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L218) -___ +--- ### l @@ -43,7 +43,7 @@ Logic sig code [types/block.ts:212](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L212) -___ +--- ### msig @@ -55,7 +55,7 @@ Multisig signature for delegated operations [types/block.ts:216](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L216) -___ +--- ### sig diff --git a/docs/code/interfaces/types_block.MultisigSig.md b/docs/code/interfaces/types_block.MultisigSig.md index ab7a923..2d54435 100644 --- a/docs/code/interfaces/types_block.MultisigSig.md +++ b/docs/code/interfaces/types_block.MultisigSig.md @@ -22,7 +22,7 @@ https://github.com/algorand/go-algorand/blob/master/crypto/multisig.go#L36 ### subsig -• **subsig**: \{ `pk`: `Uint8Array` ; `s?`: `Uint8Array` }[] +• **subsig**: \{ `pk`: `Uint8Array` ; `s?`: `Uint8Array` }[] Sub-signatures @@ -30,7 +30,7 @@ Sub-signatures [types/block.ts:230](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L230) -___ +--- ### thr @@ -42,7 +42,7 @@ Multisig threshold [types/block.ts:228](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L228) -___ +--- ### v diff --git a/docs/code/interfaces/types_block.StateProof.md b/docs/code/interfaces/types_block.StateProof.md index f0bd125..0bc402d 100644 --- a/docs/code/interfaces/types_block.StateProof.md +++ b/docs/code/interfaces/types_block.StateProof.md @@ -24,18 +24,18 @@ #### Type declaration -| Name | Type | -| :------ | :------ | -| `hsh` | \{ `t`: `number` } | -| `hsh.t` | `number` | -| `pth` | `Uint8Array`[] | -| `td` | `number` | +| Name | Type | +| :------ | :----------------- | +| `hsh` | \{ `t`: `number` } | +| `hsh.t` | `number` | +| `pth` | `Uint8Array`[] | +| `td` | `number` | #### Defined in [types/block.ts:272](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L272) -___ +--- ### S @@ -43,18 +43,18 @@ ___ #### Type declaration -| Name | Type | -| :------ | :------ | -| `hsh` | \{ `t`: `number` } | -| `hsh.t` | `number` | -| `pth` | `Uint8Array`[] | -| `td` | `number` | +| Name | Type | +| :------ | :----------------- | +| `hsh` | \{ `t`: `number` } | +| `hsh.t` | `number` | +| `pth` | `Uint8Array`[] | +| `td` | `number` | #### Defined in [types/block.ts:289](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L289) -___ +--- ### c @@ -64,7 +64,7 @@ ___ [types/block.ts:271](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L271) -___ +--- ### pr @@ -74,17 +74,17 @@ ___ [types/block.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L273) -___ +--- ### r -• **r**: `Map`\<`number`, \{ `p`: \{ `p`: \{ `cmt`: `Uint8Array` ; `lf`: `number` } ; `w`: `bigint` } ; `s`: \{ `l?`: `bigint` ; `s`: \{ `idx`: `number` ; `prf`: \{ `hsh`: \{ `t`: `number` } ; `pth`: `Uint8Array`[] ; `td`: `number` } ; `sig`: `Uint8Array` ; `vkey`: \{ `k`: `Uint8Array` } } } }\> +• **r**: `Map`\<`number`, \{ `p`: \{ `p`: \{ `cmt`: `Uint8Array` ; `lf`: `number` } ; `w`: `bigint` } ; `s`: \{ `l?`: `bigint` ; `s`: \{ `idx`: `number` ; `prf`: \{ `hsh`: \{ `t`: `number` } ; `pth`: `Uint8Array`[] ; `td`: `number` } ; `sig`: `Uint8Array` ; `vkey`: \{ `k`: `Uint8Array` } } } }\> #### Defined in [types/block.ts:274](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L274) -___ +--- ### v @@ -94,7 +94,7 @@ ___ [types/block.ts:291](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L291) -___ +--- ### w diff --git a/docs/code/interfaces/types_block.StateProofMessage.md b/docs/code/interfaces/types_block.StateProofMessage.md index 3b07c36..e0975ad 100644 --- a/docs/code/interfaces/types_block.StateProofMessage.md +++ b/docs/code/interfaces/types_block.StateProofMessage.md @@ -24,7 +24,7 @@ [types/block.ts:298](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L298) -___ +--- ### b @@ -34,7 +34,7 @@ ___ [types/block.ts:295](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L295) -___ +--- ### f @@ -44,7 +44,7 @@ ___ [types/block.ts:296](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L296) -___ +--- ### l @@ -54,7 +54,7 @@ ___ [types/block.ts:297](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L297) -___ +--- ### v diff --git a/docs/code/interfaces/types_block.StateProofTracking.md b/docs/code/interfaces/types_block.StateProofTracking.md index f29c470..fc32980 100644 --- a/docs/code/interfaces/types_block.StateProofTracking.md +++ b/docs/code/interfaces/types_block.StateProofTracking.md @@ -24,7 +24,7 @@ StateProofNextRound is the next round for which we will accept a StateProof tran [types/block.ts:317](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L317) -___ +--- ### t @@ -38,14 +38,14 @@ This is intended for computing the threshold of votes to expect from StateProofV [types/block.ts:313](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L313) -___ +--- ### v • `Optional` **v**: `string` StateProofVotersCommitment is the root of a vector commitment containing the -online accounts that will help sign a state proof. The VC root, and the state proof, +online accounts that will help sign a state proof. The VC root, and the state proof, happen on blocks that are a multiple of ConsensusParams.StateProofRounds. For blocks that are not a multiple of ConsensusParams.StateProofRounds, this value is zero. diff --git a/docs/code/interfaces/types_block.TransactionInBlock.md b/docs/code/interfaces/types_block.TransactionInBlock.md index fc84550..326ce4f 100644 --- a/docs/code/interfaces/types_block.TransactionInBlock.md +++ b/docs/code/interfaces/types_block.TransactionInBlock.md @@ -42,7 +42,7 @@ The asset close amount if the sender asset position was closed from this transac [types/block.ts:385](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L385) -___ +--- ### blockTransaction @@ -54,7 +54,7 @@ The block data for the transaction [types/block.ts:327](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L327) -___ +--- ### closeAmount @@ -66,7 +66,7 @@ The ALGO close amount if the sender account was closed from this transaction. [types/block.ts:387](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L387) -___ +--- ### closeRewards @@ -78,7 +78,7 @@ Rewards in microalgos applied to the close remainder to account. [types/block.ts:391](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L391) -___ +--- ### createdAppId @@ -90,7 +90,7 @@ The app ID if an app was created from this transaction. [types/block.ts:383](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L383) -___ +--- ### createdAssetId @@ -102,7 +102,7 @@ The asset ID if an asset was created from this transaction. [types/block.ts:381](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L381) -___ +--- ### genesisHash @@ -114,7 +114,7 @@ The binary genesis hash of the network the transaction is within. [types/block.ts:368](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L368) -___ +--- ### genesisId @@ -126,7 +126,7 @@ The string genesis ID of the network the transaction is within. [types/block.ts:370](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L370) -___ +--- ### logs @@ -138,7 +138,7 @@ Any logs that were issued as a result of this transaction. [types/block.ts:389](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L389) -___ +--- ### parentOffset @@ -149,19 +149,14 @@ The offset within the parent transaction. **`Example`** ```ts -- `undefined` - - `undefined` - - 0 - - 1 - - 2 - - `undefined` +;-`undefined` - `undefined` - 0 - 1 - 2 - `undefined` ``` #### Defined in [types/block.ts:366](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L366) -___ +--- ### parentTransactionId @@ -173,7 +168,7 @@ The ID of the parent transaction if this is an inner transaction. [types/block.ts:354](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L354) -___ +--- ### receiverRewards @@ -185,7 +180,7 @@ Rewards in microalgos applied to the receiver account. [types/block.ts:395](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L395) -___ +--- ### roundIndex @@ -196,19 +191,14 @@ The index within the block.txns array of this transaction or if it's an inner tr **`Example`** ```ts -- 0 - - 1 - - 1 - - 1 - - 1 - - 2 +;-0 - 1 - 1 - 1 - 1 - 2 ``` #### Defined in [types/block.ts:350](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L350) -___ +--- ### roundNumber @@ -220,7 +210,7 @@ The round number of the block the transaction is within. [types/block.ts:372](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L372) -___ +--- ### roundOffset @@ -231,19 +221,14 @@ The offset of the transaction within the round including inner transactions. **`Example`** ```ts -- 0 - - 1 - - 2 - - 3 - - 4 - - 5 +;-0 - 1 - 2 - 3 - 4 - 5 ``` #### Defined in [types/block.ts:338](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L338) -___ +--- ### roundTimestamp @@ -255,7 +240,7 @@ The round unix timestamp of the block the transaction is within. [types/block.ts:374](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L374) -___ +--- ### senderRewards @@ -267,7 +252,7 @@ Rewards in microalgos applied to the sender account. [types/block.ts:393](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L393) -___ +--- ### transaction diff --git a/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md b/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md index 8f9c531..96458ce 100644 --- a/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md +++ b/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md @@ -41,7 +41,7 @@ Any ARC-28 event definitions to process from app call logs [types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) -___ +--- ### filters @@ -57,7 +57,7 @@ The set of filters to subscribe to / emit events for, along with optional data m [types/subscription.ts:363](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L363) -___ +--- ### frequencyInSeconds @@ -69,7 +69,7 @@ The frequency to poll for new blocks in seconds; defaults to 1s [types/subscription.ts:365](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L365) -___ +--- ### maxIndexerRoundsToSync @@ -92,7 +92,7 @@ boundary based on the number of rounds specified here. [types/subscription.ts:255](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L255) -___ +--- ### maxRoundsToSync @@ -114,28 +114,29 @@ your catchup speed when using `sync-oldest`. [types/subscription.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L244) -___ +--- ### syncBehaviour -• **syncBehaviour**: ``"skip-sync-newest"`` \| ``"sync-oldest"`` \| ``"sync-oldest-start-now"`` \| ``"catchup-with-indexer"`` \| ``"fail"`` +• **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. + +- `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. #### Inherited from @@ -145,7 +146,7 @@ past `watermark` then how should that be handled: [types/subscription.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L273) -___ +--- ### waitForBlockWhenAtTip @@ -157,7 +158,7 @@ Whether to wait via algod `/status/wait-for-block-after` endpoint when at the ti [types/subscription.ts:367](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L367) -___ +--- ### watermarkPersistence @@ -168,10 +169,10 @@ its position in the chain #### Type declaration -| Name | Type | Description | -| :------ | :------ | :------ | -| `get` | () => `Promise`\<`number`\> | - | -| `set` | (`newWatermark`: `number`) => `Promise`\<`void`\> | - | +| Name | Type | Description | +| :---- | :------------------------------------------------ | :---------- | +| `get` | () => `Promise`\<`number`\> | - | +| `set` | (`newWatermark`: `number`) => `Promise`\<`void`\> | - | #### Defined in diff --git a/docs/code/interfaces/types_subscription.BalanceChange.md b/docs/code/interfaces/types_subscription.BalanceChange.md index 5893eab..d64aa57 100644 --- a/docs/code/interfaces/types_subscription.BalanceChange.md +++ b/docs/code/interfaces/types_subscription.BalanceChange.md @@ -27,7 +27,7 @@ The address that the balance change is for. [types/subscription.ts:177](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L177) -___ +--- ### amount @@ -39,7 +39,7 @@ The amount of the balance change in smallest divisible unit or microAlgos. [types/subscription.ts:181](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L181) -___ +--- ### assetId @@ -51,7 +51,7 @@ The asset ID of the balance change, or 0 for Algos. [types/subscription.ts:179](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L179) -___ +--- ### roles diff --git a/docs/code/interfaces/types_subscription.BeforePollMetadata.md b/docs/code/interfaces/types_subscription.BeforePollMetadata.md index 1e48134..d4b5e2c 100644 --- a/docs/code/interfaces/types_subscription.BeforePollMetadata.md +++ b/docs/code/interfaces/types_subscription.BeforePollMetadata.md @@ -25,7 +25,7 @@ The current round of algod [types/subscription.ts:207](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L207) -___ +--- ### watermark diff --git a/docs/code/interfaces/types_subscription.BlockMetadata.md b/docs/code/interfaces/types_subscription.BlockMetadata.md index ce1fe18..1c69183 100644 --- a/docs/code/interfaces/types_subscription.BlockMetadata.md +++ b/docs/code/interfaces/types_subscription.BlockMetadata.md @@ -40,7 +40,7 @@ Full count of transactions and inner transactions (recursively) in this block. [types/subscription.ts:53](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L53) -___ +--- ### genesisHash @@ -52,7 +52,7 @@ The base64 genesis hash of the chain. [types/subscription.ts:43](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L43) -___ +--- ### genesisId @@ -64,7 +64,7 @@ The genesis ID of the chain. [types/subscription.ts:41](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L41) -___ +--- ### hash @@ -76,7 +76,7 @@ The base64 block hash. [types/subscription.ts:35](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L35) -___ +--- ### parentTransactionCount @@ -88,7 +88,7 @@ Count of parent transactions in this block [types/subscription.ts:51](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L51) -___ +--- ### participationUpdates @@ -100,7 +100,7 @@ Participation account data that needs to be checked/acted on by the network. [types/subscription.ts:68](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L68) -___ +--- ### previousBlockHash @@ -112,7 +112,7 @@ The base64 previous block hash. [types/subscription.ts:45](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L45) -___ +--- ### rewards @@ -124,7 +124,7 @@ Fields relating to rewards [types/subscription.ts:49](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L49) -___ +--- ### round @@ -136,7 +136,7 @@ The round of the block. [types/subscription.ts:37](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L37) -___ +--- ### seed @@ -148,7 +148,7 @@ The base64 seed of the block. [types/subscription.ts:47](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L47) -___ +--- ### stateProofTracking @@ -160,7 +160,7 @@ Tracks the status of state proofs. [types/subscription.ts:64](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L64) -___ +--- ### timestamp @@ -172,20 +172,20 @@ Block creation timestamp in seconds since epoch [types/subscription.ts:39](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L39) -___ +--- ### transactionsRoot • **transactionsRoot**: `string` TransactionsRoot 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}=)?$" +Pattern : "^(?:[A-Za-z0-9+/]{4})\*(?:[A-Za-z0-9+/]{2}==\|[A-Za-z0-9+/]{3}=)?$" #### Defined in [types/subscription.ts:58](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L58) -___ +--- ### transactionsRootSha256 @@ -197,19 +197,19 @@ TransactionsRootSHA256 is an auxiliary TransactionRoot, built using a vector com [types/subscription.ts:60](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L60) -___ +--- ### txnCounter • **txnCounter**: `number` -Number 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). +Number 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). #### Defined in [types/subscription.ts:55](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L55) -___ +--- ### upgradeState @@ -221,7 +221,7 @@ Fields relating to a protocol upgrade. [types/subscription.ts:62](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L62) -___ +--- ### upgradeVote diff --git a/docs/code/interfaces/types_subscription.BlockRewards.md b/docs/code/interfaces/types_subscription.BlockRewards.md index c65291a..958fded 100644 --- a/docs/code/interfaces/types_subscription.BlockRewards.md +++ b/docs/code/interfaces/types_subscription.BlockRewards.md @@ -27,7 +27,7 @@ FeeSink is an address that accepts transaction fees, it can only spend to the in [types/subscription.ts:73](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L73) -___ +--- ### rewardsCalculationRound @@ -39,7 +39,7 @@ number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos [types/subscription.ts:75](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L75) -___ +--- ### rewardsLevel @@ -51,7 +51,7 @@ How many rewards, in MicroAlgos, have been distributed to each RewardUnit of Mic [types/subscription.ts:77](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L77) -___ +--- ### rewardsPool @@ -63,7 +63,7 @@ RewardsPool is an address that accepts periodic injections from the fee-sink and [types/subscription.ts:79](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L79) -___ +--- ### rewardsRate @@ -75,7 +75,7 @@ Number of new MicroAlgos added to the participation stake from rewards at the ne [types/subscription.ts:81](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L81) -___ +--- ### rewardsResidue diff --git a/docs/code/interfaces/types_subscription.BlockStateProofTracking.md b/docs/code/interfaces/types_subscription.BlockStateProofTracking.md index e2ba325..ad8bd07 100644 --- a/docs/code/interfaces/types_subscription.BlockStateProofTracking.md +++ b/docs/code/interfaces/types_subscription.BlockStateProofTracking.md @@ -25,7 +25,7 @@ [types/subscription.ts:103](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L103) -___ +--- ### onlineTotalWeight @@ -38,7 +38,7 @@ StateProof round. [types/subscription.ts:109](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L109) -___ +--- ### type @@ -50,7 +50,7 @@ State Proof Type. Note the raw object uses map with this as key. [types/subscription.ts:114](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L114) -___ +--- ### votersCommitment diff --git a/docs/code/interfaces/types_subscription.BlockUpgradeState.md b/docs/code/interfaces/types_subscription.BlockUpgradeState.md index 1e78cbb..e0acfd5 100644 --- a/docs/code/interfaces/types_subscription.BlockUpgradeState.md +++ b/docs/code/interfaces/types_subscription.BlockUpgradeState.md @@ -26,7 +26,7 @@ Current protocol version [types/subscription.ts:88](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L88) -___ +--- ### nextProtocol @@ -38,7 +38,7 @@ The next proposed protocol version. [types/subscription.ts:90](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L90) -___ +--- ### nextProtocolApprovals @@ -50,7 +50,7 @@ Number of blocks which approved the protocol upgrade. [types/subscription.ts:92](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L92) -___ +--- ### nextProtocolSwitchOn @@ -62,7 +62,7 @@ Round on which the protocol upgrade will take effect. [types/subscription.ts:96](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L96) -___ +--- ### nextProtocolVoteBefore diff --git a/docs/code/interfaces/types_subscription.BlockUpgradeVote.md b/docs/code/interfaces/types_subscription.BlockUpgradeVote.md index 3eac5a5..9cd8cea 100644 --- a/docs/code/interfaces/types_subscription.BlockUpgradeVote.md +++ b/docs/code/interfaces/types_subscription.BlockUpgradeVote.md @@ -24,7 +24,7 @@ [types/subscription.ts:127](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L127) -___ +--- ### upgradeDelay @@ -36,7 +36,7 @@ ___ [types/subscription.ts:132](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L132) -___ +--- ### upgradePropose diff --git a/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md b/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md index 580511b..41eedd0 100644 --- a/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md +++ b/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md @@ -36,7 +36,7 @@ Any ARC-28 event definitions to process from app call logs [types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) -___ +--- ### filters @@ -48,26 +48,29 @@ A list of filters with corresponding names. **`Example`** ```typescript - filter: [{ - name: 'asset-transfers', - filter: { - type: TransactionType.axfer, - //... - } - }, { - name: 'payments', - filter: { - type: TransactionType.pay, - //... - } - }] +filter: [ + { + name: 'asset-transfers', + filter: { + type: TransactionType.axfer, + //... + }, + }, + { + name: 'payments', + filter: { + type: TransactionType.pay, + //... + }, + }, +] ``` #### Defined in [types/subscription.ts:233](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L233) -___ +--- ### maxIndexerRoundsToSync @@ -86,7 +89,7 @@ boundary based on the number of rounds specified here. [types/subscription.ts:255](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L255) -___ +--- ### maxRoundsToSync @@ -104,28 +107,29 @@ your catchup speed when using `sync-oldest`. [types/subscription.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L244) -___ +--- ### syncBehaviour -• **syncBehaviour**: ``"skip-sync-newest"`` \| ``"sync-oldest"`` \| ``"sync-oldest-start-now"`` \| ``"catchup-with-indexer"`` \| ``"fail"`` +• **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. + +- `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. #### Defined in diff --git a/docs/code/interfaces/types_subscription.NamedTransactionFilter.md b/docs/code/interfaces/types_subscription.NamedTransactionFilter.md index 1036e5d..34a28f0 100644 --- a/docs/code/interfaces/types_subscription.NamedTransactionFilter.md +++ b/docs/code/interfaces/types_subscription.NamedTransactionFilter.md @@ -31,7 +31,7 @@ The filter itself. [types/subscription.ts:281](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L281) -___ +--- ### name diff --git a/docs/code/interfaces/types_subscription.ParticipationUpdates.md b/docs/code/interfaces/types_subscription.ParticipationUpdates.md index 912a116..b93bf3e 100644 --- a/docs/code/interfaces/types_subscription.ParticipationUpdates.md +++ b/docs/code/interfaces/types_subscription.ParticipationUpdates.md @@ -23,7 +23,7 @@ [types/subscription.ts:144](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L144) -___ +--- ### expiredParticipationAccounts diff --git a/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md b/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md index 8dc6489..9c0d6e5 100644 --- a/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md +++ b/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md @@ -9,8 +9,8 @@ A single event to subscribe to / emit. ## Type parameters | Name | -| :------ | -| `T` | +| :--- | +| `T` | ## Hierarchy @@ -42,7 +42,7 @@ The filter itself. [types/subscription.ts:281](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L281) -___ +--- ### mapper @@ -60,8 +60,8 @@ Note: if you provide multiple filters with the same name then only the mapper of ##### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------ | :---------------------------------------------------------------------------------- | | `transaction` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction)[] | ##### Returns @@ -72,7 +72,7 @@ Note: if you provide multiple filters with the same name then only the mapper of [types/subscription.ts:386](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L386) -___ +--- ### name diff --git a/docs/code/interfaces/types_subscription.TransactionFilter.md b/docs/code/interfaces/types_subscription.TransactionFilter.md index 5bbb10c..de86059 100644 --- a/docs/code/interfaces/types_subscription.TransactionFilter.md +++ b/docs/code/interfaces/types_subscription.TransactionFilter.md @@ -41,8 +41,8 @@ Filter to app transactions that meet the given app arguments predicate. ##### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------------ | :------------- | | `appCallArguments?` | `Uint8Array`[] | ##### Returns @@ -53,7 +53,7 @@ Filter to app transactions that meet the given app arguments predicate. [types/subscription.ts:314](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L314) -___ +--- ### appCreate @@ -65,7 +65,7 @@ Filter to transactions that are creating an app. [types/subscription.ts:297](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L297) -___ +--- ### appId @@ -77,7 +77,7 @@ Filter to transactions against the app with the given ID(s). [types/subscription.ts:295](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L295) -___ +--- ### appOnComplete @@ -89,11 +89,11 @@ Filter to transactions that have given on complete(s). [types/subscription.ts:299](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L299) -___ +--- ### arc28Events -• `Optional` **arc28Events**: \{ `eventName`: `string` ; `groupName`: `string` }[] +• `Optional` **arc28Events**: \{ `eventName`: `string` ; `groupName`: `string` }[] 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`. @@ -102,7 +102,7 @@ Note: the definitions for these events must be passed in to the subscription con [types/subscription.ts:318](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L318) -___ +--- ### assetCreate @@ -114,7 +114,7 @@ Filter to transactions that are creating an asset. [types/subscription.ts:303](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L303) -___ +--- ### assetId @@ -126,11 +126,11 @@ Filter to transactions against the asset with the given ID(s). [types/subscription.ts:301](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L301) -___ +--- ### balanceChanges -• `Optional` **balanceChanges**: \{ `address?`: `string` \| `string`[] ; `assetId?`: `number` \| `bigint` \| `number`[] \| `bigint`[] ; `maxAbsoluteAmount?`: `number` \| `bigint` ; `maxAmount?`: `number` \| `bigint` ; `minAbsoluteAmount?`: `number` \| `bigint` ; `minAmount?`: `number` \| `bigint` ; `role?`: [`BalanceChangeRole`](../enums/types_subscription.BalanceChangeRole.md) \| [`BalanceChangeRole`](../enums/types_subscription.BalanceChangeRole.md)[] }[] +• `Optional` **balanceChanges**: \{ `address?`: `string` \| `string`[] ; `assetId?`: `number` \| `bigint` \| `number`[] \| `bigint`[] ; `maxAbsoluteAmount?`: `number` \| `bigint` ; `maxAmount?`: `number` \| `bigint` ; `minAbsoluteAmount?`: `number` \| `bigint` ; `minAmount?`: `number` \| `bigint` ; `role?`: [`BalanceChangeRole`](../enums/types_subscription.BalanceChangeRole.md) \| [`BalanceChangeRole`](../enums/types_subscription.BalanceChangeRole.md)[] }[] Filter to transactions that result in balance changes that match one or more of the given set of balance changes. @@ -138,7 +138,7 @@ Filter to transactions that result in balance changes that match one or more of [types/subscription.ts:320](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L320) -___ +--- ### customFilter @@ -152,8 +152,8 @@ Catch-all custom filter to filter for things that the rest of the filters don't ##### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------------ | :-------------------------------------------------------------------------------- | | `transaction` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | ##### Returns @@ -164,7 +164,7 @@ Catch-all custom filter to filter for things that the rest of the filters don't [types/subscription.ts:337](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L337) -___ +--- ### maxAmount @@ -177,7 +177,7 @@ or equal to the given maximum (microAlgos or decimal units of an ASA if type: ax [types/subscription.ts:309](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L309) -___ +--- ### methodSignature @@ -190,7 +190,7 @@ the given method signature as the first app argument. [types/subscription.ts:312](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L312) -___ +--- ### minAmount @@ -203,7 +203,7 @@ than or equal to the given minimum (microAlgos or decimal units of an ASA if typ [types/subscription.ts:306](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L306) -___ +--- ### notePrefix @@ -215,7 +215,7 @@ Filter to transactions with a note having the given prefix. [types/subscription.ts:293](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L293) -___ +--- ### receiver @@ -227,7 +227,7 @@ Filter to transactions being received by the specified address(es). [types/subscription.ts:291](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L291) -___ +--- ### sender @@ -239,7 +239,7 @@ Filter to transactions sent from the specified address(es). [types/subscription.ts:289](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L289) -___ +--- ### type diff --git a/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md b/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md index b57a666..bf79461 100644 --- a/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md +++ b/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md @@ -40,7 +40,7 @@ Any ARC-28 event definitions to process from app call logs [types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) -___ +--- ### currentRound @@ -53,7 +53,7 @@ If not provided, it will be resolved on demand. [types/subscription.ts:357](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L357) -___ +--- ### filters @@ -65,19 +65,22 @@ A list of filters with corresponding names. **`Example`** ```typescript - filter: [{ - name: 'asset-transfers', - filter: { - type: TransactionType.axfer, - //... - } - }, { - name: 'payments', - filter: { - type: TransactionType.pay, - //... - } - }] +filter: [ + { + name: 'asset-transfers', + filter: { + type: TransactionType.axfer, + //... + }, + }, + { + name: 'payments', + filter: { + type: TransactionType.pay, + //... + }, + }, +] ``` #### Inherited from @@ -88,7 +91,7 @@ A list of filters with corresponding names. [types/subscription.ts:233](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L233) -___ +--- ### maxIndexerRoundsToSync @@ -111,7 +114,7 @@ boundary based on the number of rounds specified here. [types/subscription.ts:255](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L255) -___ +--- ### maxRoundsToSync @@ -133,28 +136,29 @@ your catchup speed when using `sync-oldest`. [types/subscription.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L244) -___ +--- ### syncBehaviour -• **syncBehaviour**: ``"skip-sync-newest"`` \| ``"sync-oldest"`` \| ``"sync-oldest-start-now"`` \| ``"catchup-with-indexer"`` \| ``"fail"`` +• **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. + +- `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. #### Inherited from @@ -164,7 +168,7 @@ past `watermark` then how should that be handled: [types/subscription.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L273) -___ +--- ### watermark diff --git a/docs/code/interfaces/types_subscription.TransactionSubscriptionResult.md b/docs/code/interfaces/types_subscription.TransactionSubscriptionResult.md index 2282317..54403dc 100644 --- a/docs/code/interfaces/types_subscription.TransactionSubscriptionResult.md +++ b/docs/code/interfaces/types_subscription.TransactionSubscriptionResult.md @@ -30,7 +30,7 @@ of the subscription poll. [types/subscription.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L29) -___ +--- ### currentRound @@ -42,7 +42,7 @@ The current detected tip of the configured Algorand blockchain. [types/subscription.ts:11](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L11) -___ +--- ### newWatermark @@ -58,7 +58,7 @@ subscribed transactions to keep it reliable. [types/subscription.ts:19](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L19) -___ +--- ### startingWatermark @@ -70,7 +70,7 @@ The watermark value that was retrieved at the start of the subscription poll. [types/subscription.ts:13](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L13) -___ +--- ### subscribedTransactions @@ -85,7 +85,7 @@ to represent the data with some additional fields. [types/subscription.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L25) -___ +--- ### syncedRoundRange diff --git a/docs/code/modules/index.md b/docs/code/modules/index.md index 02cc148..8fb9dd1 100644 --- a/docs/code/modules/index.md +++ b/docs/code/modules/index.md @@ -23,11 +23,11 @@ blockchain for the given subscription context. #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `subscription` | [`TransactionSubscriptionParams`](../interfaces/types_subscription.TransactionSubscriptionParams.md) | The subscription context. | -| `algod` | `default` | An Algod client. | -| `indexer?` | `default` | An optional indexer client, only needed when `onMaxRounds` is `catchup-with-indexer`. | +| Name | Type | Description | +| :------------- | :--------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------ | +| `subscription` | [`TransactionSubscriptionParams`](../interfaces/types_subscription.TransactionSubscriptionParams.md) | The subscription context. | +| `algod` | `default` | An Algod client. | +| `indexer?` | `default` | An optional indexer client, only needed when `onMaxRounds` is `catchup-with-indexer`. | #### Returns diff --git a/docs/code/modules/types.md b/docs/code/modules/types.md index 7016363..9860e0a 100644 --- a/docs/code/modules/types.md +++ b/docs/code/modules/types.md @@ -52,229 +52,229 @@ Re-exports [AlgorandSubscriberConfig](../interfaces/types_subscription.AlgorandSubscriberConfig.md) -___ +--- ### Arc28Event Re-exports [Arc28Event](../interfaces/types_arc_28.Arc28Event.md) -___ +--- ### Arc28EventGroup Re-exports [Arc28EventGroup](../interfaces/types_arc_28.Arc28EventGroup.md) -___ +--- ### Arc28EventToProcess Re-exports [Arc28EventToProcess](../interfaces/types_arc_28.Arc28EventToProcess.md) -___ +--- ### AsyncEventEmitter Re-exports [AsyncEventEmitter](../classes/types_async_event_emitter.AsyncEventEmitter.md) -___ +--- ### AsyncEventListener Re-exports [AsyncEventListener](types_async_event_emitter.md#asynceventlistener) -___ +--- ### BalanceChange Re-exports [BalanceChange](../interfaces/types_subscription.BalanceChange.md) -___ +--- ### BalanceChangeRole Re-exports [BalanceChangeRole](../enums/types_subscription.BalanceChangeRole.md) -___ +--- ### BeforePollMetadata Re-exports [BeforePollMetadata](../interfaces/types_subscription.BeforePollMetadata.md) -___ +--- ### Block Re-exports [Block](../interfaces/types_block.Block.md) -___ +--- ### BlockAgreementCertificate Re-exports [BlockAgreementCertificate](../interfaces/types_block.BlockAgreementCertificate.md) -___ +--- ### BlockData Re-exports [BlockData](../interfaces/types_block.BlockData.md) -___ +--- ### BlockInnerTransaction Re-exports [BlockInnerTransaction](types_block.md#blockinnertransaction) -___ +--- ### BlockMetadata Re-exports [BlockMetadata](../interfaces/types_subscription.BlockMetadata.md) -___ +--- ### BlockRewards Re-exports [BlockRewards](../interfaces/types_subscription.BlockRewards.md) -___ +--- ### BlockStateProofTracking Re-exports [BlockStateProofTracking](../interfaces/types_subscription.BlockStateProofTracking.md) -___ +--- ### BlockTransaction Re-exports [BlockTransaction](../interfaces/types_block.BlockTransaction.md) -___ +--- ### BlockTransactionEvalDelta Re-exports [BlockTransactionEvalDelta](../interfaces/types_block.BlockTransactionEvalDelta.md) -___ +--- ### BlockUpgradeState Re-exports [BlockUpgradeState](../interfaces/types_subscription.BlockUpgradeState.md) -___ +--- ### BlockUpgradeVote Re-exports [BlockUpgradeVote](../interfaces/types_subscription.BlockUpgradeVote.md) -___ +--- ### BlockValueDelta Re-exports [BlockValueDelta](../interfaces/types_block.BlockValueDelta.md) -___ +--- ### BlockVote Re-exports [BlockVote](../interfaces/types_block.BlockVote.md) -___ +--- ### CoreTransactionSubscriptionParams Re-exports [CoreTransactionSubscriptionParams](../interfaces/types_subscription.CoreTransactionSubscriptionParams.md) -___ +--- ### EmittedArc28Event Re-exports [EmittedArc28Event](../interfaces/types_arc_28.EmittedArc28Event.md) -___ +--- ### ErrorListener Re-exports [ErrorListener](types_subscription.md#errorlistener) -___ +--- ### LogicSig Re-exports [LogicSig](../interfaces/types_block.LogicSig.md) -___ +--- ### MultisigSig Re-exports [MultisigSig](../interfaces/types_block.MultisigSig.md) -___ +--- ### NamedTransactionFilter Re-exports [NamedTransactionFilter](../interfaces/types_subscription.NamedTransactionFilter.md) -___ +--- ### ParticipationUpdates Re-exports [ParticipationUpdates](../interfaces/types_subscription.ParticipationUpdates.md) -___ +--- ### StateProof Re-exports [StateProof](../interfaces/types_block.StateProof.md) -___ +--- ### StateProofMessage Re-exports [StateProofMessage](../interfaces/types_block.StateProofMessage.md) -___ +--- ### StateProofTracking Re-exports [StateProofTracking](../interfaces/types_block.StateProofTracking.md) -___ +--- ### SubscribedTransaction Re-exports [SubscribedTransaction](types_subscription.md#subscribedtransaction) -___ +--- ### SubscriberConfigFilter Re-exports [SubscriberConfigFilter](../interfaces/types_subscription.SubscriberConfigFilter.md) -___ +--- ### TransactionFilter Re-exports [TransactionFilter](../interfaces/types_subscription.TransactionFilter.md) -___ +--- ### TransactionInBlock Re-exports [TransactionInBlock](../interfaces/types_block.TransactionInBlock.md) -___ +--- ### TransactionSubscriptionParams Re-exports [TransactionSubscriptionParams](../interfaces/types_subscription.TransactionSubscriptionParams.md) -___ +--- ### TransactionSubscriptionResult Re-exports [TransactionSubscriptionResult](../interfaces/types_subscription.TransactionSubscriptionResult.md) -___ +--- ### TypedAsyncEventListener diff --git a/docs/code/modules/types_async_event_emitter.md b/docs/code/modules/types_async_event_emitter.md index 013d19a..3f7bf3a 100644 --- a/docs/code/modules/types_async_event_emitter.md +++ b/docs/code/modules/types_async_event_emitter.md @@ -26,9 +26,9 @@ An asynchronous event listener ##### Parameters -| Name | Type | -| :------ | :------ | -| `event` | `unknown` | +| Name | Type | +| :---------- | :------------------- | +| `event` | `unknown` | | `eventName` | `string` \| `symbol` | ##### Returns diff --git a/docs/code/modules/types_block.md b/docs/code/modules/types_block.md index 636356b..593a169 100644 --- a/docs/code/modules/types_block.md +++ b/docs/code/modules/types_block.md @@ -28,7 +28,7 @@ ### BlockInnerTransaction -Ƭ **BlockInnerTransaction**: `Omit`\<[`BlockTransaction`](../interfaces/types_block.BlockTransaction.md), ``"hgi"`` \| ``"hgh"``\> +Ƭ **BlockInnerTransaction**: `Omit`\<[`BlockTransaction`](../interfaces/types_block.BlockTransaction.md), `"hgi"` \| `"hgh"`\> Data that is returned in a raw Algorand block for a single inner transaction diff --git a/docs/code/modules/types_subscription.md b/docs/code/modules/types_subscription.md index c20601e..5a08980 100644 --- a/docs/code/modules/types_subscription.md +++ b/docs/code/modules/types_subscription.md @@ -44,8 +44,8 @@ ##### Parameters -| Name | Type | -| :------ | :------ | +| Name | Type | +| :------ | :-------- | | `error` | `unknown` | ##### Returns @@ -56,25 +56,26 @@ [types/subscription.ts:391](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L391) -___ +--- ### SubscribedTransaction -Ƭ **SubscribedTransaction**: `TransactionResult` & \{ `arc28Events?`: [`EmittedArc28Event`](../interfaces/types_arc_28.EmittedArc28Event.md)[] ; `balanceChanges?`: [`BalanceChange`](../interfaces/types_subscription.BalanceChange.md)[] ; `filtersMatched?`: `string`[] ; `inner-txns?`: [`SubscribedTransaction`](types_subscription.md#subscribedtransaction)[] ; `parentTransactionId?`: `string` } +Ƭ **SubscribedTransaction**: `TransactionResult` & \{ `arc28Events?`: [`EmittedArc28Event`](../interfaces/types_arc_28.EmittedArc28Event.md)[] ; `balanceChanges?`: [`BalanceChange`](../interfaces/types_subscription.BalanceChange.md)[] ; `filtersMatched?`: `string`[] ; `inner-txns?`: [`SubscribedTransaction`](types_subscription.md#subscribedtransaction)[] ; `parentTransactionId?`: `string` } The common model used to expose a transaction that is returned from a subscription. -Substantively, based on the Indexer [`TransactionResult` model](https://developer.algorand.org/docs/rest-apis/indexer/#transaction) 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 +Substantively, based on the Indexer [`TransactionResult` model](https://developer.algorand.org/docs/rest-apis/indexer/#transaction) 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 #### Defined in [types/subscription.ts:161](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L161) -___ +--- ### TypedAsyncEventListener @@ -83,8 +84,8 @@ ___ #### Type parameters | Name | -| :------ | -| `T` | +| :--- | +| `T` | #### Type declaration @@ -92,9 +93,9 @@ ___ ##### Parameters -| Name | Type | -| :------ | :------ | -| `event` | `T` | +| Name | Type | +| :---------- | :------------------- | +| `event` | `T` | | `eventName` | `string` \| `symbol` | ##### Returns diff --git a/src/transform.ts b/src/transform.ts index 38542d6..a00ae9f 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -1,4 +1,4 @@ -import type { EvalDelta, MultisigTransactionSubSignature, TransactionResult } from '@algorandfoundation/algokit-utils/types/indexer' +import type { MultisigTransactionSubSignature, TransactionResult } from '@algorandfoundation/algokit-utils/types/indexer' import { ApplicationOnComplete, StateProofTransactionResult } from '@algorandfoundation/algokit-utils/types/indexer' import * as msgpack from 'algorand-msgpack' import algosdk from 'algosdk' @@ -554,46 +554,34 @@ export function getIndexerTransactionFromAlgodTransaction( 'receiver-rewards': receiverRewards, 'sender-rewards': senderRewards, 'global-state-delta': blockTransaction.dt?.gd - ? (Object.entries(blockTransaction.dt.gd).map(([key, value]) => ({ + ? Object.entries(blockTransaction.dt.gd).map(([key, value]) => ({ key: Buffer.from(key).toString('base64'), value: { action: value.at, bytes: value.bs ? Buffer.from(value.bs).toString('base64') : undefined, - uint: value.ui, + uint: value.ui ? Number(value.ui) : undefined, }, - })) as unknown as Record[]) + })) : undefined, 'local-state-delta': blockTransaction.dt?.ld - ? (Object.entries(blockTransaction.dt.ld) - .map(([addressIndex, delta]) => { - try { - const addressList = [ - algosdk.encodeAddress(transaction.from.publicKey), - ...(transaction.appAccounts?.map((a) => algosdk.encodeAddress(a.publicKey)) || []), - ] - if (Number(addressIndex) >= addressList.length) { - throw new Error(`Address index ${addressIndex} is out of range`) - } - return { - address: addressList[Number(addressIndex)], - delta: Object.entries(delta).map(([key, value]) => ({ - key: Buffer.from(key).toString('base64'), - value: { - action: value.at, - bytes: value.bs ? Buffer.from(value.bs).toString('base64') : undefined, - uint: value.ui, - }, - })), - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - } catch (e: any) { - // eslint-disable-next-line no-console - console.error(`Error processing local state delta: ${e.message}`) - throw e - } - }) - .filter((entry) => entry !== null) as unknown as Record[]) + ? Object.entries(blockTransaction.dt.ld).map(([addressIndex, delta]) => { + const addresses = [ + algosdk.encodeAddress(transaction.from.publicKey), + ...(transaction.appAccounts?.map((a) => algosdk.encodeAddress(a.publicKey)) || []), + ] + return { + address: addresses[Number(addressIndex)], + delta: Object.entries(delta).map(([key, value]) => ({ + key: Buffer.from(key).toString('base64'), + value: { + action: value.at, + bytes: value.bs ? Buffer.from(value.bs).toString('base64') : undefined, + uint: value.ui, + }, + })), + } + }) : undefined, } // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -653,8 +641,8 @@ export function blockDataToBlockMetadata(blockData: BlockData): BlockMetadata { upgradePropose: block.upgradeprop, }, participationUpdates: { - absentParticipationAccounts: block.partupdabs ? block.partupdabs.map((addr) => algosdk.encodeAddress(addr)) : undefined, - expiredParticipationAccounts: block.partupdrmv ? block.partupdrmv.map((addr) => algosdk.encodeAddress(addr)) : undefined, + absentParticipationAccounts: block.partupdabs?.map((addr) => algosdk.encodeAddress(addr)), + expiredParticipationAccounts: block.partupdrmv?.map((addr) => algosdk.encodeAddress(addr)), }, stateProofTracking: block.spt ? Object.entries(block.spt).map(([key, value]) => ({ diff --git a/tests/scenarios/transform-complex-txn.spec.ts b/tests/scenarios/transform-complex-txn.spec.ts index d5ab06e..db27cf7 100644 --- a/tests/scenarios/transform-complex-txn.spec.ts +++ b/tests/scenarios/transform-complex-txn.spec.ts @@ -714,7 +714,7 @@ describe('Complex transaction with many nested inner transactions', () => { expect(transaction.id).toBe('HHQHASIF2YLCSUYIPE6LIMLSNLCVMQBQHF3X46SKTX6F7ZSFKFCQ') expect(transaction.id).toBe(blockTransactions[0].transaction.txID()) }) - it('Produces the correct state deltas in application transaction', async () => { + it('Produces the correct state deltas in an app call transaction', async () => { const blocks = await getBlocksBulk({ startRound: 39430981, maxRound: 39430981 }, algod) const blockTransactions = blocks.flatMap((b) => getBlockTransactions(b.block)) @@ -735,7 +735,7 @@ describe('Complex transaction with many nested inner transactions', () => { "value": { "action": 2, "bytes": undefined, - "uint": 2129702852933n, + "uint": 2129702852933, }, }, { From 671e640c97e26578eb7d10f74363ce64ca6e2288 Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Fri, 12 Jul 2024 13:54:24 +1000 Subject: [PATCH 07/10] update the utils version --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea798df..80da186 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "node": ">=18.0" }, "peerDependencies": { - "@algorandfoundation/algokit-utils": "^6.0.5", + "@algorandfoundation/algokit-utils": "6.1.0-beta.3", "algosdk": "^2.7.0" } }, @@ -59,9 +59,9 @@ } }, "node_modules/@algorandfoundation/algokit-utils": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-6.0.5.tgz", - "integrity": "sha512-/a4pD62nQ58r6JnuNFZm9KAC9D8M7JNeAYTaIuA4TwmdLeypdUA9SD8BiaLAI8aR/GLaaPEILHnSbRSlPq9GPw==", + "version": "6.1.0-beta.3", + "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-6.1.0-beta.3.tgz", + "integrity": "sha512-quDCUXlk3xmImAcWsHZfCiWWHdf3O6lvt4Yykd6Bt3G1k6khlcd28cLAv973pDibILk17l1HxC/j6PUSKvPSNg==", "peer": true, "dependencies": { "buffer": "^6.0.3" diff --git a/package.json b/package.json index 616e98e..ec24e56 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "js-sha512": "^0.9.0" }, "peerDependencies": { - "@algorandfoundation/algokit-utils": "^6.0.5", + "@algorandfoundation/algokit-utils": "6.1.0-beta.3", "algosdk": "^2.7.0" }, "overrides": { From 53a7b1bd9894cc12234ce7ad5202b1a16f66fa98 Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Fri, 12 Jul 2024 13:55:57 +1000 Subject: [PATCH 08/10] docs: update docs --- docs/code/classes/index.AlgorandSubscriber.md | 120 ++++++++---------- ...s_async_event_emitter.AsyncEventEmitter.md | 48 +++---- .../types_subscription.BalanceChangeRole.md | 18 +-- .../interfaces/types_arc_28.Arc28Event.md | 6 +- .../types_arc_28.Arc28EventGroup.md | 12 +- .../types_arc_28.Arc28EventToProcess.md | 8 +- .../types_arc_28.EmittedArc28Event.md | 12 +- docs/code/interfaces/types_block.Block.md | 54 ++++---- .../types_block.BlockAgreementCertificate.md | 24 ++-- docs/code/interfaces/types_block.BlockData.md | 2 +- .../types_block.BlockTransaction.md | 22 ++-- .../types_block.BlockTransactionEvalDelta.md | 6 +- .../interfaces/types_block.BlockValueDelta.md | 11 +- docs/code/interfaces/types_block.BlockVote.md | 10 +- docs/code/interfaces/types_block.LogicSig.md | 6 +- .../interfaces/types_block.MultisigSig.md | 6 +- .../code/interfaces/types_block.StateProof.md | 38 +++--- .../types_block.StateProofMessage.md | 8 +- .../types_block.StateProofTracking.md | 6 +- .../types_block.TransactionInBlock.md | 55 +++++--- ...s_subscription.AlgorandSubscriberConfig.md | 53 ++++---- .../types_subscription.BalanceChange.md | 6 +- .../types_subscription.BeforePollMetadata.md | 2 +- .../types_subscription.BlockMetadata.md | 36 +++--- .../types_subscription.BlockRewards.md | 10 +- ...es_subscription.BlockStateProofTracking.md | 6 +- .../types_subscription.BlockUpgradeState.md | 8 +- .../types_subscription.BlockUpgradeVote.md | 4 +- ...ption.CoreTransactionSubscriptionParams.md | 68 +++++----- ...pes_subscription.NamedTransactionFilter.md | 2 +- ...types_subscription.ParticipationUpdates.md | 2 +- ...pes_subscription.SubscriberConfigFilter.md | 12 +- .../types_subscription.TransactionFilter.md | 42 +++--- ...scription.TransactionSubscriptionParams.md | 72 +++++------ ...scription.TransactionSubscriptionResult.md | 10 +- docs/code/modules/index.md | 10 +- docs/code/modules/types.md | 76 +++++------ .../code/modules/types_async_event_emitter.md | 6 +- docs/code/modules/types_block.md | 2 +- docs/code/modules/types_subscription.md | 31 +++-- 40 files changed, 462 insertions(+), 468 deletions(-) diff --git a/docs/code/classes/index.AlgorandSubscriber.md b/docs/code/classes/index.AlgorandSubscriber.md index 0fa1b9a..aec9bcb 100644 --- a/docs/code/classes/index.AlgorandSubscriber.md +++ b/docs/code/classes/index.AlgorandSubscriber.md @@ -46,11 +46,11 @@ Create a new `AlgorandSubscriber`. #### Parameters -| Name | Type | Description | -| :--------- | :----------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------- | -| `config` | [`AlgorandSubscriberConfig`](../interfaces/types_subscription.AlgorandSubscriberConfig.md) | The subscriber configuration | -| `algod` | `default` | An algod client | -| `indexer?` | `default` | An (optional) indexer client; only needed if `subscription.syncBehaviour` is `catchup-with-indexer` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `config` | [`AlgorandSubscriberConfig`](../interfaces/types_subscription.AlgorandSubscriberConfig.md) | The subscriber configuration | +| `algod` | `default` | An algod client | +| `indexer?` | `default` | An (optional) indexer client; only needed if `subscription.syncBehaviour` is `catchup-with-indexer` | #### Returns @@ -70,7 +70,7 @@ Create a new `AlgorandSubscriber`. [subscriber.ts:24](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L24) ---- +___ ### algod @@ -80,7 +80,7 @@ Create a new `AlgorandSubscriber`. [subscriber.ts:21](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L21) ---- +___ ### config @@ -90,17 +90,17 @@ Create a new `AlgorandSubscriber`. [subscriber.ts:23](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L23) ---- +___ ### errorEventName -• `Private` `Readonly` **errorEventName**: `"error"` +• `Private` `Readonly` **errorEventName**: ``"error"`` #### Defined in [subscriber.ts:30](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L30) ---- +___ ### eventEmitter @@ -110,7 +110,7 @@ Create a new `AlgorandSubscriber`. [subscriber.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L25) ---- +___ ### filterNames @@ -120,7 +120,7 @@ Create a new `AlgorandSubscriber`. [subscriber.ts:28](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L28) ---- +___ ### indexer @@ -130,7 +130,7 @@ Create a new `AlgorandSubscriber`. [subscriber.ts:22](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L22) ---- +___ ### startPromise @@ -140,7 +140,7 @@ Create a new `AlgorandSubscriber`. [subscriber.ts:27](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L27) ---- +___ ### started @@ -158,8 +158,8 @@ Create a new `AlgorandSubscriber`. #### Parameters -| Name | Type | -| :------ | :-------- | +| Name | Type | +| :------ | :------ | | `error` | `unknown` | #### Returns @@ -170,7 +170,7 @@ Create a new `AlgorandSubscriber`. [subscriber.ts:31](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L31) ---- +___ ### on @@ -182,16 +182,16 @@ The listener can be async and it will be awaited if so. #### Type parameters -| Name | Type | -| :--- | :-------------------------------------------------------------------------------- | -| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | +| Name | Type | +| :------ | :------ | +| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | #### Parameters -| Name | Type | Description | -| :----------- | :------------------------------------------------------------------------------------------- | :-------------------------------------------------------- | -| `filterName` | `string` | The name of the filter to subscribe to | -| `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<`T`\> | The listener function to invoke with the subscribed event | +| Name | Type | Description | +| :------ | :------ | :------ | +| `filterName` | `string` | The name of the filter to subscribe to | +| `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<`T`\> | The listener function to invoke with the subscribed event | #### Returns @@ -202,9 +202,7 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.on('my-filter', async (transaction) => { - console.log(transaction.id) -}) +subscriber.on('my-filter', async (transaction) => { console.log(transaction.id) }) ``` **`Example`** @@ -218,7 +216,7 @@ new AlgorandSubscriber({filters: [{name: 'my-filter', filter: {...}, mapper: (t) [subscriber.ts:191](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L191) ---- +___ ### onBatch @@ -234,16 +232,16 @@ The listener can be async and it will be awaited if so. #### Type parameters -| Name | Type | -| :--- | :-------------------------------------------------------------------------------- | -| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | +| Name | Type | +| :------ | :------ | +| `T` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | #### Parameters -| Name | Type | Description | -| :----------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------- | -| `filterName` | `string` | The name of the filter to subscribe to | -| `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<`T`[]\> | The listener function to invoke with the subscribed events | +| Name | Type | Description | +| :------ | :------ | :------ | +| `filterName` | `string` | The name of the filter to subscribe to | +| `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<`T`[]\> | The listener function to invoke with the subscribed events | #### Returns @@ -254,9 +252,7 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.onBatch('my-filter', async (transactions) => { - console.log(transactions.length) -}) +subscriber.onBatch('my-filter', async (transactions) => { console.log(transactions.length) }) ``` **`Example`** @@ -270,7 +266,7 @@ new AlgorandSubscriber({filters: [{name: 'my-filter', filter: {...}, mapper: (t) [subscriber.ts:220](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L220) ---- +___ ### onBeforePoll @@ -284,8 +280,8 @@ The listener can be async and it will be awaited if so. #### Parameters -| Name | Type | Description | -| :--------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------- | +| Name | Type | Description | +| :------ | :------ | :------ | | `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<[`BeforePollMetadata`](../interfaces/types_subscription.BeforePollMetadata.md)\> | The listener function to invoke with the pre-poll metadata | #### Returns @@ -297,16 +293,14 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.onBeforePoll(async (metadata) => { - console.log(metadata.watermark) -}) +subscriber.onBeforePoll(async (metadata) => { console.log(metadata.watermark) }) ``` #### Defined in [subscriber.ts:238](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L238) ---- +___ ### onError @@ -320,8 +314,8 @@ The listener can be async and it will be awaited if so. #### Parameters -| Name | Type | Description | -| :--------- | :---------------------------------------------------------------- | :------------------------------------------------------------- | +| Name | Type | Description | +| :------ | :------ | :------ | | `listener` | [`ErrorListener`](../modules/types_subscription.md#errorlistener) | The listener function to invoke with the error that was thrown | #### Returns @@ -333,9 +327,7 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.onError((error) => { - console.error(error) -}) +subscriber.onError((error) => { console.error(error) }) ``` **`Example`** @@ -359,7 +351,7 @@ subscriber.onError(async (error) => { [subscriber.ts:292](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L292) ---- +___ ### onPoll @@ -376,8 +368,8 @@ The listener can be async and it will be awaited if so. #### Parameters -| Name | Type | Description | -| :--------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------- | +| Name | Type | Description | +| :------ | :------ | :------ | | `listener` | [`TypedAsyncEventListener`](../modules/types_subscription.md#typedasynceventlistener)\<[`TransactionSubscriptionResult`](../interfaces/types_subscription.TransactionSubscriptionResult.md)\> | The listener function to invoke with the poll result | #### Returns @@ -389,16 +381,14 @@ The subscriber so `on*` calls can be chained **`Example`** ```typescript -subscriber.onPoll(async (pollResult) => { - console.log(pollResult.subscribedTransactions.length, pollResult.syncedRoundRange) -}) +subscriber.onPoll(async (pollResult) => { console.log(pollResult.subscribedTransactions.length, pollResult.syncedRoundRange) }) ``` #### Defined in [subscriber.ts:259](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L259) ---- +___ ### pollOnce @@ -419,7 +409,7 @@ The poll result [subscriber.ts:67](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L67) ---- +___ ### start @@ -431,10 +421,10 @@ This is useful when running in the context of a long-running process / container #### Parameters -| Name | Type | Description | -| :------------- | :----------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- | -| `inspect?` | (`pollResult`: [`TransactionSubscriptionResult`](../interfaces/types_subscription.TransactionSubscriptionResult.md)) => `void` | A function that is called for each poll so the inner workings can be inspected / logged / etc. | -| `suppressLog?` | `boolean` | - | +| Name | Type | Description | +| :------ | :------ | :------ | +| `inspect?` | (`pollResult`: [`TransactionSubscriptionResult`](../interfaces/types_subscription.TransactionSubscriptionResult.md)) => `void` | A function that is called for each poll so the inner workings can be inspected / logged / etc. | +| `suppressLog?` | `boolean` | - | #### Returns @@ -446,7 +436,7 @@ An object that contains a promise you can wait for after calling stop [subscriber.ts:113](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/subscriber.ts#L113) ---- +___ ### stop @@ -456,8 +446,8 @@ Stops the subscriber if previously started via `start`. #### Parameters -| Name | Type | Description | -| :------- | :-------- | :----------------------------------------- | +| Name | Type | Description | +| :------ | :------ | :------ | | `reason` | `unknown` | The reason the subscriber is being stopped | #### Returns diff --git a/docs/code/classes/types_async_event_emitter.AsyncEventEmitter.md b/docs/code/classes/types_async_event_emitter.AsyncEventEmitter.md index 61062a9..c2fe2a6 100644 --- a/docs/code/classes/types_async_event_emitter.AsyncEventEmitter.md +++ b/docs/code/classes/types_async_event_emitter.AsyncEventEmitter.md @@ -47,7 +47,7 @@ Simple asynchronous event emitter class. [types/async-event-emitter.ts:12](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L12) ---- +___ ### listenerWrapperMap @@ -57,7 +57,7 @@ Simple asynchronous event emitter class. [types/async-event-emitter.ts:11](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L11) ---- +___ ### off @@ -71,10 +71,10 @@ Alias for `removeListener`. ##### Parameters -| Name | Type | -| :---------- | :--------------------------------------------------------------------------------- | -| `eventName` | `string` \| `symbol` | -| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | +| Name | Type | +| :------ | :------ | +| `eventName` | `string` \| `symbol` | +| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | ##### Returns @@ -95,10 +95,10 @@ in the order they were registered. #### Parameters -| Name | Type | Description | -| :---------- | :------------------- | :-------------------- | +| Name | Type | Description | +| :------ | :------ | :------ | | `eventName` | `string` \| `symbol` | The name of the event | -| `event` | `unknown` | The event payload | +| `event` | `unknown` | The event payload | #### Returns @@ -108,7 +108,7 @@ in the order they were registered. [types/async-event-emitter.ts:21](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L21) ---- +___ ### on @@ -118,10 +118,10 @@ Register an event listener for the given event. #### Parameters -| Name | Type | Description | -| :---------- | :--------------------------------------------------------------------------------- | :---------------------- | -| `eventName` | `string` \| `symbol` | The name of the event | -| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to trigger | +| Name | Type | Description | +| :------ | :------ | :------ | +| `eventName` | `string` \| `symbol` | The name of the event | +| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to trigger | #### Returns @@ -133,7 +133,7 @@ The `AsyncEventEmitter` so you can chain registrations [types/async-event-emitter.ts:33](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L33) ---- +___ ### once @@ -143,10 +143,10 @@ Register an event listener for the given event that is only fired once. #### Parameters -| Name | Type | Description | -| :---------- | :--------------------------------------------------------------------------------- | :---------------------- | -| `eventName` | `string` \| `symbol` | The name of the event | -| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to trigger | +| Name | Type | Description | +| :------ | :------ | :------ | +| `eventName` | `string` \| `symbol` | The name of the event | +| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to trigger | #### Returns @@ -158,7 +158,7 @@ The `AsyncEventEmitter` so you can chain registrations [types/async-event-emitter.ts:45](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/async-event-emitter.ts#L45) ---- +___ ### removeListener @@ -168,10 +168,10 @@ Removes an event listener from the given event. #### Parameters -| Name | Type | Description | -| :---------- | :--------------------------------------------------------------------------------- | :--------------------- | -| `eventName` | `string` \| `symbol` | The name of the event | -| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to remove | +| Name | Type | Description | +| :------ | :------ | :------ | +| `eventName` | `string` \| `symbol` | The name of the event | +| `listener` | [`AsyncEventListener`](../modules/types_async_event_emitter.md#asynceventlistener) | The listener to remove | #### Returns diff --git a/docs/code/enums/types_subscription.BalanceChangeRole.md b/docs/code/enums/types_subscription.BalanceChangeRole.md index 9b8e880..9c2deb4 100644 --- a/docs/code/enums/types_subscription.BalanceChangeRole.md +++ b/docs/code/enums/types_subscription.BalanceChangeRole.md @@ -20,7 +20,7 @@ The role that an account was playing for a given balance change. ### AssetCreator -• **AssetCreator** = `"AssetCreator"` +• **AssetCreator** = ``"AssetCreator"`` Account was creating an asset and holds the full asset supply @@ -28,11 +28,11 @@ Account was creating an asset and holds the full asset supply [types/subscription.ts:195](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L195) ---- +___ ### AssetDestroyer -• **AssetDestroyer** = `"AssetDestroyer"` +• **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. @@ -41,11 +41,11 @@ A balance change with this role will always have a 0 amount and use the asset ma [types/subscription.ts:199](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L199) ---- +___ ### CloseTo -• **CloseTo** = `"CloseTo"` +• **CloseTo** = ``"CloseTo"`` Account was having an asset amount closed to it @@ -53,11 +53,11 @@ Account was having an asset amount closed to it [types/subscription.ts:193](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L193) ---- +___ ### Receiver -• **Receiver** = `"Receiver"` +• **Receiver** = ``"Receiver"`` Account was receiving a transaction @@ -65,11 +65,11 @@ Account was receiving a transaction [types/subscription.ts:191](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L191) ---- +___ ### Sender -• **Sender** = `"Sender"` +• **Sender** = ``"Sender"`` Account was sending a transaction (sending asset and/or spending fee if asset `0`) diff --git a/docs/code/interfaces/types_arc_28.Arc28Event.md b/docs/code/interfaces/types_arc_28.Arc28Event.md index 21d485a..666ef37 100644 --- a/docs/code/interfaces/types_arc_28.Arc28Event.md +++ b/docs/code/interfaces/types_arc_28.Arc28Event.md @@ -18,7 +18,7 @@ The definition of metadata for an ARC-28 event per https://github.com/algorandfo ### args -• **args**: \{ `desc?`: `string` ; `name?`: `string` ; `type`: `string` }[] +• **args**: \{ `desc?`: `string` ; `name?`: `string` ; `type`: `string` }[] The arguments of the event, in order @@ -26,7 +26,7 @@ The arguments of the event, in order [types/arc-28.ts:14](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L14) ---- +___ ### desc @@ -38,7 +38,7 @@ Optional, user-friendly description for the event [types/arc-28.ts:12](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L12) ---- +___ ### name diff --git a/docs/code/interfaces/types_arc_28.Arc28EventGroup.md b/docs/code/interfaces/types_arc_28.Arc28EventGroup.md index ee71c60..2784ab0 100644 --- a/docs/code/interfaces/types_arc_28.Arc28EventGroup.md +++ b/docs/code/interfaces/types_arc_28.Arc28EventGroup.md @@ -28,7 +28,7 @@ Whether or not to silently (with warning log) continue if an error is encountere [types/arc-28.ts:55](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L55) ---- +___ ### events @@ -40,7 +40,7 @@ The list of ARC-28 event definitions [types/arc-28.ts:57](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L57) ---- +___ ### groupName @@ -52,7 +52,7 @@ The name to designate for this group of events. [types/arc-28.ts:49](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L49) ---- +___ ### processForAppIds @@ -64,7 +64,7 @@ Optional list of app IDs that this event should apply to [types/arc-28.ts:51](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L51) ---- +___ ### processTransaction @@ -78,8 +78,8 @@ Optional predicate to indicate if these ARC-28 events should be processed for th ##### Parameters -| Name | Type | -| :------------ | :------------------ | +| Name | Type | +| :------ | :------ | | `transaction` | `TransactionResult` | ##### Returns diff --git a/docs/code/interfaces/types_arc_28.Arc28EventToProcess.md b/docs/code/interfaces/types_arc_28.Arc28EventToProcess.md index 4b29a88..ee76e81 100644 --- a/docs/code/interfaces/types_arc_28.Arc28EventToProcess.md +++ b/docs/code/interfaces/types_arc_28.Arc28EventToProcess.md @@ -34,7 +34,7 @@ The ARC-28 definition of the event [types/arc-28.ts:35](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L35) ---- +___ ### eventName @@ -46,7 +46,7 @@ The name of the ARC-28 event that was triggered [types/arc-28.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L29) ---- +___ ### eventPrefix @@ -58,7 +58,7 @@ The 4-byte hex prefix for the event [types/arc-28.ts:33](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L33) ---- +___ ### eventSignature @@ -70,7 +70,7 @@ The signature of the event e.g. `EventName(type1,type2)` [types/arc-28.ts:31](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L31) ---- +___ ### groupName diff --git a/docs/code/interfaces/types_arc_28.EmittedArc28Event.md b/docs/code/interfaces/types_arc_28.EmittedArc28Event.md index 0419ee3..55b95fb 100644 --- a/docs/code/interfaces/types_arc_28.EmittedArc28Event.md +++ b/docs/code/interfaces/types_arc_28.EmittedArc28Event.md @@ -36,7 +36,7 @@ The ordered arguments extracted from the event that was emitted [types/arc-28.ts:41](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L41) ---- +___ ### argsByName @@ -48,7 +48,7 @@ The named arguments extracted from the event that was emitted (where the argumen [types/arc-28.ts:43](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L43) ---- +___ ### eventDefinition @@ -64,7 +64,7 @@ The ARC-28 definition of the event [types/arc-28.ts:35](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L35) ---- +___ ### eventName @@ -80,7 +80,7 @@ The name of the ARC-28 event that was triggered [types/arc-28.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L29) ---- +___ ### eventPrefix @@ -96,7 +96,7 @@ The 4-byte hex prefix for the event [types/arc-28.ts:33](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L33) ---- +___ ### eventSignature @@ -112,7 +112,7 @@ The signature of the event e.g. `EventName(type1,type2)` [types/arc-28.ts:31](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/arc-28.ts#L31) ---- +___ ### groupName diff --git a/docs/code/interfaces/types_block.Block.md b/docs/code/interfaces/types_block.Block.md index 861bb0f..e0294c7 100644 --- a/docs/code/interfaces/types_block.Block.md +++ b/docs/code/interfaces/types_block.Block.md @@ -56,7 +56,7 @@ since genesis. [types/block.ts:87](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L87) ---- +___ ### fees @@ -68,7 +68,7 @@ The FeeSink accepts transaction fees. It can only spend to the incentive pool. [types/block.ts:89](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L89) ---- +___ ### frac @@ -81,7 +81,7 @@ MicroAlgos for every reward unit in the next round. [types/block.ts:93](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L93) ---- +___ ### gen @@ -93,7 +93,7 @@ Genesis ID to which this block belongs. [types/block.ts:95](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L95) ---- +___ ### gh @@ -105,7 +105,7 @@ Genesis hash to which this block belongs. [types/block.ts:97](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L97) ---- +___ ### nextbefore @@ -117,7 +117,7 @@ Deadline round for this protocol upgrade (No votes will be considered after this [types/block.ts:141](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L141) ---- +___ ### nextproto @@ -129,7 +129,7 @@ The next proposed protocol version. [types/block.ts:133](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L133) ---- +___ ### nextswitch @@ -141,7 +141,7 @@ Round on which the protocol upgrade will take effect. [types/block.ts:145](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L145) ---- +___ ### nextyes @@ -153,7 +153,7 @@ Number of blocks which approved the protocol upgrade. [types/block.ts:137](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L137) ---- +___ ### partupdabs @@ -166,7 +166,7 @@ needs to be converted to offline since they are not proposing. [types/block.ts:154](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L154) ---- +___ ### partupdrmv @@ -179,7 +179,7 @@ converted to offline since their participation key expired. [types/block.ts:159](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L159) ---- +___ ### prev @@ -191,7 +191,7 @@ The hash of the previous block [types/block.ts:99](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L99) ---- +___ ### proto @@ -203,7 +203,7 @@ UpgradeState tracks the protocol upgrade state machine; proto is the current pro [types/block.ts:101](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L101) ---- +___ ### rate @@ -215,7 +215,7 @@ The number of new MicroAlgos added to the participation stake from rewards at th [types/block.ts:103](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L103) ---- +___ ### rnd @@ -227,7 +227,7 @@ Round number. [types/block.ts:105](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L105) ---- +___ ### rwcalr @@ -239,7 +239,7 @@ The round at which the RewardsRate will be recalculated. [types/block.ts:107](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L107) ---- +___ ### rwd @@ -252,7 +252,7 @@ FeeSink and continually redistributes them to addresses as rewards. [types/block.ts:111](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L111) ---- +___ ### seed @@ -264,7 +264,7 @@ Sortition seed [types/block.ts:113](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L113) ---- +___ ### spt @@ -274,21 +274,21 @@ Sortition seed [types/block.ts:173](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L173) ---- +___ ### tc • **tc**: `number` TxnCounter is the number of the next transaction that will be -committed after this block. Genesis blocks can start at either +committed after this block. Genesis blocks can start at either 0 or 1000, depending on a consensus parameter (AppForbidLowResources). #### Defined in [types/block.ts:118](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L118) ---- +___ ### ts @@ -300,7 +300,7 @@ Round time (unix timestamp) [types/block.ts:120](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L120) ---- +___ ### txn @@ -314,7 +314,7 @@ This value is only set when there are transactions in the block. [types/block.ts:125](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L125) ---- +___ ### txn256 @@ -326,7 +326,7 @@ Root of transaction vector commitment merkle tree using SHA256 hash function. [types/block.ts:129](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L129) ---- +___ ### txns @@ -338,7 +338,7 @@ The transactions within the block. [types/block.ts:149](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L149) ---- +___ ### upgradedelay @@ -350,7 +350,7 @@ UpgradeDelay indicates the time between acceptance and execution [types/block.ts:167](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L167) ---- +___ ### upgradeprop @@ -362,7 +362,7 @@ UpgradePropose indicates a proposed upgrade [types/block.ts:171](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L171) ---- +___ ### upgradeyes diff --git a/docs/code/interfaces/types_block.BlockAgreementCertificate.md b/docs/code/interfaces/types_block.BlockAgreementCertificate.md index 14e8c0f..c5f873d 100644 --- a/docs/code/interfaces/types_block.BlockAgreementCertificate.md +++ b/docs/code/interfaces/types_block.BlockAgreementCertificate.md @@ -8,9 +8,9 @@ Data this is returned in a raw Algorand block to certify the block. **`See`** -- https://github.com/algorand/go-algorand/blob/master/agreement/certificate.go -- https://github.com/algorand/go-algorand/blob/master/agreement/bundle.go#L31 -- https://github.com/algorand/go-algorand/blob/master/agreement/proposal.go + - https://github.com/algorand/go-algorand/blob/master/agreement/certificate.go + - https://github.com/algorand/go-algorand/blob/master/agreement/bundle.go#L31 + - https://github.com/algorand/go-algorand/blob/master/agreement/proposal.go ## Table of contents @@ -35,7 +35,7 @@ Equivocation votes [types/block.ts:40](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L40) ---- +___ ### per @@ -47,7 +47,7 @@ Period represents the current period of the source. [types/block.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L25) ---- +___ ### prop @@ -57,17 +57,17 @@ The proposal #### Type declaration -| Name | Type | Description | -| :------- | :----------- | :------------------------------------------------------- | -| `dig` | `Uint8Array` | Block digest | +| Name | Type | Description | +| :------ | :------ | :------ | +| `dig` | `Uint8Array` | Block digest | | `encdig` | `Uint8Array` | Encoding digest (the cryptographic hash of the proposal) | -| `oprop` | `Uint8Array` | Original proposer | +| `oprop` | `Uint8Array` | Original proposer | #### Defined in [types/block.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L29) ---- +___ ### rnd @@ -79,7 +79,7 @@ Round number [types/block.ts:23](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L23) ---- +___ ### step @@ -91,7 +91,7 @@ Step represents the current period of the source. [types/block.ts:27](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L27) ---- +___ ### vote diff --git a/docs/code/interfaces/types_block.BlockData.md b/docs/code/interfaces/types_block.BlockData.md index ffeea7d..ad0d35f 100644 --- a/docs/code/interfaces/types_block.BlockData.md +++ b/docs/code/interfaces/types_block.BlockData.md @@ -25,7 +25,7 @@ The block itself. [types/block.ts:10](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L10) ---- +___ ### cert diff --git a/docs/code/interfaces/types_block.BlockTransaction.md b/docs/code/interfaces/types_block.BlockTransaction.md index ad6907a..bbce4e3 100644 --- a/docs/code/interfaces/types_block.BlockTransaction.md +++ b/docs/code/interfaces/types_block.BlockTransaction.md @@ -39,7 +39,7 @@ Asset closing amount in decimal units [types/block.ts:190](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L190) ---- +___ ### apid @@ -51,7 +51,7 @@ App ID when an app is created by the transaction [types/block.ts:188](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L188) ---- +___ ### ca @@ -63,7 +63,7 @@ Algo closing amount in microAlgos [types/block.ts:192](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L192) ---- +___ ### caid @@ -75,7 +75,7 @@ Asset ID when an asset is created by the transaction [types/block.ts:186](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L186) ---- +___ ### dt @@ -87,7 +87,7 @@ The eval deltas for the block [types/block.ts:184](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L184) ---- +___ ### hgh @@ -99,7 +99,7 @@ Has genesis hash [types/block.ts:196](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L196) ---- +___ ### hgi @@ -111,7 +111,7 @@ Has genesis id [types/block.ts:194](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L194) ---- +___ ### lsig @@ -123,7 +123,7 @@ Logic signature [types/block.ts:200](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L200) ---- +___ ### msig @@ -135,7 +135,7 @@ Transaction multisig signature [types/block.ts:202](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L202) ---- +___ ### sgnr @@ -147,7 +147,7 @@ The signer, if signing with a different key than the Transaction type `from` pro [types/block.ts:204](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L204) ---- +___ ### sig @@ -159,7 +159,7 @@ Transaction ED25519 signature [types/block.ts:198](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L198) ---- +___ ### txn diff --git a/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md b/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md index 4439af3..4f52ee9 100644 --- a/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md +++ b/docs/code/interfaces/types_block.BlockTransactionEvalDelta.md @@ -27,7 +27,7 @@ The delta of global state, keyed by key [types/block.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L244) ---- +___ ### itx @@ -39,7 +39,7 @@ Inner transactions [types/block.ts:250](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L250) ---- +___ ### ld @@ -51,7 +51,7 @@ The delta of local state keyed by account ID offset in [txn.Sender, ...txn.Accou [types/block.ts:246](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L246) ---- +___ ### lg diff --git a/docs/code/interfaces/types_block.BlockValueDelta.md b/docs/code/interfaces/types_block.BlockValueDelta.md index 4a05ff0..0ccc978 100644 --- a/docs/code/interfaces/types_block.BlockValueDelta.md +++ b/docs/code/interfaces/types_block.BlockValueDelta.md @@ -21,16 +21,15 @@ A value delta as a result of a block transaction • **at**: `number` DeltaAction is an enum of actions that may be performed when applying a delta to a TEAL key/value store: - -- `1`: SetBytesAction indicates that a TEAL byte slice should be stored at a key -- `2`: SetUintAction indicates that a Uint should be stored at a key -- `3`: DeleteAction indicates that the value for a particular key should be deleted + * `1`: SetBytesAction indicates that a TEAL byte slice should be stored at a key + * `2`: SetUintAction indicates that a Uint should be stored at a key + * `3`: DeleteAction indicates that the value for a particular key should be deleted #### Defined in [types/block.ts:260](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L260) ---- +___ ### bs @@ -42,7 +41,7 @@ Bytes value [types/block.ts:263](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L263) ---- +___ ### ui diff --git a/docs/code/interfaces/types_block.BlockVote.md b/docs/code/interfaces/types_block.BlockVote.md index c71b318..6119da5 100644 --- a/docs/code/interfaces/types_block.BlockVote.md +++ b/docs/code/interfaces/types_block.BlockVote.md @@ -32,19 +32,19 @@ https://github.com/algorand/go-algorand/blob/master/data/committee/credential.go #### Type declaration -| Name | Type | Description | -| :--- | :----------- | :-------------------------- | +| Name | Type | Description | +| :------ | :------ | :------ | | `pf` | `Uint8Array` | VRF proof of the credential | #### Defined in [types/block.ts:54](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L54) ---- +___ ### sig -• **sig**: \{ `p`: `Uint8Array` ; `p1s`: `Uint8Array` ; `p2`: `Uint8Array` ; `p2s`: `Uint8Array` ; `ps`: `Uint8Array` ; `s`: `Uint8Array` }[] +• **sig**: \{ `p`: `Uint8Array` ; `p1s`: `Uint8Array` ; `p2`: `Uint8Array` ; `p2s`: `Uint8Array` ; `ps`: `Uint8Array` ; `s`: `Uint8Array` }[] One-time signature @@ -56,7 +56,7 @@ https://github.com/algorand/go-algorand/blob/master/crypto/onetimesig.go [types/block.ts:62](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L62) ---- +___ ### snd diff --git a/docs/code/interfaces/types_block.LogicSig.md b/docs/code/interfaces/types_block.LogicSig.md index 8231a6f..ecd4be1 100644 --- a/docs/code/interfaces/types_block.LogicSig.md +++ b/docs/code/interfaces/types_block.LogicSig.md @@ -31,7 +31,7 @@ Arguments passed into the logic signature [types/block.ts:218](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L218) ---- +___ ### l @@ -43,7 +43,7 @@ Logic sig code [types/block.ts:212](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L212) ---- +___ ### msig @@ -55,7 +55,7 @@ Multisig signature for delegated operations [types/block.ts:216](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L216) ---- +___ ### sig diff --git a/docs/code/interfaces/types_block.MultisigSig.md b/docs/code/interfaces/types_block.MultisigSig.md index 2d54435..ab7a923 100644 --- a/docs/code/interfaces/types_block.MultisigSig.md +++ b/docs/code/interfaces/types_block.MultisigSig.md @@ -22,7 +22,7 @@ https://github.com/algorand/go-algorand/blob/master/crypto/multisig.go#L36 ### subsig -• **subsig**: \{ `pk`: `Uint8Array` ; `s?`: `Uint8Array` }[] +• **subsig**: \{ `pk`: `Uint8Array` ; `s?`: `Uint8Array` }[] Sub-signatures @@ -30,7 +30,7 @@ Sub-signatures [types/block.ts:230](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L230) ---- +___ ### thr @@ -42,7 +42,7 @@ Multisig threshold [types/block.ts:228](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L228) ---- +___ ### v diff --git a/docs/code/interfaces/types_block.StateProof.md b/docs/code/interfaces/types_block.StateProof.md index 0bc402d..f0bd125 100644 --- a/docs/code/interfaces/types_block.StateProof.md +++ b/docs/code/interfaces/types_block.StateProof.md @@ -24,18 +24,18 @@ #### Type declaration -| Name | Type | -| :------ | :----------------- | -| `hsh` | \{ `t`: `number` } | -| `hsh.t` | `number` | -| `pth` | `Uint8Array`[] | -| `td` | `number` | +| Name | Type | +| :------ | :------ | +| `hsh` | \{ `t`: `number` } | +| `hsh.t` | `number` | +| `pth` | `Uint8Array`[] | +| `td` | `number` | #### Defined in [types/block.ts:272](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L272) ---- +___ ### S @@ -43,18 +43,18 @@ #### Type declaration -| Name | Type | -| :------ | :----------------- | -| `hsh` | \{ `t`: `number` } | -| `hsh.t` | `number` | -| `pth` | `Uint8Array`[] | -| `td` | `number` | +| Name | Type | +| :------ | :------ | +| `hsh` | \{ `t`: `number` } | +| `hsh.t` | `number` | +| `pth` | `Uint8Array`[] | +| `td` | `number` | #### Defined in [types/block.ts:289](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L289) ---- +___ ### c @@ -64,7 +64,7 @@ [types/block.ts:271](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L271) ---- +___ ### pr @@ -74,17 +74,17 @@ [types/block.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L273) ---- +___ ### r -• **r**: `Map`\<`number`, \{ `p`: \{ `p`: \{ `cmt`: `Uint8Array` ; `lf`: `number` } ; `w`: `bigint` } ; `s`: \{ `l?`: `bigint` ; `s`: \{ `idx`: `number` ; `prf`: \{ `hsh`: \{ `t`: `number` } ; `pth`: `Uint8Array`[] ; `td`: `number` } ; `sig`: `Uint8Array` ; `vkey`: \{ `k`: `Uint8Array` } } } }\> +• **r**: `Map`\<`number`, \{ `p`: \{ `p`: \{ `cmt`: `Uint8Array` ; `lf`: `number` } ; `w`: `bigint` } ; `s`: \{ `l?`: `bigint` ; `s`: \{ `idx`: `number` ; `prf`: \{ `hsh`: \{ `t`: `number` } ; `pth`: `Uint8Array`[] ; `td`: `number` } ; `sig`: `Uint8Array` ; `vkey`: \{ `k`: `Uint8Array` } } } }\> #### Defined in [types/block.ts:274](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L274) ---- +___ ### v @@ -94,7 +94,7 @@ [types/block.ts:291](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L291) ---- +___ ### w diff --git a/docs/code/interfaces/types_block.StateProofMessage.md b/docs/code/interfaces/types_block.StateProofMessage.md index e0975ad..3b07c36 100644 --- a/docs/code/interfaces/types_block.StateProofMessage.md +++ b/docs/code/interfaces/types_block.StateProofMessage.md @@ -24,7 +24,7 @@ [types/block.ts:298](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L298) ---- +___ ### b @@ -34,7 +34,7 @@ [types/block.ts:295](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L295) ---- +___ ### f @@ -44,7 +44,7 @@ [types/block.ts:296](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L296) ---- +___ ### l @@ -54,7 +54,7 @@ [types/block.ts:297](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L297) ---- +___ ### v diff --git a/docs/code/interfaces/types_block.StateProofTracking.md b/docs/code/interfaces/types_block.StateProofTracking.md index fc32980..f29c470 100644 --- a/docs/code/interfaces/types_block.StateProofTracking.md +++ b/docs/code/interfaces/types_block.StateProofTracking.md @@ -24,7 +24,7 @@ StateProofNextRound is the next round for which we will accept a StateProof tran [types/block.ts:317](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L317) ---- +___ ### t @@ -38,14 +38,14 @@ This is intended for computing the threshold of votes to expect from StateProofV [types/block.ts:313](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L313) ---- +___ ### v • `Optional` **v**: `string` StateProofVotersCommitment is the root of a vector commitment containing the -online accounts that will help sign a state proof. The VC root, and the state proof, +online accounts that will help sign a state proof. The VC root, and the state proof, happen on blocks that are a multiple of ConsensusParams.StateProofRounds. For blocks that are not a multiple of ConsensusParams.StateProofRounds, this value is zero. diff --git a/docs/code/interfaces/types_block.TransactionInBlock.md b/docs/code/interfaces/types_block.TransactionInBlock.md index 326ce4f..fc84550 100644 --- a/docs/code/interfaces/types_block.TransactionInBlock.md +++ b/docs/code/interfaces/types_block.TransactionInBlock.md @@ -42,7 +42,7 @@ The asset close amount if the sender asset position was closed from this transac [types/block.ts:385](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L385) ---- +___ ### blockTransaction @@ -54,7 +54,7 @@ The block data for the transaction [types/block.ts:327](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L327) ---- +___ ### closeAmount @@ -66,7 +66,7 @@ The ALGO close amount if the sender account was closed from this transaction. [types/block.ts:387](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L387) ---- +___ ### closeRewards @@ -78,7 +78,7 @@ Rewards in microalgos applied to the close remainder to account. [types/block.ts:391](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L391) ---- +___ ### createdAppId @@ -90,7 +90,7 @@ The app ID if an app was created from this transaction. [types/block.ts:383](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L383) ---- +___ ### createdAssetId @@ -102,7 +102,7 @@ The asset ID if an asset was created from this transaction. [types/block.ts:381](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L381) ---- +___ ### genesisHash @@ -114,7 +114,7 @@ The binary genesis hash of the network the transaction is within. [types/block.ts:368](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L368) ---- +___ ### genesisId @@ -126,7 +126,7 @@ The string genesis ID of the network the transaction is within. [types/block.ts:370](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L370) ---- +___ ### logs @@ -138,7 +138,7 @@ Any logs that were issued as a result of this transaction. [types/block.ts:389](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L389) ---- +___ ### parentOffset @@ -149,14 +149,19 @@ The offset within the parent transaction. **`Example`** ```ts -;-`undefined` - `undefined` - 0 - 1 - 2 - `undefined` +- `undefined` + - `undefined` + - 0 + - 1 + - 2 + - `undefined` ``` #### Defined in [types/block.ts:366](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L366) ---- +___ ### parentTransactionId @@ -168,7 +173,7 @@ The ID of the parent transaction if this is an inner transaction. [types/block.ts:354](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L354) ---- +___ ### receiverRewards @@ -180,7 +185,7 @@ Rewards in microalgos applied to the receiver account. [types/block.ts:395](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L395) ---- +___ ### roundIndex @@ -191,14 +196,19 @@ The index within the block.txns array of this transaction or if it's an inner tr **`Example`** ```ts -;-0 - 1 - 1 - 1 - 1 - 2 +- 0 + - 1 + - 1 + - 1 + - 1 + - 2 ``` #### Defined in [types/block.ts:350](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L350) ---- +___ ### roundNumber @@ -210,7 +220,7 @@ The round number of the block the transaction is within. [types/block.ts:372](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L372) ---- +___ ### roundOffset @@ -221,14 +231,19 @@ The offset of the transaction within the round including inner transactions. **`Example`** ```ts -;-0 - 1 - 2 - 3 - 4 - 5 +- 0 + - 1 + - 2 + - 3 + - 4 + - 5 ``` #### Defined in [types/block.ts:338](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L338) ---- +___ ### roundTimestamp @@ -240,7 +255,7 @@ The round unix timestamp of the block the transaction is within. [types/block.ts:374](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L374) ---- +___ ### senderRewards @@ -252,7 +267,7 @@ Rewards in microalgos applied to the sender account. [types/block.ts:393](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/block.ts#L393) ---- +___ ### transaction diff --git a/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md b/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md index 96458ce..8f9c531 100644 --- a/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md +++ b/docs/code/interfaces/types_subscription.AlgorandSubscriberConfig.md @@ -41,7 +41,7 @@ Any ARC-28 event definitions to process from app call logs [types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) ---- +___ ### filters @@ -57,7 +57,7 @@ The set of filters to subscribe to / emit events for, along with optional data m [types/subscription.ts:363](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L363) ---- +___ ### frequencyInSeconds @@ -69,7 +69,7 @@ The frequency to poll for new blocks in seconds; defaults to 1s [types/subscription.ts:365](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L365) ---- +___ ### maxIndexerRoundsToSync @@ -92,7 +92,7 @@ boundary based on the number of rounds specified here. [types/subscription.ts:255](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L255) ---- +___ ### maxRoundsToSync @@ -114,29 +114,28 @@ your catchup speed when using `sync-oldest`. [types/subscription.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L244) ---- +___ ### syncBehaviour -• **syncBehaviour**: `"skip-sync-newest"` \| `"sync-oldest"` \| `"sync-oldest-start-now"` \| `"catchup-with-indexer"` \| `"fail"` +• **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. + * `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. #### Inherited from @@ -146,7 +145,7 @@ past `watermark` then how should that be handled: [types/subscription.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L273) ---- +___ ### waitForBlockWhenAtTip @@ -158,7 +157,7 @@ Whether to wait via algod `/status/wait-for-block-after` endpoint when at the ti [types/subscription.ts:367](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L367) ---- +___ ### watermarkPersistence @@ -169,10 +168,10 @@ its position in the chain #### Type declaration -| Name | Type | Description | -| :---- | :------------------------------------------------ | :---------- | -| `get` | () => `Promise`\<`number`\> | - | -| `set` | (`newWatermark`: `number`) => `Promise`\<`void`\> | - | +| Name | Type | Description | +| :------ | :------ | :------ | +| `get` | () => `Promise`\<`number`\> | - | +| `set` | (`newWatermark`: `number`) => `Promise`\<`void`\> | - | #### Defined in diff --git a/docs/code/interfaces/types_subscription.BalanceChange.md b/docs/code/interfaces/types_subscription.BalanceChange.md index d64aa57..5893eab 100644 --- a/docs/code/interfaces/types_subscription.BalanceChange.md +++ b/docs/code/interfaces/types_subscription.BalanceChange.md @@ -27,7 +27,7 @@ The address that the balance change is for. [types/subscription.ts:177](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L177) ---- +___ ### amount @@ -39,7 +39,7 @@ The amount of the balance change in smallest divisible unit or microAlgos. [types/subscription.ts:181](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L181) ---- +___ ### assetId @@ -51,7 +51,7 @@ The asset ID of the balance change, or 0 for Algos. [types/subscription.ts:179](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L179) ---- +___ ### roles diff --git a/docs/code/interfaces/types_subscription.BeforePollMetadata.md b/docs/code/interfaces/types_subscription.BeforePollMetadata.md index d4b5e2c..1e48134 100644 --- a/docs/code/interfaces/types_subscription.BeforePollMetadata.md +++ b/docs/code/interfaces/types_subscription.BeforePollMetadata.md @@ -25,7 +25,7 @@ The current round of algod [types/subscription.ts:207](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L207) ---- +___ ### watermark diff --git a/docs/code/interfaces/types_subscription.BlockMetadata.md b/docs/code/interfaces/types_subscription.BlockMetadata.md index 1c69183..ce1fe18 100644 --- a/docs/code/interfaces/types_subscription.BlockMetadata.md +++ b/docs/code/interfaces/types_subscription.BlockMetadata.md @@ -40,7 +40,7 @@ Full count of transactions and inner transactions (recursively) in this block. [types/subscription.ts:53](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L53) ---- +___ ### genesisHash @@ -52,7 +52,7 @@ The base64 genesis hash of the chain. [types/subscription.ts:43](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L43) ---- +___ ### genesisId @@ -64,7 +64,7 @@ The genesis ID of the chain. [types/subscription.ts:41](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L41) ---- +___ ### hash @@ -76,7 +76,7 @@ The base64 block hash. [types/subscription.ts:35](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L35) ---- +___ ### parentTransactionCount @@ -88,7 +88,7 @@ Count of parent transactions in this block [types/subscription.ts:51](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L51) ---- +___ ### participationUpdates @@ -100,7 +100,7 @@ Participation account data that needs to be checked/acted on by the network. [types/subscription.ts:68](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L68) ---- +___ ### previousBlockHash @@ -112,7 +112,7 @@ The base64 previous block hash. [types/subscription.ts:45](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L45) ---- +___ ### rewards @@ -124,7 +124,7 @@ Fields relating to rewards [types/subscription.ts:49](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L49) ---- +___ ### round @@ -136,7 +136,7 @@ The round of the block. [types/subscription.ts:37](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L37) ---- +___ ### seed @@ -148,7 +148,7 @@ The base64 seed of the block. [types/subscription.ts:47](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L47) ---- +___ ### stateProofTracking @@ -160,7 +160,7 @@ Tracks the status of state proofs. [types/subscription.ts:64](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L64) ---- +___ ### timestamp @@ -172,20 +172,20 @@ Block creation timestamp in seconds since epoch [types/subscription.ts:39](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L39) ---- +___ ### transactionsRoot • **transactionsRoot**: `string` TransactionsRoot 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}=)?$" +Pattern : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==\|[A-Za-z0-9+/]{3}=)?$" #### Defined in [types/subscription.ts:58](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L58) ---- +___ ### transactionsRootSha256 @@ -197,19 +197,19 @@ TransactionsRootSHA256 is an auxiliary TransactionRoot, built using a vector com [types/subscription.ts:60](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L60) ---- +___ ### txnCounter • **txnCounter**: `number` -Number 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). +Number 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). #### Defined in [types/subscription.ts:55](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L55) ---- +___ ### upgradeState @@ -221,7 +221,7 @@ Fields relating to a protocol upgrade. [types/subscription.ts:62](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L62) ---- +___ ### upgradeVote diff --git a/docs/code/interfaces/types_subscription.BlockRewards.md b/docs/code/interfaces/types_subscription.BlockRewards.md index 958fded..c65291a 100644 --- a/docs/code/interfaces/types_subscription.BlockRewards.md +++ b/docs/code/interfaces/types_subscription.BlockRewards.md @@ -27,7 +27,7 @@ FeeSink is an address that accepts transaction fees, it can only spend to the in [types/subscription.ts:73](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L73) ---- +___ ### rewardsCalculationRound @@ -39,7 +39,7 @@ number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos [types/subscription.ts:75](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L75) ---- +___ ### rewardsLevel @@ -51,7 +51,7 @@ How many rewards, in MicroAlgos, have been distributed to each RewardUnit of Mic [types/subscription.ts:77](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L77) ---- +___ ### rewardsPool @@ -63,7 +63,7 @@ RewardsPool is an address that accepts periodic injections from the fee-sink and [types/subscription.ts:79](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L79) ---- +___ ### rewardsRate @@ -75,7 +75,7 @@ Number of new MicroAlgos added to the participation stake from rewards at the ne [types/subscription.ts:81](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L81) ---- +___ ### rewardsResidue diff --git a/docs/code/interfaces/types_subscription.BlockStateProofTracking.md b/docs/code/interfaces/types_subscription.BlockStateProofTracking.md index ad8bd07..e2ba325 100644 --- a/docs/code/interfaces/types_subscription.BlockStateProofTracking.md +++ b/docs/code/interfaces/types_subscription.BlockStateProofTracking.md @@ -25,7 +25,7 @@ [types/subscription.ts:103](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L103) ---- +___ ### onlineTotalWeight @@ -38,7 +38,7 @@ StateProof round. [types/subscription.ts:109](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L109) ---- +___ ### type @@ -50,7 +50,7 @@ State Proof Type. Note the raw object uses map with this as key. [types/subscription.ts:114](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L114) ---- +___ ### votersCommitment diff --git a/docs/code/interfaces/types_subscription.BlockUpgradeState.md b/docs/code/interfaces/types_subscription.BlockUpgradeState.md index e0acfd5..1e78cbb 100644 --- a/docs/code/interfaces/types_subscription.BlockUpgradeState.md +++ b/docs/code/interfaces/types_subscription.BlockUpgradeState.md @@ -26,7 +26,7 @@ Current protocol version [types/subscription.ts:88](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L88) ---- +___ ### nextProtocol @@ -38,7 +38,7 @@ The next proposed protocol version. [types/subscription.ts:90](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L90) ---- +___ ### nextProtocolApprovals @@ -50,7 +50,7 @@ Number of blocks which approved the protocol upgrade. [types/subscription.ts:92](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L92) ---- +___ ### nextProtocolSwitchOn @@ -62,7 +62,7 @@ Round on which the protocol upgrade will take effect. [types/subscription.ts:96](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L96) ---- +___ ### nextProtocolVoteBefore diff --git a/docs/code/interfaces/types_subscription.BlockUpgradeVote.md b/docs/code/interfaces/types_subscription.BlockUpgradeVote.md index 9cd8cea..3eac5a5 100644 --- a/docs/code/interfaces/types_subscription.BlockUpgradeVote.md +++ b/docs/code/interfaces/types_subscription.BlockUpgradeVote.md @@ -24,7 +24,7 @@ [types/subscription.ts:127](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L127) ---- +___ ### upgradeDelay @@ -36,7 +36,7 @@ [types/subscription.ts:132](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L132) ---- +___ ### upgradePropose diff --git a/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md b/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md index 41eedd0..580511b 100644 --- a/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md +++ b/docs/code/interfaces/types_subscription.CoreTransactionSubscriptionParams.md @@ -36,7 +36,7 @@ Any ARC-28 event definitions to process from app call logs [types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) ---- +___ ### filters @@ -48,29 +48,26 @@ A list of filters with corresponding names. **`Example`** ```typescript -filter: [ - { - name: 'asset-transfers', - filter: { - type: TransactionType.axfer, - //... - }, - }, - { - name: 'payments', - filter: { - type: TransactionType.pay, - //... - }, - }, -] + filter: [{ + name: 'asset-transfers', + filter: { + type: TransactionType.axfer, + //... + } + }, { + name: 'payments', + filter: { + type: TransactionType.pay, + //... + } + }] ``` #### Defined in [types/subscription.ts:233](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L233) ---- +___ ### maxIndexerRoundsToSync @@ -89,7 +86,7 @@ boundary based on the number of rounds specified here. [types/subscription.ts:255](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L255) ---- +___ ### maxRoundsToSync @@ -107,29 +104,28 @@ your catchup speed when using `sync-oldest`. [types/subscription.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L244) ---- +___ ### syncBehaviour -• **syncBehaviour**: `"skip-sync-newest"` \| `"sync-oldest"` \| `"sync-oldest-start-now"` \| `"catchup-with-indexer"` \| `"fail"` +• **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. + * `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. #### Defined in diff --git a/docs/code/interfaces/types_subscription.NamedTransactionFilter.md b/docs/code/interfaces/types_subscription.NamedTransactionFilter.md index 34a28f0..1036e5d 100644 --- a/docs/code/interfaces/types_subscription.NamedTransactionFilter.md +++ b/docs/code/interfaces/types_subscription.NamedTransactionFilter.md @@ -31,7 +31,7 @@ The filter itself. [types/subscription.ts:281](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L281) ---- +___ ### name diff --git a/docs/code/interfaces/types_subscription.ParticipationUpdates.md b/docs/code/interfaces/types_subscription.ParticipationUpdates.md index b93bf3e..912a116 100644 --- a/docs/code/interfaces/types_subscription.ParticipationUpdates.md +++ b/docs/code/interfaces/types_subscription.ParticipationUpdates.md @@ -23,7 +23,7 @@ [types/subscription.ts:144](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L144) ---- +___ ### expiredParticipationAccounts diff --git a/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md b/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md index 9c0d6e5..8dc6489 100644 --- a/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md +++ b/docs/code/interfaces/types_subscription.SubscriberConfigFilter.md @@ -9,8 +9,8 @@ A single event to subscribe to / emit. ## Type parameters | Name | -| :--- | -| `T` | +| :------ | +| `T` | ## Hierarchy @@ -42,7 +42,7 @@ The filter itself. [types/subscription.ts:281](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L281) ---- +___ ### mapper @@ -60,8 +60,8 @@ Note: if you provide multiple filters with the same name then only the mapper of ##### Parameters -| Name | Type | -| :------------ | :---------------------------------------------------------------------------------- | +| Name | Type | +| :------ | :------ | | `transaction` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction)[] | ##### Returns @@ -72,7 +72,7 @@ Note: if you provide multiple filters with the same name then only the mapper of [types/subscription.ts:386](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L386) ---- +___ ### name diff --git a/docs/code/interfaces/types_subscription.TransactionFilter.md b/docs/code/interfaces/types_subscription.TransactionFilter.md index de86059..5bbb10c 100644 --- a/docs/code/interfaces/types_subscription.TransactionFilter.md +++ b/docs/code/interfaces/types_subscription.TransactionFilter.md @@ -41,8 +41,8 @@ Filter to app transactions that meet the given app arguments predicate. ##### Parameters -| Name | Type | -| :------------------ | :------------- | +| Name | Type | +| :------ | :------ | | `appCallArguments?` | `Uint8Array`[] | ##### Returns @@ -53,7 +53,7 @@ Filter to app transactions that meet the given app arguments predicate. [types/subscription.ts:314](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L314) ---- +___ ### appCreate @@ -65,7 +65,7 @@ Filter to transactions that are creating an app. [types/subscription.ts:297](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L297) ---- +___ ### appId @@ -77,7 +77,7 @@ Filter to transactions against the app with the given ID(s). [types/subscription.ts:295](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L295) ---- +___ ### appOnComplete @@ -89,11 +89,11 @@ Filter to transactions that have given on complete(s). [types/subscription.ts:299](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L299) ---- +___ ### arc28Events -• `Optional` **arc28Events**: \{ `eventName`: `string` ; `groupName`: `string` }[] +• `Optional` **arc28Events**: \{ `eventName`: `string` ; `groupName`: `string` }[] 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`. @@ -102,7 +102,7 @@ Note: the definitions for these events must be passed in to the subscription con [types/subscription.ts:318](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L318) ---- +___ ### assetCreate @@ -114,7 +114,7 @@ Filter to transactions that are creating an asset. [types/subscription.ts:303](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L303) ---- +___ ### assetId @@ -126,11 +126,11 @@ Filter to transactions against the asset with the given ID(s). [types/subscription.ts:301](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L301) ---- +___ ### balanceChanges -• `Optional` **balanceChanges**: \{ `address?`: `string` \| `string`[] ; `assetId?`: `number` \| `bigint` \| `number`[] \| `bigint`[] ; `maxAbsoluteAmount?`: `number` \| `bigint` ; `maxAmount?`: `number` \| `bigint` ; `minAbsoluteAmount?`: `number` \| `bigint` ; `minAmount?`: `number` \| `bigint` ; `role?`: [`BalanceChangeRole`](../enums/types_subscription.BalanceChangeRole.md) \| [`BalanceChangeRole`](../enums/types_subscription.BalanceChangeRole.md)[] }[] +• `Optional` **balanceChanges**: \{ `address?`: `string` \| `string`[] ; `assetId?`: `number` \| `bigint` \| `number`[] \| `bigint`[] ; `maxAbsoluteAmount?`: `number` \| `bigint` ; `maxAmount?`: `number` \| `bigint` ; `minAbsoluteAmount?`: `number` \| `bigint` ; `minAmount?`: `number` \| `bigint` ; `role?`: [`BalanceChangeRole`](../enums/types_subscription.BalanceChangeRole.md) \| [`BalanceChangeRole`](../enums/types_subscription.BalanceChangeRole.md)[] }[] Filter to transactions that result in balance changes that match one or more of the given set of balance changes. @@ -138,7 +138,7 @@ Filter to transactions that result in balance changes that match one or more of [types/subscription.ts:320](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L320) ---- +___ ### customFilter @@ -152,8 +152,8 @@ Catch-all custom filter to filter for things that the rest of the filters don't ##### Parameters -| Name | Type | -| :------------ | :-------------------------------------------------------------------------------- | +| Name | Type | +| :------ | :------ | | `transaction` | [`SubscribedTransaction`](../modules/types_subscription.md#subscribedtransaction) | ##### Returns @@ -164,7 +164,7 @@ Catch-all custom filter to filter for things that the rest of the filters don't [types/subscription.ts:337](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L337) ---- +___ ### maxAmount @@ -177,7 +177,7 @@ or equal to the given maximum (microAlgos or decimal units of an ASA if type: ax [types/subscription.ts:309](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L309) ---- +___ ### methodSignature @@ -190,7 +190,7 @@ the given method signature as the first app argument. [types/subscription.ts:312](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L312) ---- +___ ### minAmount @@ -203,7 +203,7 @@ than or equal to the given minimum (microAlgos or decimal units of an ASA if typ [types/subscription.ts:306](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L306) ---- +___ ### notePrefix @@ -215,7 +215,7 @@ Filter to transactions with a note having the given prefix. [types/subscription.ts:293](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L293) ---- +___ ### receiver @@ -227,7 +227,7 @@ Filter to transactions being received by the specified address(es). [types/subscription.ts:291](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L291) ---- +___ ### sender @@ -239,7 +239,7 @@ Filter to transactions sent from the specified address(es). [types/subscription.ts:289](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L289) ---- +___ ### type diff --git a/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md b/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md index bf79461..b57a666 100644 --- a/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md +++ b/docs/code/interfaces/types_subscription.TransactionSubscriptionParams.md @@ -40,7 +40,7 @@ Any ARC-28 event definitions to process from app call logs [types/subscription.ts:235](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L235) ---- +___ ### currentRound @@ -53,7 +53,7 @@ If not provided, it will be resolved on demand. [types/subscription.ts:357](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L357) ---- +___ ### filters @@ -65,22 +65,19 @@ A list of filters with corresponding names. **`Example`** ```typescript -filter: [ - { - name: 'asset-transfers', - filter: { - type: TransactionType.axfer, - //... - }, - }, - { - name: 'payments', - filter: { - type: TransactionType.pay, - //... - }, - }, -] + filter: [{ + name: 'asset-transfers', + filter: { + type: TransactionType.axfer, + //... + } + }, { + name: 'payments', + filter: { + type: TransactionType.pay, + //... + } + }] ``` #### Inherited from @@ -91,7 +88,7 @@ filter: [ [types/subscription.ts:233](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L233) ---- +___ ### maxIndexerRoundsToSync @@ -114,7 +111,7 @@ boundary based on the number of rounds specified here. [types/subscription.ts:255](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L255) ---- +___ ### maxRoundsToSync @@ -136,29 +133,28 @@ your catchup speed when using `sync-oldest`. [types/subscription.ts:244](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L244) ---- +___ ### syncBehaviour -• **syncBehaviour**: `"skip-sync-newest"` \| `"sync-oldest"` \| `"sync-oldest-start-now"` \| `"catchup-with-indexer"` \| `"fail"` +• **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. + * `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. #### Inherited from @@ -168,7 +164,7 @@ past `watermark` then how should that be handled: [types/subscription.ts:273](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L273) ---- +___ ### watermark diff --git a/docs/code/interfaces/types_subscription.TransactionSubscriptionResult.md b/docs/code/interfaces/types_subscription.TransactionSubscriptionResult.md index 54403dc..2282317 100644 --- a/docs/code/interfaces/types_subscription.TransactionSubscriptionResult.md +++ b/docs/code/interfaces/types_subscription.TransactionSubscriptionResult.md @@ -30,7 +30,7 @@ of the subscription poll. [types/subscription.ts:29](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L29) ---- +___ ### currentRound @@ -42,7 +42,7 @@ The current detected tip of the configured Algorand blockchain. [types/subscription.ts:11](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L11) ---- +___ ### newWatermark @@ -58,7 +58,7 @@ subscribed transactions to keep it reliable. [types/subscription.ts:19](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L19) ---- +___ ### startingWatermark @@ -70,7 +70,7 @@ The watermark value that was retrieved at the start of the subscription poll. [types/subscription.ts:13](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L13) ---- +___ ### subscribedTransactions @@ -85,7 +85,7 @@ to represent the data with some additional fields. [types/subscription.ts:25](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L25) ---- +___ ### syncedRoundRange diff --git a/docs/code/modules/index.md b/docs/code/modules/index.md index 8fb9dd1..02cc148 100644 --- a/docs/code/modules/index.md +++ b/docs/code/modules/index.md @@ -23,11 +23,11 @@ blockchain for the given subscription context. #### Parameters -| Name | Type | Description | -| :------------- | :--------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------ | -| `subscription` | [`TransactionSubscriptionParams`](../interfaces/types_subscription.TransactionSubscriptionParams.md) | The subscription context. | -| `algod` | `default` | An Algod client. | -| `indexer?` | `default` | An optional indexer client, only needed when `onMaxRounds` is `catchup-with-indexer`. | +| Name | Type | Description | +| :------ | :------ | :------ | +| `subscription` | [`TransactionSubscriptionParams`](../interfaces/types_subscription.TransactionSubscriptionParams.md) | The subscription context. | +| `algod` | `default` | An Algod client. | +| `indexer?` | `default` | An optional indexer client, only needed when `onMaxRounds` is `catchup-with-indexer`. | #### Returns diff --git a/docs/code/modules/types.md b/docs/code/modules/types.md index 9860e0a..7016363 100644 --- a/docs/code/modules/types.md +++ b/docs/code/modules/types.md @@ -52,229 +52,229 @@ Re-exports [AlgorandSubscriberConfig](../interfaces/types_subscription.AlgorandSubscriberConfig.md) ---- +___ ### Arc28Event Re-exports [Arc28Event](../interfaces/types_arc_28.Arc28Event.md) ---- +___ ### Arc28EventGroup Re-exports [Arc28EventGroup](../interfaces/types_arc_28.Arc28EventGroup.md) ---- +___ ### Arc28EventToProcess Re-exports [Arc28EventToProcess](../interfaces/types_arc_28.Arc28EventToProcess.md) ---- +___ ### AsyncEventEmitter Re-exports [AsyncEventEmitter](../classes/types_async_event_emitter.AsyncEventEmitter.md) ---- +___ ### AsyncEventListener Re-exports [AsyncEventListener](types_async_event_emitter.md#asynceventlistener) ---- +___ ### BalanceChange Re-exports [BalanceChange](../interfaces/types_subscription.BalanceChange.md) ---- +___ ### BalanceChangeRole Re-exports [BalanceChangeRole](../enums/types_subscription.BalanceChangeRole.md) ---- +___ ### BeforePollMetadata Re-exports [BeforePollMetadata](../interfaces/types_subscription.BeforePollMetadata.md) ---- +___ ### Block Re-exports [Block](../interfaces/types_block.Block.md) ---- +___ ### BlockAgreementCertificate Re-exports [BlockAgreementCertificate](../interfaces/types_block.BlockAgreementCertificate.md) ---- +___ ### BlockData Re-exports [BlockData](../interfaces/types_block.BlockData.md) ---- +___ ### BlockInnerTransaction Re-exports [BlockInnerTransaction](types_block.md#blockinnertransaction) ---- +___ ### BlockMetadata Re-exports [BlockMetadata](../interfaces/types_subscription.BlockMetadata.md) ---- +___ ### BlockRewards Re-exports [BlockRewards](../interfaces/types_subscription.BlockRewards.md) ---- +___ ### BlockStateProofTracking Re-exports [BlockStateProofTracking](../interfaces/types_subscription.BlockStateProofTracking.md) ---- +___ ### BlockTransaction Re-exports [BlockTransaction](../interfaces/types_block.BlockTransaction.md) ---- +___ ### BlockTransactionEvalDelta Re-exports [BlockTransactionEvalDelta](../interfaces/types_block.BlockTransactionEvalDelta.md) ---- +___ ### BlockUpgradeState Re-exports [BlockUpgradeState](../interfaces/types_subscription.BlockUpgradeState.md) ---- +___ ### BlockUpgradeVote Re-exports [BlockUpgradeVote](../interfaces/types_subscription.BlockUpgradeVote.md) ---- +___ ### BlockValueDelta Re-exports [BlockValueDelta](../interfaces/types_block.BlockValueDelta.md) ---- +___ ### BlockVote Re-exports [BlockVote](../interfaces/types_block.BlockVote.md) ---- +___ ### CoreTransactionSubscriptionParams Re-exports [CoreTransactionSubscriptionParams](../interfaces/types_subscription.CoreTransactionSubscriptionParams.md) ---- +___ ### EmittedArc28Event Re-exports [EmittedArc28Event](../interfaces/types_arc_28.EmittedArc28Event.md) ---- +___ ### ErrorListener Re-exports [ErrorListener](types_subscription.md#errorlistener) ---- +___ ### LogicSig Re-exports [LogicSig](../interfaces/types_block.LogicSig.md) ---- +___ ### MultisigSig Re-exports [MultisigSig](../interfaces/types_block.MultisigSig.md) ---- +___ ### NamedTransactionFilter Re-exports [NamedTransactionFilter](../interfaces/types_subscription.NamedTransactionFilter.md) ---- +___ ### ParticipationUpdates Re-exports [ParticipationUpdates](../interfaces/types_subscription.ParticipationUpdates.md) ---- +___ ### StateProof Re-exports [StateProof](../interfaces/types_block.StateProof.md) ---- +___ ### StateProofMessage Re-exports [StateProofMessage](../interfaces/types_block.StateProofMessage.md) ---- +___ ### StateProofTracking Re-exports [StateProofTracking](../interfaces/types_block.StateProofTracking.md) ---- +___ ### SubscribedTransaction Re-exports [SubscribedTransaction](types_subscription.md#subscribedtransaction) ---- +___ ### SubscriberConfigFilter Re-exports [SubscriberConfigFilter](../interfaces/types_subscription.SubscriberConfigFilter.md) ---- +___ ### TransactionFilter Re-exports [TransactionFilter](../interfaces/types_subscription.TransactionFilter.md) ---- +___ ### TransactionInBlock Re-exports [TransactionInBlock](../interfaces/types_block.TransactionInBlock.md) ---- +___ ### TransactionSubscriptionParams Re-exports [TransactionSubscriptionParams](../interfaces/types_subscription.TransactionSubscriptionParams.md) ---- +___ ### TransactionSubscriptionResult Re-exports [TransactionSubscriptionResult](../interfaces/types_subscription.TransactionSubscriptionResult.md) ---- +___ ### TypedAsyncEventListener diff --git a/docs/code/modules/types_async_event_emitter.md b/docs/code/modules/types_async_event_emitter.md index 3f7bf3a..013d19a 100644 --- a/docs/code/modules/types_async_event_emitter.md +++ b/docs/code/modules/types_async_event_emitter.md @@ -26,9 +26,9 @@ An asynchronous event listener ##### Parameters -| Name | Type | -| :---------- | :------------------- | -| `event` | `unknown` | +| Name | Type | +| :------ | :------ | +| `event` | `unknown` | | `eventName` | `string` \| `symbol` | ##### Returns diff --git a/docs/code/modules/types_block.md b/docs/code/modules/types_block.md index 593a169..636356b 100644 --- a/docs/code/modules/types_block.md +++ b/docs/code/modules/types_block.md @@ -28,7 +28,7 @@ ### BlockInnerTransaction -Ƭ **BlockInnerTransaction**: `Omit`\<[`BlockTransaction`](../interfaces/types_block.BlockTransaction.md), `"hgi"` \| `"hgh"`\> +Ƭ **BlockInnerTransaction**: `Omit`\<[`BlockTransaction`](../interfaces/types_block.BlockTransaction.md), ``"hgi"`` \| ``"hgh"``\> Data that is returned in a raw Algorand block for a single inner transaction diff --git a/docs/code/modules/types_subscription.md b/docs/code/modules/types_subscription.md index 5a08980..c20601e 100644 --- a/docs/code/modules/types_subscription.md +++ b/docs/code/modules/types_subscription.md @@ -44,8 +44,8 @@ ##### Parameters -| Name | Type | -| :------ | :-------- | +| Name | Type | +| :------ | :------ | | `error` | `unknown` | ##### Returns @@ -56,26 +56,25 @@ [types/subscription.ts:391](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L391) ---- +___ ### SubscribedTransaction -Ƭ **SubscribedTransaction**: `TransactionResult` & \{ `arc28Events?`: [`EmittedArc28Event`](../interfaces/types_arc_28.EmittedArc28Event.md)[] ; `balanceChanges?`: [`BalanceChange`](../interfaces/types_subscription.BalanceChange.md)[] ; `filtersMatched?`: `string`[] ; `inner-txns?`: [`SubscribedTransaction`](types_subscription.md#subscribedtransaction)[] ; `parentTransactionId?`: `string` } +Ƭ **SubscribedTransaction**: `TransactionResult` & \{ `arc28Events?`: [`EmittedArc28Event`](../interfaces/types_arc_28.EmittedArc28Event.md)[] ; `balanceChanges?`: [`BalanceChange`](../interfaces/types_subscription.BalanceChange.md)[] ; `filtersMatched?`: `string`[] ; `inner-txns?`: [`SubscribedTransaction`](types_subscription.md#subscribedtransaction)[] ; `parentTransactionId?`: `string` } The common model used to expose a transaction that is returned from a subscription. -Substantively, based on the Indexer [`TransactionResult` model](https://developer.algorand.org/docs/rest-apis/indexer/#transaction) 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 +Substantively, based on the Indexer [`TransactionResult` model](https://developer.algorand.org/docs/rest-apis/indexer/#transaction) 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 #### Defined in [types/subscription.ts:161](https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/src/types/subscription.ts#L161) ---- +___ ### TypedAsyncEventListener @@ -84,8 +83,8 @@ Substantively, based on the Indexer [`TransactionResult` model](https://develope #### Type parameters | Name | -| :--- | -| `T` | +| :------ | +| `T` | #### Type declaration @@ -93,9 +92,9 @@ Substantively, based on the Indexer [`TransactionResult` model](https://develope ##### Parameters -| Name | Type | -| :---------- | :------------------- | -| `event` | `T` | +| Name | Type | +| :------ | :------ | +| `event` | `T` | | `eventName` | `string` \| `symbol` | ##### Returns From cafbb4b6f1d557332434d9866ae7f6e74d2f26dc Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Fri, 12 Jul 2024 16:38:48 +1000 Subject: [PATCH 09/10] update utils version dependency --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 80da186..be4519a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "node": ">=18.0" }, "peerDependencies": { - "@algorandfoundation/algokit-utils": "6.1.0-beta.3", + "@algorandfoundation/algokit-utils": "6.1.0-beta.4", "algosdk": "^2.7.0" } }, @@ -59,9 +59,9 @@ } }, "node_modules/@algorandfoundation/algokit-utils": { - "version": "6.1.0-beta.3", - "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-6.1.0-beta.3.tgz", - "integrity": "sha512-quDCUXlk3xmImAcWsHZfCiWWHdf3O6lvt4Yykd6Bt3G1k6khlcd28cLAv973pDibILk17l1HxC/j6PUSKvPSNg==", + "version": "6.1.0-beta.4", + "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-6.1.0-beta.4.tgz", + "integrity": "sha512-m7Gg0olYBHChL5WHoOH2SVWV7M9dl7yZulyVCIdPH+HJUEE6TsdEYfq95uYmec420WX2eHeZ5tcguSHBv2UJvw==", "peer": true, "dependencies": { "buffer": "^6.0.3" diff --git a/package.json b/package.json index ec24e56..1284c7a 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "js-sha512": "^0.9.0" }, "peerDependencies": { - "@algorandfoundation/algokit-utils": "6.1.0-beta.3", + "@algorandfoundation/algokit-utils": "6.1.0-beta.4", "algosdk": "^2.7.0" }, "overrides": { From fc49d8043041f093baa38f66de1abe3dae1c94fc Mon Sep 17 00:00:00 2001 From: Negar Abbasi Date: Fri, 12 Jul 2024 17:00:56 +1000 Subject: [PATCH 10/10] update utils version --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index be4519a..b44987d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "node": ">=18.0" }, "peerDependencies": { - "@algorandfoundation/algokit-utils": "6.1.0-beta.4", + "@algorandfoundation/algokit-utils": "^6.1.0", "algosdk": "^2.7.0" } }, @@ -59,9 +59,9 @@ } }, "node_modules/@algorandfoundation/algokit-utils": { - "version": "6.1.0-beta.4", - "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-6.1.0-beta.4.tgz", - "integrity": "sha512-m7Gg0olYBHChL5WHoOH2SVWV7M9dl7yZulyVCIdPH+HJUEE6TsdEYfq95uYmec420WX2eHeZ5tcguSHBv2UJvw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-6.1.0.tgz", + "integrity": "sha512-rrakN+k5/SPd0RPZHLbpN9H+QQVud/NpbaVUCWVkBflHYvsM0sGaXUNNuHucqttR7uhvJwVfFnRe81aHyukMAA==", "peer": true, "dependencies": { "buffer": "^6.0.3" diff --git a/package.json b/package.json index 1284c7a..7fcc5ef 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "js-sha512": "^0.9.0" }, "peerDependencies": { - "@algorandfoundation/algokit-utils": "6.1.0-beta.4", + "@algorandfoundation/algokit-utils": "^6.1.0", "algosdk": "^2.7.0" }, "overrides": {