View Source DIDTools.DID (DIDTools v0.1.0)

Summary

Functions

Creates a DID data struct from a DID string and a resolver.

Types

@type resolver() :: :http | :dns | nil
@type t() :: %DIDTools.DID{did: String.t(), resolver: resolver(), type: :plc | :web}

Functions

@spec new(String.t()) ::
  {:ok, t()}
  | {:error, {:invalid_type, String.t()}}
  | {:error, {:invalid_did, String.t()}}
@spec new(String.t(), resolver()) ::
  {:ok, t()}
  | {:error, {:invalid_type, String.t()}}
  | {:error, {:invalid_did, String.t()}}

Creates a DID data struct from a DID string and a resolver.