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
| Name | Type |
|---|---|
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
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
| Name | Type |
|---|---|
index | number |
Returns
boolean
set
▸ set(index, value): void
Sets the value of the index-th entry.
Parameters
| Name | Type |
|---|---|
index | number |
value | boolean |
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
| Name | Type |
|---|---|
s | string |