SYNOPSIS
INSTALL
npm install ethereumjs-tx-dpos
USAGE
const EthereumTx = const privateKey = Buffer const txParams = nonce: '0x00' gasPrice: '0x09184e72a000' gasLimit: '0x2710' to: '0x0000000000000000000000000000000000000000' value: '0x00' data: '0x7f7465737432000000000000000000000000000000000000000000000000000000600057' type:0 //transaction type: 0 normal transaction, 1 elector,2 cancel elector, 3 vote, 4 cancel vote // EIP 155 chainId - mainnet: 1, ropsten: 3 chainId: 3 const tx = txParamstxconst serializedTx = tx
Note: this package expects ECMAScript 6 (ES6) as a minimum environment. From browsers lacking ES6 support, please use a shim (like es6-shim) before including any of the builds from this repo.
BROWSER
For a browser build please see https://github.com/ethereumjs/browser-builds.