Integralayer
Home/API Reference

API Reference

Complete API reference for both Cosmos SDK and EVM endpoints. Includes Cosmos RPC, REST API, WebSocket, gRPC, and Ethereum JSON-RPC methods with code examples, best practices, and Cosmos EVM implementation notes.

Endpoint Connection
Integra Mainnet endpoint details for Cosmos SDK and EVM
Cosmos RPC
https://rpc.integralayer.com
REST API
https://api.integralayer.com
Cosmos WS
wss://rpc.integralayer.com/websocket

For real-time CometBFT event subscriptions

gRPC
May not be publicly available

Efficient binary protocol for Cosmos SDK queries, typically on port 9090

EVM RPC
https://evm.integralayer.com
EVM WS
wss://ws.integralayer.com

For real-time EVM event subscriptions

Cosmos RPC Methods
CometBFT RPC endpoints for querying the Cosmos SDK layer

status

Available

Node status and sync info

Bash
curl https://rpc.integralayer.com/status

block

Available

Get block at height

Bash
curl https://rpc.integralayer.com/block?height=1

tx

Available

Get transaction by hash

Bash
curl "https://rpc.integralayer.com/tx?hash=0x..."

broadcast_tx_sync

Available

Broadcast transaction synchronously and wait for CheckTx result

Bash
curl "https://rpc.integralayer.com/broadcast_tx_sync?tx=0x..."

validators

Available

Get validator set at a given height

Bash
curl "https://rpc.integralayer.com/validators?height=1&per_page=100"

abci_query

Available

ABCI query for direct application state access

Bash
curl "https://rpc.integralayer.com/abci_query?path="/store/bank/key"&data=0x..."
Code Examples
Ready-to-use code snippets for interacting with the Cosmos SDK API

Connecting and Querying with CosmJS

TypeScript
import { StargateClient } from "@cosmjs/stargate";

// Connect to the Cosmos RPC endpoint
const client = await StargateClient.connect("https://rpc.integralayer.com");

// Get chain ID
const chainId = await client.getChainId();
console.log("Chain ID:", chainId); // integra-1

// Get latest block height
const height = await client.getHeight();
console.log("Current block height:", height);

// Query all balances for an address
const address = "integra1...";
const balances = await client.getAllBalances(address);
console.log("Balances:", balances);
// => [{ denom: "airl", amount: "1000000000000000000" }]

// Get a specific block
const block = await client.getBlock(height);
console.log("Block hash:", block.id);
console.log("Block time:", block.header.time);

// Query a transaction by hash
const tx = await client.getTx("TXHASH...");
console.log("Transaction:", tx);
Best Practices
Important considerations when working with Integralayer APIs

Rate Limiting

Handle 429 errors gracefully with exponential backoff. Public endpoints may enforce rate limits to protect node resources.

eth_getLogs Pagination

Block range limited to 5,000-10,000 blocks per query. Split larger ranges into smaller chunks to avoid timeouts.

Filter Expiration

Filters are held in-memory for approximately 5 minutes and are lost on node restart. Re-create filters if they expire.

Gas Estimation

Integralayer uses binary search for gas estimation, which differs from standard EVM estimation. Always add a buffer to estimated gas values.

Instant Finality

No reorgs on Integralayer. One confirmation is final with approximately 5-second block times. No need to wait for multiple confirmations.

Archive Nodes

Transaction logs and blooms may not be persisted after chain upgrades. Historical data queries may require an archive node.

Revert Reasons

Nodes do not store failure reasons for reverted transactions. Historical replay to determine revert reasons requires an archive node.