Skip to main content

ICredential

@iota/identity-wasm API documentation


Interface: ICredential

Fields for constructing a new Credential.

Indexable​

[properties: string]: unknown

Properties​

context?​

readonly optional context: string | Record<string, any> | (string | Record<string, any>)[]

The JSON-LD context(s) applicable to the Credential.


id?​

readonly optional id: string

A unique URI that may be used to identify the Credential.


type?​

readonly optional type: string | string[]

One or more URIs defining the type of the Credential. Contains the base context by default.


credentialSubject​

readonly credentialSubject: Subject | Subject[]

One or more objects representing the Credential subject(s).


issuer​

readonly issuer: string | CoreDID | IotaDID | Issuer

A reference to the issuer of the Credential.


issuanceDate?​

readonly optional issuanceDate: Timestamp

A timestamp of when the Credential becomes valid. Defaults to the current datetime.


expirationDate?​

readonly optional expirationDate: Timestamp

A timestamp of when the Credential should no longer be considered valid.


credentialStatus?​

readonly optional credentialStatus: Status

Information used to determine the current status of the Credential.


credentialSchema?​

readonly optional credentialSchema: Schema | Schema[]

Information used to assist in the enforcement of a specific Credential structure.


refreshService?​

readonly optional refreshService: RefreshService | RefreshService[]

Service(s) used to refresh an expired Credential.


termsOfUse?​

readonly optional termsOfUse: Policy | Policy[]

Terms-of-use specified by the Credential issuer.


evidence?​

readonly optional evidence: Evidence | Evidence[]

Human-readable evidence used to support the claims within the Credential.


nonTransferable?​

readonly optional nonTransferable: boolean

Indicates that the Credential must only be contained within a Presentation with a proof issued from the Credential subject.