Skip to content

Commit 98b8569

Browse files
authored
docs(core): update compatibility info (#246)
* docs(core): update compatibility info Signed-off-by: 0x009922 <[email protected]> * chore: release 2025.03.13a Signed-off-by: 0x009922 <[email protected]> --------- Signed-off-by: 0x009922 <[email protected]>
1 parent 288ba1d commit 98b8569

File tree

5 files changed

+27
-38
lines changed

5 files changed

+27
-38
lines changed

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Iroha JavaScript
22

3-
The JavaScript (TypeScript) SDK of [Iroha 2](https://github.com/hyperledger-iroha/iroha) for Node.js, Deno, Bun and the
4-
browser\*.
3+
The JavaScript (TypeScript) SDK of [Iroha 2](https://github.com/hyperledger-iroha/iroha) for Node.js, Deno, Bun, and
4+
Browsers.
55

66
Packages and documentation are available on JSR: https://jsr.io/@iroha
77

@@ -36,8 +36,14 @@ const client = new Client({
3636
})
3737

3838
async function test() {
39-
const { blocks } = await client.api.telemetry.status()
40-
console.log(blocks) // => 3
39+
await client.transaction(types.Executable.Instructions([
40+
types.InstructionBox.Register.Domain({
41+
id: new types.Name('wonderland'),
42+
logo: null,
43+
metadata: [],
44+
}),
45+
]))
46+
.submit({ verify: true })
4147
}
4248
```
4349

Releases.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### 2025.03.13a
2+
3+
#### @iroha/core 0.3.1 (patch)
4+
5+
- docs(core): update compatibility info
6+
17
### 2025.03.13
28

39
#### @iroha/client 0.3.0 (minor)

packages/core/crypto/mod.ts

+6-24
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,15 @@
11
/**
2-
* Port of `iroha_crypto` Rust crate via WebAssembly.
2+
* Port of `iroha_crypto` into WebAssembly.
33
*
44
* ## Compatibility
55
*
6-
* This package uses native `.wasm` ES Module imports, **which isn't widely supported yet**.
7-
* However, there are some tricks in play to increase the compatibility.
6+
* Compatible with all runtimes.
87
*
9-
* | Platform | Support | Version | Notes |
10-
* | - | - | - | - |
11-
* | Deno | ✅ | 2.1+ or 2.1.5+ | See [notes in `@deno/wasmbuild`](https://github.com/denoland/wasmbuild?tab=readme-ov-file#browser-nodejs-or-older-deno-support). |
12-
* | Node.js | ✅ | v24.0+, v22.0+, v20.0+ | Uses `import('node:fs')` to make it work. |
13-
* | Bun | ✅ ❓ | v1.2.2 | Checked only with `v1.2.2` |
14-
* | Bundlers | ✅ 🚧 | | Requires plugins to support importing `.wasm` (e.g. [`vite-plugin-wasm`](https://github.com/Menci/vite-plugin-wasm)). |
15-
* | Natively in the browser | ✅ | | Checked with https://esm.sh |
16-
* | Cloudflare Workers | ❓ | | Not checked |
8+
* Since `0.3.0`, the `.wasm` blob __is inlined__. Therefore, it is compatible with any
9+
* runtime that supports {@linkcode WebAssembly} (e.g. see
10+
* [compatibility on MDN](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Instance/Instance#browser_compatibility)).
1711
*
18-
* An example of how this could be used in browser:
19-
*
20-
* ```html
21-
* <script type="module">
22-
* import * as types from 'https://esm.sh/jsr/@iroha/[email protected]/data-model'
23-
* console.log(types.KeyPair.random().publicKey().multihash())
24-
* </script>
25-
* ```
26-
*
27-
* Useful links:
28-
*
29-
* - [Proposal - WebAssembly/ES Module Integration](https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration?rgh-link-date=2025-02-17T23%3A57%3A24.000Z)
30-
* - [Vite - WebAssembly](https://vite.dev/guide/features#webassembly)
12+
* This wasn't the case for `0.2.0`: it relied on `.wasm` ES Module Imports, which isn't widely supported (yet).
3113
*
3214
* @example Deriving a KeyPair from seed
3315
* ```ts

packages/core/deno.jsonc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iroha/core",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"exports": {
55
".": "./mod.ts",
66
"./codec": "./codec.ts",

packages/core/mod.ts

+4-9
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,18 @@
1010
* - {@linkcode [crypto]} - cryptographic utilities
1111
* - {@linkcode [codec]} - lower-level utilities to work with the codec
1212
*
13-
* > [!IMPORTANT]
14-
* > This package includes a WebAssembly module to perform cryptographic operations in a way consistent with Iroha.
15-
* > It is a bit tricky to initialise uniformly across different environments, and **there could be compatibility issues**.
16-
* > See the {@linkcode [crypto]} module for more details.
17-
*
1813
* ### Iroha Compatibility
1914
*
2015
* Versions compatibility between Iroha and this package:
2116
*
2217
* | Iroha | `@iroha/core` |
2318
* | --: | :-- |
24-
* | `2.0.0-rc.1.x` | `0.2.0`, ~~`0.1.0`~~ ([broken](https://github.com/hyperledger-iroha/iroha-javascript/issues/210#issuecomment-2662231135)) |
25-
* | `2.0.0-pre-rc.20.x` and before | the Legacy SDK* |
19+
* | `2.0.0-rc.1.x` | `0.3.x`, `0.2.x`, ~~`0.1.0`~~ ([broken](https://github.com/hyperledger-iroha/iroha-javascript/issues/210#issuecomment-2662231135)) |
20+
* | `2.0.0-pre-rc.20.x` and before | not supported, use the **Legacy SDK** |
2621
*
27-
* **The Legacy SDK** is the previous iteration on SDK that is no longer maintained.
22+
* The **Legacy SDK** is the previous iteration on SDK that is no longer maintained.
2823
* It is still available on [Iroha Nexus NPM registry](https://nexus.iroha.tech/repository/npm-group/).
29-
* Its source code could be found on the [`iroha-2-pre-rc`](https://github.com/hyperledger-iroha/iroha-javascript/tree/iroha-2-pre-rc) branch.
24+
* Its source code alongside with the installation instructions could be found on the [`iroha-2-pre-rc`](https://github.com/hyperledger-iroha/iroha-javascript/tree/iroha-2-pre-rc) branch.
3025
*
3126
* @example Building and signing a transaction
3227
* ```ts

0 commit comments

Comments
 (0)