Skip to content

Guide

Midnight DID lets an application publish DID method state to a Midnight smart contract, resolve that state into a W3C DID Document, and use the published keys for authentication, credentials, services, and Midnight-native SchnorrJubjub verification.

Choose Your Path

GoalStart here
Try the main flow in a standalone environmentQuickstart
Choose network endpoint defaultsNetwork Endpoints
Bootstrap an issuer DID with real Ed25519 and SchnorrJubjub keysAPI Examples
Understand supported keys and signing pathsKey Model
Learn the DID method rulesDID Method
Work on Compact circuitsCompact Contract Surface
Pick the right TypeScript packageLibs
Contribute to this repositoryDevelopment

What Lives Here

This repository owns the DID method implementation:

  • Compact DID contract and generated runtime package.
  • TypeScript domain validation and DID Document normalization.
  • Ledger-to-domain mapping and in-process resolver helpers.
  • API helpers for DID contract lifecycle and updates.

Deployable resolver services, DID manager UI/backend, reusable secret storage, and local key-custody workflows live in midnight-did-resolver. VC/VP protocol work lives in midnight-verifiable-credentials.

Security Note

Controller-gated DID updates use wallet-local Jubjub Schnorr signatures over a domain-separated digest containing the DID contract id, current version, operation name, and operation arguments. A delegated proof server receives signature material, not the controller secret. See Key Model, the DID Method security considerations, and the repository SECURITY.md for the current trust boundary and threat model.

Midnight DID reference implementation