BLOCK_HEIGHT_CHANGED

On a BLOCK_HEIGHT_CHANGED event, the block has advanced to the next.

ParameterDescription

network?: string

Network of the block which changed

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);
});

最后更新于