Expand description
REST transport. Mirrors the paths helius-sdk hits on
api.helius.xyz/v0/... — served from the same base URL as our
JSON-RPC endpoint so a user pointing helius-sdk at Tidepool
gets every method, on the transport the SDK expects.
Parity rule: if Helius serves a method over REST, we serve it over REST. No method lives on both transports — clients should be unable to write local code that’d fail against real Helius.
Implementation: each REST route synthesizes a JsonRpcRequest
internally, calls the shared handler function from dispatcher.rs,
and unwraps the result (or surfaces the JSON-RPC error as a REST
error body + appropriate HTTP status). Lets us keep all business
logic in one place.
Functions§
- router
- Mount the REST routes. Paths mirror Helius’s public REST API exactly so a redirected base URL drops straight in.