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

# How It Works

> The Soverage verification flow step by step

This page describes the user journey through Soverage Gateway and what happens at each stage.

## User verification flow

```mermaid theme={null}
sequenceDiagram
    participant U as User
    participant G as Soverage Gateway
    participant D as DLT

    U->>G: 1. Connect wallet
    U->>G: 2. Verify document
    G-->>U: Score + commitment
    G->>D: 3. Create DID
    G-->>U: DID assigned
    U->>G: 4. Additional attestations
    G->>D: Record attestations
    G-->>U: Score updated
    U->>G: 5. Issue VC
    G-->>U: Credential issued
    U->>G: 6. Mint Personhood Token
    G->>D: Mint token
    G-->>U: Token minted
```

## 1. Wallet connection

The user connects a wallet to establish their on-chain identity. This wallet is used to sign credentials and anchor the DID. No funds are transferred.

Supported: any [WalletConnect](https://walletconnect.com/)-compatible wallet, including [HashPack](https://www.hashpack.app/) and other Hedera wallets.

## 2. Document verification

The user uploads a government-issued ID. The document is analyzed for liveness, authenticity, and consistency. Processing is ephemeral: the image is analyzed in memory and immediately discarded.

The result is a base personhood score and a cryptographic commitment (one-way hash) of the verification outcome. No document data is stored.

## 3. DID creation

A [Decentralized Identifier (DID)](https://www.w3.org/TR/did-core/) is created and anchored on-chain. Each DID gets its own consensus topic where the DID document is published and can be independently resolved. The DID is the anchor for all subsequent credentials.

Format: `did:hedera:testnet:z6Mk...`

## 4. Additional attestations

Users complete additional attestations to strengthen their identity profile:

* **Email**: ownership verified via one-time code
* **Phone**: ownership verified via SMS code
* **Device**: possession verified via [WebAuthn](https://www.w3.org/TR/webauthn-2/) passkey/biometric
* **Social account**: verified via OAuth (e.g. Google)

Each attestation generates a cryptographic commitment and is recorded on-chain. New attestation types may be added over time.

The personhood score (0-100) increases with each independent signal.

## 5. Credential issuance

Once the user completes at least two attestations (document plus one additional), a [Verifiable Credential (VC)](https://www.w3.org/TR/vc-data-model/) is issued. This is a W3C-standard credential containing the user's DID, personhood score, and cryptographic proof ([Ed25519](https://datatracker.ietf.org/doc/html/rfc8032) signature), issued via [OID4VCI](https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html).

## 6. Personhood Token minting

After the VC is issued, the user can mint a **Personhood Token**: a non-transferable token minted on-chain. One per user, publicly verifiable.

## What credentials contain

| Field             | What it proves                                        |
| ----------------- | ----------------------------------------------------- |
| Personhood score  | Strength of identity proof (0-100)                    |
| Attestation types | Which independent checks the user completed           |
| DID               | The user's unique, self-sovereign identifier          |
| VC proof          | Cryptographic guarantee the credential is authentic   |
| Personhood Token  | On-chain proof the wallet belongs to a verified human |

All verification can happen without contacting Soverage directly. Credentials are portable and self-verifiable.
