Exosphere.ATProto.Identity.DID.Web (Exosphere v0.2.0)

Copy Markdown View Source

DID:Web resolution.

DID:Web is a W3C standard that resolves DIDs via HTTPS. The DID Document is fetched from https://<domain>/.well-known/did.json.

Examples

iex> Exosphere.ATProto.Identity.DID.Web.resolve("did:web:example.com")
{:ok, %Document{...}}

Notes

  • Only hostname-level DIDs are supported (no paths)
  • Port numbers are only allowed for localhost in development

Summary

Functions

Resolve a did:web to its DID Document.

Types

resolve_opts()

@type resolve_opts() :: [{:timeout, pos_integer()}]

Functions

resolve(arg, opts \\ [])

@spec resolve(String.t(), resolve_opts()) ::
  {:ok, Exosphere.ATProto.Identity.Document.t()} | {:error, term()}

Resolve a did:web to its DID Document.

Options

  • :timeout - HTTP request timeout in milliseconds (default: 10_000)