@ddsm/core
v0.1.0
Published
DDSM protocol core — pure validation, parsing, proof verification
Downloads
94
Readme
@ddsm/core
Pure-functional core of the DDSM protocol — token types, validation, proof verification, log compaction, and selective disclosure. No I/O, no side effects.
Install
npm install @ddsm/coreWhat's in the box
| Export | Description |
|---|---|
| DDSMToken, SchemaManifest, LogEntry | Core protocol types |
| parseToken | Parse and structurally validate a raw token object |
| verifyProofChain | Verify every log entry signature back to genesis |
| getTransitionContract, validateParams | Manifest-driven transition rules |
| applyTransition | Compute the next token state |
| compactLog, verifyLogRoot | Log compaction and root verification |
| encryptParams | Field-level selective disclosure |
Usage
import { parseToken, verifyProofChain } from "@ddsm/core";
const result = parseToken(rawToken);
if (!result.ok) throw new Error(result.error.message);
const token = result.value;
const verified = await verifyProofChain(token, resolver);Packages
| Package | Description |
|---|---|
| @ddsm/core | This package |
| @ddsm/processor | Stateful processor, signing, reconciliation |
| @ddsm/ledger-postgres | PostgreSQL LedgerAdapter |
| @ddsm/cli | CLI / REPL |
