QNSP

Build Pattern · TypeScript

Build WORM-Style Investment Document Archives

Write-once-read-many retention, immutable audit trails, and searchable encryption for investment documents.

Implement SEC 17a-4 / FINRA / MAS-aligned WORM-style retention with QNSP vault (PQC-encrypted, retention-locked) + audit-service (cryptographically chained) + SSE-X for regulator-required searchable archives. Regulator-ready without bespoke infrastructure.

35 minTime to first PQC
TypeScriptPrimary SDK
3Services used

QNSP services used

Stack

Code

Real code, real SDK calls

Snippets reference the published @cuilabs/qnsp SDK surface (TypeScript, Python, Go, Rust mirror byte-for-byte).

WORM-style retention with SEC 17a-4 compliancetypescript
import { QnspClient } from "@cuilabs/qnsp";

const qnsp = new QnspClient({ apiKey: process.env.QNSP_API_KEY! });

// Vault with retention lock (immutable until expiry)
const secret = await qnsp.vault.createSecret({
  name: `trade-confirm:${tradeId}`,
  payloadB64: confirmDocBase64,
  retention: {
    lockUntil: "2030-12-31",  // SEC 17a-4: minimum 3 years
    immutable: true,           // WORM enforcement
  },
  metadata: {
    pqcAlgorithm: "ml-kem-768",
    regulatoryClass: "sec-17a-4",
  },
});

// Audit event is itself ML-DSA-signed by audit-service
await qnsp.audit.logEvent({
  eventType: "trade.confirm.archived",
  payload: { tradeId, secretId: secret.id, retainUntil: "2030-12-31" },
});

Ship it

Get an API key and start building