RAILGUN Reloaded
    Preparing search index...

    Type Alias BalanceSyncSchedulerConfig

    Constructor options for BalanceSyncScheduler.

    type BalanceSyncSchedulerConfig = {
        client: BalanceSyncSchedulerClient;
        chainId: number;
        wallets?: BalanceSyncSchedulerWallet[];
        dataSourceFactory: BalanceSyncDataSourceFactory;
        getHead?: BalanceSyncHeadProvider;
        intervalMs?: number;
        minIntervalMs?: number;
        confirmations?: bigint | number;
        headPollMs?: number;
        backoff?: BalanceSyncBackoffOptions;
        onError?: (
            error: unknown,
            context: BalanceSyncSchedulerErrorContext,
        ) => void;
    }
    Index

    Client whose scan and decrypt each pass calls.

    chainId: number

    Chain ID of the network that the scheduler syncs.

    Initial wallet targets.

    dataSourceFactory: BalanceSyncDataSourceFactory

    Builds the data source for the scan of each pass.

    Chain head provider. When set, each pass scans and decrypts up to the head minus confirmations.

    intervalMs?: number

    Delay in milliseconds from the end of a pass to the next periodic pass. Defaults to 60000.

    minIntervalMs?: number

    Smallest gap in milliseconds between the end of a pass and the start of the next. Defaults to 0.

    confirmations?: bigint | number

    Number of blocks subtracted from the head that getHead returns. Must be a non-negative integer. Defaults to 0.

    headPollMs?: number

    Poll interval in milliseconds while a pass waits for the confirmed head to reach afterBlock. Defaults to 1000.

    Retry delay after a failed pass.

    onError?: (error: unknown, context: BalanceSyncSchedulerErrorContext) => void

    Called for each failed pass. An error that it throws is discarded.