algokit-subscriber-ts

@algorandfoundation/algokit-subscriber / types/subscription / AlgorandSubscriberConfig

Interface: AlgorandSubscriberConfig

types/subscription.AlgorandSubscriberConfig

Configuration for an AlgorandSubscriber.

Hierarchy

Table of contents

Properties

Properties

arc28Events

Optional arc28Events: Arc28EventGroup[]

Any ARC-28 event definitions to process from app call logs

Inherited from

CoreTransactionSubscriptionParams.arc28Events

Defined in

src/types/subscription.ts:260


filters

filters: SubscriberConfigFilter<unknown>[]

The set of filters to subscribe to / emit events for, along with optional data mappers.

Overrides

CoreTransactionSubscriptionParams.filters

Defined in

src/types/subscription.ts:388


frequencyInSeconds

Optional frequencyInSeconds: number

The frequency to poll for new blocks in seconds; defaults to 1s

Defined in

src/types/subscription.ts:390


maxIndexerRoundsToSync

Optional maxIndexerRoundsToSync: number

The maximum number of rounds to sync from indexer when using `syncBehaviour: ‘catchup-with-indexer’.

By default there is no limit and it will paginate through all of the rounds. Sometimes this can result in an incredibly long catchup time that may break the service due to execution and memory constraints, particularly for filters that result in a large number of transactions.

Instead, this allows indexer catchup to be split into multiple polls, each with a transactionally consistent boundary based on the number of rounds specified here.

Inherited from

CoreTransactionSubscriptionParams.maxIndexerRoundsToSync

Defined in

src/types/subscription.ts:280


maxRoundsToSync

Optional maxRoundsToSync: number

The maximum number of rounds to sync from algod for each subscription pull/poll.

Defaults to 500.

This gives you control over how many rounds you wait for at a time, your staleness tolerance when using skip-sync-newest or fail, and your catchup speed when using sync-oldest.

Inherited from

CoreTransactionSubscriptionParams.maxRoundsToSync

Defined in

src/types/subscription.ts:269


syncBehaviour

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:

Inherited from

CoreTransactionSubscriptionParams.syncBehaviour

Defined in

src/types/subscription.ts:298


waitForBlockWhenAtTip

Optional waitForBlockWhenAtTip: boolean

Whether to wait via algod /status/wait-for-block-after endpoint when at the tip of the chain; reduces latency of subscription

Defined in

src/types/subscription.ts:392


watermarkPersistence

watermarkPersistence: Object

Methods to retrieve and persist the current watermark so syncing is resilient and maintains its position in the chain

Type declaration

Name Type Description
get () => Promise<bigint> -
set (newWatermark: bigint) => Promise<void> -

Defined in

src/types/subscription.ts:395