Skip to main content

resolveDidOrThrow() function

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Resolve a DID document or throw an error if the resolution fails.

Signature:

export declare function resolveDidOrThrow(
didUrl: string,
context: IAgentContext<IResolver>,
resolutionOptions?: DIDResolutionOptions,
): Promise<DIDDocument>

Parameters

ParameterTypeDescription
didUrlstringthe DID to be resolved
contextIAgentContext<IResolver>the veramo agent context, which must contain a IResolver implementation that can resolve the DID document of the didUrl.
resolutionOptionsDIDResolutionOptions(Optional) optional parameters to be passed to the DID resolver

Returns:

Promise<DIDDocument>

a if resolution is successful

Exceptions

if the resolution fails

This API may change without a BREAKING CHANGE notice.