def create_imported_wallet(cls, privkeys=False): store = storage.WalletStorage( 'if_this_exists_mocking_failed_648151893') if privkeys: k = keystore.Imported_KeyStore({}) store.put('keystore', k.dump()) w = Imported_Wallet(store) return w
def create_standard_wallet(cls, ks, gap_limit=None): store = storage.WalletStorage( 'if_this_exists_mocking_failed_648151893') store.put('keystore', ks.dump()) store.put('gap_limit', gap_limit or cls.gap_limit) w = Standard_Wallet(store) w.synchronize() return w
def create_multisig_wallet(cls, keystores: Sequence, multisig_type: str, gap_limit=None): """Creates a multisig wallet.""" store = storage.WalletStorage( 'if_this_exists_mocking_failed_648151893') for i, ks in enumerate(keystores): cosigner_index = i + 1 store.put('x%d/' % cosigner_index, ks.dump()) store.put('wallet_type', multisig_type) store.put('gap_limit', gap_limit or cls.gap_limit) w = Multisig_Wallet(store) w.synchronize() return w