Module resolve

Module resolve 

Source
Expand description

AT Protocol identity resolution for handles and DIDs.

Resolves AT Protocol identities via DNS TXT records and HTTPS well-known endpoints, with automatic input detection for handles, did:plc, and did:web identifiers.

  • Validation: Ensures DNS and HTTP resolution methods agree on the resolved DID
  • Custom DNS: Supports custom DNS nameservers for resolution

§Resolution Flow

  1. Parse input to determine identifier type (handle vs DID)
  2. For handles: perform parallel DNS and HTTP resolution
  3. Validate that both methods return the same DID
  4. For DIDs: return the identifier directly

Structs§

HickoryDnsResolver
Hickory DNS implementation of the DnsResolver trait. Wraps hickory_resolver::TokioResolver for TXT record resolution.
InnerIdentityResolver
Core identity resolution components for AT Protocol subjects.
SharedIdentityResolver
Shared identity resolver for AT Protocol subjects.

Enums§

InputType
Type of input identifier for resolution. Distinguishes between handles and different DID methods.

Traits§

DnsResolver
Trait for DNS resolution operations. Provides async DNS TXT record lookups for handle resolution.
IdentityResolver
Trait for AT Protocol identity resolution.

Functions§

parse_input
Parses input string into appropriate identifier type. Handles prefixes like “at://”, “@”, and DID formats.
resolve_handle
Resolves a handle to DID using both DNS and HTTP methods. Returns DID if both methods agree, or error if conflicting.
resolve_handle_dns
Resolves a handle to DID using DNS TXT records. Looks up _atproto.{handle} TXT record for DID value.
resolve_handle_http
Resolves a handle to DID using HTTPS well-known endpoint. Fetches DID from https://{handle}/.well-known/atproto-did
resolve_subject
Resolves any subject (handle or DID) to a canonical DID. Handles all supported identifier formats automatically.