Config for hypersync event streaming.

interface StreamConfig {
    batchSize?: number;
    columnMapping?: ColumnMapping;
    concurrency?: number;
    eventSignature?: string;
    hexOutput?: HexOutput;
    maxBatchSize?: number;
    maxBufferedBytes?: number;
    maxNumBlocks?: number;
    maxNumLogs?: number;
    maxNumTraces?: number;
    maxNumTransactions?: number;
    minBatchSize?: number;
    responseBytesTarget?: number;
    reverse?: boolean;
}

Properties

batchSize?: number

Initial, deliberately-overestimated batch size used for the first wave of requests and as a fallback before any response density is measured. Default: 1000.

columnMapping?: ColumnMapping

Column mapping for stream function output. It lets you map columns you want into the DataTypes you want.

concurrency?: number

Number of async threads that would be spawned to execute different block ranges of queries. Default: 10.

eventSignature?: string

Event signature used to populate decode logs. Decode logs would be empty if set to None.

hexOutput?: HexOutput

Determines formatting of binary columns numbers into utf8 hex. Default: NoEncode.

maxBatchSize?: number

Optional hard cap on the number of blocks per request. Leave unset (the default) for no cap: an over-large request is truncated by the server and the remainder is backfilled in parallel, so overshoot self-corrects.

maxBufferedBytes?: number

Optional cap on the bytes of fetched-but-undelivered chunks held in the reorder buffer (consumer backpressure). Leave unset (the default) for an adaptive cap that grows with the largest response seen.

maxNumBlocks?: number

Max number of blocks to fetch in a single request.

maxNumLogs?: number

Max number of logs to fetch in a single request.

maxNumTraces?: number

Max number of traces to fetch in a single request.

maxNumTransactions?: number

Max number of transactions to fetch in a single request.

minBatchSize?: number

Hard lower clamp on the projected block count, to avoid tiny ranges. Default: 200.

responseBytesTarget?: number

Target response size in bytes. Each request's block span is projected from the most recently observed byte-density to aim each response at this size. Default: 400000.

reverse?: boolean

Stream data in reverse order. Default: false.