ic-reactor
    Preparing search index...

    Interface ActorManager<A>

    interface ActorManager<A = types.BaseActor> {
        canisterId: string;
        actorStore: types.ActorStore<A>;
        visitFunction: types.VisitService<A>;
        methodAttributes: types.MethodAttributes<A>;
        updateMethodState: (
            method: Extract<keyof A>,
            hash: string,
            newState: Partial<types.ActorMethodState<A, typeof method>[string]>,
        ) => void;
        initialize: (options?: types.UpdateAgentParameters) => Promise<void>;
        extractInterface: () => types.IDL.ServiceClass;
        extractMethodAttributes: () => types.MethodAttributes<A>;
        extractVisitor: () => types.VisitService<A>;
        callMethod: <M extends string>(
            functionName: M,
            ...args: types.ActorMethodParameters<A[M]>,
        ) => Promise<types.ActorMethodReturnType<A[M]>>;
        callMethodWithOptions: (
            options: utils.agent.CallConfig,
        ) => <M extends string>(
            functionName: M,
            ...args: types.ActorMethodParameters<A[M]>,
        ) => Promise<types.ActorMethodReturnType<A[M]>>;
        call: <M extends string>(
            functionName: M,
            ...args: types.ActorMethodParameters<A[M]>,
        ) => Promise<types.ActorMethodReturnType<A[M]>>;
        getActor: () => null | A;
        getState: () => types.ActorState;
        subscribeActorState: {
            (
                listener: (
                    selectedState: types.ActorState,
                    previousSelectedState: types.ActorState,
                ) => void,
            ): () => void;
            <U>(
                selector: (state: types.ActorState) => U,
                listener: (selectedState: U, previousSelectedState: U) => void,
                options?: {
                    equalityFn?: (a: U, b: U) => boolean;
                    fireImmediately?: boolean;
                },
            ): () => void;
        };
        setState: {
            (
                ...args: [
                    partial: | types.ActorState<A>
                    | Partial<types.ActorState<A>>
                    | (
                        (
                            state: types.ActorState,
                        ) => types.ActorState<A> | Partial<types.ActorState<A>>
                    ),
                    replace?: false,
                    action?: Action,
                ],
            ): void;
            (
                ...args: [
                    state: | types.ActorState<A>
                    | ((state: types.ActorState) => types.ActorState),
                    replace: true,
                    action?: Action,
                ],
            ): void;
        };
        cleanup: () => void;
        get agentManager(): types.AgentManager;
    }

    Type Parameters

    Index

    Properties

    canisterId: string
    actorStore: types.ActorStore<A>
    visitFunction: types.VisitService<A>
    methodAttributes: types.MethodAttributes<A>
    updateMethodState: (
        method: Extract<keyof A>,
        hash: string,
        newState: Partial<types.ActorMethodState<A, typeof method>[string]>,
    ) => void
    initialize: (options?: types.UpdateAgentParameters) => Promise<void>
    extractInterface: () => types.IDL.ServiceClass
    extractMethodAttributes: () => types.MethodAttributes<A>
    extractVisitor: () => types.VisitService<A>
    callMethod: <M extends string>(
        functionName: M,
        ...args: types.ActorMethodParameters<A[M]>,
    ) => Promise<types.ActorMethodReturnType<A[M]>>
    callMethodWithOptions: (
        options: utils.agent.CallConfig,
    ) => <M extends string>(
        functionName: M,
        ...args: types.ActorMethodParameters<A[M]>,
    ) => Promise<types.ActorMethodReturnType<A[M]>>
    call: <M extends string>(
        functionName: M,
        ...args: types.ActorMethodParameters<A[M]>,
    ) => Promise<types.ActorMethodReturnType<A[M]>>
    getActor: () => null | A
    getState: () => types.ActorState
    subscribeActorState: {
        (
            listener: (
                selectedState: types.ActorState,
                previousSelectedState: types.ActorState,
            ) => void,
        ): () => void;
        <U>(
            selector: (state: types.ActorState) => U,
            listener: (selectedState: U, previousSelectedState: U) => void,
            options?: {
                equalityFn?: (a: U, b: U) => boolean;
                fireImmediately?: boolean;
            },
        ): () => void;
    }
    setState: {
        (
            ...args: [
                partial: | types.ActorState<A>
                | Partial<types.ActorState<A>>
                | (
                    (
                        state: types.ActorState,
                    ) => types.ActorState<A> | Partial<types.ActorState<A>>
                ),
                replace?: false,
                action?: Action,
            ],
        ): void;
        (
            ...args: [
                state: | types.ActorState<A>
                | ((state: types.ActorState) => types.ActorState),
                replace: true,
                action?: Action,
            ],
        ): void;
    }
    cleanup: () => void

    Accessors