StatusList2021CredentialBuilder
@iota/identity-wasm API documentation
Class: StatusList2021CredentialBuilder
Builder type to construct valid StatusList2021Credential istances.
Constructors
new StatusList2021CredentialBuilder()
new StatusList2021CredentialBuilder(
status_list
?):StatusList2021CredentialBuilder
Creates a new StatusList2021CredentialBuilder.
Parameters
status_list?
null
| StatusList2021
Returns
StatusList2021CredentialBuilder
Methods
purpose()
purpose(
purpose
):StatusList2021CredentialBuilder
Sets the purpose of the StatusList2021Credential that is being created.
Parameters
purpose
Returns
StatusList2021CredentialBuilder
subjectId()
subjectId(
id
):StatusList2021CredentialBuilder
Sets credentialSubject.id
.
Parameters
id
string
Returns
StatusList2021CredentialBuilder
expirationDate()
expirationDate(
time
):StatusList2021CredentialBuilder
Sets the expiration date of the credential.
Parameters
time
Returns
StatusList2021CredentialBuilder
issuer()
issuer(
issuer
):StatusList2021CredentialBuilder
Sets the issuer of the credential.
Parameters
issuer
string
Returns
StatusList2021CredentialBuilder
context()
context(
context
):StatusList2021CredentialBuilder
Sets the context of the credential.
Parameters
context
string
Returns
StatusList2021CredentialBuilder
type()
type(
t
):StatusList2021CredentialBuilder
Adds a credential type.
Parameters
t
string
Returns
StatusList2021CredentialBuilder
proof()
proof(
proof
):StatusList2021CredentialBuilder
Adds a credential's proof.
Parameters
proof
Returns
StatusList2021CredentialBuilder
build()
build():
StatusList2021Credential
Attempts to build a valid StatusList2021Credential with the previously provided data.