Skip to main content

Parser.parseClaim() method

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.

ParseClaim creates core.Claim object from W3CCredential

Signature:

parseClaim(credential: W3CCredential, credentialType: string, jsonSchemaBytes: Uint8Array, opts?: CoreClaimOptions): Promise<CoreClaim>;

Parameters

ParameterTypeDescription
credentialW3CCredentialVerifiable Credential
credentialTypestringcredential type that will be used as schema hash e.g. https://url-to-ld-schema.com\#AuthBJJCredential
jsonSchemaBytesUint8Arrayjson schema bytes
optsCoreClaimOptions(Optional) options to parse core claim

Returns:

Promise<CoreClaim>

Promise<CoreClaim>