diff --git a/Cargo.toml b/Cargo.toml index 0ada4adb..01fb8155 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,10 +16,10 @@ anyhow = "1.0" async-trait = "0.1" bcs = "0.1" iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.2.3" } -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.6.1", default-features = false, package = "iota_interaction" } -iota_interaction_rust = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.6.1", default-features = false, package = "iota_interaction_rust" } -iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.6.1", default-features = false, package = "iota_interaction_ts" } -product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.6.1", default-features = false, package = "product_common" } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.7.0", default-features = false, package = "iota_interaction" } +iota_interaction_rust = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.7.0", default-features = false, package = "iota_interaction_rust" } +iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.7.0", default-features = false, package = "iota_interaction_ts" } +product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.7.0", default-features = false, package = "product_common" } serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } serde_json = { version = "1.0", default-features = false } strum = { version = "0.27", default-features = false, features = ["std", "derive"] } diff --git a/bindings/wasm/notarization_wasm/Cargo.toml b/bindings/wasm/notarization_wasm/Cargo.toml index 16ae5bf8..268b7ad4 100644 --- a/bindings/wasm/notarization_wasm/Cargo.toml +++ b/bindings/wasm/notarization_wasm/Cargo.toml @@ -21,8 +21,8 @@ async-trait = { version = "0.1", default-features = false } bcs = "0.1.6" console_error_panic_hook = { version = "0.1" } fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "2f502fd8570fe4e9cff36eea5bbd6fef22002898", package = "fastcrypto" } -iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.6.1", package = "iota_interaction", default-features = false } -iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.6.1", package = "iota_interaction_ts" } +iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.7.0", package = "iota_interaction", default-features = false } +iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.7.0", package = "iota_interaction_ts" } js-sys = { version = "0.3.61" } prefix-hex = { version = "0.7", default-features = false } serde = { version = "1.0", features = ["derive"] } @@ -37,14 +37,14 @@ wasm-bindgen-futures = { version = "0.4", default-features = false } [dependencies.product_common] git = "https://github.com/iotaledger/product-core.git" -tag = "v0.6.1" +tag = "v0.7.0" package = "product_common" -features = ["core-client", "transaction", "bindings", "binding-utils"] +features = ["core-client", "transaction", "bindings", "binding-utils", "gas-station", "default-http-client"] [dependencies.notarization] path = "../../../notarization-rs" default-features = false -features = [] +features = ["gas-station", "default-http-client"] [target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies] getrandom = { version = "0.3", default-features = false, features = ["wasm_js"] } diff --git a/bindings/wasm/notarization_wasm/package-lock.json b/bindings/wasm/notarization_wasm/package-lock.json index f6f2e397..ff71175a 100644 --- a/bindings/wasm/notarization_wasm/package-lock.json +++ b/bindings/wasm/notarization_wasm/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.1", "license": "Apache-2.0", "dependencies": { - "@iota/iota-interaction-ts": "^0.6.1" + "@iota/iota-interaction-ts": "^0.7.0" }, "devDependencies": { "@types/mocha": "^9.1.0", @@ -275,9 +275,9 @@ } }, "node_modules/@iota/iota-interaction-ts": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@iota/iota-interaction-ts/-/iota-interaction-ts-0.6.1.tgz", - "integrity": "sha512-zLnYw6KGxIR1Gnv0cyc3j6IpKsUokn9m2fItnkpB5bgShO+Zzf4rmBfUZPDmWW4XtxvLPYCgOT4duJ0mlsARdg==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@iota/iota-interaction-ts/-/iota-interaction-ts-0.7.0.tgz", + "integrity": "sha512-1MLT3J2hiaoeBuUEyGEn4oP01NbWYcSr3EdYTkB7cEiVgnPzW0dQfj6N08Xw8QUqK4Ns3d2l0aR5f9Vn3zxY9w==", "license": "Apache-2.0", "engines": { "node": ">=20" diff --git a/bindings/wasm/notarization_wasm/package.json b/bindings/wasm/notarization_wasm/package.json index 787e6f3d..9ba54af8 100644 --- a/bindings/wasm/notarization_wasm/package.json +++ b/bindings/wasm/notarization_wasm/package.json @@ -72,7 +72,7 @@ "wasm-opt": "^1.4.0" }, "dependencies": { - "@iota/iota-interaction-ts": "^0.6.1" + "@iota/iota-interaction-ts": "^0.7.0" }, "peerDependencies": { "@iota/iota-sdk": "^1.2.0" diff --git a/bindings/wasm/notarization_wasm/src/lib.rs b/bindings/wasm/notarization_wasm/src/lib.rs index aacf42c2..fe13f1b8 100644 --- a/bindings/wasm/notarization_wasm/src/lib.rs +++ b/bindings/wasm/notarization_wasm/src/lib.rs @@ -20,6 +20,9 @@ pub(crate) mod wasm_notarization_client_read_only; pub(crate) mod wasm_time_lock; pub(crate) mod wasm_types; +// Export all product_common's bindings (e.g. Transaction, CoreClient, gas-station stuff, etc). +pub use product_common::bindings::*; + /// Initializes the console error panic hook for better error messages #[wasm_bindgen(start)] pub fn start() -> Result<(), JsValue> { diff --git a/notarization-rs/Cargo.toml b/notarization-rs/Cargo.toml index af1bd572..bdc30d82 100644 --- a/notarization-rs/Cargo.toml +++ b/notarization-rs/Cargo.toml @@ -46,3 +46,7 @@ send-sync = [ ] # Enables `Send` + `Sync` bounds for the storage traits. send-sync-storage = ["secret-storage/send-sync-storage"] +# Enables an high-level integration with IOTA gas-station. +gas-station = ["product_common/gas-station"] +# Uses a default HTTP Client instead of a user-provided one. +default-http-client = ["product_common/default-http-client"] diff --git a/notarization-rs/src/lib.rs b/notarization-rs/src/lib.rs index b5f4d232..611fae81 100644 --- a/notarization-rs/src/lib.rs +++ b/notarization-rs/src/lib.rs @@ -9,3 +9,6 @@ pub(crate) mod package; pub use client::full_client::NotarizationClient; pub use client::read_only::NotarizationClientReadOnly; +/// HTTP utilities to implement the trait [HttpClient](product_common::http_client::HttpClient). +#[cfg(feature = "gas-station")] +pub use product_common::http_client;