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.
import { createActorManager } from "@ic-reactor/core"import { candid, canisterId, idlFactory } from "./declarations/candid"import { agentManager } from "./agent"type Candid = typeof candidconst candidActor = createActorManager<Candid>({ agentManager, canisterId, idlFactory,})// Usage exampleconst data = await candidActor.callMethod("version")console.log(data) Copy
import { createActorManager } from "@ic-reactor/core"import { candid, canisterId, idlFactory } from "./declarations/candid"import { agentManager } from "./agent"type Candid = typeof candidconst candidActor = createActorManager<Candid>({ agentManager, canisterId, idlFactory,})// Usage exampleconst data = await candidActor.callMethod("version")console.log(data)
Copy
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