> ## Documentation Index
> Fetch the complete documentation index at: https://docs.terminal3.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Decentralized ID (DID)

> Decentralized Identities and their methods

Terminal 3 provides universal identities for both humans and AI agents based on W3C’s [Decentralized Identifiers (DID)](https://www.w3.org/TR/did-core/) global standard specs.

# What is a Decentralized Identifier (DID)?

DIDs are identifiers that enable verifiable, decentralized digital identities. A DID refers to any subject (e.g. a person, group, organization, abstract entity, etc.) as determined by the controller of the DID.

Specifically, DIDs are [URIs](https://www.rfc-editor.org/rfc/rfc3986) (unique digital addresses) that associate a DID subject with a DID document allowing trustable interactions associated with that subject. Similar to a URL, when you resolve a DID, you receive a DID document in JSON, JSON-LD, or similar format.

## A simple DID example

A DID is a simple unique text string consisting of three parts:

1. the `did` URI scheme identifier;
2. the identifier for the DID method; and
3. the DID method-specific identifier.

<img src="https://mintcdn.com/terminal3/vagtjUsbj5tjpaLf/images/did/did-identifier.png?fit=max&auto=format&n=vagtjUsbj5tjpaLf&q=85&s=41126e9960a4f62398eed0937132295a" alt="DID-method specifier identifier" width="2000" height="628" data-path="images/did/did-identifier.png" />

The example DID above resolves to a DID document.

## **Multiple DIDs**

A subject may have as many DIDs as they want for different use cases, such as:

* a DID for educational certificates; or
* a DID for verified identity / KYC documents; or
* a DID for online gaming accounts.

# What is a DID Document?

A DID document contains information associated with the DID, such as ways to cryptographically authenticate a DID controller.

```json theme={null}
{
  "@context": [
    "https://www.w3.org/ns/did/v1",
    "https://w3id.org/security/suites/ed25519-2020/v1"
  ]
  "id": "did:example:123456789abcdefghi",
  "authentication": [{
    "id": "did:example:123456789abcdefghi#keys-1",
    "type": "Ed25519VerificationKey2020",
    "controller": "did:example:123456789abcdefghi",
    "publicKeyMultibase": "zH3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
  }]
}
```

# DID Methods

A DID method (and its spec) defines the precise operations by which DIDs and DID documents are created, resolved, updated, and deactivated.

There are currently more than [150](https://www.w3.org/TR/did-spec-registries/#did-methods) DID methods out there, which can be categorized into 4 main types based on their **storage method**:

* Centralized: relies on a Web2 server
* Blockchain-based: the “original” DID method involving a blockchain
* Hybrid: uses decentralized storage to store its documents
* Static: no data registry is required; can be created and resolved by encoding/decoding data directly.

<Tip>
  Terminal 3 currently provides a custom `did:t3n` DID.
</Tip>

|                           | Centralized                              | Blockchain-based                         | Hybrid                                   | Static               |
| ------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -------------------- |
| Privacy                   | low                                      | high                                     | high                                     | medium               |
| Self-Sovereign?           | no                                       | yes                                      | yes                                      | yes                  |
| Data Registry Required?   | yes                                      | yes                                      | yes                                      | no                   |
| (web2 server)             | yes                                      |                                          |                                          |                      |
| (Blockchain)              |                                          | yes                                      | yes                                      |                      |
| (L2 storage)              |                                          |                                          | yes                                      |                      |
| Decentralized?            | no                                       | yes                                      | yes                                      | yes                  |
| Complexity                | simple                                   | complex                                  | medium                                   | simple               |
| Transaction Fee Required? | no                                       | yes                                      | yes                                      | no                   |
| (when updating)           |                                          |                                          | yes                                      |                      |
| Mutable?                  | yes                                      | no                                       | no                                       | no                   |
| Supported Operations      | create<br />read<br />update<br />delete | create<br />read<br />update<br />delete | create<br />read<br />update<br />delete | create<br />read     |
| Example                   | did:web                                  | did:ethr<br />did:btcr<br />did:dock     | did:3<br />did:ion<br />did:elem         | did:key<br />did:pkh |

# DID System Architecture

### Generic DID Architecture

<img src="https://mintcdn.com/terminal3/vagtjUsbj5tjpaLf/images/did/generic-did-architecture.png?fit=max&auto=format&n=vagtjUsbj5tjpaLf&q=85&s=458449eb6791148e38e0927e626d3b11" alt="Generic DID architecture" width="2000" height="1176" data-path="images/did/generic-did-architecture.png" />
