def get_utxo_client(): client = BitcoindClient(server=UTXO_SERVER, port=BITCOIND_PORT, user=UTXO_USER, passwd=UTXO_PASSWD, use_https=BITCOIND_USE_HTTPS) return client
def get_bitcoind_client(): client = BitcoindClient(server=BITCOIND_SERVER, port=BITCOIND_PORT, user=BITCOIND_USER, passwd=BITCOIND_PASSWD, use_https=BITCOIND_USE_HTTPS, passphrase=BITCOIND_WALLET_PASSPHRASE) return client
def initialize_watch_only_addresses(bicoind_server, bitcoind_port, bitcoind_user, bicoind_passwd, use_https): """ Add all addresses from HD Wallet as watch-only addresses at the given bitcoind server (UTXO provider) """ child_addresses = wallet.get_child_keypairs(count=DEFAULT_CHILD_ADDRESSES) client = BitcoindClient(server=bitcoind_server, port=bitcoind_port, user=bitcoind_user, passwd=bitcoind_passwd, use_https=use_https) for address in child_addresses: resp = client.importaddress(address, 'registrar', False) if resp == "None": log.debug("Added watch-only address: %s" % address)