| Solana RPC | Photon RPC Calls |
|---|---|
| getAccountInfo | getCompressedAccount |
| getBalance | getCompressedBalance |
| getTokenAccountsByOwner | getCompressedTokenAccountsByOwner |
| getProgramAccounts | getCompressedAccountsByOwner |
View all RPC endpoints for ZK Compression
Create an RPC Connection
- Mainnet
- Devnet
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
| 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 |