From 07655bc180c58eda6cc562848b0203237f297864 Mon Sep 17 00:00:00 2001 From: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com> Date: Tue, 7 May 2024 15:21:26 +0200 Subject: [PATCH] Merge branch develop into 2.0 (#2244) * Fix nightly build (#1981) * Fix TransactionOptions::as_dict() for remainder_value_strategy (#1993) * Fix ClientOptions typing in wallet options (#1994) * Bump version and set release date (#1996) * Fix node.js readme example (#2220) * Fix wasm compilation, bump wasm-bindgen (#2221) * Fix wasm compilation, bump wasm-bindgen * Update dependencies * Fix: make TaggedData data field optional (#1983) * Make TaggedDataPayload::data field optional * Tag also optional, still failing * Make TaggedDataPayload work * Uncomment, fix imports and lint * Raise error * Update date * reorder union * Remove unused import, update changelog, bump version * Update rustls --------- Co-authored-by: Alex Coats * Update private tangle action --------- Co-authored-by: Thibault Martinez Co-authored-by: Dr-Electron Co-authored-by: Alex Coats --- .../actions/private-tangle/setup/action.yml | 6 +-- .../private-tangle/tear-down/action.yml | 6 +-- Cargo.lock | 2 +- bindings/nodejs/README.md | 4 +- bindings/nodejs/examples/yarn.lock | 6 +-- bindings/nodejs/yarn.lock | 43 +++++++++++-------- bindings/python/CHANGELOG.md | 13 +++++- bindings/python/Cargo.toml | 2 +- bindings/python/iota_sdk/types/payload.py | 4 +- bindings/python/setup.py | 2 +- 10 files changed, 51 insertions(+), 37 deletions(-) diff --git a/.github/actions/private-tangle/setup/action.yml b/.github/actions/private-tangle/setup/action.yml index 7b0fbc4de4..44428041c4 100644 --- a/.github/actions/private-tangle/setup/action.yml +++ b/.github/actions/private-tangle/setup/action.yml @@ -9,13 +9,9 @@ runs: repository: iotaledger/iota-core path: iota-core - - name: Prepare files for start and stop + - name: Prepare file for start shell: bash run: | - echo "docker compose down -v" >> cleanup.sh - echo "rm *.snapshot" >> cleanup.sh - chmod +x cleanup.sh - # remove the last 5 lines and add docker compose with `-d` to run it in the background sed -i -n -e :a -e '1,5!{P;N;D;};N;ba' run.sh echo "docker compose -f docker-compose.yml up -d" >> run.sh diff --git a/.github/actions/private-tangle/tear-down/action.yml b/.github/actions/private-tangle/tear-down/action.yml index cf3e7dc4c5..dfaeaaefcb 100644 --- a/.github/actions/private-tangle/tear-down/action.yml +++ b/.github/actions/private-tangle/tear-down/action.yml @@ -1,10 +1,10 @@ -name: 'private-tangle-tear-down' -description: 'tear-down a private tangle' +name: "private-tangle-tear-down" +description: "tear-down a private tangle" runs: using: "composite" steps: - name: Tear down private tangle shell: bash run: | - sudo ./cleanup.sh + sudo docker compose down -v working-directory: iota-core/tools/docker-network diff --git a/Cargo.lock b/Cargo.lock index b4bbf70210..73bc21d8b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1743,7 +1743,7 @@ dependencies = [ [[package]] name = "iota-sdk-python" -version = "1.1.2" +version = "1.1.4" dependencies = [ "futures", "iota-sdk-bindings-core", diff --git a/bindings/nodejs/README.md b/bindings/nodejs/README.md index acdb5907bb..8ac63e7b66 100644 --- a/bindings/nodejs/README.md +++ b/bindings/nodejs/README.md @@ -75,10 +75,10 @@ calling [`Client.getNodeInfo()`](https://wiki.iota.org/shimmer/iota-sdk/referenc and then print the node's information. ```javascript -const { Client, initLogger } = require('@iota/sdk'); +import { Client } from '@iota/sdk'; +// In this example we will get information about the node async function run() { - initLogger(); const client = await Client.create({ nodes: ['https://api.testnet.shimmer.network'], diff --git a/bindings/nodejs/examples/yarn.lock b/bindings/nodejs/examples/yarn.lock index 33a1535e2c..02fac679b5 100644 --- a/bindings/nodejs/examples/yarn.lock +++ b/bindings/nodejs/examples/yarn.lock @@ -1329,9 +1329,9 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: minimalistic-assert "^1.0.1" hasown@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" - integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + version "2.0.1" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.1.tgz#26f48f039de2c0f8d3356c223fb8d50253519faa" + integrity sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA== dependencies: function-bind "^1.1.2" diff --git a/bindings/nodejs/yarn.lock b/bindings/nodejs/yarn.lock index 9500cf7f4b..e02773f081 100644 --- a/bindings/nodejs/yarn.lock +++ b/bindings/nodejs/yarn.lock @@ -773,23 +773,23 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*": - version "20.11.16" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.16.tgz#4411f79411514eb8e2926f036c86c9f0e4ec6708" - integrity sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ== + version "20.11.17" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.17.tgz#cdd642d0e62ef3a861f88ddbc2b61e32578a9292" + integrity sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw== dependencies: undici-types "~5.26.4" "@types/node@^18.15.12": - version "18.19.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.14.tgz#1880ff1b3ac913f3877f711588e5ed227da01886" - integrity sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg== + version "18.19.15" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.15.tgz#313a9d75435669a57fc28dc8694e7f4c4319f419" + integrity sha512-AMZ2UWx+woHNfM11PyAEQmfSxi05jm9OlkxczuHeEqmvwPkYj6MWv44gbzDPefYOLysTOFyI3ziiy2ONmUZfpA== dependencies: undici-types "~5.26.4" "@types/semver@^7.3.12": - version "7.5.6" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" - integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== + version "7.5.7" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.7.tgz#326f5fdda70d13580777bcaa1bc6fa772a5aef0e" + integrity sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg== "@types/stack-utils@^2.0.0": version "2.0.3" @@ -1321,6 +1321,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +bare-events@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.2.0.tgz#a7a7263c107daf8b85adf0b64f908503454ab26e" + integrity sha512-Yyyqff4PIFfSuthCZqLlPISTWHmnQxoPuAvkmgzsJEmG3CesdIv6Xweayl0JkCZJSB2yYIdJyEz97tpxNhgjbg== + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -1804,9 +1809,9 @@ doctrine@^3.0.0: esutils "^2.0.2" dotenv@^16.0.3: - version "16.4.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.1.tgz#1d9931f1d3e5d2959350d1250efab299561f7f11" - integrity sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ== + version "16.4.2" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.2.tgz#7ca798f89ae2011846bbdbf6470785307754120d" + integrity sha512-rZSSFxke7d9nYQ5NeMIwp5PP+f8wXgKNljpOb7KtH6SKW1cEqcXAz9VSJYVLKe7Jhup/gUYOkaeSVyK8GJ+nBg== duplexer2@~0.0.2: version "0.0.2" @@ -2559,9 +2564,9 @@ has-unicode@^2.0.0, has-unicode@^2.0.1: integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== hasown@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" - integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + version "2.0.1" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.1.tgz#26f48f039de2c0f8d3356c223fb8d50253519faa" + integrity sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA== dependencies: function-bind "^1.1.2" @@ -4612,12 +4617,14 @@ stack-utils@^2.0.3: escape-string-regexp "^2.0.0" streamx@^2.15.0: - version "2.15.7" - resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.15.7.tgz#a12fe09faa3fda2483e8044c406b72286994a138" - integrity sha512-NPEKS5+yjyo597eafGbKW5ujh7Sm6lDLHZQd/lRSz6S0VarpADBJItqfB4PnwpS+472oob1GX5cCY9vzfJpHUA== + version "2.15.8" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.15.8.tgz#5471145b54ee43b5088877023d8d0a2a77f95d8d" + integrity sha512-6pwMeMY/SuISiRsuS8TeIrAzyFbG5gGPHFQsYjUr/pbBadaL1PCWmzKw+CHZSwainfvcF6Si6cVLq4XTEwswFQ== dependencies: fast-fifo "^1.1.0" queue-tick "^1.0.1" + optionalDependencies: + bare-events "^2.2.0" string-length@^4.0.1: version "4.0.2" diff --git a/bindings/python/CHANGELOG.md b/bindings/python/CHANGELOG.md index 8b392ce75a..bf18fb07db 100644 --- a/bindings/python/CHANGELOG.md +++ b/bindings/python/CHANGELOG.md @@ -19,7 +19,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Security --> -## 1.1.3 - 202Y-MM-DD +## 1.1.4 - 2024-05-03 + +### Fixed + +- Made `TaggedDataPayload::{tag, data}` optional; + +## 1.1.3 - 2024-02-14 ### Added @@ -28,6 +34,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `NodeInfoProtocol.belowMaxDepth`; - `{NodeInfoProtocol, RentStructure}::as_dict()`; +### Fixed + +- `TransactionOptions::as_dict()` for remainder_value_strategy; +- `Wallet::client_options` typing; + ## 1.1.2 - 2023-12-01 ### Added diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 268afeb726..d80731b236 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "iota-sdk-python" -version = "1.1.2" +version = "1.1.4" authors = ["IOTA Stiftung"] edition = "2021" description = "Python bindings for the IOTA SDK library" diff --git a/bindings/python/iota_sdk/types/payload.py b/bindings/python/iota_sdk/types/payload.py index 0cefb602cd..238f9aea03 100644 --- a/bindings/python/iota_sdk/types/payload.py +++ b/bindings/python/iota_sdk/types/payload.py @@ -40,8 +40,8 @@ class TaggedDataPayload: default_factory=lambda: int( PayloadType.TaggedData), init=False) - tag: HexStr - data: HexStr + tag: Optional[HexStr] = None + data: Optional[HexStr] = None def deserialize_payload(d: Dict[str, Any]) -> Payload: diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 5b39bd8be6..51dc351cff 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -22,7 +22,7 @@ def get_py_version_cfgs(): setup( name="iota_sdk", - version="1.1.2", + version="1.1.4", classifiers=[ "License :: SPDX-License-Identifier :: Apache-2.0", "Intended Audience :: Developers",