pub struct Resolver<C = Arc<Client>> where
    C: SharedPtr<Client>, 
{ /* private fields */ }
Expand description

A Resolver supports resolving DID Documents across different Tangle networks using multiple Clients.

Also provides convenience functions for resolving DID Documents associated with verifiable Credentials and Presentations.

Implementations

Constructs a new Resolver with a default Client for the Mainnet.

See also Resolver::builder.

Returns a new ResolverBuilder with no configured Clients.

Returns the Client corresponding to the given NetworkName if one exists.

Fetches the ResolvedIotaDocument of the given IotaDID.

Fetches the DocumentHistory of the given IotaDID.

👎 Deprecated since 0.5.0:

diff chain features are slated for removal

Fetches the ChainHistory of a diff chain starting from a ResolvedIotaDocument on the integration chain.

NOTE: the document must have been published to the Tangle and have a valid message id.

Fetches the DID Document of the issuer on a Credential.

Errors

Errors if the issuer URL is not a valid IotaDID or DID resolution fails.

Fetches all DID Documents of Credential issuers contained in a Presentation. Issuer documents are returned in arbitrary order.

Errors

Errors if any issuer URL is not a valid IotaDID or DID resolution fails.

Fetches the DID Document of the holder of a Presentation.

Errors

Errors if the holder URL is missing, is not a valid IotaDID, or DID resolution fails.

Verifies a Presentation.

Important

See PresentationValidator::validate for information about which properties get validated and what is expected of the optional arguments holder and issuer.

Resolution

The DID Documents for the holder and issuers are optionally resolved if not given. If you already have up-to-date versions of these DID Documents, you may want to use PresentationValidator::validate. See also Resolver::resolve_presentation_issuers and Resolver::resolve_presentation_holder.

Errors

Errors from resolving the holder and issuer DID Documents, if not provided, will be returned immediately. Otherwise, errors from validating the presentation and its credentials will be returned according to the fail_fast parameter.

Trait Implementations

Formats the value using the given formatter. Read more

Resolves a DID on the Tangle

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more