Skip to content

Architecture Deep‐Dive

Mohamed Abdelaziz ‬‏ edited this page Jun 25, 2026 · 1 revision

Architecture Deep-Dive

Back to Home


Overview

AxiomID is structured as a layered identity infrastructure with four distinct tiers, each responsible for a specific concern in the identity lifecycle.


System Layers

┌──────────────────────────────────────┐
│           Layer 4: Interface             │
│   REST API | MCP Tools | WebSocket       │
├──────────────────────────────────────┤
│           Layer 3: Logic                 │
│  Trust Engine | Gate Enforcer | Delegat. │
├──────────────────────────────────────┤
│           Layer 2: Identity              │
│  DID Resolver | VC Verifier | Key Mgmt   │
├──────────────────────────────────────┤
│           Layer 1: Chain                 │
│  Ethereum | Polygon | Solana | IPFS      │
└──────────────────────────────────────┘

Component Breakdown

1. DID Resolver

Responsible for resolving did:axiom:<method-specific-id> identifiers into DID Documents.

  • Input: DID string
  • Output: W3C DID Document (JSON-LD)
  • Resolution path: Cache → IPFS → On-chain registry
  • Supported ledgers: Ethereum mainnet, Polygon PoS, Solana
interface DIDResolutionResult {
  didDocument: DIDDocument;
  didResolutionMetadata: ResolutionMetadata;
  didDocumentMetadata: DocumentMetadata;
}

2. Trust Score Engine

Computes and maintains a dynamic trust score [0, 1000] for each DID.

  • Inputs: On-chain activity, attestations, delegation history, behavioral signals
  • Model: Weighted multi-factor scoring with time-decay
  • Update frequency: Event-driven (real-time) + periodic recalculation (hourly)
  • See: Trust Score Algorithm

3. Soul Gate Enforcer

Enforces access control based on Soul Bound Token (SBT) ownership and trust thresholds.

4. Delegation Manager

Handles hierarchical agent-to-agent delegation with scoped, time-limited credentials.

interface DelegationCredential {
  issuer: DID;          // Parent agent DID
  subject: DID;         // Delegated agent DID  
  scope: string[];      // Allowed actions
  expiresAt: number;    // Unix timestamp
  maxDepth: number;     // Max delegation chain depth
  signature: string;    // Ed25519 signature
}

5. VC Verifier

Verifies W3C Verifiable Credentials presented by agents or users.

  • Supported proof types: Ed25519Signature2020, EcdsaSecp256k1Signature2019
  • Revocation check: Against on-chain revocation registries
  • Schema validation: JSON Schema + DIF Credential Manifest

Data Flow: Identity Verification Request

Client                    Gateway              DID Resolver         Trust Engine
  |                          |                      |                    |
  |-- POST /verify --------> |                      |                    |
  |                          |-- resolve(did) -----> |                    |
  |                          |                      |-- IPFS lookup      |
  |                          |                      |<- DIDDocument -    |
  |                          |<- DIDDocument ------- |                    |
  |                          |-- getScore(did) -------------------------------->
  |                          |                                            |
  |                          |<- TrustScore(850) -------------------------|
  |                          |                                            |
  |                          |-- checkGate(did, scope)                    |
  |                          |    [Soul Gate Enforcer]                    |
  |                          |<- ALLOW                                    |
  |<- 200 { verified: true } |                                            |

Key Design Decisions

Decision Rationale
W3C DID Core compliance Interoperability with existing DID ecosystem
Event-driven Trust Score updates Low latency for real-time gate decisions
Multi-chain anchoring Resilience and cross-ecosystem reach
Ed25519 as default key type Performance + security balance
IPFS for DID Document storage Content-addressed, immutable, decentralized
Delegation depth limit (default: 3) Prevent unbounded delegation chains

Module Structure

src/
├── did/
│   ├── resolver.ts        # DID resolution logic
│   ├── document.ts        # DID Document builder
│   └── registry.ts        # On-chain registry client
├── trust/
│   ├── engine.ts          # Score computation
│   ├── factors/           # Individual scoring factors
│   └── decay.ts           # Time-decay model
├── soul/
│   ├── gate.ts            # Gate enforcement
│   └── sbt.ts             # SBT verification
├── delegation/
│   ├── manager.ts         # Delegation lifecycle
│   └── credential.ts      # DelegationCredential type
├── api/
│   ├── rest/              # Express routes
│   └── mcp/               # MCP tool definitions
└── chain/
    ├── ethereum.ts
    ├── polygon.ts
    └── solana.ts

→ Next: DID Method Specification

Clone this wiki locally