getUniversalResolverFor() function
Creates a mapping of DID methods to a DIDResolver instance that can be used with did-resolver
Signature:
export declare function getUniversalResolverFor(methods: string[], url?: string): Record<string, DIDResolver>
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
methods |
string[] |
an array of DID methods that should be resolved by this universal resolver |
|
url |
string |
(Optional) the URL for the universal resolver instance (See https://uniresolver.io ) |
Record<string, DIDResolver>
Record<string, DIDResolver> a mapping of the given methods to an instance of DIDResolver
Example
const uniResolver = getUniversalResolverFor(['web', 'key', 'elem'])
const resolver = new Resolver({
...uniResolver,
// other resolvers
})