Skip to content
IC Reactor

ClientOptions

ClientOptions = object & { identity: Identity | "anonymous"; auth?: never; } | { auth: () => AuthLike; identity?: never; }

Defined in: core/src/client.ts:135

Options for createClient: a network, and exactly one of identity and auth, so that who calls is always written down.

readonly network: Network

Where the canisters are. See Network.

readonly optional allowEnvConfig?: boolean

Whether the ic_env cookie (root key and canister ids) is believed. See the network option; absent trusts it only when both the page and the replica are local.

readonly optional fetch?: typeof globalThis.fetch

The fetch every agent of this client sends with. Defaults to the global one. Tests pass a fake replica’s fetch here; nothing global is touched.

readonly optional maxDepth?: number

How deep a decoded reply may nest. Defaults to 256. Raise it for replies that nest deeper, such as an ICRC-3 block log’s values.