# Decentralized Identifiers (DIDs)

In our digital lives, we constantly prove who we are, usually by logging into services with a username and password controlled by a company like Google, Facebook, or Apple. This creates a centralized model where our digital identity is owned and managed by others. **Decentralized Identifiers (DIDs)** are a new approach that put you back in control.

This document explains what DIDs are, why they are important, and how they serve as the foundation for reputation and trust on the Toto Chain.

### What is a Decentralized Identifier (DID)?

A Decentralized Identifier (DID) is a new type of globally unique identifier that is created and controlled by an individual, not by a central authority or company. According to the World Wide Web Consortium (W3C), a DID is a new type of identifier that is "globally unique, resolvable with high availability, and cryptographically verifiable."

Think of it like this:

* A **username** is an identifier given to you by a website. The website can take it away.
* An **email address** is an identifier given to you by a provider (like Google or Microsoft). The provider can shut down your account.
* A **DID** is an identifier you create for yourself. Only you control it, and it can last forever, independent of any single service or company.

A DID is the foundation of self-sovereign identity—the principle that individuals should own and control their own digital identity.\
\
A DID is structured as a URI with a specific format: `did:method:method-specific-identifier`.

* **`did`**: The standard prefix for all DIDs.
* **`method`**: The name of the specific DID method or blockchain. For the Toto Chain, this is **`toto`**.
* **`method-specific-identifier`**: A unique identifier on that specific network, which on the Toto Chain is the ETH address of the account that controls the DID.

An example of a Toto Chain DID looks like this: `did:toto:0x73d64a272e6C5ba739bB408F9e36a8845523eb9f`

### The Difference Between an Account and a DID

It is essential to understand that on the Toto Chain, your **account** and your **DID** are two separate things that work together. They are **not** the same.

<table data-header-hidden><thead><tr><th width="114"></th><th></th><th></th></tr></thead><tbody><tr><td>Aspect</td><td><strong>Account (SS58 Address)</strong></td><td><strong>Decentralized Identifier (DID)</strong></td></tr><tr><td><strong>Purpose</strong></td><td>To <strong>act</strong> on the blockchain. It holds funds, pays for transactions, and signs messages.</td><td>To <strong>represent</strong> your identity. It is a stable anchor where your credentials and reputation are attached.</td></tr><tr><td><strong>Format</strong></td><td>ETH Address (e.g., <code>0x73d6...3eb9f</code>)</td><td>DID URI (e.g., <code>did:toto:0x73d6...3eb9f</code>)</td></tr><tr><td><strong>Control</strong></td><td>Is the <strong>controller</strong>. It is the keypair (public/private key) that has the power to make changes.</td><td>Is the <strong>controlled object</strong>. Its ownership and properties can be managed by the controlling account.</td></tr><tr><td><strong>Lifespan</strong></td><td>Can be lost or compromised. If you lose your private key, you lose control of the account.</td><td>Can be permanent. If your controlling account is compromised, you can assign a new account to control your DID.</td></tr></tbody></table>

**Analogy:** Think of the **account** as the driver of a car and the **DID** as the car's license plate and registration. The driver (account) operates the vehicle, but the license plate (DID) represents the vehicle's official identity. The driver can change, but the car's identity remains the same.

### How DIDs and Accounts Work Together on the Toto Chain

On the Toto Chain, your account is the tool you use to manage your identity, which is represented by your DID.

1. **Creation and Control:** When you create a DID on the chain, your account is assigned as its first **controller**. This means only your account's private key can authorize changes to the DID, such as adding a new credential.
2. **The Foundation for Reputation:** By itself, a new DID has no reputation. It is an empty vessel. Its value comes from the verifiable credentials, or **attestations**, that are attached to it over time by its controlling account.
3. **Building Trust:** As your account signs transactions to link credentials to your DID (like an email address or a social media account) and participates in the "web of trust," you build your on-chain reputation. All of this information is associated with your **DID**, not just the account, creating a rich and portable digital identity that you truly control.

This system ensures that when you interact on the chain, others can trust your identity based on the verifiable claims attached to your DID, all without you having to reveal any private information.

### Applications of Decentralized Identity

The concept of DID has powerful applications that go far beyond the Toto Chain. It is a fundamental building block for a more secure and user-centric internet.

Some key applications include:

* **Secure, Password-less Logins:** Instead of using a password, you can prove control over your DID to log in to websites and applications, eliminating the risk of password theft.
* **Verifiable Credentials:** A DID can hold verifiable claims from trusted issuers. For example, a university could issue a verifiable diploma to your DID. You could then prove you have a degree to a potential employer without the employer needing to contact the university directly.
* **Enhanced Privacy and Data Control:** With a DID, you can grant services selective and revocable access to your personal data. You decide what to share, with whom, and for how long, rather than agreeing to broad and invasive terms of service.
* **Building Trust in the Digital World:** DIDs provide a way to establish trust between parties who don't know each other. This is essential for decentralized finance (DeFi), online marketplaces, and secure communication.

By using DIDs, the Toto Chain not only builds a robust reputation system but also aligns with the broader movement towards a more private, secure, and user-controlled internet.

*For more technical details, you can refer to the* [*official W3C DID 1.0 specification*](https://www.w3.org/TR/did-1.0/)*.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://totochain.gitbook.io/totochain/knowledge-base/decentralized-identifiers-dids.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
