EOSIO cleos 命令大全(八)—— sign

EOSIO cleos 命令大全(八)—— sign

EOSIO版本:EOSIO Dawn 3.0

最后更新日期:2018-04-21

說(shuō)明:以下所有命令均為實(shí)際操作結(jié)果。


將 nodeos 和 cleos 加入到環(huán)境變量并運(yùn)行nodeos:

# export PATH=$PATH:/alidata1/eos/build/programs/nodeos

# nodeos

# export PATH=$PATH:/alidata1/eos/build/programs/cleos


cleos sign:返回 cleos sign 順位項(xiàng)和可選參數(shù)

#?cleos sign

運(yùn)行結(jié)果:

順位項(xiàng)說(shuō)明:

transaction TEXT? ? //需要簽名的事務(wù), JSON 格式

可選參數(shù):

-k,--private-key TEXT? ? //用于簽名的私鑰

-p,--push-transaction? ? //簽名后推送事務(wù)




cleos sign transaction:簽署事務(wù)不帶私鑰

#?cleos sign '{"transaction_id": "f6e43207694bb65eef053f39acef86f42a4b606d3bd832f0faaa768269126676", "processed": {"status": "executed", "kcpu_usage": 105, "net_usage_words": 32, "id": "f6e43207694bb65eef053f39acef86f42a4b606d3bd832f0faaa768269126676", "action_traces": [{"receiver": "eosio.token", "context_free": false, "cpu_usage": 5570, "act": {"account": "eosio.token", "name": "issue", "authorization": [{"actor": "wengyingfeng", "permission": "active"}], "data": {"to": "wengyingfeng", "quantity": "300000000.0000 WYF", "memo": "issue WYF"}, "hex_data": "c0a65a6c3acfa6e20030ef7dba020000045759460000000009697373756520575946"}, "console": "issue", "data_access": [{ "type": "write", "code": "eosio.token", "scope": "........ctgpb", "sequence": 1},{"type": "write", "code": "eosio.token", "scope": "wengyingfeng", "sequence": 0}], "_profiling_us": 299}], "deferred_transaction_requests": [], "read_locks": [], "write_locks": [{"account": "eosio.token", "scope": "........ctgpb"},{"account": "eosio.token", "scope": "wengyingfeng"}], "cpu_usage": 107520, "net_usage": 256, "packed_trx_digest": "5cb966eaac2c81b7da4664214db7322be7eff0bae1da973cba4f608f4137ad47", "region_id": 0, "cycle_index": 1, "shard_index": 0, "_profiling_us": 352, "_setup_profiling_us": 126}}'

運(yùn)行結(jié)果:

備注:此命令沒(méi)有帶私鑰參數(shù),需分步執(zhí)行。輸入命令后系統(tǒng)會(huì)提示輸入私鑰,私鑰不會(huì)明文顯示,較為安全,實(shí)際操作建議使用此方法。




cleos sign transaction -k privateKey:簽署事務(wù)帶私鑰

cleos sign '{"transaction_id": "f6e43207694bb65eef053f39acef86f42a4b606d3bd832f0faaa768269126676", "processed": {"status": "executed", "kcpu_usage": 105, "net_usage_words": 32, "id": "f6e43207694bb65eef053f39acef86f42a4b606d3bd832f0faaa768269126676", "action_traces": [{"receiver": "eosio.token", "context_free": false, "cpu_usage": 5570, "act": {"account": "eosio.token", "name": "issue", "authorization": [{"actor": "wengyingfeng", "permission": "active"}], "data": {"to": "wengyingfeng", "quantity": "300000000.0000 WYF", "memo": "issue WYF"}, "hex_data": "c0a65a6c3acfa6e20030ef7dba020000045759460000000009697373756520575946"}, "console": "issue", "data_access": [{ "type": "write", "code": "eosio.token", "scope": "........ctgpb", "sequence": 1},{"type": "write", "code": "eosio.token", "scope": "wengyingfeng", "sequence": 0}], "_profiling_us": 299}], "deferred_transaction_requests": [], "read_locks": [], "write_locks": [{"account": "eosio.token", "scope": "........ctgpb"},{"account": "eosio.token", "scope": "wengyingfeng"}], "cpu_usage": 107520, "net_usage": 256, "packed_trx_digest": "5cb966eaac2c81b7da4664214db7322be7eff0bae1da973cba4f608f4137ad47", "region_id": 0, "cycle_index": 1, "shard_index": 0, "_profiling_us": 352, "_setup_profiling_us": 126}}' -k 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3

運(yùn)行結(jié)果:

備注:此命令帶私鑰,一步執(zhí)行。私鑰會(huì)在控制臺(tái)明文顯示,不建議使用此種方法。



EOSIO cleos 命令大全(一) —— version

EOSIO cleos 命令大全(二) —— create

EOSIO cleos 命令大全(三) —— get

EOSIO cleos 命令大全(四) —— set

EOSIO cleos 命令大全(五) —— transfer

EOSIO cleos 命令大全(六) —— net

EOSIO cleos 命令大全(七) —— wallet

EOSIO cleos 命令大全(九) —— push

EOSIO cleos 命令大全(附) ——?參數(shù) JSON 格式

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容