Skip to main content
Migrating to Gatekeeper takes less than 5 minutes. It’s a simple URL change—your API key works without any modifications.

Quick Migration

Simply replace your existing endpoint:
const url = "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY";
That’s it! Test your application, monitor performance, and deploy when ready.

Framework-Specific Examples

import { Connection } from '@solana/web3.js';

const connection = new Connection(
  `https://beta.helius-rpc.com/?api-key=${YOUR_API_KEY}`,
  'confirmed'
);

WebSocket Endpoints

If you’re using WebSockets, update those endpoints too:
// Before
const ws = new WebSocket("wss://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY");

// After
const ws = new WebSocket("wss://beta.helius-rpc.com/?api-key=YOUR_API_KEY");

Migration Checklist

1

Update endpoint URL

Change mainnet.helius-rpc.com to beta.helius-rpc.com
2

Test in development

Verify all RPC calls work and authentication succeeds
3

Monitor performance

Check your metrics for improved latency and response times
4

Deploy to production

Roll out changes using your standard deployment process

Gradual Rollout (Optional)

For a safer migration, you can use environment variables or feature flags:
// Environment-based
const endpoint = process.env.USE_GATEKEEPER
  ? "https://beta.helius-rpc.com"
  : "https://mainnet.helius-rpc.com";

const connection = new Connection(
  `${endpoint}?api-key=${YOUR_API_KEY}`,
  'confirmed'
);
// Percentage rollout (10% of traffic)
const useGatekeeper = Math.random() < 0.1;
const endpoint = useGatekeeper
  ? "https://beta.helius-rpc.com"
  : "https://mainnet.helius-rpc.com";

Rollback

If needed, simply switch back to the standard endpoint:
const url = "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY";

Troubleshooting

Verify your API key is included: ?api-key=YOUR_API_KEY
  • Test from your production environment (not local dev)
  • Verify you’re not hitting rate limits (check for 429 errors)
  • Contact support if issues persist
  • Use wss:// (not ws://)
  • Ensure your API key is in the URL
  • Check firewall settings
Gatekeeper returns identical responses. Contact support immediately if you see differences.

Need Help?

Questions about migration?

Join our Discord to chat with the team and other developers