1.2.0 • Published 5 years ago
datxjs-tx v1.2.0
SYNOPSIS
INSTALL
npm install datxjs-tx
USAGE
const Tx = require('datxjs-tx').Transaction
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()
Chain and Hardfork Support
This library uses the ethereumjs-common package to support different chain and hardfork options, see API documentation for details.
Currently all hardforks up to petersburg
are supported, EIP-155
replay protection
is activated since the spuriousDragon
hardfork.
API
EthereumJS
See our organizational documentation for an introduction to EthereumJS
as well as information on current standards and best practices.
If you want to join for work or do improvements on the libraries have a look at our contribution guidelines.