Skip to main content
Version: 1.3

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

NameType
jwtstring
disclosuresstring[]
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

NameType
sd_jwtstring

Returns

SdJwt


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.

Returns

SdJwt