Add regtest network constant

Added to the library with bitcoinjs/bitcoinjs-lib#1261
This commit is contained in:
Franck Royer 2019-03-04 16:03:11 +11:00
parent 34116971d5
commit 8fdbc6ef46
2 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,10 @@ keyPair3.toWIF();
bitcoin.payments.p2pkh({ pubkey: keyPair3.publicKey });
const network = keyPair3.network;
const keyPair4 = bitcoin.ECPair.makeRandom({network: bitcoin.networks.regtest, rng});
keyPair4.toWIF();
bitcoin.payments.p2pkh({ pubkey: keyPair4.publicKey });
// Test TransactionBuilder and Transaction
const txb = new bitcoin.TransactionBuilder();
txb.addInput('aa94ab02c182214f090e99a0d57021caffd0f195a81c24602b1028b130b63e31', 0);

View File

@ -191,6 +191,7 @@ export class TransactionBuilder {
export const networks: {
bitcoin: Network;
testnet: Network;
regtest: Network;
};
export const opcodes: {