Configuration that can be passed to customize the Actor behaviour.

interface ActorConfig {
    agent?: utils.agent.Agent;
    pollingStrategyFactory?: utils.agent.polling.PollStrategyFactory;
    effectiveCanisterId?: any;
    canisterId: any;
    blsVerify?: VerifyFunc;
    callTransform?(methodName, args, callConfig): void | Partial<utils.agent.CallConfig>;
    queryTransform?(methodName, args, callConfig): void | Partial<utils.agent.CallConfig>;
}

Hierarchy (view full)

Properties

agent?: utils.agent.Agent

An agent to use in this call, otherwise the actor or call will try to discover the agent to use.

pollingStrategyFactory?: utils.agent.polling.PollStrategyFactory

A polling strategy factory that dictates how much and often we should poll the read_state endpoint to get the result of an update call.

effectiveCanisterId?: any

The effective canister ID. This should almost always be ignored.

canisterId: any

The Canister ID of this Actor. This is required for an Actor.

blsVerify?: VerifyFunc

Polyfill for BLS Certificate verification in case wasm is not supported

Methods

  • An override function for update calls' CallConfig. This will be called on every calls.

    Parameters

    Returns void | Partial<utils.agent.CallConfig>

  • An override function for query calls' CallConfig. This will be called on every query.

    Parameters

    Returns void | Partial<utils.agent.CallConfig>