fetchKey<T extends CryptographicKey | Multikey>(cls: (new (...args: any[]) => T) & { fromJsonLd(jsonLd: unknown,options: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; },): Promise<T>; },options?: FetchKeyOptions,): Promise<FetchKeyResult<T>>
Fetches a CryptographicKey or Multikey from the given URL.
If the given URL contains an Actor object, it tries to find
the corresponding key in the publicKey
or assertionMethod
property.
T extends CryptographicKey | Multikey
The type of the key to fetch. Either CryptographicKey or Multikey.
cls: (new (...args: any[]) => T) & { fromJsonLd(jsonLd: unknown,options: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; },): Promise<T>; }
The class of the key to fetch. Either CryptographicKey or Multikey.
optional
options: FetchKeyOptions
Options for fetching the key. See FetchKeyOptions.
The fetched key or null
if the key is not found.