Merge pull request #1441 from bitcoinjs/updateRegCli

Update regtest-client
This commit is contained in:
d-yokoi 2019-07-26 14:03:36 +09:00 committed by GitHub
commit 099360a13d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 9 deletions

10
package-lock.json generated
View file

@ -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": {

View file

@ -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"

View file

@ -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;

View file

@ -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)