graphenecommon.instance module

class graphenecommon.instance.AbstractBlockchainInstanceProvider(*args, **kwargs)

Bases: object

This is a class that allows compatibility with previous naming conventions. It will extract ‘blockchain_instance’ from the key word arguments and ensure that self.blockchain contains an instance of the main chain instance


Short form for blockchain (for the lazy)


Needs to define instance variables that provide classes


Should return the Chain instance class, e.g. bitshares.BitShares

classmethod inject(cls)
static set_shared_blockchain_instance(instance)

This method allows us to override default instance for all users of SharedInstance.instance.

Parameters:instance (chaininstance) – Chain instance

This method will initialize SharedInstance.instance and return it. The purpose of this method is to have offer single default instance that can be reused by multiple classes.


alias of graphenecommon.instance.AbstractBlockchainInstanceProvider

class graphenecommon.instance.SharedInstance

Bases: object

This class merely offers a singelton for the Blockchain Instance

config = {}
instance = None