跳到主要内容
版本:3.2-rc1

Account

Description

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

Usage

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

Positionals:
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

Command

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

cleos create account inita tester EOS4toFS3YXEQCkuuw1aqDLrtHim86Gz9u3hBdcBw5KNPZcursVHq EOS7d9A3uLe6As66jzN8j44TXJUqJSK3bFjjEEqR4oTvNAB3iM9SA

Output

{
"transaction_id": "6acd2ece68c4b86c1fa209c3989235063384020781f2c67bbb80bc8d540ca120",
"processed": {
"refBlockNum": "25217",
"refBlockPrefix": "2095475630",
"expiration": "2017-07-25T17:54:55",
"scope": [
"eos",
"inita"
],
"signatures": [],
"messages": [{
"code": "eos",
"type": "newaccount",
"authorization": [{
"account": "inita",
"permission": "active"
}
],
"data": "c9251a0000000000b44c5a2400000000010000000102bcca6347d828d4e1868b7dfa91692a16d5b20d0ee3d16a7ca2ddcc7f6dd03344010000010000000102bcca6347d828d4e1868b7dfa91692a16d5b20d0ee3d16a7ca2ddcc7f6dd03344010000010000000001c9251a000000000061d0640b000000000100010000000000000008454f5300000000"
}
],
"output": [{
"notify": [],
"sync_transactions": [],
"async_transactions": []
}
]
}
}