diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f2129c..5d7c1fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog +## 0.0.16 (2022-06-30) + +### Added + +- New WASM bindings: + - `allNetworkNames()` lists all network names that are accepted as a parameter in some methods. + - `Bip39.shortEntropy()`, `Bip39.shortPhrase()` improves compatibility with old wallets like Coinomi. + - `wrapWithNonce()` helps adding extra entropy to a JSON document, where selective masking will be used. + - `MorpheusPrivate.path` and `MorpheusPrivateKind.path` returns BIP32 derivation paths to allow compatibility with other wallets. + - `MorpheusOperationSigner.signWithId()` makes it easier to sign with a key if only its identifier is known to the caller. + - `JwtBuilder.timeToLive` property helps to override the default 5s expiration of tokens. + - `new MorpheusSignableOperation(json)` and `new MorpheusSignedOperation(json)` mirrors `MorpheusSignableOperation.toJSON()` and + `MorpheusSignedOperation.toJSON()`, so it is easier to build complex SSI transactions. +- Documented all WASM methods in the SDK, except those related to Coeus for now. + +### Changed + +- Vault freshly created from a random seed is dirty (unsaved). +- All crates are now using Rust edition 2021. + +## 0.0.15 (2021-11-09) + +### Fixed + +- `JsSubtreePolicies` methods should not take ownership of self + +### Added + +- Exposed all 4 DID kinds (persona, device, group, resource) through WASM, FFI and vault file format. +- Exposed SignedJson serialization format through WASM and FFI. +- Made the native Rust SDK more usable by re-exporting symbols through it. +- Morpheus node stores transaction ID of PoE SSI operations, so it can be queried in IBeforeProofHistory. +- scripts/publish.sh helps publishing all crates in the correct order. + ## 0.0.14 (2021-07-21) ### Fixed @@ -14,9 +48,11 @@ ### Added -- You can now set the vendor field (aka. smart bridge field) and set a manual fee on Hydra core transactions using the 2 new optional arguments TypeScript SDK HydraTxBuilder factory methods got. +- You can now set the vendor field (aka. smart bridge field) and set a manual fee on Hydra core transactions using the 2 new optional + arguments TypeScript SDK HydraTxBuilder factory methods got. - Added some missing bindings to WASM and FFI, `SecpKeyId.toAddress` being the most important one. -- Multicipher objects (`MPrivateKey`, `MPublicKey` and `MKeyId`) can be safely downcasted in Rust to secp256p1 and ed25519 cipher objects. Not supported in WASM and FFI yet. +- Multicipher objects (`MPrivateKey`, `MPublicKey` and `MKeyId`) can be safely downcasted in Rust to secp256p1 and ed25519 cipher + objects. Not supported in WASM and FFI yet. ### Changed @@ -27,19 +63,23 @@ ### Added -- You can now set the vendor field (aka. smart bridge field) and set a manual fee on Hydra core transactions using the 2 new optional arguments TypeScript SDK HydraTxBuilder factory methods got. +- You can now set the vendor field (aka. smart bridge field) and set a manual fee on Hydra core transactions using the 2 new optional + arguments TypeScript SDK HydraTxBuilder factory methods got. ## 0.0.12 (2021-03-17) ### Added -- Crate `iop-sdk` now exports important types and is generally usable as an early draft in clients. Note that it currently does not follow any conventions of the Dart and Typescript SDKs but exposes some internal implementation details. +- Crate `iop-sdk` now exports important types and is generally usable as an early draft in clients. Note that it currently does not + follow any conventions of the Dart and Typescript SDKs but exposes some internal implementation details. - Hydra and Morpheus vault plugins are now thread-safe and thus easily usable in async environments as well. ### Changed -- BREAKING: renamed Hydra and Morpheus `vault::Plugin` function `rewind()` to `init()` for clarity. Naming changes also affect FFI and WASM interfaces. -- BREAKING: suffixed functions that mutate Hydra and Morpheus vaults (by generating keys into them) with `_mut`. This does not affect FFI and WASM though. +- BREAKING: renamed Hydra and Morpheus `vault::Plugin` function `rewind()` to `init()` for clarity. Naming changes also affect FFI + and WASM interfaces. +- BREAKING: suffixed functions that mutate Hydra and Morpheus vaults (by generating keys into them) with `_mut`. This does not affect + FFI and WASM though. - updated dependencies ### Fixed @@ -81,17 +121,21 @@ ## 0.0.6 (2020-11-06) -We're heavily refactoring our crate structure while implementing Coeus, our decentralized naming system as our second Layer-2 component. Our end goal is to make fine-grained crates for reducing dependency footprint for integrators by separating client/server sides and making Morpheus and Coeus optional plugins. +We're heavily refactoring our crate structure while implementing Coeus, our decentralized naming system as our second Layer-2 +component. Our end goal is to make fine-grained crates for reducing dependency footprint for integrators by separating client/server +sides and making Morpheus and Coeus optional plugins. ### Added -- Coeus: generic decentralized naming system built on top of a distributed ledger. Allows binding arbitrary data to names, allowing naming schemas, wallets, DIDs, devices, etc. This helps public figures and services to be more accessible and transparent. For more details, see the [IOP Developer Portal](https://developer.iop.technology/dns). +- Coeus: generic decentralized naming system built on top of a distributed ledger. Allows binding arbitrary data to names, allowing + naming schemas, wallets, DIDs, devices, etc. This helps public figures and services to be more accessible and transparent. For more + details, see the [IOP Developer Portal](https://developer.iop.technology/dns). ### Changed - BREAKING: changed crate hierarchy - coeus-core: a temporary crate with proto, sdk and node parts are not separated yet - - coeus-core-wasm: WebAssembly bindings for Coeus, sdk and node parts are not separated yet + - coeus-core-wasm: WebAssembly bindings for Coeus, sdk and node parts are not separated yet - hydra-proto: extracted hydra-dependent blockchain features (e.g. Morpheus and Coeus transactions) into their own crate - hydra-sdk: Hydra BIP32 subtree plugin for the Vault - morpheus-sdk-legacy: the old morpheus-sdk is now considered to be legacy code and was thus renamed @@ -126,4 +170,4 @@ We're heavily refactoring our crate structure while implementing Coeus, our dece ## 0.0.2 (2020-07-28) -Initial release \ No newline at end of file +Initial release diff --git a/coeus-node/Cargo.toml b/coeus-node/Cargo.toml index 40a252e..78af48c 100644 --- a/coeus-node/Cargo.toml +++ b/coeus-node/Cargo.toml @@ -1,20 +1,20 @@ [package] name = "iop-coeus-node" description = "Coeus layer-2 plugin implementation for Hydraledger" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] -edition = "2018" +edition = "2021" license = "LGPL-3.0-or-later" repository = "https://github.com/Internet-of-People/iop-rs" [dependencies] anyhow = "1.0.57" -iop-coeus-proto = "0.0.15" -iop-journal-proto = "0.0.15" -iop-keyvault = "0.0.15" -iop-morpheus-proto = { version = "0.0.15", optional = true } -json-digest = "0.0.15" +iop-coeus-proto = "0.0.16" +iop-journal-proto = "0.0.16" +iop-keyvault = "0.0.16" +iop-morpheus-proto = { version = "0.0.16", optional = true } +json-digest = "0.0.16" serde = { version = "1.0.137", features = ["derive"] } serde_json = { version = "1.0.81", features = ["preserve_order"] } serde_str = "0.1.0" diff --git a/coeus-proto/Cargo.toml b/coeus-proto/Cargo.toml index 45b2640..d13b978 100644 --- a/coeus-proto/Cargo.toml +++ b/coeus-proto/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "iop-coeus-proto" description = "Coeus protocol definitions used on both node and sdk side of the IOP Stack™" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] -edition = "2018" +edition = "2021" license = "LGPL-3.0-or-later" [dependencies] anyhow = "1.0.57" -iop-journal-proto = "0.0.15" -iop-keyvault = "0.0.15" -json-digest = "0.0.15" +iop-journal-proto = "0.0.16" +iop-keyvault = "0.0.16" +json-digest = "0.0.16" serde = { version = "1.0.137", features = ["derive"] } serde_json = { version = "1.0.81", features = ["preserve_order"] } serde_bytes = "0.11.6" diff --git a/hydra-proto/Cargo.toml b/hydra-proto/Cargo.toml index 3c7ec1d..15a6004 100644 --- a/hydra-proto/Cargo.toml +++ b/hydra-proto/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "iop-hydra-proto" description = "Hydra-core specific protocol definitions for the IOP Stack™" -version = "0.0.15" +version = "0.0.16" authors = [ "IOP Ventures LLC ", "Rache Bartmoss ", "wigy ", ] license = "LGPL-3.0-or-later" -edition = "2018" +edition = "2021" repository = "https://github.com/Internet-of-People/iop-rs" homepage = "https://developer.iop.technology/" @@ -17,11 +17,11 @@ homepage = "https://developer.iop.technology/" anyhow = "1.0.57" byteorder = "1.4.3" hex = "0.4.3" -iop-coeus-proto = "0.0.15" -iop-journal-proto = "0.0.15" -iop-keyvault = "0.0.15" -iop-morpheus-proto = "0.0.15" -json-digest = "0.0.15" +iop-coeus-proto = "0.0.16" +iop-journal-proto = "0.0.16" +iop-keyvault = "0.0.16" +iop-morpheus-proto = "0.0.16" +json-digest = "0.0.16" num-derive = "0.3.3" num-traits = "0.2.15" rand = { version = "0.8.5", features = ["getrandom"] } diff --git a/hydra-sdk/Cargo.toml b/hydra-sdk/Cargo.toml index 87d5995..77c723b 100644 --- a/hydra-sdk/Cargo.toml +++ b/hydra-sdk/Cargo.toml @@ -1,20 +1,20 @@ [package] name = "iop-hydra-sdk" description = "Hydraledger specific modules for the IOP Stack™ SDK" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] license = "LGPL-3.0-or-later" -edition = "2018" +edition = "2021" [dependencies] anyhow = "1.0.57" byteorder = "1.4.3" hex = "0.4.3" -iop-hydra-proto = "0.0.15" -iop-keyvault = "0.0.15" -iop-morpheus-proto = "0.0.15" -iop-vault = "0.0.15" +iop-hydra-proto = "0.0.16" +iop-keyvault = "0.0.16" +iop-morpheus-proto = "0.0.16" +iop-vault = "0.0.16" parking_lot = { version = "0.12.1", features = ["serde"] } rand = { version = "0.8.5", features = ["getrandom"] } serde = { version = "1.0.137", features = ["derive"] } diff --git a/journal-proto/Cargo.toml b/journal-proto/Cargo.toml index 22bab6c..9803852 100644 --- a/journal-proto/Cargo.toml +++ b/journal-proto/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "iop-journal-proto" -version = "0.0.15" +version = "0.0.16" description = "Journal-independent abstract definitions for the IOP Stack™" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] license = "LGPL-3.0-or-later" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/json-digest-wasm/Cargo.toml b/json-digest-wasm/Cargo.toml index 9d42805..6002ace 100644 --- a/json-digest-wasm/Cargo.toml +++ b/json-digest-wasm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "json-digest-wasm" -version = "0.0.15" -edition = "2018" +version = "0.0.16" +edition = "2021" description = "WebAssembly wrappers for the json-digest crate." authors = [ "IOP Ventures LLC ", @@ -20,7 +20,7 @@ categories = ["cryptography", "cryptography::cryptocurrencies", "wasm"] crate-type = ["cdylib", "rlib"] [dependencies] -json-digest = "0.0.15" +json-digest = "0.0.16" serde = { version = "1.0.137", features = ["derive"] } serde_json = { version = "1.0.81", features = ["preserve_order"] } wasm-bindgen = { version = "0.2.81", features = ["serde-serialize"] } diff --git a/json-digest/CHANGELOG.md b/json-digest/CHANGELOG.md index a3caaaa..07ad741 100644 --- a/json-digest/CHANGELOG.md +++ b/json-digest/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog -## 0.0.13 (TODO) +This file is deprecated, see the CHANGELOG in the repository root of iop-rs. + +## 0.0.13 (2021-07-09) ### Change @@ -38,4 +40,4 @@ ## 0.0.5 (2020-09-21) -Initial release, extracted from iop-morpheus-core 0.0.4 \ No newline at end of file +Initial release, extracted from iop-morpheus-core 0.0.4 diff --git a/json-digest/Cargo.toml b/json-digest/Cargo.toml index acebba5..20da07a 100644 --- a/json-digest/Cargo.toml +++ b/json-digest/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "json-digest" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] -edition = "2018" +edition = "2021" description = "Allow selective masking of JSON subdocuments for privacy, preserving the digest of the whole document." license = "LGPL-3.0-or-later" repository = "https://github.com/Internet-of-People/iop-rs" diff --git a/keyvault-wasm/Cargo.toml b/keyvault-wasm/Cargo.toml index 1344804..f0227f3 100644 --- a/keyvault-wasm/Cargo.toml +++ b/keyvault-wasm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "iop-keyvault-wasm" -version = "0.0.15" -edition = "2018" +version = "0.0.16" +edition = "2021" description = "WebAssembly wrappers for the iop-keyvault crate." authors = ["IOP Ventures LLC ", "wigy ", "Rache Bartmoss "] license = "LGPL-3.0-or-later" @@ -14,6 +14,6 @@ categories = ["cryptography", "cryptography::cryptocurrencies", "wasm"] crate-type = ["cdylib", "rlib"] [dependencies] -iop-keyvault = "0.0.15" +iop-keyvault = "0.0.16" serde = { version = "1.0.137", features = ["derive"] } wasm-bindgen = { version = "0.2.81", features = ["serde-serialize"] } diff --git a/keyvault/CHANGELOG.md b/keyvault/CHANGELOG.md index a2f1033..58acd5d 100644 --- a/keyvault/CHANGELOG.md +++ b/keyvault/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog -## 0.0.13 (TODO) +This file is deprecated, see the CHANGELOG in the repository root of iop-rs. + +## 0.0.13 (2021-07-09) ### Change diff --git a/keyvault/Cargo.toml b/keyvault/Cargo.toml index e48025a..6984df1 100644 --- a/keyvault/Cargo.toml +++ b/keyvault/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "iop-keyvault" -version = "0.0.15" -edition = "2018" +version = "0.0.16" +edition = "2021" description = "A general-purpose hierarchical deterministic generator for asymmetric keys." authors = ["IOP Ventures LLC ", "wigy ", "Rache Bartmoss "] license = "LGPL-3.0-or-later" diff --git a/morpheus-node/Cargo.toml b/morpheus-node/Cargo.toml index 84a2cb7..7cd9474 100644 --- a/morpheus-node/Cargo.toml +++ b/morpheus-node/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "iop-morpheus-node" description = "Morpheus layer-2 plugin implementation for Hydraledger" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] -edition = "2018" +edition = "2021" license = "LGPL-3.0-or-later" repository = "https://github.com/Internet-of-People/iop-rs" @@ -11,11 +11,11 @@ repository = "https://github.com/Internet-of-People/iop-rs" [dependencies] anyhow = "1.0.57" chrono = { version = "0.4.19", features = ["wasmbind"] } -iop-hydra-proto = "0.0.15" -iop-journal-proto = "0.0.15" -iop-keyvault = "0.0.15" -iop-morpheus-proto = "0.0.15" -json-digest = "0.0.15" +iop-hydra-proto = "0.0.16" +iop-journal-proto = "0.0.16" +iop-keyvault = "0.0.16" +iop-morpheus-proto = "0.0.16" +json-digest = "0.0.16" jwt-compact = { version = "0.5.0", default-features = false } #multibase = "0.9.1" rand = { version = "0.8.5", features = ["getrandom"] } diff --git a/morpheus-proto/Cargo.toml b/morpheus-proto/Cargo.toml index 14dc3e0..3fa6dfa 100644 --- a/morpheus-proto/Cargo.toml +++ b/morpheus-proto/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "iop-morpheus-proto" description = "Morpheus protocol definitions used on both node and sdk side of the IOP Stack™" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] -edition = "2018" +edition = "2021" license = "LGPL-3.0-or-later" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -11,9 +11,9 @@ license = "LGPL-3.0-or-later" [dependencies] anyhow = "1.0.57" chrono = { version = "0.4.19", features = ["wasmbind"] } -iop-journal-proto = "0.0.15" -iop-keyvault = "0.0.15" -json-digest = "0.0.15" +iop-journal-proto = "0.0.16" +iop-keyvault = "0.0.16" +json-digest = "0.0.16" jwt-compact = { version = "0.5.0", default-features = false, features = ["std"] } serde = { version = "1.0.137", features = ["derive"] } serde_json = { version = "1.0.81", features = ["preserve_order"] } diff --git a/morpheus-sdk/Cargo.toml b/morpheus-sdk/Cargo.toml index 261ee56..de60457 100644 --- a/morpheus-sdk/Cargo.toml +++ b/morpheus-sdk/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "iop-morpheus-sdk" description = "Morpheus specific modules for the IOP Stack™ SDK" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] license = "LGPL-3.0-or-later" -edition = "2018" +edition = "2021" repository = "https://github.com/Internet-of-People/iop-rs" homepage = "https://developer.iop.technology/" [dependencies] anyhow = "1.0.57" -iop-keyvault = "0.0.15" -iop-vault = "0.0.15" +iop-keyvault = "0.0.16" +iop-vault = "0.0.16" parking_lot = { version = "0.12.1", features = ["serde"] } rand = { version = "0.8.5", features = ["getrandom"] } serde = { version = "1.0.137", features = ["derive"] } @@ -21,8 +21,8 @@ typetag = "0.1.8" [dev-dependencies] chrono = { version = "0.4.19", features = ["wasmbind"] } -iop-morpheus-proto = "0.0.15" -json-digest = "0.0.15" +iop-morpheus-proto = "0.0.16" +json-digest = "0.0.16" serde_json = { version = "1.0.81", features = ["preserve_order"] } diff --git a/node-wasm/.package.json b/node-wasm/.package.json index f1db5fd..a0c862d 100644 --- a/node-wasm/.package.json +++ b/node-wasm/.package.json @@ -5,7 +5,8 @@ "Rache Bartmoss ", "wigy " ], - "version": "0.0.15", + "version": "0.0.16", + "license": "LGPL-3.0-or-later", "files": [ "browser/iop_node_wasm_bg.wasm", "browser/iop_node_wasm_bg.js", @@ -19,4 +20,4 @@ "module": "browser/iop_node_wasm.js", "types": "iop_node_wasm.d.ts", "sideEffects": "false" -} \ No newline at end of file +} diff --git a/node-wasm/Cargo.toml b/node-wasm/Cargo.toml index 6c3e056..12debc8 100644 --- a/node-wasm/Cargo.toml +++ b/node-wasm/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "iop-node-wasm" description = "WebAssembly bindings to the node implementation for Hydraledger" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] -edition = "2018" +edition = "2021" license = "LGPL-3.0-or-later" repository = "https://github.com/Internet-of-People/iop-rs" homepage = "https://developer.iop.technology/" @@ -15,14 +15,14 @@ crate-type = ["cdylib", "rlib"] normal = ["uuid"] [dependencies] -iop-coeus-node = "0.0.15" -iop-coeus-proto = "0.0.15" -iop-journal-proto = "0.0.15" -iop-keyvault-wasm = "0.0.15" -iop-morpheus-node = "0.0.15" -iop-morpheus-proto = "0.0.15" -iop-proto-wasm = "0.0.15" -json-digest-wasm = "0.0.15" +iop-coeus-node = "0.0.16" +iop-coeus-proto = "0.0.16" +iop-journal-proto = "0.0.16" +iop-keyvault-wasm = "0.0.16" +iop-morpheus-node = "0.0.16" +iop-morpheus-proto = "0.0.16" +iop-proto-wasm = "0.0.16" +json-digest-wasm = "0.0.16" serde = { version = "1.0.137", features = ["derive"] } serde_json = { version = "1.0.81", features = ["preserve_order"] } wasm-bindgen = { version = "0.2.81", features = ["serde-serialize"] } diff --git a/node-wasm/LICENSE b/node-wasm/LICENSE new file mode 120000 index 0000000..ea5b606 --- /dev/null +++ b/node-wasm/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/node-wasm/build.sh b/node-wasm/build.sh index be2ca46..578cbb4 100755 --- a/node-wasm/build.sh +++ b/node-wasm/build.sh @@ -14,9 +14,13 @@ wasm-pack build --release --target browser --out-dir pkg/browser --out-name iop_ wasm-pack build --release --target nodejs --out-dir pkg/node --out-name iop_node_wasm mv pkg/browser/*.d.ts pkg/ +mv pkg/browser/README.md pkg/ +mv pkg/browser/LICENSE pkg/ rm pkg/browser/.gitignore rm pkg/browser/package.json rm pkg/node/*.d.ts +rm pkg/node/README.md +rm pkg/node/LICENSE rm pkg/node/.gitignore rm pkg/node/package.json diff --git a/proto-wasm/Cargo.toml b/proto-wasm/Cargo.toml index 2182398..fb6b74e 100644 --- a/proto-wasm/Cargo.toml +++ b/proto-wasm/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "iop-proto-wasm" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] -edition = "2018" +edition = "2021" license = "LGPL-3.0-or-later" description = "WebAssembly bindings shared between node and sdk in the IOP Stack™" repository = "https://github.com/Internet-of-People/iop-rs" @@ -18,12 +18,12 @@ normal = ["uuid"] [dependencies] anyhow = "1.0.57" chrono = { version = "0.4.19", features = ["wasmbind"] } -iop-coeus-proto = "0.0.15" -iop-hydra-proto = "0.0.15" -iop-journal-proto = "0.0.15" -iop-keyvault = "0.0.15" -iop-keyvault-wasm = "0.0.15" -iop-morpheus-proto = "0.0.15" +iop-coeus-proto = "0.0.16" +iop-hydra-proto = "0.0.16" +iop-journal-proto = "0.0.16" +iop-keyvault = "0.0.16" +iop-keyvault-wasm = "0.0.16" +iop-morpheus-proto = "0.0.16" serde = { version = "1.0.137", features = ["derive"] } serde_json = { version = "1.0.81", features = ["preserve_order"] } serde_str = "0.1.0" diff --git a/rustfmt.toml b/rustfmt.toml index 909b041..77d3677 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,5 +1,5 @@ # --- Overwritten values -edition = "2018" +edition = "2021" use_small_heuristics = "Max" fn_args_layout = "Compressed" use_field_init_shorthand = true @@ -20,4 +20,3 @@ use_try_shorthand = true #overflow_delimited_expr = true #reorder_impl_items = true #struct_field_align_threshold = 20 - diff --git a/scripts/set-edition.sh b/scripts/set-edition.sh new file mode 100755 index 0000000..83e1478 --- /dev/null +++ b/scripts/set-edition.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +export edition=$1 + +function replace_toml() { + toml_file=$1 + sed -i -E 's#^(\s*edition\s*=\s*)".+"$#\1"'"$edition"'"#g' "$toml_file" +} + +declare -a crates=( + "coeus-node" + "coeus-proto" + "hydra-proto" + "hydra-sdk" + "journal-proto" + "json-digest" + "json-digest-wasm" + "keyvault" + "keyvault-wasm" + "morpheus-node" + "morpheus-proto" + "morpheus-sdk" + "node-wasm" + "proto-wasm" + "sdk" + "sdk-ffi" + "sdk-wasm" + "vault" +) + +for crate in "${crates[@]}"; do + replace_toml "$crate/Cargo.toml" +done diff --git a/sdk-ffi/Cargo.toml b/sdk-ffi/Cargo.toml index a9aeecb..ac7a141 100644 --- a/sdk-ffi/Cargo.toml +++ b/sdk-ffi/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "iop-sdk-ffi" description = "C ABI bindings to the client SDK for the IOP Stack™" -version = "0.0.15" +version = "0.0.16" authors = [ "IOP Ventures LLC ", "Rache Bartmoss ", "wigy ", ] -edition = "2018" +edition = "2021" license = "LGPL-3.0-or-later" repository = "https://github.com/Internet-of-People/iop-rs" homepage = "https://developer.iop.technology/" @@ -21,15 +21,15 @@ crate-type = ["rlib", "cdylib"] [dependencies] anyhow = "1.0.57" chrono = { version = "0.4.19", features = ["wasmbind"] } -iop-coeus-proto = "0.0.15" -iop-hydra-proto = "0.0.15" -iop-hydra-sdk = "0.0.15" -iop-journal-proto = "0.0.15" -iop-keyvault = "0.0.15" -iop-morpheus-proto = "0.0.15" -iop-morpheus-sdk = "0.0.15" -iop-vault = "0.0.15" -json-digest = "0.0.15" +iop-coeus-proto = "0.0.16" +iop-hydra-proto = "0.0.16" +iop-hydra-sdk = "0.0.16" +iop-journal-proto = "0.0.16" +iop-keyvault = "0.0.16" +iop-morpheus-proto = "0.0.16" +iop-morpheus-sdk = "0.0.16" +iop-vault = "0.0.16" +json-digest = "0.0.16" serde = { version = "1.0.137", features = ["derive", "rc"] } serde_json = { version = "1.0.81", features = ["preserve_order"] } serde_repr = "0.1.8" diff --git a/sdk-wasm/.package.json b/sdk-wasm/.package.json index 765f1fb..0335e9c 100644 --- a/sdk-wasm/.package.json +++ b/sdk-wasm/.package.json @@ -5,7 +5,8 @@ "Rache Bartmoss ", "wigy " ], - "version": "0.0.15", + "version": "0.0.16", + "license": "LGPL-3.0-or-later", "files": [ "browser/iop_sdk_wasm_bg.wasm", "browser/iop_sdk_wasm_bg.js", diff --git a/sdk-wasm/Cargo.toml b/sdk-wasm/Cargo.toml index 09d02e7..93d8163 100644 --- a/sdk-wasm/Cargo.toml +++ b/sdk-wasm/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "iop-sdk-wasm" description = "WebAssembly bindings to the client SDK for the IOP Stack™" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] -edition = "2018" +edition = "2021" license = "LGPL-3.0-or-later" repository = "https://github.com/Internet-of-People/iop-rs" homepage = "https://developer.iop.technology/" @@ -14,15 +14,15 @@ crate-type = ["cdylib", "rlib"] [dependencies] anyhow = "1.0.57" getrandom = { version = "0.2.7", features = ["wasm-bindgen", "js"] } -iop-hydra-proto = "0.0.15" -iop-hydra-sdk = "0.0.15" -iop-keyvault = "0.0.15" -iop-keyvault-wasm = "0.0.15" -iop-morpheus-proto = "0.0.15" -iop-morpheus-sdk = "0.0.15" -iop-proto-wasm = "0.0.15" -iop-vault = "0.0.15" -json-digest-wasm = "0.0.15" +iop-hydra-proto = "0.0.16" +iop-hydra-sdk = "0.0.16" +iop-keyvault = "0.0.16" +iop-keyvault-wasm = "0.0.16" +iop-morpheus-proto = "0.0.16" +iop-morpheus-sdk = "0.0.16" +iop-proto-wasm = "0.0.16" +iop-vault = "0.0.16" +json-digest-wasm = "0.0.16" rand = { version = "0.8.5", features = ["getrandom"] } serde = { version = "1.0.137", features = ["derive"] } serde_json = { version = "1.0.81", features = ["preserve_order"] } diff --git a/sdk-wasm/LICENSE b/sdk-wasm/LICENSE new file mode 120000 index 0000000..ea5b606 --- /dev/null +++ b/sdk-wasm/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/sdk-wasm/build.sh b/sdk-wasm/build.sh index 92bc6d5..2d1dbc7 100755 --- a/sdk-wasm/build.sh +++ b/sdk-wasm/build.sh @@ -14,9 +14,13 @@ wasm-pack build --release --target browser --out-dir pkg/browser --out-name iop_ wasm-pack build --release --target nodejs --out-dir pkg/node --out-name iop_sdk_wasm mv pkg/browser/*.d.ts pkg/ +mv pkg/browser/README.md pkg/ +mv pkg/browser/LICENSE pkg/ rm pkg/browser/.gitignore rm pkg/browser/package.json rm pkg/node/*.d.ts +rm pkg/node/README.md +rm pkg/node/LICENSE rm pkg/node/.gitignore rm pkg/node/package.json diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index cf3e9d3..44bdf64 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "iop-sdk" description = "Client SDK for the IOP Stack™" -version = "0.0.15" +version = "0.0.16" authors = [ "IOP Ventures LLC ", "Rache Bartmoss ", "wigy ", ] license = "LGPL-3.0-or-later" -edition = "2018" +edition = "2021" repository = "https://github.com/Internet-of-People/iop-rs" homepage = "https://developer.iop.technology/" @@ -20,15 +20,15 @@ crate-type = ["rlib", "cdylib"] [dependencies] anyhow = "1.0.57" -iop-coeus-proto = "0.0.15" -iop-hydra-proto = "0.0.15" -iop-hydra-sdk = "0.0.15" -iop-journal-proto = "0.0.15" -iop-keyvault = "0.0.15" -iop-morpheus-proto = "0.0.15" -iop-morpheus-sdk = "0.0.15" -iop-vault = "0.0.15" -json-digest = "0.0.15" +iop-coeus-proto = "0.0.16" +iop-hydra-proto = "0.0.16" +iop-hydra-sdk = "0.0.16" +iop-journal-proto = "0.0.16" +iop-keyvault = "0.0.16" +iop-morpheus-proto = "0.0.16" +iop-morpheus-sdk = "0.0.16" +iop-vault = "0.0.16" +json-digest = "0.0.16" rand = { version = "0.8.5", features = ["getrandom"] } serde = { version = "1.0.137", features = ["derive"] } serde_bytes = "0.11.6" diff --git a/vault/Cargo.toml b/vault/Cargo.toml index 0df5a4c..4a917a6 100644 --- a/vault/Cargo.toml +++ b/vault/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "iop-vault" description = "A hierarchical deterministic wallet that allows plugin extensions for the IOP Stack™" -version = "0.0.15" +version = "0.0.16" authors = ["IOP Ventures LLC ", "Rache Bartmoss ", "wigy "] -edition = "2018" +edition = "2021" license = "LGPL-3.0-or-later" [dependencies] anyhow = "1.0.57" -iop-keyvault = "0.0.15" +iop-keyvault = "0.0.16" multibase = "0.9.1" parking_lot = { version = "0.12.1", features = ["serde"] } serde = { version = "1.0.137", features = ["derive", "rc"] }