奇亚(Chia, XCH) 接口之获取根据获取所有的钱包列表,调用的路径为 /get_wallets
要注意端口号,钱包的端口号一般为 9256
请求参数则以 JSON 方式传递空即可 {}
例如
curl --insecure --cert ~/.chia/mainnet/config/ssl/full_node/private_full_node.crt --key ~/.chia/mainnet/config/ssl/full_node/private_full_node.key -d '{"wallet_id":1}' -H "Content-Type: application/json" -X POST https://localhost:9256/get_wallets | python3 -m json.tool
返回结果如下
{ "success": true, "wallets": [ { "data": "", "id": 1, "name": "Chia Wallet", "type": 0 } ] }
id
就是其它钱包接口需要的wallet_id
type
是钱包的类型,目前值有 `STANDARD_WALLET = 0 RATE_LIMITED = 1 ATOMIC_SWAP = 2 AUTHORIZED_PAYEE = 3 MULTI_SIG = 4 CUSTODY = 5 COLOURED_COIN = 6 RECOVERABLE = 7 DISTRIBUTED_ID = 8
默认就是标准钱包 0
目前尚无回复