创建EOS钱包和账户

环境

aws 机器dec-1

创建钱包

参考 https://github.com/EOSIO/eos/tree/dawn-v3.0.0#autobuild

$ cleos wallet create
"/usr/local/bin/keosd" launched
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"${password}"

解锁

nodeos未启动情况下默认是已经解锁的状态

$ cleos wallet unlock --password ${password}
Error 3120007: Already unlocked
Error Details:
Wallet is already unlocked: default

使用完后需要锁上

加锁

加锁不需要密码

$ cleos wallet lock
Locked: default

创建秘钥对

owner key

$ cleos create key
Private key: ${owner-private-key}
Public key: ${owner-public-key}

active key

$ cleos create key
Private key: ${active-private-key}
Public key: ${active-public-key}

导入到钱包

$ cleos wallet import ${owner-private-key}
imported private key for: ${owner-public-key}
$ cleos wallet keys
[
  "${default-public-key}",
  "${owner-public-key}"
]
$ cleos wallet import ${active-private-key}
imported private key for: ${active-public-key}
$ cleos wallet keys
[
  "${active-public-key}",
  "${default-public-key}",
  "${owner-public-key}"
]

注意,钱包里本来有一个key,来自于配置文件。
owner key和active key导入后,一共3个key了。

创建账户(account)

用刚才的owner key和active key创建账户

$ cleos create account eosio debug ${owner-public-key} ${active-public-key}
executed transaction: c95182013fd38fca1fad78b11091deccb1f5e93647a93313a48a62a4f6ed4fc6  200 bytes  217 us
#         eosio <= eosio::newaccount            {"creator":"eosio","name":"debug","owner":{"threshold":1,"keys":[{"key":"EOS8UCi6r82EvzxKd5KFv3um3fn...
warning: transaction executed locally, but may not be confirmed by the network yet

检查一下

$ cleos get account debug
privileged: false
permissions:
     owner     1:    1 ${owner-public-key}
        active     1:    1 ${active-public-key}
memory:
     quota:        -1 bytes  used:      2.66 Kb

net bandwidth: (averaged over 3 days)
     used:                -1 bytes
     available:           -1 bytes
     limit:               -1 bytes

cpu bandwidth: (averaged over 3 days)
     used:                -1 us
     available:           -1 us
     limit:               -1 us


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 学习区块链,最刺激的莫过于发币,第一篇文章里介绍了如何搭建EOS开发环境,第二篇文章我们已经介绍了如何部署调用合约...
    P叔阅读 10,310评论 5 6
  • 在说智能合约开发前先说这个,因为所有对智能合约的操作都是建立在账户和权限管理的基础上的。 先说下几个概念: 钱包 ...
    逆风_罗鹏阅读 4,503评论 1 3
  • 1. 账户与钱包1.1 创造并管理钱包1.2 生成EOS Keys并导入1.3 备份您的钱包1.4 创建账户 2....
    cenkai88阅读 9,460评论 1 7
  • 在乎, 珍惜 。今天学到了两个词,很高兴,很受用。
    清欢写作阅读 1,346评论 0 1
  • 自从步入社会,被贴上“人际关系差生”标签开始,这个logo就没有被摘下来过,大部分时候也是这样不以为然着,任由情商...
    朱常在阅读 3,405评论 2 3

友情链接更多精彩内容