Migrating from Helius
Standard Solana JSON-RPC calls use the same method and response model; replace the endpoint and authentication.
Compatibility boundary
- Standard Solana JSON-RPC methods retain their request and response shapes.
- Standard Solana WebSocket subscription methods remain compatible.
- Helius proprietary methods such as
getAssetare not part of the Solana RPC standard and are not drop-in compatible.
Update environment variables
Before:
HELIUS_API_KEY=your_keyHELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=your_keyAfter:
OPENINFRA_API_KEY=sk_live_xxxxxxxxxxxxOPENINFRA_RPC_URL=https://rpc.sol.openinfra.shAttach the API key
-const conn = new Connection(process.env.HELIUS_RPC_URL!);+const conn = new Connection(process.env.OPENINFRA_RPC_URL!, {+ commitment: "confirmed",+ httpHeaders: { "x-api-key": process.env.OPENINFRA_API_KEY! },+});For clients without custom header support, append
?api-key=YOUR_API_KEY.Replace provider-specific streams
Evaluate Yellowstone gRPC or OpenInfra data streams based on the payload and filter behavior your application needs.