addedBlocks method

Stream<String> addedBlocks()

Listens for new blocks that are added to the chain. The stream will emit the hexadecimal hash of the block after it has been added.

The stream can only be listened to once. The subscription must be disposed properly when no longer used. Failing to do so causes a memory leak in your application and uses unnecessary resources on the connected node. See also:

  • hexToBytes and hexToInt, which can transform hex strings into a byte or integer representation.

Implementation

Stream<String> addedBlocks() {
  return _filters.addFilter(_NewBlockFilter());
}