Closed radicleart closed 10 months ago
Ah sorry - think this is my mistake as should be adding the input with witnessUTXO data.
const wpkhAlice = btc.p2wpkh(hex.decode(userPaymentPubKey));
const nextI:btc.TransactionInput = {
txid: hex.decode(utxo.txid),
index: utxo.vout,
...wpkhAlice,
witnessUtxo: {
script: wpkhAlice.script,
amount: BigInt(utxo.value),
},
}
transaction.addInput(nextI);
Closing this as user error.
Adding the third output of a tx with an unknown (op_return) output and unable because the tx options {allowUnknowOutput:true} are not passed through this line;
causes
Adding third output of dae5bf18ef1bbbfe153276335e3718f9ee91a91fc3f902e75b657a442d471b10