Skip to main content

Getting Avalanche RPC



Lava SDK is currently in Alpha. Please observe the documentation on both frontend and backend use before getting started.

Input 📥

// Install lavaSDK with the following command:
// npm i @lavanet/lava-sdk
const { LavaSDK } = require("@lavanet/lava-sdk")

async function useAvalancheMainnet() {

const avalancheMainnet = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable
chainIds: 'AVAX',

const avalancheBlockResponse = await avalancheMainnet.sendRelay({
method: "eth_blockNumber",
params: [],


(async () => {
await useAvalancheMainnet();

Output 📤

To learn more about our SDK visit the Getting Started guide


To learn more about using the Lava Gateway visit the Getting Started guide