Skip to content

Commit

Permalink
Fix doc links (#925)
Browse files Browse the repository at this point in the history
  • Loading branch information
eike-hass authored Jul 11, 2022
1 parent f0e4529 commit c19b765
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Test Build
# TODO Add 'yarn build' as last line once broken links are fixed
working-directory: documentation
run: |
cd documentation
yarn install --immutable
yarn build
69 changes: 34 additions & 35 deletions bindings/wasm/docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ This variant is the default used if no other variant is specified when construct
<dt><a href="#FirstError">FirstError</a></dt>
<dd><p>Return after the first error occurs.</p>
</dd>
<dt><a href="#KeyType">KeyType</a></dt>
<dd></dd>
<dt><a href="#MethodRelationship">MethodRelationship</a></dt>
<dd></dd>
<dt><a href="#KeyType">KeyType</a></dt>
<dd></dd>
</dl>

## Functions
Expand All @@ -222,9 +222,9 @@ publishing to the Tangle.
**Kind**: global class

* [Account](#Account)
* [.createService(options)](#Account+createService) ⇒ <code>Promise.&lt;void&gt;</code>
* [.createMethod(options)](#Account+createMethod) ⇒ <code>Promise.&lt;void&gt;</code>
* [.attachMethodRelationships(options)](#Account+attachMethodRelationships) ⇒ <code>Promise.&lt;void&gt;</code>
* [.createMethod(options)](#Account+createMethod) ⇒ <code>Promise.&lt;void&gt;</code>
* [.detachMethodRelationships(options)](#Account+detachMethodRelationships) ⇒ <code>Promise.&lt;void&gt;</code>
* [.did()](#Account+did)[<code>DID</code>](#DID)
* [.autopublish()](#Account+autopublish) ⇒ <code>boolean</code>
* [.autosave()](#Account+autosave)[<code>AutoSave</code>](#AutoSave)
Expand All @@ -242,22 +242,25 @@ publishing to the Tangle.
* [.unrevokeCredentials(fragment, credentialIndices)](#Account+unrevokeCredentials) ⇒ <code>Promise.&lt;void&gt;</code>
* [.encryptData(plaintext, associated_data, encryption_algorithm, cek_algorithm, public_key)](#Account+encryptData)[<code>Promise.&lt;EncryptedData&gt;</code>](#EncryptedData)
* [.decryptData(data, encryption_algorithm, cek_algorithm, fragment)](#Account+decryptData) ⇒ <code>Promise.&lt;Uint8Array&gt;</code>
* [.detachMethodRelationships(options)](#Account+detachMethodRelationships) ⇒ <code>Promise.&lt;void&gt;</code>
* [.deleteService(options)](#Account+deleteService) ⇒ <code>Promise.&lt;void&gt;</code>
* [.setAlsoKnownAs(options)](#Account+setAlsoKnownAs) ⇒ <code>Promise.&lt;void&gt;</code>
* [.setController(options)](#Account+setController) ⇒ <code>Promise.&lt;void&gt;</code>
* [.deleteMethod(options)](#Account+deleteMethod) ⇒ <code>Promise.&lt;void&gt;</code>
* [.createService(options)](#Account+createService) ⇒ <code>Promise.&lt;void&gt;</code>

<a name="Account+createService"></a>
<a name="Account+attachMethodRelationships"></a>

### account.createService(options) ⇒ <code>Promise.&lt;void&gt;</code>
Adds a new Service to the DID Document.
### account.attachMethodRelationships(options) ⇒ <code>Promise.&lt;void&gt;</code>
Attach one or more verification relationships to a method.

Note: the method must exist and be in the set of verification methods;
it cannot be an embedded method.

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

| Param | Type |
| --- | --- |
| options | <code>CreateServiceOptions</code> |
| options | <code>AttachMethodRelationshipOptions</code> |

<a name="Account+createMethod"></a>

Expand All @@ -270,19 +273,16 @@ Adds a new verification method to the DID document.
| --- | --- |
| options | <code>CreateMethodOptions</code> |

<a name="Account+attachMethodRelationships"></a>

### account.attachMethodRelationships(options) ⇒ <code>Promise.&lt;void&gt;</code>
Attach one or more verification relationships to a method.
<a name="Account+detachMethodRelationships"></a>

Note: the method must exist and be in the set of verification methods;
it cannot be an embedded method.
### account.detachMethodRelationships(options) ⇒ <code>Promise.&lt;void&gt;</code>
Detaches the given relationship from the given method, if the method exists.

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

| Param | Type |
| --- | --- |
| options | <code>AttachMethodRelationshipOptions</code> |
| options | <code>DetachMethodRelationshipOptions</code> |

<a name="Account+did"></a>

Expand Down Expand Up @@ -475,17 +475,6 @@ Returns the decrypted text.
| cek_algorithm | [<code>CekAlgorithm</code>](#CekAlgorithm) |
| fragment | <code>string</code> |

<a name="Account+detachMethodRelationships"></a>

### account.detachMethodRelationships(options) ⇒ <code>Promise.&lt;void&gt;</code>
Detaches the given relationship from the given method, if the method exists.

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

| Param | Type |
| --- | --- |
| options | <code>DetachMethodRelationshipOptions</code> |

<a name="Account+deleteService"></a>

### account.deleteService(options) ⇒ <code>Promise.&lt;void&gt;</code>
Expand Down Expand Up @@ -530,6 +519,17 @@ Deletes a verification method if the method exists.
| --- | --- |
| options | <code>DeleteMethodOptions</code> |

<a name="Account+createService"></a>

### account.createService(options) ⇒ <code>Promise.&lt;void&gt;</code>
Adds a new Service to the DID Document.

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

| Param | Type |
| --- | --- |
| options | <code>CreateServiceOptions</code> |

<a name="AccountBuilder"></a>

## AccountBuilder
Expand Down Expand Up @@ -581,7 +581,6 @@ The identity is stored locally in the `Storage`. The DID network is automaticall
by the [Client](#Client) used to publish it.

**Kind**: instance method of [<code>AccountBuilder</code>](#AccountBuilder)
**See**: [IdentitySetup](IdentitySetup) to customize the identity creation.

| Param | Type |
| --- | --- |
Expand Down Expand Up @@ -2065,7 +2064,7 @@ on the same document. This is intended for signing updates to a document where a
capability invocation method is rotated or replaced entirely.

NOTE: does not validate whether the private key of the given `key_pair` corresponds to the
verification method. See [Document.verifyDocument](Document.verifyDocument).
verification method. See [Document.verifyDocument](#Document+verifyDocument).

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

Expand Down Expand Up @@ -2622,7 +2621,7 @@ Length in bytes of an Ed25519 signature.
### Ed25519.sign(message, privateKey) ⇒ <code>Uint8Array</code>
Computes an EdDSA signature using an Ed25519 private key.

NOTE: this differs from [Document.signData](Document.signData) which uses JCS
NOTE: this differs from [Document.signData](#Document+signData) which uses JCS
to canonicalize JSON messages.

The private key must be a 32-byte seed in compliance with [RFC 8032](https://datatracker.ietf.org/doc/html/rfc8032#section-3.2).
Expand All @@ -2640,7 +2639,7 @@ Other implementations often use another format. See [this blog post](https://blo
### Ed25519.verify(message, signature, publicKey)
Verifies an EdDSA signature against an Ed25519 public key.

NOTE: this differs from [Document.verifyData](Document.verifyData) which uses JCS
NOTE: this differs from [Document.verifyData](#Document+verifyData) which uses JCS
to canonicalize JSON messages.

**Kind**: static method of [<code>Ed25519</code>](#Ed25519)
Expand Down Expand Up @@ -4984,15 +4983,15 @@ Return all errors that occur during validation.
## FirstError
Return after the first error occurs.

**Kind**: global variable
<a name="KeyType"></a>

## KeyType
**Kind**: global variable
<a name="MethodRelationship"></a>

## MethodRelationship
**Kind**: global variable
<a name="KeyType"></a>

## KeyType
**Kind**: global variable
<a name="start"></a>

## start()
Expand Down
2 changes: 0 additions & 2 deletions bindings/wasm/src/account/wasm_account/account_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ impl WasmAccountBuilder {
///
/// The identity is stored locally in the `Storage`. The DID network is automatically determined
/// by the {@link Client} used to publish it.
///
/// @See {@link IdentitySetup} to customize the identity creation.
#[wasm_bindgen(js_name = createIdentity)]
pub fn create_identity(&mut self, identity_setup: Option<WasmIdentitySetup>) -> Result<PromiseAccount> {
let setup: IdentitySetup = identity_setup.map(IdentitySetup::from).unwrap_or_default();
Expand Down
4 changes: 2 additions & 2 deletions bindings/wasm/src/crypto/wasm_ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl WasmEd25519 {

/// Computes an EdDSA signature using an Ed25519 private key.
///
/// NOTE: this differs from {@link Document.signData} which uses JCS
/// NOTE: this differs from [Document.signData](#Document+signData) which uses JCS
/// to canonicalize JSON messages.
///
/// The private key must be a 32-byte seed in compliance with [RFC 8032](https://datatracker.ietf.org/doc/html/rfc8032#section-3.2).
Expand All @@ -52,7 +52,7 @@ impl WasmEd25519 {

/// Verifies an EdDSA signature against an Ed25519 public key.
///
/// NOTE: this differs from {@link Document.verifyData} which uses JCS
/// NOTE: this differs from [Document.verifyData](#Document+verifyData) which uses JCS
/// to canonicalize JSON messages.
#[allow(non_snake_case)]
#[wasm_bindgen]
Expand Down
2 changes: 1 addition & 1 deletion bindings/wasm/src/did/wasm_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ impl WasmDocument {
/// capability invocation method is rotated or replaced entirely.
///
/// NOTE: does not validate whether the private key of the given `key_pair` corresponds to the
/// verification method. See {@link Document.verifyDocument}.
/// verification method. See [Document.verifyDocument](#Document+verifyDocument).
#[wasm_bindgen(js_name = signDocument)]
pub fn sign_document(
&self,
Expand Down

0 comments on commit c19b765

Please sign in to comment.