Create

Description The subcommands can be used to to create various items, on and off the blockchain.

Subcommands

  • Account — Retrieve an account from the blockchain.

  • Key — Retrieve accounts associated with a public key.

Account

Description

The subcommand creates a new account on the blockchain (assumes system contract does not restrict RAM usage).

Positional Parameters

  • (string) creator— The name of the account creating the new account (required).

  • (string) name— The name of the new account (required).

  • (string) OwnerKey— The owner public key or permission level for the new account (required).

  • (string) ActiveKey— The active public key or permission level for the new account.

Options

  • -x, --expiration TEXT — Set the time (in seconds) before a transaction expires, defaults to 30 s.

  • -f, --force-unique — Force the transaction to be unique. This will consume extra bandwidth and remove any protections against accidently issuing the same transaction multiple times.

  • -s, --skip-sign — Specify if unlocked wallet keys should be used to sign transaction.

  • -j, --json — Print result as JSON.

  • -d, --dont-broadcast — Do not broadcast transaction to the network (just print to stdout).

  • --return-packed — Used in conjunction with --dont-broadcast to get the packed transaction.

  • -r, --ref-block TEXT — Set the reference block num or block id used for TAPOS (Transaction as Proof-of-Stake).

  • -p, --permission TEXT — An account and permission level to authorize, as in 'account@permission' (defaults to 'creater@active').

  • --max-cpu-usage-ms UINT — Set an upper limit on the milliseconds of CPU usage budget, for the execution of the transaction (defaults to 0 which means no limit).

  • --max-net-usage UINT — Set an upper limit on the net usage budget (in bytes) for the transaction (defaults to 0 which means no limit).

  • --max-ram-usage UINT — Set an upper limit on the ram usage budget (in bytes) for the transaction (defaults to 0 which means no limit).

  • --max-storage-usage — Set an upper limit on the storage usage budget, (in bytes) for the transaction (defaults to 0 which means no limit).

  • --delay-sec UINT — Set the delay_sec seconds, defaults to 0 s.

  • --bandwidth-provider TEXT — Set an account which provide own bandwidth for transaction.

  • --dont-declare-names — Do not add declarenames action for resolved account names.

Command

$ cleos create account [OPTIONS] <creator> <name> <OwnerKey> [<ActiveKey>]

Examples

A set of keys is required to create an account. These keys can be generated by using cleos create key.

$ cleos create account alice bob  GLS5to...hBdcBw  GLS7A3u...K3bAS

Key

Description

The subcommand creates a new keypair and prints the public and private keys.

Positional Parameters

No parameters required fot this subcommand.

Options

  • --r1, -j — Generate a key using the R1 curve (iPhone), instead of the K1 curve (Bitcoin).

  • -f, --file TEXT— Name of file to write private/public key output to. (Must be set, unless--to-console` is passed).

  • --to-console — Print private/public keys to console.

Command

$ cleos create key [OPTIONS]

Examples

$ cleos create key -f privatedata
Private key: SxY7ghj...judaU
Public key: GLS5sUR...dSmc96

Last updated