ProtoRune. Atproto. Identity. DIDResolver
(proto_rune v0.2.0)
Copy Markdown
Handles DID resolution for AT Protocol identities.
Supports two DID methods:
- did:plc - Resolves through the PLC directory
- did:web - Resolves through .well-known DID documents
Summary
Functions
Resolves a DID to its full DID document.
Resolves a DID through the PLC directory.
Resolves a DID through the web DID document method.
Types
@type did() :: String.t()
@type error_reason() :: :not_found | :network_error | :invalid_format | :unsupported_did_method | :rate_limited | {:http_error, pos_integer()}
@type resolution_opts() :: [timeout: pos_integer(), retry_count: non_neg_integer()]
Functions
@spec resolve(did(), resolution_opts()) :: {:ok, did_document()} | {:error, error_reason()}
Resolves a DID to its full DID document.
Supports did:plc and did:web methods.
@spec resolve_plc(did(), resolution_opts()) :: {:ok, did_document()} | {:error, error_reason()}
Resolves a DID through the PLC directory.
@spec resolve_web(did(), resolution_opts()) :: {:ok, did_document()} | {:error, error_reason()}
Resolves a DID through the web DID document method.