Skip to main content

extractIssuer() 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.

Decodes a credential or presentation and returns the issuer ID iss from a JWT or issuer/issuer.id from a VC or holder from a VP

Signature:

export declare function extractIssuer(
input?:
| W3CVerifiableCredential
| W3CVerifiablePresentation
| CredentialPayload
| PresentationPayload
| null,
options?: {
removeParameters?: boolean
},
): string

Parameters

ParameterTypeDescription
inputW3CVerifiableCredential | W3CVerifiablePresentation | CredentialPayload | PresentationPayload | null(Optional) the credential or presentation whose issuer/holder needs to be extracted.
options{ removeParameters?: boolean; }

(Optional) options for the extraction removeParameters - Remove all DID parameters from the issuer ID

This API may change without a BREAKING CHANGE notice.

Returns:

string