§
🌙 Toggle Dark Mode Home MolTrust Finance MT Shopping MT Ads MT Prediction MoltGuard MolTrust Sports MT Salesguard MT Music MT Skills MT Travel MT Use Cases MolCheck verifier Integrity Dashboard MT Global · Regulated Markets VCOne Blog Developers Pricing Enterprise Partners Compliance About Publications Know Your Agent Verify Us Status Contact API Docs
DID Method Specification · v0.2 (draft) · October 2026 · CC BY 4.0

The did:moltrust DID Method Specification

Method Name: moltrust Status: Draft Version: 0.2 Authors: Lars Kroehl (kersten.kroehl@cryptokri.ch), CryptoKRI GmbH, Zurich Published: April 2026 Specification URL: https://moltrust.ch/did-method-spec


Abstract

The did:moltrust DID method defines a mechanism for creating, resolving, updating, and deactivating Decentralized Identifiers for autonomous AI agents. It is operated by MolTrust / CryptoKRI GmbH and anchors agent identity on Base L2 (Ethereum). DIDs are resolvable via the MolTrust reference registry API.


1. Introduction

Autonomous AI agents require verifiable, portable identities that are independent of any single platform. The did:moltrust method provides:


2. DID Method Syntax

2.1 Method Name

The namestring identifying this DID method is: moltrust

A DID using this method MUST begin with: did:moltrust:

2.2 Method-Specific Identifier

The method-specific identifier is a lowercase hexadecimal string of 16 characters.

did:moltrust:<method-specific-id>
method-specific-id := [0-9a-f]{16}

How the 16 characters are obtained depends on when the identifier was issued. Each identifier is issued under one of two rules.

Rule derived-sha256-ed25519-8 (from v0.2). An identifier issued under this specification from version 0.2 MUST be the first 8 bytes of the SHA-256 hash of the agent’s raw 32-byte Ed25519 public key, written as 16 lowercase hexadecimal characters. The registry MUST derive the identifier only from a key whose possession the registrant proved at registration. A key accepted without such proof would let a registrant occupy the identifier of a key they do not hold.

method-specific-id = lower-hex( SHA-256( ed25519-public-key )[0..7] )

Example. For the public key of RFC 8032, section 7.1, test 1, d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a, the SHA-256 hash of the 32 raw bytes begins 21fe31dfa154a261, and the DID is did:moltrust:21fe31dfa154a261.

Rule assigned-opaque (legacy). Every identifier issued before version 0.2 was assigned by the registry and is opaque. These identifiers remain resolvable. This specification gives no assurance that an assigned identifier is derived from any key, and a verifier MUST NOT infer a key binding from it. The key binding of such a DID is the verification method in its DID document.

Example (assigned): did:moltrust:d34ed796a4dc4698

Marker for derived identifiers (proposed, open). A derived identifier carries a single lowercase letter k before its 16 hexadecimal characters; an assigned identifier carries none. A verifier then reads the rule from the identifier itself, without asking a resolver, and every identifier issued before v0.2 stays as it is, because it is assigned.

derived:  method-specific-id = "k" lower-hex( SHA-256( ed25519-public-key )[0..7] )   ; ^k[0-9a-f]{16}$
assigned: method-specific-id = 16 lower-hex                                           ; ^[0-9a-f]{16}$

Under this proposal the example above becomes did:moltrust:k21fe31dfa154a261. The rule name stays derived-sha256-ed25519-8. Until the marker is decided, no identifier is issued in this form.

Issuance rule in the resolution result (proposed, open). A resolver states under which rule an identifier was issued, so a verifier does not have to recompute the hash to learn whether it may rely on the derivation. Proposed: a property identifierRule in the DID document metadata of the resolution result, with the value "derived-sha256-ed25519-8" when the identifier recomputes from the key on record and "assigned-opaque" otherwise.


3. DID Document

3.1 Example DID Document

{
  "@context": [
    "https://www.w3.org/ns/did/v1",
    "https://w3id.org/security/suites/ed25519-2020/v1"
  ],
  "id": "did:moltrust:d34ed796a4dc4698",
  "verificationMethod": [
    {
      "id": "did:moltrust:d34ed796a4dc4698#keys-1",
      "type": "Ed25519VerificationKey2020",
      "controller": "did:moltrust:d34ed796a4dc4698",
      "publicKeyMultibase": "z6Mk...",
      "keyAnchor": {
        "chain": "base-mainnet",
        "block": 44187055,
        "txHash": "0x..."
      }
    }
  ],
  "authentication": ["did:moltrust:d34ed796a4dc4698#keys-1"],
  "assertionMethod": ["did:moltrust:d34ed796a4dc4698#keys-1"],
  "service": [
    {
      "id": "did:moltrust:d34ed796a4dc4698#registry",
      "type": "MolTrustRegistry",
      "serviceEndpoint": "https://api.moltrust.ch/identity/resolve/did:moltrust:d34ed796a4dc4698"
    }
  ]
}

3.2 Mandatory Fields

Field Description
@context MUST include W3C DID v1 and Ed25519-2020 suite contexts
id The full did:moltrust:<id> string
verificationMethod At least one Ed25519VerificationKey2020 entry
authentication Reference to the verification method
assertionMethod Reference to the verification method

3.3 Optional Fields

Field Description
service Registry endpoint, payment service endpoints
keyAnchor On-chain anchor (Base L2 block + txHash)
alsoKnownAs Cross-registry references (e.g. ERC-8004 AgentId)
controller Principal DID for sub-agents

4. DID Operations

4.1 Create

An agent is registered by submitting a registration request to the MolTrust registry:

POST https://api.moltrust.ch/identity/register
Content-Type: application/json

{
  "display_name": "My Agent",
  "platform": "moltrust",
  "public_key": "<Ed25519 public key, base64url>"
}

On successful registration: 1. A did:moltrust:<id> is assigned 2. A DID Document is created and stored in the registry 3. The DID registration is anchored on Base L2 via Merkle batch

Anchor format:

MolTrust/AgentRegistration/1 SHA256:<hex-hash-of-DID-document>

4.2 Read (Resolve)

DID resolution is performed via HTTP GET:

GET https://api.moltrust.ch/identity/resolve/{did}
Accept: application/json

Response: W3C-conformant DID Document (see Section 3.1).

The resolver also supports external DID resolution:

GET https://api.moltrust.ch/identity/resolve-external/{external-did}

Returns the did:moltrust identity linked to the external DID via the DID Bridge mechanism (Section 6).

4.3 Update

Key rotation is supported. The agent submits a signed update request with a new Ed25519 keypair. The old key is retained in the DID Document marked "revoked": true with a revokedDate timestamp. Key history is preserved for audit purposes.

POST https://api.moltrust.ch/identity/rotate-key
X-API-Key: <agent-api-key>
Content-Type: application/json

{
  "did": "did:moltrust:<id>",
  "new_public_key": "<new Ed25519 public key, base64url>",
  "signature": "<signature over rotation payload>"
}

Rotation payload (draft). The signature is an Ed25519 signature by the key in force, base64url without padding, over the ASCII bytes of four lines joined by a single line feed:

moltrust-rotate-key/v1
<did>
<current public key, 64 lowercase hex>
<new public key, 64 lowercase hex>

The payload names the key in force, so a captured request no longer verifies once that key has been replaced. The identifier does not change on rotation; section 2.2 derives it from the key at registration time. A DID with no key on record cannot be rotated. The registry accepts new_public_key as base64url or as 64 hexadecimal characters.

The payload is draft state and may still change before this section is final. A changed payload gets a new first line (moltrust-rotate-key/v2), so a signature made under one draft never verifies under another.

4.4 Deactivate

An agent may be deactivated by the principal or registry operator:

POST https://api.moltrust.ch/identity/revoke
X-API-Key: <agent-api-key>
Content-Type: application/json

{
  "did": "did:moltrust:<id>",
  "reason": "decommissioned"
}

On deactivation: - DID Document is marked "deactivated": true - Credentials issued to the DID remain valid until their own expiry - Behavioral record is retained per the MolTrust Privacy Model - Any stake deposited is returned if no unresolved violations exist


5. Wallet Binding

A did:moltrust identity MAY be bound to one or more blockchain wallet addresses. Supported chains: Base (EVM/EIP-191), Ethereum (EVM/EIP-191), Solana (Ed25519).

Binding process: 1. Request a nonce: GET /identity/nonce?did={did}&chain={chain} 2. Sign the nonce with the wallet’s private key 3. Submit: POST /identity/bind

Once bound, the agent’s DID Document is extended with a chain-specific payment service endpoint.


6. DID Bridge (Cross-Ecosystem)

External DIDs from other ecosystems may be linked to a did:moltrust identity:

POST https://api.moltrust.ch/identity/bridge-simple
Content-Type: application/json

{
  "external_did": "did:web:api.moltbridge.ai:agents:dawn",
  "label": "MoltBridge Dawn Agent",
  "platform": "moltbridge"
}

Bridge records are publicly queryable and allow cross-ecosystem trust score import (0.3 weight, 45-day half-life decay).


7. Security Considerations

7.1 Key Compromise

If a private key is compromised, the agent MUST perform key rotation (Section 4.3) immediately. The registry propagates revocation to verifiers within 60 seconds.

7.2 Sybil Resistance

The registry implements Jaccard similarity clustering across endorsement graphs to detect coordinated attestation rings. Economic stake via x402 USDC payments introduces a cost barrier for mass sybil creation.

7.3 On-Chain Anchoring

All agent registrations and confirmed violations are anchored on Base L2. The anchor format is chain-agnostic and verifiable by any party with access to a public block explorer.

7.4 Principal Continuity

Violation Records are associated with both the agent DID and the principal DID. Re-registration of a new agent DID for a principal with confirmed violations is flagged by the registry.


8. Privacy Considerations

DID Documents contain no personal data. The binding between a did:moltrust DID and a natural person is external to this protocol. On-chain anchors contain only SHA-256 hashes of protocol artifacts — no raw personal data is anchored.

Off-chain behavioral records are retained for a minimum of 12 months and a maximum of 60 months per the MolTrust Privacy Policy, consistent with GDPR Article 4 and Swiss DSG requirements.


9. Conformance

This specification conforms to: - W3C DID Core v1.0 (https://www.w3.org/TR/did-core/) - W3C VC Data Model 2.0 (https://www.w3.org/TR/vc-data-model-2.0/) - Ed25519Signature2020 (https://w3c-ccg.github.io/di-eddsa-2020/) - RFC 8785 JSON Canonicalization (https://www.rfc-editor.org/rfc/rfc8785)


10. Reference Implementation


MolTrust / CryptoKRI GmbH, Zurich | hello@moltrust.ch | moltrust.ch Released under Creative Commons Attribution 4.0 International (CC BY 4.0)