JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q51800F

NodeJS and browser JS library for Ethereum

Package Exports

  • ethereumjs-lib
  • ethereumjs-lib/browser/ecdsaOps.js
  • ethereumjs-lib/browser/sha3.js
  • ethereumjs-lib/lib/ecdsaOps.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-lib) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

SYNOPSIS Build Status

A Javascript library of core Ethereum functions as described in the Yellow Paper

####install npm install ethereumjs-lib

#USAGE

 var Network = require('ethereumjs-lib').Network;
 
 //create a new tcp server instance using network version 25
 var network = new Network({
   version: 25
 });

 //start listening for incoming connects
 network.listen(30303, '0.0.0.0');

browser

ethereumjs-lib can be used with browserify.

EXAMPLES

API

ethereumjs-lib provides the following.

  • Network - Networking protocol and peer managment
  • VM - The Ethereum vitural machine and state processing functions
  • Block Chain - Blockchain managment
  • Block - Block Schema definition and validation
  • Transaction - Transaction Schema definition and validation
  • Bloom - Bloom Filter
  • Account - Account Schema definition and validation
  • utils - Miscellaneous helper functions
  • rlp - Recusive Length Perfix serialization
  • Trie - Modified Merkle Patricia Tree

TESTING

Tests use mocha npm test

For browser testing install testling npm install testling -g and run
testling -u

#####common tests Most of the tests are in described in the test repo to just run the VM test run mocha test/vmTests.js

to just run the State test run mocha test/stateTests.js

Both the test runners can take the following options
--file run only one file in the test repo
--test needs to be used with the --file option. Specifies a test from a file to run.
--vmtrace test the test runner to print a json VM trace to a file

######example usage run a the CallRecursiveContract test from the stInitCodeTest file
mocha test/stateTests.js --file stInitCodeTest --test CallRecursiveContract --vmtrace "trace.json"

CONTRIBUTIONS

Patches welcome! Contributors are listed in the package.json file. Please run the tests before opening a pull request and make sure that you are passing all of them.

If you would like to contribute, but don't know what to work on, check the issues list or ask on the forms or on IRC.

BUGS

When you find issues, please report them:

You can also look for null_radix in #ethereum-dev on irc://irc.freenode.net.

LISCENCE

GPL3