Hello,
I am trying to run the P2WPKH test on my machine, using Bitcoin Core on regtest mode to fund the p2wpkh address manually.
The address starts with tb, which is not what I want because Core is using bcrt address prefix on regtest.
Bitcoinjs doesn't have a regtest object in bitcoin.networks, so what am I suppose to do?
Is bitcoinjs able to produce a regtest p2wpkh address?
Thank you.
Is bitcoinjs able to produce a regtest p2wpkh address?
If you create a custom network, yes.
The network object is not that complicated, you can make a custom one to meet your needs.
Check the integration tests, they use testnet for regtest?
edit: PR wanted
@dcousens He is saying that regtest has a different bech32 value for segwit.
bech32: 'bcrt'
Make a PR please that adds regtest and respective constants and use it in the integration tests :+1:
@Janaka-Steph please see #1261, thanks @junderw