botindex-scc
v1.0.0
Published
Session Continuity Certificates (SCC) SDK for TypeScript
Downloads
94
Readme
botindex-scc
Session Continuity Certificates (SCC) SDK for TypeScript.
Implements SCC v1.0 chain creation and verification with Ed25519 (tweetnacl) and JCS canonicalization (RFC 8785).
Install
npm install botindex-sccQuick start
import {
createGenesisCert,
createContinuationCert,
generateKeyPair,
verifyChain,
} from "botindex-scc";
const keys = generateKeyPair();
const c0 = createGenesisCert("botindex/king-backend", keys.secretKey, {
capabilities: ["api_serve", "x402_payment"],
runtime: "openclaw/2026.3",
platform: "fly.io",
});
const c1 = createContinuationCert(c0, keys.secretKey);
const result = verifyChain([c0, c1]);
console.log(result.valid, result.trustLevel);Key rotation
import {
createContinuationCert,
createGenesisCert,
createRotationCert,
generateKeyPair,
verifyChain,
} from "botindex-scc";
const oldKeys = generateKeyPair();
const newKeys = generateKeyPair();
const c0 = createGenesisCert("botindex/king-backend", oldKeys.secretKey);
const c1 = createContinuationCert(c0, oldKeys.secretKey);
const c2 = createRotationCert(c1, oldKeys.secretKey, newKeys.secretKey, "scheduled_rotation");
const c3 = createContinuationCert(c2, newKeys.secretKey);
console.log(verifyChain([c0, c1, c2, c3])); // trustLevel: "rotated"Express middleware
import express from "express";
import { sccDiscovery } from "botindex-scc";
const app = express();
const store = {
getCurrent: async () => currentCert,
getChain: async () => certChain,
};
const router = sccDiscovery(store);
app.use(router);References
- SCC v1.0 spec:
specs/scc-v1.0.md - Companion standard (AAR): https://github.com/Cyberweasel777/agent-action-receipt-spec
License
MIT
