Skip to content

KenidoesCode/cool-sdk

@northwind/cool-sdk

© 2026 Pranauv Shrinaath S. · CooL is a project of NorthWind Cipher (in incorporation) · CooL™ trademark pending.

CI License: Apache-2.0

Turn one AI call into a signed, self-verifying, offline-verifiable receipt — the minimal client for CooL (Cryptographic Observability and On-chain Ledger).

What this proves: what was computed — which model ran, on which committed input, producing which committed output, and when — and that the record is unforged (hybrid ML-DSA-65 + Ed25519 signature; optional RFC 6962 inclusion). What this does NOT prove: that the output is correct, fair, unbiased, safe, or policy-compliant.

Honest per-domain status lives in cool-spec/STATUS.md: signatures and the transparency log are real; witnesses are structural only (no external witnesses); TEE attestation is mocked; on-chain anchoring is absent/planned.

Install

npm install @northwind/cool-sdk

Requires Node ≥ 22 (ESM).

60-second quickstart

import { Cool, verifyReceipt, generateKeypair } from "@northwind/cool-sdk";

const cool = new Cool({
  signing: generateKeypair("cool-sign-2026Q2-01"),
  backend: async ({ prompt }) => ({ output: `DECLINED: insufficient history for "${prompt}"` }),
  log: "memory", // real RFC 6962 inclusion proof + STH for the demo
});

const { output, receipt } = await cool.complete({
  model: "acme/credit-scorer@2026.06.0",
  prompt: "applicant #4471",
  params: { temperature: 0, seed: 7 },
});

const verdict = await verifyReceipt(receipt); // offline, self-contained
console.log(verdict.ok); // true

Run the bundled example:

npm run build && node examples/quickstart.mjs

What you get

  • Coolcomplete() runs your backend, commits salted hashes of the input, output, params and weights, builds the inference core, computes binding_hash, hybrid-signs it, and (with log: "memory") attaches a real inclusion proof + STH.

  • verifyReceipt(receipt) — the shared, offline verification core. Returns a structured verdict (never a bare boolean):

    {
      ok: boolean,
      checks: {
        binding, signature, inclusion, witnesses, attestation, anchor
        // each: { status: "pass" | "fail" | "absent" | "mock", detail: string }
      },
      reasons: string[]
    }

    attestation is always mock and anchor is always absent — they are reported honestly and never as a pass.

  • generateKeypair, key-directory helpers, and the canonical core (canonical CBOR, multihash, hybrid sign/verify, RFC 6962 Merkle) — the same code the verifier uses.

No network, no telemetry

The SDK makes no outbound calls except the backend you supply (N9). Receipts verify with no network and no trust in CooL or the operator (N8).

Conformance

The shared golden vectors in cool-spec/examples are verified in CI. Regenerate them deterministically with npm run vectors.

Security

Pre-audit software. Example keys are throwaway demo material. See SECURITY.md.

Licence

Apache-2.0. © NorthWind Cipher (in incorporation).

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors