Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 8dcc83c

Browse files
committed
Merge branch '1.0' of https://github.com/ethereum/web3.js into feature/exactVersionDependencies
2 parents b69b7dc + 7146d1e commit 8dcc83c

File tree

27 files changed

+172
-99
lines changed

27 files changed

+172
-99
lines changed

docs/web3-eth-personal.rst

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Parameters
6060
Returns
6161
-------
6262

63-
``Promise`` returns ``Boolean``: ``true`` if the account was created, otherwise ``false``.
63+
``Promise`` returns ``String``: The address of the newly created account.
6464

6565
-------
6666
Example
@@ -70,7 +70,7 @@ Example
7070
7171
web3.eth.personal.newAccount('!@superpassword')
7272
.then(console.log);
73-
> true
73+
> '0x1234567891011121314151617181920212223456'
7474
7575
------------------------------------------------------------------------------
7676

@@ -124,6 +124,46 @@ Example
124124
125125
------------------------------------------------------------------------------
126126

127+
128+
ecRecover
129+
=====================
130+
131+
.. code-block:: javascript
132+
133+
web3.eth.personal.ecRecover(dataThatWasSigned, signature [, callback])
134+
135+
Recovers the account that signed the data.
136+
137+
----------
138+
Parameters
139+
----------
140+
141+
142+
1. ``String`` - Data that was signed. If String it will be converted using :ref:`web3.utils.utf8ToHex <utils-utf8tohex>`.
143+
2. ``String`` - The signature.
144+
3. ``Function`` - (optional) Optional callback, returns an error object as first parameter and the result as second.
145+
146+
147+
-------
148+
Returns
149+
-------
150+
151+
152+
``Promise`` returns ``String`` - The account.
153+
154+
155+
-------
156+
Example
157+
-------
158+
159+
160+
.. code-block:: javascript
161+
162+
web3.eth.personal.ecRecover("Hello world", "0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400").then(console.log);
163+
> "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe"
164+
165+
------------------------------------------------------------------------------
166+
127167
// TODO
128168

129-
getAccounts, unlockAccount, lockAccount, sendTransaction, ecRecover
169+
getAccounts, unlockAccount, lockAccount, sendTransaction

docs/web3-eth.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ Example
11051105
// console.log(serializedTx.toString('hex'));
11061106
// 0xf889808609184e72a00082271094000000000000000000000000000000000000000080a47f74657374320000000000000000000000000000000000000000000000000000006000571ca08a8bbf888cfa37bbf0bb965423625641fc956967b81d12e23709cead01446075a01ce999b56a8a88504be365442ea61239198e23d1fce7d00fcfc5cd3b44b7215f
11071107
1108-
web3.eth.sendSignedTransaction(serializedTx.toString('hex'))
1108+
web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex'))
11091109
.on('receipt', console.log);
11101110
11111111
> // see eth.getTransactionReceipt() for details

docs/web3-shh.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ Example
850850
symKeyID: 'bf31b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f',
851851
sig: '0x04d1574d4eab8f3dde4d2dc7ed2c4d699d77cbbdd09167b8fffa099652ce4df00c4c6e0263eafe05007a46fdf0c8d32b11aeabcd3abbc7b2bc2bb967368a68e9c6'
852852
ttl: 20,
853-
topic: '0xffddaa11',
853+
topics: ['0xffddaa11'],
854854
minPow: 0.8,
855855
}, function(error, message, subscription){
856856

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0.0-beta.24",
2+
"version": "1.0.0-beta.25",
33
"lerna": "2.0.0",
44
"command": {
55
"init": {

packages/web3-bzz/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "web3-bzz",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.22",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 module to interact with the Swarm network.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-bzz",
77
"license": "LGPL-3.0",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "web3-core-helpers",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 core tools helper for sub packages. This is an internal package.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-core-helpers",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
1010
"underscore": "1.8.3",
11-
"web3-eth-iban": "^1.0.0-beta.24",
12-
"web3-utils": "^1.0.0-beta.24"
11+
"web3-eth-iban": "^1.0.0-beta.25",
12+
"web3-utils": "^1.0.0-beta.25"
1313
}
1414
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "web3-core-method",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Creates the methods on the web3 modules. This is an internal package.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-core-method",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
1010
"underscore": "1.8.3",
11-
"web3-core-helpers": "^1.0.0-beta.24",
12-
"web3-core-promievent": "^1.0.0-beta.22",
13-
"web3-core-subscriptions": "^1.0.0-beta.24",
14-
"web3-utils": "^1.0.0-beta.24"
11+
"web3-core-helpers": "^1.0.0-beta.25",
12+
"web3-core-promievent": "^1.0.0-beta.25",
13+
"web3-core-subscriptions": "^1.0.0-beta.25",
14+
"web3-utils": "^1.0.0-beta.25"
1515
}
1616
}

packages/web3-core-promievent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "web3-core-promievent",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.22",
4+
"version": "1.0.0-beta.25",
55
"description": "This package extends eventEmitters with promises to allow chaining as well as multiple final states of a function.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-core-promievent",
77
"license": "LGPL-3.0",
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "web3-core-requestmanager",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 module to handle requests to external providers.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-core-requestmanager",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
1010
"underscore": "1.8.3",
11-
"web3-core-helpers": "^1.0.0-beta.24",
12-
"web3-providers-http": "^1.0.0-beta.24",
13-
"web3-providers-ipc": "^1.0.0-beta.24",
14-
"web3-providers-ws": "^1.0.0-beta.24"
11+
"web3-core-helpers": "^1.0.0-beta.25",
12+
"web3-providers-http": "^1.0.0-beta.25",
13+
"web3-providers-ipc": "^1.0.0-beta.25",
14+
"web3-providers-ws": "^1.0.0-beta.25"
1515
}
1616
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "web3-core-subscriptions",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Manages web3 subscriptions. This is an internal package.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-core-subscriptions",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
1010
"eventemitter3": "1.1.1",
1111
"underscore": "1.8.3",
12-
"web3-core-helpers": "^1.0.0-beta.24"
12+
"web3-core-helpers": "^1.0.0-beta.25"
1313
}
1414
}

packages/web3-core/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "web3-core",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 core tools for sub packages. This is an internal package.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-core",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
10-
"web3-core-helpers": "^1.0.0-beta.24",
11-
"web3-core-method": "^1.0.0-beta.24",
12-
"web3-core-requestmanager": "^1.0.0-beta.24",
13-
"web3-utils": "^1.0.0-beta.24"
10+
"web3-core-helpers": "^1.0.0-beta.25",
11+
"web3-core-method": "^1.0.0-beta.25",
12+
"web3-core-requestmanager": "^1.0.0-beta.25",
13+
"web3-utils": "^1.0.0-beta.25"
1414
}
1515
}

packages/web3-eth-abi/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "web3-eth-abi",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 module encode and decode EVM in/output.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-eth-abi",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
1010
"bn.js": "4.11.6",
1111
"underscore": "1.8.3",
12-
"web3-core-helpers": "^1.0.0-beta.24",
13-
"web3-utils": "^1.0.0-beta.24"
12+
"web3-core-helpers": "^1.0.0-beta.25",
13+
"web3-utils": "^1.0.0-beta.25"
1414
}
1515
}

packages/web3-eth-abi/src/formatters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ var formatOutputInt = function (param) {
162162
var formatOutputUInt = function (param, name) {
163163
var value = param.staticPart();
164164

165-
if(!value) {
165+
if(!value && param.rawValue) {
166166
throw new Error('Couldn\'t decode '+ name +' from ABI: 0x'+ param.rawValue);
167167
}
168168

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "web3-eth-accounts",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 module to generate Ethereum accounts and sign data and transactions.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-eth-accounts",
77
"license": "LGPL-3.0",
@@ -12,9 +12,9 @@
1212
"scrypt.js": "0.2.0",
1313
"underscore": "1.8.3",
1414
"uuid": "2.0.1",
15-
"web3-core": "^1.0.0-beta.24",
16-
"web3-core-helpers": "^1.0.0-beta.24",
17-
"web3-core-method": "^1.0.0-beta.24",
18-
"web3-utils": "^1.0.0-beta.24"
15+
"web3-core": "^1.0.0-beta.25",
16+
"web3-core-helpers": "^1.0.0-beta.25",
17+
"web3-core-method": "^1.0.0-beta.25",
18+
"web3-utils": "^1.0.0-beta.25"
1919
}
2020
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"name": "web3-eth-contract",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 module to interact with Ethereum smart contracts.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-eth-contract",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
1010
"underscore": "1.8.3",
11-
"web3-core": "^1.0.0-beta.24",
12-
"web3-core-helpers": "^1.0.0-beta.24",
13-
"web3-core-method": "^1.0.0-beta.24",
14-
"web3-core-promievent": "^1.0.0-beta.22",
15-
"web3-core-subscriptions": "^1.0.0-beta.24",
16-
"web3-eth-abi": "^1.0.0-beta.24",
17-
"web3-utils": "^1.0.0-beta.24"
11+
"web3-core": "^1.0.0-beta.25",
12+
"web3-core-helpers": "^1.0.0-beta.25",
13+
"web3-core-method": "^1.0.0-beta.25",
14+
"web3-core-promievent": "^1.0.0-beta.25",
15+
"web3-core-subscriptions": "^1.0.0-beta.25",
16+
"web3-eth-abi": "^1.0.0-beta.25",
17+
"web3-utils": "^1.0.0-beta.25"
1818
}
1919
}

packages/web3-eth-iban/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "web3-eth-iban",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "This package converts Ethereum addresses to IBAN addresses a vice versa.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-eth-iban",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
1010
"bn.js": "^4.11.6",
11-
"web3-utils": "^1.0.0-beta.24"
11+
"web3-utils": "^1.0.0-beta.25"
1212
}
1313
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "web3-eth-personal",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 module to interact with the Ethereum blockchain accounts stored in the node.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-eth-personal",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
10-
"web3-core": "^1.0.0-beta.24",
11-
"web3-core-helpers": "^1.0.0-beta.24",
12-
"web3-core-method": "^1.0.0-beta.24",
13-
"web3-net": "^1.0.0-beta.24",
14-
"web3-utils": "^1.0.0-beta.24"
10+
"web3-core": "^1.0.0-beta.25",
11+
"web3-core-helpers": "^1.0.0-beta.25",
12+
"web3-core-method": "^1.0.0-beta.25",
13+
"web3-net": "^1.0.0-beta.25",
14+
"web3-utils": "^1.0.0-beta.25"
1515
}
1616
}

packages/web3-eth/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"name": "web3-eth",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 module to interact with the Ethereum blockchain and smart contracts.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-eth",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
1010
"underscore": "1.8.3",
11-
"web3-core": "^1.0.0-beta.24",
12-
"web3-core-helpers": "^1.0.0-beta.24",
13-
"web3-core-method": "^1.0.0-beta.24",
14-
"web3-core-subscriptions": "^1.0.0-beta.24",
15-
"web3-eth-abi": "^1.0.0-beta.24",
16-
"web3-eth-accounts": "^1.0.0-beta.24",
17-
"web3-eth-contract": "^1.0.0-beta.24",
18-
"web3-eth-iban": "^1.0.0-beta.24",
19-
"web3-eth-personal": "^1.0.0-beta.24",
20-
"web3-net": "^1.0.0-beta.24",
21-
"web3-utils": "^1.0.0-beta.24"
11+
"web3-core": "^1.0.0-beta.25",
12+
"web3-core-helpers": "^1.0.0-beta.25",
13+
"web3-core-method": "^1.0.0-beta.25",
14+
"web3-core-subscriptions": "^1.0.0-beta.25",
15+
"web3-eth-abi": "^1.0.0-beta.25",
16+
"web3-eth-accounts": "^1.0.0-beta.25",
17+
"web3-eth-contract": "^1.0.0-beta.25",
18+
"web3-eth-iban": "^1.0.0-beta.25",
19+
"web3-eth-personal": "^1.0.0-beta.25",
20+
"web3-net": "^1.0.0-beta.25",
21+
"web3-utils": "^1.0.0-beta.25"
2222
}
2323
}

packages/web3-net/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "web3-net",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Web3 module to interact with the Ethereum nodes networking properties.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-net",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
10-
"web3-core": "^1.0.0-beta.24",
11-
"web3-core-method": "^1.0.0-beta.24",
12-
"web3-utils": "^1.0.0-beta.24"
10+
"web3-core": "^1.0.0-beta.25",
11+
"web3-core-method": "^1.0.0-beta.25",
12+
"web3-utils": "^1.0.0-beta.25"
1313
}
1414
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "web3-providers-http",
33
"namespace": "ethereum",
4-
"version": "1.0.0-beta.24",
4+
"version": "1.0.0-beta.25",
55
"description": "Module to handle web3 RPC connections over HTTP.",
66
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-providers-http",
77
"license": "LGPL-3.0",
88
"main": "src/index.js",
99
"dependencies": {
10-
"web3-core-helpers": "^1.0.0-beta.24",
10+
"web3-core-helpers": "^1.0.0-beta.25",
1111
"xhr2": "0.1.4"
1212
}
1313
}

0 commit comments

Comments
 (0)