Getting Koii RPC
Gateway
To learn more about using the Lava Gateway visit the Getting Started guide
SDK
Input 📥
- BackEnd
- FrontEnd
// Install lavaSDK with the following command:
// npm i @lavanet/lava-sdk
const { LavaSDK } = require("@lavanet/lava-sdk")
async function useKoiiTestnet() {
const koiiTestnet = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable
chainIds: 'KOIIT',
});
const koiiBlockResponse = await koiiTestnet.sendRelay({
method: "getBlockHeight",
params: [],
});
console.log(koiiBlockResponse);
}
(async () => {
await useKoiiTestnet();
})();
// Install lavaSDK with the following command:
// npm i @lavanet/lava-sdk
const { LavaSDK } = require("@lavanet/lava-sdk")
async function useKoiiTestnet() {
const koiiTestnet = await LavaSDK.create({
badge: {
badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL
projectId: "enter_your_project_id_here"
},
chainIds: 'KOIIT',
geolocation: "2"
});
const koiiBlockResponse = await koiiTestnet.sendRelay({
method: "getBlockHeight",
params: [],
});
console.log(koiiBlockResponse);
}
(async () => {
await useKoiiTestnet();
})();
Output 📤
caution
Certain features of Koii spec may not be currently enabled.
To learn more about our SDK visit the Getting Started guide