Skip to main content

account

Description

Create a new account on the blockchain (assumes system contract does not restrict RAM usage)

Usage

Usage: clio create account [OPTIONS] creator name OwnerKey [ActiveKey]

Positional Arguments:
creator TEXT The name of the account creating the new account (required)
name TEXT The name of the new account (required)
OwnerKey TEXT The owner public key or permission level for the new account (required)
ActiveKey TEXT The active public key or permission level for the new account

Options:
-h,--help Print this help message and exit
-x,--expiration set the time in seconds before a transaction expires, defaults to 30s
-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
--json-file TEXT save result in json format into a file
-d,--dont-broadcast don't 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)
--use-old-rpc use old RPC push_transaction, rather than new RPC send_transaction
-p,--permission TEXT ... An account and permission level to authorize, as in 'account@permission' (defaults to 'creator@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)
--delay-sec UINT set the delay_sec seconds, defaults to 0s
info

The example below assumes you have access to a local chain and you have authority over sysio key pair.

Command

The command below assumes there are two key pairs generated for the new account nick.

Key pairs can be generated by using clio create key.

clio create account sysio nick SYS4toFS3YXEQCkuuw1aqDLrtHim86Gz9u3hBdcBw5KNPZcursVHq SYS7d9A3uLe6As66jzN8j44TXJUqJSK3bFjjEEqR4oTvNAB3iM9S
A -p sysio@active

Output

executed transaction: ce26710f7fcb73c290aba82810d0fb61a24097f85fc27ea52c25848c228b4254  200 bytes  271 us

# sysio <= sysio::newaccount {"creator":"sysio","name":"nick","owner":{"threshold":1,"keys":[{"key":"SYS4toFS3YXEQCkuuw1aqDLrtHim

warning: transaction executed locally, but may not be confirmed by the network yet ]