| src_ts | gitignore dist, rename class, update readme, bump version, fix bundling | |
| tools | gitignore dist, rename class, update readme, bump version, fix bundling | |
| .gitignore | gitignore dist, rename class, update readme, bump version, fix bundling | |
| LICENSE | mit license update | |
| package.json | gitignore dist, rename class, update readme, bump version, fix bundling | |
| README.md | gitignore dist, rename class, update readme, bump version, fix bundling | |
| tsconfig.json | init | |
| tsdown.cdn.mjs | update readme and package json | |
| tsdown.config.mjs | gitignore dist, rename class, update readme, bump version, fix bundling | |
unimo-sdk
Browser, end-to-end encrypted client SDK for the unimo secure-platform.
All confidentiality and integrity are enforced client-side — the server is treated as untrusted and only ever sees ciphertext, signed manifests, and opaque handles.
- Key encapsulation: ML-KEM-1024 (FIPS 203)
- Signatures: ML-DSA-87 (FIPS 204)
- Symmetric: AES-256-GCM (WebCrypto)
- KDF / hashing: cSHAKE256, SHA-256
Status: pre-1.0 (
0.0.x). APIs may change between minor versions, and the crypto has not yet been independently audited. Use accordingly.
Install
npm install unimo-sdk
# or: bun add unimo-sdk / pnpm add unimo-sdk
The published bundle is self-contained (ESM, post-quantum dependencies inlined) and has no runtime dependencies.
With a bundler
Vite, webpack, esbuild, Rollup, etc. resolve and tree-shake the package automatically — just import it; no import map is needed.
Without a bundler (import maps)
Because the bundle is self-contained, no transitive dependencies need mapping — a single entry is enough:
<script type="importmap">
{ "imports": { "unimo-sdk": "/node_modules/unimo-sdk/dist/client.js" } }
</script>
<script type="module">
import { UnimoClient } from 'unimo-sdk';
// ...
</script>
Requirements
- A modern browser with WebCrypto (
crypto.subtle). - A secure context (HTTPS or
localhost). - A cross-origin-isolated context (
COOP/COEPheaders) is recommended; the client warns when it is missing.
Usage (in progress)
The public entry point:
import { UnimoClient } from 'unimo-sdk';
const client = new UnimoClient('https://your-gateway.example.com');
// Register a new account. The device seed is your credential — store it safely.
const reg = await client.register('my-account', 'my-device');
// reg.thisDeviceSeed → seed for this device (needed to log in again)
// reg.recoverySeed → recovery-device seed (store offline)
// Log in with the account name + device seed.
const account = await client.login('my-account', reg.thisDeviceSeed);
if (!account) throw new Error('login failed');
// Collections are named, per-collection-encrypted containers.
const notes = await account.getCollection('notes', 'KV', /* autoCreate */ true);
notes?.set('greeting', 'hello');
See the published type declarations (dist/client.d.ts) for the full surface (collections, members, invites, file upload/download, billing, live connection events).
License
MIT © thinking.tools