getTransactionByHashWithProof
返回根据交易哈希查询的带证明的交易信息,本接口仅在兼容性版本为2.2.0及以后的版本有效,证明信息是为了验证交易的存在性,交易存在性证明请参考文档交易证明
参数
groupID
:unsigned int
- 群组IDtransactionHash
:string
- 交易哈希
返回值
object
: - 交易信息,其字段如下:blockHash
:string
- 包含该交易的区块哈希blockNumber
:string
- 包含该交易的区块高度from
:string
- 发送者的地址gas
:string
- 发送者提供的gasgasPrice
:string
- 发送者提供的gas的价格hash
:string
- 交易哈希input
:string
- 交易的输入nonce
:string
- 交易的nonce值to
:string
- 接收者的地址,创建合约交易的该值为0x0000000000000000000000000000000000000000
transactionIndex
:string
- 交易的序号value
:string
- 转移的值
array
- 交易证明,字段如下:left
:array
- 左边的哈希列表right
:array
- 右边的哈希列表
- 示例
curl -X POST --data '{"jsonrpc":"2.0","method":"getTransactionByHashWithProof","params":[1,"0xd2c12e211315ef09dbad53407bc820d062780232841534954f9c23ab11d8ab4c"],"id":1}' http://127.0.0.1:8585 |jq
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"transaction": {
"blockHash": "0xcd31b05e466bce99460b1ed70d6069fdfbb15e6eef84e9b9e4534358edb3899a",
"blockNumber": "0x5",
"from": "0x148947262ec5e21739fe3a931c29e8b84ee34a0f",
"gas": "0x1c9c380",
"gasPrice": "0x1c9c380",
"hash": "0xd2c12e211315ef09dbad53407bc820d062780232841534954f9c23ab11d8ab4c",
"input": "0x8a42ebe90000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000000000000a3564646636663863653800000000000000000000000000000000000000000000",
"nonce": "0x208f6fd78d48aad370df51c6fdf866f8ab022de765c2959841ff2e81bfd9af9",
"to": "0xd6c8a04b8826b0a37c6d4aa0eaa8644d8e35b79f",
"transactionIndex": "0x32",
"value": "0x0"
},
"txProof": [
{
"left": [
"30f0abfcf4ca152815548620e33d21fd0feaa7c78867791c751e57cb5aa38248c2",
"31a864156ca9841da8176738bb981d5da9102d9703746039b3e5407fa987e5183e"
],
"right": [
"33d8078d7e71df3544f8845a9db35aa35b2638e8468a321423152e64b9004367b4",
"34343a4bce325ec8f6cf48517588830cd15f69b60a05598b78b03c3656d1fbf2f5",
"35ac231554047ce77c0b31cd1c469f1f39ebe23404fa8ff6cc7819ad83e2c029e7",
"361f6c588e650323e03afe6460dd89a9c061583e0d62c117ba64729d2c9d79317c",
"377606f79f3e08b1ba3759eceada7fde3584f01822467855aa6356652f2499c738",
"386722fe270659232c5572ba54ce23b474c85d8b709e7c08e85230afb1c155fe18",
"39a9441d668e5e09a5619c365577c8c31365f44a984bde04300d4dbba190330c0b",
"3a78a8c288120cbe612c24a33cce2731dd3a8fe6927d9ee25cb2350dba08a541f5",
"3bd9b67256e201b5736f6081f39f83bcb917261144384570bdbb8766586c3bb417",
"3c3158e5a82a1ac1ed41c4fd78d5be06bf79327f60b094895b886e7aae57cff375",
"3de9a4d98c5ae658ffe764fbfa81edfdd4774e01b35ccb42beacb67064a5457863",
"3e525e60c0f7eb935125f1156a692eb455ab4038c6b16390ce30937b0d1b314298",
"3f1600afe67dec2d21582b8c7b76a15e569371d736d7bfc7a96c0327d280b91dfc"
]
},
{
"left": [
"3577673b86ad4d594d86941d731f17d1515f4669483aed091d49f279d677cb19",
"75603bfea5b44df4c41fbb99268364641896334f006af3a3f67edaa4b26477ca",
"1339d43c526f0f34d8a0f4fb3bb47b716fdfde8d35697be5992e0888e4d794c9"
],
"right": [
"63c8e574fb2ef52e995427a8acaa72c27073dd8e37736add8dbf36be4f609ecb",
"e65353d911d6cc8ead3fad53ab24cab69a1e31df8397517b124f578ba908558d"
]
},
{
"left": [],
"right": []
}
]
}
}
当前内容版权归 fisco-bcos.org 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 fisco-bcos.org .