1 2 3 4 5 6 7 8 9 10 11 12 13
module.exports = async (txid) => { const tx = await lq.getRawTransaction(txid); const transaction = await lq.decodeRawTransaction(tx); let valueOut = 0; transaction.vout.forEach(o => { if (o.scriptPubKey.type === 'fee') { valueOut = o.value; } }); return toSats(valueOut); }