This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
020000000001013cbc4fead3215b0a2823a4099cee55ac4b50b1151aed0fc73a994692550aa0e801000000171600144410fc594ae65be4bb4e6ed3c79b55602a338674ffffffff02cb4700000000000017a914ef1b74580a73c2e2ee52cb7a20febacd7050a2f187ed7b02000000000017a914d82952189f437226406ec17c8c397a34af177cd1870247304402203425f7f4bd699caf880db6e9489440f65cd3a6191933038974d201fa7d5897e00220526449a4aa0555b8098f470d1c6443480f8e44b269a96427c423de4ee2a23b57012103a0bea7dca18179c56a2819c575fa1b68bdf8bad87d8c12b1008daed2285ef08200000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bitcoin = require('bitcoinjs-lib') | |
const psbt = new bitcoin.Psbt({ network: bitcoin.networks.testnet }) | |
// example transaction | |
const unspentOutput = { | |
"txid": "11e5b7005a76c8a53f9a0036bc1a2745ebd73ad40017b3169894aa2c19e789d7", | |
"vout": 1, | |
"address": "2NCxBSjMaVeBFyxmGcD2X428v6k5n3pCQKN", | |
"label": "payment", | |
"redeemScript": "001495a994a417c45f97c87d03efb21997452d4c782f", |