Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #10177 from EOSIO/docs/cleos-docathon-11
Browse files Browse the repository at this point in the history
[docs] Update Create an account How-to - 2.0
  • Loading branch information
lparisc authored May 25, 2021
2 parents 9628211 + c9f222b commit 9bc5a32
Showing 1 changed file with 40 additions and 12 deletions.
52 changes: 40 additions & 12 deletions docs/02_cleos/02_how-to-guides/how-to-create-an-account.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,49 @@
## Goal
## Overview

## Before you begin
This how-to guide provides instructions on how to create a new EOSIO blockchain account using the `cleos` CLI tool. You can use accounts to deploy smart contracts and perform other related blockchain operations. Create one or multiple accounts as part of your development environment setup.

* Install the currently supported version of `cleos`
The example in this how-to guide creates a new account named **bob**, authorized by the default system account **eosio**, using the `cleos` CLI tool.

* Understand the following:
* What is an account
* What is a public and private key pair
## Before you Begin

* Created an Owner and an Active key pair
* Imported a key pair which can authorize on behalf of a creator account
Make sure you meet the following requirements:

## Steps
* Install the currently supported version of `cleos`.
[[info | Note]]
| The cleos tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the cleos tool.
* Learn about [EOSIO Accounts and Permissions](https://developers.eos.io/welcome/v2.1/protocol/accounts_and_permissions)
* Learn about Asymmetric Cryptography - [public key](https://developers.eos.io/welcome/v2.1/glossary/index#public-key) and [private key](https://developers.eos.io/welcome/v2.1/glossary/index#private-key) pairs.
* Create public/private keypairs for the `owner` and `active` permissions of an account.

## Command Reference

See the following reference guide for `cleos` command line usage and related options:
* [`cleos create account`](../03_command-reference/create/account.md) command and its parameters

## Procedure

The following step shows how to create a new account **bob** authorized by the default system account **eosio**.

1. Run the following command to create the new account **bob**:

```sh
cleos create account creator name OwnerKey [ActiveKey]
cleos create account eosio bob EOS87TQktA5RVse2EguhztfQVEh6XXxBmgkU8b4Y5YnGvtYAoLGNN
```
**Where**:
* `eosio` = the system account that authorizes the creation of a new account
* `bob` = the name of the new account conforming to [account naming conventions](https://developers.eos.io/welcome/v2.1/protocol-guides/accounts_and_permissions#2-accounts)
* `EOS87TQ...AoLGNN` = the owner public key or permission level for the new account (**required**)
[[info | Note]]
| To create a new account in the EOSIO blockchain, an existing account, also referred to as a creator account, is required to authorize the creation of a new account. For a newly created EOSIO blockchain, the default system account used to create a new account is **eosio**.

**Example Output**

```console
executed transaction: 4d65a274de9f809f9926b74c3c54aadc0947020bcfb6dd96043d1bcd9c46604c 200 bytes 166 us
# eosio <= eosio::newaccount {"creator":"eosio","name":"bob","owner":{"threshold":1,"keys":[{"key":"EOS87TQktA5RVse2EguhztfQVEh6X...
warning: transaction executed locally, but may not be confirmed by the network yet ]
```

### Summary

[[info | Recommend]]
| `ActiveKey` is optional but recommended.
By following these instructions, you are able to create a new EOSIO account in your blockchain environment.

0 comments on commit 9bc5a32

Please sign in to comment.