@catalyst-net-js/tx
v0.3.9
Published
A simple module for creating, manipulating and signing Catalyst transactions
Downloads
37
Readme
Catalyst-js/tx
Status: Active development. This repository is being actively worked on, mostly in feature branches.
Install
npm install @catalyst-net-js/tx
Usage
import Tx from '@catalyst-net-js/tx'
const privateKey = Buffer.from(
'e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109',
'hex',
)
const txParams = {
nonce: '0x00',
gasPrice: '0x09184e72a000',
gasLimit: '0x2710',
to: '0x0000000000000000000000000000000000000000',
value: '0x00',
data: '0x7f7465737432000000000000000000000000000000000000000000000000000000600057',
}
const tx = new Tx(txParams)
tx.sign(privateKey)
const serializedTx = tx.serialize()