文档
定价GitHub控制台

Zcash

gettxoutsetinfo8 额度

返回未花费交易输出集的统计数据

网络: zcash

参数

名称类型描述
hash_typestring要计算的 UTXO 集哈希:hash_serialized_3(默认)、muhash 或 none。较旧版本使用 hash_serialized_2。 (可选)
hash_or_heightstring | number要报告的区块哈希或高度。默认为链顶端。仅在启用 coinstatsindex 时才适用于其他区块。 (可选)
use_indexboolean可用时使用 coinstatsindex。默认为 true。 (可选)

返回值

类型

Object

height、bestblock、txouts、bogosize、所请求的哈希(hash_serialized_3 或 muhash)、total_amount,以及在不是由 coinstatsindex 提供时的 transactions 和 disk_size。使用 coinstatsindex 时还有 total_unspendable_amount 和 block_info。此调用会扫描整个 UTXO 集,可能需要数分钟。

代码示例

curl https://holy-burned-sky-zcash-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxoutsetinfo",
  "params": [
    "hash_serialized_3"
  ]
}'