createAgent static method
Implementation
static Future<AgentFactory> createAgent({
required String canisterId,
required String url,
required Service idl,
Identity? identity,
bool? debug = true,
}) async {
final agentFactory = AgentFactory(
canisterId: canisterId,
url: url,
idl: idl,
identity: identity ?? const AnonymousIdentity(),
debug: debug,
);
await agentFactory.initAgent(url);
agentFactory.setActor();
return agentFactory;
}