I am trying to use the bitcoinjs lib to create a tx using PSBT

const testnet = Bitcoin.networks.testnet
const tx = new Bitcoin.Psbt(testnet)

I am not using transaction builder as it throws deprecation warning

This is the utxo of my from address


And this the tx hex of the utxo


I am following the github doc provided by the library


Specifically, from line 11 to 73

I am unable to complete the addInput step in the code. I looked at the tx hex to find the scriptpubkey but no success. Any help is much appreciated

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.