Merge pull request #33571 from coblox/bitcoinjs-lib-add-regtest

[bitcoinjs-lib] Add regtest network constant
This commit is contained in:
Nathan Shively-Sanders
2019-03-07 16:04:25 -08:00
committed by GitHub
2 changed files with 5 additions and 0 deletions
@@ -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);
+1
View File
@@ -191,6 +191,7 @@ export class TransactionBuilder {
export const networks: {
bitcoin: Network;
testnet: Network;
regtest: Network;
};
export const opcodes: {