Documentation Index
Fetch the complete documentation index at: https://luminouslabs-cc5545c6-indexing-tokens.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The API exposed by the indexer closely mirrors existing RPC calls, with one-to-one mapping:
| Solana RPC | Photon RPC Calls |
|---|
| getAccountInfo | getCompressedAccount |
| getBalance | getCompressedBalance |
| getTokenAccountsByOwner | getCompressedTokenAccountsByOwner |
| getProgramAccounts | getCompressedAccountsByOwner |
View all RPC endpoints for ZK Compression
Create an RPC Connection
// Helius exposes Solana and Photon RPC endpoints through a single URL
import { createRpc, Rpc } from '@lightprotocol/stateless.js';
const RPC_ENDPOINT = '<https://mainnet.helius-rpc.com?api-key=YOUR_KEY>';
const connection: Rpc = createRpc(RPC_ENDPOINT, RPC_ENDPOINT);
import { createRpc, Rpc } from '@lightprotocol/stateless.js';
// Helius exposes Solana and Photon RPC endpoints through a single URL
const RPC_ENDPOINT = "https://devnet.helius-rpc.com?api-key=<api_key>";
const connection: Rpc = createRpc(RPC_ENDPOINT, RPC_ENDPOINT);
Best Practices
| Best Practice | Description |
|---|
| Commitment Levels | Use appropriate commitment levels: processed (fastest), confirmed (balanced), finalized (most reliable) |
| Rate Limiting | Implement retry logic and respect rate limits. Public endpoints: 100 req/s, Private: 1000+ req/s |
| Batch Requests | Use batch requests when possible to improve efficiency and reduce API calls |
| Caching | Cache frequently accessed data to reduce API calls and improve performance |
Error Codes
For help with debugging use
| Code | Message | Description |
|---|
| -32600 | Invalid Request | The JSON sent is not a valid Request object |
| -32601 | Method not found | The method does not exist / is not available |
| -32602 | Invalid params | Invalid method parameter(s) |
| -32603 | Internal error | Internal JSON-RPC error |
| -32000 | Account not found | The compressed account was not found |
| -32001 | Invalid account hash | The provided account hash is invalid |
Next Steps
View all RPC endpoints for ZK Compression