I'm encountering difficulties retrieving the Principal of a Canister Class deployed within a main Canister, particularly in the context of the Map-Bucket example provided in the repository
(https://github.com/dfinity/examples/blob/master/motoko/classes/src/map/Map.mo)
Despite attempts such as using Principal.fromActor(bucket[i]), I haven't been successful. Could someone please advise on how to obtain a Bucket's principal without needing to implement the method getPrincipal() inside Bucket? Any insights or alternative approaches to address this issue would be invaluable.
I'm encountering difficulties retrieving the Principal of a Canister Class deployed within a main Canister, particularly in the context of the Map-Bucket example provided in the repository (https://github.com/dfinity/examples/blob/master/motoko/classes/src/map/Map.mo) Despite attempts such as using
Principal.fromActor(bucket[i])
, I haven't been successful. Could someone please advise on how to obtain a Bucket's principal without needing to implement the methodgetPrincipal()
inside Bucket? Any insights or alternative approaches to address this issue would be invaluable.