Package Exports
- @totalreclaw/client
- @totalreclaw/client/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@totalreclaw/client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@totalreclaw/client
TypeScript client library for TotalReclaw -- E2EE, LSH blind indexing, embeddings, and reranking
Website · npm · Repository
Build encrypted memory into any AI agent. All encryption happens client-side -- the server never sees plaintext.
This is the core cryptographic library used by @totalreclaw/totalreclaw (OpenClaw plugin) and @totalreclaw/mcp-server. Most users should install one of those packages instead.
Requirements: Node.js 18+
Architecture
All cryptographic operations (AES-256-GCM, HKDF key derivation, LSH hashing, blind indices, content fingerprinting) are powered by @totalreclaw/core -- a unified Rust/WASM module that ensures byte-for-byte consistency across all TotalReclaw clients.
Installation
npm install @totalreclaw/clientFeatures
- AES-256-GCM encryption -- All memories encrypted client-side
- Blind index search -- LSH-based blind indices for searching encrypted data
- Local embeddings -- Qwen3-Embedding-0.6B for semantic similarity (no API keys, 100+ languages)
- BM25 + cosine reranking -- Reciprocal rank fusion for high-quality retrieval
- Smart Account derivation -- BIP-39 mnemonic to ERC-4337 Smart Account address
- Memory decay -- Importance-based lifecycle management
Quick Start
import { TotalReclaw } from '@totalreclaw/client';
const client = new TotalReclaw({ serverUrl: 'https://api.totalreclaw.xyz' });
await client.init();
const userId = await client.register('your twelve word recovery phrase');
await client.remember('I prefer coffee over tea in the morning');
const results = await client.recall('what do I like to drink?');Crypto Primitives
| Operation | Algorithm | Purpose |
|---|---|---|
| Key derivation | Argon2id + HKDF-SHA256 | Memory-hard password hashing + auth key derivation |
| Encryption | AES-256-GCM | Authenticated encryption of memories and embeddings |
| Blind indices | SHA-256 | Searchable encryption without exposing plaintext |
| LSH | Random hyperplane | Approximate nearest neighbor search on encrypted data |
| Embeddings | Qwen3-Embedding-0.6B (1024d) | Local semantic similarity (no API calls, 100+ languages) |
| Reranking | BM25 + cosine + RRF | Multi-signal result fusion |
Development
npm install # Install dependencies
npm test # Run tests (217 tests)
npm run build # BuildLearn More
- Architecture Spec -- E2EE design with LSH + blind buckets
- totalreclaw.xyz
- Main Repository
License
MIT