eos文档
// 检索客户端的版本信息 $ ./cleos version client
打包和解包transactionjson
create key
建立密钥对网络
$ ./cleos create key -f myKey.txt $ ./cleos create key --to-console
create account
在区块链上建立新的帐户
若是加载了系统合约(例如生产网络),则使用cleos system newaccount代替ide
Positionals: creator TEXT The name of the account creating the new account name TEXT The name of the new account OwnerKey TEXT The owner public key for the new account ActiveKey TEXT The active public key for the new account Options: -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 -d,--dont-broadcast don't broadcast transaction to the network (just print to stdout) -p,--permission TEXT ... An account and permission level to authorize, as in 'account@permission' (defaults to 'creator@active') $ ./cleos create account inita tester EOS4toFS3YXEQCkuuw1aqDLrtHim86Gz9u3hBdcBw5KNPZcursVHq EOS7d9A3uLe6As66jzN8j44TXJUqJSK3bFjjEEqR4oTvNAB3iM9SA
从区块链检索各类项目和信息。区块链
// 简单地返回当前的区块链状态信息。 $ ./cleos get info $ ./cleos get block 1 $ cleos get account eosio --json $ cleos get code eosio.token $ cleos get table eosio eosio namebids --key-type i64 --index 2 -r -l 1 $ cleos get currency balance eosio.token eosio SYS $ cleos get currency stats eosio.token SYS // 检索与已定义公钥关联的全部账户。 $ cleos get accounts EOS8mUftJXepGzdQ2TaCduNuSPAfXJHf22uex4u41ab1EVv9EAhWt // 返回此帐号建立的帐号 $ cleos get servants eosio $ ./cleos get transaction eb4b94b72718a369af09eb2e7885b3f494dd1d8a20278a6634611d5edd76b703 // 检索范围内引用特定账户名称的全部操做。 $ ./cleos get actions eosio.token
设置或者更新区块链状态ui
$ ./cleos set contract currency ../../../contracts/currency/currency.wast ../../../contracts/currency/currency.abi
$ ./cleos transfer useraaaaaaaa useraaaaaaac "1.0000 SYS" "hello world" $ ./cleos transfer useraaaaaaaa useraaaaaaac -c eosio.token "1.0000 SYS" "hello world"
$ cleos net connect http://somehost.com:1234 $ cleos net disconnect http://somehost.com:1234 $ cleos net status http://somepeer:1234 $ cleos net peers
# 建立帐户,默认建立default $ ./cleos wallet create --to-console $ ./cleos wallet create -n second-wallet --to-console $ ./cleos wallet create --name my-new-wallet --file my-new-wallet.txt # 默认打开default,有open没有close $ ./cleos wallet open $ ./cleos wallet open -n second-wallet $ ./cleos wallet lock $ ./cleos wallet lock -n second-wallet $ ./cleos wallet lock_all $ ./cleos wallet unlock -n second-wallet --password PW5Ji6JUrLjhKAVn68nmacLxwhvtqUAV18J7iycZppsPKeoGGgBEw $ ./cleos wallet import 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 # Lists opened wallets $ ./cleos wallet list # 全部解锁钱包的公钥列表。这些键能够用来签署transaction。 $ ./cleos wallet keys # 在钱包中建立一个密钥对,这样您就不须要像使用cleos建立密钥那样手动导入它了。默认状况下,这将建立钱包的密钥是K1密钥。可是这个命令也容许您建立R1格式的键。 $ cleos wallet create_key K1 # 能够查询单个钱包的公钥对和私钥对。钱包必须已经打开,你必须再次输入密码。 $ cleos wallet private_keys K1