Establish a websocket connection to receive blockchain beats, which contain a summary of new blocks and bloom filters composited with affected addresses.
Example:
const ws = new WebSocket('ws://localhost:8669/subscriptions/beat')
ws.onmessage = (event) => {
console.log(event.data)
}
OK
Indicates whether the block containing this data has become obsolete (true) or not (false).
false
The block number (height)
325324
The block identifier
"0x0004f6cc88bb4626a92907718e82f255b8fa511453a78e8797eb8cea3393b215"
^0x[0-9a-f]{64}$
The parent block identifier
"0x0004f6cb730dbd90fed09d165bfdf33cc0eed47ec068938f6ee7b7c12a4ea98d"
^0x[0-9a-f]{64}$
The UNIX timestamp of the block
1533267900
The supported transaction features bitset
0
A hexadecimal representation of the bloom filter composed with affected addresses & topics.
The bloom filter is used to efficiently check whether an element is a member of a set, providing a summary of affected addresses related to new blocks.
"0x0424c1ff47029280"
^0x[0-9a-f]*$
The number of hash functions for bloom filter
13