Documentation Index
Fetch the complete documentation index at: https://docs.rocksky.app/llms.txt
Use this file to discover all available pages before exploring further.
@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
fetchand the standard library.
Install
Quick start
Authentication
RockskyAuthError when no token is
configured.
Builder
withAuth(token) and withBaseUrl(url) return a new client without mutating
the original.
Pipe-style composition
| Operator | Description |
|---|---|
map(fn) | Transform the resolved value. |
tap(fn) | Run a side-effect; pass the value through. |
withRetry(n, { delayMs, factor, shouldRetry }) | Retry on rejection with exponential backoff. |
withTimeout(ms) | Reject with RockskyTimeoutError after ms. |
withFallback(value | fn) | Recover from any error with a default. |
catchError(fn) | Map a thrown error to a value. |
Namespaces
Promise<T>. Pass a
generic to narrow the response type:
Escape hatch
For endpoints not yet wrapped:Error handling
| Error | Meaning |
|---|---|
RockskyHttpError | Non-2xx response. .status, .url, .body |
RockskyTimeoutError | Exceeded timeoutMs |
RockskyAuthError | Endpoint requires auth but no token configured |
RockskyError | Base class |
Pagination
Realtime (WebSocket)
open, close, error, registered, deviceRegistered, message,
control, raw.
Types
Public model types are derived from the Rocksky lexicons and live insrc/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.