Latch. Identity
(latch v0.3.0)
Copy Markdown
Resolves an atproto handle to a verified identity.
Resolution is bidirectional per the atproto identity spec, the handle is resolved to a DID and the DID document is fetched independently, and the docment's claimed handle must match the handle we started from. Neither direction alone is trusted, otherwise anyone could point DNS at a victim's DID.
Summary
Functions
Resolves and verifies a handle, returning its DID and PDS endpoint.
Types
Functions
@spec resolve_handle(String.t()) :: {:ok, t()} | {:error, Latch.Error.HandleNotFound.t() | Latch.Error.IdentityMismatch.t() | Latch.Error.InvalidResponse.t() | Latch.Error.Transport.t()}
Resolves and verifies a handle, returning its DID and PDS endpoint.
Returns structured Latch.Error exceptions describing resolution,
identity-verifiction, and transport failures.