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 getUTXO = (rawtx, idx) => { | |
const bsvtx = new bsv.Transaction(rawtx); | |
return { | |
satoshis: bsvtx.outputs[idx].satoshis, | |
vout: idx, | |
txid: bsvtx.hash, | |
script: bsvtx.outputs[idx].script.toHex() | |
} | |
} | |
const getRawtx = async txid => { |