0

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

https://api.blockcypher.com/v1/btc/test3/addrs/mmcr9o6qTpEqzfCghhb1Sg46v6VPx439UX

And this the tx hex of the utxo

https://api.blockcypher.com/v1/btc/test3/txs/15a2cb1c13acc3a65f12adf5c45b1fdf2a40ee337367e368cbff803e55634a46?includeHex=true

I am following the github doc provided by the library

https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/transactions.spec.ts

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.