integration: use ScriptPubKey for Address
This commit is contained in:
parent
2b563ec55a
commit
4c6385e0d2
1 changed files with 4 additions and 3 deletions
|
@ -24,15 +24,16 @@ describe('Bitcoin-js', function() {
|
|||
return ECKey.fromWIF(wif)
|
||||
})
|
||||
|
||||
// how much to withdraw if we run dry
|
||||
var coldAmount = 2e4
|
||||
var outputAmount = 1e4
|
||||
|
||||
var pubKeys = privKeys.map(function(eck) { return eck.pub })
|
||||
var redeemScript = Script.createMultisigScriptPubKey(2, pubKeys)
|
||||
var multisigAddress = new Address(redeemScript.getHash(), networks.testnet.scriptHash).toString()
|
||||
var scriptPubKey = Script.createP2SHScriptPubKey(redeemScript.getHash())
|
||||
|
||||
// Send some testnet coins to the multisig address to ensure it has some unspents for later
|
||||
var multisigAddress = Address.fromScriptPubKey(scriptPubKey, networks.testnet).toString()
|
||||
|
||||
// Attempt to send funds to the source address, providing some unspents for later
|
||||
helloblock.faucet.withdraw(multisigAddress, coldAmount, function(err) {
|
||||
if (err) return done(err)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue