@catalyst-net-js/tx

0.3.9 • Public • Published
ReDoc logo

Catalyst-js/tx

Discord Twitter Follow

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()

License

GPLv3

Readme

Keywords

none

Package Sidebar

Install

npm i @catalyst-net-js/tx

Weekly Downloads

26

Version

0.3.9

License

ISC

Unpacked Size

175 kB

Total Files

12

Last publish

Collaborators

  • stephenhorsfall