ic-reactor
    Preparing search index...

    Interface HttpAgentOptions

    interface HttpAgentOptions {
        fetch?: typeof fetch;
        fetchOptions?: Record<string, unknown>;
        callOptions?: Record<string, unknown>;
        host?: string;
        identity?: types.Identity | Promise<types.Identity>;
        ingressExpiryInMinutes?: number;
        credentials?: { name: string; password?: string };
        useQueryNonces?: boolean;
        retryTimes?: number;
        backoffStrategy?: BackoffStrategyFactory;
        verifyQuerySignatures?: boolean;
        logToConsole?: boolean;
        rootKey?: Uint8Array<ArrayBufferLike>;
        shouldFetchRootKey?: boolean;
        shouldSyncTime?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    fetch?: typeof fetch
    fetchOptions?: Record<string, unknown>
    callOptions?: Record<string, unknown>
    host?: string
    ingressExpiryInMinutes?: number

    The maximum time a request can be delayed before being rejected.

    5 minutes
    
    credentials?: { name: string; password?: string }
    useQueryNonces?: boolean

    Adds a unique Nonce with each query. Enabling will prevent queries from being answered with a cached response.

    const agent = new HttpAgent({ useQueryNonces: true });
    agent.addTransform(makeNonceTransform(makeNonce);
    false
    
    retryTimes?: number

    Number of times to retry requests before throwing an error

    3
    
    backoffStrategy?: BackoffStrategyFactory

    The strategy to use for backoff when retrying requests

    verifyQuerySignatures?: boolean

    Whether the agent should verify signatures signed by node keys on query responses. Increases security, but adds overhead and must make a separate request to cache the node keys for the canister's subnet.

    true
    
    logToConsole?: boolean

    Whether to log to the console. Defaults to false.

    rootKey?: Uint8Array<ArrayBufferLike>

    Alternate root key to use for verifying certificates. If not provided, the default IC root key will be used.

    shouldFetchRootKey?: boolean

    Whether or not the root key should be automatically fetched during construction. Defaults to false.

    shouldSyncTime?: boolean

    Whether or not to sync the time with the network during construction. Defaults to false.