Issues with Loading a Regtest Wallet in Bitcoinlib

1 reply 356 views
R0gueForkSenior Member
Posts: 3 · Reputation: 1309
#1Feb 15, 2022, 12:52 AM
I'm trying to load a regtest wallet with bitcoinlib but I'm kinda lost on how to do it. Here's what I've got: >>> from bitcoinlib.wallets import wallet_create_or_open, Wallet >>> from bitcoinlib.services.bitcoind import BitcoindClient >>> >>> # Connecting to local regtest daemon >>> base_url = 'http://user:password@127.0.0.1:18443' >>> bitcoind_client = BitcoindClient(network='regtest', base_url=base_url) >>> >>> # Create or load wallet >>> wallet_name = 'my_regtest_wallet' >>> wallet = wallet_create_or_open(wallet_name, network='reg
4 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#2Feb 15, 2022, 04:18 AM
bitcoinlib has a documentary on how to do that: https://bitcoinlib.readthedocs.io/en/latest/source/_static/manuals.setup-bitcoind-connection.html But since you're using the deprecated RPC username and password, set "rpcuser" and "rpcpassword" in your bitcoin.conf file instead of the "rpcauth" in the provided example in their doc. Don't forget to restart Bitcoin Core whenever you want to apply the new config in your conf file.
3 Reply Quote Share

Related topics