Documentation Index
Fetch the complete documentation index at: https://luminouslabs-cc5545c6-bump-sdks.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The Light Token SDK calls these methods internally via interface functions
like transferInterface and getAtaInterface. You rarely need to call
them directly.Call these methods directly if you are building a block explorer,
custom indexer, or working with
legacy compressed tokens.
| Solana RPC | Photon RPC |
|---|
| getAccountInfo | getCompressedAccount |
| getBalance | getCompressedBalanceByOwner |
| getAccountInfo | getCompressedTokenAccountsByOwner |
| getTokenAccountBalance | getCompressedTokenBalancesByOwner |
| getSignaturesForAddress | getCompressionSignaturesForAddress |
| getSignaturesForAddress | getCompressionSignaturesForOwner |
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 reduce API calls. |
| Caching | Cache frequently accessed data to reduce API calls. |
Error codes
| 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. |
Methods
These methods are called internally by the Light Token SDK. Call them
directly for custom indexing, block explorers, or debugging.
Legacy
Methods for direct compressed-token workflows. Not called by the Light
Token SDK interface functions.