Closed PeterGarner closed 5 years ago
pubBuffAddress.pubkey
is not a valid script. If your input is a P2WPKH then you need the proper script for that.
sorry, fixed this now. was not following the example, compounded by bad scripting
const pubBuffAddress = keyMaker.makeKey({ 'master': 'tprv8...', 'buffer': true })
const privateKey = keyMaker.makeKey({ 'master': 'tprv8..', 'buffer': 'private' })
let txb = new bitcoin.TransactionBuilder(testnet)
txb.addInput("b43badc0e9f2421a77be3fccd5d6b8345d4144c6bfa2069777dd39bf1283a22f", 0, null, pubBuffAddress.output)
txb.addOutput("tb1qxkt4dgqk2h8ta8rakk32sfj60gmhhwr7wddvpu", 99943000)
txb.sign(0, privateKey, null, null, 100000000)
pubBuffAddress.output was required
trace
code
makekey