JSPM

  • Created
  • Published
  • Downloads 351150
  • Score
    100M100P100Q45428F
  • License MPL-2.0

An simple module for creating, manipulating and signing ethereum transactions

Package Exports

  • ethereumjs-tx
  • ethereumjs-tx/fake
  • ethereumjs-tx/fake.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ethereumjs-tx) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

SYNOPSIS

NPM Package Build Status Coverage Status Gitter or #ethereumjs on freenode

js-standard-style

INSTALL

npm install ethereumjs-tx

USAGE

var Tx = require('ethereumjs-tx')
var privateKey = new Buffer('e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109', 'hex')

var rawTx = {
  nonce: '0x00',
  gasPrice: '0x09184e72a000', 
  gasLimit: '0x2710',
  to: '0x0000000000000000000000000000000000000000', 
  value: '0x00', 
  data: '0x7f7465737432000000000000000000000000000000000000000000000000000000600057'
}

var tx = new Tx(rawTx)
tx.sign(privateKey)

var serializedTx = tx.serialize()

BROWSER

For standalone use in the browser inculde ./dist/ethereumjs-tx.js
This will give you a gobal varible EthTx to use. It will also create the globals Buffer and ethUtil
To build for standalone use in the browser install browserify and run npm run build.

API

./docs/

LICENSE

MPL-2.0