Confusion between Principal and Wallet ID

Hello :slight_smile:
I’ve run a simple WhoAmI canister, exacty like this one

When I call the whoami function from the terminal with dfx I’m getting back the ID of the wallet associated with my identity and not the principal of my identity, it’s not what I expect reading from the documentation.

I’m confused, is it normal ?
Dfx version 0.7.0

In 0.7.0, are you doing dfx canister call <id> whoami in which case yes, you’ll see the principal of your wallet returned. This is because all dfx canister calls are proxied via your wallet canister. To get the principal of your selected identity returned, you’ll have to do dfx canister --no-wallet call <id> whoami
This behavior (proxying via wallet by default) will change in the not-yet-promoted-to-latest 0.7.1
There have been some docs changes pushed out the the docs article you linked in anticipation of 0.7.1
I’ll make a forum post when we promote that to latest. In


Indeed it’s working with --no-wallet, thanks!

1 Like