electrum-bitcoinprivate/lib/wallet_factory.py

12 lines
388 B
Python

class WalletFactory(object):
def __new__(cls, config):
if config.get('bitkey', False):
# if user requested support for Bitkey device,
# import Bitkey driver
from wallet_bitkey import WalletBitkey
return WalletBitkey(config)
# Load standard wallet
from wallet import Wallet
return Wallet(config)