- EOS版本:v1.0+
- 问题:执行
curl http://192.168.1.168:8888/v1/wallet/list_keys
返回{"code":500,"message":"Internal Service Error","error":{"code":7,"name":"bad_cast_exception","what":"Bad Cast","details":[{"message":"Invalid cast from object_type to Array","file":"variant.cpp","line_number":535,"method":"get_array"}]}}
- 错误分析:
list_keys now requires an argument, which is your wallet password.
修正请求curl --request POST --url http://192.168.1.112:8888/v1/wallet/list_keys --data '["default","PW5K2Rg4rSYanxx..."]'
正确返回对应钱包内所有公钥私钥。
- 常见问题(Wallet not found: default):
EOS 1.0 release 之前如果创建钱包是用的默认创建命令cleos wallet create
钱包位置是在
/home/surou/eosio-wallet/./default.wallet
可以用cleos wallet create
再次创建 查看当前钱包文件位置。
但是 wallet_api_plugin 查找的位置是在/home/surou/.local/share/eosio/nodeos/data/./default.wallet
(1.0 release左右之后 config.ini wallet-dir = ".") - 简单粗暴有效
cp /home/surou/eosio-wallet/./default.wallet /home/surou/.local/share/eosio/nodeos/data/