Can not operate wallet through RPC interface.
Hi, guys. I want to operate wallet through rpc interface with the following steps
-
start kesod manually with http_address = 127.0.0.1:8900
-
use cleos unlock then list the default wallet /eos/build/programs/cleos# ./cleos wallet list Wallets: [ "default *" ]
-
use curl --url http://127.0.0.1:8900/v1/wallet/list_wallets list the wallet, the result is OK /eos/build/programs/cleos# curl --url http://127.0.0.1:8900/v1/wallet/list_wallets
["default *"] -
use curl --url http://127.0.0.1:8900/v1/wallet/open to open it, the following errors show out. /eos/build/programs/cleos# curl --url http://127.0.0.1:8900/v1/wallet/open {"code":500,"message":"Internal Service Error","error":{"code":7,"name":"bad_cast_exception","what":"Bad Cast","details":[{"message":"Invalid cast from object_type to string","file":"variant.cpp","line_number":476,"method":"as_string"}]}}
at the kesod's console, the following errors show out
018-08-04T10:20:51.072 thread-0 http_plugin.cpp:475 handle_exception ] FC Exception encountered while processing wallet.open
2018-08-04T10:20:51.072 thread-0 http_plugin.cpp:476 handle_exception ] Exception Details: 7 bad_cast_exception: Bad Cast
Invalid cast from object_type to string
{"type":"object_type"}
thread-0 variant.cpp:476 as_string

Does some body meet the similar problem?Any suggestion about it?
@readygo586 Have you tried this
curl -X POST http://127.0.0.1:8900/v1/wallet/open -d '"default"'
@man15h very thanks, your solution works.