Back to Web3 Js

Web3.js

README.md

4.16.016.0 KB
Original Source
<p align="center"> </p>

Web3.js

Web3.js libraries are being sunset on March 4th, 2025. For migration guides and more details please refer to Chainsafe blog

Web3.js is a TypeScript implementation of the Ethereum JSON RPC API and related tooling maintained by ChainSafe Systems.

Installation

You can install the package either using NPM or using Yarn

If you wanna checkout latest bugfix or feature, use npm install web3@dev

Using NPM

bash
npm install web3

Using Yarn

bash
yarn add web3

Getting Started

Prerequisites

Migration Guide

Architecture Overview

PackageVersionLicenseDocsDescription
web3:rotating_light: Entire Web3.js offering (includes all packages)
web3-coreCore functions for web3.js packages
web3-errorsErrors Objects
web3-ethModules to interact with the Ethereum blockchain and smart contracts
web3-eth-abiFunctions for encoding and decoding EVM in/output
web3-eth-accountsFunctions for managing Ethereum accounts and signing
web3-eth-contractThe contract package contained in web3-eth
web3-eth-ensFunctions for interacting with the Ethereum Name Service
web3-eth-ibanFunctionality for converting Ethereum addressed to IBAN addressed and vice versa
web3-eth-personalModule to interact with the Ethereum blockchain accounts stored in the node
web3-netFunctions to interact with an Ethereum node's network properties
web3-providers-httpWeb3.js provider for the HTTP protocol
web3-providers-ipcWeb3.js provider for IPC
web3-providers-wsWeb3.js provider for the Websocket protocol
web3-rpc-methodsRPC Methods
web3-typesShared useable types
web3-utilsUseful utility functions for Dapp developers
web3-validatorUtilities for validating objects

Package.json Scripts

ScriptDescription
cleanUses rimraf to remove dist/
buildUses tsc to build all packages
lintUses eslint to lint all packages
lint:fixUses eslint to check and fix any warnings
formatUses prettier to format the code
testUses jest to run unit tests in each package
test:integrationUses jest to run tests under /test/integration in each package
test:unitUses jest to run tests under /test/unit in each package
test:manual:long-connection-wsRuns manual tests for keeping a long WebSocket connection
test:manualRuns manual tests under test/manual in the web3 package