jsonRpc.get_block_header_state()
get_block_header_state()
方法是对RPC接口/v1/chain/get_block_header_state
的封装。
函数原型
get_block_header_state(block_num_or_id: number | string): Promise<any>
参数
block_num_or_id:区块编号或id,number或string类型
返回值
get_block_header_state()
方法返回一个Promise对象,其解析值为RPC响应结果对象
示例代码
(async ()=>{
let ret = await rpc.get_block_header_state(1)
console.log(ret)
})()