Five lines of code. Zero dependencies. Compute what an AI may see — with a signed proof.
nd.compute() · nd.verify(): one primitive, one meter. nd.fabric: two organizations connect in a few lines of code.
INSTALL
npmbash
npm install @nodatachat/sdk@2.1.0
Zero dependencies. Works in Node.js, Bun, Deno, Cloudflare Workers — anything with fetch.
5 lines — access without handing over the data
Ask what a subject may see; get back a decision, an answer over only the authorized slice, and a signed proof.
TypeScriptts
import { NoData } from '@nodatachat/sdk';
const nd = new NoData({ apiKey: 'ndp_...' });
// THE primitive — give AI access without giving it the data.
const { decision, answer, proof } = await nd.compute({
question: 'What is the claim status?',
clearance: 'internal',
sections: [
{ title: 'Status', text: 'Approved on 2026-07-14' },
{ title: 'SSN', text: '123-45-6789' }, // out of clearance → never sent
],
});
// decision: 'allow' · answer over the permitted sections only.
// The Prove verb — confirm the proof, without decrypting anything.
const v = await nd.verify(proof.id); // { authentic, unaltered, signer }
Encryption
AES-256-GCM
Server storage
Zero
Audit
Metadata only
FABRICTwo organizations. A few lines of code.
One organization invites, the other accepts, and from then on each side sends the other commands. Sealed by the sender, opened by the receiver; NoData relays ciphertext, decides every send and signs a receipt.
TypeScriptts
import { NoData } from '@nodatachat/sdk';
const nd = new NoData({ apiKey: process.env.NODATA_API_KEY });
const fabric = await nd.fabric.open({ secret: process.env.NODATA_FABRIC_SECRET });
// Organization A
const { url } = await fabric.invite({ note: 'Orders' }); // send the link to B
// Organization B
const acme = await fabric.accept(url); // connected, both ways
await fabric.send(acme, 'order.create', { sku: 'A-17', qty: 3 });
// Organization A
for (const m of await fabric.inbox({ accept: ['order.create'] })) {
if (m.status === 'accepted') await fabric.reply(m, 'order.ack', { ok: true });
}
await fabric.disconnect(acme); // ends it both ways
The secret is made on your side (nd.fabric.newSecret()); only its public half is posted. A throwaway key in CI: open({ replace: true }) replaces that API key's previous address, receipted. Between connected organizations only a command travels, never a file. inbox({ accept }) is your rule. When a person must approve, the call throws FabricApprovalRequired with the link; the SDK never approves.
Zero-knowledge storage. You encrypt client-side. Server stores blindly.
nd.vault.create()nd.vault.read()nd.vault.delete()
M2MSecure Channel — system to system
Two systems need to exchange sensitive data. Neither trusts the other's infra. NoData sits in the middle — blind.
// System A — creates a channel
const ch = await nd.channel.create({
ttl: '1h',
requireVerification: true,
});
// System B — sends credit card data
await nd.channel.send({
token: ch.channel_token,
data: { card: '4111111111111111', cvv: '123', exp: '12/28' },
burnAfterRead: true,
});
// System A — receives
const result = await nd.channel.receive({
token: ch.channel_token,
verificationCode: '482901',
});
const card = JSON.parse(result.data);
System A ──── channel.create() ────→ NoData ←──── channel.send() ──── System B Server relays encrypted bytes. Never sees content. Never stores content.
PLUGINOne line — Express / Fastify
Large system? No rewrite needed. One line of middleware — every response with sensitive fields auto-encrypted.
Expressts
import express from 'express';
import { nodataExpress } from '@nodatachat/sdk/express';
const app = express();
app.use('/api/customers', nodataExpress({
apiKey: 'ndp_...',
encryptFields: ['phone', 'email', 'id_number'],
}));
// Every response with phone/email/id_number → auto-encrypted
// No code changes in your routes
import { NoData } from '@nodatachat/sdk';
const nd = new NoData({ apiKey: process.env.NODATA_API_KEY! });
// Decide + answer over only the authorized sections, with a proof.
const { decision, answer, proof } = await nd.compute({
question: 'Is this customer past due?',
clearance: 'internal',
sections: [
{ title: 'Balance', text: customer.balance },
{ title: 'SSN', text: customer.ssn }, // out of clearance → never sent
],
});
// The model only ever saw the sections it was cleared for.