JavaScript APIs
Prerequisites
Why use a library?
Library features
Connect to Electroneum Smart Chain nodes
Ethers example
// A Web3Provider wraps a standard Web3 provider, which is
// what MetaMask injects as window.ethereum into each page
const provider = new ethers.providers.Web3Provider(window.ethereum)
// The MetaMask plugin also allows signing transactions to
// send ether and pay to change state within the blockchain.
// For this, we need the account signer...
const signer = provider.getSigner()
Web3js example
Wallet functionality
Interact with smart contract functions
Utility functions
Available libraries
Web3.js - Ethereum JavaScript API.
Ethers.js - Complete Ethereum wallet implementation and utilities in JavaScript and TypeScript.
The Graph - A protocol for indexing Ethereum and IPFS data and querying it using GraphQL.
light.js - A high-level reactive JS library optimized for light clients.
Web3-wrapper - Typescript alternative to Web3.js.
Alchemyweb3 - Wrapper around Web3.js with automatic retries and enhanced apis.
Alchemy NFT API - API for fetching NFT data, including ownership, metadata attributes and more.
viem - TypeScript Interface for Ethereum.
Related topics
Last updated
Was this helpful?