Type alias UniversalResolverParams

UniversalResolverParams: {
    cache?: DidResolverCache;
    didResolvers: DidMethodResolver[];
}

Parameters for configuring the UniversalResolver class, which is responsible for resolving decentralized identifiers (DIDs) to their corresponding DID documents.

This type specifies the essential components required by the UniversalResolver to perform DID resolution and dereferencing. It includes an array of DidMethodResolver instances, each capable of resolving DIDs for a specific method, and optionally, a cache for storing resolved DID documents to improve resolution efficiency.

Type declaration

  • Optional cache?: DidResolverCache

    An optional DidResolverCache instance used for caching resolved DID documents.

    Providing a cache implementation can significantly enhance resolution performance by avoiding redundant resolutions for previously resolved DIDs. If omitted, a no-operation cache is used, which effectively disables caching.

  • didResolvers: DidMethodResolver[]

    An array of DidMethodResolver instances.

    Each resolver in this array is designed to handle a specific DID method, enabling the DidResolver to support multiple DID methods simultaneously.