1
0
Fork
You've already forked unimo-sdk-ts
0
Browser, end-to-end encrypted client SDK for the unimo secure-platform. https://www.npmjs.com/package/unimo-sdk
  • TypeScript 84.8%
  • JavaScript 15.2%
2026年06月28日 16:54:00 +02:00
src_ts gitignore dist, rename class, update readme, bump version, fix bundling 2026年06月28日 16:54:00 +02:00
tools gitignore dist, rename class, update readme, bump version, fix bundling 2026年06月28日 16:54:00 +02:00
.gitignore gitignore dist, rename class, update readme, bump version, fix bundling 2026年06月28日 16:54:00 +02:00
LICENSE mit license update 2026年06月11日 07:29:25 +02:00
package.json gitignore dist, rename class, update readme, bump version, fix bundling 2026年06月28日 16:54:00 +02:00
README.md gitignore dist, rename class, update readme, bump version, fix bundling 2026年06月28日 16:54:00 +02:00
tsconfig.json init 2026年06月08日 10:39:35 +02:00
tsdown.cdn.mjs update readme and package json 2026年06月15日 23:30:58 +02:00
tsdown.config.mjs gitignore dist, rename class, update readme, bump version, fix bundling 2026年06月28日 16:54:00 +02:00

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/COEP headers) 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