Function parseDocumentFromLightDid

  • Create a light DidDocument by parsing the provided input DID. Only use for DIDs you control, when you are certain they have not been upgraded to on-chain full DIDs. For the DIDs you have received from external sources use resolve etc.

    Parsing is possible because of the self-describing and self-containing nature of light DIDs. Private keys are assumed to already live in another storage, as it contains reference only to public keys as verification methods.

    Parameters

    • did: Did

      The DID to parse.

    • failIfFragmentPresent: boolean = true

      Whether to fail when parsing the DID in case a fragment is present or not, which is not relevant to the creation of the DID. It defaults to true.

    Returns DidDocument

    The resulting DidDocument.