@thruputchain/client
    Preparing search index...

    Interface HttpTransportOptions

    Options for HttpTransport.

    interface HttpTransportOptions {
        batch?: boolean | HttpBatchOptions;
        fetch?: (
            input: string | URL | Request,
            init?: RequestInit,
        ) => Promise<Response>;
        headers?: Record<string, string>;
        timeoutMs?: number;
    }
    Index

    Properties

    batch?: boolean | HttpBatchOptions

    Group concurrent calls into JSON-RPC arrays. Disabled by default. true uses 100 calls and a zero-delay scheduling window.

    Requires an endpoint that accepts JSON-RPC arrays. Even one queued call is sent as an array. Responses are matched by ID, not response order. RPC errors reject their own calls; HTTP failures affect the whole batch. No retries or fallback requests are made, including for submissions.

    Batching provides no shared snapshot, execution order, or atomicity. Await dependent calls separately. Slow calls can delay other results. Cancelling one call rejects it without cancelling its peers; cancelling every call aborts the HTTP request. Cancellation cannot undo submitted work. timeoutMs starts at dispatch and covers reading the response body; the scheduling window is additional to that timeout.

    fetch?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>

    Custom fetch implementation, useful for tests or non-standard runtimes.

    headers?: Record<string, string>

    Additional HTTP headers to include with each JSON-RPC request.

    timeoutMs?: number

    Abort the request, including response-body reading, with a TimeoutError after this many milliseconds.