View Source DIDTools.Document (DIDTools v0.1.0)

Summary

Functions

Returns a list of handles from a doc. They may not be all validated.

Returns first validated handle

Finds serviceEndpoint for labeler service and returns it if it's present.

Finds serviceEndpoint for PDS service and returns it if it's present.

Types

@type t() :: %DIDTools.Document{did: DIDTools.DID.t(), doc: any()}

Functions

@spec get_handles(t()) :: [String.t()]

Returns a list of handles from a doc. They may not be all validated.

Call get_validated_handle/1 to get the first validated handle.

Link to this function

get_validated_handle(doc)

View Source
@spec get_validated_handle(t()) :: String.t() | nil

Returns first validated handle

@spec labeler_endpoint(t()) :: String.t() | nil

Finds serviceEndpoint for labeler service and returns it if it's present.

@spec pds_endpoint(t()) :: String.t() | nil

Finds serviceEndpoint for PDS service and returns it if it's present.