Files
web3.js/docs/include_package-net.rst
T
Fabian Vogelsteller 0df2bb48ec Accounts (#869)
* Initial implementation of web3.eth.accounts

* Use EthFP internally

* Getting accounts closer to the desired api

* Style changes

* Partially implement web3.eth.accounts.wallet as specified

* moved accounts to its own package

* docs changes

* Change gasLimit to gas

* changed Accounts to class

* added wallet access to sendTransaction

* changing docs, in progress

* improved docs and changed accounts package

* fixed tests

* fixed jshints

* added wallet tests

* added signTransaction tests for async signing

* added signTransaction tests with iban addresses

* changed EthFP -> EthLib

* added account decrypt function

* added wallet decrypt and encryption function

* added decrypt and encryption tests

* added account generation tests

* made load save wallet work

* added more static tests

* added eth_sign tests

* fixed lint errors

* fixed travis
2017-07-13 19:46:10 +02:00

107 lines
1.4 KiB
ReStructuredText

.. _net-getid:
getId
=========
.. code-block:: javascript
web3.eth.net.getId([callback])
web3.bzz.net.getId([callback])
web3.shh.net.getId([callback])
Gets the current network ID.
----------
Parameters
----------
none
-------
Returns
-------
``Promise`` returns ``Number``: The network ID.
-------
Example
-------
.. code-block:: javascript
web3.eth.getId()
.then(console.log);
> 1
------------------------------------------------------------------------------
isListening
=========
.. code-block:: javascript
web3.eth.net.isListening([callback])
web3.bzz.net.isListening([callback])
web3.shh.net.isListening([callback])
Checks if the node is listening for peers.
----------
Parameters
----------
none
-------
Returns
-------
``Promise`` returns ``Boolean``
-------
Example
-------
.. code-block:: javascript
web3.eth.isListening()
.then(console.log);
> true
------------------------------------------------------------------------------
getPeerCount
=========
.. code-block:: javascript
web3.eth.net.getPeerCount([callback])
web3.bzz.net.getPeerCount([callback])
web3.shh.net.getPeerCount([callback])
Get the number of peers connected to.
----------
Parameters
----------
none
-------
Returns
-------
``Promise`` returns ``Number``
-------
Example
-------
.. code-block:: javascript
web3.eth.getPeerCount()
.then(console.log);
> 25