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

Commit b18a1eb

Browse files
authored
Merge pull request #2663 from princesinha19/miner-documentation
web3-eth-miner documentation
2 parents d3bc225 + 1a062d6 commit b18a1eb

12 files changed

+270
-59
lines changed

docs/web3-eth-abi.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. include:: include_announcement.rst
44

5-
=========
5+
============
66
web3.eth.abi
7-
=========
7+
============
88

99
The ``web3-eth-abi`` package allows you to de- and encode parameters from a ABI (Application Binary Interface).
1010
This will be used for calling functions of a deployed smart-contract.

docs/web3-eth-admin.rst

+21-27
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. include:: include_announcement.rst
44

5-
==============
6-
web3.eth.admin
7-
==============
5+
=================
6+
Web3 Admin Module
7+
=================
88

99

1010
The ``web3-eth-admin`` package allows you to interact with the Ethereum node's admin management.
@@ -19,12 +19,6 @@ The ``web3-eth-admin`` package allows you to interact with the Ethereum node's a
1919
const admin = new Admin(Web3.givenProvider || 'ws://some.local-or-remote.node:8546', null, options);
2020
2121
22-
// or using the web3 umbrella package
23-
const web3 = new Web3(Web3.givenProvider || 'ws://some.local-or-remote.node:8546', null, options);
24-
25-
// -> web3.eth.admin
26-
27-
2822
------------------------------------------------------------------------------
2923

3024

@@ -41,7 +35,7 @@ addPeer
4135

4236
.. code-block:: javascript
4337
44-
web3.eth.admin.addPeer(url, [callback])
38+
admin.addPeer(url, [callback])
4539
4640
Add an admin peer on the node that Web3 is connected to with its provider.
4741
The RPC method used is ``admin_addPeer``.
@@ -65,7 +59,7 @@ Example
6559

6660
.. code-block:: javascript
6761
68-
web3.eth.admin.addPeer("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303")
62+
admin.addPeer("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303")
6963
.then(console.log);
7064
> true
7165
@@ -77,7 +71,7 @@ getDataDirectory
7771

7872
.. code-block:: javascript
7973
80-
web3.eth.admin.getDataDirectory([, callback])
74+
admin.getDataDirectory([, callback])
8175
8276
Provides absolute path of the running node, which is used by the node to store all its databases.
8377

@@ -104,7 +98,7 @@ Example
10498

10599
.. code-block:: javascript
106100
107-
web3.eth.admin.getDataDirectory()
101+
admin.getDataDirectory()
108102
.then(console.log);
109103
> "/home/ubuntu/.ethereum"
110104
@@ -117,7 +111,7 @@ getNodeInfo
117111

118112
.. code-block:: javascript
119113
120-
web3.eth.personal.getNodeInfo([, callback])
114+
admin.getNodeInfo([, callback])
121115
122116
This property can be queried for all the information known about the running node at the networking granularity..
123117

@@ -155,7 +149,7 @@ Example
155149

156150
.. code-block:: javascript
157151
158-
web3.eth.admin.getNodeInfo().then(console.log);
152+
admin.getNodeInfo().then(console.log);
159153
> {
160154
enode: "enode://44826a5d6a55f88a18298bca4773fca5749cdc3a5c9f308aa7d810e9b31123f3e7c5fba0b1d70aac5308426f47df2a128a6747040a3815cc7dd7167d03be320d@[::]:30303",
161155
id: "44826a5d6a55f88a18298bca4773fca5749cdc3a5c9f308aa7d810e9b31123f3e7c5fba0b1d70aac5308426f47df2a128a6747040a3815cc7dd7167d03be320d",
@@ -184,7 +178,7 @@ getPeers
184178

185179
.. code-block:: javascript
186180
187-
web3.eth.admin.getPeers([, callback])
181+
admin.getPeers([, callback])
188182
189183
This will provide all the information known about the connected remote nodes at the networking granularity.
190184

@@ -220,7 +214,7 @@ Example
220214

221215
.. code-block:: javascript
222216
223-
web3.eth.admin.getPeers().then(console.log);
217+
admin.getPeers().then(console.log);
224218
> [{
225219
caps: ["eth/61", "eth/62", "eth/63"],
226220
id: "08a6b39263470c78d3e4f58e3c997cd2e7af623afce64656cfc56480babcea7a9138f3d09d7b9879344c2d2e457679e3655d4b56eaff5fd4fd7f147bdb045124",
@@ -261,7 +255,7 @@ setSolc
261255

262256
.. code-block:: javascript
263257
264-
web3.eth.admin.setSolc(string, [, callback])
258+
admin.setSolc(string, [, callback])
265259
266260
Sets the Solidity compiler path to be used by the node when invoking the eth_compileSolidity RPC method
267261

@@ -289,7 +283,7 @@ Example
289283

290284
.. code-block:: javascript
291285
292-
web3.eth.admin.setSolc("/usr/bin/solc").then(console.log);
286+
admin.setSolc("/usr/bin/solc").then(console.log);
293287
> "solc, the solidity compiler commandline interface\nVersion: 0.3.2-0/Release-Linux/g++/Interpreter\n\npath: /usr/bin/solc"
294288
295289
------------------------------------------------------------------------------
@@ -300,7 +294,7 @@ startRPC
300294

301295
.. code-block:: javascript
302296
303-
web3.eth.admin.startRPC(host, port, cors, apis [, callback])
297+
admin.startRPC(host, port, cors, apis [, callback])
304298
305299
It starts an HTTP based JSON RPC API webserver to handle client requests. All the parameters are optional.
306300

@@ -328,7 +322,7 @@ Example
328322

329323
.. code-block:: javascript
330324
331-
web3.eth.admin.startRPC("127.0.0.1", 8545)
325+
admin.startRPC("127.0.0.1", 8545)
332326
.then(console.log('RPC Started!'));
333327
> "RPC Started!"
334328
@@ -340,7 +334,7 @@ startWS
340334

341335
.. code-block:: javascript
342336
343-
web3.eth.admin.startWS(host, port, cors, apis [, callback])
337+
admin.startWS(host, port, cors, apis [, callback])
344338
345339
It starts an WebSocket based JSON RPC API webserver to handle client requests. All the parameters are optional.
346340

@@ -368,7 +362,7 @@ Example
368362

369363
.. code-block:: javascript
370364
371-
web3.eth.admin.startRPC("127.0.0.1", 8546)
365+
admin.startRPC("127.0.0.1", 8546)
372366
.then(console.log('WS Started!'));
373367
> "WS Started!"
374368
@@ -379,7 +373,7 @@ stopRPC
379373

380374
.. code-block:: javascript
381375
382-
web3.eth.admin.stopRPC([, callback])
376+
admin.stopRPC([, callback])
383377
384378
This method closes the currently open HTTP RPC endpoint. As the node can only have a single HTTP endpoint running, this method takes no parameters, returning a boolean whether the endpoint was closed or not.
385379

@@ -403,7 +397,7 @@ Example
403397

404398
.. code-block:: javascript
405399
406-
web3.eth.admin.stopRPC().then(console.log);
400+
admin.stopRPC().then(console.log);
407401
> true
408402
409403
------------------------------------------------------------------------------
@@ -413,7 +407,7 @@ stopWS
413407

414408
.. code-block:: javascript
415409
416-
web3.eth.admin.stopWS([, callback])
410+
admin.stopWS([, callback])
417411
418412
This method closes the currently open WebSocket RPC endpoint. As the node can only have a single WebSocket endpoint running, this method takes no parameters, returning a boolean whether the endpoint was closed or not.
419413

@@ -437,7 +431,7 @@ Example
437431

438432
.. code-block:: javascript
439433
440-
web3.eth.admin.stopWS().then(console.log);
434+
admin.stopWS().then(console.log);
441435
> true
442436
443437
------------------------------------------------------------------------------

docs/web3-eth-ens.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. include:: include_announcement.rst
44

5-
=========
5+
============
66
web3.eth.ens
7-
=========
7+
============
88

99
The ``web3.eth.ens`` functions let you interacting with the Ens smart contracts.
1010

docs/web3-eth-iban.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. include:: include_announcement.rst
44

5-
=========
5+
=============
66
web3.eth.Iban
7-
=========
7+
=============
88

99
The ``web3.eth.Iban`` function lets convert Ethereum addresses from and to IBAN and BBAN.
1010

0 commit comments

Comments
 (0)