UNPKG
parsec-node
Version:
latest (2.2.2)
2.2.2
2.2.1
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
1.6.10
1.6.9
1.6.8
1.6.7
1.6.6
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.2
1.5.1
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.2.0-0
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
https://parseclabs.readthedocs.io/en/latest/
parsec-node
/
src
/
api
/
methods
/
sendRawTransaction.js
10 lines
(8 loc)
•
288 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
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
(); };