@nobulex/core
v1.0.2
Published
Credit scores for AI agents. Every action builds a verifiable track record.
Maintainers
Readme
@nobulex/core
Credit scores for AI agents. Cryptographic receipts for every agent action, Ed25519 signed over RFC 8785 canonical JSON. The verified track record becomes portable trust.
Install
npm install @nobulex/coreUsage
import { generateKeyPair, buildCovenant, verifyCovenant } from "@nobulex/core";
const kp = await generateKeyPair();
const covenant = await buildCovenant({
issuer: { id: "alice", publicKey: kp.publicKeyHex, role: "issuer" },
beneficiary: { id: "bob", publicKey: kp.publicKeyHex, role: "beneficiary" },
constraints: "permit read on '/data/**'",
privateKey: kp.privateKey,
});
const result = await verifyCovenant(covenant);
console.log(result.valid); // trueverifyCovenant returns { valid, checks }, where checks lists each
individual verification (id match, signature, constraint schema). Change any
field of the document and valid becomes false.
API
generateKeyPair()- Ed25519 keypair (privateKey,publicKeyHex)buildCovenant(options)- build and sign a covenant documentverifyCovenant(doc)- verify signature, id, and constraintscountersignCovenant(doc, keyPair, role)- add a counterparty signatureresolveChain(doc, resolver)- walk a delegation chainserializeCovenant/deserializeCovenant- JSON round-trip
Verify
Receipts and covenants verify offline — verifyCovenant(doc) checks the
signature, id, and constraints with no network call. A hosted verification
service (paid tiers, trust scores, compliance reports) is implemented in
packages/verify-api/ but is not yet deployed to nobulex.com.
