mirror of
https://github.com/embarklabs/web3.js.git
synced 2026-08-30 22:21:10 +00:00
added readmes to sub packages
This commit is contained in:
@@ -34,15 +34,24 @@ meteor add ethereum:web3
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build and include `dist/web3.min.js` in your html file.
|
||||
Use the prebuild ``dist/web3.min.js``, or
|
||||
build using the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build
|
||||
```
|
||||
|
||||
Then include `dist/web3.js` in your html file.
|
||||
This will expose the `Web3` object on the window object.
|
||||
|
||||
## Usage
|
||||
Use the `Web3` object directly from global namespace:
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3 = require('web3');
|
||||
|
||||
var web3 = new Web3('ws://localhost:8546');
|
||||
console.log(Web3);
|
||||
console.log(web3);
|
||||
> {
|
||||
eth: ... ,
|
||||
shh: ... ,
|
||||
@@ -86,10 +95,18 @@ sudo apt-get install npm
|
||||
|
||||
### Building (gulp)
|
||||
|
||||
Build only the web3.js package
|
||||
|
||||
```bash
|
||||
npm run-script build
|
||||
```
|
||||
|
||||
Or build all sub packages as well
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
This will put all the browser build files into the `dist` folder.
|
||||
|
||||
|
||||
@@ -99,6 +116,7 @@ This will put all the browser build files into the `dist` folder.
|
||||
npm test
|
||||
```
|
||||
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[npm-image]: https://badge.fury.io/js/web3.png
|
||||
[npm-url]: https://npmjs.org/package/web3
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"namespace": "ethereum",
|
||||
"name": "web3",
|
||||
"version": "undefined",
|
||||
"version": "1.0.0-beta.8",
|
||||
"description": "Ethereum JavaScript API",
|
||||
"license": "LGPL-3.0",
|
||||
"main": [
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -612,7 +612,7 @@ Adds an account using a private key or account object to the wallet.
|
||||
Parameters
|
||||
----------
|
||||
|
||||
1. ``account`` - ``String|Object``: A private key or account object created with :ref:`web3.eth.accounts.new() <accounts-create>`.
|
||||
1. ``account`` - ``String|Object``: A private key or account object created with :ref:`web3.eth.accounts.create() <accounts-create>`.
|
||||
|
||||
|
||||
-------
|
||||
|
||||
+23
-8
@@ -19,6 +19,7 @@ var streamify = require('gulp-streamify');
|
||||
var replace = require('gulp-replace');
|
||||
|
||||
var DEST = path.join(__dirname, 'dist/');
|
||||
|
||||
var packages = [{
|
||||
fileName: 'web3',
|
||||
expose: 'Web3',
|
||||
@@ -33,15 +34,15 @@ var packages = [{
|
||||
src: './packages/web3-eth/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-eth-accounts',
|
||||
expose: 'Web3Accounts',
|
||||
expose: 'Web3EthAccounts',
|
||||
src: './packages/web3-eth-accounts/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-eth-contract',
|
||||
expose: 'Web3Contract',
|
||||
expose: 'Web3EthContract',
|
||||
src: './packages/web3-eth-contract/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-eth-personal',
|
||||
expose: 'Web3Personal',
|
||||
expose: 'Web3EthPersonal',
|
||||
src: './packages/web3-eth-personal/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-eth-iban',
|
||||
@@ -63,10 +64,6 @@ var packages = [{
|
||||
fileName: 'web3-bzz',
|
||||
expose: 'Web3Bzz',
|
||||
src: './packages/web3-bzz/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-core-requestmanager',
|
||||
expose: 'Web3RequestManager',
|
||||
src: './packages/web3-core-requestmanager/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-providers-ipc',
|
||||
expose: 'Web3IpcProvider',
|
||||
@@ -80,6 +77,22 @@ var packages = [{
|
||||
fileName: 'web3-providers-ws',
|
||||
expose: 'Web3WsProvider',
|
||||
src: './packages/web3-providers-ws/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-core-subscriptions',
|
||||
expose: 'Web3Subscriptions',
|
||||
src: './packages/web3-core-subscriptions/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-core-requestmanager',
|
||||
expose: 'Web3RequestManager',
|
||||
src: './packages/web3-core-requestmanager/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-core-promievent',
|
||||
expose: 'Web3PromiEvent',
|
||||
src: './packages/web3-core-promievent/src/index.js'
|
||||
},{
|
||||
fileName: 'web3-core-method',
|
||||
expose: 'Web3Method',
|
||||
src: './packages/web3-core-method/src/index.js'
|
||||
}];
|
||||
|
||||
var browserifyOptions = {
|
||||
@@ -171,5 +184,7 @@ gulp.task('watch', function() {
|
||||
gulp.watch(['./src/*.js'], ['lint', 'build']);
|
||||
});
|
||||
|
||||
gulp.task('default', ['version', 'lint', 'clean', packages[packages.length-1].fileName]);
|
||||
gulp.task('all', ['version', 'lint', 'clean', packages[packages.length-1].fileName]);
|
||||
|
||||
gulp.task('default', ['version', 'lint', 'clean', packages[0].fileName]);
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"version": "1.0.0-beta.8",
|
||||
"lerna": "2.0.0",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/* jshint ignore:start */
|
||||
Package.describe({
|
||||
name: 'ethereum:web3',
|
||||
version: 'undefined',
|
||||
version: '1.0.0-beta.8',
|
||||
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.
|
||||
|
||||
+2
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "web3",
|
||||
"namespace": "ethereum",
|
||||
"version": "undefined",
|
||||
"version": "1.0.0-beta.8",
|
||||
"description": "Ethereum JavaScript API",
|
||||
"license": "LGPL-3.0",
|
||||
"main": "./src/index.js",
|
||||
@@ -12,6 +12,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "gulp",
|
||||
"build-all": "gulp all",
|
||||
"watch": "gulp watch",
|
||||
"docs": "cd docs; make html;",
|
||||
"lint": "jshint *.js packages",
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# web3-bzz
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the swarm package.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-bzz
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-bzz.js` in your html file.
|
||||
This will expose the `Web3Personal` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3Bzz = require('web3-bzz');
|
||||
|
||||
var bzz = new Web3Bzz('http://swarm-gateways.net');
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# web3-core-helpers
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
Helper functions used in [web3.js][repo] packages.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-core-helpers
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var helpers = require('web3-core-helpers');
|
||||
|
||||
helpers.formatters;
|
||||
helpers.errors;
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# web3-core-method
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
The Method package used within most [web3.js][repo] packages.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-core-method
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-core-method.js` in your html file.
|
||||
This will expose the `Web3Method` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3Method = require('web3-core-method');
|
||||
|
||||
var method = new Web3Method({
|
||||
name: 'sendTransaction',
|
||||
call: 'eth_sendTransaction',
|
||||
params: 1,
|
||||
inputFormatter: [inputTransactionFormatter]
|
||||
});
|
||||
method.attachToObject(myCoolLib);
|
||||
|
||||
myCoolLib.sendTransaction({...}, function(){ ... });
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# web3-core-promievent
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the PromiEvent package is used to return a EventEmitter mixed with a Promise to allow multiple final states as well as chaining.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-core-promievent
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-core-promievent.js` in your html file.
|
||||
This will expose the `Web3PromiEvent` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3PromiEvent = require('web3-core-promievent');
|
||||
|
||||
var myFunc = function(){
|
||||
var promiEvent = Web3PromiEvent();
|
||||
|
||||
setTimeout(function() {
|
||||
promiEvent.eventEmitter.emit('done', 'Hello!');
|
||||
promiEvent.resolve('Hello!');
|
||||
}, 10);
|
||||
|
||||
return promiEvent.eventEmitter;
|
||||
};
|
||||
|
||||
|
||||
// and run it
|
||||
myFunc()
|
||||
.then(console.log);
|
||||
.on('done', console.log);
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# web3-core-requestmanager
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
The requestmanager package is used by most [web3.js][repo] packages.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-core-requestmanager
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-core-requestmanager.js` in your html file.
|
||||
This will expose the `Web3RequestManager` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3WsProvider = require('web3-providers-ws');
|
||||
var Web3RequestManager = require('web3-core-requestmanager');
|
||||
|
||||
var requestManager = new Web3RequestManager(new Web3WsProvider('ws://localhost:8546'));
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
# web3-core-subscriptions
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
The subscriptions package used within some [web3.js][repo] packages.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-core-subscriptions
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-core-subscriptions.js` in your html file.
|
||||
This will expose the `Web3Subscriptions` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3Subscriptions = require('web3-core-subscriptions');
|
||||
|
||||
var sub = new Web3Subscriptions({
|
||||
name: 'subscribe',
|
||||
type: 'eth',
|
||||
subscriptions: {
|
||||
'newBlockHeaders': {
|
||||
subscriptionName: 'newHeads',
|
||||
params: 0,
|
||||
outputFormatter: formatters.outputBlockFormatter
|
||||
},
|
||||
'pendingTransactions': {
|
||||
params: 0
|
||||
}
|
||||
}
|
||||
});
|
||||
sub.attachToObject(myCoolLib);
|
||||
|
||||
myCoolLib.subscribe('newBlockHeaders', function(){ ... });
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ Subscriptions.prototype.setRequestManager = function (rm) {
|
||||
|
||||
Subscriptions.prototype.attachToObject = function (obj) {
|
||||
var func = this.buildCall();
|
||||
func.call = this.call; // TODO!!! that's ugly. filter.js uses it
|
||||
func.call = this.call;
|
||||
var name = this.name.split('.');
|
||||
if (name.length > 1) {
|
||||
obj[name[0]] = obj[name[0]] || {};
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# web3-core
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
The core package contains core functions for [web3.js][repo] packages.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-core
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var core = require('web3-core');
|
||||
|
||||
var CoolLib = function CoolLib() {
|
||||
|
||||
// sets _requestmanager and adds basic functions
|
||||
core.packageInit(this, arguments);
|
||||
|
||||
};
|
||||
|
||||
|
||||
CoolLib.providers;
|
||||
CoolLib.givenProvider;
|
||||
CoolLib.setProvider();
|
||||
CoolLib.BatchRequest();
|
||||
CoolLib.extend();
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# web3-eth-abi
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the abi package to be used in the `web-eth` package.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-eth-abi
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-eth-abi.js` in your html file.
|
||||
This will expose the `Web3EthAbi` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3EthAbi = require('web3-eth-abi');
|
||||
|
||||
Web3EthAbi.encodeFunctionSignature('myMethod(uint256,string)');
|
||||
> '0x24ee0097'
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
# web3-eth-accounts
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the accounts package to be used in the `web-eth` package.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-eth-accounts
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-eth-accounts.js` in your html file.
|
||||
This will expose the `Web3EthAccounts` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Eth = require('web3-eth');
|
||||
var Web3EthAccounts = require('web3-eth-accounts');
|
||||
|
||||
var eth = new Eth('ws://localhost:8546');
|
||||
|
||||
var account = new Web3EthAccounts(eth);
|
||||
account.create();
|
||||
> {
|
||||
address: '0x2c7536E3605D9C16a7a3D7b1898e529396a65c23',
|
||||
privateKey: '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318',
|
||||
signTransaction: function(tx){...},
|
||||
sign: function(data){...},
|
||||
encrypt: function(password){...}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# web3-eth-contract
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the contract package to be used in the `web-eth` package.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-eth-contract
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-eth-contract.js` in your html file.
|
||||
This will expose the `Web3EthContract` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Eth = require('web3-eth');
|
||||
var Web3EthContract = require('web3-eth-contract');
|
||||
|
||||
var eth = new Eth('ws://localhost:8546');
|
||||
|
||||
// add the eth package
|
||||
Web3EthContract.prototype._eth = this;
|
||||
|
||||
var contract = new Web3EthContract(jsonInterface, address);
|
||||
contract.methods.somFunc().send({from: ....})
|
||||
.on('receipt', funciton(){
|
||||
...
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
# web3-eth-iban
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the IBAN package to be used in the `web-eth` package.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-eth-iban
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-eth-iban.js` in your html file.
|
||||
This will expose the `Web3EthIban` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3EthIban = require('web3-eth-iban');
|
||||
|
||||
var iban = new Web3EthIban('XE75JRZCTTLBSYEQBGAS7GID8DKR7QY0QA3');
|
||||
iban.toAddress()
|
||||
> '0xa94f5374Fce5edBC8E2a8697C15331677e6EbF0B'
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# web3-eth-personal
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the personal package to be used in the `web-eth` package.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-eth-personal
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-eth-personal.js` in your html file.
|
||||
This will expose the `Web3EthPersonal` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3EthPersonal = require('web3-eth-personal');
|
||||
|
||||
var personal = new Web3EthPersonal('ws://localhost:8546');
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# web3-eth
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the Eth package to be used [web3.js][repo].
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-eth
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-eth.js` in your html file.
|
||||
This will expose the `Web3Eth` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3Eth = require('web3-eth');
|
||||
|
||||
var eth = new Web3Eth('ws://localhost:8546');
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# web3-net
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the net package to be used in other web3.js packages.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-net
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-net.js` in your html file.
|
||||
This will expose the `Web3Net` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3Net = require('web3-net');
|
||||
|
||||
var net = new Web3Net('ws://localhost:8546');
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# web3-providers-http
|
||||
|
||||
*This is a sub package of [web3.js][repo]*
|
||||
|
||||
This is a HTTP provider for [web3.js][repo].
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-providers-http
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-providers-http.js` in your html file.
|
||||
This will expose the `Web3HttpProvider` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3HttpProvider = require('web3-providers-http');
|
||||
|
||||
var http = new Web3HttpProvider('http://localhost:8545');
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# web3-providers-ipc
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is a IPC provider for [web3.js][repo].
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-providers-ipc
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-providers-ipc.js` in your html file.
|
||||
This will expose the `Web3IpcProvider` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3IpcProvider = require('web3-providers-ipc');
|
||||
var net = require(net);
|
||||
|
||||
var ipc = new Web3IpcProvider('/Users/me/Library/Ethereum/geth.ipc', net);
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# web3-providers-ws
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is a websocket provider for [web3.js][repo].
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-providers-ws
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-providers-ws.js` in your html file.
|
||||
This will expose the `Web3WsProvider` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3WsProvider = require('web3-providers-ws');
|
||||
|
||||
var ws = new Web3WsProvider('ws://localhost:8546');
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# web3-shh
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This is the whisper v5 package.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-shh
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-shh.js` in your html file.
|
||||
This will expose the `Web3Personal` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3Personal = require('web3-shh');
|
||||
|
||||
var shh = new Web3Personal('ws://localhost:8546');
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# web3-utils
|
||||
|
||||
This is a sub package of [web3.js][repo]
|
||||
|
||||
This contains useful utility functions for Dapp developers.
|
||||
Please read the [documentation][docs] for more.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
```bash
|
||||
npm install web3-utils
|
||||
```
|
||||
|
||||
### In the Browser
|
||||
|
||||
Build running the following in the [web3.js][repo] repository:
|
||||
|
||||
```bash
|
||||
npm run-script build-all
|
||||
```
|
||||
|
||||
Then include `dist/web3-utils.js` in your html file.
|
||||
This will expose the `Web3Utils` object on the window object.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// in node.js
|
||||
var Web3Utils = require('web3-utils');
|
||||
console.log(Web3Utils);
|
||||
{
|
||||
sha3: function(){},
|
||||
soliditySha3: function(){},
|
||||
isAddress: function(){},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
[docs]: http://web3js.readthedocs.io/en/1.0/
|
||||
[repo]: https://github.com/ethereum/web3.js
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
var web3 = require('web3');
|
||||
|
||||
console.log(web3.version);
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "node",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"web3": "ethereum/web3.js#master"
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 3840 2160" style="enable-background:new 0 0 3840 2160;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#F16822;}
|
||||
.st1{fill:#808285;}
|
||||
.st2{fill:#BCBEC0;}
|
||||
</style>
|
||||
<g id="Layer_1">
|
||||
<path class="st0" d="M2447.8,635c-51.2-29.6-97.1-44-136.2-49.8c-10.2-22.3-35.2-48.5-86-77.5c-166.7-95.2-333.3-1-333.3-1
|
||||
L1670,635l111.1,64.1l222.2-128.3c0,0,55.6-32.1,111.1,0c55.6,32.1,0,64.2,0,64.2l-222.2,128.3l0,0h0l111.1,64.1L2225.7,699
|
||||
c3.3-1.9,57.1-31,110.9,0.1c55.6,32.1,0,64.1,0,64.1l-222.2,128.3l111.1,64.2l277.8-160.4C2503.3,795.3,2614.4,731.2,2447.8,635z"
|
||||
/>
|
||||
<g>
|
||||
<path class="st1" d="M1670,635c0,0-55.6,32.1-55.6,96.2c0,64.2,0,320.4,0,320.4s0,64.2-55.6,32.1c-55.6-32.1-55.6-96.2-55.6-96.2
|
||||
s0-256.3,0-320.4c0-4,0.2-7.9,0.6-11.7c6.1-56.4,54.9-84.6,54.9-84.6l0,0l0,0l-111.1-64.1c0,0-0.1,0-0.2,0.1
|
||||
c-3.3,1.9-55.4,34-55.4,96.1c0,0,0,0,0,0c0,64.2,0,320.4,0,320.4s0,64.2-55.6,32.1c-55.6-32.1-55.6-96.2-55.6-96.2
|
||||
s0-256.3,0-320.4c0-64.1,55.6-96.2,55.6-96.2l-111.1-64.2c0,0-55.6,32.1-55.6,96.2c0,64.2,0,320.4,0,320.4s0,192.5,166.7,288.7
|
||||
c51.1,29.5,86.5,31.8,111.1,20.9c24.6,39.3,60,77.9,111.1,107.4c166.7,96.2,166.7-96.2,166.7-96.2s0-256.3,0-320.4
|
||||
c0-64.2,55.6-96.2,55.6-96.2L1670,635z"/>
|
||||
<polygon class="st2" points="1836.7,924.4 1947.8,988.5 1947.8,1116.8 1836.7,1052.7 "/>
|
||||
<path class="st2" d="M2114.4,891.6c0,0-55.6,32.1-55.6,96.2c0,64.2,0,320.4,0,320.4s0,64.2-55.6,32.1
|
||||
c-55.6-32.1-55.6-96.2-55.6-96.2l-111.1-64.2c0,0,0,192.5,166.7,288.7c166.7,96.2,166.7-96.2,166.7-96.2s0-256.3,0-320.4
|
||||
c0-64.1,55.6-96.2,55.6-96.2L2114.4,891.6z"/>
|
||||
<path class="st2" d="M2447.8,1212.3l222.2,128.3v-128.3L2447.8,1084c0,0-166.7-93.8-166.7,96.2c0,190,166.7,288.7,166.7,288.7v0
|
||||
l55.6,32.1c0,0,55.6,32.1,55.6,96.2c0,64.2-55.6,32.1-55.6,32.1L2281.1,1501v128.3l222.2,128.3c0,0,166.7,96.2,166.7-96.2
|
||||
s-111.1-256.6-111.1-256.6l-111.1-64.1c0,0-55.6-32.1-55.6-96.2C2392.2,1180.2,2447.8,1212.3,2447.8,1212.3z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Layer_1_copy">
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
Reference in New Issue
Block a user