Skip to content

Build with VC Core ​

VC Core supplies reusable credential and presentation structures, proof primitives, and conformance evidence. A developer can compose these into a credential system, but the packages do not make a trust or business decision on their own. This guide follows the boundary in the core-only decision.

Release context. All three VC packages are published at 1.0.0 under the latest npm tag and use the published Midnight DID 1.0.0 cohort where the optional binding needs it. Install one exact VC package cohort before composing it. The older VC RC3 tarballs retain DID RC3 dependencies; do not mix them with the stable package graph. See the stable release notes for upgrade limits and evidence.

What the packages provide ​

“Supported primitive” means an operation or structure implemented and covered by this repository, not a complete application workflow. “Partial” means the core supplies building blocks, but the developer must supply code, policy, or authenticated evidence to achieve the goal. “Outside core” means this repository does not ship the named operation or service. The conformance inventory documents individual operations; it is not evidence of a deployed credential application. Scroll tables and diagrams sideways when a column or actor is outside the visible area.

Developer goalScope todayWhat VC Core providesWhat the consumer still needsCurrent evidence and limit
Issue a credentialPartialCredential body and issuer proof primitives; optional signer-authorization checks.A concrete schema and claim encoding, issuer key management, authorization policy, delivery to the holder, and storage.Core vectors and a synthetic packed composition; no issuance service or protocol.
Verify a credential or presentationPartialBody-root and proof checks, generic VC-to-VP relations, and explicit-holder presentation composition.Accepted issuer and holder keys, schema-specific claim checks, request freshness, status evidence, trusted time, and application policy.Core vectors and synthetic composition. A valid proof is only one input to an acceptance decision.
Selectively disclose a claimPartialDisclosure-mode metadata and typed claim/commitment slots.Schema-specific split, commitment opening, disclosure relation, and a check that private fields never enter public claims.Metadata does not enforce the public/private split; see #674.
Prove a predicate, such as age at least 18Outside coreGeneric claim-root and presentation binding primitives can support a consumer circuit.A schema-specific predicate circuit, accepted inputs, authenticated comparison time, and negative tests.No generic age or predicate circuit is shipped here.
Bind a holderSupported primitiveExplicit-holder binding and a composed presentation proof that matches the accepted key.An independently authenticated holder key and a policy for rotation or loss.Positive and substitution vectors; hidden or unlinkable holder profiles are outside core.
Check revocation or statusPartialSigned status-binding structure and structural validation.Live status evidence, authenticated authority/root, freshness, outage handling, and a policy for status-free credentials.Binding vectors only. No live status verifier is shipped; see #746.
Bind a Midnight DID methodSupported primitiveOptional DID-to-core binding, including an expected network and method root.A trusted resolver or snapshot source, accepted DID state and relationship, and key-rotation policy.Adapter and conformance tests; no live DID resolution is established by the core fixture.
Protect privacyPartialCommitments and context binding can support data minimization when composed correctly.Secret openings, schema disclosure enforcement, storage and logging controls, unlinkability analysis, and consent policy.No automatic privacy guarantee; public claims, metadata, handles, and repeated proofs can correlate users.

The model package validates schema metadata, not claim values or their placement in a public credential body. The Compact package is schema-neutral. The DID extension is optional. None ships a wallet, transport, concrete credential type, trust registry, or verifier application.

An age-eligibility journey ​

Suppose a venue asks a holder to prove that they are at least 18 without receiving their birth date. This is an illustrative composition, not a runnable age credential or a claim that the current packages enforce that privacy outcome by themselves. A concrete implementation and its tests belong in an independently versioned consumer repository; #538 tracks that external evidence.

This sequence shows where the reusable package operations stop and where the issuer, holder, and verifier applications take over. The age predicate proof is consumer-owned.

StepCore contributionRequired consumer work
1. Define the credentialThe model package validates schema identifiers, version, claim paths, and disclosure classifications.Choose a birth-date claim, mark it predicate-only, define its canonical representation and commitment, and test that it cannot appear in public claims. The metadata tag alone does not enforce this; see #674.
2. Issue itThe Compact core binds a typed credential body, schema reference, claim root, holder/status bindings, and an issuance-context proof. The optional DID extension maps a selected issuer method on an explicit network.Authenticate the source birth date, choose an authorized issuer key, produce and protect the private opening, deliver the credential to the holder, and decide how issuer authorization is maintained.
3. Prepare the requestThe presentation context separates the holder proof from an issuance proof.The verifier chooses an audience, fresh challenge, age threshold, and an authenticated comparison time. It records challenge use to prevent replay.
4. PresentThe generic VC-to-VP relation and explicit-holder composition bind the presented credential, holder method, accepted key, and presentation proof.A schema-specific circuit must prove the age predicate from the committed birth date against the accepted time, without disclosing the date. A wallet or transport moves the request and response.
5. DecideCore operations can establish the named cryptographic and structural relations.Run the verification decision flow, including issuer trust, predicate validity, holder authorization, status, time, request scope, and venue policy.

The existing packed consumer flow tests a synthetic DID-backed VC/VP composition and substitution failures. It does not implement the age predicate, a wallet, a live status authority, or a deployed verifier. Until a consumer example demonstrates those pieces with exact released package versions and its own CI, this page is a map for building the system rather than an executable tutorial.

For this venue, accept would mean that the accepted issuer and holder keys, the birth-date commitment and age predicate, the requested threshold and time, any required status, the fresh challenge, and venue policy all check out. A false age predicate or an expired credential is reject. If the venue requires status but its authority cannot be reached or its evidence is stale, the result is indeterminate until fresh authenticated evidence is obtained.

Verification decision flow ​

An application should reach accept only after every check required by its policy succeeds. The table separates what a successful core operation establishes from the additional decision the verifier must make. The proof specification and security considerations remain authoritative.

The outcome is a verifier decision, not a return value promised by one core function. A failed required check is reject; missing required authority or evidence is indeterminate until the verifier can establish it.

CheckWhat success establishesWhat success does not establish
Exact schema and canonical bodyThe supplied body and proof use the expected schema reference and a root recomputed from the complete body.Claim meaning, schema-specific encoding, or that a hidden claim stayed out of public fields.
Issuer proofThe issuer proof key signed this exact credential body in the issuance context.That the key or issuer is trusted. Use an accepted signer authorization or an explicit local trust decision.
Presentation and holder proofThe presentation relates to that credential, and the explicit-holder proof matches the independently accepted holder key.That the supplied key is currently authorized by a DID or that the verifier request is fresh.
Disclosures or predicatesA consumer-owned schema circuit, if present, establishes its exact disclosed relation or predicate statement.A generic promise of selective disclosure or that all application-required claims were checked.
Credential statusAuthenticated consumer-owned evidence establishes the policy-required status for the exact credential and registry.A status binding alone never proves non-revocation. Missing, stale, or unavailable required evidence is indeterminate, not valid.
Time and request contextAn authenticated clock and request state establish expiry, audience, challenge freshness, and replay policy.Signed issued-at, expires-at, or proof-created-at fields are not trusted time by themselves.
Application policyThe verifier has checked the required age threshold, acceptable issuer, jurisdiction, purpose, and any other local rules.A core proof does not choose or enforce those business rules.

Decision rule: reject a proven invalid signature, relation, predicate, or policy condition. Treat a required check whose authority or evidence cannot be established as indeterminate; retry or escalate according to the application policy, but do not convert it to accept. Only accept when every required check has a valid result. A policy may explicitly allow status-free credentials, but it must not describe a missing required status check as non-revocation.

Credential lifecycle and outages ​

The data model, status semantics, and signer authorization rules define the underlying bindings. The consumer owns the current evidence and policy shown below.

EventCore behaviorConsumer response
Credential expiresThe envelope checks expiration-field ordering when expiration is present; its timestamps are signed assertions.Compare expiration with authenticated time. Reject an expired credential under the selected policy; decide whether renewal or reissuance is possible.
Credential is revokedA status-bound credential fixes a registry and handle in the signed body.Obtain authenticated, fresh status evidence for that exact binding. Reject a revoked result. If required evidence is unavailable, return indeterminate and fail closed.
Issuer DID key rotatesA DID method root and signer descriptor bind the selected method/key and observed state.Re-resolve or accept a separately authenticated snapshot, process a newer authorization decision, and reject replay of older active decisions. Rotation does not silently authorize the new key; historical-trust policy needs separate evidence.
Holder key rotates or is lostExplicit holder binding still names the original method.Authenticate any replacement key and decide whether the credential can be re-bound or must be reissued. A new key alone does not satisfy the old binding.
Status authority is down or evidence is staleStructural status-binding checks may still pass.Mark a required status check indeterminate, retry or escalate, and do not accept as non-revoked. Cache use requires an explicit freshness policy.
DID deployment or network changesThe DID binding commits the expected network; Ledger9 replacement deployments can change the DID/address.Re-resolve methods and reauthorize or reissue affected credentials and pinned roots. Do not reuse a root from another network or an old deployment.

The core's tests establish local and packed-package behavior. They do not prove live issuer, DID, status-registry, wallet, or application behavior. A complete deployment must add its own end-to-end and negative tests for those boundaries.

Midnight Verifiable Credentials core