diff --git a/bindings/wasm/docs/api-reference.md b/bindings/wasm/docs/api-reference.md index 8eede47999..73ff47d4c6 100644 --- a/bindings/wasm/docs/api-reference.md +++ b/bindings/wasm/docs/api-reference.md @@ -204,6 +204,24 @@ working with storage backed DID documents.
Skip all status checks.
Purpose of a StatusList2021.
+Declares when validation should return if an error occurs.
+Return all errors that occur during validation.
+Return after the first error occurs.
+Declares how credential subjects must relate to the presentation holder.
See also the Subject-Holder Relationship section of the specification.
@@ -218,24 +236,6 @@ This variant is the default.The holder is not required to have any kind of relationship to any credential subject.
Declares when validation should return if an error occurs.
-Return all errors that occur during validation.
-Return after the first error occurs.
-Purpose of a StatusList2021.
-string
* [.tryDecode()](#MethodData+tryDecode) ⇒ Uint8Array
* [.tryPublicKeyJwk()](#MethodData+tryPublicKeyJwk) ⇒ [Jwk
](#Jwk)
* [.toJSON()](#MethodData+toJSON) ⇒ any
@@ -4351,8 +4352,15 @@ Supported verification method data formats.
* [.newBase58(data)](#MethodData.newBase58) ⇒ [MethodData
](#MethodData)
* [.newMultibase(data)](#MethodData.newMultibase) ⇒ [MethodData
](#MethodData)
* [.newJwk(key)](#MethodData.newJwk) ⇒ [MethodData
](#MethodData)
+ * [.newBlockchainAccountId(data)](#MethodData.newBlockchainAccountId) ⇒ [MethodData
](#MethodData)
* [.fromJSON(json)](#MethodData.fromJSON) ⇒ [MethodData
](#MethodData)
+
+
+### methodData.tryBlockchainAccountId() ⇒ string
+Returns the wrapped blockchain account id if the format is `BlockchainAccountId`.
+
+**Kind**: instance method of [MethodData
](#MethodData)
### methodData.tryDecode() ⇒ Uint8Array
@@ -4419,6 +4427,17 @@ An error is thrown if the given `key` contains any private components.
| --- | --- |
| key | [Jwk
](#Jwk) |
+
+
+### MethodData.newBlockchainAccountId(data) ⇒ [MethodData
](#MethodData)
+Creates a new [MethodData](#MethodData) variant in CAIP-10 format.
+
+**Kind**: static method of [MethodData
](#MethodData)
+
+| Param | Type |
+| --- | --- |
+| data | string
|
+
### MethodData.fromJSON(json) ⇒ [MethodData
](#MethodData)
@@ -4570,6 +4589,7 @@ Supported verification method types.
* [.Ed25519VerificationKey2018()](#MethodType.Ed25519VerificationKey2018) ⇒ [MethodType
](#MethodType)
* [.X25519KeyAgreementKey2019()](#MethodType.X25519KeyAgreementKey2019) ⇒ [MethodType
](#MethodType)
* [.JsonWebKey()](#MethodType.JsonWebKey) ⇒ [MethodType
](#MethodType)
+ * [.EcdsaSecp256k1RecoverySignature2020()](#MethodType.EcdsaSecp256k1RecoverySignature2020) ⇒ [MethodType
](#MethodType)
* [.fromJSON(json)](#MethodType.fromJSON) ⇒ [MethodType
](#MethodType)
@@ -4604,6 +4624,12 @@ Deep clones the object.
A verification method for use with JWT verification as prescribed by the [Jwk](#Jwk)
in the `publicKeyJwk` entry.
+**Kind**: static method of [MethodType
](#MethodType)
+
+
+### MethodType.EcdsaSecp256k1RecoverySignature2020() ⇒ [MethodType
](#MethodType)
+The `EcdsaSecp256k1RecoverySignature2020` method type.
+
**Kind**: static method of [MethodType
](#MethodType)
@@ -6164,41 +6190,24 @@ 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.
-
-**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.
+## StatusPurpose
+Purpose of a [StatusList2021](#StatusList2021).
**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
-
-
-## MethodRelationship
-**Kind**: global variable
## FailFast
@@ -6217,14 +6226,31 @@ Return all errors that occur during validation.
Return after the first error occurs.
**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.
-## CredentialStatus
**Kind**: global variable
-
+
-## StatusPurpose
-Purpose of a [StatusList2021](#StatusList2021).
+## 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.
+
+**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`.
+
+**Kind**: global variable
+
+
+## Any
+The holder is not required to have any kind of relationship to any credential subject.
**Kind**: global variable
diff --git a/bindings/wasm/src/verification/wasm_method_data.rs b/bindings/wasm/src/verification/wasm_method_data.rs
index 5bba4aa5a9..809eab22e4 100644
--- a/bindings/wasm/src/verification/wasm_method_data.rs
+++ b/bindings/wasm/src/verification/wasm_method_data.rs
@@ -45,6 +45,26 @@ impl WasmMethodData {
Ok(Self(MethodData::PublicKeyJwk(key.0.clone())))
}
+ /// Creates a new {@link MethodData} variant in CAIP-10 format.
+ #[wasm_bindgen(js_name = newBlockchainAccountId)]
+ pub fn new_blockchain_account_id(data: String) -> Self {
+ Self(MethodData::new_blockchain_account_id(data))
+ }
+
+ /// Returns the wrapped blockchain account id if the format is `BlockchainAccountId`.
+ #[wasm_bindgen(js_name = tryBlockchainAccountId)]
+ pub fn try_blockchain_account_id(&self) -> Result