Skip to main content
@rocksky/sdk is a zero-dependency TypeScript client for the Rocksky XRPC API.
  • Type-safe — every endpoint and parameter is statically typed.
  • Builder-friendly — fluent RockskyClient.builder() for ergonomic setup.
  • Pipe-friendly — composable async operators (pipe, withRetry, withTimeout, map, tap, withFallback, catchError).
  • Zero-dependency — only the platform fetch and the standard library.

Install

Quick start

Authentication

Endpoints that require auth throw RockskyAuthError when no token is configured.

Builder

withAuth(token) and withBaseUrl(url) return a new client without mutating the original.

Pipe-style composition

Namespaces

Every method takes a typed parameter object and returns Promise<T>. Pass a generic to narrow the response type:

Escape hatch

For endpoints not yet wrapped:

Error handling

Pagination

Realtime (WebSocket)

Events: open, close, error, registered, deviceRegistered, message, control, raw.

Types

Public model types are derived from the Rocksky lexicons and live in src/generated/types.ts. They are regenerated from apps/api/lexicons/**/*.json by running bun run lexgen:types at the repo root.

License

MIT © Tsiry Sandratraina. Source: sdk/typescript.