Package web5.sdk.dids
Object DidResolvers
-
- All Implemented Interfaces:
public class DidResolversSingleton object representing a collection of DID resolvers.
-
-
Field Summary
Fields Modifier and Type Field Description public final static DidResolversINSTANCE
-
Method Summary
Modifier and Type Method Description final DidResolutionResultresolve(String didUrl)Resolves a DID URL using an appropriate resolver based on the DID method. final UnitaddResolver(String methodName, Function1<String, DidResolutionResult> resolver)Adds a custom resolver for a specific DID method. -
-
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.
-
-
-
-