Package web5.sdk.dids

Object DidResolvers

  • All Implemented Interfaces:

    
    public class DidResolvers
    
                        

    Singleton object representing a collection of DID resolvers.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final DidResolutionResult resolve(String didUrl) Resolves a DID URL using an appropriate resolver based on the DID method.
      final Unit addResolver(String methodName, Function1<String, DidResolutionResult> resolver) Adds a custom resolver for a specific DID method.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • resolve

         final DidResolutionResult resolve(String didUrl)

        Resolves a DID URL using an appropriate resolver based on the DID method.

        Parameters:
        didUrl - The DID URL to resolve.
        Returns:

        A DidResolutionResult containing the resolved DID document or an error message.

      • addResolver

         final Unit addResolver(String methodName, Function1<String, DidResolutionResult> resolver)

        Adds a custom resolver for a specific DID method.

        Parameters:
        methodName - The name of the DID method for which the resolver is being added.
        resolver - The resolver function for the specified DID method.