Ethereum JavaScript API
The npm package "web3" is a powerful Ethereum JavaScript API essential for developers working on blockchain-based applications, particularly those interacting with the Ethereum network. This node module serves as a collection of libraries that allow you to perform various actions like sending Ethereum transactions, interacting with smart contracts, managing accounts, and accessing blockchain data, all directly from your JavaScript applications. It supports both frontend and backend JavaScript applications, making it highly versatile for web development. The "web3" package abstracts many low-level details and provides an easier, more manageable approach to handle blockchain operations, ensuring developers can focus more on the core functionality of their applications without delving deep into the underlying blockchain technology.
To begin using "web3" in your projects, you can simply run the command "npm install web3" in your terminal. This command installs the web3 library, integrating seamlessly with your existing JavaScript environment. Once installed, it allows you to instantly start building applications that require interaction with Ethereum blockchain. The package is regularly updated to support the latest versions of Ethereum protocols and methods, ensuring your applications remain compatible and secure. The "npm install web3" command is your gateway to creating decentralized applications (DApps) that can perform transactions, execute smart contracts, and interact directly with the Ethereum blockchain, enhancing the functionality and reach of your software solutions.
The benefits of using the "web3" npm package extend beyond simple blockchain interaction. It includes utilities for cryptographic functions, wallet support, and full integration with Ethereum's smart contracts. Developers can create more secure, decentralized applications that leverage the robust architecture of Ethereum, providing end-users with transparent, trustless interactions. The package's comprehensive documentation and active community support further ease the development process, making "web3" an indispensable tool for developers looking to tap into the rapidly growing field of blockchain technology.
Core dependencies of this npm package and its dev dependencies.
webpack-bundle-analyzer, @cypress/webpack-preprocessor, @droppedcode/typedoc-plugin-relative-includes, @openzeppelin/contracts, @types/node, @types/webpack, assert, buffer, bufferutil, clean-webpack-plugin, concurrently, cypress-jest-adapter, declaration-bundler-webpack-plugin, eslint, eslint-import-resolver-typescript, eslint-plugin-require-extensions, http-browserify, https-browserify, husky, jest, lerna, npm-auth-to-token, prettier, prettier-plugin-solidity, process, solc, ts-jest, ts-loader, ts-node, typedoc, typedoc-monorepo-link-types, typedoc-plugin-extras, typedoc-plugin-markdown, typedoc-plugin-mdn-links, typedoc-plugin-merge-modules, typescript, utf-8-validate, web3-hardhat-plugin, webpack, webpack-cli
A README file for the web3 code repository. View Code
Web3.js is a TypeScript implementation of the Ethereum JSON RPC API and related tooling maintained by ChainSafe Systems.
You can install the package either using NPM or using Yarn
If you wanna checkout latest bugfix or feature, use
npm install web3@dev
npm install web3
yarn add web3
Package | Version | License | Docs | Description |
---|---|---|---|---|
web3 | :rotating_light: Entire Web3.js offering (includes all packages) | |||
web3-core | Core functions for web3.js packages | |||
web3-errors | Errors Objects | |||
web3-eth | Modules to interact with the Ethereum blockchain and smart contracts | |||
web3-eth-abi | Functions for encoding and decoding EVM in/output | |||
web3-eth-accounts | Functions for managing Ethereum accounts and signing | |||
web3-eth-contract | The contract package contained in web3-eth | |||
web3-eth-ens | Functions for interacting with the Ethereum Name Service | |||
web3-eth-iban | Functionality for converting Ethereum addressed to IBAN addressed and vice versa | |||
web3-eth-personal | Module to interact with the Ethereum blockchain accounts stored in the node | |||
web3-net | Functions to interact with an Ethereum node's network properties | |||
web3-providers-http | Web3.js provider for the HTTP protocol | |||
web3-providers-ipc | Web3.js provider for IPC | |||
web3-providers-ws | Web3.js provider for the Websocket protocol | |||
web3-rpc-methods | RPC Methods | |||
web3-types | Shared useable types | |||
web3-utils | Useful utility functions for Dapp developers | |||
web3-validator | Utilities for validating objects |
Script | Description |
---|---|
clean | Uses rimraf to remove dist/ |
build | Uses tsc to build all packages |
lint | Uses eslint to lint all packages |
lint:fix | Uses eslint to check and fix any warnings |
format | Uses prettier to format the code |
test | Uses jest to run unit tests in each package |
test:integration | Uses jest to run tests under /test/integration in each package |
test:unit | Uses jest to run tests under /test/unit in each package |
test:manual:long-connection-ws | Runs manual tests for keeping a long WebSocket connection |
test:manual | Runs manual tests under test/manual in the web3 package |