Function validateDid

  • Checks that a string (or other input) is a valid KILT DID with or without a trailing fragment. Throws otherwise.

    Parameters

    • input: unknown

      Arbitrary input.

    • Optional expectType: "Did" | "DidUrl"

      Did if the the input is expected to have a fragment (following '#'), DidUrl if it is expected not to have one. Default allows both.

    Returns void