Getting Juno RPC
Gateway
To learn more about using the Lava Gateway visit the Getting Started guide
SDK
caution
Input 📥
- BackEnd
- FrontEnd
// Install lavaSDK with the following command:
// npm i @lavanet/lava-sdk
const { LavaSDK } = require("@lavanet/lava-sdk")
async function useJunoTestnet() {
const junoTestnet = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable
chainIds: 'JUNT1',
});
const junoBlockResponse = await junoTestnet.sendRelay({
method: "block",
params: ["82500"],
});
console.log(junoBlockResponse);
}
(async () => {
await useJunoTestnet();
})();
// Install lavaSDK with the following command:
// npm i @lavanet/lava-sdk
const { LavaSDK } = require("@lavanet/lava-sdk")
async function useJunoTestnet() {
const junoTestnet = await LavaSDK.create({
badge: {
badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL
projectId: "enter_your_project_id_here"
},
chainIds: 'JUNT1',
});
const junoBlockResponse = await junoTestnet.sendRelay({
method: "block",
params: ["82500"],
});
console.log(junoBlockResponse);
}
(async () => {
await useJunoTestnet();
})();
Output 📤
To learn more about our SDK visit the Getting Started guide