Is it possible to determine whether principal is internet identity from a canister? Any example code as well (motoko specifically)?
Hi @Iceypee
It is not possible to determine from a principal if it belongs to Internet Identity. However, you could send along the delegation public key which contains the II canister id as per specification.
Unfortunately, I don’t have a Motoko example at hand that shows how to do that. But here is some Rust code that shows how to extract the canister id from the public key: ic-canister-sig-creation/src/lib.rs at bb1bf7c4114190b1b754a85847d1a7040358184d · dfinity/ic-canister-sig-creation · GitHub
I hope this helps.