Skip to main content

Getting Agoric RPC

Agoric ipRPC πŸͺ™β€‹

LavaπŸŒ‹ offers incentivized public RPC for Agoric. Developers can get free, public endpoints for all.

Mainnet πŸŒβ€‹

Service πŸ”ŒURL πŸ”—
🟒 resthttps://agr.rest.lava.build
🟒 grpchttps://agr.grpc.lava.build
🟒 tendermintrpchttps://agr.tendermint.lava.build

Testnet πŸ§ͺ​

Service πŸ”ŒURL πŸ”—
🟒 resthttps://agrt.rest.lava.build
🟒 grpchttps://agrt.grpc.lava.build
🟒 tendermintrpchttps://agrt.tendermint.lava.build

API Reference​

curl -X GET -H "Content-Type: application/json" https://g.w.lavanet.xyz:443/gateway/agoric/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 useAgoricMainnet() {
const agoricMainnet = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable
chainIds: "AGOR",
});

const agoricBlockResponse = await agoricMainnet.sendRelay({
method: "getBlockHeight",
params: [],
});

console.log(agoricBlockResponse);
}

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

Output πŸ“€β€‹

caution

Certain features of Agoric spec may not be currently enabled.

To learn more about our SDK visit the Getting Started guide