Skip to main content

mapIdentifierKeysToDoc() function

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

Maps the keys of a locally managed IIdentifier to the corresponding entries from the DID document.

Signature:

export declare function mapIdentifierKeysToDoc(
identifier: IIdentifier,
section: DIDDocumentSection | undefined,
context: IAgentContext<IResolver>,
): Promise<_ExtendedIKey[]>

Parameters

ParameterTypeDescription
identifierIIdentifierthe identifier to be mapped
sectionDIDDocumentSection | undefinedthe section of the DID document to be mapped (see verification relationships), but can also be verificationMethod to map all the keys.
contextIAgentContext<IResolver>the veramo agent context, which must contain a IResolver implementation that can resolve the DID document of the identifier.

Returns:

Promise<_ExtendedIKey[]>

an array of mapped keys. The corresponding verification method is added to the meta.verificationMethod property of the key.

This API may change without a BREAKING CHANGE notice.