Filecoin.ChainGetBlock
Filecoin.ChainGetBlock返回指定CID的区块。
参数
- cid:要读取区块的CID
返回值
Filecoin.ChainGetBlock返回区块对象。
示例代码
请求:
curl -X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc":"2.0",
"method":"Filecoin.ChainGetBlcok",
"params":[{"/","bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"}],
"id":7878
}' \
http://127.0.0.1:1234/rpc/v0
响应:
{
"id": 7878,
"jsonrpc": "2.0",
"result": {
"Miner": "f01234",
"Ticket": {
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"ElectionProof": {
"WinCount": 9,
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"BeaconEntries": null,
"WinPoStProof": null,
"Parents": null,
"ParentWeight": "0",
"Height": 10101,
"ParentStateRoot": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"ParentMessageReceipts": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Messages": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"BLSAggregate": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Timestamp": 42,
"BlockSig": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"ForkSignaling": 42,
"ParentBaseFee": "0"
}
}