4

I have an account which was initially created via near-cli.

I then geneated a ledger key:

near generate-key key --useLedgerKey="44'/397'/0'/0'/2'"

And added it to the account:

near add-key <account_id> <the key from the previous step>

I now open the wallet, click "Access your account", "Ledger Recovery", "Sign in with Ledger", "Sign In".

At this stage it asks me to confirm the public key, though doesn't really show which public key I am approving. I approve it on the ledger.

It asks me for the account id, I enter it. It says "user found".

I confirm, and it errors out with "No accounts are associated with this Ledger device. You must first create an account, then add this Ledger to it to login."

How do I get around it? Am I using the wrong path when generating the key?

Ishamael
  • 12,583
  • 4
  • 34
  • 52
  • It looks like this is available in the wallet as per github.com/near/near-wallet/issues/1536#issuecomment-891013721 but it still needs clear guidance how – Erik Trautman Aug 03 '21 at 15:00

4 Answers4

3

Currently, the NEAR Wallet only supports the default Ledger path: "44'/397'/0'/0'/1'"

If you add the public key that corresponds to this HD path to your account, you should be able to login successfully.

near generate-key key --useLedgerKey="44'/397'/0'/0'/1'"

Kendall Cole
  • 88
  • 1
  • 5
  • 1
    It looks like this is available in the wallet as per but still needs some guidance for people. https://github.com/near/near-wallet/issues/1536#issuecomment-891013721 – Erik Trautman Aug 03 '21 at 10:48
2

Unfortunately this is not supported yet. Current Ledger support in wallet is limited to use 44'/397'/0'/0'/1' HD key path. This is going to change in later releases.

In the meanwhile if you want to stake your tokens from multiple such accounts you might find this tool useful: http://multistaker.near.org/

Vlad Grichina
  • 1,059
  • 8
  • 16
0

The NEAR wallet now supports the updated flow which allows you to create your account using any ledger path from the CLI (as per your question), fund that account or implicit account (the 64 char nonsense string) with at least 1 NEAR and then add that account to your NEAR wallet. You can't add without funding the account since it takes NEAR to make the add.

To add to the wallet, on the wallet dropdown select "Import Account" and then click "Advanced Options" to bring up the HD path selector. Select the right HD path, plug in the ledger and good to go.

ATM Chrome isn't working with the wallet as per this post but firefox does.

Erik Trautman
  • 5,883
  • 2
  • 27
  • 35
0

There is currently an open path to import a private key into the NEAR Wallet. To my understanding, the wallet then creates another new keypair on the fly and adds it as a full access keypair, such that the wallet doesn't actually use or store the private key you just sent it after this transaction.

https://wallet.near.org/auto-import-secret-key#YOUR_ACCOUNT_ID/YOUR_PRIVATE_KEY

See also How to import an account into the NEAR wallet using only the private key (no seedphrase)

Erik Trautman
  • 5,883
  • 2
  • 27
  • 35