@hiero-ledger/sdk
    Preparing search index...

    Class MirrorNodeHttpConfig

    Everything a Client holds for mirror node REST access, in one value.

    • transport carries provenance. null (the default) means the SDK builds a DefaultHttpTransport on first use and owns it; a non-null value was supplied by the application, which owns it and which Client.close() never closes.
    • transportConfiguration configures the transport the SDK would build. It is ignored when transport is non-null, and must be set before the first mirror REST call because the transport is built once per client.
    • retryPolicy governs every mirror REST call made through the client.
    • requestHeaders go on every mirror request, below any header a query sets for its endpoint. user-agent and x-user-agent are rejected, matched case-insensitively.

    Client.setMirrorNodeHttpConfig replaces the whole value rather than merging, and Client.getMirrorNodeHttpConfig returns what was supplied rather than what was resolved, so derive from the current value: client.setMirrorNodeHttpConfig({ ...client.getMirrorNodeHttpConfig(), transport }).

    Index

    Constructors

    • Parameters

      • Optionalprops: {
            requestHeaders?: Record<string, string>;
            retryPolicy?:
                | MirrorNodeHttpRetryPolicy
                | {
                    initialBackoff?: number;
                    maxAttempts?: number;
                    maxBackoff?: number;
                    perAttemptTimeout?: number;
                    retryableStatusCodes?: readonly number[];
                    totalDeadline?: number;
                };
            transport?: null
            | HttpTransport;
            transportConfiguration?:
                | HttpTransportConfiguration
                | {
                    connectTimeout?: number;
                    defaultHeaders?: Record<string, string>;
                    maxRedirects?: number;
                    maxResponseBytes?: number;
                };
        } = {}

      Returns MirrorNodeHttpConfig

    Properties

    requestHeaders: Readonly<Record<string, string>>
    transport: null | HttpTransport
    transportConfiguration: HttpTransportConfiguration

    Methods

    • Parameters

      • value:
            | undefined
            | null
            | MirrorNodeHttpConfig
            | {
                requestHeaders?: Record<string, string>;
                retryPolicy?:
                    | MirrorNodeHttpRetryPolicy
                    | {
                        initialBackoff?: number;
                        maxAttempts?: number;
                        maxBackoff?: number;
                        perAttemptTimeout?: number;
                        retryableStatusCodes?: readonly number[];
                        totalDeadline?: number;
                    };
                transport?: null
                | HttpTransport;
                transportConfiguration?:
                    | HttpTransportConfiguration
                    | {
                        connectTimeout?: number;
                        defaultHeaders?: Record<string, string>;
                        maxRedirects?: number;
                        maxResponseBytes?: number;
                    };
            }

      Returns MirrorNodeHttpConfig