7

I am creating a subaccount using command: near create-account 123.xyz.testnet --masterAccount xyz.testnet

But it only generates the public key and private key, how to get the seed phrase of the account so that I can login with near web wallet.

Near web wallet doesn't seem to support sub-accounts, as "." is not allowed.

Amiya Behera
  • 2,210
  • 19
  • 32
  • 1
    You can see implementation of seed phrases here: https://github.com/near/near-seed-phrase/blob/master/index.js . It is using BIP-39 standard. It is not a reversible process: https://www.reddit.com/r/ethereum/comments/c3hf0o/how_do_i_turn_a_private_key_into_a_mnemonic_phrase/ One potential workaround is generating a key with a seed phrase, and add this as a full access key to your account for later importing into the wallet, but need to check if this will work. – Marcelo Fornet May 30 '21 at 10:17

2 Answers2

2

There seems to be no such feature in the current near-cli implementation. See this feature request: https://github.com/near/near-cli/issues/716

Vlad Frolov
  • 7,445
  • 5
  • 33
  • 52
2

According to docs you could login with your subaccount private key: https://wallet.testnet.near.org/auto-import-secret-key#123.xyz.testnet/YOUR_PRIVATE_KEY

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 17 '22 at 12:40
  • 2
    Confirming that this works on testnet and mainnet. Agree that it would be nice to have some reference for WHY it works. – starpause May 06 '22 at 05:04