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

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

root@aries-virtual-machine:/# ls -al /usr/local/bin/ total 24 drwxr-xr-x2 root root4096 8月27 14:28 . drwxr-xr-x 11 root root4096 8月27 14:20 .. lrwxrwxrwx1 root root26 8月27 14:25 cleos -> /usr/local/eosio/bin/cleos lrwxrwxrwx1 root root33 8月27 14:28 eosio-abigen -> /usr/local/eosio/bin/eosio-abigen lrwxrwxrwx1 root root29 8月27 14:26 eosiocpp -> /usr/local/eosio/bin/eosiocpp lrwxrwxrwx1 root root33 8月27 14:28 eosio-s2wasm -> /usr/local/eosio/bin/eosio-s2wasm lrwxrwxrwx1 root root36 8月27 14:28 eosio-wast2wasm -> /usr/local/eosio/bin/eosio-wast2wasm lrwxrwxrwx1 root root26 8月27 14:26 keosd -> /usr/local/eosio/bin/keosd -rwxr-xr-x1 root root 13464 8月27 10:16 mongoc-stat lrwxrwxrwx1 root root27 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 SUBCOMMANDSubcommands: createCreate a new wallet locally openOpen an existing wallet lockLock wallet lock_allLock all unlocked wallets unlockUnlock wallet importImport private key into wallet remove_keyRemove key from wallet create_keyCreate private key within wallet listList opened wallets, * = unlocked keysList of public keys from all unlocked wallets. private_keysList of private keys from an unlocked wallet in wif or PVT_R1 format. stopStop keosd (doesn't work with nodeos).

那么我可以查看钱包list
cleos wallet list Wallets: [ "aries *" ]

【eos智能合约开发-03|eos智能合约开发-03 钱包相关操作】当然你也可以删除钱包, 大不了重新再创建一个钱包, 有兴趣的可以试一试

    推荐阅读