bitshares.aio.instance module¶
-
class
bitshares.aio.instance.BlockchainInstance(*args, **kwargs)[source]¶ Bases:
graphenecommon.aio.instance.AbstractBlockchainInstanceProviderThis is a class that allows compatibility with previous naming conventions.
-
bitshares¶ Alias for the specific blockchain.
-
blockchain¶
-
chain¶ Short form for blockchain (for the lazy)
-
define_classes()¶ Needs to define instance variables that provide classes
-
classmethod
inject(cls)¶
-
classmethod
set_shared_blockchain_instance(instance)¶ This method allows us to override default instance for all users of
SharedInstance.instance.Parameters: instance (chaininstance) – Chain instance
-
classmethod
set_shared_config(config)¶ This allows to set a config that will be used when calling
shared_blockchain_instanceand allows to define the configuration without requiring to actually create an instance
-
set_shared_instance()¶ This method allows to set the current instance as default
-
shared_blockchain_instance()¶ This method will initialize
SharedInstance.instanceand return it. The purpose of this method is to have offer single default instance that can be reused by multiple classes.
-
-
class
bitshares.aio.instance.SharedInstance[source]¶ Bases:
objectThis class merely offers a singelton for the Blockchain Instance.
-
config= {}¶
-
instance= None¶
-
-
bitshares.aio.instance.set_shared_bitshares_instance(instance)¶
-
bitshares.aio.instance.shared_bitshares_instance()¶