aries_cloudagent.resolver package
Interfaces and base classes for DID Resolution.
- async aries_cloudagent.resolver.setup(context: InjectionContext)[source]
Set up default resolvers.
Subpackages
- aries_cloudagent.resolver.default package
- Submodules
- aries_cloudagent.resolver.default.indy module
- aries_cloudagent.resolver.default.jwk module
- aries_cloudagent.resolver.default.key module
- aries_cloudagent.resolver.default.legacy_peer module
- aries_cloudagent.resolver.default.peer1 module
- aries_cloudagent.resolver.default.peer2 module
- aries_cloudagent.resolver.default.peer3 module
- aries_cloudagent.resolver.default.peer4 module
- aries_cloudagent.resolver.default.universal module
- aries_cloudagent.resolver.default.web module
Submodules
aries_cloudagent.resolver.base module
Base Class for DID Resolvers.
- class aries_cloudagent.resolver.base.BaseDIDResolver(type_: Optional[ResolverType] = None)[source]
Bases:
ABC
Base Class for DID Resolvers.
- DEFAULT_TTL = 3600
- property native
Return if this resolver is native.
- async resolve(profile: Profile, did: Union[str, pydid.DID], service_accept: Optional[Sequence[str]] = None) dict [source]
Resolve a DID using this resolver.
Handles caching of results.
- abstract async setup(context: InjectionContext)[source]
Do asynchronous resolver setup.
- property supported_did_regex: Pattern
Supported DID regex for matching this resolver to DIDs it can resolve.
Override this property with a class var or similar to use regex matching on DIDs to determine if this resolver supports a given DID.
- property supported_methods: Sequence[str]
Return supported methods.
DEPRECATED: Use supported_did_regex instead.
- async supports(profile: Profile, did: str) bool [source]
Return if this resolver supports the given DID.
Override this method to determine if this resolver supports a DID based on information other than just a regular expression; i.e. check a value in storage, query a resolver connection record, etc.
- exception aries_cloudagent.resolver.base.DIDMethodNotSupported(*args, error_code: Optional[str] = None, **kwargs)[source]
Bases:
ResolverError
Raised when no resolver is registered for a given did method.
- exception aries_cloudagent.resolver.base.DIDNotFound(*args, error_code: Optional[str] = None, **kwargs)[source]
Bases:
ResolverError
Raised when DID is not found in verifiable data registry.
- class aries_cloudagent.resolver.base.ResolutionMetadata(resolver_type: ResolverType, resolver: str, retrieved_time: str, duration: int)[source]
Bases:
NamedTuple
Resolution Metadata.
- resolver_type: ResolverType
Alias for field number 0
- class aries_cloudagent.resolver.base.ResolutionResult(did_document: dict, metadata: ResolutionMetadata)[source]
Bases:
object
Resolution Class to pack the DID Doc and the resolution information.
aries_cloudagent.resolver.did_resolver module
the did resolver.
responsible for keeping track of all resolvers. more importantly retrieving did’s from different sources provided by the method type.
- class aries_cloudagent.resolver.did_resolver.DIDResolver(resolvers: Optional[List[BaseDIDResolver]] = None)[source]
Bases:
object
did resolver singleton.
- DEFAULT_TIMEOUT = 30
- async dereference(profile: Profile, did_url: str, *, document: Optional[pydid.doc.doc.BaseDIDDocument] = None) pydid.Resource [source]
Dereference a DID URL to its corresponding DID Doc object.
- async dereference_verification_method(profile: Profile, did_url: str, *, document: Optional[pydid.doc.doc.BaseDIDDocument] = None) pydid.VerificationMethod [source]
Dereference a DID URL to a verification method.
- register_resolver(resolver: BaseDIDResolver)[source]
Register a new resolver.
aries_cloudagent.resolver.routes module
Resolve did document admin routes.
- class aries_cloudagent.resolver.routes.DIDMatchInfoSchema(*args: Any, **kwargs: Any)[source]
Bases:
OpenAPISchema
Path parameters and validators for request taking DID.
- class aries_cloudagent.resolver.routes.ResolutionResultSchema(*args: Any, **kwargs: Any)[source]
Bases:
OpenAPISchema
Result schema for did document query.
- class aries_cloudagent.resolver.routes.W3cDID(*args: Any, **kwargs: Any)[source]
Bases:
Regexp
Validate value against w3c DID.
- EXAMPLE = 'did:ted:WgWxqztrNooG92RXvxSTWv'