diff --git a/README.md b/README.md index 658479444f..41ba9d8519 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ## Introduction -IOTA Identity is a [Rust](https://www.rust-lang.org/) implementation of decentralized digital identity, also known as Self-Sovereign Identity (SSI). It implements the W3C [Decentralized Identifiers (DID)](https://www.w3.org/TR/did-core/) and [Verifiable Credentials](https://www.w3.org/TR/vc-data-model/) specifications. This library can be used to create, resolve and authenticate digital identities and to create verifiable credentials and presentations in order to share information in a verifiable manner and establish trust in the digital world. It does so while supporting secure storage of cryptographic keys, which can be implemented for your preferred key management system. Many of the individual libraries (Rust crates) are agnostic over the concrete DID method, with the exception of some libraries dedicated to implement the [IOTA DID method](https://wiki.iota.org/shimmer/identity.rs/specs/did/iota_did_method_spec/), which is an implementation of decentralized digital identity on the IOTA and Shimmer networks. Written in stable Rust, IOTA Identity has strong guarantees of memory safety and process integrity while maintaining exceptional performance. +IOTA Identity is a [Rust](https://www.rust-lang.org/) implementation of decentralized digital identity, also known as Self-Sovereign Identity (SSI). It implements the W3C [Decentralized Identifiers (DID)](https://www.w3.org/TR/did-core/) and [Verifiable Credentials](https://www.w3.org/TR/vc-data-model/) specifications. This library can be used to create, resolve and authenticate digital identities and to create verifiable credentials and presentations in order to share information in a verifiable manner and establish trust in the digital world. It does so while supporting secure storage of cryptographic keys, which can be implemented for your preferred key management system. Many of the individual libraries (Rust crates) are agnostic over the concrete DID method, with the exception of some libraries dedicated to implement the [IOTA DID method](https://wiki.iota.org/identity.rs/specs/did/iota_did_method_spec/), which is an implementation of decentralized digital identity on the IOTA and Shimmer networks. Written in stable Rust, IOTA Identity has strong guarantees of memory safety and process integrity while maintaining exceptional performance. ## Bindings @@ -36,8 +36,8 @@ IOTA Identity is a [Rust](https://www.rust-lang.org/) implementation of decentra - API References: - [Rust API Reference](https://docs.rs/identity_iota/latest/identity_iota/): Package documentation (cargo docs). - - [Wasm API Reference](https://wiki.iota.org/shimmer/identity.rs/libraries/wasm/api_reference/): Wasm Package documentation. -- [Identity Documentation Pages](https://wiki.iota.org/shimmer/identity.rs/introduction): Supplementing documentation with context around identity and simple examples on library usage. + - [Wasm API Reference](https://wiki.iota.org/identity.rs/libraries/wasm/api_reference/): Wasm Package documentation. +- [Identity Documentation Pages](https://wiki.iota.org/identity.rs/introduction): Supplementing documentation with context around identity and simple examples on library usage. - [Examples](https://github.com/iotaledger/identity.rs/blob/HEAD/examples): Practical code snippets to get you started with the library. ## Prerequisites @@ -238,7 +238,7 @@ For detailed development progress, see the IOTA Identity development [kanban boa We would love to have you help us with the development of IOTA Identity. Each and every contribution is greatly valued! -Please review the [contribution](https://wiki.iota.org/shimmer/identity.rs/contribute) and [workflow](https://wiki.iota.org/shimmer/identity.rs/workflow) sections in the [IOTA Wiki](https://wiki.iota.org/). +Please review the [contribution](https://wiki.iota.org/identity.rs/contribute) and [workflow](https://wiki.iota.org/identity.rs/workflow) sections in the [IOTA Wiki](https://wiki.iota.org/). To contribute directly to the repository, simply fork the project, push your changes to your fork and create a pull request to get them included! diff --git a/bindings/wasm/docs/api-reference.md b/bindings/wasm/docs/api-reference.md index e83bbc81b6..6fcacf2843 100644 --- a/bindings/wasm/docs/api-reference.md +++ b/bindings/wasm/docs/api-reference.md @@ -11,9 +11,16 @@ if the object is being concurrently modified.
A custom verification method data format.
+A method agnostic DID Url.
A cryptographically verified decoded token from a JWS.
Contains the decoded headers and the raw claims.
@@ -64,11 +71,32 @@ if the object is being concurrently modified.An extension interface that provides helper functions for publication and resolution of DID documents in Alias Outputs.
A JSON Proof Token (JPT).
+Options to declare validation criteria for Jpt.
+Utility functions for validating JPT credentials.
+Options to declare validation criteria for a Jpt presentation.
+Utility functions for verifying JPT presentations.
+The result of a key generation in JwkStorage
.
A wrapper around a JSON Web Signature (JWS).
A compressed bitmap for managing credential revocation.
Information used to determine the current status of a Credential.
+Representation of an SD-JWT of the format
<Issuer-signed JWT>~<Disclosure 1>~<Disclosure 2>~...~<Disclosure N>~<optional KB-JWT>
.
Declares how credential subjects must relate to the presentation holder.
-See also the Subject-Holder Relationship section of the specification.
-The holder must always match the subject on all credentials, regardless of their nonTransferable
property.
-This variant is the default.
The holder must match the subject only for credentials where the nonTransferable
property is true
.
The holder is not required to have any kind of relationship to any credential subject.
-Purpose of a StatusList2021.
-Declares when validation should return if an error occurs.
Return after the first error occurs.
Purpose of a StatusList2021.
+Controls validation behaviour when checking whether or not a credential has been revoked by its
credentialStatus
.
Skip all status checks.
Declares how credential subjects must relate to the presentation holder.
+See also the Subject-Holder Relationship section of the specification.
+The holder must always match the subject on all credentials, regardless of their nonTransferable
property.
+This variant is the default.
The holder must match the subject only for credentials where the nonTransferable
property is true
.
The holder is not required to have any kind of relationship to any credential subject.
+Initializes the console error panic hook for better error messages
+string
Encode the given bytes in url-safe base64.
+Uint8Array
Decode the given url-safe base64-encoded slice into its raw bytes.
Verify a JWS signature secured with the EdDSA
algorithm and curve Ed25519
.
This function does not check whether alg = EdDSA
in the protected header. Callers are expected to assert this
prior to calling the function.
string
Encode the given bytes in url-safe base64.
-Uint8Array
Decode the given url-safe base64-encoded slice into its raw bytes.
+Initializes the console error panic hook for better error messages
any
|
+
+
+## CustomMethodData
+A custom verification method data format.
+
+**Kind**: global class
+
+* [CustomMethodData](#CustomMethodData)
+ * [new CustomMethodData(name, data)](#new_CustomMethodData_new)
+ * _instance_
+ * [.clone()](#CustomMethodData+clone) ⇒ [CustomMethodData
](#CustomMethodData)
+ * [.toJSON()](#CustomMethodData+toJSON) ⇒ any
+ * _static_
+ * [.fromJSON(json)](#CustomMethodData.fromJSON) ⇒ [CustomMethodData
](#CustomMethodData)
+
+
+
+### new CustomMethodData(name, data)
+
+| Param | Type |
+| --- | --- |
+| name | string
|
+| data | any
|
+
+
+
+### customMethodData.clone() ⇒ [CustomMethodData
](#CustomMethodData)
+Deep clones the object.
+
+**Kind**: instance method of [CustomMethodData
](#CustomMethodData)
+
+
+### customMethodData.toJSON() ⇒ any
+Serializes this to a JSON object.
+
+**Kind**: instance method of [CustomMethodData
](#CustomMethodData)
+
+
+### CustomMethodData.fromJSON(json) ⇒ [CustomMethodData
](#CustomMethodData)
+Deserializes an instance from a JSON object.
+
+**Kind**: static method of [CustomMethodData
](#CustomMethodData)
+
+| Param | Type |
+| --- | --- |
+| json | any
|
+
## DIDUrl
@@ -1285,6 +1363,69 @@ Deserializes an instance from a JSON object.
| --- | --- |
| json | any
|
+
+
+## DecodedJptCredential
+**Kind**: global class
+
+* [DecodedJptCredential](#DecodedJptCredential)
+ * [.clone()](#DecodedJptCredential+clone) ⇒ [DecodedJptCredential
](#DecodedJptCredential)
+ * [.credential()](#DecodedJptCredential+credential) ⇒ [Credential
](#Credential)
+ * [.customClaims()](#DecodedJptCredential+customClaims) ⇒ Map.<string, any>
+
+
+
+### decodedJptCredential.clone() ⇒ [DecodedJptCredential
](#DecodedJptCredential)
+Deep clones the object.
+
+**Kind**: instance method of [DecodedJptCredential
](#DecodedJptCredential)
+
+
+### decodedJptCredential.credential() ⇒ [Credential
](#Credential)
+Returns the [Credential](#Credential) embedded into this JPT.
+
+**Kind**: instance method of [DecodedJptCredential
](#DecodedJptCredential)
+
+
+### decodedJptCredential.customClaims() ⇒ Map.<string, any>
+Returns the custom claims parsed from the JPT.
+
+**Kind**: instance method of [DecodedJptCredential
](#DecodedJptCredential)
+
+
+## DecodedJptPresentation
+**Kind**: global class
+
+* [DecodedJptPresentation](#DecodedJptPresentation)
+ * [.clone()](#DecodedJptPresentation+clone) ⇒ [DecodedJptPresentation
](#DecodedJptPresentation)
+ * [.credential()](#DecodedJptPresentation+credential) ⇒ [Credential
](#Credential)
+ * [.customClaims()](#DecodedJptPresentation+customClaims) ⇒ Map.<string, any>
+ * [.aud()](#DecodedJptPresentation+aud) ⇒ string
\| undefined
+
+
+
+### decodedJptPresentation.clone() ⇒ [DecodedJptPresentation
](#DecodedJptPresentation)
+Deep clones the object.
+
+**Kind**: instance method of [DecodedJptPresentation
](#DecodedJptPresentation)
+
+
+### decodedJptPresentation.credential() ⇒ [Credential
](#Credential)
+Returns the [Credential](#Credential) embedded into this JPT.
+
+**Kind**: instance method of [DecodedJptPresentation
](#DecodedJptPresentation)
+
+
+### decodedJptPresentation.customClaims() ⇒ Map.<string, any>
+Returns the custom claims parsed from the JPT.
+
+**Kind**: instance method of [DecodedJptPresentation
](#DecodedJptPresentation)
+
+
+### decodedJptPresentation.aud() ⇒ string
\| undefined
+Returns the `aud` property parsed from the JWT claims.
+
+**Kind**: instance method of [DecodedJptPresentation
](#DecodedJptPresentation)
## DecodedJws
@@ -1967,7 +2108,7 @@ if the object is being concurrently modified.
* _instance_
* [.id()](#IotaDocument+id) ⇒ [IotaDID
](#IotaDID)
* [.controller()](#IotaDocument+controller) ⇒ [Array.<IotaDID>
](#IotaDID)
- * [.setController(controllers)](#IotaDocument+setController)
+ * [.setController(controller)](#IotaDocument+setController)
* [.alsoKnownAs()](#IotaDocument+alsoKnownAs) ⇒ Array.<string>
* [.setAlsoKnownAs(urls)](#IotaDocument+setAlsoKnownAs)
* [.properties()](#IotaDocument+properties) ⇒ Map.<string, any>
@@ -2042,7 +2183,7 @@ during resolution and are omitted when publishing.
**Kind**: instance method of [IotaDocument
](#IotaDocument)
-### iotaDocument.setController(controllers)
+### iotaDocument.setController(controller)
Sets the controllers of the document.
Note: Duplicates will be ignored.
@@ -2052,7 +2193,7 @@ Use `null` to remove all controllers.
| Param | Type |
| --- | --- |
-| controllers | [CoreDID
](#CoreDID) \| [Array.<CoreDID>
](#CoreDID) \| null
|
+| controller | [Array.<IotaDID>
](#IotaDID) \| null
|
@@ -2747,6 +2888,292 @@ Fetches the `IAliasOutput` associated with the given DID.
| client | IIotaIdentityClient
|
| did | [IotaDID
](#IotaDID) |
+
+
+## Jpt
+A JSON Proof Token (JPT).
+
+**Kind**: global class
+
+* [Jpt](#Jpt)
+ * [new Jpt(jpt_string)](#new_Jpt_new)
+ * [.toString()](#Jpt+toString) ⇒ string
+ * [.clone()](#Jpt+clone) ⇒ [Jpt
](#Jpt)
+
+
+
+### new Jpt(jpt_string)
+Creates a new [Jpt](#Jpt).
+
+
+| Param | Type |
+| --- | --- |
+| jpt_string | string
|
+
+
+
+### jpt.toString() ⇒ string
+**Kind**: instance method of [Jpt
](#Jpt)
+
+
+### jpt.clone() ⇒ [Jpt
](#Jpt)
+Deep clones the object.
+
+**Kind**: instance method of [Jpt
](#Jpt)
+
+
+## JptCredentialValidationOptions
+Options to declare validation criteria for [Jpt](#Jpt).
+
+**Kind**: global class
+
+* [JptCredentialValidationOptions](#JptCredentialValidationOptions)
+ * [new JptCredentialValidationOptions([opts])](#new_JptCredentialValidationOptions_new)
+ * _instance_
+ * [.clone()](#JptCredentialValidationOptions+clone) ⇒ [JptCredentialValidationOptions
](#JptCredentialValidationOptions)
+ * [.toJSON()](#JptCredentialValidationOptions+toJSON) ⇒ any
+ * _static_
+ * [.fromJSON(json)](#JptCredentialValidationOptions.fromJSON) ⇒ [JptCredentialValidationOptions
](#JptCredentialValidationOptions)
+
+
+
+### new JptCredentialValidationOptions([opts])
+Creates a new default istance.
+
+
+| Param | Type |
+| --- | --- |
+| [opts] | IJptCredentialValidationOptions
\| undefined
|
+
+
+
+### jptCredentialValidationOptions.clone() ⇒ [JptCredentialValidationOptions
](#JptCredentialValidationOptions)
+Deep clones the object.
+
+**Kind**: instance method of [JptCredentialValidationOptions
](#JptCredentialValidationOptions)
+
+
+### jptCredentialValidationOptions.toJSON() ⇒ any
+Serializes this to a JSON object.
+
+**Kind**: instance method of [JptCredentialValidationOptions
](#JptCredentialValidationOptions)
+
+
+### JptCredentialValidationOptions.fromJSON(json) ⇒ [JptCredentialValidationOptions
](#JptCredentialValidationOptions)
+Deserializes an instance from a JSON object.
+
+**Kind**: static method of [JptCredentialValidationOptions
](#JptCredentialValidationOptions)
+
+| Param | Type |
+| --- | --- |
+| json | any
|
+
+
+
+## JptCredentialValidator
+**Kind**: global class
+
+
+### JptCredentialValidator.validate(credential_jpt, issuer, options, fail_fast) ⇒ [DecodedJptCredential
](#DecodedJptCredential)
+**Kind**: static method of [JptCredentialValidator
](#JptCredentialValidator)
+
+| Param | Type |
+| --- | --- |
+| credential_jpt | [Jpt
](#Jpt) |
+| issuer | [CoreDocument
](#CoreDocument) |
+| options | [JptCredentialValidationOptions
](#JptCredentialValidationOptions) |
+| fail_fast | [FailFast
](#FailFast) |
+
+
+
+## JptCredentialValidatorUtils
+Utility functions for validating JPT credentials.
+
+**Kind**: global class
+
+* [JptCredentialValidatorUtils](#JptCredentialValidatorUtils)
+ * [.extractIssuer(credential)](#JptCredentialValidatorUtils.extractIssuer) ⇒ [CoreDID
](#CoreDID)
+ * [.extractIssuerFromIssuedJpt(credential)](#JptCredentialValidatorUtils.extractIssuerFromIssuedJpt) ⇒ [CoreDID
](#CoreDID)
+ * [.checkTimeframesWithValidityTimeframe2024(credential, validity_timeframe, status_check)](#JptCredentialValidatorUtils.checkTimeframesWithValidityTimeframe2024)
+ * [.checkRevocationWithValidityTimeframe2024(credential, issuer, status_check)](#JptCredentialValidatorUtils.checkRevocationWithValidityTimeframe2024)
+ * [.checkTimeframesAndRevocationWithValidityTimeframe2024(credential, issuer, validity_timeframe, status_check)](#JptCredentialValidatorUtils.checkTimeframesAndRevocationWithValidityTimeframe2024)
+
+
+
+### JptCredentialValidatorUtils.extractIssuer(credential) ⇒ [CoreDID
](#CoreDID)
+Utility for extracting the issuer field of a [`Credential`](`Credential`) as a DID.
+# Errors
+Fails if the issuer field is not a valid DID.
+
+**Kind**: static method of [JptCredentialValidatorUtils
](#JptCredentialValidatorUtils)
+
+| Param | Type |
+| --- | --- |
+| credential | [Credential
](#Credential) |
+
+
+
+### JptCredentialValidatorUtils.extractIssuerFromIssuedJpt(credential) ⇒ [CoreDID
](#CoreDID)
+Utility for extracting the issuer field of a credential in JPT representation as DID.
+# Errors
+If the JPT decoding fails or the issuer field is not a valid DID.
+
+**Kind**: static method of [JptCredentialValidatorUtils
](#JptCredentialValidatorUtils)
+
+| Param | Type |
+| --- | --- |
+| credential | [Jpt
](#Jpt) |
+
+
+
+### JptCredentialValidatorUtils.checkTimeframesWithValidityTimeframe2024(credential, validity_timeframe, status_check)
+**Kind**: static method of [JptCredentialValidatorUtils
](#JptCredentialValidatorUtils)
+
+| Param | Type |
+| --- | --- |
+| credential | [Credential
](#Credential) |
+| validity_timeframe | [Timestamp
](#Timestamp) \| undefined
|
+| status_check | [StatusCheck
](#StatusCheck) |
+
+
+
+### JptCredentialValidatorUtils.checkRevocationWithValidityTimeframe2024(credential, issuer, status_check)
+Checks whether the credential status has been revoked.
+
+Only supports `RevocationTimeframe2024`.
+
+**Kind**: static method of [JptCredentialValidatorUtils
](#JptCredentialValidatorUtils)
+
+| Param | Type |
+| --- | --- |
+| credential | [Credential
](#Credential) |
+| issuer | [CoreDocument
](#CoreDocument) |
+| status_check | [StatusCheck
](#StatusCheck) |
+
+
+
+### JptCredentialValidatorUtils.checkTimeframesAndRevocationWithValidityTimeframe2024(credential, issuer, validity_timeframe, status_check)
+Checks whether the credential status has been revoked or the timeframe interval is INVALID
+
+Only supports `RevocationTimeframe2024`.
+
+**Kind**: static method of [JptCredentialValidatorUtils
](#JptCredentialValidatorUtils)
+
+| Param | Type |
+| --- | --- |
+| credential | [Credential
](#Credential) |
+| issuer | [CoreDocument
](#CoreDocument) |
+| validity_timeframe | [Timestamp
](#Timestamp) \| undefined
|
+| status_check | [StatusCheck
](#StatusCheck) |
+
+
+
+## JptPresentationValidationOptions
+Options to declare validation criteria for a [Jpt](#Jpt) presentation.
+
+**Kind**: global class
+
+* [JptPresentationValidationOptions](#JptPresentationValidationOptions)
+ * [new JptPresentationValidationOptions([opts])](#new_JptPresentationValidationOptions_new)
+ * _instance_
+ * [.clone()](#JptPresentationValidationOptions+clone) ⇒ [JptPresentationValidationOptions
](#JptPresentationValidationOptions)
+ * [.toJSON()](#JptPresentationValidationOptions+toJSON) ⇒ any
+ * _static_
+ * [.fromJSON(json)](#JptPresentationValidationOptions.fromJSON) ⇒ [JptPresentationValidationOptions
](#JptPresentationValidationOptions)
+
+
+
+### new JptPresentationValidationOptions([opts])
+
+| Param | Type |
+| --- | --- |
+| [opts] | IJptPresentationValidationOptions
\| undefined
|
+
+
+
+### jptPresentationValidationOptions.clone() ⇒ [JptPresentationValidationOptions
](#JptPresentationValidationOptions)
+Deep clones the object.
+
+**Kind**: instance method of [JptPresentationValidationOptions
](#JptPresentationValidationOptions)
+
+
+### jptPresentationValidationOptions.toJSON() ⇒ any
+Serializes this to a JSON object.
+
+**Kind**: instance method of [JptPresentationValidationOptions
](#JptPresentationValidationOptions)
+
+
+### JptPresentationValidationOptions.fromJSON(json) ⇒ [JptPresentationValidationOptions
](#JptPresentationValidationOptions)
+Deserializes an instance from a JSON object.
+
+**Kind**: static method of [JptPresentationValidationOptions
](#JptPresentationValidationOptions)
+
+| Param | Type |
+| --- | --- |
+| json | any
|
+
+
+
+## JptPresentationValidator
+**Kind**: global class
+
+
+### JptPresentationValidator.validate(presentation_jpt, issuer, options, fail_fast) ⇒ [DecodedJptPresentation
](#DecodedJptPresentation)
+Decodes and validates a Presented [Credential](#Credential) issued as a JPT (JWP Presented Form). A
+[DecodedJptPresentation](#DecodedJptPresentation) is returned upon success.
+
+The following properties are validated according to `options`:
+- the holder's proof on the JWP,
+- the expiration date,
+- the issuance date,
+- the semantic structure.
+
+**Kind**: static method of [JptPresentationValidator
](#JptPresentationValidator)
+
+| Param | Type |
+| --- | --- |
+| presentation_jpt | [Jpt
](#Jpt) |
+| issuer | [CoreDocument
](#CoreDocument) |
+| options | [JptPresentationValidationOptions
](#JptPresentationValidationOptions) |
+| fail_fast | [FailFast
](#FailFast) |
+
+
+
+## JptPresentationValidatorUtils
+Utility functions for verifying JPT presentations.
+
+**Kind**: global class
+
+* [JptPresentationValidatorUtils](#JptPresentationValidatorUtils)
+ * [.extractIssuerFromPresentedJpt(presentation)](#JptPresentationValidatorUtils.extractIssuerFromPresentedJpt) ⇒ [CoreDID
](#CoreDID)
+ * [.checkTimeframesWithValidityTimeframe2024(credential, validity_timeframe, status_check)](#JptPresentationValidatorUtils.checkTimeframesWithValidityTimeframe2024)
+
+
+
+### JptPresentationValidatorUtils.extractIssuerFromPresentedJpt(presentation) ⇒ [CoreDID
](#CoreDID)
+Utility for extracting the issuer field of a credential in JPT representation as DID.
+# Errors
+If the JPT decoding fails or the issuer field is not a valid DID.
+
+**Kind**: static method of [JptPresentationValidatorUtils
](#JptPresentationValidatorUtils)
+
+| Param | Type |
+| --- | --- |
+| presentation | [Jpt
](#Jpt) |
+
+
+
+### JptPresentationValidatorUtils.checkTimeframesWithValidityTimeframe2024(credential, validity_timeframe, status_check)
+Check timeframe interval in credentialStatus with `RevocationTimeframeStatus`.
+
+**Kind**: static method of [JptPresentationValidatorUtils
](#JptPresentationValidatorUtils)
+
+| Param | Type |
+| --- | --- |
+| credential | [Credential
](#Credential) |
+| validity_timeframe | [Timestamp
](#Timestamp) \| undefined
|
+| status_check | [StatusCheck
](#StatusCheck) |
+
## Jwk
@@ -2963,6 +3390,51 @@ Deserializes an instance from a JSON object.
| --- | --- |
| json | any
|
+
+
+## JwpVerificationOptions
+**Kind**: global class
+
+* [JwpVerificationOptions](#JwpVerificationOptions)
+ * _instance_
+ * [.clone()](#JwpVerificationOptions+clone) ⇒ [JwpVerificationOptions
](#JwpVerificationOptions)
+ * [.toJSON()](#JwpVerificationOptions+toJSON) ⇒ any
+ * _static_
+ * [.fromJSON(json)](#JwpVerificationOptions.fromJSON) ⇒ [JwpVerificationOptions
](#JwpVerificationOptions)
+ * [.new([opts])](#JwpVerificationOptions.new) ⇒ [JwpVerificationOptions
](#JwpVerificationOptions)
+
+
+
+### jwpVerificationOptions.clone() ⇒ [JwpVerificationOptions
](#JwpVerificationOptions)
+Deep clones the object.
+
+**Kind**: instance method of [JwpVerificationOptions
](#JwpVerificationOptions)
+
+
+### jwpVerificationOptions.toJSON() ⇒ any
+Serializes this to a JSON object.
+
+**Kind**: instance method of [JwpVerificationOptions
](#JwpVerificationOptions)
+
+
+### JwpVerificationOptions.fromJSON(json) ⇒ [JwpVerificationOptions
](#JwpVerificationOptions)
+Deserializes an instance from a JSON object.
+
+**Kind**: static method of [JwpVerificationOptions
](#JwpVerificationOptions)
+
+| Param | Type |
+| --- | --- |
+| json | any
|
+
+
+
+### JwpVerificationOptions.new([opts]) ⇒ [JwpVerificationOptions
](#JwpVerificationOptions)
+**Kind**: static method of [JwpVerificationOptions
](#JwpVerificationOptions)
+
+| Param | Type |
+| --- | --- |
+| [opts] | IJwpVerificationOptions
\| undefined
|
+
## Jws
@@ -4343,6 +4815,7 @@ Supported verification method data formats.
* [MethodData](#MethodData)
* _instance_
+ * [.tryCustom()](#MethodData+tryCustom) ⇒ [CustomMethodData
](#CustomMethodData)
* [.tryDecode()](#MethodData+tryDecode) ⇒ Uint8Array
* [.tryPublicKeyJwk()](#MethodData+tryPublicKeyJwk) ⇒ [Jwk
](#Jwk)
* [.toJSON()](#MethodData+toJSON) ⇒ any
@@ -4351,8 +4824,15 @@ Supported verification method data formats.
* [.newBase58(data)](#MethodData.newBase58) ⇒ [MethodData
](#MethodData)
* [.newMultibase(data)](#MethodData.newMultibase) ⇒ [MethodData
](#MethodData)
* [.newJwk(key)](#MethodData.newJwk) ⇒ [MethodData
](#MethodData)
+ * [.newCustom(name, data)](#MethodData.newCustom) ⇒ [MethodData
](#MethodData)
* [.fromJSON(json)](#MethodData.fromJSON) ⇒ [MethodData
](#MethodData)
+
+
+### methodData.tryCustom() ⇒ [CustomMethodData
](#CustomMethodData)
+Returns the wrapped custom method data format is `Custom`.
+
+**Kind**: instance method of [MethodData
](#MethodData)
### methodData.tryDecode() ⇒ Uint8Array
@@ -4419,6 +4899,18 @@ An error is thrown if the given `key` contains any private components.
| --- | --- |
| key | [Jwk
](#Jwk) |
+
+
+### MethodData.newCustom(name, data) ⇒ [MethodData
](#MethodData)
+Creates a new custom [MethodData](#MethodData).
+
+**Kind**: static method of [MethodData
](#MethodData)
+
+| Param | Type |
+| --- | --- |
+| name | string
|
+| data | any
|
+
### MethodData.fromJSON(json) ⇒ [MethodData
](#MethodData)
@@ -4570,6 +5062,7 @@ Supported verification method types.
* [.Ed25519VerificationKey2018()](#MethodType.Ed25519VerificationKey2018) ⇒ [MethodType
](#MethodType)
* [.X25519KeyAgreementKey2019()](#MethodType.X25519KeyAgreementKey2019) ⇒ [MethodType
](#MethodType)
* [.JsonWebKey()](#MethodType.JsonWebKey) ⇒ [MethodType
](#MethodType)
+ * [.custom(type_)](#MethodType.custom) ⇒ [MethodType
](#MethodType)
* [.fromJSON(json)](#MethodType.fromJSON) ⇒ [MethodType
](#MethodType)
@@ -4605,6 +5098,17 @@ A verification method for use with JWT verification as prescribed by the [Jwk](#
in the `publicKeyJwk` entry.
**Kind**: static method of [MethodType
](#MethodType)
+
+
+### MethodType.custom(type_) ⇒ [MethodType
](#MethodType)
+A custom method.
+
+**Kind**: static method of [MethodType
](#MethodType)
+
+| Param | Type |
+| --- | --- |
+| type_ | string
|
+
### MethodType.fromJSON(json) ⇒ [MethodType
](#MethodType)
@@ -4990,6 +5494,85 @@ if it is a valid Revocation Bitmap Service.
| --- | --- |
| service | [Service
](#Service) |
+
+
+## RevocationTimeframeStatus
+Information used to determine the current status of a [Credential](#Credential).
+
+**Kind**: global class
+
+* [RevocationTimeframeStatus](#RevocationTimeframeStatus)
+ * [new RevocationTimeframeStatus(id, index, duration, [start_validity])](#new_RevocationTimeframeStatus_new)
+ * _instance_
+ * [.clone()](#RevocationTimeframeStatus+clone) ⇒ [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+ * [.toJSON()](#RevocationTimeframeStatus+toJSON) ⇒ any
+ * [.startValidityTimeframe()](#RevocationTimeframeStatus+startValidityTimeframe) ⇒ [Timestamp
](#Timestamp)
+ * [.endValidityTimeframe()](#RevocationTimeframeStatus+endValidityTimeframe) ⇒ [Timestamp
](#Timestamp)
+ * [.id()](#RevocationTimeframeStatus+id) ⇒ string
+ * [.index()](#RevocationTimeframeStatus+index) ⇒ number
+ * _static_
+ * [.fromJSON(json)](#RevocationTimeframeStatus.fromJSON) ⇒ [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+
+
+
+### new RevocationTimeframeStatus(id, index, duration, [start_validity])
+Creates a new `RevocationTimeframeStatus`.
+
+
+| Param | Type |
+| --- | --- |
+| id | string
|
+| index | number
|
+| duration | [Duration
](#Duration) |
+| [start_validity] | [Timestamp
](#Timestamp) \| undefined
|
+
+
+
+### revocationTimeframeStatus.clone() ⇒ [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+Deep clones the object.
+
+**Kind**: instance method of [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+
+
+### revocationTimeframeStatus.toJSON() ⇒ any
+Serializes this to a JSON object.
+
+**Kind**: instance method of [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+
+
+### revocationTimeframeStatus.startValidityTimeframe() ⇒ [Timestamp
](#Timestamp)
+Get startValidityTimeframe value.
+
+**Kind**: instance method of [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+
+
+### revocationTimeframeStatus.endValidityTimeframe() ⇒ [Timestamp
](#Timestamp)
+Get endValidityTimeframe value.
+
+**Kind**: instance method of [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+
+
+### revocationTimeframeStatus.id() ⇒ string
+Return the URL fo the `RevocationBitmapStatus`.
+
+**Kind**: instance method of [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+
+
+### revocationTimeframeStatus.index() ⇒ number
+Return the index of the credential in the issuer's revocation bitmap if it can be decoded.
+
+**Kind**: instance method of [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+
+
+### RevocationTimeframeStatus.fromJSON(json) ⇒ [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+Deserializes an instance from a JSON object.
+
+**Kind**: static method of [RevocationTimeframeStatus
](#RevocationTimeframeStatus)
+
+| Param | Type |
+| --- | --- |
+| json | any
|
+
## SdJwt
@@ -5006,11 +5589,9 @@ Representation of an SD-JWT of the format
* [.jwt()](#SdJwt+jwt) ⇒ string
* [.disclosures()](#SdJwt+disclosures) ⇒ Array.<string>
* [.keyBindingJwt()](#SdJwt+keyBindingJwt) ⇒ string
\| undefined
- * [.toJSON()](#SdJwt+toJSON) ⇒ any
* [.clone()](#SdJwt+clone) ⇒ [SdJwt
](#SdJwt)
* _static_
* [.parse(sd_jwt)](#SdJwt.parse) ⇒ [SdJwt
](#SdJwt)
- * [.fromJSON(json)](#SdJwt.fromJSON) ⇒ [SdJwt
](#SdJwt)
@@ -5053,12 +5634,6 @@ The disclosures part.
### sdJwt.keyBindingJwt() ⇒ string
\| undefined
The optional key binding JWT.
-**Kind**: instance method of [SdJwt
](#SdJwt)
-
-
-### sdJwt.toJSON() ⇒ any
-Serializes this to a JSON object.
-
**Kind**: instance method of [SdJwt
](#SdJwt)
@@ -5080,17 +5655,6 @@ Returns `DeserializationError` if parsing fails.
| --- | --- |
| sd_jwt | string
|
-
-
-### SdJwt.fromJSON(json) ⇒ [SdJwt
](#SdJwt)
-Deserializes an instance from a JSON object.
-
-**Kind**: static method of [SdJwt
](#SdJwt)
-
-| Param | Type |
-| --- | --- |
-| json | any
|
-
## SdJwtCredentialValidator
@@ -5967,6 +6531,7 @@ A DID Document Verification Method.
**Kind**: global class
* [VerificationMethod](#VerificationMethod)
+ * [new VerificationMethod(id, controller, type_, data)](#new_VerificationMethod_new)
* _instance_
* [.id()](#VerificationMethod+id) ⇒ [DIDUrl
](#DIDUrl)
* [.setId(id)](#VerificationMethod+setId)
@@ -5984,6 +6549,19 @@ A DID Document Verification Method.
* [.newFromJwk(did, key, [fragment])](#VerificationMethod.newFromJwk) ⇒ [VerificationMethod
](#VerificationMethod)
* [.fromJSON(json)](#VerificationMethod.fromJSON) ⇒ [VerificationMethod
](#VerificationMethod)
+
+
+### new VerificationMethod(id, controller, type_, data)
+Create a custom [VerificationMethod](#VerificationMethod).
+
+
+| Param | Type |
+| --- | --- |
+| id | [DIDUrl
](#DIDUrl) |
+| controller | [CoreDID
](#CoreDID) |
+| type_ | [MethodType
](#MethodType) |
+| data | [MethodData
](#MethodData) |
+
### verificationMethod.id() ⇒ [DIDUrl
](#DIDUrl)
@@ -6119,60 +6697,41 @@ Deserializes an instance from a JSON object.
| --- | --- |
| json | any
|
-
+
-## CredentialStatus
-**Kind**: global variable
-
+## FailFast
+Declares when validation should return if an error occurs.
-## SubjectHolderRelationship
-Declares how credential subjects must relate to the presentation holder.
+**Kind**: global variable
+
-See also the [Subject-Holder Relationship](https://www.w3.org/TR/vc-data-model/#subject-holder-relationships) section of the specification.
+## AllErrors
+Return all errors that occur during validation.
**Kind**: global variable
-
+
-## AlwaysSubject
-The holder must always match the subject on all credentials, regardless of their [`nonTransferable`](https://www.w3.org/TR/vc-data-model/#nontransferable-property) property.
-This variant is the default.
+## FirstError
+Return after the first error occurs.
**Kind**: global variable
-
-
-## SubjectOnNonTransferable
-The holder must match the subject only for credentials where the [`nonTransferable`](https://www.w3.org/TR/vc-data-model/#nontransferable-property) property is `true`.
+
+## MethodRelationship
**Kind**: global variable
-
+
-## Any
-The holder is not required to have any kind of relationship to any credential subject.
+## CredentialStatus
+**Kind**: global variable
+
+## StateMetadataEncoding
**Kind**: global variable
## StatusPurpose
Purpose of a [StatusList2021](#StatusList2021).
-**Kind**: global variable
-
-
-## FailFast
-Declares when validation should return if an error occurs.
-
-**Kind**: global variable
-
-
-## AllErrors
-Return all errors that occur during validation.
-
-**Kind**: global variable
-
-
-## FirstError
-Return after the first error occurs.
-
**Kind**: global variable
@@ -6205,20 +6764,55 @@ Validate the status if supported, skip any unsupported
Skip all status checks.
**Kind**: global variable
-
+
+
+## SubjectHolderRelationship
+Declares how credential subjects must relate to the presentation holder.
+
+See also the [Subject-Holder Relationship](https://www.w3.org/TR/vc-data-model/#subject-holder-relationships) section of the specification.
-## StateMetadataEncoding
**Kind**: global variable
-
+
+
+## AlwaysSubject
+The holder must always match the subject on all credentials, regardless of their [`nonTransferable`](https://www.w3.org/TR/vc-data-model/#nontransferable-property) property.
+This variant is the default.
-## MethodRelationship
**Kind**: global variable
-
+
-## start()
-Initializes the console error panic hook for better error messages
+## SubjectOnNonTransferable
+The holder must match the subject only for credentials where the [`nonTransferable`](https://www.w3.org/TR/vc-data-model/#nontransferable-property) property is `true`.
+
+**Kind**: global variable
+
+
+## Any
+The holder is not required to have any kind of relationship to any credential subject.
+
+**Kind**: global variable
+
+
+## encodeB64(data) ⇒ string
+Encode the given bytes in url-safe base64.
**Kind**: global function
+
+| Param | Type |
+| --- | --- |
+| data | Uint8Array
|
+
+
+
+## decodeB64(data) ⇒ Uint8Array
+Decode the given url-safe base64-encoded slice into its raw bytes.
+
+**Kind**: global function
+
+| Param | Type |
+| --- | --- |
+| data | Uint8Array
|
+
## verifyEd25519(alg, signingInput, decodedSignature, publicKey)
@@ -6241,25 +6835,9 @@ prior to calling the function.
| decodedSignature | Uint8Array
|
| publicKey | [Jwk
](#Jwk) |
-
-
-## encodeB64(data) ⇒ string
-Encode the given bytes in url-safe base64.
-
-**Kind**: global function
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
+
-## decodeB64(data) ⇒ Uint8Array
-Decode the given url-safe base64-encoded slice into its raw bytes.
+## start()
+Initializes the console error panic hook for better error messages
**Kind**: global function
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
diff --git a/bindings/wasm/src/common/types.rs b/bindings/wasm/src/common/types.rs
index 295e0ea447..8264e923ce 100644
--- a/bindings/wasm/src/common/types.rs
+++ b/bindings/wasm/src/common/types.rs
@@ -75,3 +75,9 @@ impl TryFrom<&Object> for MapStringAny {
Ok(map.unchecked_into::