Git Product home page Git Product logo

ethers-web3's Introduction

ethers-web3

This is the beginning of the ethers.io web3.

More coming soon.

Features

  • Complete web3 object
  • No need to install your own Ethereum nodes; we do that for you

Intalling

To use on your own website, simply include the script:

<script type="text/javascript" src="https://ethers.io/static/ethers-web3-019aab22c5fac0ab.js"></script>

To Do

  • Automatically reconnect option (will have to deal with filters in weird ways, so application support for reconnect may be required regardless)
  • Inject private keys and addresses into the ethers object as accounts
  • Re-write the parts of web3 that ethers-web3 requires to remove the LGPL tendrils

Notes

  • Filter support is new and may have issues; please let us know if you find any problems and reproduction steps if possible

API

The ethers object handles connecting to a Ethereum node for you, over an efficient WebSocket.

    // Connect to mainnet (homestead)
    var web3 = ethers.connect();

    // Connect to testnet (morden)
    var web3 = ethers.connect({testnet: true});

    // Connect to your own ethers-server (example: morden)
    var web3 = ethers.connect({endpoints: ['ws://localhost:8001/v1/morden']});

    // Connect with a normal/modified web3 installation
    var web3 = new Web3(ethers.EthersProvider({testnet: true}));

Synchronous Calls

Any call that must actually call the server cannot be synchronous, as WebSockets do not support them.

In general they are a bad idea for any task that could have a non-trivial running time. They prevent your user interface from updating and cause non-ideal user experiences.

Friends don't let friends call synchronously.

License

The ethers library is released under the MIT License.

The web3 library is available under the LGPL-3.0 license. This should not affect you unless you modify the source of the embedded web3, in which case those (and only those) changes are swept into the LGPL-3.0 license.

ethers-web3's People

Contributors

ricmoo avatar

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.