Coder Social home page Coder Social logo

browser-builds's Introduction

DEPRECATED

This repository has been deprecated.

We are targeting to deliver browser-friendly versions of the libraries along published package releases. If you are running into problems please open an issue on the respective repository.

Questions?

Discord

ethereumjs - Browser Builds

This repository contains browser builds of the following ethereumjs libraries:

They are built using browserify with a known set of working dependencies.

For every library/build collection there is a larger plain source version also including the source mappings (e.g. ethereumjs-vm-x.x.x.js) and a minified version for use in production (e.g. ethereumjs-vm-x.x.x.min.js).

Usage

In your web application, include only one of the builds from the dist directory. All exports will be available under the global ethereumjs.

Note: all packages expect 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.

Examples

Examples for usage of the browser builds can be found in the examples directory:

Start an http-server from the main directory of the repository to run the examples in the browser.

Build

Builds are done using the .js exports compilation files from the src/ directory and using the build.js script from the main directory to create the build in the dist/ folder.

Version numbers for the builds are directly extracted from the versions installed in the local node_modules folder.

For creating new builds:

  1. Change package.json to require desired/up-to-date versions of the libraries
  2. Reinstall/update local node_modules packages
  3. Run npm run build to generate new set of builds

browser-builds's People

Contributors

axic avatar holgerd77 avatar tayvano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

browser-builds's Issues

toV3 / toV3String extremely slow and intensive

I haven't done extensive testing but the few calls I've made with toV3("pass") and toV3String("pass") all bring the CPU to 100% for about 30 seconds. I feel that may be abnormally high and hope it can be resolved. The code I run:

var wallet1 = EthJS.Wallet.generate();
var save = a.toV3String("pass"); // takes 12-20 seconds about, and brings cpu to 100%
// and also
var wallet2 = EthJS.Wallet.fromV3(save,"pass"); // same symptoms

Is there any other way to load/save a wallet as a string? The sluggishness of this will limit applications.

thanks.

Buffer is not defined ?

When including dist/ethereumjs-tx.js

And running some very basic example code in an html file:

const EthereumTx = EthJS.Tx
const privateKey = Buffer.from('e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109', 'hex')

const txParams = {
  nonce: '0x00',
  gasPrice: '0x09184e72a000', 
  gasLimit: '0x2710',
  to: '0x0000000000000000000000000000000000000000', 
  value: '0x00', 
  data: '0x7f7465737432000000000000000000000000000000000000000000000000000000600057',
  // EIP 155 chainId - mainnet: 1, ropsten: 3
  chainId: 3
}

const tx = new EthereumTx(txParams)
tx.sign(privateKey)
const serializedTx = tx.serialize()

I am seeing a Buffer is not defined error. I notice the dist file is not minified and hasn't been updated since august. Is this library still maintained or are there better alternatives?

Uncaught ReferenceError: ethereumjs is not defined

Hi, I'm getting this error when I used ethereumjs-tx-1.3.3.min.js in my web page.

<script type="https://raw.githubusercontent.com/ethereumjs/browser-builds/master/dist/ethereumjs-tx/ethereumjs-tx-1.3.3.min.js"></script>

 var Tx  = new ethereumjs.Tx();

Cannot use the browserified version of ethereumjs-tx in react-native

I am desesperately trying to use ethereumjs-tx in react native.
But I am facing an issue: the browserified bundle of ethereumjs-tx is reference inner require (of md5 for example) and react native is trying to resolve them outside (i mean in a sibling position)

Have you ever tried to use your library in React native and if so , is there a recipee to make it work

thanx

Firefox 48.0 ethereum-tx ethUtil.pubToAddress bug in Buffer.slice

Browser: Firefox 48.0
OS: Windows 7, Windows 8.1

var address = ethUtil.pubToAddress("0x045614e693becd6b8cdcb393a9529e44c73f73c3416e623f5bd0e07c57cb49ad30142a77b9545c8cb49350354324a9b24479d7bc322484c5fc9ee3b79343445f92");
console.log(address);
// returns string "[object Object]"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.