Skip to content

Midnight DID Method Traits

This document summarizes how the Midnight DID method aligns with the DID Method Traits maintained by the Decentralized Identity Foundation.

Core Identifier Traits

TraitStatusNotes
Deterministic / namespaceddid:midnight:{network}:{64-hex} derived from contract address; avoids collisions across networks.
Self-certifyingDID value is not derived from controller key; security anchored in on-chain contract + wallet-local controller signatures.
Ledger anchoredAll CRUD operations interact with Midnight ledger smart contract.
Method-specific syntaxDefined in Midnight DID Method §2; conforms to RFC3986 and W3C-DID requirements.

CRUD Lifecycle Traits

TraitStatusNotes
CreateContract deployment creates DID state.
Read / Resolvepackages/did/src/ledger-to-domain.ts reconstructs DID Document from ledger state.
UpdateIndividual contract circuits handle adds/updates/removals with controller-signature authorization.
DeactivateDeactivation operation prevents further updates.
RecoverDedicated recoveryAuthorityPublicKey authorizes recoverControllerKey to rotate the active controller key. Threshold/social recovery and recovery-authority rotation remain outside this method version.

Verification Method Traits

TraitStatusNotes
Key rotation / revocationAdd/Update/RemoveVerificationMethod + relation ops.
Key type diversityRestricted to explicit JWK profiles (RFC7517) (OKP/Ed25519/X25519/BLS12381G1/BLS12381G2, EC/Jubjub/P-256/secp256k1). publicKeyMultibase/Multikey is unsupported in this method version.
Multi-controller keysThe contract stores one active controller public key plus a recovery authority public key. Multi-controller or threshold custody remains outside the current method surface.
Relative key IDsFragment identifiers supported (#key-1).

Service Endpoint Traits

TraitStatusNotes
Service entry supportservice array with id, type, serviceEndpoint.
Endpoint formats (CID-1.0)Strings, objects, and arrays; JSON stored on-ledger.
Relative service IDsFragment/relative URIs required.
Absolute external IDsNon-DID absolute URIs disallowed.

Controller / Authorization Traits

TraitStatusNotes
Single controllerContract enforces single controller equal to DID.
Multi-controllerNot supported on-chain. Recovery uses a dedicated authority that can only rotate the active controller key and does not act as a second active controller.
Delegated updatesWallet-local controller signatures authorize updates without revealing the controller secret to proof servers.
On-chain access controlCircuits verify wallet-local controller signatures against controllerPublicKey; recovery verifies a narrow recovery signature against recoveryAuthorityPublicKey.

Operational Traits

TraitStatusNotes
Batch operationsOne circuit call per operation (no batching).
Network portabilityWorks on undeployed/devnet/testnet/mainnet/preview/preprod.
Privacy guidanceSpec discourages PII on-chain; ZK witness protects updates.
Service discoveryIndexers/resolvers dependent on Midnight network (Midnight DID Method §10).

Status icons: ✔ Supported · △ Partial support / restriction · ✖ Not supported.

Midnight DID reference implementation