Skip to main content

Disclosure

@iota/identity-wasm API documentation


Class: Disclosure

Represents an elements constructing a disclosure. Object properties and array elements disclosures are supported.

See: https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-07.html#name-disclosures

Methods​

toJSON()​

Call Signature​

toJSON(): Object

  • Return copy of self without private attributes.
Returns​

Object

Call Signature​

toJSON(): any

Serializes this to a JSON object.

Returns​

any


toString()​

Call Signature​

toString(): string

Return stringified version of self.

Returns​

string

Call Signature​

toString(): string

Returns a copy of the base64url-encoded string.

Returns​

string


parse()​

static parse(disclosure): Disclosure

Parses a Base64 encoded disclosure into a Disclosure.

Error​

Returns an InvalidDisclosure if input is not a valid disclosure.

Parameters​

disclosure​

string

Returns​

Disclosure


disclosure()​

disclosure(): string

Returns a copy of the base64url-encoded string.

Returns​

string


toEncodedString()​

toEncodedString(): string

Returns a copy of the base64url-encoded string.

Returns​

string


salt()​

salt(): string

Returns a copy of the salt value.

Returns​

string


claimName()​

claimName(): undefined | string

Returns a copy of the claim name, optional for array elements.

Returns​

undefined | string


claimValue()​

claimValue(): any

Returns a copy of the claim Value which can be of any type.

Returns​

any


fromJSON()​

static fromJSON(json): Disclosure

Deserializes an instance from a JSON object.

Parameters​

json​

any

Returns​

Disclosure