Skip to main content

Module resolve

Module resolve 

Source
Expand description

Turning what a user typed into a DID, a DID document, and a PDS.

The I/O half of super::identity, which holds the decisions. Split that way because the decisions are where the security properties live and they are testable; this is sequencing and network calls, which are not.

DNS takes precedence over HTTP. The handle spec: “When both methods return results, the DNS TXT result should be preferred.” It is not a tie-break rule in practice — a real handle was found during the live spike whose /.well-known/atproto-did returns 404 and which resolves by TXT alone, so an HTTP-first implementation simply fails on it.

Structs§

ResolvedAccount
A resolved account: who they are and where their repo lives.

Functions§

account_from_did
The decision half of a DID-first resolution.
account_from_handle
The decision half of a HANDLE-first resolution.
did_document
Fetch and validate a DID document.
did_for_handle
Resolve a handle to a DID: DNS first, then well-known.
did_from_dns
prefer_dns
Apply the precedence rule: DNS wins, and the well-known lookup runs only when DNS returned no record at all.
resolve
Resolve whatever the user typed into an account.
resolver
Build the DNS resolver from the host’s own configuration.