Skip to content

Commit

Permalink
update Wasm docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eike-hass committed Mar 28, 2024
1 parent 4f1b038 commit 698b03a
Showing 1 changed file with 164 additions and 73 deletions.
237 changes: 164 additions & 73 deletions docs/build/identity.rs/1.2/docs/references/api/wasm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ if the object is being concurrently modified.</p>
</dd>
<dt><a href="#Credential">Credential</a></dt>
<dd></dd>
<dt><a href="#CustomMethodData">CustomMethodData</a></dt>
<dd><p>A custom verification method data format.</p>
</dd>
<dt><a href="#DIDUrl">DIDUrl</a></dt>
<dd><p>A method agnostic DID Url.</p>
</dd>
Expand Down Expand Up @@ -197,15 +200,6 @@ working with storage backed DID documents.</p>
## Members

<dl>
<dt><a href="#CredentialStatus">CredentialStatus</a></dt>
<dd></dd>
<dt><a href="#StatusPurpose">StatusPurpose</a></dt>
<dd><p>Purpose of a <a href="#StatusList2021">StatusList2021</a>.</p>
</dd>
<dt><a href="#StateMetadataEncoding">StateMetadataEncoding</a></dt>
<dd></dd>
<dt><a href="#MethodRelationship">MethodRelationship</a></dt>
<dd></dd>
<dt><a href="#StatusCheck">StatusCheck</a></dt>
<dd><p>Controls validation behaviour when checking whether or not a credential has been revoked by its
<a href="https://www.w3.org/TR/vc-data-model/#status"><code>credentialStatus</code></a>.</p>
Expand Down Expand Up @@ -246,27 +240,36 @@ This variant is the default.</p>
<dt><a href="#FirstError">FirstError</a></dt>
<dd><p>Return after the first error occurs.</p>
</dd>
<dt><a href="#StateMetadataEncoding">StateMetadataEncoding</a></dt>
<dd></dd>
<dt><a href="#MethodRelationship">MethodRelationship</a></dt>
<dd></dd>
<dt><a href="#CredentialStatus">CredentialStatus</a></dt>
<dd></dd>
<dt><a href="#StatusPurpose">StatusPurpose</a></dt>
<dd><p>Purpose of a <a href="#StatusList2021">StatusList2021</a>.</p>
</dd>
</dl>

## Functions

<dl>
<dt><a href="#verifyEd25519">verifyEd25519(alg, signingInput, decodedSignature, publicKey)</a></dt>
<dd><p>Verify a JWS signature secured with the <code>EdDSA</code> algorithm and curve <code>Ed25519</code>.</p>
<p>This function is useful when one is composing a <code>IJwsVerifier</code> that delegates
<code>EdDSA</code> verification with curve <code>Ed25519</code> to this function.</p>
<h1 id="warning">Warning</h1>
<p>This function does not check whether <code>alg = EdDSA</code> in the protected header. Callers are expected to assert this
prior to calling the function.</p>
<dt><a href="#start">start()</a></dt>
<dd><p>Initializes the console error panic hook for better error messages</p>
</dd>
<dt><a href="#encodeB64">encodeB64(data)</a> ⇒ <code>string</code></dt>
<dd><p>Encode the given bytes in url-safe base64.</p>
</dd>
<dt><a href="#decodeB64">decodeB64(data)</a> ⇒ <code>Uint8Array</code></dt>
<dd><p>Decode the given url-safe base64-encoded slice into its raw bytes.</p>
</dd>
<dt><a href="#start">start()</a></dt>
<dd><p>Initializes the console error panic hook for better error messages</p>
<dt><a href="#verifyEd25519">verifyEd25519(alg, signingInput, decodedSignature, publicKey)</a></dt>
<dd><p>Verify a JWS signature secured with the <code>EdDSA</code> algorithm and curve <code>Ed25519</code>.</p>
<p>This function is useful when one is composing a <code>IJwsVerifier</code> that delegates
<code>EdDSA</code> verification with curve <code>Ed25519</code> to this function.</p>
<h1 id="warning">Warning</h1>
<p>This function does not check whether <code>alg = EdDSA</code> in the protected header. Callers are expected to assert this
prior to calling the function.</p>
</dd>
</dl>

Expand Down Expand Up @@ -1148,6 +1151,53 @@ Deserializes an instance from a JSON object.
| --- | --- |
| json | <code>any</code> |

<a name="CustomMethodData"></a>

## CustomMethodData
A custom verification method data format.

**Kind**: global class

* [CustomMethodData](#CustomMethodData)
* [new CustomMethodData(name, data)](#new_CustomMethodData_new)
* _instance_
* [.clone()](#CustomMethodData+clone)[<code>CustomMethodData</code>](#CustomMethodData)
* [.toJSON()](#CustomMethodData+toJSON) ⇒ <code>any</code>
* _static_
* [.fromJSON(json)](#CustomMethodData.fromJSON)[<code>CustomMethodData</code>](#CustomMethodData)

<a name="new_CustomMethodData_new"></a>

### new CustomMethodData(name, data)

| Param | Type |
| --- | --- |
| name | <code>string</code> |
| data | <code>any</code> |

<a name="CustomMethodData+clone"></a>

### customMethodData.clone() ⇒ [<code>CustomMethodData</code>](#CustomMethodData)
Deep clones the object.

**Kind**: instance method of [<code>CustomMethodData</code>](#CustomMethodData)
<a name="CustomMethodData+toJSON"></a>

### customMethodData.toJSON() ⇒ <code>any</code>
Serializes this to a JSON object.

**Kind**: instance method of [<code>CustomMethodData</code>](#CustomMethodData)
<a name="CustomMethodData.fromJSON"></a>

### CustomMethodData.fromJSON(json) ⇒ [<code>CustomMethodData</code>](#CustomMethodData)
Deserializes an instance from a JSON object.

**Kind**: static method of [<code>CustomMethodData</code>](#CustomMethodData)

| Param | Type |
| --- | --- |
| json | <code>any</code> |

<a name="DIDUrl"></a>

## DIDUrl
Expand Down Expand Up @@ -1977,6 +2027,7 @@ if the object is being concurrently modified.
* _instance_
* [.id()](#IotaDocument+id)[<code>IotaDID</code>](#IotaDID)
* [.controller()](#IotaDocument+controller)[<code>Array.&lt;IotaDID&gt;</code>](#IotaDID)
* [.setController(controller)](#IotaDocument+setController)
* [.alsoKnownAs()](#IotaDocument+alsoKnownAs) ⇒ <code>Array.&lt;string&gt;</code>
* [.setAlsoKnownAs(urls)](#IotaDocument+setAlsoKnownAs)
* [.properties()](#IotaDocument+properties) ⇒ <code>Map.&lt;string, any&gt;</code>
Expand Down Expand Up @@ -2049,6 +2100,20 @@ NOTE: controllers are determined by the `state_controller` unlock condition of t
during resolution and are omitted when publishing.

**Kind**: instance method of [<code>IotaDocument</code>](#IotaDocument)
<a name="IotaDocument+setController"></a>

### iotaDocument.setController(controller)
Sets the controllers of the document.

Note: Duplicates will be ignored.
Use `null` to remove all controllers.

**Kind**: instance method of [<code>IotaDocument</code>](#IotaDocument)

| Param | Type |
| --- | --- |
| controller | [<code>Array.&lt;IotaDID&gt;</code>](#IotaDID) \| <code>null</code> |

<a name="IotaDocument+alsoKnownAs"></a>

### iotaDocument.alsoKnownAs() ⇒ <code>Array.&lt;string&gt;</code>
Expand Down Expand Up @@ -4338,6 +4403,7 @@ Supported verification method data formats.

* [MethodData](#MethodData)
* _instance_
* [.tryCustom()](#MethodData+tryCustom)[<code>CustomMethodData</code>](#CustomMethodData)
* [.tryDecode()](#MethodData+tryDecode) ⇒ <code>Uint8Array</code>
* [.tryPublicKeyJwk()](#MethodData+tryPublicKeyJwk)[<code>Jwk</code>](#Jwk)
* [.toJSON()](#MethodData+toJSON) ⇒ <code>any</code>
Expand All @@ -4346,8 +4412,15 @@ Supported verification method data formats.
* [.newBase58(data)](#MethodData.newBase58)[<code>MethodData</code>](#MethodData)
* [.newMultibase(data)](#MethodData.newMultibase)[<code>MethodData</code>](#MethodData)
* [.newJwk(key)](#MethodData.newJwk)[<code>MethodData</code>](#MethodData)
* [.newCustom(name, data)](#MethodData.newCustom)[<code>MethodData</code>](#MethodData)
* [.fromJSON(json)](#MethodData.fromJSON)[<code>MethodData</code>](#MethodData)

<a name="MethodData+tryCustom"></a>

### methodData.tryCustom() ⇒ [<code>CustomMethodData</code>](#CustomMethodData)
Returns the wrapped custom method data format is `Custom`.

**Kind**: instance method of [<code>MethodData</code>](#MethodData)
<a name="MethodData+tryDecode"></a>

### methodData.tryDecode() ⇒ <code>Uint8Array</code>
Expand Down Expand Up @@ -4414,6 +4487,18 @@ An error is thrown if the given `key` contains any private components.
| --- | --- |
| key | [<code>Jwk</code>](#Jwk) |

<a name="MethodData.newCustom"></a>

### MethodData.newCustom(name, data) ⇒ [<code>MethodData</code>](#MethodData)
Creates a new custom [MethodData](#MethodData).

**Kind**: static method of [<code>MethodData</code>](#MethodData)

| Param | Type |
| --- | --- |
| name | <code>string</code> |
| data | <code>any</code> |

<a name="MethodData.fromJSON"></a>

### MethodData.fromJSON(json) ⇒ [<code>MethodData</code>](#MethodData)
Expand Down Expand Up @@ -4565,6 +4650,7 @@ Supported verification method types.
* [.Ed25519VerificationKey2018()](#MethodType.Ed25519VerificationKey2018)[<code>MethodType</code>](#MethodType)
* [.X25519KeyAgreementKey2019()](#MethodType.X25519KeyAgreementKey2019)[<code>MethodType</code>](#MethodType)
* [.JsonWebKey()](#MethodType.JsonWebKey)[<code>MethodType</code>](#MethodType)
* [.custom(type_)](#MethodType.custom)[<code>MethodType</code>](#MethodType)
* [.fromJSON(json)](#MethodType.fromJSON)[<code>MethodType</code>](#MethodType)

<a name="MethodType+toString"></a>
Expand Down Expand Up @@ -4600,6 +4686,17 @@ A verification method for use with JWT verification as prescribed by the [Jwk](#
in the `publicKeyJwk` entry.

**Kind**: static method of [<code>MethodType</code>](#MethodType)
<a name="MethodType.custom"></a>

### MethodType.custom(type_) ⇒ [<code>MethodType</code>](#MethodType)
A custom method.

**Kind**: static method of [<code>MethodType</code>](#MethodType)

| Param | Type |
| --- | --- |
| type_ | <code>string</code> |

<a name="MethodType.fromJSON"></a>

### MethodType.fromJSON(json) ⇒ [<code>MethodType</code>](#MethodType)
Expand Down Expand Up @@ -5001,11 +5098,9 @@ Representation of an SD-JWT of the format
* [.jwt()](#SdJwt+jwt) ⇒ <code>string</code>
* [.disclosures()](#SdJwt+disclosures) ⇒ <code>Array.&lt;string&gt;</code>
* [.keyBindingJwt()](#SdJwt+keyBindingJwt) ⇒ <code>string</code> \| <code>undefined</code>
* [.toJSON()](#SdJwt+toJSON) ⇒ <code>any</code>
* [.clone()](#SdJwt+clone)[<code>SdJwt</code>](#SdJwt)
* _static_
* [.parse(sd_jwt)](#SdJwt.parse)[<code>SdJwt</code>](#SdJwt)
* [.fromJSON(json)](#SdJwt.fromJSON)[<code>SdJwt</code>](#SdJwt)

<a name="new_SdJwt_new"></a>

Expand Down Expand Up @@ -5048,12 +5143,6 @@ The disclosures part.
### sdJwt.keyBindingJwt() ⇒ <code>string</code> \| <code>undefined</code>
The optional key binding JWT.

**Kind**: instance method of [<code>SdJwt</code>](#SdJwt)
<a name="SdJwt+toJSON"></a>

### sdJwt.toJSON() ⇒ <code>any</code>
Serializes this to a JSON object.

**Kind**: instance method of [<code>SdJwt</code>](#SdJwt)
<a name="SdJwt+clone"></a>

Expand All @@ -5075,17 +5164,6 @@ Returns `DeserializationError` if parsing fails.
| --- | --- |
| sd_jwt | <code>string</code> |

<a name="SdJwt.fromJSON"></a>

### SdJwt.fromJSON(json) ⇒ [<code>SdJwt</code>](#SdJwt)
Deserializes an instance from a JSON object.

**Kind**: static method of [<code>SdJwt</code>](#SdJwt)

| Param | Type |
| --- | --- |
| json | <code>any</code> |

<a name="SdJwtCredentialValidator"></a>

## SdJwtCredentialValidator
Expand Down Expand Up @@ -5962,6 +6040,7 @@ A DID Document Verification Method.
**Kind**: global class
* [VerificationMethod](#VerificationMethod)
* [new VerificationMethod(id, controller, type_, data)](#new_VerificationMethod_new)
* _instance_
* [.id()](#VerificationMethod+id) ⇒ [<code>DIDUrl</code>](#DIDUrl)
* [.setId(id)](#VerificationMethod+setId)
Expand All @@ -5979,6 +6058,19 @@ A DID Document Verification Method.
* [.newFromJwk(did, key, fragment)](#VerificationMethod.newFromJwk) ⇒ [<code>VerificationMethod</code>](#VerificationMethod)
* [.fromJSON(json)](#VerificationMethod.fromJSON) ⇒ [<code>VerificationMethod</code>](#VerificationMethod)
<a name="new_VerificationMethod_new"></a>
### new VerificationMethod(id, controller, type_, data)
Create a custom [VerificationMethod](#VerificationMethod).
| Param | Type |
| --- | --- |
| id | [<code>DIDUrl</code>](#DIDUrl) |
| controller | [<code>CoreDID</code>](#CoreDID) |
| type_ | [<code>MethodType</code>](#MethodType) |
| data | [<code>MethodData</code>](#MethodData) |
<a name="VerificationMethod+id"></a>
### verificationMethod.id() ⇒ [<code>DIDUrl</code>](#DIDUrl)
Expand Down Expand Up @@ -6114,24 +6206,6 @@ Deserializes an instance from a JSON object.
| --- | --- |
| json | <code>any</code> |
<a name="CredentialStatus"></a>
## CredentialStatus
**Kind**: global variable
<a name="StatusPurpose"></a>
## StatusPurpose
Purpose of a [StatusList2021](#StatusList2021).
**Kind**: global variable
<a name="StateMetadataEncoding"></a>
## StateMetadataEncoding
**Kind**: global variable
<a name="MethodRelationship"></a>
## MethodRelationship
**Kind**: global variable
<a name="StatusCheck"></a>
## StatusCheck
Expand Down Expand Up @@ -6208,28 +6282,30 @@ Return all errors that occur during validation.
Return after the first error occurs.
**Kind**: global variable
<a name="verifyEd25519"></a>
<a name="StateMetadataEncoding"></a>
## verifyEd25519(alg, signingInput, decodedSignature, publicKey)
Verify a JWS signature secured with the `EdDSA` algorithm and curve `Ed25519`.
## StateMetadataEncoding
**Kind**: global variable
<a name="MethodRelationship"></a>
This function is useful when one is composing a `IJwsVerifier` that delegates
`EdDSA` verification with curve `Ed25519` to this function.
## MethodRelationship
**Kind**: global variable
<a name="CredentialStatus"></a>
# Warning
## CredentialStatus
**Kind**: global variable
<a name="StatusPurpose"></a>
This function does not check whether `alg = EdDSA` in the protected header. Callers are expected to assert this
prior to calling the function.
## StatusPurpose
Purpose of a [StatusList2021](#StatusList2021).
**Kind**: global function
**Kind**: global variable
<a name="start"></a>
| Param | Type |
| --- | --- |
| alg | <code>JwsAlgorithm</code> |
| signingInput | <code>Uint8Array</code> |
| decodedSignature | <code>Uint8Array</code> |
| publicKey | [<code>Jwk</code>](#Jwk) |
## start()
Initializes the console error panic hook for better error messages
**Kind**: global function
<a name="encodeB64"></a>
## encodeB64(data) ⇒ <code>string</code>
Expand All @@ -6252,9 +6328,24 @@ Decode the given url-safe base64-encoded slice into its raw bytes.
| --- | --- |
| data | <code>Uint8Array</code> |
<a name="start"></a>
<a name="verifyEd25519"></a>
## start()
Initializes the console error panic hook for better error messages
## verifyEd25519(alg, signingInput, decodedSignature, publicKey)
Verify a JWS signature secured with the `EdDSA` algorithm and curve `Ed25519`.
This function is useful when one is composing a `IJwsVerifier` that delegates
`EdDSA` verification with curve `Ed25519` to this function.
# Warning
This function does not check whether `alg = EdDSA` in the protected header. Callers are expected to assert this
prior to calling the function.
**Kind**: global function
| Param | Type |
| --- | --- |
| alg | <code>JwsAlgorithm</code> |
| signingInput | <code>Uint8Array</code> |
| decodedSignature | <code>Uint8Array</code> |
| publicKey | [<code>Jwk</code>](#Jwk) |

0 comments on commit 698b03a

Please sign in to comment.