Skip to main content

W3CCredential class

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.

W3C Verifiable credential

https://www.w3.org/2018/credentials/v1

W3CCredential

Signature:

export declare class W3CCredential 

Properties

PropertyModifiersTypeDescription
"@context"string[]
credentialSchemaCredentialSchema
credentialStatusCredentialStatus
credentialSubject{ [key: string]: object | string | number | boolean; }
expirationDate?string(Optional)
idstring
issuanceDate?string(Optional)
issuerstring
proof?object | unknown[](Optional)
typestring[]

Methods

MethodModifiersDescription
getBJJSignature2021Proof()checks BJJSignatureProof2021 in W3C VC
getCoreClaimFromProof(proofType)gets core claim representation from credential proof
getIden3SparseMerkleTreeProof()checks Iden3SparseMerkleTreeProof in W3C VC
merklize(opts)merklization of the verifiable credential