Class: SdJwt
identity_wasm.SdJwt
Representation of an SD-JWT of the format
<Issuer-signed JWT>~<Disclosure 1>~<Disclosure 2>~...~<Disclosure N>~<optional KB-JWT>.
Table of contents
Constructors
Methods
Constructors
constructor
• new SdJwt(jwt, disclosures, key_binding_jwt?)
Creates a new SdJwt from its components.
Parameters
| Name | Type |
|---|---|
jwt | string |
disclosures | string[] |
key_binding_jwt? | string |
Methods
toJSON
▸ toJSON(): Object
- Return copy of self without private attributes.
Returns
Object
toString
▸ toString(): string
Return stringified version of self.
Returns
string
▸ toString(): string
Serializes the components into the final SD-JWT.
Returns
string
presentation
▸ presentation(): string
Serializes the components into the final SD-JWT.
Returns
string
parse
▸ Static parse(sd_jwt): SdJwt
Parses an SD-JWT into its components as [SdJwt].
Error
Returns DeserializationError if parsing fails.
Parameters
| Name | Type |
|---|---|
sd_jwt | string |
Returns
jwt
▸ jwt(): string
The JWT part.
Returns
string
disclosures
▸ disclosures(): string[]
The disclosures part.
Returns
string[]
keyBindingJwt
▸ keyBindingJwt(): undefined | string
The optional key binding JWT.
Returns
undefined | string
clone
▸ clone(): SdJwt
Deep clones the object.