diff --git a/package-lock.json b/package-lock.json index b57c244..9aac261 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1499,12 +1499,14 @@ } }, "regtest-client": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/regtest-client/-/regtest-client-0.1.0.tgz", - "integrity": "sha512-qTy+VvEKx8NRxSCr1jr+l9d+DeF06lxxWU9kmS8+kRVtgWHBTZYgQwRN6KkVqBGYP1Vls6dlG9X874WWTEurSQ==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regtest-client/-/regtest-client-0.2.0.tgz", + "integrity": "sha512-eIcC8Kle/wjS47pRlw7nJpstrJDWp0bkvVPl2KJpJcK3JDNW0fMxJgE/CGpMEUSjhhFXW1rtJMN6kyKw5NIzqg==", "dev": true, "requires": { - "dhttp": "^3.0.3" + "bs58check": "^2.1.2", + "dhttp": "^3.0.3", + "randombytes": "^2.1.0" } }, "release-zalgo": { diff --git a/package.json b/package.json index f72d7e0..daa2813 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "nyc": "^14.1.1", "prettier": "1.16.4", "proxyquire": "^2.0.1", - "regtest-client": "0.1.0", + "regtest-client": "0.2.0", "rimraf": "^2.6.3", "tslint": "^5.16.0", "typescript": "3.2.2" diff --git a/test/integration/_regtest.js b/test/integration/_regtest.js index 02913a8..c50ef2f 100644 --- a/test/integration/_regtest.js +++ b/test/integration/_regtest.js @@ -1,9 +1,8 @@ const { RegtestUtils } = require('regtest-client') -const bitcoin = require('../..') const APIPASS = process.env.APIPASS || 'satoshi' const APIURL = process.env.APIURL || 'https://regtest.bitbank.cc/1' -const regtestUtils = new RegtestUtils(bitcoin, { APIPASS, APIURL }) +const regtestUtils = new RegtestUtils({ APIPASS, APIURL }) module.exports = regtestUtils; diff --git a/test/integration/transactions.js b/test/integration/transactions.js index a75b6f2..173fc4a 100644 --- a/test/integration/transactions.js +++ b/test/integration/transactions.js @@ -193,7 +193,7 @@ describe('bitcoinjs-lib (transactions)', () => { const keyPair = bitcoin.ECPair.makeRandom({ network: regtest }) const p2wpkh = bitcoin.payments.p2wpkh({ pubkey: keyPair.publicKey, network: regtest }) - const unspent = await regtestUtils.faucetComplex(p2wpkh.address, 5e4) + const unspent = await regtestUtils.faucetComplex(p2wpkh.output, 5e4) // XXX: build the Transaction w/ a P2WPKH input const txb = new bitcoin.TransactionBuilder(regtest) @@ -223,7 +223,7 @@ describe('bitcoinjs-lib (transactions)', () => { const p2pk = bitcoin.payments.p2pk({ pubkey: keyPair.publicKey, network: regtest }) const p2wsh = bitcoin.payments.p2wsh({ redeem: p2pk, network: regtest }) - const unspent = await regtestUtils.faucetComplex(p2wsh.address, 5e4) + const unspent = await regtestUtils.faucetComplex(p2wsh.output, 5e4) // XXX: build the Transaction w/ a P2WSH input const txb = new bitcoin.TransactionBuilder(regtest)