mdae it a meteor package

This commit is contained in:
Fabian Vogelsteller 2015-02-27 09:54:39 +01:00
parent 2cd4f02e75
commit 487e0acd25
3 changed files with 36 additions and 6 deletions

View File

@ -7,20 +7,26 @@ which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/JS
<!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) -->
[Documentation](https://github.com/ethereum/wiki/wiki/JavaScript-API)
## Installation
### Node.js
npm install ethereum.js
$ npm install ethereum.js
### Meteor.js
$ meteor add ethereum:js
### For browser
Bower
bower install ethereum.js
$ bower install ethereum.js
Component
component install ethereum/ethereum.js
$ component install ethereum/ethereum.js
* Include `ethereum.min.js` in your html file.
* Include [bignumber.js](https://github.com/MikeMcl/bignumber.js/)
@ -30,9 +36,9 @@ Require the library:
var web3 = require('web3');
Set a provider (QtSyncProvider, HttpSyncProvider)
Set a provider (QtSyncProvider, HttpProvider)
web3.setProvider(new web3.providers.HttpSyncProvider());
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
There you go, now you can use it:
@ -44,6 +50,7 @@ var balance = web3.eth.getBalance(coinbase);
For another example see `example/index.html`.
## Contribute!
### Requirements

23
package.js Normal file
View File

@ -0,0 +1,23 @@
Package.describe({
name: 'ethereum:js',
version: '0.0.15-rc1',
summary: 'Ethereum JavaScript API, middleware to talk to a ethreum node over RPC',
git: 'https://github.com/ethereum/ethereum.js',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting documentation, set this field to null.
documentation: 'README.md'
});
Package.onUse(function(api) {
api.versionsFrom('1.0.3.2');
api.use('3stack:bignumber@2.0.0', 'client');
api.addFiles('dist/ethereum.js', 'client');
});
// Package.onTest(function(api) {
// api.use('tinytest');
// api.use('test');
// api.addFiles('test-tests.js');
// });

View File

@ -2,7 +2,7 @@
"name": "ethereum.js",
"namespace": "ethereum",
"version": "0.0.15",
"description": "Ethereum Compatible JavaScript API",
"description": "Ethereum JavaScript API, middleware to talk to a ethreum node over RPC",
"main": "./index.js",
"directories": {
"lib": "./lib"