def get_authenticator(auth, config_dir): """Return an object that implements the authentication interface""" if auth == 'hardware': logging.debug('using hwi for hardware wallet authentication') return HWIDevice.get_device() if auth == 'wally': logging.debug('using libwally for external authentication') return WallyAuthenticator(config_dir) logging.debug('using standard gdk authentication') return DefaultAuthenticator(config_dir)
def mnemonic(file_, mnemonic): if file_: mnemonic = fileinput.input(mnemonic).readline() DefaultAuthenticator(context.config_dir).set_mnemonic(mnemonic)