bitshares.instance module

class bitshares.instance.BlockchainInstance(*args, **kwargs)

Bases: object

This is a class that allows compatibility with previous naming conventions

bitshares

Alias for the specific blockchain

chain

Short form for blockchain (for the lazy)

class bitshares.instance.SharedInstance

Bases: object

This class merely offers a singelton for the Blockchain Instance

config = {}
instance = None
bitshares.instance.clear_cache()

Clear Caches

bitshares.instance.set_shared_bitshares_instance(bitshares_instance)

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

Parameters:bitshares_instance (bitshares.bitshares.BitShares) – BitShares instance
bitshares.instance.set_shared_blockchain_instance(bitshares_instance)

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

Parameters:bitshares_instance (bitshares.bitshares.BitShares) – BitShares instance
bitshares.instance.set_shared_config(config)

This allows to set a config that will be used when calling shared_bitshares_instance and allows to define the configuration without requiring to actually create an instance

bitshares.instance.shared_bitshares_instance()

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

bitshares.instance.shared_blockchain_instance()

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