Function createActorManager

  • Actor manager handles the lifecycle of the actors. It is responsible for creating and managing the actors. You can use it to call and visit the actor's methods. It also provides a way to interact with the actor's state.

    Example


    import { createActorManager } from "@ic-reactor/core"
    import { candid, canisterId, idlFactory } from "./declarations/candid"
    import { agentManager } from "./agent"

    type Candid = typeof candid

    const candidActor = createActorManager<Candid>({
    agentManager,
    canisterId,
    idlFactory,
    })

    // Usage example
    const data = await candidActor.callMethod("version")
    console.log(data)
    
    

    Type Parameters

    Parameters

    Returns types.ActorManager<A>