Skip to content

Commit

Permalink
add parking_lot with wasm-bindgen feature as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrique Nogara committed Nov 5, 2021
1 parent 84a5ffb commit 3d78b34
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions bindings/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ wasm-bindgen-test = { version = "0.3" }
[target.'cfg(target_arch = "wasm32")'.dependencies]
chrono = { version = "0.4", features = ["wasmbind"] }
getrandom = { version = "0.2", features = ["js"] }
parking_lot = { version = "0.11.2", features = ["wasm-bindgen"] }

[package.metadata.wasm-pack.profile.release]
wasm-opt = true
Expand Down
29 changes: 23 additions & 6 deletions bindings/wasm/docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
## Members

<dl>
<dt><a href="#Digest">Digest</a></dt>
<dd></dd>
<dt><a href="#KeyType">KeyType</a></dt>
<dd></dd>
<dt><a href="#Digest">Digest</a></dt>
<dd></dd>
</dl>

## Functions
Expand All @@ -68,6 +68,7 @@
* [.publishDocument(document)](#Client+publishDocument) ⇒ <code>Promise.&lt;any&gt;</code>
* [.publishDiff(message_id, diff)](#Client+publishDiff) ⇒ <code>Promise.&lt;any&gt;</code>
* [.publishJSON(index, data)](#Client+publishJSON) ⇒ <code>Promise.&lt;any&gt;</code>
* [.publishJsonWithRetry(index, data, interval, max_attempts)](#Client+publishJsonWithRetry) ⇒ <code>Promise.&lt;any&gt;</code>
* [.resolve(did)](#Client+resolve) ⇒ <code>Promise.&lt;any&gt;</code>
* [.resolveHistory(did)](#Client+resolveHistory) ⇒ <code>Promise.&lt;any&gt;</code>
* [.resolveDiffHistory(document)](#Client+resolveDiffHistory) ⇒ <code>Promise.&lt;any&gt;</code>
Expand Down Expand Up @@ -123,6 +124,22 @@ Publishes arbitrary JSON data to the specified index on the Tangle.
| index | <code>string</code> |
| data | <code>any</code> |

<a name="Client+publishJsonWithRetry"></a>

### client.publishJsonWithRetry(index, data, interval, max_attempts) ⇒ <code>Promise.&lt;any&gt;</code>
Publishes arbitrary JSON data to the specified index on the Tangle.
Retries (promotes or reattaches) the message until it’s included (referenced by a milestone).
Default interval is 5 seconds and max attempts is 40.

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

| Param | Type |
| --- | --- |
| index | <code>string</code> |
| data | <code>any</code> |
| interval | <code>number</code> \| <code>undefined</code> |
| max_attempts | <code>number</code> \| <code>undefined</code> |

<a name="Client+resolve"></a>

### client.resolve(did) ⇒ <code>Promise.&lt;any&gt;</code>
Expand Down Expand Up @@ -1687,14 +1704,14 @@ Deserializes a `VerificationMethod` object from a JSON object.
| --- | --- |
| value | <code>any</code> |

<a name="Digest"></a>

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

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

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

## start()
Expand Down

0 comments on commit 3d78b34

Please sign in to comment.