Type alias WatchBlocksParameters<TTransport, TChain, TIncludeTransactions, TBlockTag>

WatchBlocksParameters<TTransport, TChain, TIncludeTransactions, TBlockTag>: {
    onBlock: OnBlock<TChain, TIncludeTransactions, TBlockTag>;
    onError?: ((error) => void);
} & (GetTransportConfig<TTransport>["type"] extends "webSocket"
    ? {
        blockTag?: never;
        emitMissed?: never;
        emitOnBegin?: never;
        includeTransactions?: never;
        poll?: false;
        pollingInterval?: never;
    } | PollOptions<TIncludeTransactions, TBlockTag> & {
        poll?: true;
    }
    : PollOptions<TIncludeTransactions, TBlockTag> & {
        poll?: true;
    })

Type Parameters

Type declaration

  • onBlock: OnBlock<TChain, TIncludeTransactions, TBlockTag>

    The callback to call when a new block is received.

  • Optional onError?: ((error) => void)
      • (error): void
      • The callback to call when an error occurred when trying to get for a new block.

        Parameters

        Returns void

Generated using TypeDoc