Architecture¶
simple-vc wires three small pieces: an Ed25519 did:key identity, JWT credential signing via
did-jwt-vc, and offline verification via key-did-resolver.
flowchart LR
subgraph Issue
K["Ed25519 keypair"] --> D["did:key (public key embedded)"]
D --> I["issueCredential()"]
I --> J["VC as EdDSA JWT"]
end
subgraph Verify
J --> V["verifyCredentialJwt()"]
R["key-did-resolver<br/>(offline)"] --> V
V --> O["{ verified, issuer, credential }"]
end
Module map¶
| Module | Responsibility |
|---|---|
did.ts |
Generate a did:key from an Ed25519 key; build the did-jwt signer |
issue.ts |
Build the VC payload and sign it as a JWT |
verify.ts |
Resolve the issuer DID offline and verify the signature |
Design principles¶
- Offline by construction — the public key lives in the DID, so verification needs no registry or network.
- Tiny surface — three functions; advanced SSI (revocation, rotation, wallets) is out of scope by design.
- Deterministic identities — a 32-byte seed always yields the same DID, so you can persist and reload an issuer.