Class Did

  • All Implemented Interfaces:

    
    public final class Did
    
                        

    DID provides a way to parse and handle Decentralized Identifier (DID) URIs according to the W3C DID Core specification (https://www.w3.org/TR/did-core/).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Did.Parser

      Parser object used to Parse a DID URI into a DID object.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getUri() represents the complete Decentralized Identifier (DID) URI.
      final String getUrl() represents the DID URI + A network location identifier for a specific resource Spec: https://www.w3.
      final String getMethod() specifies the DID method in the URI, which indicates the underlying method-specific identifier scheme (e.g., jwk, dht, key, etc.).
      final String getId() is the method-specific identifier in the DID URI.
      final Map<String, String> getParams() is a map containing optional parameters present in the DID URI.
      final String getPath() is an optional path component in the DID URI.
      final String getQuery() is an optional query component in the DID URI, used to express a request for a specific representation or resource related to the DID.
      final String getFragment() is an optional fragment component in the DID URI, used to reference a specific part of a DID document.
      String toString()
      final ByteArray marshalText() Marshal text into byteArray.
      final Did unmarshalText(ByteArray byteArray) Unmarshal byteArray into a DID.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getUri

         final String getUri()

        represents the complete Decentralized Identifier (DID) URI. Spec: https://www.w3.org/TR/did-core/#did-syntax

      • getUrl

         final String getUrl()

        represents the DID URI + A network location identifier for a specific resource Spec: https://www.w3.org/TR/did-core/#did-url-syntax

      • getMethod

         final String getMethod()

        specifies the DID method in the URI, which indicates the underlying method-specific identifier scheme (e.g., jwk, dht, key, etc.). Spec: https://www.w3.org/TR/did-core/#method-schemes

      • getId

         final String getId()

        is the method-specific identifier in the DID URI. Spec: https://www.w3.org/TR/did-core/#method-specific-id

      • getParams

         final Map<String, String> getParams()

        is a map containing optional parameters present in the DID URI. These parameters are method-specific. Spec: https://www.w3.org/TR/did-core/#did-parameters

      • getPath

         final String getPath()

        is an optional path component in the DID URI. Spec: https://www.w3.org/TR/did-core/#path

      • getQuery

         final String getQuery()

        is an optional query component in the DID URI, used to express a request for a specific representation or resource related to the DID. Spec: https://www.w3.org/TR/did-core/#query

      • getFragment

         final String getFragment()

        is an optional fragment component in the DID URI, used to reference a specific part of a DID document. Spec: https://www.w3.org/TR/did-core/#fragment

      • marshalText

         final ByteArray marshalText()

        Marshal text into byteArray.

        Returns:

        ByteArray of the DID object