UNPKG

parsec-node

Version:

https://parseclabs.readthedocs.io/en/latest/

10 lines (8 loc) 288 B
const { Tx } = require('parsec-lib'); const sendTx = require('../../txHelpers/sendTx'); module.exports = async (lotionPort, rawTx) => { const data = Buffer.from(rawTx.data); const tx = Tx.fromRaw(data); await sendTx(lotionPort, `0x${data.toString('hex')}`); return tx.hash(); };