Class: Presentation
identity_wasm.Presentation
Table of contents
Constructors
Methods
- toJSON
- toString
- BaseContext
- BaseType
- context
- id
- type
- verifiableCredential
- holder
- refreshService
- termsOfUse
- proof
- setProof
- properties
- fromJSON
- clone
Constructors
constructor
• new Presentation(values)
Constructs a new presentation.
Parameters
| Name | Type |
|---|---|
values | IPresentation |
Methods
toJSON
▸ toJSON(): Object
- Return copy of self without private attributes.
Returns
Object
▸ 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
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
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
| Name | Type |
|---|---|
proof? | 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
| Name | Type |
|---|---|
json | any |
Returns
clone
▸ clone(): Presentation
Deep clones the object.