Where's the documentation for casting canister ID as Text into an actor?


I know that we can cast a Canister ID of type Text into an actor, because I read or saw some source-code, but I haven’t found it documented anywhere, so surely I’m missing to find it.

I’d be interested to know and see examples which include the IDL/Candid (as I found here examples/main.mo at master · dfinity/examples · GitHub), thankfully provided by @claudio

Where is it documented?

Thank you!

Actually, I found it now ( Language quick reference :: Internet Computer ), but still might be useful to get some other examples or a good read on this subject.

Also, seems that is not recommended, so what’d be the best convention to work as we do with agentjs actors (as we provide the idl factory on instance creation)?

The best document found so far is of @claudio