blockchain - ckb node的 发送json-rpc请求

访问量: 294

refer to: https://docs.nervos.org/docs/reference/rpc

安装

看我之前的文章

运行

JSON RPC

https://github.com/nervosnetwork/ckb/blob/master/rpc/README.md

curl -H 'content-type: application/json' -d '{    "id": 3,    "jsonrpc": "2.0",    "method": "get_transaction",    "params": ["0xed2049c21ffccfcd26281d60f8f77ff117adb9df9d3f8cbe5fe86e893c66d359"] }'  http://localhost:8114

或者更加优雅一点:

echo '{
    "id": 3,
    "jsonrpc": "2.0",
    "method": "get_transaction",
    "params": ["0xed2049c21ffccfcd26281d60f8f77ff117adb9df9d3f8cbe5fe86e893c66d359"]
}' \
| tr -d '\n' \
| curl -H 'content-type: application/json' -d @- \
http://localhost:8114

订阅/RSS Feed

Subscribe