Filecoin.ClientDealPieceCID
Filecoin.ClientDealPieceCID计算指定cid的对象数据大小。
参数
- rootCid
返回值
Filecoin.ClientDealPieceCID返回DataCIDSize对象。
示例代码
请求:
curl -X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc":"2.0",
"method":"Filecoin.ClientDealPieceCID",
"params":[{"/","bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"}],
"id":7878
}' \
http://127.0.0.1:1234/rpc/v0
响应:
{
"id": 7878,
"jsonrpc": "2.0",
"result": {
"PayloadSize": 9,
"PieceSize": 1032,
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
}
}