Socket
Socket
Sign inDemoInstall

web3

Package Overview
Dependencies
Maintainers
2
Versions
509
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3 - npm Package Compare versions

Comparing version 1.0.0-beta1 to 1.0.0-beta2

web3js.jpg

2

bower.json
{
"namespace": "ethereum",
"name": "web3",
"version": "1.0.0-beta1",
"version": "1.0.0-beta2",
"description": "Ethereum JavaScript API",

@@ -6,0 +6,0 @@ "license": "LGPL-3.0",

{
"version": "1.0.0-beta1",
"lerna": "2.0.0-beta.38",
"version": "1.0.0-beta2",
"lerna": "2.0.0",
"packages": [

@@ -5,0 +5,0 @@ "packages/*"

/* jshint ignore:start */
Package.describe({
name: 'ethereum:web3',
version: '1.0.0-beta1',
version: '1.0.0-beta2',
summary: 'Ethereum JavaScript API, middleware to talk to a ethreum node over RPC',

@@ -6,0 +6,0 @@ git: 'https://github.com/ethereum/ethereum.js',

{
"name": "web3",
"namespace": "ethereum",
"version": "1.0.0-beta1",
"version": "1.0.0-beta2",
"description": "Ethereum JavaScript API",

@@ -14,3 +14,2 @@ "license": "LGPL-3.0",

"scripts": {
"postinstall": "lerna bootstrap",
"build": "gulp",

@@ -17,0 +16,0 @@ "watch": "gulp watch",

@@ -1,3 +0,4 @@

web3.js has moved from 0.x.x to 1.x.x. This is a majore refactor, please read the following guide to update your dapp.
web3.js has moved from 0.x.x to 1.x.x. This is a major refactor, we will provide a guide on how to upgrade in the future.
<img src="./web3js.jpg" width=200 />

@@ -40,21 +41,24 @@ # web3.js - Ethereum JavaScript API

Component
Or Include `dist/web3.min.js` in your html file.
```bash
component install ethereum/web3.js
```
* Include `web3.min.js` in your html file. (not required for the meteor package)
## Usage
Use the `web3` object directly from global namespace:
Use the `Web3` object directly from global namespace:
```js
console.log(web3); // {eth: .., shh: ...} // it's here!
var web3 = new Web3('ws://localhost:8546');
console.log(Web3);
> {
eth: ... ,
shh: ... ,
utils: ...,
...
}
```
Set a provider (HttpProvider)
Additionally you can set a provider using `web3.setProvider()` (e.g. WebsocketProvider)
```js
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
web3.setProvider('ws://localhost:8546');
// or
web3.setProvider(new Web3.providers.WebsocketProvider('ws://localhost:8546'));
```

@@ -65,16 +69,16 @@

```js
var coinbase = web3.eth.coinbase;
var balance = web3.eth.getBalance(coinbase);
web3.eth.getAccounts()
.then(console.log);
```
You can find more examples in [`example`](https://github.com/ethereum/web3.js/tree/master/example) directory.
## Documentation
Documentation can be found at [read the docs](http://web3js.readthedocs.io/en/1.0/)
## Documentation
Documentation can be found at [read the docs](http://web3js.readthedocs.io/en/latest/)
## Building
### Requirements
* Node.js
* [Node.js](https://nodejs.org)
* npm

@@ -86,3 +90,2 @@

sudo apt-get install npm
sudo apt-get install nodejs-legacy
```

@@ -89,0 +92,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc