ResolvesDocumentation Index
Fetch the complete documentation index at: https://glide-9da73dea.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
agent_did counterparties to on-chain settling addresses. Four resolution schemes: Glide-internal same-tenant vault (free, instant), ERC-8004 Identity Registry (Ethereum mainnet), ENS multi-chain addresses via ENSIP-9, and did:web HTTPS document fetch. Ships a DNS-rebinding-safe fetch helper for the did:web path.
Pure functions with injected resolver implementations. On-chain reads and network IO live in apps/web.
Install
Why a resolution chain
Agents reference each other by DID, not by a fixed on-chain address. A DID-addressed counterparty can route to whichever chain the recipient prefers today and change that preference later. The resolution chain runs in priority order — Glide-internal first (cheapest), then on-chain registries, then the HTTPS document fallback — so same-tenant payments are never sent on-chain when an internal vault hop is available. ERC-8004 went live on Ethereum mainnet on 2026-01-29. Thedid:erc8004 scheme is the canonical anchor for agents with on-chain identity. ENS (did:ens) and did:web support agents that predate ERC-8004 or prefer off-chain identity.
DID URI schemes
| Scheme | Format | Resolution path |
|---|---|---|
did:key | did:key:z<base58btc> | Glide-internal tenant lookup by agent_principals.did_key |
did:erc8004 | did:erc8004:0x<64 hex> | On-chain resolveAgent(bytes32) via viem |
did:ens | did:ens:<name>.eth | ENS multi-chain addresses (ENSIP-9) |
did:web | did:web:<domain> | HTTPS fetch of <domain>/.well-known/did.json |
Resolving a counterparty
deps object is the injection point. Pass only the resolvers your environment supports — the orchestrator skips schemes with no injected resolver.
Validation
isValidAgentDid enforces:
did:key— base58btc alphabet only (zprefix, no0OIl).did:web— requires at least one dot, no IPv4 literals, no IPv6 brackets, TLD ≥ 2 ASCII letters.did:erc8004— exactly 64 hex digits (bytes32, not bytes20/EVM address).- Max length 512 to prevent regex-DoS on pathological inputs.
DNS-rebinding-safe did:web fetch
String-level validation alone doesn’t prevent SSRF — a public domain can have an A record pointing at169.254.169.254 or an RFC 1918 address. safeFetchDidWeb resolves the hostname first, rejects if any A/AAAA record is private, then connects via undici with the pre-resolved IP pinned so a rebinding attack between the resolution and the TCP connect can’t swap the destination.
Audit trail
mcp_audit_events table stores the full A2A graph — needed for ERC-8004 reputation feedback in a future release.
Reading list
- ERC-8004 standard — the on-chain identity registry this package resolves against.
- Agent identity schema — the
did_keycolumn onagent_principalsthat backs Glide-internal resolution. @glideco/smart-router— routes the settled address returned by this resolver onto the cheapest available rail.- Source on GitHub