Establish a websocket connection to the node to receive real-time updates on new blocks.
This endpoint can also be used to resume a subscription from a specific point in time.
Example:
const ws = new WebSocket('ws://localhost:8669/subscriptions/block')
ws.onmessage = (event) => {
console.log(event.data)
}
OK
The block number (height).
325324
The block identifier.
"0x0004f6cc88bb4626a92907718e82f255b8fa511453a78e8797eb8cea3393b215"
^0x[0-9a-f]{64}$
The RLP encoded block size in bytes
373
The parent block identifier.
"0x0004f6cb730dbd90fed09d165bfdf33cc0eed47ec068938f6ee7b7c12a4ea98d"
^0x[0-9a-f]{64}$
The UNIX timestamp of the block.
1533267900
The maximum amount of gas that all transactions inside the block are allowed to consume
11253579
The address assigned by the block proposer to receive the reward (in VTHO)
"0xb4094c25f86d628fdd571afc4077f0d0196afb48"
^0x[0-9a-f]{40}$
The actual amount of gas used within the block
21000
The accumulated witness number of the chain branch headed by the block
1029988
The root hash of transactions in the block
"0x89dfd9fcd10c9e53d68592cf8b540b280b72d381b868523223992f3e09a806bb"
^0x[0-9a-f]{64}$
The supported transaction features bitset
0
The root hash for the global state after applying changes in this block
"0x86bcc6d214bc9d8d0dedba1012a63c8317d19ce97f60c8a2ef5c59bbd40d4261"
^0x[0-9a-f]{64}$
The hash of the transaction receipts trie
"0x15787e2533c470e8a688e6cd17a1ee12d8457778d5f82d2c109e2d6226d8e54e"
^0x[0-9a-f]{64}$
Whether the block signer voted COM(Commit) in BFT
true
The address of the block signer
"0xab7b27fc9e7d29f9f2e5bd361747a5515d0cc2d1"
^0x[0-9a-f]{40}$
Indicates whether the block containing this data has become obsolete (true) or not (false).
false
An array of transaction IDs associated with the block.