Skip to main content

SdJwt

@iota/identity-wasm API documentation


Class: SdJwt

Representation of an SD-JWT of the format <Issuer-signed JWT>~<Disclosure 1>~<Disclosure 2>~...~<Disclosure N>~<optional KB-JWT>.

Constructors​

new SdJwt()​

new SdJwt(jwt, disclosures, key_binding_jwt?): SdJwt

Creates a new SdJwt from its components.

Parameters​

jwt​

string

disclosures​

string[]

key_binding_jwt?​

null | string

Returns​

SdJwt

Methods​

toJSON()​

toJSON(): Object

  • Return copy of self without private attributes.

Returns​

Object


toString()​

Call Signature​

toString(): string

Return stringified version of self.

Returns​

string

Call Signature​

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​

sd_jwt​

string

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