getBlock

根据区块高度或者区块 id 查询区块信息。

用法

visionWeb.vs.getBlock(block);

入参

参数描述类型默认值
block区块高度或者区块 idnumber | string-

返回值

object,查询到的区块信息。

示例

visionWeb.vs.getBlock(10000);
> {
  blockID: '0000000000002710a66f6c78183c73a2e69a4e083002d77cb1973d3ef743b02b',
  block_header: {
    raw_data: {
      number: 10000,
      txTrieRoot: '0000000000000000000000000000000000000000000000000000000000000000',
      witness_address: '462d7a77f8bef6fe225bf5e353dd6a380f588a1496',
      parentHash: '000000000000270f0217b0072e6c01d51bb2caae7fef8ee963078bc8e88a454a',
      version: 19,
      timestamp: 1608040836000
    },
    witness_signature: '5dd0d3c6ff500672e2cafc989b1f4f87d35d066c104510145ab5e266d7d1678f179dcff6897ecae1d5f57552d85f38bdf54df89df4b618f7cb2ab9415095ee3501'
  }
}