def __init__(self, *args, **kwargs): self.define_classes() assert self.privatekey_class assert self.default_key_store_app_name # Compatibility after name change from wif->keys if "wif" in kwargs and "keys" not in kwargs: kwargs["keys"] = kwargs["wif"] if "keys" in kwargs: self.store = InRamPlainKeyStore() self.setKeys(kwargs["keys"]) else: if "appname" not in kwargs: kwargs["appname"] = self.default_key_store_app_name self.store = kwargs.get( "key_store", SqliteEncryptedKeyStore(config=self.blockchain.config, **kwargs), )
def __init__(self, path, create=True, **kwargs): log.info("Initializing storage %s create: %s" %(path, str(create))) #super(BitsharesStorageExtra, self).__init__(path=path, create=create, **kwargs) # Bitshares self.configStorage = SqliteConfigurationStore(path=path, create=create) self.keyStorage = SqliteEncryptedKeyStore(config=self.configStorage, path=path, create=create) self.blindStorage = SqliteBlindHistoryStore(path=path, create=create) # Extra storages self.accountStorage = Accounts(path=path, create=create) self.blindAccountStorage = BlindAccounts(path=path, create=create) #self.labelStorage = Label(path, create=create) self.assetStorage = Assets(path=path, create=create) self.historyStorage = History(path=path, create=create) self.remotesStorage = Remotes(path=path, create=create) self.gatewayStorage = ExternalHistory(path=path, create=create) # Set latest db version #self.configStorage["db_version"] = "3" from bitsharesextra.chatstorage import ChatRooms self.chatroomStorage = ChatRooms(path=path, create=create)
def get_default_key_store(config, *args, **kwargs): if "appname" not in kwargs: kwargs["appname"] = "peerplays" return SqliteEncryptedKeyStore(config=config, **kwargs)