@nodatachat/sdk 1.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # @nodatachat/sdk
2
2
 
3
- **Your server should never see what it doesn't need to know.**
3
+ The developer SDK for **NoData, the Information Access Processor**.
4
4
 
5
- NoData is a blind relay. Data passes through — encrypted, audited, untouched. Your server stores ciphertext. NoData stores nothing. Not the key. Not the plaintext. Not even metadata about what was encrypted.
5
+ **Give AI access without giving it the data. One API. One decision. One proof.**
6
6
 
7
- One package. Five lines. Full SOC compliance.
7
+ The **primitive** is a single call — `compute(information, intent, clearance)` → a **decision** with an authorized view and a signed proof. The data the AI isn't cleared for never reaches the model. You pay per decision, and every decision *is* the proof.
8
+
9
+ Everything else in this SDK — capsules, documents, scan, engines — is an **adapter** that resolves to that same decision.
8
10
 
9
11
  ---
10
12
 
@@ -14,234 +16,186 @@ One package. Five lines. Full SOC compliance.
14
16
  npm install @nodatachat/sdk
15
17
  ```
16
18
 
17
- Zero dependencies. Works in Node.js, Bun, Deno, Cloudflare Workers, and any runtime with `fetch`.
19
+ Zero dependencies. Works in Node.js, Bun, Deno, Cloudflare Workers, and any runtime with `fetch`. Get a key at [nodatacapsule.com/capsule-api/register](https://www.nodatacapsule.com/capsule-api/register).
18
20
 
19
21
  ---
20
22
 
21
- ## Quick start
23
+ ## The primitive — `compute()`
22
24
 
23
25
  ```ts
24
26
  import { NoData } from '@nodatachat/sdk';
25
27
 
26
- const nd = new NoData({ apiKey: 'sk_live_...' });
28
+ const nd = new NoData({ apiKey: 'ndp_...' });
27
29
 
28
- // Encrypt a credit card — server-blind
29
- const { ciphertext } = await nd.encrypt({
30
- field: 'credit_card',
31
- value: '4111111111111111',
30
+ const { answer, sections, proof } = await nd.compute({
31
+ question: 'What is the claim status?',
32
+ clearance: 'internal',
33
+ sections: [
34
+ { title: 'Status', text: 'Claim status: approved. Region: Tel Aviv.' },
35
+ { title: 'Client', text: 'Dana Cohen, ID 039821582, amount 42,500 NIS.' },
36
+ ],
32
37
  });
33
38
 
34
- // Store `ciphertext` in YOUR database. NoData stores nothing.
39
+ // "Client" auto-classifies as confidential and is WITHHELD at internal clearance —
40
+ // it never reaches the model. `answer` comes only from "Status".
41
+ // sections → [{ title: 'Status', sent: true }, { title: 'Client', sent: false }]
35
42
 
36
- // Later — decrypt
37
- const { value } = await nd.decrypt({
38
- field: 'credit_card',
39
- ciphertext,
40
- requester: 'billing-service',
41
- });
43
+ const v = await nd.verify(proof.id); // → { authentic: true, unaltered: true, ... }
42
44
  ```
43
45
 
44
- That's it. AES-256-GCM. Audit trail. Zero plaintext on any server.
45
-
46
- ---
47
-
48
- ## What this does
46
+ Wire it to any model runtime — the pattern is always the same: **NoData decides + proves; your model only ever sees the authorized slice.**
49
47
 
50
- | You call | What happens | What NoData stores |
51
- |----------|-------------|-------------------|
52
- | `nd.encrypt()` | AES-256-GCM encryption, key material returned to you | Nothing |
53
- | `nd.decrypt()` | Decryption, audit log entry created | Metadata only (who, when, which field) |
54
- | `nd.channel.create()` | Encrypted tunnel between two systems | Channel metadata, no content |
55
- | `nd.deliver.send()` | Burn-after-read secret delivery | Encrypted blob, deleted on read |
56
- | `nd.evidence.query()` | Returns audit trail for compliance | - |
48
+ ```ts
49
+ // OpenAI / Anthropic / Gemini / LangChain / n8n — same shape:
50
+ const gate = await nd.compute({ question, clearance, sections });
51
+ if (gate.decision === 'deny') return 'Not authorized.';
52
+ const reply = gate.answer; // already computed over the authorized slice
53
+ // attach gate.proof.id to your response as the tamper-evident receipt.
54
+ ```
57
55
 
58
56
  ---
59
57
 
60
- ## Batch — 100 fields, one call
61
-
62
- ```ts
63
- const result = await nd.batchNative([
64
- { op: 'encrypt', field: 'phone', value: '0501234567' },
65
- { op: 'encrypt', field: 'email', value: 'david@company.com' },
66
- { op: 'encrypt', field: 'id', value: '123456789' },
67
- { op: 'decrypt', field: 'ssn', ciphertext: 'aes256gcm:v1:...' },
68
- ]);
69
- // result.ok === 4, result.failed === 0
70
- ```
58
+ ## Fabric — connect two organisations in a few lines — `nd.fabric`
71
59
 
72
- Or encrypt an entire object — deep walk, nested fields included:
60
+ Organisation A invites, organisation B accepts, and from then on each side sends the other **commands** (a named action and flat fields). Everything is sealed on the sender's machine and opened on the receiver's; NoData relays ciphertext it cannot read, decides every send, and signs a receipt for it.
73
61
 
74
62
  ```ts
75
- const customer = {
76
- name: 'David',
77
- phone: '0501234567',
78
- email: 'david@company.com',
79
- address: { street: '123 Main', city: 'Tel Aviv' },
80
- age: 30,
81
- };
82
-
83
- const encrypted = await nd.encryptObject(customer, ['phone', 'email']);
84
- // { name: 'David', phone: 'aes256gcm:v1:...', email: 'aes256gcm:v1:...', address: {...}, age: 30 }
85
- ```
86
-
87
- ---
63
+ import { NoData } from '@nodatachat/sdk';
88
64
 
89
- ## Secure channels — system to system
65
+ const nd = new NoData({ apiKey: process.env.NODATA_API_KEY });
66
+ const fabric = await nd.fabric.open({ secret: process.env.NODATA_FABRIC_SECRET }); // nd.fabric.newSecret() once, then keep it
90
67
 
91
- Two systems need to exchange sensitive data. Neither trusts the other's infrastructure.
68
+ // Organisation A
69
+ const { url } = await fabric.invite({ note: 'Orders' }); // send the link to B
92
70
 
93
- ```ts
94
- // System A — creates a channel
95
- const ch = await nd.channel.create({
96
- ttl: '1h',
97
- requireVerification: true,
98
- });
99
- // Share ch.channel_token with System B
100
- // Share ch.verification_code with the human approver
101
-
102
- // System B — sends the data
103
- await nd.channel.send({
104
- token: ch.channel_token,
105
- data: { card: '4111111111111111', cvv: '123', exp: '12/28' },
106
- burnAfterRead: true,
107
- });
71
+ // Organisation B
72
+ const acme = await fabric.accept(url); // connected, both ways
73
+ await fabric.send(acme, 'order.create', { sku: 'A-17', qty: 3 });
108
74
 
109
- // System A — receives
110
- const result = await nd.channel.receive({
111
- token: ch.channel_token,
112
- verificationCode: '482901',
113
- });
114
- const card = JSON.parse(result.data);
75
+ // Organisation A
76
+ for (const m of await fabric.inbox({ accept: ['order.create'] })) {
77
+ if (m.status === 'accepted') await fabric.reply(m, 'order.ack', { ok: true });
78
+ }
115
79
  ```
116
80
 
117
- The server relays encrypted bytes. It never sees the card number.
81
+ - **Your key stays yours.** `open()` posts only the public half of the secret. Keep the secret like a password: it opens what is sent to you.
82
+ - **Commands, never files.** Between connected organisations only a command travels; the server refuses anything else and receipts the refusal.
83
+ - **You decide what you accept.** `inbox({ accept })` is your rule: other commands come back `refused`, without their fields.
84
+ - **Checked on arrival.** Before sealing, the recipient's key is checked against its address. Each message says whether what you opened matches the sender's commitment (`verified.committed`) and whether the relay's receipt is signed by one of NoData's pinned keys (`verified.receiptSignature`). `from` is the address the relay attributes, not a sender signature.
85
+ - **A person approves what needs a person.** When the organisation requires an approval, the call throws `FabricApprovalRequired` with `approveUrl`; call again with `approvalId` after a person approves. The SDK never approves.
86
+ - **Off switch.** `fabric.disconnect(partner)` ends the connection both ways; connecting again takes a new invitation.
87
+ - **One format.** What `nd.fabric` sends opens in the NoData console, CLI and MCP, and what they send opens here.
118
88
 
119
89
  ---
120
90
 
121
- ## Burn-after-read delivery
91
+ ## Adapter — a customer capsule in a few calls
122
92
 
123
- Send a secret. Recipient opens the link. Content self-destructs.
93
+ The capsule is one adapter over the primitive: an isolated, content-blind workspace per customer; every read is a governed decision with a receipt.
124
94
 
125
95
  ```ts
126
- const d = await nd.deliver.send({
127
- content: 'DATABASE_PASSWORD=s3cr3t_p@ss!',
128
- ttl: '30m',
129
- burn: true,
130
- maxViews: 1,
131
- });
132
-
133
- console.log(d.delivery_url);
134
- // https://www.nodatachat.com/d/abc123
135
- // Opened once → gone forever
136
- ```
137
-
138
- ---
96
+ import { NoData } from '@nodatachat/sdk';
139
97
 
140
- ## Webhooks — encrypted at rest
98
+ const nd = new NoData({ apiKey: 'ndp_...' });
141
99
 
142
- Receive webhooks from Stripe, Twilio, or any service. Payloads encrypted before storage.
100
+ // Mint a customer capsule (isolated, content-blind)
101
+ const cap = await nd.capsules.create({ handle: 'case-4471', display_name: 'Yossi Levy' });
143
102
 
144
- ```ts
145
- const wh = await nd.webhook.create({
146
- label: 'stripe-payments',
147
- ttl: '30d',
103
+ // Seal a document in — a key per recipient
104
+ await cap.documents.add({
105
+ title: 'Policy',
106
+ sections: [
107
+ { label: 'Summary', classification: 'public', text: 'Public summary.' },
108
+ { label: 'Terms', classification: 'confidential', text: 'Confidential terms.' },
109
+ ],
110
+ recipients: [{ email: 'client@acme.com', classifications: ['public'], code: 'blue-harbor' }],
148
111
  });
149
112
 
150
- // Point Stripe to: wh.ingest_url
151
- // Store wh.secret — you need it to decrypt
113
+ // Grant a member access across the docs
114
+ await cap.members.add({ email: 'client@acme.com', classifications: ['public'], code: 'blue-harbor' });
152
115
 
153
- // Poll for events
154
- const events = await nd.webhook.events(wh.channel_token);
116
+ // Signed audit ledger — who opened, when, on which device
117
+ const ledger = await cap.audit.get();
118
+
119
+ // Kill-switch: blocks the key capsule-wide — every live link 410s at once.
120
+ // Reversible (a paused capsule can be restored); use burn to crypto-shred the bytes.
121
+ await cap.revoke({ reason: 'offboarded' });
155
122
  ```
156
123
 
124
+ The server stores **ciphertext only** — never your section plaintext or the key.
125
+
157
126
  ---
158
127
 
159
- ## Evidence — SOC audit trail
128
+ ## AI governance — let an agent read only what you allow
160
129
 
161
- Every encrypt/decrypt is logged. Metadata only — never content.
130
+ Grant a named agent scoped classifications; on read it gets back **only** those — denied sections never decrypt (deny-by-default), and every read is audited as an AI access.
162
131
 
163
132
  ```ts
164
- const trail = await nd.evidence.query({
165
- field: 'credit_card',
166
- action: 'decrypt',
167
- from: '2026-03-01',
168
- to: '2026-03-27',
169
- });
133
+ const g = await cap.ai.grant({ agent_name: 'claims-bot', classifications: ['public'] });
170
134
 
171
- // WHO decrypted WHAT field WHEN — ready for SOC 2 auditor
135
+ const read = await cap.ai.read({ agent_id: g.agent_id });
136
+ // read.documents[].sections → 'public' only; 'confidential' is absent, never decrypted
137
+
138
+ await cap.ai.revoke(g.agent_id);
172
139
  ```
173
140
 
174
141
  ---
175
142
 
176
- ## Vault — zero-knowledge storage
143
+ ## Embedded Capsule — the white-label widget
177
144
 
178
- You encrypt client-side. Server stores blindly.
145
+ Mint an origin-bound token for one of the capsule's documents and frame the viewer on your own site. The raw bearer never leaves NoData's origin — the token encrypts it.
179
146
 
180
147
  ```ts
181
- const vault = await nd.vault.create({
182
- label: 'customer-contracts',
183
- encrypted_blob: myEncrypt(data, myKey),
184
- iv: myIv,
185
- metadata: { customer_id: 'cust_123' },
148
+ const { embed_url } = await cap.embed({
149
+ bearer: '<document bearer from documents.add>',
150
+ allowed_origin: 'https://portal.myfirm.com',
151
+ ttl_seconds: 3600,
186
152
  });
187
-
188
- const entry = await nd.vault.read(vault.vault_id);
189
- const data = myDecrypt(entry.encrypted_blob, entry.iv, myKey);
153
+ // <iframe src={embed_url} />
190
154
  ```
191
155
 
192
156
  ---
193
157
 
194
- ## Express plugin — one line
158
+ ## Tenants — provision a whole organization
195
159
 
196
160
  ```ts
197
- import express from 'express';
198
- import { nodataExpress } from '@nodatachat/sdk/express';
199
-
200
- const app = express();
201
-
202
- app.use('/api/customers', nodataExpress({
203
- apiKey: 'sk_live_...',
204
- encryptFields: ['phone', 'email', 'id_number'],
205
- decryptFields: ['phone', 'email'],
206
- decryptHeader: 'X-NoData-Decrypt',
207
- }));
208
-
209
- app.get('/api/customers', async (req, res) => {
210
- const rows = await db.query('SELECT * FROM customers');
211
- res.json(rows);
212
- // phone, email, id_number → automatically encrypted in response
213
- });
161
+ const t = await nd.tenants.create({ company_name: 'Acme', slug: 'acme', capsule_install: true });
162
+ const state = await nd.tenants.get(t.tenant_id);
214
163
  ```
215
164
 
216
- Also available: `@nodatachat/sdk/fastify`.
165
+ Requires a key with the `partner.provision_tenants` scope.
217
166
 
218
167
  ---
219
168
 
220
- ## Service accounts — scoped M2M keys
221
-
222
- Your master key creates restricted child keys for each service:
169
+ ## Fleet overview — you manage a fleet, not a capsule
223
170
 
224
171
  ```ts
225
- // POST /api/v1/service-account
226
- const svc = await fetch('https://www.nodatachat.com/api/v1/service-account', {
227
- method: 'POST',
228
- headers: { Authorization: 'Bearer sk_live_MASTER_KEY' },
229
- body: JSON.stringify({
230
- name: 'payment-service',
231
- scopes: ['encrypt', 'decrypt'],
232
- rate_limit_per_minute: 500,
233
- daily_quota: 100000,
234
- expires_in_days: 90,
235
- allowed_ips: ['10.0.0.0/8'],
236
- }),
237
- });
238
- // { key: "svc_live_abc123..." } — shown ONCE
172
+ const fleet = await nd.capsules.overview();
173
+ // { fleet: { active_vaults, total_documents, ... }, ai_governance: { agents, grants_active } }
239
174
  ```
240
175
 
241
- | Key prefix | Purpose | Can create child keys |
242
- |-----------|---------|----------------------|
243
- | `sk_live_` | Master key | Yes |
244
- | `svc_live_` | Service account | No |
176
+ ---
177
+
178
+ ## Capsule API reference
179
+
180
+ | Method | Endpoint | What it does |
181
+ |--------|----------|--------------|
182
+ | `nd.capsules.create(req)` | `POST /v1/capsules` | Mint a customer capsule |
183
+ | `nd.capsules.list(opts?)` | `GET /v1/capsules` | List this org's capsules |
184
+ | `nd.capsules.get(idOrSlug)` | `GET /v1/capsules/{id}` | Capsule summary |
185
+ | `cap.documents.add(req)` | `POST /v1/capsules/{id}/documents` | Seal a document in |
186
+ | `cap.documents.list()` | `GET /v1/capsules/{id}/documents` | List documents (metadata) |
187
+ | `cap.members.add(req)` | `POST /v1/capsules/{id}/members` | Grant a member access |
188
+ | `cap.members.list()` | `GET /v1/capsules/{id}/members` | The member roster |
189
+ | `cap.ai.grant(req)` | `POST /v1/capsules/{id}/ai-grants` | Grant an AI agent scoped classifications |
190
+ | `cap.ai.list()` | `GET /v1/capsules/{id}/ai-grants` | List grants (allowed vs denied) |
191
+ | `cap.ai.read(req)` | `POST /v1/capsules/{id}/ai-read` | Agent reads only its allowed classifications |
192
+ | `cap.ai.revoke(id)` | `POST /v1/capsules/{id}/ai-grants` | Revoke an agent |
193
+ | `cap.audit.get(opts?)` | `GET /v1/capsules/{id}/audit` | Signed audit ledger |
194
+ | `cap.embed(req)` | `POST /v1/capsules/{id}/embed-token` | Origin-bound embed token |
195
+ | `cap.revoke(opts?)` | `POST /v1/capsules/{id}/revoke` | Kill-switch — every live link 410s at once (reversible) |
196
+ | `nd.tenants.create(req)` | `POST /v1/tenants` | Provision a tenant |
197
+ | `nd.tenants.get(id)` | `GET /v1/tenants/{id}` | Read tenant state |
198
+ | `nd.capsules.overview()` | `GET /v1/overview` | Fleet totals |
245
199
 
246
200
  ---
247
201
 
@@ -249,33 +203,27 @@ const svc = await fetch('https://www.nodatachat.com/api/v1/service-account', {
249
203
 
250
204
  ```ts
251
205
  const nd = new NoData({
252
- apiKey: 'sk_live_...',
253
- baseUrl: 'https://www.nodatachat.com', // default
254
- timeout: 30000, // ms
255
- retries: 2, // on 5xx / network error
256
- headers: { 'X-Custom': 'value' }, // added to every request
257
-
258
- // Hooks
259
- onRequest: (url, init) => console.log(`→ ${url}`),
260
- onResponse: (url, status, ms) => console.log(`← ${status} ${ms}ms`),
261
- onError: (url, err) => console.error(`! ${url}: ${err.message}`),
206
+ apiKey: 'ndp_...',
207
+ baseUrl: 'https://www.nodatacapsule.com', // default
208
+ timeout: 30000, // ms
209
+ retries: 2, // on 5xx / network error
210
+ headers: { 'X-Custom': 'value' },
211
+ onRequest: (url, init) => console.log(`→ ${url}`),
212
+ onResponse: (url, status, ms) => console.log(`← ${status} ${ms}ms`),
213
+ onError: (url, err) => console.error(`! ${url}: ${err.message}`),
262
214
  });
263
215
  ```
264
216
 
265
- ---
266
-
267
217
  ## Error handling
268
218
 
269
219
  ```ts
270
220
  import { NoData, NoDataError } from '@nodatachat/sdk';
271
221
 
272
222
  try {
273
- await nd.encrypt({ field: 'ssn', value: '123-45-6789' });
223
+ await nd.capsules.create({ handle: 'case-4471' });
274
224
  } catch (err) {
275
225
  if (err instanceof NoDataError) {
276
- console.log(err.status); // 429
277
- console.log(err.message); // "Rate limit exceeded"
278
- console.log(err.retryAfter); // 45 (seconds)
226
+ console.log(err.status, err.message, err.retryAfter);
279
227
  }
280
228
  }
281
229
  ```
@@ -284,102 +232,86 @@ Rate limits are handled automatically — the SDK waits and retries on 429.
284
232
 
285
233
  ---
286
234
 
287
- ## API reference
235
+ ## Platform Engines — `nd.engines.*`
288
236
 
289
- ### Core
237
+ The shared machinery beneath the capsule (and beneath File / Code / AI / Data Capsule). These are the **engines**, not the pitch — the way Stripe doesn't put its internal ledger in the hero. Reach for them directly only when you need the raw primitive.
290
238
 
291
- | Method | Description |
292
- |--------|------------|
293
- | `nd.encrypt(req)` | Encrypt a single field |
294
- | `nd.decrypt(req)` | Decrypt a single field |
295
- | `nd.batchEncrypt(fields)` | Parallel encrypt (N HTTP calls) |
296
- | `nd.batchDecrypt(fields)` | Parallel decrypt (N HTTP calls) |
297
- | `nd.batchNative(items)` | Single-call batch (1 HTTP call, up to 100 ops) |
298
- | `nd.encryptObject(obj, fields)` | Deep-walk encrypt matching fields |
299
- | `nd.decryptObject(obj, fields)` | Deep-walk decrypt matching fields |
300
- | `nd.ping()` | Health check + latency |
301
-
302
- ### Channels
303
-
304
- | Method | Description |
305
- |--------|------------|
306
- | `nd.channel.create(opts)` | Create encrypted channel |
307
- | `nd.channel.send(req)` | Send data through channel |
308
- | `nd.channel.receive(req)` | Receive data from channel |
309
- | `nd.channel.verify(token, code)` | Verify recipient |
310
- | `nd.channel.proof(token)` | Get delivery proof |
239
+ ```ts
240
+ // Blind Relay — field-level encrypt/decrypt (server stores nothing)
241
+ const { ciphertext } = await nd.engines.blindRelay.encrypt({ field: 'credit_card', value: '4111...' });
311
242
 
312
- ### Webhooks
243
+ // Governance — register data + grant/revoke agents (runs on Excel/DB/CRM too)
244
+ await nd.engines.governance.grant(/* ... */);
313
245
 
314
- | Method | Description |
315
- |--------|------------|
316
- | `nd.webhook.create(opts)` | Create webhook channel |
317
- | `nd.webhook.events(token)` | Poll encrypted events |
318
- | `nd.webhook.list()` | List all channels |
246
+ // Channel — system-to-system encrypted transfer
247
+ const ch = await nd.engines.channel.create({ ttl: '1h' });
319
248
 
320
- ### Delivery
249
+ // Delivery — burn-after-read
250
+ await nd.engines.deliver.send({ content: 'API_KEY=...', burn: true });
321
251
 
322
- | Method | Description |
323
- |--------|------------|
324
- | `nd.deliver.send(req)` | Burn-after-read delivery |
325
- | `nd.deliver.burn(content)` | Anonymous burn drop |
326
- | `nd.deliver.read(dropId)` | Read + self-destruct |
252
+ // Evidence — audit trail + proofs
253
+ await nd.engines.evidence.query({ field: 'credit_card' });
327
254
 
328
- ### Evidence
255
+ // Vault — zero-knowledge blob storage · Webhooks — encrypted at rest
256
+ await nd.engines.vault.create({ /* ... */ });
257
+ await nd.engines.webhook.create({ label: 'stripe' });
258
+ ```
329
259
 
330
- | Method | Description |
331
- |--------|------------|
332
- | `nd.evidence.query(q)` | Query audit trail |
333
- | `nd.evidence.certificate(id)` | Proof certificate |
334
- | `nd.evidence.verify(hash)` | Verify proof |
260
+ | Engine | Namespace | Purpose |
261
+ |--------|-----------|---------|
262
+ | Governance | `nd.engines.governance.*` | Data permissions — register, grant, revoke (product-independent) |
263
+ | Blind Relay | `nd.engines.blindRelay.*` | `encrypt` / `decrypt` / batch — field-level, server-blind |
264
+ | Channel | `nd.engines.channel.*` | Encrypted system-to-system transfer |
265
+ | Delivery | `nd.engines.deliver.*` | Burn-after-read secret delivery |
266
+ | Evidence | `nd.engines.evidence.*` | Audit trail + cryptographic proofs |
267
+ | Vault | `nd.engines.vault.*` | Zero-knowledge blob storage |
268
+ | Webhooks | `nd.engines.webhook.*` | Receive webhooks, encrypted at rest |
335
269
 
336
- ### Vault
270
+ > The old top-level accessors (`nd.encrypt`, `nd.channel`, `nd.governance`, …) still work but are **deprecated** — use `nd.engines.*`.
337
271
 
338
- | Method | Description |
339
- |--------|------------|
340
- | `nd.vault.create(req)` | Store encrypted blob |
341
- | `nd.vault.read(id)` | Retrieve encrypted blob |
342
- | `nd.vault.delete(id)` | Delete entry |
343
- | `nd.vault.status()` | Storage stats |
272
+ Framework plugins are available: `@nodatachat/sdk/express` and `@nodatachat/sdk/fastify`.
344
273
 
345
274
  ---
346
275
 
347
276
  ## Architecture
348
277
 
349
278
  ```
350
- ┌─────────────┐ ┌──────────────┐ ┌─────────────┐
351
- │ Your App │ ──────→ │ NoData API │ ──────→ │ Your DB │
352
- │ │ │ │ │ │
353
- │ plaintext │ │ ciphertext │ │ ciphertext │
354
- │ lives here │ │ passes thru │ │ stored here│
355
- │ │ │ stores: 0 │ │ │
356
- └─────────────┘ └──────────────┘ └─────────────┘
279
+ one capsule per customer
280
+ ┌─────────────┐ ┌──────────────┐ ┌─────────────┐
281
+ │ Your App │ ─────→ │ NoData API │ ─────→ │ Your world │
282
+ │ plaintext │ │ ciphertext │ │ ciphertext │
283
+ │ lives here │ │ content- │ │ + receipts │
284
+ │ │ │ blind · 0 │ │ │
285
+ └─────────────┘ └──────────────┘ └─────────────┘
286
+ Capsule = the entity · Engines = the machinery underneath
357
287
  ```
358
288
 
359
- **NoData is a relay, not a vault.** Data flows through, gets encrypted, and leaves. The server is blind by design — not by policy, by architecture.
289
+ **Content-blind by design — not by policy, by architecture.** We store ciphertext; never your data, never the key. A zero-knowledge capsule is sealed to a key only your customer holds, so we can never unwrap it.
360
290
 
361
291
  ---
362
292
 
363
- ## Why
293
+ ## Get your API key
364
294
 
365
- Most encryption SDKs ask you to trust their server. We don't.
295
+ **[nodatacapsule.com/vault-api](https://www.nodatacapsule.com/vault-api)**
366
296
 
367
- - **No plaintext on our servers** — ever
368
- - **No key storage** — you hold the keys
369
- - **No data retention** — we're a relay, not a warehouse
370
- - **Full audit trail** — every operation logged (metadata only)
371
- - **SOC 2 ready** — evidence endpoint = auditor-friendly
297
+ ---
372
298
 
373
- The simplest way to add field-level encryption to any system. Five lines of code. Zero trust required.
299
+ ## NoData on npm
374
300
 
375
- ---
301
+ - **`@nodatachat/nodata`**: the main package, with all protection, scanning and governance capabilities, from the terminal.
302
+ - **`@nodatachat/sdk`** (this one): integration for developers.
303
+ - **`@nodatachat/mcp`**: integration for AI agents and MCP clients.
376
304
 
377
- ## Get your API key
305
+ ## License
378
306
 
379
- **[nodatachat.com/developers](https://www.nodatachat.com/developers)**
307
+ [FSL-1.1-ALv2](LICENSE.md) (Functional Source License 1.1, Apache 2.0 future license).
308
+ Use it for any purpose except a competing product or service. Each release becomes
309
+ available under the Apache License 2.0 two years after it is published. Version 1.0.0
310
+ was published under MIT and remains available under that license.
311
+ Copyright 2026 Capsule Ltd.
380
312
 
381
313
  ---
382
314
 
383
315
  <p align="center">
384
- <strong>NoData</strong> — Your server should never see what it doesn't need to know.
316
+ <strong>NoData Capsule</strong> — one API mints a customer capsule.
385
317
  </p>