@jude i am trying to connect my blockstack browser to my local private blockstack/bitcoin node(running regtest). I used send-core in the browser to transfer my bitcoins from my legacy to the new wallet address displayed in blockstack browser. my legacy wallet’s bitcoin balance is 0 also the bitcoins are not deposited in the browser wallet. I have my bitcore with insight api attached to my local bitcoin instance and my blockstack browser to the local bitcore. when i use the address displayed on the browser in insight api is being reported as an invalid address. I am trying to buy a name from blockstack browser in this setup. Any tips on what i am missing here?
I’m confused by what you’re asking. Are you trying to use your (mainnet) Bitcoin from your CLI wallet in regtest? Because if so, that won’t work—the regtest node knows nothing about the status of your Bitcoin on mainnet (by design). Also, regtest Bitcoin addresses are encoded differently than mainnet addresses intentionally to prevent you from accidentally sending your mainnet Bitcoins to a regtest address (which I’m guessing is the cause of the error you’re seeing).
Thanks for your response. I am using my regtest bitcoin instance. I am trying to bring up a permissioned network for my PoC. Is there a way i can generate a regtest encoded address in the browser?
Assuming you started the Browser in regtest mode, this should already be the case. Does your address start with
n, or does it start with
EDIT: this is not the case in the current stable branch. Addresses start with
1 even in regtest mode. Mea culpa.
it starts with 1 in blockstack browser and m in my regtest instance. It would help immensely if you could point me to the config that can start the browser in regtest mode.
Sorry about that–I had mistakenly given advise based off of a development build in my earlier comment (which has been updated).
when i use the address displayed on the browser in insight api is being reported as an invalid address
I haven’t set up the bitcore insight API with regtest myself, but my guess here is that the bitcoin wallet address in the browser (mainnet-formatted; starts with
1 per my updated comment) needs to be converted to a regtest address. This can be done with the following Python snippit:
>>> import virtualchain >>> virtualchain.address_reencode("1LawNKb8exZHk6DTYnhk1nJ5DXVUVZD8wL", network="testnet") `n16tfNg7TyzYXCh5GMg7qhWQ5X6BNVvro1`
(You should be able to install
pip, or from here if that does not work).
thanks Jude. you have been a great help. Lemme try this out. Can you point me to the code/config where i would update the regtest encoded address in blockstack browser?
Can you point me to the code/config where i would update the regtest encoded address in blockstack browser?
I’m not sure what you’re asking? The wallet address in the browser is derived from your 12-word phrase. The only way to get a different address is to use a different 12-word phrase.