mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 11:38:12 +00:00
40 lines
641 B
ReStructuredText
40 lines
641 B
ReStructuredText
========
|
|
web3.eth
|
|
========
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
somefunc
|
|
=====================
|
|
|
|
.. code-block:: javascript
|
|
|
|
web3.setProvider(myProvider)
|
|
|
|
When called changes the current provider for all modules.
|
|
|
|
----------
|
|
Parameters
|
|
----------
|
|
|
|
1. ``Object`` - **myProvider**: a valid provider with at least ``send``, ``on`` function
|
|
|
|
-------
|
|
Returns
|
|
-------
|
|
|
|
``undefined``
|
|
|
|
-------
|
|
Example
|
|
-------
|
|
|
|
.. code-block:: javascript
|
|
|
|
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
|
|
|
|
|
|
------------------------------------------------------------------------------
|