def main(): cleanup_tmp_dir() config_options = { 'verbose': is_debug_build(), 'cmd': 'gui', 'gui': 'ios_native', 'cwd': os.getcwd(), 'whitelist_servers_only': True, # on iOS we force only the whitelist ('preferred') servers only for now as a security measure } set_verbosity(config_options.get('verbose'), timestamps=False, thread_id=False) NSLogSuppress(not config_options.get('verbose')) MonkeyPatches.patch() config = SimpleConfig(config_options, read_user_dir_function=get_user_dir) gui = ElectrumGui(config) call_later( 0.010, gui.main ) # this is required for the activity indicator to actually animate. Switch to a direct call if not using activity indicator on Splash2 _printStats( config_options ) # Prints some startup/debug stats such as Python version and SSL version (this is done in another thread to hopefully not impact startup overhead too much, as importing ssl may be a bit heavy) return "Vitae FTW!"
def main(): cleanup_tmp_dir() config_options = { 'verbose': is_debug_build(), 'cmd': 'gui', 'gui': 'ios_native', 'cwd': os.getcwd(), } set_verbosity(config_options.get('verbose'), timestamps=False, thread_id=False) NSLogSuppress(not config_options.get('verbose')) MonkeyPatches.patch() #for k,v in config_options.items(): # print("config[%s] = %s"%(str(k),str(v))) config = SimpleConfig(config_options, read_user_dir_function=get_user_dir) gui = ElectrumGui(config) call_later( 0.010, gui.main ) # this is required for the activity indicator to actually animate. Switch to a direct call if not using activity indicator on Splash2 return "Bitcoin Cash FTW!"
def __init__(self): super().__init__(SimpleConfig({"verbose": True}), wallet=None, network=None) fd, server = daemon.get_fd_or_server(self.config) if not fd: raise Exception( "Daemon already running") # Same wording as in daemon.py. # Initialize here rather than in start() so the DaemonModel has a chance to register # its callback before the daemon threads start. self.daemon = daemon.Daemon(self.config, fd, False) self.network = self.daemon.network self.network.register_callback(self._on_callback, CALLBACKS) self.daemon_running = False
def main(): cleanup_tmp_dir() config_options = { 'verbose': True, 'cmd': 'gui', 'gui': 'ios_native', 'cwd': os.getcwd(), } set_verbosity(config_options.get('verbose')) for k,v in config_options.items(): print("config[%s] = %s"%(str(k),str(v))) config = SimpleConfig(config_options, read_user_dir_function = get_user_dir) gui = ElectrumGui(config) gui.main() return "Bitcoin Cash FTW!"
"rpcpassword": os.getenv("ELECTRUM_PASSWORD", "changeme"), "rpcport": 7000, "rpchost": "0.0.0.0", 'cwd': os.getcwd(), 'auto_connect': True, 'verbose': False, 'wallet_password': os.getenv("WALLET_PASSPHRASE"), "noonion": True, } if __name__ == '__main__': set_verbosity(config_options.get('verbose')) if config_options.get('testnet'): networks.set_testnet() config = SimpleConfig(config_options) storage = WalletStorage(config.get_wallet_path()) if not storage.file_exists(): print_msg("Wallet doesn't exist, creating...") data = create_new_wallet(path=storage.path, config=config, password=config_options['wallet_password'], encrypt_file=True) storage = WalletStorage(storage.path) if storage.is_encrypted() is False: print_msg("Error: Wallet is unencrypted") sys.exit(1) fd, server = daemon.get_fd_or_server(config)