graphenecommon.witness module

class graphenecommon.witness.Witness(*args, **kwargs)

Bases: graphenecommon.blockchainobject.BlockchainObject, graphenecommon.instance.AbstractBlockchainInstanceProvider

Read data about a witness in the chain

Parameters:
  • account_name (str) – Name of the witness
  • blockchain_instance (instance) – instance to use when accesing a RPC
account
is_active
refresh()
weight
class graphenecommon.witness.Witnesses(*args, only_active=False, lazy=False, **kwargs)

Bases: graphenecommon.blockchainobject.BlockchainObjects, graphenecommon.instance.AbstractBlockchainInstanceProvider

Obtain a list of active witnesses and the current schedule

Parameters:
  • only_active (bool) – (False) Only return witnesses that are actively producing blocks
  • blockchain_instance (instance) – instance to use when accesing a RPC
refresh(*args, **kwargs)

Interface that needs to be implemented. This method is called when an object is requested that has not yet been fetched/stored