bhive.notify module

class bhive.notify.Notify(on_block=None, only_block_id=False, hive_instance=None, keep_alive=25)

Bases: events.events.Events

Notifications on Blockchain events.

This modules allows yout to be notified of events taking place on the blockchain.

Parameters
  • on_block (fnt) – Callback that will be called for each block received

  • hive_instance (Hive) – Hive instance

Example

from pprint import pprint
from bhive.notify import Notify

notify = Notify(
    on_block=print,
)
notify.listen()
close()

Cleanly close the Notify instance

listen()

This call initiates the listening/notification process. It behaves similar to run_forever().

process_block(message)
reset_subscriptions(accounts=[])

Change the subscriptions of a running Notify instance