How do you create an account on NEAR?

Viewed 470

In the wallet.near.org you can restore an account but how do you create a brand new named account like foo.near?

2 Answers

The UI in the wallet doesn't appear ready yet but this can be done via the CLI by calling the contract deployed on the near root account. Here's the command:

near call near create_account '{"new_account_id": "NAME.near", "new_public_key": "YOUR_PUBLIC_KEY"}' --amount 10 --accountId YOUR_MASTER_ACCT [--useLedgerKey] --gas 100000000000000

where:

  • NAME.near is the account you want to create
  • YOUR_PUBLIC_KEY is a public key you've generated with a Ledger Nano S or X following the instructions on docs.near.org
  • YOUR_MASTER_ACCT is an account you control, to which you've given access to near-cli using the near login command or which you control via a Ledger Nano
  • --amount 10 is the initial amount you want to send from YOUR_MASTER_ACCT
  • use --useLedgerKey if you control YOUR_MASTER_ACCT via a Ledger Nano

UI to create accounts is now fully live at https://wallet.near.org/create

There is one extra step where you have to fund temporary account from exchange.

Related