奇亚(Chia, XCH) 接口之获取根据块高获取块记录信息,主要是简要信息,或者说元数据,调用的路径为 /get_block_record_by_height
参数则是 POST 提交想要获取的块高即可 {"height":327198}
例如
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 '{"height":327198}' -H "Content-Type: application/json" -X POST https://localhost:8555/get_block_record_by_height | python3 -m json.tool
备注,后面的 |python3 -m json.tool 主要是用于美化返回值
返回的结果为
{ "block_record": { "challenge_block_info_hash": "0x6205a87c468242e1e21d4cdfc3f9e5603fff35562d567714e065d18545dcb0c9", "challenge_vdf_output": { "data": "0x02008b5367140dbb4f61eff1cf5235bb9c3d3ee14dbd1df2e0fdd8e6394a0cc3e0d0d9c73e102103c22951a93b448cba306376729290fc843cd04a5c29c5761e9c286e61dc6eb4f7179e2072c17f95a7b0add191aa41280bef3d25dd639c3745f8320302" }, "deficit": 2, "farmer_puzzle_hash": "0x4bc6435b409bcbabe53870dae0f03755f6aabb4594c5915ec983acf12a5d1fba", "fees": null, "finished_challenge_slot_hashes": null, "finished_infused_challenge_slot_hashes": null, "finished_reward_slot_hashes": null, "header_hash": "0x1c7a0e4ef1616759cc841424ab502def6f266f29fd32e1f91ce4a7f335c35cb9", "height": 327198, "infused_challenge_vdf_output": { "data": "0x0300a3282acc86643d89ddb8d27bdbc3805e9dac76b8211ce7bb267ae1def01cece508a8f915f258e08c2cff9c4fb83370ad19dced3c935621255111439bd19c4d2b67b873678ecef4714417d2218cee4d8c6e04b029930413400f534dc3ca207c1d0201" }, "overflow": false, "pool_puzzle_hash": "0x4bc6435b409bcbabe53870dae0f03755f6aabb4594c5915ec983acf12a5d1fba", "prev_hash": "0x37aa428a98556ace52a149f86153af6090c1797264b5b72aca45b493abb2b8a8", "prev_transaction_block_hash": null, "prev_transaction_block_height": 327196, "required_iters": 822508, "reward_claims_incorporated": null, "reward_infusion_new_challenge": "0x4280f5400321d101e14e175697a73fdd493e8d7cf98fdcbb5f2329bfbf67d08b", "signage_point_index": 36, "sub_epoch_summary_included": null, "sub_slot_iters": 113246208, "timestamp": null, "total_iters": 1058980072684, "weight": 38669860 }, "success": true }
返回的参数,如果不做矿池不做浏览器,其实基本没啥大用,主要就三个参数还有点意义
- 一个是
block_record/header_hash
表示当前块的块哈希 - 一个是
block_record/height
表示当前块的块高 - 一个是
block_record/farmer_puzzle_hash
表示农民的地址 puzzle,也就是地址编号
目前尚无回复