Having an Internet Identity account, in my code I want to determine the ICP token address of the user.
At least, I want to check the given ICP token address, whether it belongs to the current user.
How?
Having an Internet Identity account, in my code I want to determine the ICP token address of the user.
At least, I want to check the given ICP token address, whether it belongs to the current user.
How?
What language are you trying to do this in? Every library that provides an interface to the ledger should be able to do this. If you want to do it manually, use dfx ledger account-id --of-principal <principal>
I am trying to do it in Motoko language.
The best I know for Motoko is this file: examples/motoko/ledger-transfer/src/ledger_transfer/Account.mo at master · dfinity/examples · GitHub