I see that
dfx identity command has an “import” and “export” sub-commands but they only export the private key of the identity.
It seems that I have to save the “cycles wallet” canister id and all other created canister ids myself. Besides that, it seems that “account-id” is derived from “principal id” which is in term generated from the exported private key. So, no need to save them.
If there is a way to query all canister ids for a specific principal / controller, then is not necessary to save them all. Is anyone aware for such a method?
I don’t think there is an “on-chain” command to list all canisters owned by a certain principal, but you can use 3rd party tools that track this sort of data. I used to use ic.rocks, but that site has had some issues lately, so I’ve been using ICSCAN (https://icscan.io/) lately and it works great.
Correct, there is no such thing. This choice was made consciously because a) privacy and b) efficiency (with no global controller registry any call to update canister settings can be handled by the subnet without talking to a global registry).
Canister IDs are ideally saved as part of source control, but wallets are in a weird state right now. For the moment, you’ll have to either export them using
dfx identity --network ic get-wallet or extract it manually from