get_bulk_payments - 获取批量支付
get_bulk_payments
获取指定支付ID(支付ID数组)自指定高度之后的的支付清单。
推荐使用这个方法而非get_payments,因为这个方法扩展性更强。
该方法无别名。
输入参数
- payment_ids:支付ID,字符串数组
- min_block_height :开始查找支付的区块高度,unsigned int
输出结果
- payments - 对象数组,成员结构如下:
- payment_id:输入ID之一, string
- tx_hash:交易哈希, string
- amount:支付金额,unsigned int
- block_height:支付首次确认区块高度,unsigned int
- unlock_time:支付解锁时间(区块高度), unsigned int
- subaddr_index :子地址索引
- major:账户索引,unsigned int
- minor:子地址索引,unsigned int
- address :收款地址,string
示例代码
curl请求:
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_bulk_payments","params":{"payment_ids":["60900e5603bf96e3"],"min_block_height":"120000"}}' -H 'Content-Type: application/json'
响应结果:
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"payments": [{
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"amount": 1000000000000,
"block_height": 127606,
"payment_id": "60900e5603bf96e3",
"subaddr_index": {
"major": 0,
"minor": 0
},
"tx_hash": "3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f",
"unlock_time": 0
}]
}
}