奇亚(Chia, XCH) 接口之获取根据块哈希获取块信息(有转账数据)

yufei       3 年, 6 月 前       703

奇亚(Chia, XCH) 接口之获取根据块哈希获取块信息,如果有转账事物,那么返回的结果则有点不一样,调用的路径为 /get_block

参数则是以 JSON 方式传递当前块哈希

{"header_hash":"0x1c7a0e4ef1616759cc841424ab502def6f266f29fd32e1f91ce4a7f335c35cb9"}

例如

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 '{"header_hash":"0xac7fcf6ffe96414e0ff8bcb19e4776e3b744bbc4c6accfa228f2bd38f3886950"}' -H "Content-Type: application/json" -X POST https://localhost:8555/get_block | python3 -m json.tool

备注,后面的 |python3 -m json.tool 主要是用于美化返回值

返回结果如下

{
    "block": {
        "challenge_chain_ip_proof": {
            "normalized_to_identity": false,
            "witness": "0x010072f5fa526496eefb95d05ae89d922e30a116a0709017f5b6fa6136072b449e99a4b106477eaf33f2953067bb14b67e5d502184c10e93872aed45244ab5477b220d8c17265dce9ee5004ab8858fad99a2e8005c7ec9822e0474c36784a29d613c01000000000000069974eb874ad1adb3cf117ada30b72c3939e7e3c47d370281a6abb3c7927b62fffdc53d0200e75464854ff3ddbba9eeb60f6de14854f3641ac13518bd8b0e7705d7056d614f544451d39baedf03271d506c439c081c6d0d92e40b0110cd43989fdb8fa0d364325b0fd457c0fa40c6469d807942ba9e538daed692e828f6248ba3e24de95d380100000000000013cbf8a9c3ffde431b45f3046ee1580fe37f6b0663b80033c13355f91ead2c08468c605d01003e578add7990269df5493346df9a53cafb2fc1dbcd9f22eafb55b458a7e62cdbebd219a37b55c4517a8b5484868d4e570705936831f33da368a2b1fb6a52dd825353e81eaa671ea46d119a1f2f933b1c297d4af2e5ab4c98bdcaae9829b45e560100",
            "witness_type": 2
        },
        "challenge_chain_sp_proof": {
            "normalized_to_identity": false,
            "witness": "0x0100b87a4d122ae09505b07bb2d57259f735136a3346b5ee035ae3ca0f46da2861dc365a1bda96e0da44d2b484ee85e95b234dea6f268219a16fe3087d612cd3866b9b7058c1b026bc01cbe2e22993f20fb2df8bbccf19e24b5bb044287abf9d7b2201000000000000000ed8b1a52437fe9c3df89d2688d425b7c86bd2d81b2146909bcc523b41eea0740442370300675294e5ccf5669cc9e3d3dabf3492026cd5d9d86ba692cb3a0c944a06ca9c51a5c1537b234b9575f910b6d7a0a1b3e68479cfbc792a1d2014e7ebbaba71bf51f06994a93146b2a3d0a3e7550099eba1a357563267355157a085152db1f26a3a01000000000000002c24ef585b8c5a385cb8dc0dd0bbe96c9b772552c2692addf39f29ac17a742924bae6b0100f72eb9c4d90b47926ac85026bfcc787b857a066ef72e9f01d9f6a88038428d516009d61c3f632d09ecedf23d76d7fa70f8ed8d5083c927b16ff2da6af0a5e48207c6ad42bca7cc5e195e5d2de20ea6e55712179b6074df01ea923904ba6c9aaa0100",
            "witness_type": 2
        },
        "finished_sub_slots": [],
        "foliage": {
            "foliage_block_data": {
                "extension_data": "0x0000000000000000000000000000000000000000000000000000000003a2c7c9",
                "farmer_reward_puzzle_hash": "0x05b8d7f9ca1b004ecfb9d3c91f5ee5e1c31254e96ce5b3e83ca60de7e1e85f00",
                "pool_signature": "0x85afc77de09dd8c7f178bd864e31e8f974091e8144be38e28925774b232c336accd3f5be8bdef52b2bac61235b39a96600e5832c4ea2bd7ddd36f866a63fbba38ad8f295d6f9f14e39e7c084f681c4e27556ce3748f94616d6d863b24d3d65e4",
                "pool_target": {
                    "max_height": 0,
                    "puzzle_hash": "0x05b8d7f9ca1b004ecfb9d3c91f5ee5e1c31254e96ce5b3e83ca60de7e1e85f00"
                },
                "unfinished_reward_block_hash": "0x19d3edaad468493e97c9ffb30d618a18967f00f7827198de8dce2297349dca25"
            },
            "foliage_block_data_signature": "0x84d2f5e8d77df1f0b4be8b8028c8c53f68d42d4312dc187ee21fd4891398e711bf51639cb857833dadf91ab3a671f66319a1b95966d35320fd86c230cabbdcd43c6347e7f283610105ac950329ebb87d27de91361bd3583b36aa3bd5c9e280c7",
            "foliage_transaction_block_hash": "0x4a8cd765eda218acd853ef0a64934e107ea204bd0bc9b5bd47ea3fa84515935c",
            "foliage_transaction_block_signature": "0x83588fa539295d17dd506ffa0f8c9bd41af4ee634de8de6044327392c21af697b3dd38aa65785adf0b843ffaef85665b01118c0b5a1a2b24376639d54b6102305e22862792832540c75e6ccb0e21461960a218d4c7e1742ad30ad6cda595437e",
            "prev_block_hash": "0x92b7c88f018b5a4ec8134c18cbe16ac97f430e8e897425452f19ef74f96ac2b4",
            "reward_block_hash": "0x26368b3650eb0985acc965c141381e14cd1a8c4d9b0de601ee082713ac03b3ea"
        },
        "foliage_transaction_block": {
            "additions_root": "0xbed6ad200767e649b9871da2994379db53410f19f6fd27b4630a32f43808ce52",
            "filter_hash": "0x0e545836c1317371f7783e37ad20d961f87e0ac91d8f3dc42bbfc6eca4413f8e",
            "prev_transaction_block_hash": "0x4ef93d543ee17d8d0649a59140dcd69d01408d2ffc7ce38f3788d3cce9d81161",
            "removals_root": "0x4d7d0cdc86b7fbadee4c25ec5855ee391693190c927673635aa9cd1a8c88d7e5",
            "timestamp": 1621818907,
            "transactions_info_hash": "0xb7fe1b1d1f31694d8370c03b738985769fa092a7dc5ad97243a336dca447b891"
        },
        "infused_challenge_chain_ip_proof": {
            "normalized_to_identity": false,
            "witness": "0x02002cb12b2b77f8478185ca08bfedb03bb649532c053a472f8b5b054a39d911efed3e574a1a45272720edd269c16cddb5090e9e36a1057ed2b6e283fb83d293ea4101491a82ff037b974268178ebcebb7f4bcf714a7ea0435a530c2ecc06e8b76300100000000000006997485ae39ae4c5c71ad80ca91e8d03dbf501f911addae2718def9b1b6fba61cfe20470100dc4f7437a9b9914adb8b1396b7ad4b517634ae7d6b8b138514a67b9200ad5b81c2e09e4e933884406f7f987e9f6ec894f70235cc57457324226746959ac06d3fe3fff47531f43b858b72e613ed7d1712581af908617b300500789ddc04bff2500100000000000013cbf8f43906cff1c037af97335bdff8204d428f3c19c2b126960129cca46d2240525d5303002a6a1caac32ce902110c9aaa88eefec12a00b2962560011404ffd86e44d4a8f29b2425c749b94f88a6c8e588afe3009145c54af7ed649ae3e9f07a5507d7c307a18ab353268f350ef0b538e1d9390a06eab1c1ed2b54d9863ea8b403172f21190100",
            "witness_type": 2
        },
        "reward_chain_block": {
            "challenge_chain_ip_vdf": {
                "challenge": "0x04f90cdd492887adb8c7cd48da4155f7a3e32be498be2a9d93c7ca682060e409",
                "number_of_iterations": 77033839,
                "output": {
                    "data": "0x0300bd47827fede005a03549f0cd7b15c7d56a627d3d744b94cd0953100a7122e7c10ff5397d6c553f6d84e5528feb62445db5b1fa39a503b8df30ac3faf7ecdbb0362bb0a5e9cd1cbff41fa20ba2398ca0340ea0c99237d9e4d8960f96acf999f051301"
                }
            },
            "challenge_chain_sp_signature": "0x8c19f425a1e48a01cd0c064143d456c1b02caca2689163c181a82968bb4bac93a02949d92a821ab796818a4b2047398b028bc3c3e35ebe786265f643cdec05668b1f4fbdea8db9da661272fce842934d38c881b8c064f7b85eabd3e63f75611f",
            "challenge_chain_sp_vdf": {
                "challenge": "0x04f90cdd492887adb8c7cd48da4155f7a3e32be498be2a9d93c7ca682060e409",
                "number_of_iterations": 71106560,
                "output": {
                    "data": "0x0300080ff0e9cfbcead8f8cb14ec7c28d76b6a3a5a8fb40d158a307edf90afcba2bf9b9191623b772406447a17a53731cccb345c038236f5a250d812dc9e8a758021f36e91bed87f3b51c4498df57fd4d5f53d44d14b21da6efc01b33a5841281e200100"
                }
            },
            "height": 327171,
            "infused_challenge_chain_ip_vdf": {
                "challenge": "0x324e35fdd0d5b468262837d2e0810850408b7d12e41edc9c44f66a0b5eb11618",
                "number_of_iterations": 1946169,
                "output": {
                    "data": "0x02006ef8d672234c8e1939cb355c65458f4705260f4e988e06c29559e07b6afce46e7d42ed7d8cf8f92ef84cf1192b78677f9e5c059f0964b764833321386e59321731e49e93a38b9d065399e7933c2970624f51dc58f1cc94dad19f89aee45ee8270100"
                }
            },
            "is_transaction_block": true,
            "pos_ss_cc_challenge_hash": "0x04f90cdd492887adb8c7cd48da4155f7a3e32be498be2a9d93c7ca682060e409",
            "proof_of_space": {
                "challenge": "0x594cc407b47eb3a140dec6751861327d08d5be66dc3259dd72f42c21f9fdc43e",
                "plot_public_key": "0x81cec6ad4acab0f2ee6718bcc5b31e1dd3fdb1182d7ae2f1e26f4e4956e24e18e9f77c33d6f614ece9317399fb620bbc",
                "pool_contract_puzzle_hash": null,
                "pool_public_key": "0x91f83b876edb77f788c3e4eafbcbd46010caa4355f8d3a1c0437f368ed70fb2c0a2135fdd59884cc73475a4f3ecd438c",
                "proof": "0xf7cd473c1155242915f381a431cb25003c972dbb9b99794929b01f2d97367ee4a6e20c5510a1adb6c2f3bccf8c787e4ff423c3a1e1e0621afaa3d28fe15354a08f44b394972470b25c0bdac05447b64d39d6a7b25ba73cfbb7723c0b5b4289f75c1aba0c8be65ef9db969dfe71e0330520f866c6d9f84094d892e51425caa3fa8c5aa1cf2b781324aee2987895f46cdb51b1d2d051c1924ede8e6a64d9f8215b477934afdac0cdfc3fc85df5dbd3accaa89dfa39c996c8b02c251e7fe417664f3911853865e8f8cacf8eb4262bf687e8533a31802e223e2caddaa078c79db7b6af95791cb95c2c29b272c9df0277bc2652efaebef4a66d0ca1e4c5ff3e93d4e5",
                "size": 32
            },
            "reward_chain_ip_vdf": {
                "challenge": "0x0da4bf1c9be9e6e19862442af3f6457a42ad4a747b659ad018ac13a397b7be63",
                "number_of_iterations": 1946169,
                "output": {
                    "data": "0x0100efa8eef21cefd4413d6404210c0d102ac246ed4cb13edb36e83a9877afc4e24a9adc3636abbf9d4bd32aa86a0d199aa48bb8d20d62e2a22851889fa744d0d14fdea051d2741c9be0614b6d30e24d33a96809d8a4f356e206b2a8abac8ccf8c180100"
                }
            },
            "reward_chain_sp_signature": "0xb4ae418f2037bbb12bf945f26d0b586c4ff1bfa6ad0337afc6b9797a9f855ed087268adede706d40305c094ec48c69a20b765840e660d08db5b14a40e728fb37379483f03c478f9aa05332e9e9b09110db1c1cf53323d2a7ce5a5038c59c5fea",
            "reward_chain_sp_vdf": {
                "challenge": "0x446ac34a3fa29b0504736ef9e0b8a8dd6eda44619cae7e27d5904191215b2830",
                "number_of_iterations": 17057,
                "output": {
                    "data": "0x030043147be7d476240f24b5801b451489150de0d5bd5c993137d94d090ed94179ae5d0e0b848f78d617c519b9991d43a5b04aede18d55c1185c4bc93ff483c57f3ec4e187e375ca70768c640cd991a8051a6071039bf515a245c11275d33d14f0010100"
                }
            },
            "signage_point_index": 40,
            "total_iters": 1058873504111,
            "weight": 38651792
        },
        "reward_chain_ip_proof": {
            "normalized_to_identity": false,
            "witness": "0x010010f1da784548c01c9f3b2e80253aac1d9c56e7f1d2301b54890dffa76d2f007ec060a0fa311055a324e71b1d1413f5317db65e29c51d7cf799b630ecd615124acf7d6875646f43f49eb681676d80c699dbb9915200524f45205787f3b635630201000000000000069974e2b591f297b827ff0417da855384c28678a1653d5a57a6a86c84fd52d131ac27e50100bb363f73397586e3fff5f45edd02b92255e2f3c96dbbf18609e203f31a52b4b2dfaef0770deacc99f24baf12a7cdffb264224272e8a9b6cc32dbb7362e16b624e3c9496d507925da9f6c88b436df53ff1c4bf49c9c3d36736bf273c7d682aa1f0200000000000013cbf8f8fe46f65b7cba70f147dd4a34e7207f17eee09123deabf044e17183eb2555357b01005ced501ea99c6e67e2b94c6f48c553f639b8c0fc865d1ec49bcd158d61659b2f8c92d56d335064f098d8b06b0a78b5e93e51dfa8e1fa1cd30a4815b7ea8d0e0ff94130ec613ed5e2722939c76e1fa4e018b126f0bd332f011508bd9ee6cfd9100201",
            "witness_type": 2
        },
        "reward_chain_sp_proof": {
            "normalized_to_identity": false,
            "witness": "0x01004ce9b629f41155511b0d247220c8428c23a3a2713a43c7061e823269323fb3951e7c01a50dc1e330d961245c99bd733f24cfa810f0e4f6074d459e107208c8165318c4fd09807f321549a1df0b9314fb44065d0506fcc7ff9babc239c861e30e01000000000000000ed89ce6e11e70b4c92ca57047dbba6ad42756cf45cbcb239f82e20f6262128515d6790000f2a42daaf2ec7b062e62ee9c4e8c5785350dbe5e55975a429331376bc1bcd7f04797b73b2827818dd28aad93cd108d8719ece723299538848fb6d65060451a1ee5a3cf3e2bd923001cdd519c1dc8c2c1ea9ba638e4253b1dba1ae68a81812a1a01000000000000002c24818f9fd39f1aea0082f2cb3f3dd33e38f50bc7220d1939e003b6d4bc3cc15be1cd010067625ec3871ec9aa588cf3bfa35411579aad127bf044029c9f5ede8e43f9202405a7465ac1e62e299b59de58c54b208cdff3e5aa25df8c09a2961441b571c800e827ef7a7693855bce3261d8d1a9c1c16f18d50d79bfd5edc6dc19883bd6e6000200",
            "witness_type": 2
        },
        "transactions_generator": "0xff02ffff01ff02ffff01ff04ffff02ff02ffff04ff02ffff04ff05ffff04ff0bffff04ff5fffff04ff81bfffff04ffff0cff82027fff17ff2f80ff8080808080808080ff8080ffff04ffff01ff02ffff03ff17ffff01ff04ffff02ff0bffff04ff2fffff04ff05ffff04ff5fffff04ff27ff808080808080ffff02ff02ffff04ff02ffff04ff05ffff04ff0bffff04ff37ffff04ff2fffff04ff5fff808080808080808080ff8080ff0180ff018080ffff04ffff01ff02ff02ffff04ffff0eff05ff0bff1780ff808080ffff04ffff01ff04ff47ffff04ffff02ff05ffff04ff02ffff04ff0bffff04ff8197ffff01ff84ff0180808080808080ffff04ff81a7ff81d7808080ffff04ffff0127ffff04ffff01820115ffff04ffff01ffffffa034499004e2ede5ada989e9a21f007b4b98e6960cea77a667bb9ed7a0c96661f1ff8501f82ff87980ffffb1b0b78ab958abf5d6391d67aad2c53768c261d70dac40f6d68d77a1aca8975924150e2a349dc6b14acd2f02de11ab370e0affff80ffff01ffff33ffa084211ac4c001e691bb8fc131c6a2f655c32e0fc9ce784a6879cd8b016a5445a6ff8302ca4b80ffff33ffa059b023cb8095dc26b8d277860ebb9a6af256657c1902e0ef9697dd61832ec6b1ff8501f82d2e2e80ffff3cffa07bd4808cef0ceb3126dcb17a9a0dc7994491d2a645dfc9bb3b53d0ef8bb70a718080ff80808080ffffffa0083cf0788962f9cae780bd7e64e442a94fcd3e76e7cc4d21bc15616f4d7d1b13ff82058b80ffffb1b0a620a8378ba64877d8cfca18d5c9e171f305cb3faa9deca83d5cde518d3d57289e62a8c6e9b616adf8f38a46d59e10acffff80ffff01ffff33ffa02a6739b1d7765269102e047393e69b14c03136ff81e3ed416288fdf237190342ff6480ffff33ffa0785446bf395045839f33a40c4793b7f763ee921c479993ce2aba40d5090fb74bff82052780ffff3cffa02b5ee7078f62fcd34915447adc6a2e0535787904aab4ac5b0dcc504a916256a68080ff80808080ffffffa0c04d8715ff17c3c84beb9cea6340fc2a03cd79b6e7614e7cda1a5a72ed2cc220ff82074a80ffffb1b09751197d785c2822efd9b5e47d4356bc3821d6bdcda0b224ff2e036ff63027368d3b9b6be387367767d3f35ec31b22c6ffff80ffff01ffff33ffa06137334710112bd984c69538a64a08f56e46855c9e231cb0424c979bd7387605ff6480ffff33ffa0fd4789f4106657c4ad8145ab4a028932bbd9f5412b3aa7bb4f682ad203e1d2f6ff8206e680ffff3cffa0b1764506a6e8bceff12218bf7edd9d3692cd8ddd282a02000d1d21d1e44f2fc58080ff8080808080ff01808080808080",
        "transactions_generator_ref_list": [
            318678
        ],
        "transactions_info": {
            "aggregated_signature": "0x983049d16e71524751e747da7052216e1a31694bf1e7ac8becd0dfed1cf9e0786c31918c40d634d7aa75c1ada5cefc910766251e2c157a4be45d3d33ba4e313b15e5ed8b14675f252dd8cfe50b81a07f0a15b05e60f103c040eba4aac49e8b27",
            "cost": 29063766,
            "fees": 0,
            "generator_refs_root": "0xaef1135c172359b03d4852e13743bc7b996dbb6f1ee273222b7b739dce4df5ab",
            "generator_root": "0xfece83840f4c48e8bd73d75181ca1b178e34055eaf134a68883fa1a43a454868",
            "reward_claims_incorporated": [
                {
                    "amount": 1750000000000,
                    "parent_coin_info": "0xccd5bb71183532bff220ba46c268991a0000000000000000000000000004fe00",
                    "puzzle_hash": "0xe068285e53773b3cbc14b0e5ae47b602bc1b54bfa193951a096838d0de3b07b1"
                },
                {
                    "amount": 255000100010,
                    "parent_coin_info": "0x3ff07eb358e8255a65c30a2dce0e5fbb0000000000000000000000000004fe00",
                    "puzzle_hash": "0xe068285e53773b3cbc14b0e5ae47b602bc1b54bfa193951a096838d0de3b07b1"
                },
                {
                    "amount": 1750000000000,
                    "parent_coin_info": "0xccd5bb71183532bff220ba46c268991a0000000000000000000000000004fdff",
                    "puzzle_hash": "0x53b282e8cfe10dbaa405e063115e4e34a64727dfafdd040f74fe2afc60db5ff9"
                },
                {
                    "amount": 250000000000,
                    "parent_coin_info": "0x3ff07eb358e8255a65c30a2dce0e5fbb0000000000000000000000000004fdff",
                    "puzzle_hash": "0x53b282e8cfe10dbaa405e063115e4e34a64727dfafdd040f74fe2afc60db5ff9"
                }
            ]
        }
    },
    "success": true
}
目前尚无回复
简单教程 = 简单教程,简单编程
简单教程 是一个关于技术和学习的地方
现在注册
已注册用户请 登入
关于   |   FAQ   |   我们的愿景   |   广告投放   |  博客

  简单教程,简单编程 - IT 入门首选站

Copyright © 2013-2022 简单教程 twle.cn All Rights Reserved.