-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use Testnet #21
Comments
As far as I know, it doesn't work with testnet. You'll want to use one of the forks: https://github.com/vbuterin/bitcoinjs-lib & https://github.com/kyledrake/bitcoinjs-lib or follow our effort over here: https://github.com/cryptocoinjs/cryptocoin |
@jprichardson it should be as simple as changing the address prefix... need to verify that with others. |
For generating testnet addresses, yes, just set an instance of Bitcoin.Address |
edit: See below for up-to-date examples |
From the integration tests directory
|
If you want to create the ECPair from a hash:
|
@mixdev this doesn't work anymore, see #1085 and changelog:
However, |
pass network to p2pkh and all portions inside it. |
@junderw is the |
with the new payments API, no... not really. |
@junderw Could you suggest how to pass network to p2pkh? This code still returns mainnet address: |
const { address } = bitcoin.payments.p2pkh({ pubkey, network: bitcoin.networks.testnet}) this works. one arg, not two. |
I had to pass it directly as a parameter |
* bump bip174-liquid * blech32 from NPM * use blech32 from NPM * format test
How can I use this lib to work with testnet?
The text was updated successfully, but these errors were encountered: