MCPcopy Create free account
hub / github.com/dfinity/orbit / createStationActor

Function createStationActor

cli/src/audit/agent.ts:35–47  ·  view source on GitHub ↗
(
  canisterId: string,
  network: string,
  identity: Identity,
)

Source from the content-addressed store, hash-verified

33};
34
35export const createStationActor = async (
36 canisterId: string,
37 network: string,
38 identity: Identity,
39): Promise<ActorSubclass> => {
40 const host = await resolveHost(network);
41 const agent = new HttpAgent({ host, identity });
42 if (network !== 'ic') {
43 // Local replicas need their root key fetched to verify certificates.
44 await agent.fetchRootKey();
45 }
46 return Actor.createActor(idlFactory, { agent, canisterId });
47};

Callers 1

buildStationActorFunction · 0.90

Calls 1

resolveHostFunction · 0.85

Tested by

no test coverage detected