Skip to main content

Presentation

@iota/identity-wasm API documentation


Class: Presentation

Represents a bundle of one or more Credentials.

Constructors​

new Presentation()​

new Presentation(values): Presentation

Constructs a new presentation.

Parameters​

values​

IPresentation

Returns​

Presentation

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()​

toString(): string

Return stringified version of self.

Returns​

string


BaseContext()​

static BaseContext(): string

Returns the base JSON-LD context.

Returns​

string


BaseType()​

static BaseType(): string

Returns the base type.

Returns​

string


context()​

context(): (string | Record<string, any>)[]

Returns a copy of the JSON-LD context(s) applicable to the presentation.

Returns​

(string | Record<string, any>)[]


id()​

id(): undefined | string

Returns a copy of the unique URI identifying the presentation.

Returns​

undefined | string


type()​

type(): string[]

Returns a copy of the URIs defining the type of the presentation.

Returns​

string[]


verifiableCredential()​

verifiableCredential(): UnknownCredential[]

Returns the JWT credentials expressing the claims of the presentation.

Returns​

UnknownCredential[]


holder()​

holder(): string

Returns a copy of the URI of the entity that generated the presentation.

Returns​

string


refreshService()​

refreshService(): RefreshService[]

Returns a copy of the service(s) used to refresh an expired Credential in the presentation.

Returns​

RefreshService[]


termsOfUse()​

termsOfUse(): Policy[]

Returns a copy of the terms-of-use specified by the presentation holder

Returns​

Policy[]


proof()​

proof(): undefined | Proof

Optional cryptographic proof, unrelated to JWT.

Returns​

undefined | Proof


setProof()​

setProof(proof?): void

Sets the proof property of the Presentation.

Note that this proof is not related to JWT.

Parameters​

proof?​

null | Proof

Returns​

void


properties()​

properties(): Map<string, any>

Returns a copy of the miscellaneous properties on the presentation.

Returns​

Map<string, any>


fromJSON()​

static fromJSON(json): Presentation

Deserializes an instance from a JSON object.

Parameters​

json​

any

Returns​

Presentation


clone()​

clone(): Presentation

Deep clones the object.

Returns​

Presentation