BLOCK_HEIGHT_CHANGED
On a BLOCK_HEIGHT_CHANGED event, the block has advanced to the next.
Parameter
Description
chainId: number
ChainId is the type of wallet selection network
blockHeight: number
Height of the new block
blockTime: number
Timestamp of the new block
blockHash: string
Hash of the new block
tx: string[]
List of transaction ids executed in the new block
Example
neoline.addEventListener(neoline.EVENT.BLOCK_HEIGHT_CHANGED, (result) => {
console.log('block height:', result);
});
/* Another */
window.addEventListener('NEOLine.NEO.EVENT.BLOCK_HEIGHT_CHANGED', (result) => {
console.log('block height:', result.detail);
});
最后更新于
这有帮助吗?