DefineReactorSharedParameters
Defined in: react/src/defineReactor.ts:81
Options shared by both the standard and display variants of defineReactor.
Extends
Section titled “Extends”Omit<ReactorParameters,"clientManager">.Omit<ClientManagerParameters,"queryClient">
Extended by
Section titled “Extended by”Properties
Section titled “Properties”agentOptions?
Section titled “agentOptions?”
optionalagentOptions?:HttpAgentOptions
Defined in: core/src/types/client.ts:18
Optional configuration for the underlying HttpAgent.
Inherited from
Section titled “Inherited from”ClientManagerParameters.agentOptions
allowEnvConfig?
Section titled “allowEnvConfig?”
optionalallowEnvConfig?:boolean
Defined in: core/src/types/client.ts:36
Whether to trust the configuration carried by the ic_env cookie.
Three values are read from that cookie, and this flag governs all of them: the agent root key certificate verification is checked against, the Internet Identity provider, and the canister ID a reactor resolves by name when none is configured.
Defaults to true only when the agent host AND the page the code is
running on are both unambiguously a local replica (loopback, localhost,
and the dev-container domains that tunnel one). Cookies are not
origin-isolated — any sibling subdomain of the registrable domain can write
ic_env — and it is the PAGE that decides who those siblings are, so a
document on a real domain is not trusted even when it points its agent at
a loopback replica. Anything else must opt in: set this when you run a
custom testnet on a real domain and trust its ic_env.
Inherited from
Section titled “Inherited from”ClientManagerParameters.allowEnvConfig
allowEnvRootKey?
Section titled “allowEnvRootKey?”
optionalallowEnvRootKey?:boolean
Defined in: core/src/types/client.ts:46
Deprecated
Section titled “Deprecated”Superseded by allowEnvConfig, which governs every value
read from the ic_env cookie rather than the root key alone.
Still honoured, and still scoped to what it always granted: the root key.
It deliberately does not extend to the Internet Identity provider or to a
reactor’s canister ID — setting it for a custom testnet was not an
agreement to take those from a cookie too. Use allowEnvConfig for that.
Inherited from
Section titled “Inherited from”ClientManagerParameters.allowEnvRootKey
name:
string
Defined in: core/src/types/reactor.ts:71
Inherited from
Section titled “Inherited from”idlFactory
Section titled “idlFactory”idlFactory: (
IDL) =>any
Defined in: core/src/types/reactor.ts:72
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”any
Inherited from
Section titled “Inherited from”canisterId?
Section titled “canisterId?”
optionalcanisterId?:CanisterId
Defined in: core/src/types/reactor.ts:73
Inherited from
Section titled “Inherited from”pollingOptions?
Section titled “pollingOptions?”
optionalpollingOptions?:PollingOptions
Defined in: core/src/types/reactor.ts:74
Inherited from
Section titled “Inherited from”ReactorParameters.pollingOptions
clientManager?
Section titled “clientManager?”
optionalclientManager?:ClientManager
Defined in: react/src/defineReactor.ts:93
Reuse an existing ClientManager (e.g. to share one agent across canisters). When omitted, a ClientManager is created from the agent options below.
A supplied or adopted manager brings its own agent and QueryClient, so
agentOptions, queryClient and allowEnvConfig apply only when this
call creates one.
queryClient?
Section titled “queryClient?”
optionalqueryClient?:QueryClient
Defined in: react/src/defineReactor.ts:100
QueryClient for a ClientManager created by this call.
Ignored when clientManager or authentication is supplied — queries run
against that manager’s own QueryClient, which is what is returned.
authentication?
Section titled “authentication?”
optionalauthentication?:AuthenticationManager
Defined in: react/src/defineReactor.ts:109
Reuse an existing AuthenticationManager, so several reactors share one Internet Identity session. When omitted, one is created for this reactor.
Its clientManager is adopted for this reactor, so sign-in updates the
same agent the reactor calls through. Supplying a different clientManager
alongside it is rejected.
optionalauth?:Omit<AuthenticationManagerParameters,"clientManager">
Defined in: react/src/defineReactor.ts:117
Internet Identity options forwarded to the AuthenticationManager
(identityProvider, derivationOrigin, idleOptions, storage, …).
Mutually exclusive with authentication: a manager built elsewhere is
already configured, so these could not be applied to it.