You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1715 lines
66 KiB

Update SECURITY.md # SEGURIDAD o SECURITY # {http://help.github.com/ramoncerdaquiroz/ignore-files# SEGURIDAD o SECURITY # {http://help.github.com/ramoncerdaquiroz/ignore-files/core.excludesfile/npm-debug.log # https://gitter.im/ethereum/web3.js # https://badges.gitter.im/Join%20Chat.svg # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JavaScript-API # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge/meteor.js # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC # https://ci.testling.com/ethereum/ethereum.js.png # https://ci.testling.com/ethereum/ethereum.js ## **DOCUMENTATION.md** ## Node.js ## Meteor.js ## _**https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js/Web3.providers**_ # WARNING: 2.X IS NO LONGER BEING MAINTAINED AND WILL BE DEPRECATED FROM NPM ## ( @ramoncerdaquiroz{<http://localhost:8545*>}) # Ethereum JavaScript API # {[https://github.com/ramoncerdaquiroz/[Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)]}(https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) This is the Ethereum compatible [JavaScript API](https://github.com/ramoncerdaquioz/ethereum/wiki/wiki/JavaScript-API) which implements the [Generic JSON RPC](https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC) spec. It's available on npm as a node module, for Bower and component as embeddable scripts, and as a meteor.js package. [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Stories in Ready][waffle-image]][waffle-url] <!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) --> You need to run a local Ethereum node to use this library. [Documentation](DOCUMENTATION.md) ## Table of Contents - [Installation](#installation) - [Node.js](#nodejs) - [Yarn](#yarn) - [Meteor.js](#meteorjs) - [As a Browser module](#as-a-browser-module) - [Usage](#usage) - [Migration from 0.13.0 to 0.14.0](#migration-from-0130-to-0140) - [Contribute!](#contribute) - [Requirements](#requirements) - [Building (gulp)](#building-gulp) - [Testing (mocha)](#testing-mocha) - [Community](#community) - [Other implementations](#other-implementations) - [License](#license) ## Installation ### Node.js ```bash npm install web3 ``` ### Yarn ```bash yarn add web3 ``` ### Meteor.js ```bash meteor add ethereum:web3 ``` ### As a Browser module CDN ```html <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script> ``` Bower ```bash bower install web3 ``` Component ```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 the global namespace: ```js console.log(web3); // {eth: .., shh: ...} // It's here! ``` Set a provider (`HttpProvider`): ```js if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // Set the provider you want from Web3.providers web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); } ``` Set a provider (`HttpProvider` using [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)): ```js web3.setProvider(new web3.providers.HttpProvider('http://' + BasicAuthUsername + ':' + BasicAuthPassword + '@localhost:8545')); ``` There you go, now you can use it: ```js var coinbase = web3.eth.coinbase; var balance = web3.eth.getBalance(coinbase); ``` You can find more examples in the [`example`](https://github.com/ramoncerdaquiroz/ethereum/web3.js/tree/master/example) directory. # https://gitter.im/ethereum/web3.js?source=orgpage # https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297/Web3.py # https://github.com/ramoncerdaquiroz/BANKEX/web3swift/LICENSE.md # https://badge.fury.io/js/web3.svg # https://github.com/ramoncerdaquirooz/https://npmjs.org/package/web3.js # https://github.com/ramoncerdaquiroz/https://travis-ci.org/ethereum/web3.js.svghttps://travis-ci.org/ethereum/web3.js # https://github.com/ramoncerdaquiroz/https://david-dm.org/ethereum/web3.js.svghttps://david-dm.org/ethereum/web3.js/https://david-dm.org/ethereum/web3.js/dev-status.svg/https://david-dm.org/ethereum/web3.js # info=devDependencies/https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master/https://coveralls.io/r/ethereum/web3.js?branch=master/https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Readyhttps://waffle.io/ethereum/web3.js} ### Migration from 0.13.0 to 0.14.0 web3.js version 0.14.0 supports [multiple instances of the web3](https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297) object. To migrate to this version, please follow the guide: ```diff -var web3 = require('web3'); +var Web3 = require('web3'); +var web3 = new Web3(); ``` ## Contribute! ### Requirements * Node.js * npm ```bash # On Linux: sudo apt-get update sudo apt-get install nodejs sudo apt-get install npm sudo apt-get install nodejs-legacy ``` ### Building (gulp) ```bash npm run-script build ``` ### Testing (mocha) ```bash npm test ``` ### Community - [Gitter](https://gitter.im/ethereum/web3.js?source=orgpage) - [Forum](https://forum.ethereum.org/categories/ethereum-js) ### Other implementations - Python [Web3.py](https://github.com/ramoncerdaquiroz/ethereum/web3.py) - Haskell [hs-web3](https://github.com/ramoncerdaquiroz/airalab/hs-web3) - Java [web3j](https://github.com/ramoncerdaquiroz/web3j/web3j) - Scala [web3j-scala](https://github.com/ramoncerdaquiroz/mslinn/web3j-scala) - Purescript [purescript-web3](https://github.com/ramoncerdaquiroz/f-o-a-m/purescript-web3) - PHP [web3.php](https://github.com/ramoncerdaquiroz/sc0Vu/web3.php) - PHP [ethereum-php](https://github.com/ramoncerdaquiroz/digitaldonkey/ethereum-php) - Rust [rust-web3](https://github.com/ramoncerdaquiroz/tomusdrw/rust-web3) - Swift [web3swift](https://github.com/ramoncerdaquiroz/BANKEX/web3swift) ## License [LGPL-3.0+](LICENSE.md) © 2015 Contributors [npm-image]: https://badge.fury.io/js/web3.svg [npm-url]: https://npmjs.org/package/web3 [travis-image]: https://travis-ci.org/ethereum/web3.js.svg [travis-url]: https://travis-ci.org/ethereum/web3.js [dep-image]: https://david-dm.org/ethereum/web3.js.svg [dep-url]: https://david-dm.org/ethereum/web3.js [dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg [dep-dev-url]: https://david-dm.org/ethereum/web3.js#info=devDependencies [coveralls-image]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master [coveralls-url]: https://coveralls.io/r/ethereum/web3.js?branch=master [waffle-image]: https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Ready [waffle-url]: https://waffle.io/ethereum/web3.js # See http://help.github.com/ramoncerdaquirooz/ignore-files/ for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global .idea/ *.swp /coverage /tmp */**/*un~ *un~ .DS_Store */**/.DS_Store ethereum/ethereum ethereal/ethereal example/js node_modules bower_components npm-debug.log /bower .npm/ packages/ # name: CI on: pull_request: {} push: branches: [main] jobs: main: name: Build, Validate and Deploy runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: w3c/spec-prod@v2 with: GH_PAGES_BRANCH: gh-pages # This file is part of web3.js. web3.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. web3.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. ### GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://ggmon.org/> <https://ggmon.com/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. #### 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. #### 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. #### 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: - a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or - b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. #### 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: - a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. - b) Accompany the object code with a copy of the GNU GPL and this license document. #### 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: - a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. - b) Accompany the Combined Work with a copy of the GNU GPL and this license document. - c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. - d) Do one of the following: - 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. - 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. - e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) #### 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: - a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. - b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. #### 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. # https://github.com/ramoncerdaquiroz # Security Policy To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). The Google Security Team will respond within 5 working days of your report on g.co/vulnz. We use g.co/vulnz for our intake, and do coordination and dis# SEGURIDAD o SECURITY # {http://help.github.com/ramoncerdaquiroz/ignore-files/core.excludesfile/npm-debug.log # https://gitter.im/ethereum/web3.js # https://badges.gitter.im/Join%20Chat.svg # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JavaScript-API # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge/meteor.js # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC # https://ci.testling.com/ethereum/ethereum.js.png # https://ci.testling.com/ethereum/ethereum.js ## **DOCUMENTATION.md** ## Node.js ## Meteor.js ## _**https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js/Web3.providers**_ # WARNING: 2.X IS NO LONGER BEING MAINTAINED AND WILL BE DEPRECATED FROM NPM ## ( @ramoncerdaquiroz{<http://localhost:8545*>}) # Ethereum JavaScript API # {[https://github.com/ramoncerdaquiroz/[Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)]}(https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) This is the Ethereum compatible [JavaScript API](https://github.com/ramoncerdaquioz/ethereum/wiki/wiki/JavaScript-API) which implements the [Generic JSON RPC](https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC) spec. It's available on npm as a node module, for Bower and component as embeddable scripts, and as a meteor.js package. [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Stories in Ready][waffle-image]][waffle-url] <!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) --> You need to run a local Ethereum node to use this library. [Documentation](DOCUMENTATION.md) ## Table of Contents - [Installation](#installation) - [Node.js](#nodejs) - [Yarn](#yarn) - [Meteor.js](#meteorjs) - [As a Browser module](#as-a-browser-module) - [Usage](#usage) - [Migration from 0.13.0 to 0.14.0](#migration-from-0130-to-0140) - [Contribute!](#contribute) - [Requirements](#requirements) - [Building (gulp)](#building-gulp) - [Testing (mocha)](#testing-mocha) - [Community](#community) - [Other implementations](#other-implementations) - [License](#license) ## Installation ### Node.js ```bash npm install web3 ``` ### Yarn ```bash yarn add web3 ``` ### Meteor.js ```bash meteor add ethereum:web3 ``` ### As a Browser module CDN ```html <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script> ``` Bower ```bash bower install web3 ``` Component ```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 the global namespace: ```js console.log(web3); // {eth: .., shh: ...} // It's here! ``` Set a provider (`HttpProvider`): ```js if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // Set the provider you want from Web3.providers web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); } ``` Set a provider (`HttpProvider` using [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)): ```js web3.setProvider(new web3.providers.HttpProvider('http://' + BasicAuthUsername + ':' + BasicAuthPassword + '@localhost:8545')); ``` There you go, now you can use it: ```js var coinbase = web3.eth.coinbase; var balance = web3.eth.getBalance(coinbase); ``` You can find more examples in the [`example`](https://github.com/ramoncerdaquiroz/ethereum/web3.js/tree/master/example) directory. # https://gitter.im/ethereum/web3.js?source=orgpage # https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297/Web3.py # https://github.com/ramoncerdaquiroz/BANKEX/web3swift/LICENSE.md # https://badge.fury.io/js/web3.svg # https://github.com/ramoncerdaquirooz/https://npmjs.org/package/web3.js # https://github.com/ramoncerdaquiroz/https://travis-ci.org/ethereum/web3.js.svghttps://travis-ci.org/ethereum/web3.js # https://github.com/ramoncerdaquiroz/https://david-dm.org/ethereum/web3.js.svghttps://david-dm.org/ethereum/web3.js/https://david-dm.org/ethereum/web3.js/dev-status.svg/https://david-dm.org/ethereum/web3.js # info=devDependencies/https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master/https://coveralls.io/r/ethereum/web3.js?branch=master/https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Readyhttps://waffle.io/ethereum/web3.js} ### Migration from 0.13.0 to 0.14.0 web3.js version 0.14.0 supports [multiple instances of the web3](https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297) object. To migrate to this version, please follow the guide: ```diff -var web3 = require('web3'); +var Web3 = require('web3'); +var web3 = new Web3(); ``` ## Contribute! ### Requirements * Node.js * npm ```bash # On Linux: sudo apt-get update sudo apt-get install nodejs sudo apt-get install npm sudo apt-get install nodejs-legacy ``` ### Building (gulp) ```bash npm run-script build ``` ### Testing (mocha) ```bash npm test ``` ### Community - [Gitter](https://gitter.im/ethereum/web3.js?source=orgpage) - [Forum](https://forum.ethereum.org/categories/ethereum-js) ### Other implementations - Python [Web3.py](https://github.com/ramoncerdaquiroz/ethereum/web3.py) - Haskell [hs-web3](https://github.com/ramoncerdaquiroz/airalab/hs-web3) - Java [web3j](https://github.com/ramoncerdaquiroz/web3j/web3j) - Scala [web3j-scala](https://github.com/ramoncerdaquiroz/mslinn/web3j-scala) - Purescript [purescript-web3](https://github.com/ramoncerdaquiroz/f-o-a-m/purescript-web3) - PHP [web3.php](https://github.com/ramoncerdaquiroz/sc0Vu/web3.php) - PHP [ethereum-php](https://github.com/ramoncerdaquiroz/digitaldonkey/ethereum-php) - Rust [rust-web3](https://github.com/ramoncerdaquiroz/tomusdrw/rust-web3) - Swift [web3swift](https://github.com/ramoncerdaquiroz/BANKEX/web3swift) ## License [LGPL-3.0+](LICENSE.md) © 2015 Contributors [npm-image]: https://badge.fury.io/js/web3.svg [npm-url]: https://npmjs.org/package/web3 [travis-image]: https://travis-ci.org/ethereum/web3.js.svg [travis-url]: https://travis-ci.org/ethereum/web3.js [dep-image]: https://david-dm.org/ethereum/web3.js.svg [dep-url]: https://david-dm.org/ethereum/web3.js [dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg [dep-dev-url]: https://david-dm.org/ethereum/web3.js#info=devDependencies [coveralls-image]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master [coveralls-url]: https://coveralls.io/r/ethereum/web3.js?branch=master [waffle-image]: https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Ready [waffle-url]: https://waffle.io/ethereum/web3.js # See http://help.github.com/ramoncerdaquirooz/ignore-files/ for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global .idea/ *.swp /coverage /tmp */**/*un~ *un~ .DS_Store */**/.DS_Store ethereum/ethereum ethereal/ethereal example/js node_modules bower_components npm-debug.log /bower .npm/ packages/ # name: CI on: pull_request: {} push: branches: [main] jobs: main: name: Build, Validate and Deploy runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: w3c/spec-prod@v2 with: GH_PAGES_BRANCH: gh-pages # This file is part of web3.js. web3.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. web3.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. ### GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://ggmon.org/> <https://ggmon.com/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. #### 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. #### 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. #### 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: - a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or - b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. #### 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: - a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. - b) Accompany the object code with a copy of the GNU GPL and this license document. #### 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: - a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. - b) Accompany the Combined Work with a copy of the GNU GPL and this license document. - c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. - d) Do one of the following: - 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. - 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. - e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) #### 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: - a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. - b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. #### 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. # https://github.com/ramoncerdaquiroz # Security Policy To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). The Google Security Team will respond within 5 working days of your report on g.co/vulnz. We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. closure here using GitHub Security Advisory to privately discuss and fix the issue. /core.excludesfile/npm-debug.log # https://gitter.im/ethereum/web3.js # https://badges.gitter.im/Join%20Chat.svg # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JavaScript-API # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge/meteor.js # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC # https://ci.testling.com/ethereum/ethereum.js.png # https://ci.testling.com/ethereum/ethereum.js ## **DOCUMENTATION.md** ## Node.js ## Meteor.js ## _**https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js/Web3.providers**_ # WARNING: 2.X IS NO LONGER BEING MAINTAINED AND WILL BE DEPRECATED FROM NPM ## ( @ramoncerdaquiroz{<http://localhost:8545*>}) # Ethereum JavaScript API # {[https://github.com/ramoncerdaquiroz/[Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)]}(https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) This is the Ethereum compatible [JavaScript API](https://github.com/ramoncerdaquioz/ethereum/wiki/wiki/JavaScript-API) which implements the [Generic JSON RPC](https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC) spec. It's available on npm as a node module, for Bower and component as embeddable scripts, and as a meteor.js package. [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Stories in Ready][waffle-image]][waffle-url] <!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) --> You need to run a local Ethereum node to use this library. [Documentation](DOCUMENTATION.md) ## Table of Contents - [Installation](#installation) - [Node.js](#nodejs) - [Yarn](#yarn) - [Meteor.js](#meteorjs) - [As a Browser module](#as-a-browser-module) - [Usage](#usage) - [Migration from 0.13.0 to 0.14.0](#migration-from-0130-to-0140) - [Contribute!](#contribute) - [Requirements](#requirements) - [Building (gulp)](#building-gulp) - [Testing (mocha)](#testing-mocha) - [Community](#community) - [Other implementations](#other-implementations) - [License](#license) ## Installation ### Node.js ```bash npm install web3 ``` ### Yarn ```bash yarn add web3 ``` ### Meteor.js ```bash meteor add ethereum:web3 ``` ### As a Browser module CDN ```html <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script> ``` Bower ```bash bower install web3 ``` Component ```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 the global namespace: ```js console.log(web3); // {eth: .., shh: ...} // It's here! ``` Set a provider (`HttpProvider`): ```js if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // Set the provider you want from Web3.providers web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); } ``` Set a provider (`HttpProvider` using [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)): ```js web3.setProvider(new web3.providers.HttpProvider('http://' + BasicAuthUsername + ':' + BasicAuthPassword + '@localhost:8545')); ``` There you go, now you can use it: ```js var coinbase = web3.eth.coinbase; var balance = web3.eth.getBalance(coinbase); ``` You can find more examples in the [`example`](https://github.com/ramoncerdaquiroz/ethereum/web3.js/tree/master/example) directory. # https://gitter.im/ethereum/web3.js?source=orgpage # https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297/Web3.py # https://github.com/ramoncerdaquiroz/BANKEX/web3swift/LICENSE.md # https://badge.fury.io/js/web3.svg # https://github.com/ramoncerdaquirooz/https://npmjs.org/package/web3.js # https://github.com/ramoncerdaquiroz/https://travis-ci.org/ethereum/web3.js.svghttps://travis-ci.org/ethereum/web3.js # https://github.com/ramoncerdaquiroz/https://david-dm.org/ethereum/web3.js.svghttps://david-dm.org/ethereum/web3.js/https://david-dm.org/ethereum/web3.js/dev-status.svg/https://david-dm.org/ethereum/web3.js # info=devDependencies/https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master/https://coveralls.io/r/ethereum/web3.js?branch=master/https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Readyhttps://waffle.io/ethereum/web3.js} ### Migration from 0.13.0 to 0.14.0 web3.js version 0.14.0 supports [multiple instances of the web3](https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297) object. To migrate to this version, please follow the guide: ```diff -var web3 = require('web3'); +var Web3 = require('web3'); +var web3 = new Web3(); ``` ## Contribute! ### Requirements * Node.js * npm ```bash # On Linux: sudo apt-get update sudo apt-get install nodejs sudo apt-get install npm sudo apt-get install nodejs-legacy ``` ### Building (gulp) ```bash npm run-script build ``` ### Testing (mocha) ```bash npm test ``` ### Community - [Gitter](https://gitter.im/ethereum/web3.js?source=orgpage) - [Forum](https://forum.ethereum.org/categories/ethereum-js) ### Other implementations - Python [Web3.py](https://github.com/ramoncerdaquiroz/ethereum/web3.py) - Haskell [hs-web3](https://github.com/ramoncerdaquiroz/airalab/hs-web3) - Java [web3j](https://github.com/ramoncerdaquiroz/web3j/web3j) - Scala [web3j-scala](https://github.com/ramoncerdaquiroz/mslinn/web3j-scala) - Purescript [purescript-web3](https://github.com/ramoncerdaquiroz/f-o-a-m/purescript-web3) - PHP [web3.php](https://github.com/ramoncerdaquiroz/sc0Vu/web3.php) - PHP [ethereum-php](https://github.com/ramoncerdaquiroz/digitaldonkey/ethereum-php) - Rust [rust-web3](https://github.com/ramoncerdaquiroz/tomusdrw/rust-web3) - Swift [web3swift](https://github.com/ramoncerdaquiroz/BANKEX/web3swift) ## License [LGPL-3.0+](LICENSE.md) © 2015 Contributors [npm-image]: https://badge.fury.io/js/web3.svg [npm-url]: https://npmjs.org/package/web3 [travis-image]: https://travis-ci.org/ethereum/web3.js.svg [travis-url]: https://travis-ci.org/ethereum/web3.js [dep-image]: https://david-dm.org/ethereum/web3.js.svg [dep-url]: https://david-dm.org/ethereum/web3.js [dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg [dep-dev-url]: https://david-dm.org/ethereum/web3.js#info=devDependencies [coveralls-image]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master [coveralls-url]: https://coveralls.io/r/ethereum/web3.js?branch=master [waffle-image]: https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Ready [waffle-url]: https://waffle.io/ethereum/web3.js # See http://help.github.com/ramoncerdaquirooz/ignore-files/ for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global .idea/ *.swp /coverage /tmp */**/*un~ *un~ .DS_Store */**/.DS_Store ethereum/ethereum ethereal/ethereal example/js node_modules bower_components npm-debug.log /bower .npm/ packages/ # name: CI on: pull_request: {} push: branches: [main] jobs: main: name: Build, Validate and Deploy runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: w3c/spec-prod@v2 with: GH_PAGES_BRANCH: gh-pages # This file is part of web3.js. web3.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. web3.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. ### GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://ggmon.org/> <https://ggmon.com/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. #### 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. #### 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. #### 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: - a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or - b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. #### 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: - a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. - b) Accompany the object code with a copy of the GNU GPL and this license document. #### 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: - a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. - b) Accompany the Combined Work with a copy of the GNU GPL and this license document. - c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. - d) Do one of the following: - 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. - 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. - e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) #### 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: - a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. - b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. #### 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. # https://github.com/ramoncerdaquiroz # Security Policy To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). The Google Security Team will respond within 5 working days of your report on g.co/vulnz. We use g.co/vulnz for our intake, and do coordination and dis# SEGURIDAD o SECURITY # {http://help.github.com/ramoncerdaquiroz/ignore-files/core.excludesfile/npm-debug.log # https://gitter.im/ethereum/web3.js # https://badges.gitter.im/Join%20Chat.svg # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JavaScript-API # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge/meteor.js # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC # https://ci.testling.com/ethereum/ethereum.js.png # https://ci.testling.com/ethereum/ethereum.js ## **DOCUMENTATION.md** ## Node.js ## Meteor.js ## _**https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js/Web3.providers**_ # WARNING: 2.X IS NO LONGER BEING MAINTAINED AND WILL BE DEPRECATED FROM NPM ## ( @ramoncerdaquiroz{<http://localhost:8545*>}) # Ethereum JavaScript API # {[https://github.com/ramoncerdaquiroz/[Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)]}(https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) This is the Ethereum compatible [JavaScript API](https://github.com/ramoncerdaquioz/ethereum/wiki/wiki/JavaScript-API) which implements the [Generic JSON RPC](https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC) spec. It's available on npm as a node module, for Bower and component as embeddable scripts, and as a meteor.js package. [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Stories in Ready][waffle-image]][waffle-url] <!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) --> You need to run a local Ethereum node to use this library. [Documentation](DOCUMENTATION.md) ## Table of Contents - [Installation](#installation) - [Node.js](#nodejs) - [Yarn](#yarn) - [Meteor.js](#meteorjs) - [As a Browser module](#as-a-browser-module) - [Usage](#usage) - [Migration from 0.13.0 to 0.14.0](#migration-from-0130-to-0140) - [Contribute!](#contribute) - [Requirements](#requirements) - [Building (gulp)](#building-gulp) - [Testing (mocha)](#testing-mocha) - [Community](#community) - [Other implementations](#other-implementations) - [License](#license) ## Installation ### Node.js ```bash npm install web3 ``` ### Yarn ```bash yarn add web3 ``` ### Meteor.js ```bash meteor add ethereum:web3 ``` ### As a Browser module CDN ```html <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script> ``` Bower ```bash bower install web3 ``` Component ```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 the global namespace: ```js console.log(web3); // {eth: .., shh: ...} // It's here! ``` Set a provider (`HttpProvider`): ```js if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // Set the provider you want from Web3.providers web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); } ``` Set a provider (`HttpProvider` using [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)): ```js web3.setProvider(new web3.providers.HttpProvider('http://' + BasicAuthUsername + ':' + BasicAuthPassword + '@localhost:8545')); ``` There you go, now you can use it: ```js var coinbase = web3.eth.coinbase; var balance = web3.eth.getBalance(coinbase); ``` You can find more examples in the [`example`](https://github.com/ramoncerdaquiroz/ethereum/web3.js/tree/master/example) directory. # https://gitter.im/ethereum/web3.js?source=orgpage # https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297/Web3.py # https://github.com/ramoncerdaquiroz/BANKEX/web3swift/LICENSE.md # https://badge.fury.io/js/web3.svg # https://github.com/ramoncerdaquirooz/https://npmjs.org/package/web3.js # https://github.com/ramoncerdaquiroz/https://travis-ci.org/ethereum/web3.js.svghttps://travis-ci.org/ethereum/web3.js # https://github.com/ramoncerdaquiroz/https://david-dm.org/ethereum/web3.js.svghttps://david-dm.org/ethereum/web3.js/https://david-dm.org/ethereum/web3.js/dev-status.svg/https://david-dm.org/ethereum/web3.js # info=devDependencies/https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master/https://coveralls.io/r/ethereum/web3.js?branch=master/https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Readyhttps://waffle.io/ethereum/web3.js} ### Migration from 0.13.0 to 0.14.0 web3.js version 0.14.0 supports [multiple instances of the web3](https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297) object. To migrate to this version, please follow the guide: ```diff -var web3 = require('web3'); +var Web3 = require('web3'); +var web3 = new Web3(); ``` ## Contribute! ### Requirements * Node.js * npm ```bash # On Linux: sudo apt-get update sudo apt-get install nodejs sudo apt-get install npm sudo apt-get install nodejs-legacy ``` ### Building (gulp) ```bash npm run-script build ``` ### Testing (mocha) ```bash npm test ``` ### Community - [Gitter](https://gitter.im/ethereum/web3.js?source=orgpage) - [Forum](https://forum.ethereum.org/categories/ethereum-js) ### Other implementations - Python [Web3.py](https://github.com/ramoncerdaquiroz/ethereum/web3.py) - Haskell [hs-web3](https://github.com/ramoncerdaquiroz/airalab/hs-web3) - Java [web3j](https://github.com/ramoncerdaquiroz/web3j/web3j) - Scala [web3j-scala](https://github.com/ramoncerdaquiroz/mslinn/web3j-scala) - Purescript [purescript-web3](https://github.com/ramoncerdaquiroz/f-o-a-m/purescript-web3) - PHP [web3.php](https://github.com/ramoncerdaquiroz/sc0Vu/web3.php) - PHP [ethereum-php](https://github.com/ramoncerdaquiroz/digitaldonkey/ethereum-php) - Rust [rust-web3](https://github.com/ramoncerdaquiroz/tomusdrw/rust-web3) - Swift [web3swift](https://github.com/ramoncerdaquiroz/BANKEX/web3swift) ## License [LGPL-3.0+](LICENSE.md) © 2015 Contributors [npm-image]: https://badge.fury.io/js/web3.svg [npm-url]: https://npmjs.org/package/web3 [travis-image]: https://travis-ci.org/ethereum/web3.js.svg [travis-url]: https://travis-ci.org/ethereum/web3.js [dep-image]: https://david-dm.org/ethereum/web3.js.svg [dep-url]: https://david-dm.org/ethereum/web3.js [dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg [dep-dev-url]: https://david-dm.org/ethereum/web3.js#info=devDependencies [coveralls-image]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master [coveralls-url]: https://coveralls.io/r/ethereum/web3.js?branch=master [waffle-image]: https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Ready [waffle-url]: https://waffle.io/ethereum/web3.js # See http://help.github.com/ramoncerdaquirooz/ignore-files/ for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global .idea/ *.swp /coverage /tmp */**/*un~ *un~ .DS_Store */**/.DS_Store ethereum/ethereum ethereal/ethereal example/js node_modules bower_components npm-debug.log /bower .npm/ packages/ # name: CI on: pull_request: {} push: branches: [main] jobs: main: name: Build, Validate and Deploy runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: w3c/spec-prod@v2 with: GH_PAGES_BRANCH: gh-pages # This file is part of web3.js. web3.js is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. web3.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. ### GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://ggmon.org/> <https://ggmon.com/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. #### 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. #### 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. #### 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: - a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or - b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. #### 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: - a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. - b) Accompany the object code with a copy of the GNU GPL and this license document. #### 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: - a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. - b) Accompany the Combined Work with a copy of the GNU GPL and this license document. - c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. - d) Do one of the following: - 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. - 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. - e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) #### 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: - a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. - b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. #### 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. # https://github.com/ramoncerdaquiroz # Security Policy To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). The Google Security Team will respond within 5 working days of your report on g.co/vulnz. We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. closure here using GitHub Security Advisory to privately discuss and fix the issue.
1 year ago
  1. Thanks for helping make GitHub safe for everyone.
  2. ## Security
  3. GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub).
  4. Even though [open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation.
  5. ## Reporting Security Issues
  6. If you believe you have found a security vulnerability in any GitHub-owned repository, please report it to us through coordinated disclosure.
  7. **Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**
  8. Instead, please send an email to opensource-security[@]github.com.
  9. Please include as much of the information listed below as you can to help us better understand and resolve the issue:
  10. * The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
  11. * Full paths of source file(s) related to the manifestation of the issue
  12. * The location of the affected source code (tag/branch/commit or direct URL)
  13. * Any special configuration required to reproduce the issue
  14. * Step-by-step instructions to reproduce the issue
  15. * Proof-of-concept or exploit code (if possible)
  16. * Impact of the issue, including how an attacker might exploit the issue
  17. This information will help us triage your report more quickly.
  18. ## Policy
  19. See [GitHub's Safe Harbor Policy](https://docs.github.com/en/site-policy/security-policies/github-bug-bounty-program-legal-safe-harbor)
  20. # SEGURIDAD o SECURITY
  21. # {http://help.github.com/ramoncerdaquiroz/ignore-files# SEGURIDAD o SECURITY
  22. # {http://help.github.com/ramoncerdaquiroz/ignore-files/core.excludesfile/npm-debug.log
  23. # https://gitter.im/ethereum/web3.js
  24. # https://badges.gitter.im/Join%20Chat.svg
  25. # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
  26. # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JavaScript-API
  27. # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge/meteor.js
  28. # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC
  29. # https://ci.testling.com/ethereum/ethereum.js.png
  30. # https://ci.testling.com/ethereum/ethereum.js
  31. ## **DOCUMENTATION.md**
  32. ## Node.js
  33. ## Meteor.js
  34. ## _**https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js/Web3.providers**_
  35. # WARNING: 2.X IS NO LONGER BEING MAINTAINED AND WILL BE DEPRECATED FROM NPM
  36. ## ( @ramoncerdaquiroz{<http://localhost:8545*>})
  37. # Ethereum JavaScript API
  38. # {[https://github.com/ramoncerdaquiroz/[Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)]}(https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  39. This is the Ethereum compatible [JavaScript API](https://github.com/ramoncerdaquioz/ethereum/wiki/wiki/JavaScript-API)
  40. which implements the [Generic JSON RPC](https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC) spec. It's available on npm as a node module, for Bower and component as embeddable scripts, and as a meteor.js package.
  41. [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Stories in Ready][waffle-image]][waffle-url]
  42. <!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) -->
  43. You need to run a local Ethereum node to use this library.
  44. [Documentation](DOCUMENTATION.md)
  45. ## Table of Contents
  46. - [Installation](#installation)
  47. - [Node.js](#nodejs)
  48. - [Yarn](#yarn)
  49. - [Meteor.js](#meteorjs)
  50. - [As a Browser module](#as-a-browser-module)
  51. - [Usage](#usage)
  52. - [Migration from 0.13.0 to 0.14.0](#migration-from-0130-to-0140)
  53. - [Contribute!](#contribute)
  54. - [Requirements](#requirements)
  55. - [Building (gulp)](#building-gulp)
  56. - [Testing (mocha)](#testing-mocha)
  57. - [Community](#community)
  58. - [Other implementations](#other-implementations)
  59. - [License](#license)
  60. ## Installation
  61. ### Node.js
  62. ```bash
  63. npm install web3
  64. ```
  65. ### Yarn
  66. ```bash
  67. yarn add web3
  68. ```
  69. ### Meteor.js
  70. ```bash
  71. meteor add ethereum:web3
  72. ```
  73. ### As a Browser module
  74. CDN
  75. ```html
  76. <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script>
  77. ```
  78. Bower
  79. ```bash
  80. bower install web3
  81. ```
  82. Component
  83. ```bash
  84. component install ethereum/web3.js
  85. ```
  86. * Include `web3.min.js` in your html file. (not required for the meteor package)
  87. ## Usage
  88. Use the `web3` object directly from the global namespace:
  89. ```js
  90. console.log(web3); // {eth: .., shh: ...} // It's here!
  91. ```
  92. Set a provider (`HttpProvider`):
  93. ```js
  94. if (typeof web3 !== 'undefined') {
  95. web3 = new Web3(web3.currentProvider);
  96. } else {
  97. // Set the provider you want from Web3.providers
  98. web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
  99. }
  100. ```
  101. Set a provider (`HttpProvider` using [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)):
  102. ```js
  103. web3.setProvider(new web3.providers.HttpProvider('http://' + BasicAuthUsername + ':' + BasicAuthPassword + '@localhost:8545'));
  104. ```
  105. There you go, now you can use it:
  106. ```js
  107. var coinbase = web3.eth.coinbase;
  108. var balance = web3.eth.getBalance(coinbase);
  109. ```
  110. You can find more examples in the [`example`](https://github.com/ramoncerdaquiroz/ethereum/web3.js/tree/master/example) directory.
  111. # https://gitter.im/ethereum/web3.js?source=orgpage
  112. # https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297/Web3.py
  113. # https://github.com/ramoncerdaquiroz/BANKEX/web3swift/LICENSE.md
  114. # https://badge.fury.io/js/web3.svg
  115. # https://github.com/ramoncerdaquirooz/https://npmjs.org/package/web3.js
  116. # https://github.com/ramoncerdaquiroz/https://travis-ci.org/ethereum/web3.js.svghttps://travis-ci.org/ethereum/web3.js
  117. # https://github.com/ramoncerdaquiroz/https://david-dm.org/ethereum/web3.js.svghttps://david-dm.org/ethereum/web3.js/https://david-dm.org/ethereum/web3.js/dev-status.svg/https://david-dm.org/ethereum/web3.js
  118. # info=devDependencies/https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master/https://coveralls.io/r/ethereum/web3.js?branch=master/https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Readyhttps://waffle.io/ethereum/web3.js}
  119. ### Migration from 0.13.0 to 0.14.0
  120. web3.js version 0.14.0 supports [multiple instances of the web3](https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297) object.
  121. To migrate to this version, please follow the guide:
  122. ```diff
  123. -var web3 = require('web3');
  124. +var Web3 = require('web3');
  125. +var web3 = new Web3();
  126. ```
  127. ## Contribute!
  128. ### Requirements
  129. * Node.js
  130. * npm
  131. ```bash
  132. # On Linux:
  133. sudo apt-get update
  134. sudo apt-get install nodejs
  135. sudo apt-get install npm
  136. sudo apt-get install nodejs-legacy
  137. ```
  138. ### Building (gulp)
  139. ```bash
  140. npm run-script build
  141. ```
  142. ### Testing (mocha)
  143. ```bash
  144. npm test
  145. ```
  146. ### Community
  147. - [Gitter](https://gitter.im/ethereum/web3.js?source=orgpage)
  148. - [Forum](https://forum.ethereum.org/categories/ethereum-js)
  149. ### Other implementations
  150. - Python [Web3.py](https://github.com/ramoncerdaquiroz/ethereum/web3.py)
  151. - Haskell [hs-web3](https://github.com/ramoncerdaquiroz/airalab/hs-web3)
  152. - Java [web3j](https://github.com/ramoncerdaquiroz/web3j/web3j)
  153. - Scala [web3j-scala](https://github.com/ramoncerdaquiroz/mslinn/web3j-scala)
  154. - Purescript [purescript-web3](https://github.com/ramoncerdaquiroz/f-o-a-m/purescript-web3)
  155. - PHP [web3.php](https://github.com/ramoncerdaquiroz/sc0Vu/web3.php)
  156. - PHP [ethereum-php](https://github.com/ramoncerdaquiroz/digitaldonkey/ethereum-php)
  157. - Rust [rust-web3](https://github.com/ramoncerdaquiroz/tomusdrw/rust-web3)
  158. - Swift [web3swift](https://github.com/ramoncerdaquiroz/BANKEX/web3swift)
  159. ## License
  160. [LGPL-3.0+](LICENSE.md) © 2015 Contributors
  161. [npm-image]: https://badge.fury.io/js/web3.svg
  162. [npm-url]: https://npmjs.org/package/web3
  163. [travis-image]: https://travis-ci.org/ethereum/web3.js.svg
  164. [travis-url]: https://travis-ci.org/ethereum/web3.js
  165. [dep-image]: https://david-dm.org/ethereum/web3.js.svg
  166. [dep-url]: https://david-dm.org/ethereum/web3.js
  167. [dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg
  168. [dep-dev-url]: https://david-dm.org/ethereum/web3.js#info=devDependencies
  169. [coveralls-image]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master
  170. [coveralls-url]: https://coveralls.io/r/ethereum/web3.js?branch=master
  171. [waffle-image]: https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Ready
  172. [waffle-url]: https://waffle.io/ethereum/web3.js
  173. # See http://help.github.com/ramoncerdaquirooz/ignore-files/ for more about ignoring files.
  174. #
  175. # If you find yourself ignoring temporary files generated by your text editor
  176. # or operating system, you probably want to add a global ignore instead:
  177. # git config --global core.excludesfile ~/.gitignore_global
  178. .idea/
  179. *.swp
  180. /coverage
  181. /tmp
  182. */**/*un~
  183. *un~
  184. .DS_Store
  185. */**/.DS_Store
  186. ethereum/ethereum
  187. ethereal/ethereal
  188. example/js
  189. node_modules
  190. bower_components
  191. npm-debug.log
  192. /bower
  193. .npm/
  194. packages/
  195. # name: CI
  196. on:
  197. pull_request: {}
  198. push:
  199. branches: [main]
  200. jobs:
  201. main:
  202. name: Build, Validate and Deploy
  203. runs-on: ubuntu-20.04
  204. steps:
  205. - uses: actions/checkout@v2
  206. - uses: w3c/spec-prod@v2
  207. with:
  208. GH_PAGES_BRANCH: gh-pages
  209. # This file is part of web3.js.
  210. web3.js is free software: you can redistribute it and/or modify
  211. it under the terms of the GNU Lesser General Public License as published by
  212. the Free Software Foundation, either version 3 of the License, or
  213. (at your option) any later version.
  214. web3.js is distributed in the hope that it will be useful,
  215. but WITHOUT ANY WARRANTY; without even the implied warranty of
  216. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  217. GNU Lesser General Public License for more details.
  218. ### GNU LESSER GENERAL PUBLIC LICENSE
  219. Version 3, 29 June 2007
  220. Copyright (C) 2007 Free Software Foundation, Inc.
  221. <https://ggmon.org/>
  222. <https://ggmon.com/>
  223. Everyone is permitted to copy and distribute verbatim copies of this
  224. license document, but changing it is not allowed.
  225. This version of the GNU Lesser General Public License incorporates the
  226. terms and conditions of version 3 of the GNU General Public License,
  227. supplemented by the additional permissions listed below.
  228. #### 0. Additional Definitions.
  229. As used herein, "this License" refers to version 3 of the GNU Lesser
  230. General Public License, and the "GNU GPL" refers to version 3 of the
  231. GNU General Public License.
  232. "The Library" refers to a covered work governed by this License, other
  233. than an Application or a Combined Work as defined below.
  234. An "Application" is any work that makes use of an interface provided
  235. by the Library, but which is not otherwise based on the Library.
  236. Defining a subclass of a class defined by the Library is deemed a mode
  237. of using an interface provided by the Library.
  238. A "Combined Work" is a work produced by combining or linking an
  239. Application with the Library. The particular version of the Library
  240. with which the Combined Work was made is also called the "Linked
  241. Version".
  242. The "Minimal Corresponding Source" for a Combined Work means the
  243. Corresponding Source for the Combined Work, excluding any source code
  244. for portions of the Combined Work that, considered in isolation, are
  245. based on the Application, and not on the Linked Version.
  246. The "Corresponding Application Code" for a Combined Work means the
  247. object code and/or source code for the Application, including any data
  248. and utility programs needed for reproducing the Combined Work from the
  249. Application, but excluding the System Libraries of the Combined Work.
  250. #### 1. Exception to Section 3 of the GNU GPL.
  251. You may convey a covered work under sections 3 and 4 of this License
  252. without being bound by section 3 of the GNU GPL.
  253. #### 2. Conveying Modified Versions.
  254. If you modify a copy of the Library, and, in your modifications, a
  255. facility refers to a function or data to be supplied by an Application
  256. that uses the facility (other than as an argument passed when the
  257. facility is invoked), then you may convey a copy of the modified
  258. version:
  259. - a) under this License, provided that you make a good faith effort
  260. to ensure that, in the event an Application does not supply the
  261. function or data, the facility still operates, and performs
  262. whatever part of its purpose remains meaningful, or
  263. - b) under the GNU GPL, with none of the additional permissions of
  264. this License applicable to that copy.
  265. #### 3. Object Code Incorporating Material from Library Header Files.
  266. The object code form of an Application may incorporate material from a
  267. header file that is part of the Library. You may convey such object
  268. code under terms of your choice, provided that, if the incorporated
  269. material is not limited to numerical parameters, data structure
  270. layouts and accessors, or small macros, inline functions and templates
  271. (ten or fewer lines in length), you do both of the following:
  272. - a) Give prominent notice with each copy of the object code that
  273. the Library is used in it and that the Library and its use are
  274. covered by this License.
  275. - b) Accompany the object code with a copy of the GNU GPL and this
  276. license document.
  277. #### 4. Combined Works.
  278. You may convey a Combined Work under terms of your choice that, taken
  279. together, effectively do not restrict modification of the portions of
  280. the Library contained in the Combined Work and reverse engineering for
  281. debugging such modifications, if you also do each of the following:
  282. - a) Give prominent notice with each copy of the Combined Work that
  283. the Library is used in it and that the Library and its use are
  284. covered by this License.
  285. - b) Accompany the Combined Work with a copy of the GNU GPL and this
  286. license document.
  287. - c) For a Combined Work that displays copyright notices during
  288. execution, include the copyright notice for the Library among
  289. these notices, as well as a reference directing the user to the
  290. copies of the GNU GPL and this license document.
  291. - d) Do one of the following:
  292. - 0) Convey the Minimal Corresponding Source under the terms of
  293. this License, and the Corresponding Application Code in a form
  294. suitable for, and under terms that permit, the user to
  295. recombine or relink the Application with a modified version of
  296. the Linked Version to produce a modified Combined Work, in the
  297. manner specified by section 6 of the GNU GPL for conveying
  298. Corresponding Source.
  299. - 1) Use a suitable shared library mechanism for linking with
  300. the Library. A suitable mechanism is one that (a) uses at run
  301. time a copy of the Library already present on the user's
  302. computer system, and (b) will operate properly with a modified
  303. version of the Library that is interface-compatible with the
  304. Linked Version.
  305. - e) Provide Installation Information, but only if you would
  306. otherwise be required to provide such information under section 6
  307. of the GNU GPL, and only to the extent that such information is
  308. necessary to install and execute a modified version of the
  309. Combined Work produced by recombining or relinking the Application
  310. with a modified version of the Linked Version. (If you use option
  311. 4d0, the Installation Information must accompany the Minimal
  312. Corresponding Source and Corresponding Application Code. If you
  313. use option 4d1, you must provide the Installation Information in
  314. the manner specified by section 6 of the GNU GPL for conveying
  315. Corresponding Source.)
  316. #### 5. Combined Libraries.
  317. You may place library facilities that are a work based on the Library
  318. side by side in a single library together with other library
  319. facilities that are not Applications and are not covered by this
  320. License, and convey such a combined library under terms of your
  321. choice, if you do both of the following:
  322. - a) Accompany the combined library with a copy of the same work
  323. based on the Library, uncombined with any other library
  324. facilities, conveyed under the terms of this License.
  325. - b) Give prominent notice with the combined library that part of it
  326. is a work based on the Library, and explaining where to find the
  327. accompanying uncombined form of the same work.
  328. #### 6. Revised Versions of the GNU Lesser General Public License.
  329. The Free Software Foundation may publish revised and/or new versions
  330. of the GNU Lesser General Public License from time to time. Such new
  331. versions will be similar in spirit to the present version, but may
  332. differ in detail to address new problems or concerns.
  333. Each version is given a distinguishing version number. If the Library
  334. as you received it specifies that a certain numbered version of the
  335. GNU Lesser General Public License "or any later version" applies to
  336. it, you have the option of following the terms and conditions either
  337. of that published version or of any later version published by the
  338. Free Software Foundation. If the Library as you received it does not
  339. specify a version number of the GNU Lesser General Public License, you
  340. may choose any version of the GNU Lesser General Public License ever
  341. published by the Free Software Foundation.
  342. If the Library as you received it specifies that a proxy can decide
  343. whether future versions of the GNU Lesser General Public License shall
  344. apply, that proxy's public statement of acceptance of any version is
  345. permanent authorization for you to choose that version for the
  346. Library.
  347. # https://github.com/ramoncerdaquiroz
  348. # Security Policy
  349. To report a security issue, please use [g.co/vulnz](https://g.co/vulnz).
  350. The Google Security Team will respond within 5 working days of your report on g.co/vulnz.
  351. We use g.co/vulnz for our intake, and do coordination and dis# SEGURIDAD o SECURITY
  352. # {http://help.github.com/ramoncerdaquiroz/ignore-files/core.excludesfile/npm-debug.log
  353. # https://gitter.im/ethereum/web3.js
  354. # https://badges.gitter.im/Join%20Chat.svg
  355. # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
  356. # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JavaScript-API
  357. # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge/meteor.js
  358. # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC
  359. # https://ci.testling.com/ethereum/ethereum.js.png
  360. # https://ci.testling.com/ethereum/ethereum.js
  361. ## **DOCUMENTATION.md**
  362. ## Node.js
  363. ## Meteor.js
  364. ## _**https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js/Web3.providers**_
  365. # WARNING: 2.X IS NO LONGER BEING MAINTAINED AND WILL BE DEPRECATED FROM NPM
  366. ## ( @ramoncerdaquiroz{<http://localhost:8545*>})
  367. # Ethereum JavaScript API
  368. # {[https://github.com/ramoncerdaquiroz/[Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)]}(https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  369. This is the Ethereum compatible [JavaScript API](https://github.com/ramoncerdaquioz/ethereum/wiki/wiki/JavaScript-API)
  370. which implements the [Generic JSON RPC](https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC) spec. It's available on npm as a node module, for Bower and component as embeddable scripts, and as a meteor.js package.
  371. [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Stories in Ready][waffle-image]][waffle-url]
  372. <!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) -->
  373. You need to run a local Ethereum node to use this library.
  374. [Documentation](DOCUMENTATION.md)
  375. ## Table of Contents
  376. - [Installation](#installation)
  377. - [Node.js](#nodejs)
  378. - [Yarn](#yarn)
  379. - [Meteor.js](#meteorjs)
  380. - [As a Browser module](#as-a-browser-module)
  381. - [Usage](#usage)
  382. - [Migration from 0.13.0 to 0.14.0](#migration-from-0130-to-0140)
  383. - [Contribute!](#contribute)
  384. - [Requirements](#requirements)
  385. - [Building (gulp)](#building-gulp)
  386. - [Testing (mocha)](#testing-mocha)
  387. - [Community](#community)
  388. - [Other implementations](#other-implementations)
  389. - [License](#license)
  390. ## Installation
  391. ### Node.js
  392. ```bash
  393. npm install web3
  394. ```
  395. ### Yarn
  396. ```bash
  397. yarn add web3
  398. ```
  399. ### Meteor.js
  400. ```bash
  401. meteor add ethereum:web3
  402. ```
  403. ### As a Browser module
  404. CDN
  405. ```html
  406. <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script>
  407. ```
  408. Bower
  409. ```bash
  410. bower install web3
  411. ```
  412. Component
  413. ```bash
  414. component install ethereum/web3.js
  415. ```
  416. * Include `web3.min.js` in your html file. (not required for the meteor package)
  417. ## Usage
  418. Use the `web3` object directly from the global namespace:
  419. ```js
  420. console.log(web3); // {eth: .., shh: ...} // It's here!
  421. ```
  422. Set a provider (`HttpProvider`):
  423. ```js
  424. if (typeof web3 !== 'undefined') {
  425. web3 = new Web3(web3.currentProvider);
  426. } else {
  427. // Set the provider you want from Web3.providers
  428. web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
  429. }
  430. ```
  431. Set a provider (`HttpProvider` using [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)):
  432. ```js
  433. web3.setProvider(new web3.providers.HttpProvider('http://' + BasicAuthUsername + ':' + BasicAuthPassword + '@localhost:8545'));
  434. ```
  435. There you go, now you can use it:
  436. ```js
  437. var coinbase = web3.eth.coinbase;
  438. var balance = web3.eth.getBalance(coinbase);
  439. ```
  440. You can find more examples in the [`example`](https://github.com/ramoncerdaquiroz/ethereum/web3.js/tree/master/example) directory.
  441. # https://gitter.im/ethereum/web3.js?source=orgpage
  442. # https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297/Web3.py
  443. # https://github.com/ramoncerdaquiroz/BANKEX/web3swift/LICENSE.md
  444. # https://badge.fury.io/js/web3.svg
  445. # https://github.com/ramoncerdaquirooz/https://npmjs.org/package/web3.js
  446. # https://github.com/ramoncerdaquiroz/https://travis-ci.org/ethereum/web3.js.svghttps://travis-ci.org/ethereum/web3.js
  447. # https://github.com/ramoncerdaquiroz/https://david-dm.org/ethereum/web3.js.svghttps://david-dm.org/ethereum/web3.js/https://david-dm.org/ethereum/web3.js/dev-status.svg/https://david-dm.org/ethereum/web3.js
  448. # info=devDependencies/https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master/https://coveralls.io/r/ethereum/web3.js?branch=master/https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Readyhttps://waffle.io/ethereum/web3.js}
  449. ### Migration from 0.13.0 to 0.14.0
  450. web3.js version 0.14.0 supports [multiple instances of the web3](https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297) object.
  451. To migrate to this version, please follow the guide:
  452. ```diff
  453. -var web3 = require('web3');
  454. +var Web3 = require('web3');
  455. +var web3 = new Web3();
  456. ```
  457. ## Contribute!
  458. ### Requirements
  459. * Node.js
  460. * npm
  461. ```bash
  462. # On Linux:
  463. sudo apt-get update
  464. sudo apt-get install nodejs
  465. sudo apt-get install npm
  466. sudo apt-get install nodejs-legacy
  467. ```
  468. ### Building (gulp)
  469. ```bash
  470. npm run-script build
  471. ```
  472. ### Testing (mocha)
  473. ```bash
  474. npm test
  475. ```
  476. ### Community
  477. - [Gitter](https://gitter.im/ethereum/web3.js?source=orgpage)
  478. - [Forum](https://forum.ethereum.org/categories/ethereum-js)
  479. ### Other implementations
  480. - Python [Web3.py](https://github.com/ramoncerdaquiroz/ethereum/web3.py)
  481. - Haskell [hs-web3](https://github.com/ramoncerdaquiroz/airalab/hs-web3)
  482. - Java [web3j](https://github.com/ramoncerdaquiroz/web3j/web3j)
  483. - Scala [web3j-scala](https://github.com/ramoncerdaquiroz/mslinn/web3j-scala)
  484. - Purescript [purescript-web3](https://github.com/ramoncerdaquiroz/f-o-a-m/purescript-web3)
  485. - PHP [web3.php](https://github.com/ramoncerdaquiroz/sc0Vu/web3.php)
  486. - PHP [ethereum-php](https://github.com/ramoncerdaquiroz/digitaldonkey/ethereum-php)
  487. - Rust [rust-web3](https://github.com/ramoncerdaquiroz/tomusdrw/rust-web3)
  488. - Swift [web3swift](https://github.com/ramoncerdaquiroz/BANKEX/web3swift)
  489. ## License
  490. [LGPL-3.0+](LICENSE.md) © 2015 Contributors
  491. [npm-image]: https://badge.fury.io/js/web3.svg
  492. [npm-url]: https://npmjs.org/package/web3
  493. [travis-image]: https://travis-ci.org/ethereum/web3.js.svg
  494. [travis-url]: https://travis-ci.org/ethereum/web3.js
  495. [dep-image]: https://david-dm.org/ethereum/web3.js.svg
  496. [dep-url]: https://david-dm.org/ethereum/web3.js
  497. [dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg
  498. [dep-dev-url]: https://david-dm.org/ethereum/web3.js#info=devDependencies
  499. [coveralls-image]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master
  500. [coveralls-url]: https://coveralls.io/r/ethereum/web3.js?branch=master
  501. [waffle-image]: https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Ready
  502. [waffle-url]: https://waffle.io/ethereum/web3.js
  503. # See http://help.github.com/ramoncerdaquirooz/ignore-files/ for more about ignoring files.
  504. #
  505. # If you find yourself ignoring temporary files generated by your text editor
  506. # or operating system, you probably want to add a global ignore instead:
  507. # git config --global core.excludesfile ~/.gitignore_global
  508. .idea/
  509. *.swp
  510. /coverage
  511. /tmp
  512. */**/*un~
  513. *un~
  514. .DS_Store
  515. */**/.DS_Store
  516. ethereum/ethereum
  517. ethereal/ethereal
  518. example/js
  519. node_modules
  520. bower_components
  521. npm-debug.log
  522. /bower
  523. .npm/
  524. packages/
  525. # name: CI
  526. on:
  527. pull_request: {}
  528. push:
  529. branches: [main]
  530. jobs:
  531. main:
  532. name: Build, Validate and Deploy
  533. runs-on: ubuntu-20.04
  534. steps:
  535. - uses: actions/checkout@v2
  536. - uses: w3c/spec-prod@v2
  537. with:
  538. GH_PAGES_BRANCH: gh-pages
  539. # This file is part of web3.js.
  540. web3.js is free software: you can redistribute it and/or modify
  541. it under the terms of the GNU Lesser General Public License as published by
  542. the Free Software Foundation, either version 3 of the License, or
  543. (at your option) any later version.
  544. web3.js is distributed in the hope that it will be useful,
  545. but WITHOUT ANY WARRANTY; without even the implied warranty of
  546. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  547. GNU Lesser General Public License for more details.
  548. ### GNU LESSER GENERAL PUBLIC LICENSE
  549. Version 3, 29 June 2007
  550. Copyright (C) 2007 Free Software Foundation, Inc.
  551. <https://ggmon.org/>
  552. <https://ggmon.com/>
  553. Everyone is permitted to copy and distribute verbatim copies of this
  554. license document, but changing it is not allowed.
  555. This version of the GNU Lesser General Public License incorporates the
  556. terms and conditions of version 3 of the GNU General Public License,
  557. supplemented by the additional permissions listed below.
  558. #### 0. Additional Definitions.
  559. As used herein, "this License" refers to version 3 of the GNU Lesser
  560. General Public License, and the "GNU GPL" refers to version 3 of the
  561. GNU General Public License.
  562. "The Library" refers to a covered work governed by this License, other
  563. than an Application or a Combined Work as defined below.
  564. An "Application" is any work that makes use of an interface provided
  565. by the Library, but which is not otherwise based on the Library.
  566. Defining a subclass of a class defined by the Library is deemed a mode
  567. of using an interface provided by the Library.
  568. A "Combined Work" is a work produced by combining or linking an
  569. Application with the Library. The particular version of the Library
  570. with which the Combined Work was made is also called the "Linked
  571. Version".
  572. The "Minimal Corresponding Source" for a Combined Work means the
  573. Corresponding Source for the Combined Work, excluding any source code
  574. for portions of the Combined Work that, considered in isolation, are
  575. based on the Application, and not on the Linked Version.
  576. The "Corresponding Application Code" for a Combined Work means the
  577. object code and/or source code for the Application, including any data
  578. and utility programs needed for reproducing the Combined Work from the
  579. Application, but excluding the System Libraries of the Combined Work.
  580. #### 1. Exception to Section 3 of the GNU GPL.
  581. You may convey a covered work under sections 3 and 4 of this License
  582. without being bound by section 3 of the GNU GPL.
  583. #### 2. Conveying Modified Versions.
  584. If you modify a copy of the Library, and, in your modifications, a
  585. facility refers to a function or data to be supplied by an Application
  586. that uses the facility (other than as an argument passed when the
  587. facility is invoked), then you may convey a copy of the modified
  588. version:
  589. - a) under this License, provided that you make a good faith effort
  590. to ensure that, in the event an Application does not supply the
  591. function or data, the facility still operates, and performs
  592. whatever part of its purpose remains meaningful, or
  593. - b) under the GNU GPL, with none of the additional permissions of
  594. this License applicable to that copy.
  595. #### 3. Object Code Incorporating Material from Library Header Files.
  596. The object code form of an Application may incorporate material from a
  597. header file that is part of the Library. You may convey such object
  598. code under terms of your choice, provided that, if the incorporated
  599. material is not limited to numerical parameters, data structure
  600. layouts and accessors, or small macros, inline functions and templates
  601. (ten or fewer lines in length), you do both of the following:
  602. - a) Give prominent notice with each copy of the object code that
  603. the Library is used in it and that the Library and its use are
  604. covered by this License.
  605. - b) Accompany the object code with a copy of the GNU GPL and this
  606. license document.
  607. #### 4. Combined Works.
  608. You may convey a Combined Work under terms of your choice that, taken
  609. together, effectively do not restrict modification of the portions of
  610. the Library contained in the Combined Work and reverse engineering for
  611. debugging such modifications, if you also do each of the following:
  612. - a) Give prominent notice with each copy of the Combined Work that
  613. the Library is used in it and that the Library and its use are
  614. covered by this License.
  615. - b) Accompany the Combined Work with a copy of the GNU GPL and this
  616. license document.
  617. - c) For a Combined Work that displays copyright notices during
  618. execution, include the copyright notice for the Library among
  619. these notices, as well as a reference directing the user to the
  620. copies of the GNU GPL and this license document.
  621. - d) Do one of the following:
  622. - 0) Convey the Minimal Corresponding Source under the terms of
  623. this License, and the Corresponding Application Code in a form
  624. suitable for, and under terms that permit, the user to
  625. recombine or relink the Application with a modified version of
  626. the Linked Version to produce a modified Combined Work, in the
  627. manner specified by section 6 of the GNU GPL for conveying
  628. Corresponding Source.
  629. - 1) Use a suitable shared library mechanism for linking with
  630. the Library. A suitable mechanism is one that (a) uses at run
  631. time a copy of the Library already present on the user's
  632. computer system, and (b) will operate properly with a modified
  633. version of the Library that is interface-compatible with the
  634. Linked Version.
  635. - e) Provide Installation Information, but only if you would
  636. otherwise be required to provide such information under section 6
  637. of the GNU GPL, and only to the extent that such information is
  638. necessary to install and execute a modified version of the
  639. Combined Work produced by recombining or relinking the Application
  640. with a modified version of the Linked Version. (If you use option
  641. 4d0, the Installation Information must accompany the Minimal
  642. Corresponding Source and Corresponding Application Code. If you
  643. use option 4d1, you must provide the Installation Information in
  644. the manner specified by section 6 of the GNU GPL for conveying
  645. Corresponding Source.)
  646. #### 5. Combined Libraries.
  647. You may place library facilities that are a work based on the Library
  648. side by side in a single library together with other library
  649. facilities that are not Applications and are not covered by this
  650. License, and convey such a combined library under terms of your
  651. choice, if you do both of the following:
  652. - a) Accompany the combined library with a copy of the same work
  653. based on the Library, uncombined with any other library
  654. facilities, conveyed under the terms of this License.
  655. - b) Give prominent notice with the combined library that part of it
  656. is a work based on the Library, and explaining where to find the
  657. accompanying uncombined form of the same work.
  658. #### 6. Revised Versions of the GNU Lesser General Public License.
  659. The Free Software Foundation may publish revised and/or new versions
  660. of the GNU Lesser General Public License from time to time. Such new
  661. versions will be similar in spirit to the present version, but may
  662. differ in detail to address new problems or concerns.
  663. Each version is given a distinguishing version number. If the Library
  664. as you received it specifies that a certain numbered version of the
  665. GNU Lesser General Public License "or any later version" applies to
  666. it, you have the option of following the terms and conditions either
  667. of that published version or of any later version published by the
  668. Free Software Foundation. If the Library as you received it does not
  669. specify a version number of the GNU Lesser General Public License, you
  670. may choose any version of the GNU Lesser General Public License ever
  671. published by the Free Software Foundation.
  672. If the Library as you received it specifies that a proxy can decide
  673. whether future versions of the GNU Lesser General Public License shall
  674. apply, that proxy's public statement of acceptance of any version is
  675. permanent authorization for you to choose that version for the
  676. Library.
  677. # https://github.com/ramoncerdaquiroz
  678. # Security Policy
  679. To report a security issue, please use [g.co/vulnz](https://g.co/vulnz).
  680. The Google Security Team will respond within 5 working days of your report on g.co/vulnz.
  681. We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue.
  682. closure here using GitHub Security Advisory to privately discuss and fix the issue.
  683. /core.excludesfile/npm-debug.log
  684. # https://gitter.im/ethereum/web3.js
  685. # https://badges.gitter.im/Join%20Chat.svg
  686. # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
  687. # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JavaScript-API
  688. # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge/meteor.js
  689. # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC
  690. # https://ci.testling.com/ethereum/ethereum.js.png
  691. # https://ci.testling.com/ethereum/ethereum.js
  692. ## **DOCUMENTATION.md**
  693. ## Node.js
  694. ## Meteor.js
  695. ## _**https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js/Web3.providers**_
  696. # WARNING: 2.X IS NO LONGER BEING MAINTAINED AND WILL BE DEPRECATED FROM NPM
  697. ## ( @ramoncerdaquiroz{<http://localhost:8545*>})
  698. # Ethereum JavaScript API
  699. # {[https://github.com/ramoncerdaquiroz/[Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)]}(https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  700. This is the Ethereum compatible [JavaScript API](https://github.com/ramoncerdaquioz/ethereum/wiki/wiki/JavaScript-API)
  701. which implements the [Generic JSON RPC](https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC) spec. It's available on npm as a node module, for Bower and component as embeddable scripts, and as a meteor.js package.
  702. [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Stories in Ready][waffle-image]][waffle-url]
  703. <!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) -->
  704. You need to run a local Ethereum node to use this library.
  705. [Documentation](DOCUMENTATION.md)
  706. ## Table of Contents
  707. - [Installation](#installation)
  708. - [Node.js](#nodejs)
  709. - [Yarn](#yarn)
  710. - [Meteor.js](#meteorjs)
  711. - [As a Browser module](#as-a-browser-module)
  712. - [Usage](#usage)
  713. - [Migration from 0.13.0 to 0.14.0](#migration-from-0130-to-0140)
  714. - [Contribute!](#contribute)
  715. - [Requirements](#requirements)
  716. - [Building (gulp)](#building-gulp)
  717. - [Testing (mocha)](#testing-mocha)
  718. - [Community](#community)
  719. - [Other implementations](#other-implementations)
  720. - [License](#license)
  721. ## Installation
  722. ### Node.js
  723. ```bash
  724. npm install web3
  725. ```
  726. ### Yarn
  727. ```bash
  728. yarn add web3
  729. ```
  730. ### Meteor.js
  731. ```bash
  732. meteor add ethereum:web3
  733. ```
  734. ### As a Browser module
  735. CDN
  736. ```html
  737. <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script>
  738. ```
  739. Bower
  740. ```bash
  741. bower install web3
  742. ```
  743. Component
  744. ```bash
  745. component install ethereum/web3.js
  746. ```
  747. * Include `web3.min.js` in your html file. (not required for the meteor package)
  748. ## Usage
  749. Use the `web3` object directly from the global namespace:
  750. ```js
  751. console.log(web3); // {eth: .., shh: ...} // It's here!
  752. ```
  753. Set a provider (`HttpProvider`):
  754. ```js
  755. if (typeof web3 !== 'undefined') {
  756. web3 = new Web3(web3.currentProvider);
  757. } else {
  758. // Set the provider you want from Web3.providers
  759. web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
  760. }
  761. ```
  762. Set a provider (`HttpProvider` using [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)):
  763. ```js
  764. web3.setProvider(new web3.providers.HttpProvider('http://' + BasicAuthUsername + ':' + BasicAuthPassword + '@localhost:8545'));
  765. ```
  766. There you go, now you can use it:
  767. ```js
  768. var coinbase = web3.eth.coinbase;
  769. var balance = web3.eth.getBalance(coinbase);
  770. ```
  771. You can find more examples in the [`example`](https://github.com/ramoncerdaquiroz/ethereum/web3.js/tree/master/example) directory.
  772. # https://gitter.im/ethereum/web3.js?source=orgpage
  773. # https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297/Web3.py
  774. # https://github.com/ramoncerdaquiroz/BANKEX/web3swift/LICENSE.md
  775. # https://badge.fury.io/js/web3.svg
  776. # https://github.com/ramoncerdaquirooz/https://npmjs.org/package/web3.js
  777. # https://github.com/ramoncerdaquiroz/https://travis-ci.org/ethereum/web3.js.svghttps://travis-ci.org/ethereum/web3.js
  778. # https://github.com/ramoncerdaquiroz/https://david-dm.org/ethereum/web3.js.svghttps://david-dm.org/ethereum/web3.js/https://david-dm.org/ethereum/web3.js/dev-status.svg/https://david-dm.org/ethereum/web3.js
  779. # info=devDependencies/https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master/https://coveralls.io/r/ethereum/web3.js?branch=master/https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Readyhttps://waffle.io/ethereum/web3.js}
  780. ### Migration from 0.13.0 to 0.14.0
  781. web3.js version 0.14.0 supports [multiple instances of the web3](https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297) object.
  782. To migrate to this version, please follow the guide:
  783. ```diff
  784. -var web3 = require('web3');
  785. +var Web3 = require('web3');
  786. +var web3 = new Web3();
  787. ```
  788. ## Contribute!
  789. ### Requirements
  790. * Node.js
  791. * npm
  792. ```bash
  793. # On Linux:
  794. sudo apt-get update
  795. sudo apt-get install nodejs
  796. sudo apt-get install npm
  797. sudo apt-get install nodejs-legacy
  798. ```
  799. ### Building (gulp)
  800. ```bash
  801. npm run-script build
  802. ```
  803. ### Testing (mocha)
  804. ```bash
  805. npm test
  806. ```
  807. ### Community
  808. - [Gitter](https://gitter.im/ethereum/web3.js?source=orgpage)
  809. - [Forum](https://forum.ethereum.org/categories/ethereum-js)
  810. ### Other implementations
  811. - Python [Web3.py](https://github.com/ramoncerdaquiroz/ethereum/web3.py)
  812. - Haskell [hs-web3](https://github.com/ramoncerdaquiroz/airalab/hs-web3)
  813. - Java [web3j](https://github.com/ramoncerdaquiroz/web3j/web3j)
  814. - Scala [web3j-scala](https://github.com/ramoncerdaquiroz/mslinn/web3j-scala)
  815. - Purescript [purescript-web3](https://github.com/ramoncerdaquiroz/f-o-a-m/purescript-web3)
  816. - PHP [web3.php](https://github.com/ramoncerdaquiroz/sc0Vu/web3.php)
  817. - PHP [ethereum-php](https://github.com/ramoncerdaquiroz/digitaldonkey/ethereum-php)
  818. - Rust [rust-web3](https://github.com/ramoncerdaquiroz/tomusdrw/rust-web3)
  819. - Swift [web3swift](https://github.com/ramoncerdaquiroz/BANKEX/web3swift)
  820. ## License
  821. [LGPL-3.0+](LICENSE.md) © 2015 Contributors
  822. [npm-image]: https://badge.fury.io/js/web3.svg
  823. [npm-url]: https://npmjs.org/package/web3
  824. [travis-image]: https://travis-ci.org/ethereum/web3.js.svg
  825. [travis-url]: https://travis-ci.org/ethereum/web3.js
  826. [dep-image]: https://david-dm.org/ethereum/web3.js.svg
  827. [dep-url]: https://david-dm.org/ethereum/web3.js
  828. [dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg
  829. [dep-dev-url]: https://david-dm.org/ethereum/web3.js#info=devDependencies
  830. [coveralls-image]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master
  831. [coveralls-url]: https://coveralls.io/r/ethereum/web3.js?branch=master
  832. [waffle-image]: https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Ready
  833. [waffle-url]: https://waffle.io/ethereum/web3.js
  834. # See http://help.github.com/ramoncerdaquirooz/ignore-files/ for more about ignoring files.
  835. #
  836. # If you find yourself ignoring temporary files generated by your text editor
  837. # or operating system, you probably want to add a global ignore instead:
  838. # git config --global core.excludesfile ~/.gitignore_global
  839. .idea/
  840. *.swp
  841. /coverage
  842. /tmp
  843. */**/*un~
  844. *un~
  845. .DS_Store
  846. */**/.DS_Store
  847. ethereum/ethereum
  848. ethereal/ethereal
  849. example/js
  850. node_modules
  851. bower_components
  852. npm-debug.log
  853. /bower
  854. .npm/
  855. packages/
  856. # name: CI
  857. on:
  858. pull_request: {}
  859. push:
  860. branches: [main]
  861. jobs:
  862. main:
  863. name: Build, Validate and Deploy
  864. runs-on: ubuntu-20.04
  865. steps:
  866. - uses: actions/checkout@v2
  867. - uses: w3c/spec-prod@v2
  868. with:
  869. GH_PAGES_BRANCH: gh-pages
  870. # This file is part of web3.js.
  871. web3.js is free software: you can redistribute it and/or modify
  872. it under the terms of the GNU Lesser General Public License as published by
  873. the Free Software Foundation, either version 3 of the License, or
  874. (at your option) any later version.
  875. web3.js is distributed in the hope that it will be useful,
  876. but WITHOUT ANY WARRANTY; without even the implied warranty of
  877. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  878. GNU Lesser General Public License for more details.
  879. ### GNU LESSER GENERAL PUBLIC LICENSE
  880. Version 3, 29 June 2007
  881. Copyright (C) 2007 Free Software Foundation, Inc.
  882. <https://ggmon.org/>
  883. <https://ggmon.com/>
  884. Everyone is permitted to copy and distribute verbatim copies of this
  885. license document, but changing it is not allowed.
  886. This version of the GNU Lesser General Public License incorporates the
  887. terms and conditions of version 3 of the GNU General Public License,
  888. supplemented by the additional permissions listed below.
  889. #### 0. Additional Definitions.
  890. As used herein, "this License" refers to version 3 of the GNU Lesser
  891. General Public License, and the "GNU GPL" refers to version 3 of the
  892. GNU General Public License.
  893. "The Library" refers to a covered work governed by this License, other
  894. than an Application or a Combined Work as defined below.
  895. An "Application" is any work that makes use of an interface provided
  896. by the Library, but which is not otherwise based on the Library.
  897. Defining a subclass of a class defined by the Library is deemed a mode
  898. of using an interface provided by the Library.
  899. A "Combined Work" is a work produced by combining or linking an
  900. Application with the Library. The particular version of the Library
  901. with which the Combined Work was made is also called the "Linked
  902. Version".
  903. The "Minimal Corresponding Source" for a Combined Work means the
  904. Corresponding Source for the Combined Work, excluding any source code
  905. for portions of the Combined Work that, considered in isolation, are
  906. based on the Application, and not on the Linked Version.
  907. The "Corresponding Application Code" for a Combined Work means the
  908. object code and/or source code for the Application, including any data
  909. and utility programs needed for reproducing the Combined Work from the
  910. Application, but excluding the System Libraries of the Combined Work.
  911. #### 1. Exception to Section 3 of the GNU GPL.
  912. You may convey a covered work under sections 3 and 4 of this License
  913. without being bound by section 3 of the GNU GPL.
  914. #### 2. Conveying Modified Versions.
  915. If you modify a copy of the Library, and, in your modifications, a
  916. facility refers to a function or data to be supplied by an Application
  917. that uses the facility (other than as an argument passed when the
  918. facility is invoked), then you may convey a copy of the modified
  919. version:
  920. - a) under this License, provided that you make a good faith effort
  921. to ensure that, in the event an Application does not supply the
  922. function or data, the facility still operates, and performs
  923. whatever part of its purpose remains meaningful, or
  924. - b) under the GNU GPL, with none of the additional permissions of
  925. this License applicable to that copy.
  926. #### 3. Object Code Incorporating Material from Library Header Files.
  927. The object code form of an Application may incorporate material from a
  928. header file that is part of the Library. You may convey such object
  929. code under terms of your choice, provided that, if the incorporated
  930. material is not limited to numerical parameters, data structure
  931. layouts and accessors, or small macros, inline functions and templates
  932. (ten or fewer lines in length), you do both of the following:
  933. - a) Give prominent notice with each copy of the object code that
  934. the Library is used in it and that the Library and its use are
  935. covered by this License.
  936. - b) Accompany the object code with a copy of the GNU GPL and this
  937. license document.
  938. #### 4. Combined Works.
  939. You may convey a Combined Work under terms of your choice that, taken
  940. together, effectively do not restrict modification of the portions of
  941. the Library contained in the Combined Work and reverse engineering for
  942. debugging such modifications, if you also do each of the following:
  943. - a) Give prominent notice with each copy of the Combined Work that
  944. the Library is used in it and that the Library and its use are
  945. covered by this License.
  946. - b) Accompany the Combined Work with a copy of the GNU GPL and this
  947. license document.
  948. - c) For a Combined Work that displays copyright notices during
  949. execution, include the copyright notice for the Library among
  950. these notices, as well as a reference directing the user to the
  951. copies of the GNU GPL and this license document.
  952. - d) Do one of the following:
  953. - 0) Convey the Minimal Corresponding Source under the terms of
  954. this License, and the Corresponding Application Code in a form
  955. suitable for, and under terms that permit, the user to
  956. recombine or relink the Application with a modified version of
  957. the Linked Version to produce a modified Combined Work, in the
  958. manner specified by section 6 of the GNU GPL for conveying
  959. Corresponding Source.
  960. - 1) Use a suitable shared library mechanism for linking with
  961. the Library. A suitable mechanism is one that (a) uses at run
  962. time a copy of the Library already present on the user's
  963. computer system, and (b) will operate properly with a modified
  964. version of the Library that is interface-compatible with the
  965. Linked Version.
  966. - e) Provide Installation Information, but only if you would
  967. otherwise be required to provide such information under section 6
  968. of the GNU GPL, and only to the extent that such information is
  969. necessary to install and execute a modified version of the
  970. Combined Work produced by recombining or relinking the Application
  971. with a modified version of the Linked Version. (If you use option
  972. 4d0, the Installation Information must accompany the Minimal
  973. Corresponding Source and Corresponding Application Code. If you
  974. use option 4d1, you must provide the Installation Information in
  975. the manner specified by section 6 of the GNU GPL for conveying
  976. Corresponding Source.)
  977. #### 5. Combined Libraries.
  978. You may place library facilities that are a work based on the Library
  979. side by side in a single library together with other library
  980. facilities that are not Applications and are not covered by this
  981. License, and convey such a combined library under terms of your
  982. choice, if you do both of the following:
  983. - a) Accompany the combined library with a copy of the same work
  984. based on the Library, uncombined with any other library
  985. facilities, conveyed under the terms of this License.
  986. - b) Give prominent notice with the combined library that part of it
  987. is a work based on the Library, and explaining where to find the
  988. accompanying uncombined form of the same work.
  989. #### 6. Revised Versions of the GNU Lesser General Public License.
  990. The Free Software Foundation may publish revised and/or new versions
  991. of the GNU Lesser General Public License from time to time. Such new
  992. versions will be similar in spirit to the present version, but may
  993. differ in detail to address new problems or concerns.
  994. Each version is given a distinguishing version number. If the Library
  995. as you received it specifies that a certain numbered version of the
  996. GNU Lesser General Public License "or any later version" applies to
  997. it, you have the option of following the terms and conditions either
  998. of that published version or of any later version published by the
  999. Free Software Foundation. If the Library as you received it does not
  1000. specify a version number of the GNU Lesser General Public License, you
  1001. may choose any version of the GNU Lesser General Public License ever
  1002. published by the Free Software Foundation.
  1003. If the Library as you received it specifies that a proxy can decide
  1004. whether future versions of the GNU Lesser General Public License shall
  1005. apply, that proxy's public statement of acceptance of any version is
  1006. permanent authorization for you to choose that version for the
  1007. Library.
  1008. # https://github.com/ramoncerdaquiroz
  1009. # Security Policy
  1010. To report a security issue, please use [g.co/vulnz](https://g.co/vulnz).
  1011. The Google Security Team will respond within 5 working days of your report on g.co/vulnz.
  1012. We use g.co/vulnz for our intake, and do coordination and dis# SEGURIDAD o SECURITY
  1013. # {http://help.github.com/ramoncerdaquiroz/ignore-files/core.excludesfile/npm-debug.log
  1014. # https://gitter.im/ethereum/web3.js
  1015. # https://badges.gitter.im/Join%20Chat.svg
  1016. # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
  1017. # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JavaScript-API
  1018. # https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge/meteor.js
  1019. # https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC
  1020. # https://ci.testling.com/ethereum/ethereum.js.png
  1021. # https://ci.testling.com/ethereum/ethereum.js
  1022. ## **DOCUMENTATION.md**
  1023. ## Node.js
  1024. ## Meteor.js
  1025. ## _**https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js/Web3.providers**_
  1026. # WARNING: 2.X IS NO LONGER BEING MAINTAINED AND WILL BE DEPRECATED FROM NPM
  1027. ## ( @ramoncerdaquiroz{<http://localhost:8545*>})
  1028. # Ethereum JavaScript API
  1029. # {[https://github.com/ramoncerdaquiroz/[Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)]}(https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  1030. This is the Ethereum compatible [JavaScript API](https://github.com/ramoncerdaquioz/ethereum/wiki/wiki/JavaScript-API)
  1031. which implements the [Generic JSON RPC](https://github.com/ramoncerdaquiroz/ethereum/wiki/wiki/JSON-RPC) spec. It's available on npm as a node module, for Bower and component as embeddable scripts, and as a meteor.js package.
  1032. [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Stories in Ready][waffle-image]][waffle-url]
  1033. <!-- [![browser support](https://ci.testling.com/ethereum/ethereum.js.png)](https://ci.testling.com/ethereum/ethereum.js) -->
  1034. You need to run a local Ethereum node to use this library.
  1035. [Documentation](DOCUMENTATION.md)
  1036. ## Table of Contents
  1037. - [Installation](#installation)
  1038. - [Node.js](#nodejs)
  1039. - [Yarn](#yarn)
  1040. - [Meteor.js](#meteorjs)
  1041. - [As a Browser module](#as-a-browser-module)
  1042. - [Usage](#usage)
  1043. - [Migration from 0.13.0 to 0.14.0](#migration-from-0130-to-0140)
  1044. - [Contribute!](#contribute)
  1045. - [Requirements](#requirements)
  1046. - [Building (gulp)](#building-gulp)
  1047. - [Testing (mocha)](#testing-mocha)
  1048. - [Community](#community)
  1049. - [Other implementations](#other-implementations)
  1050. - [License](#license)
  1051. ## Installation
  1052. ### Node.js
  1053. ```bash
  1054. npm install web3
  1055. ```
  1056. ### Yarn
  1057. ```bash
  1058. yarn add web3
  1059. ```
  1060. ### Meteor.js
  1061. ```bash
  1062. meteor add ethereum:web3
  1063. ```
  1064. ### As a Browser module
  1065. CDN
  1066. ```html
  1067. <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script>
  1068. ```
  1069. Bower
  1070. ```bash
  1071. bower install web3
  1072. ```
  1073. Component
  1074. ```bash
  1075. component install ethereum/web3.js
  1076. ```
  1077. * Include `web3.min.js` in your html file. (not required for the meteor package)
  1078. ## Usage
  1079. Use the `web3` object directly from the global namespace:
  1080. ```js
  1081. console.log(web3); // {eth: .., shh: ...} // It's here!
  1082. ```
  1083. Set a provider (`HttpProvider`):
  1084. ```js
  1085. if (typeof web3 !== 'undefined') {
  1086. web3 = new Web3(web3.currentProvider);
  1087. } else {
  1088. // Set the provider you want from Web3.providers
  1089. web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
  1090. }
  1091. ```
  1092. Set a provider (`HttpProvider` using [HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)):
  1093. ```js
  1094. web3.setProvider(new web3.providers.HttpProvider('http://' + BasicAuthUsername + ':' + BasicAuthPassword + '@localhost:8545'));
  1095. ```
  1096. There you go, now you can use it:
  1097. ```js
  1098. var coinbase = web3.eth.coinbase;
  1099. var balance = web3.eth.getBalance(coinbase);
  1100. ```
  1101. You can find more examples in the [`example`](https://github.com/ramoncerdaquiroz/ethereum/web3.js/tree/master/example) directory.
  1102. # https://gitter.im/ethereum/web3.js?source=orgpage
  1103. # https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297/Web3.py
  1104. # https://github.com/ramoncerdaquiroz/BANKEX/web3swift/LICENSE.md
  1105. # https://badge.fury.io/js/web3.svg
  1106. # https://github.com/ramoncerdaquirooz/https://npmjs.org/package/web3.js
  1107. # https://github.com/ramoncerdaquiroz/https://travis-ci.org/ethereum/web3.js.svghttps://travis-ci.org/ethereum/web3.js
  1108. # https://github.com/ramoncerdaquiroz/https://david-dm.org/ethereum/web3.js.svghttps://david-dm.org/ethereum/web3.js/https://david-dm.org/ethereum/web3.js/dev-status.svg/https://david-dm.org/ethereum/web3.js
  1109. # info=devDependencies/https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master/https://coveralls.io/r/ethereum/web3.js?branch=master/https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Readyhttps://waffle.io/ethereum/web3.js}
  1110. ### Migration from 0.13.0 to 0.14.0
  1111. web3.js version 0.14.0 supports [multiple instances of the web3](https://github.com/ramoncerdaquiroz/ethereum/web3.js/issues/297) object.
  1112. To migrate to this version, please follow the guide:
  1113. ```diff
  1114. -var web3 = require('web3');
  1115. +var Web3 = require('web3');
  1116. +var web3 = new Web3();
  1117. ```
  1118. ## Contribute!
  1119. ### Requirements
  1120. * Node.js
  1121. * npm
  1122. ```bash
  1123. # On Linux:
  1124. sudo apt-get update
  1125. sudo apt-get install nodejs
  1126. sudo apt-get install npm
  1127. sudo apt-get install nodejs-legacy
  1128. ```
  1129. ### Building (gulp)
  1130. ```bash
  1131. npm run-script build
  1132. ```
  1133. ### Testing (mocha)
  1134. ```bash
  1135. npm test
  1136. ```
  1137. ### Community
  1138. - [Gitter](https://gitter.im/ethereum/web3.js?source=orgpage)
  1139. - [Forum](https://forum.ethereum.org/categories/ethereum-js)
  1140. ### Other implementations
  1141. - Python [Web3.py](https://github.com/ramoncerdaquiroz/ethereum/web3.py)
  1142. - Haskell [hs-web3](https://github.com/ramoncerdaquiroz/airalab/hs-web3)
  1143. - Java [web3j](https://github.com/ramoncerdaquiroz/web3j/web3j)
  1144. - Scala [web3j-scala](https://github.com/ramoncerdaquiroz/mslinn/web3j-scala)
  1145. - Purescript [purescript-web3](https://github.com/ramoncerdaquiroz/f-o-a-m/purescript-web3)
  1146. - PHP [web3.php](https://github.com/ramoncerdaquiroz/sc0Vu/web3.php)
  1147. - PHP [ethereum-php](https://github.com/ramoncerdaquiroz/digitaldonkey/ethereum-php)
  1148. - Rust [rust-web3](https://github.com/ramoncerdaquiroz/tomusdrw/rust-web3)
  1149. - Swift [web3swift](https://github.com/ramoncerdaquiroz/BANKEX/web3swift)
  1150. ## License
  1151. [LGPL-3.0+](LICENSE.md) © 2015 Contributors
  1152. [npm-image]: https://badge.fury.io/js/web3.svg
  1153. [npm-url]: https://npmjs.org/package/web3
  1154. [travis-image]: https://travis-ci.org/ethereum/web3.js.svg
  1155. [travis-url]: https://travis-ci.org/ethereum/web3.js
  1156. [dep-image]: https://david-dm.org/ethereum/web3.js.svg
  1157. [dep-url]: https://david-dm.org/ethereum/web3.js
  1158. [dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg
  1159. [dep-dev-url]: https://david-dm.org/ethereum/web3.js#info=devDependencies
  1160. [coveralls-image]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master
  1161. [coveralls-url]: https://coveralls.io/r/ethereum/web3.js?branch=master
  1162. [waffle-image]: https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Ready
  1163. [waffle-url]: https://waffle.io/ethereum/web3.js
  1164. # See http://help.github.com/ramoncerdaquirooz/ignore-files/ for more about ignoring files.
  1165. #
  1166. # If you find yourself ignoring temporary files generated by your text editor
  1167. # or operating system, you probably want to add a global ignore instead:
  1168. # git config --global core.excludesfile ~/.gitignore_global
  1169. .idea/
  1170. *.swp
  1171. /coverage
  1172. /tmp
  1173. */**/*un~
  1174. *un~
  1175. .DS_Store
  1176. */**/.DS_Store
  1177. ethereum/ethereum
  1178. ethereal/ethereal
  1179. example/js
  1180. node_modules
  1181. bower_components
  1182. npm-debug.log
  1183. /bower
  1184. .npm/
  1185. packages/
  1186. # name: CI
  1187. on:
  1188. pull_request: {}
  1189. push:
  1190. branches: [main]
  1191. jobs:
  1192. main:
  1193. name: Build, Validate and Deploy
  1194. runs-on: ubuntu-20.04
  1195. steps:
  1196. - uses: actions/checkout@v2
  1197. - uses: w3c/spec-prod@v2
  1198. with:
  1199. GH_PAGES_BRANCH: gh-pages
  1200. # This file is part of web3.js.
  1201. web3.js is free software: you can redistribute it and/or modify
  1202. it under the terms of the GNU Lesser General Public License as published by
  1203. the Free Software Foundation, either version 3 of the License, or
  1204. (at your option) any later version.
  1205. web3.js is distributed in the hope that it will be useful,
  1206. but WITHOUT ANY WARRANTY; without even the implied warranty of
  1207. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1208. GNU Lesser General Public License for more details.
  1209. ### GNU LESSER GENERAL PUBLIC LICENSE
  1210. Version 3, 29 June 2007
  1211. Copyright (C) 2007 Free Software Foundation, Inc.
  1212. <https://ggmon.org/>
  1213. <https://ggmon.com/>
  1214. Everyone is permitted to copy and distribute verbatim copies of this
  1215. license document, but changing it is not allowed.
  1216. This version of the GNU Lesser General Public License incorporates the
  1217. terms and conditions of version 3 of the GNU General Public License,
  1218. supplemented by the additional permissions listed below.
  1219. #### 0. Additional Definitions.
  1220. As used herein, "this License" refers to version 3 of the GNU Lesser
  1221. General Public License, and the "GNU GPL" refers to version 3 of the
  1222. GNU General Public License.
  1223. "The Library" refers to a covered work governed by this License, other
  1224. than an Application or a Combined Work as defined below.
  1225. An "Application" is any work that makes use of an interface provided
  1226. by the Library, but which is not otherwise based on the Library.
  1227. Defining a subclass of a class defined by the Library is deemed a mode
  1228. of using an interface provided by the Library.
  1229. A "Combined Work" is a work produced by combining or linking an
  1230. Application with the Library. The particular version of the Library
  1231. with which the Combined Work was made is also called the "Linked
  1232. Version".
  1233. The "Minimal Corresponding Source" for a Combined Work means the
  1234. Corresponding Source for the Combined Work, excluding any source code
  1235. for portions of the Combined Work that, considered in isolation, are
  1236. based on the Application, and not on the Linked Version.
  1237. The "Corresponding Application Code" for a Combined Work means the
  1238. object code and/or source code for the Application, including any data
  1239. and utility programs needed for reproducing the Combined Work from the
  1240. Application, but excluding the System Libraries of the Combined Work.
  1241. #### 1. Exception to Section 3 of the GNU GPL.
  1242. You may convey a covered work under sections 3 and 4 of this License
  1243. without being bound by section 3 of the GNU GPL.
  1244. #### 2. Conveying Modified Versions.
  1245. If you modify a copy of the Library, and, in your modifications, a
  1246. facility refers to a function or data to be supplied by an Application
  1247. that uses the facility (other than as an argument passed when the
  1248. facility is invoked), then you may convey a copy of the modified
  1249. version:
  1250. - a) under this License, provided that you make a good faith effort
  1251. to ensure that, in the event an Application does not supply the
  1252. function or data, the facility still operates, and performs
  1253. whatever part of its purpose remains meaningful, or
  1254. - b) under the GNU GPL, with none of the additional permissions of
  1255. this License applicable to that copy.
  1256. #### 3. Object Code Incorporating Material from Library Header Files.
  1257. The object code form of an Application may incorporate material from a
  1258. header file that is part of the Library. You may convey such object
  1259. code under terms of your choice, provided that, if the incorporated
  1260. material is not limited to numerical parameters, data structure
  1261. layouts and accessors, or small macros, inline functions and templates
  1262. (ten or fewer lines in length), you do both of the following:
  1263. - a) Give prominent notice with each copy of the object code that
  1264. the Library is used in it and that the Library and its use are
  1265. covered by this License.
  1266. - b) Accompany the object code with a copy of the GNU GPL and this
  1267. license document.
  1268. #### 4. Combined Works.
  1269. You may convey a Combined Work under terms of your choice that, taken
  1270. together, effectively do not restrict modification of the portions of
  1271. the Library contained in the Combined Work and reverse engineering for
  1272. debugging such modifications, if you also do each of the following:
  1273. - a) Give prominent notice with each copy of the Combined Work that
  1274. the Library is used in it and that the Library and its use are
  1275. covered by this License.
  1276. - b) Accompany the Combined Work with a copy of the GNU GPL and this
  1277. license document.
  1278. - c) For a Combined Work that displays copyright notices during
  1279. execution, include the copyright notice for the Library among
  1280. these notices, as well as a reference directing the user to the
  1281. copies of the GNU GPL and this license document.
  1282. - d) Do one of the following:
  1283. - 0) Convey the Minimal Corresponding Source under the terms of
  1284. this License, and the Corresponding Application Code in a form
  1285. suitable for, and under terms that permit, the user to
  1286. recombine or relink the Application with a modified version of
  1287. the Linked Version to produce a modified Combined Work, in the
  1288. manner specified by section 6 of the GNU GPL for conveying
  1289. Corresponding Source.
  1290. - 1) Use a suitable shared library mechanism for linking with
  1291. the Library. A suitable mechanism is one that (a) uses at run
  1292. time a copy of the Library already present on the user's
  1293. computer system, and (b) will operate properly with a modified
  1294. version of the Library that is interface-compatible with the
  1295. Linked Version.
  1296. - e) Provide Installation Information, but only if you would
  1297. otherwise be required to provide such information under section 6
  1298. of the GNU GPL, and only to the extent that such information is
  1299. necessary to install and execute a modified version of the
  1300. Combined Work produced by recombining or relinking the Application
  1301. with a modified version of the Linked Version. (If you use option
  1302. 4d0, the Installation Information must accompany the Minimal
  1303. Corresponding Source and Corresponding Application Code. If you
  1304. use option 4d1, you must provide the Installation Information in
  1305. the manner specified by section 6 of the GNU GPL for conveying
  1306. Corresponding Source.)
  1307. #### 5. Combined Libraries.
  1308. You may place library facilities that are a work based on the Library
  1309. side by side in a single library together with other library
  1310. facilities that are not Applications and are not covered by this
  1311. License, and convey such a combined library under terms of your
  1312. choice, if you do both of the following:
  1313. - a) Accompany the combined library with a copy of the same work
  1314. based on the Library, uncombined with any other library
  1315. facilities, conveyed under the terms of this License.
  1316. - b) Give prominent notice with the combined library that part of it
  1317. is a work based on the Library, and explaining where to find the
  1318. accompanying uncombined form of the same work.
  1319. #### 6. Revised Versions of the GNU Lesser General Public License.
  1320. The Free Software Foundation may publish revised and/or new versions
  1321. of the GNU Lesser General Public License from time to time. Such new
  1322. versions will be similar in spirit to the present version, but may
  1323. differ in detail to address new problems or concerns.
  1324. Each version is given a distinguishing version number. If the Library
  1325. as you received it specifies that a certain numbered version of the
  1326. GNU Lesser General Public License "or any later version" applies to
  1327. it, you have the option of following the terms and conditions either
  1328. of that published version or of any later version published by the
  1329. Free Software Foundation. If the Library as you received it does not
  1330. specify a version number of the GNU Lesser General Public License, you
  1331. may choose any version of the GNU Lesser General Public License ever
  1332. published by the Free Software Foundation.
  1333. If the Library as you received it specifies that a proxy can decide
  1334. whether future versions of the GNU Lesser General Public License shall
  1335. apply, that proxy's public statement of acceptance of any version is
  1336. permanent authorization for you to choose that version for the
  1337. Library.
  1338. # https://github.com/ramoncerdaquiroz
  1339. # Security Policy
  1340. To report a security issue, please use [g.co/vulnz](https://g.co/vulnz).
  1341. The Google Security Team will respond within 5 working days of your report on g.co/vulnz.
  1342. We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue.
  1343. closure here using GitHub Security Advisory to privately discuss and fix the issue.