Code Monkey home page Code Monkey logo

webze.js's Introduction

Migration 0.13.0 -> 0.14.0

webze.js version 0.14.0 supports multiple instances of webze object. To migrate to this version, please follow the guide:

-var webze = require('webze');
+var Webze = require('webze');
+var webze = new Webze();

Zerium JavaScript API

Join the chat at https://gitter.im/zerium/webze.js

This is the Zerium compatible JavaScript API which implements the Generic JSON RPC spec. It's available on npm as a node module, for bower and component as an embeddable js and as a meteor.js package.

NPM version Build Status dependency status dev dependency status Coverage Status Stories in Ready

You need to run a local Zerium node to use this library.

Documentation

Installation

Node.js

npm install webze

Yarn

yarn add webze

Meteor.js

meteor add zerium:webze

As Browser module

Bower

bower install webze

Component

component install zerium/webze.js
  • Include webze.min.js in your html file. (not required for the meteor package)

Usage

Use the webze object directly from global namespace:

console.log(webze); // {eth: .., shh: ...} // it's here!

Set a provider (HttpProvider)

if (typeof webze !== 'undefined') {
  webze = new Webze(webze.currentProvider);
} else {
  // set the provider you want from Webze.providers
  webze = new Webze(new Webze.providers.HttpProvider("http://localhost:8545"));
}

Set a provider (HttpProvider using HTTP Basic Authentication)

webze.setProvider(new webze.providers.HttpProvider('http://host.url', 0, BasicAuthUsername, BasicAuthPassword));

There you go, now you can use it:

var coinbase = webze.zrm.coinbase;
var balance = webze.zrm.getBalance(coinbase);

You can find more examples in example directory.

Contribute!

Requirements

  • Node.js
  • npm
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get install nodejs-legacy

Building (gulp)

npm run-script build

Testing (mocha)

npm test

Community

Other implementations

webze.js's People

Contributors

hteijiz avatar

Watchers

James Cloos avatar  avatar Carlos Reglero 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.