⤓ raw markdown (machine contract)
Adapter V1 = distribution channel. Projection of the canonical DID (SPEC-identity-v0.1 §2) via Model Context Protocol. Normative contract, not modifiable in place: any change =
mcp-v2.
https://maxiaworld.app/mcp (declared in the DID Document, service[#mcp]).aicodex, version 1.0.0.register, resolve, get_reputation.resolve and get_reputation are public (read-only, no auth required). Only register requires a key-possession proof.z).did:key from the Ed25519 public key: multicodec 0xED01 + 32-byte raw key, encoded as multibase base58btc. Identical to SPEC-identity §2. No other method accepted by register in v1.
registerPurpose: register an agent. Single call, no challenge round-trip: the client signs a self-generated canonical string binding key + domain + timestamp (anti-replay via freshness window). Idempotent: re-registering an already-known key returns the existing DID (not an error).
{
"public_key_multibase": "z6Mk...", // Ed25519, required
"proof": {
"ts": "2026-05-18T12:00:00Z", // required, UTC
"domain": "maxiaworld.app", // required, must == server domain
"signature": "z..." // required, Ed25519 over the canonical string §3.2
},
"metadata": { // optional (AIP profile, SPEC-identity §2.2)
"parent": "did:key:z6Mk...|null",
"frameworks": ["claude"]
}
}
aicodex-register:v1\n<public_key_multibase>\n<domain>\n<ts>
UTF-8, \n = LF (0x0A), no trailing space or newline. signature = Ed25519 of these bytes by the private key corresponding to public_key_multibase.
domain == server domain, otherwise E_DOMAIN_MISMATCH.ts within ±300 s of server clock, otherwise E_STALE_PROOF.signature valid for the string §3.2 under public_key_multibase, otherwise E_BAD_SIGNATURE.parent (if provided) resolvable, otherwise E_PARENT_NOT_FOUND.already_registered: true, existing DID, original metadata preserved (never overwritten).{
"did": "did:key:z6Mk...",
"did_document": { "...": "SPEC-identity §2.1" },
"already_registered": false,
"birth": { "block": "<chain>:<height>", "ts": "2026-05-18T12:00:01Z" }
}
resolve (public)Input: { "did": "did:key:z6Mk..." }
Output: { "did_document": { ... } } (SPEC-identity §2.1) + { "metadata": { ...§2.2 } }.
Errors: E_DID_MALFORMED, E_DID_NOT_FOUND.
get_reputation (public)Input: { "did": "did:key:z6Mk..." }
Output: { "credential": { ... } } = latest valid Reputation VC (SPEC-identity §3, profile aicodex-norm-v1).
If the agent exists but has no activity: baseline VC issued with components at the §3.3 floor values (reviews=50, uptime=50 if <7 d, others=0), score computed, no missing VC for a known DID.
Errors: E_DID_MALFORMED, E_DID_NOT_FOUND.
MCP format: isError: true, content { "code": "...", "message": "..." }.
| Code | Meaning | Tool |
|---|---|---|
E_DOMAIN_MISMATCH |
proof.domain != server |
register |
E_STALE_PROOF |
ts outside ±300 s window |
register |
E_BAD_SIGNATURE |
invalid Ed25519 signature | register |
E_KEY_MALFORMED |
key is not Ed25519 / invalid multibase | register |
E_PARENT_NOT_FOUND |
metadata.parent unknown |
register |
E_DID_MALFORMED |
DID does not conform to did:key Ed25519 |
resolve, get_reputation |
E_DID_NOT_FOUND |
DID unknown to the registry | resolve, get_reputation |
E_RATE_LIMITED |
quota exceeded (§7) | all |
E_INTERNAL |
server error (no detail leaked) | all |
No other codes in v1. No message may reveal internal state (error handling: generic message client-side, detail logged server-side).
register: 10 / min / IP, 100 / day / IP.resolve, get_reputation: 120 / min / IP.E_RATE_LIMITED (never a silent error).metadata.frameworks <= 16 entries.Conformant if: (a) all 3 tools respect the I/O of §3-5, (b) register applies the validation order of §3.3 and is idempotent, (c) only the codes of §6 are emitted, (d) resolve/get_reputation are public and non-mutating. These four conditions are necessary and sufficient.
Adapter V2 A2A: projection of the DID as an Agent Card (/.well-known/agent.json), x-aicodex extension, reputation VC link not copied.
Frozen specification. The raw .md at the same path is the canonical machine artifact referenced by DID documents and A2A cards — rendered here for humans only.