Skip to content

feat: add worker proxy routes for Beacon API and Bitcoin RPC #334

@AugustoL

Description

@AugustoL

Summary

Add new Cloudflare Worker proxy routes to provide free, key-less access to Beacon Chain APIs (for EIP-4844 blob data) and Bitcoin RPCs, following the same pattern as the existing Etherscan proxy.

Motivation

  • Beacon API: PR feat(blocks/tx): Display raw blob data content via Beacon API #332 adds blob data display using free PublicNode endpoints. Adding worker-proxied routes with API keys (QuickNode, Alchemy) would improve reliability and rate limits without requiring users to configure their own keys.
  • Bitcoin RPCs: Currently we have very few Bitcoin RPC endpoints available. Proxying through the worker with provider API keys would give users automatic "free" access to Bitcoin data.

Proposed Changes

Beacon API proxy

  • Add POST /beacon/:networkId/blob_sidecars/:slot worker route
  • Worker holds API keys as env secrets (e.g., QUICKNODE_BEACON_URL, ALCHEMY_API_KEY)
  • Proxy requests to paid beacon endpoints (QuickNode, Alchemy free tiers)
  • Frontend uses the worker URL as an additional/fallback beacon endpoint
  • Supported networks: Ethereum Mainnet, Sepolia

Bitcoin RPC proxy

  • Add POST /btc/:method worker route (or similar)
  • Worker holds API keys for Bitcoin RPC providers with free tiers
  • Proxy common Bitcoin RPC calls (getblock, getrawtransaction, getblockchaininfo, etc.)
  • Rate limiting per IP to prevent abuse

Provider candidates (free tiers)

Beacon:

  • QuickNode (10M credits/month free)
  • Alchemy (30M compute units/month free)

Bitcoin:

  • QuickNode (Bitcoin support on free tier)
  • GetBlock (free tier available)
  • Chainstack (free tier available)

Dependencies

Acceptance Criteria

  • Worker proxy route for beacon blob_sidecars
  • Worker proxy route for Bitcoin RPCs
  • Rate limiting on both routes
  • Input validation middleware
  • Frontend falls back to worker proxy when no user-configured endpoint exists
  • Works without any user API key configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions