EOS开发环境搭建–账户创建

1.创建钱包

$ cleos wallet create --to-console

Creating wallet: default Save password to use in the future to unlock this wallet. Without password imported keys will not be retrievable. "PW5JvSUVTLst22cjZ1q1mwo6bqgFtEYhNgy1dg6zSDaaYvJp4W2Di"
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
“PW5JvSUVTLst22cjZ1q1mwo6bqgFtEYhNgy1dg6zSDaaYvJp4W2Di”

2.创建私钥

$ cleos create key

3.导入私钥

导入上一步生成的私钥

$ cleos wallet import

root@fuck:~/eos# cleos wallet import private key: imported private key for: EOS6dEyb2tydFUrDBg2BZ9s7a8igFkyDNuNh7PWadxK9hp9u9EF6B root@fuck:~/eos# cleos wallet import private key: imported private key for: EOS6iY6sbtVYMhhiJaW228K2iSDxCzR2j88ekJtQeBBwxo828tsTQ
root@fuck:~/eos# cleos wallet import
private key: imported private key for: EOS6dEyb2tydFUrDBg2BZ9s7a8igFkyDNuNh7PWadxK9hp9u9EF6B
root@fuck:~/eos# cleos wallet import
private key: imported private key for: EOS6iY6sbtVYMhhiJaW228K2iSDxCzR2j88ekJtQeBBwxo828tsTQ

4.注册账户名

$ cleos create account eosio 111111111111 EOS6dEyb2tydFUrDBg2BZ9s7a8igFkyDNuNh7PWadxK9hp9u9EF6B EOS6dEyb2tydFUrDBg2BZ9s7a8igFkyDNuNh7PWadxK9hp9u9EF6B

果不其然,报错…..

Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations Ensure that you have the related private keys inside your wallet and your wallet is unlocked.
Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and your wallet is unlocked.

原因是要先导入eosio这个账户,其他的账户再由这个账户生成

eosio public key: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
eosio private key: 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3

导入eosio

$ cleos wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3

executed transaction: 6c6997dda1f91c95f0291fc40338a499ac9b8f4e5b02f2e5bd53db4e6e15ee5c 200 bytes 4601 us # eosio <= eosio::newaccount {"creator":"eosio","name":"111111111111","owner":{"threshold":1,"keys":[{"key":"EOS6dEyb2tydFUrDBg2B... warning: transaction executed locally, but may not be confirmed by the network yet ]
executed transaction: 6c6997dda1f91c95f0291fc40338a499ac9b8f4e5b02f2e5bd53db4e6e15ee5c 200 bytes 4601 us
# eosio <= eosio::newaccount {“creator”:”eosio”,”name”:”111111111111″,”owner”:{“threshold”:1,”keys”:[{“key”:”EOS6dEyb2tydFUrDBg2B…
warning: transaction executed locally, but may not be confirmed by the network yet ]
至此钱包账户生成就完成了

发表评论

电子邮件地址不会被公开。 必填项已用*标注