Skip to main content
Version: 1.4

Class: StatusList2021

identity_wasm.StatusList2021

StatusList2021 data structure as described in W3C's VC status list 2021.

Table of contents​

Constructors​

Methods​

Constructors​

constructor​

• new StatusList2021(size?)

Creates a new StatusList2021 of size entries.

Parameters​

NameType
size?number

Methods​

toJSON​

▸ toJSON(): Object

  • Return copy of self without private attributes.

Returns​

Object


toString​

▸ toString(): string

Return stringified version of self.

Returns​

string


clone​

▸ clone(): StatusList2021

Deep clones the object.

Returns​

StatusList2021


len​

▸ len(): number

Returns the number of entries in this StatusList2021.

Returns​

number


get​

▸ get(index): boolean

Returns whether the entry at index is set.

Parameters​

NameType
indexnumber

Returns​

boolean


set​

▸ set(index, value): void

Sets the value of the index-th entry.

Parameters​

NameType
indexnumber
valueboolean

Returns​

void


intoEncodedStr​

▸ intoEncodedStr(): string

Encodes this StatusList2021 into its compressed base64 string representation.

Returns​

string


fromEncodedStr​

▸ Static fromEncodedStr(s): StatusList2021

Attempts to decode a StatusList2021 from a string.

Parameters​

NameType
sstring

Returns​

StatusList2021