Skip to main content

Getting Celo RPC


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 useCeloMainnet() {

const celoMainnet = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable
chainIds: 'CELO',
});

const celoBlockResponse = await celoMainnet.sendRelay({
method: "eth_blockNumber",
params: [],
});

console.log(celoBlockResponse);
}

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

Output 📤

To learn more about our SDK visit the Getting Started guide