Interface UseSharedCallParameters<A, M>

Configuration to make calls to the Replica.

interface UseSharedCallParameters<A, M> {
    agent?: utils.agent.Agent;
    pollingStrategyFactory?: utils.agent.polling.PollStrategyFactory;
    canisterId?: any;
    effectiveCanisterId?: any;
    functionName: M;
    args?: types.ActorMethodParameters<A[M]>;
    onLoading?: ((loading) => void);
    onError?: ((error) => void);
    onSuccess?: ((data) => void);
    onSuccessResult?: ((result) => void);
    throwOnError?: boolean;
    compileResult?: boolean;
}

Type Parameters

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.

canisterId?: any

The canister ID of this Actor.

effectiveCanisterId?: any

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

functionName: M
onLoading?: ((loading) => void)

Type declaration

    • (loading): void
    • Parameters

      • loading: boolean

      Returns void

onError?: ((error) => void)

Type declaration

    • (error): void
    • Parameters

      Returns void

onSuccess?: ((data) => void)

Type declaration

onSuccessResult?: ((result) => void)

Type declaration

throwOnError?: boolean
compileResult?: boolean