eos智能合约开发-03 钱包相关操作

为了方便快捷使用eos下的命令可以做一个软链接(类似我们Windows的快捷方式)

root@aries-virtual-machine:/# ls -al /usr/local/bin/
total 24
drwxr-xr-x  2 root root  4096 8月  27 14:28 .
drwxr-xr-x 11 root root  4096 8月  27 14:20 ..
lrwxrwxrwx  1 root root    26 8月  27 14:25 cleos -> /usr/local/eosio/bin/cleos
lrwxrwxrwx  1 root root    33 8月  27 14:28 eosio-abigen -> /usr/local/eosio/bin/eosio-abigen
lrwxrwxrwx  1 root root    29 8月  27 14:26 eosiocpp -> /usr/local/eosio/bin/eosiocpp
lrwxrwxrwx  1 root root    33 8月  27 14:28 eosio-s2wasm -> /usr/local/eosio/bin/eosio-s2wasm
lrwxrwxrwx  1 root root    36 8月  27 14:28 eosio-wast2wasm -> /usr/local/eosio/bin/eosio-wast2wasm
lrwxrwxrwx  1 root root    26 8月  27 14:26 keosd -> /usr/local/eosio/bin/keosd
-rwxr-xr-x  1 root root 13464 8月  27 10:16 mongoc-stat
lrwxrwxrwx  1 root root    27 8月  27 14:25 nodeos -> /usr/local/eosio/bin/nodeos

创建钱包
cleos wallet create -n aries
ERROR: Either indicate a file using “–file” or pass “–to-console”
新版发现创建钱包出错, 需要加上 上面红色的参数即可

cleos wallet create -n aries --to-console
Creating wallet: aries
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5JbWTPvjRNHwNAoR5o55JbyXet8ntwghuuCLATgcKCXLN1quBRS"

创建了一个钱包: aries
钱包创建位置:
新版钱包默认位置: $HOME/eosio-wallet
/home/aries/eosio-wallet/aries.wallet , 当然我感觉现在eos慢慢在规范, 所以和刚刚发布出来的时候比较放钱包的位置也在改变(最好使用find -name “aries.wallet” 进行查找, 网上的很多教程还是比较老的版本)

root@aries-virtual-machine:/home/aries/tmp/eos# 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.
"PW5K84X1VdtZfR8TcWkdpXDPPFyUtTtnSrNM6KCDYc3iBESFtofwp"

cleos wallet create -n aries --to-console
Creating wallet: aries
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5J8MDHK524911oQZo57oY7WNA4dcmds1io496XhWqmobCSYFm1X"


cleos wallet 
ERROR: RequiredError: Subcommand required
Interact with local wallet
Usage: cleos wallet SUBCOMMAND

Subcommands:
  create                      Create a new wallet locally
  open                        Open an existing wallet
  lock                        Lock wallet
  lock_all                    Lock all unlocked wallets
  unlock                      Unlock wallet
  import                      Import private key into wallet
  remove_key                  Remove key from wallet
  create_key                  Create private key within wallet
  list                        List opened wallets, * = unlocked
  keys                        List of public keys from all unlocked wallets.
  private_keys                List of private keys from an unlocked wallet in wif or PVT_R1 format.
  stop                        Stop keosd (doesn't work with nodeos).

那么我可以查看钱包list

cleos wallet list
Wallets:
[
  "aries *"
]

当然你也可以删除钱包, 大不了重新再创建一个钱包, 有兴趣的可以试一试

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值