What is difference between project specific ledger account-id and account in NNS?


Account 1 (the one in NNS)
I have an internet identity created (based on Yubikey) and see one account address in NNS (nns.ic0.app). I also transferred some ICP token from Coinbase exchange to this account. That all worked fine.

Account 2 (the dfx ledger account-id one in local dfx created project)
I also followed Network deployment :: Internet Computer (dfinity.org) and created a local project with default developer identity (based on auto generated PEM key) plus associated ledger account address. But that account is newly created with the project and has no ICP token.

These 2 different type of accounts both have address and can hold ICP. I’m new to the dfx and get confused with following questions.

  1. Can we change local dfx project to use different ledger account (e.g., the account address from NNS that has ICP)?
  2. I already transferred some ICP from my NNS account to the local project’s ledger account but subnets are not available to deploy public apps. How do we login NNS using local project’s ledger account to init transactions to transfer ICP back to other account? That local ledger account does not have Internet Identity associated and I’m not sure how to login NNS to manage the ICP it holds.

Any suggestions are much appreciated. Thank you.

1 Like
  1. Yes, you can use dfx identity -h to list how to create a new account with new private key.
  2. You can use dfx ledger -h to list how to transfer ICP. More info:
    List_neurons: how to get list of (active, dissolving, dissolved) neurons belonging to principal id - #2 by cryptoschindler

Thanks a lot for the links. It is very useful and I found dfx command to transfer ICP between accounts.

But the dfx identity import still does not seem to work with account from NNS. My understanding the NNS uses Internet Identity (ic0.app) that is based on Yubikey and I didn’t find any option in NNS to export private key. So it is still not possible to import account from NNS to local dfx project and use the ICP tokens.

The only option I found so far is to transfer ICP from account in NNS to local dfx project associated ledger account’s address. But it charges 0.0001 ICP fee.