Lightweight TypeScript client for the OpenClaw Gateway WebSocket RPC protocol. Current stable version is 2.1.1, released with a focus on device identity management and auto-reconnection. Ships TypeScript types, requires Node.js ≥18.0.0. Key differentiators include built-in Ed25519 device signing, optional auto-reconnect with exponential backoff, and comprehensive browser support via Web Crypto API. The library is actively maintained with a clear migration path from earlier versions.
npm install openclaw-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to a local OpenClaw Gateway, lists sessions, and disconnects. Requires a valid token.
If you use both `deviceIdentity` and a `connectParams` function, refactor to either use only device identity or merge logic into `deviceIdentity` callbacks.
Use Node.js 20+ or a browser with Web Crypto Ed25519 support when using device identity. Optionally, wrap device identity setup in a runtime check.
Check for `reconnect.maxAttempts === null` might fail; use `!reconnect.maxAttempts` instead.
Change to `import { OpenClawClient } from 'openclaw-client'` or use dynamic import.Upgrade to Node.js 20+ or use a supported browser. If not needed, omit `deviceIdentity` and `deviceToken` options.
Ensure you call `client.disconnect()` before calling `connect()` again, or check client connection state.
No dependency data recorded yet.