Knowledge Base
What is a DID Document
A DID Document is a key component of a decentralized identity system. It describes how to interact securely with the subject identified by a DID (Decentralized Identifier).
Every DID resolves to a corresponding DID Document, which contains the public information necessary to establish trusted, secure communication with the DID’s owner.
What’s Inside a DID Document?
A DID Document is typically a JSON or JSON-LD file and includes:
- Public Keys: Used to verify digital signatures and encrypt data.
- Authentication Methods: Ways to prove control of the DID (e.g., via cryptographic signatures).
- Service Endpoints: URLs or other contact methods, such as messaging or credential issuance endpoints.
- Verification Relationships: Definitions of how the keys can be used (e.g., for authentication, assertion, delegation).
Example Structure
{
"@context": "https://www.w3.org/ns/did/v1",
"id": "did:example:123456789abcdefghi",
"verificationMethod": [{
"id": "did:example:123456789abcdefghi#keys-1",
"type": "Ed25519VerificationKey2018",
"controller": "did:example:123456789abcdefghi",
"publicKeyBase58": "H3C2AVvLMfQ1...etc"
}],
"authentication": [
"did:example:123456789abcdefghi#keys-1"
],
"service": [{
"id": "did:example:123456789abcdefghi#vcs",
"type": "VerifiableCredentialService",
"serviceEndpoint": "https://example.com/vc/"
}]
}
Why Is It Important?
The DID Document enables:
- Verification of Identity: You can cryptographically verify that the person or system claiming a DID actually controls it.
- Secure Communications: Service endpoints allow encrypted communication with the DID subject.
- Interoperability: DID Documents follow a standard format, making them readable and usable across platforms and ecosystems.
Where Is It Stored?
Depending on the DID method, the DID Document can be:
- Stored on-chain (e.g., on a blockchain),
- Stored off-chain and referenced by the DID,
- Dynamically generated when the DID is resolved.
Related Terms
- DID: The decentralized identifier itself.
- DID Resolver: A tool that looks up a DID and returns the corresponding DID Document.
- Verifiable Credential (VC): A signed digital credential that often links back to a DID Document for verification.