Skip to main content

Getting Lava RPC

Public RPC

Lava offers self-served RPC as well as ⚠️ Use our Official Endpoints!

API Reference

curl -X GET -H "Content-Type: application/json" https://g.w.lavanet.xyz:443/gateway/lav1/rest/3dc655f970c930f1d3e78ee71beece18/cosmos/base/tendermint/v1beta1/blocks/latest

Gateway

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



SDK

Input 📥

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

async function uselavaMainnet() {
const lavaMainnet = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable
chainIds: "LAV1",
rpcInterface: "rest",
});

const lavaBlockResponse = await lavaMainnet.sendRelay({
connectionType: "GET",
url: "/cosmos/base/tendermint/v1beta1/node_info",
});

console.log(lavaBlockResponse);
}

(async () => {
await uselavaMainnet();
})();

To learn more about our SDK visit the Getting Started guide