Credentials
Issue, hold, and verify W3C Verifiable Credentials with a pure JavaScript SDK. No native dependencies, no server required.
The credential lifecycle
Every credential follows three stages: Issue, Hold, and Verify.
- Issue — An issuer signs claims about a subject, producing a Verifiable Credential.
- Hold — The subject stores the credential in a wallet or vault.
- Verify — A verifier checks the signature, expiration, issuer, and optional revocation status.
The SDK
The @attestto-com/vc-sdk package implements the full lifecycle.
Terminal
npm install @attestto-com/vc-sdk Highlights
- W3C VC Data Model v2.0 — fully compliant credential structure and JSON-LD contexts.
- Zero native dependencies — pure JavaScript cryptography via
@noble/curves. Works in Node.js, Deno, Bun, and the browser. - Ed25519 + ES256 — two signature algorithms out of the box.
- Pluggable schema system — extend with domain-specific credential types and JSON-LD contexts.
- DID-agnostic — works with any DID method (did:web, did:sns, did:key, did:pki).
Quick example
overview.ts
import { VCIssuer, VCVerifier, generateKeyPair } from '@attestto-com/vc-sdk' // Generate keys and issue a credential const keys = generateKeyPair() const issuer = new VCIssuer({ did: 'did:web:example.com', privateKey: keys.privateKey }) const vc = await issuer.issue({ type: 'ProfessionalLicense', subjectDid: 'did:web:holder.example.com', claims: { license: 'Engineering', number: 'ENG-2026-001' }, }) // Verify it const verifier = new VCVerifier() const result = await verifier.verifyWithKey(vc, keys.publicKey, 'Ed25519') console.log(result.valid) // true
No server needed. The SDK runs entirely client-side. Keys are generated
in-process and credentials are self-contained — no API calls, no blockchain writes required
for basic issuance and verification.
Documentation
Issuing Credentials
VCIssuer API, configuration, issue options, and schema plugin integration.
Verifying Credentials
VCVerifier API, verification modes, check results, and tamper detection.
Key Management
Key generation, Ed25519 vs ES256, low-level crypto utilities, and storage guidance.
Schemas & Plugins
SchemaPlugin interface, JSON-LD context injection, and custom type definitions.
Costa Rica Credentials
CR-specific credential types: driving licenses, medical certificates, vehicle inspections.