Filecoin RPC 接口之根据块 CID 获取块中的消息 ,调用的 RPC 方法名是 Filecoin.ChainGetBlockMessages
Curl 发起的请求为
curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $(cat ~/.lotusstorage/token)" \ --data '{ "jsonrpc": "2.0", "method": "Filecoin.ChainGetBlockMessages", "params": [{"/":"bafy2bzacec7bujc4alv7axu3o4jvqyc6qimxxrrqfnl2rowpkg4gwxtafvutg"}], "id": 3 }' \ 'http://127.0.0.1:1234/rpc/v0'
返回的信息如下
{ "jsonrpc":"2.0", "result":{ "BlsMessages":[ ], "SecpkMessages":[ ], "Cids":[ ] }, "id":3 }