跳到主要内容

Blob API

eth_getBlobSidecarByTxHash

参数

哈希字符串(必需)

  • HEX String - 交易的哈希值

full_blob_flag 布尔值(可选)

  • 默认值为 true。如果为 true,则返回完整的 blob 信息,如果为 false,则仅返回 blob 的前 32 个字节。
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json"  --data '{"jsonrpc":"2.0","method":"eth_getBlobSidecarByTxHash","params":["0x377d3615d2e76f4dcc0c9a1674d2f5487cba7644192e7a4a5af9fe5f08b60a63"],"id":1}'
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlobSidecarByTxHash","params":["0x377d3615d2e76f4dcc0c9a1674d2f5487cba7644192e7a4a5af9fe5f08b60a63", false],"id":1}'

eth_getBlobSidecars

参数

区块编号 数量|标签

  • HEX 字符串 - 整数块号
  • HEX 字符串 - 块的哈希值
  • 字符串“earliest”表示最早/创世块
  • String "latest" - 最新开采的区块
  • 字符串“safe” - 用于最新的合理头块
  • String "finalized" - 用于最新的最终确定块

full_blob_flag 布尔值(可选)

  • 默认值为 true。如果为 true,则返回完整的 blob 信息,如果为 false,则仅返回 blob 的前 32 个字节。
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json"  --data '{"jsonrpc":"2.0","method":"eth_getBlobSidecars","params":["latest"],"id":1}'
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlobSidecars","params":["0xc5043f", false],"id":1}'