Skip to main content
Version: 1.4

Class: StatusList2021CredentialBuilder

identity_wasm.StatusList2021CredentialBuilder

Builder type to construct valid StatusList2021Credential istances.

Table of contents

Constructors

Methods

Constructors

constructor

new StatusList2021CredentialBuilder(status_list?)

Creates a new StatusList2021CredentialBuilder.

Parameters

NameType
status_list?StatusList2021

Methods

purpose

purpose(purpose): StatusList2021CredentialBuilder

Sets the purpose of the StatusList2021Credential that is being created.

Parameters

NameType
purposeStatusPurpose

Returns

StatusList2021CredentialBuilder


subjectId

subjectId(id): StatusList2021CredentialBuilder

Sets credentialSubject.id.

Parameters

NameType
idstring

Returns

StatusList2021CredentialBuilder


expirationDate

expirationDate(time): StatusList2021CredentialBuilder

Sets the expiration date of the credential.

Parameters

NameType
timeTimestamp

Returns

StatusList2021CredentialBuilder


issuer

issuer(issuer): StatusList2021CredentialBuilder

Sets the issuer of the credential.

Parameters

NameType
issuerstring

Returns

StatusList2021CredentialBuilder


context

context(context): StatusList2021CredentialBuilder

Sets the context of the credential.

Parameters

NameType
contextstring

Returns

StatusList2021CredentialBuilder


type

type(t): StatusList2021CredentialBuilder

Adds a credential type.

Parameters

NameType
tstring

Returns

StatusList2021CredentialBuilder


proof

proof(proof): StatusList2021CredentialBuilder

Adds a credential's proof.

Parameters

NameType
proofProof

Returns

StatusList2021CredentialBuilder


build

build(): StatusList2021Credential

Attempts to build a valid StatusList2021Credential with the previously provided data.

Returns

StatusList2021Credential