Skip to main content

JavaScript – ethers.js

Overview

Ethers is a JavaScript library for interacting with Ethereum and the ecosystem that's been built on it, including first class support for Pocket Network.

Resources

Documentation

Installation Guide

Basic Usage

import { ethers } from "ethers"

const POCKET_URL = "https://<CHAIN_PREFIX>.rpc.grove.city/v1/<APP_ID>"

const provider = new ethers.providers.JsonRpcProvider(POCKET_URL)

const blockNumber = await provider.getBlockNumber()

console.log(blockNumber)