Skip to content

Commit 0d94f52

Browse files
authored
Update IOTA to v1.26.1 (#1834)
* update product-core and iota-types * update SDK version * cargo audit ignores * point to notarization working branch * point to tags instead of branches
1 parent d75d7a2 commit 0d94f52

40 files changed

Lines changed: 165 additions & 165 deletions

File tree

.cargo/audit.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ ignore = [
99
"RUSTSEC-2023-0065", # temporary ignore until fix is provided
1010
"RUSTSEC-2023-0071", # temporary ignore until fix is provided
1111
"RUSTSEC-2024-0437", # temporary ignore until fix is provided
12+
"RUSTSEC-2026-0194", # should be fixed by next IOTA version
13+
"RUSTSEC-2026-0195", # should be fixed by next IOTA version
1214
]

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ exclude = ["bindings/wasm/identity_wasm", "bindings/grpc"]
3030

3131
[workspace.dependencies]
3232
bls12_381_plus = { version = "0.8.17" }
33-
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.21", package = "iota_interaction" }
34-
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.21", package = "iota_interaction_ts" }
35-
iota-sdk-types = { git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "35a27488b887e28e844a1e46d7edb78605871155", default-features = false }
36-
product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.21", package = "product_common" }
33+
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.22", package = "iota_interaction" }
34+
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.22", package = "iota_interaction_ts" }
35+
iota-sdk-types = { git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "36bffd625e1b1d38307eb9e49bd2cb7dd988bb11", default-features = false }
36+
product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.22", package = "product_common" }
3737
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
3838
serde_json = { version = "1.0", default-features = false }
3939
oqs = { version = "0.10", default-features = false, features = ["sigs", "std", "vendored"] }

bindings/grpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ identity_iota = { path = "../../identity_iota", features = ["resolver", "sd-jwt"
2424
identity_jose = { path = "../../identity_jose" }
2525
identity_storage = { path = "../../identity_storage", features = ["memstore"] }
2626
identity_stronghold = { path = "../../identity_stronghold", features = ["send-sync-storage"] }
27-
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.25.0" }
27+
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.26.1" }
2828
iota-sdk-legacy = { package = "iota-sdk", version = "1.1.2", features = ["stronghold"] }
2929
prost = "0.13"
3030
rand = "0.8.5"

bindings/grpc/tests/api/helpers.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use identity_iota::iota::rebased::transaction::Transaction;
2626
use iota_sdk_legacy::client::secret::stronghold::StrongholdSecretManager;
2727
use iota_sdk_legacy::client::stronghold::StrongholdAdapter;
2828
use iota_sdk_legacy::client::Password;
29-
use iota_sdk::types::base_types::IotaAddress;
29+
use iota_sdk_types::Address;
3030
use iota_sdk::IotaClient;
3131
use iota_sdk::IotaClientBuilder;
3232
use iota_sdk_types::ObjectId;
@@ -125,7 +125,7 @@ impl TestServer {
125125
pub async fn create_did<K, I>(
126126
client: &IdentityClientReadOnly,
127127
storage: &Storage<K, I>,
128-
) -> anyhow::Result<(IotaAddress, IotaDocument, KeyId, String)>
128+
) -> anyhow::Result<(Address, IotaDocument, KeyId, String)>
129129
where
130130
K: JwkStorage,
131131
I: KeyIdStorage,
@@ -179,7 +179,7 @@ where
179179
}
180180

181181
/// Generates a new Ed25519 key pair
182-
pub async fn get_address<I, K>(storage: &Storage<K, I>) -> anyhow::Result<(IotaAddress, KeyId, Jwk)>
182+
pub async fn get_address<I, K>(storage: &Storage<K, I>) -> anyhow::Result<(Address, KeyId, Jwk)>
183183
where
184184
K: JwkStorage,
185185
I: KeyIdStorage,
@@ -198,11 +198,11 @@ where
198198

199199
let address = Ed25519PublicKey::from_bytes(&pub_key_bytes)?;
200200

201-
Ok((IotaAddress::from(&address), key_id, pub_key_jwt))
201+
Ok((Address::from(&address), key_id, pub_key_jwt))
202202
}
203203

204204
/// Requests funds from the faucet for the given `address`.
205-
async fn request_faucet_funds(address: IotaAddress, faucet_endpoint: &str) -> anyhow::Result<()> {
205+
async fn request_faucet_funds(address: Address, faucet_endpoint: &str) -> anyhow::Result<()> {
206206
let output = Command::new("iota")
207207
.arg("client")
208208
.arg("faucet")
@@ -228,7 +228,7 @@ async fn request_faucet_funds(address: IotaAddress, faucet_endpoint: &str) -> an
228228

229229
pub struct Entity<K, I> {
230230
storage: Storage<K, I>,
231-
did: Option<(IotaAddress, IotaDocument, KeyId, String)>,
231+
did: Option<(Address, IotaDocument, KeyId, String)>,
232232
}
233233

234234
pub fn random_password(len: usize) -> Password {
@@ -323,15 +323,15 @@ pub fn make_stronghold() -> StrongholdAdapter {
323323
.expect("Failed to create temporary stronghold")
324324
}
325325

326-
async fn get_active_address() -> anyhow::Result<IotaAddress> {
326+
async fn get_active_address() -> anyhow::Result<Address> {
327327
Command::new("iota")
328328
.arg("client")
329329
.arg("active-address")
330330
.arg("--json")
331331
.output()
332332
.await
333333
.context("Failed to execute command")
334-
.and_then(|output| Ok(serde_json::from_slice::<IotaAddress>(&output.stdout)?))
334+
.and_then(|output| Ok(serde_json::from_slice::<Address>(&output.stdout)?))
335335
}
336336

337337
async fn init(iota_client: &IotaClient) -> anyhow::Result<ObjectId> {
@@ -361,7 +361,7 @@ async fn get_cached_id(network_id: &str) -> anyhow::Result<String> {
361361
}
362362
}
363363

364-
async fn publish_package(active_address: IotaAddress) -> anyhow::Result<ObjectId> {
364+
async fn publish_package(active_address: Address) -> anyhow::Result<ObjectId> {
365365
let output = Command::new("sh")
366366
.current_dir(SCRIPT_DIR)
367367
.arg("publish_identity_package.sh")

bindings/wasm/identity_wasm/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ identity_ecdsa_verifier = { path = "../../../identity_ecdsa_verifier", default-f
2525
identity_eddsa_verifier = { path = "../../../identity_eddsa_verifier", default-features = false, features = ["ed25519"] }
2626
iota-caip = { git = "https://github.com/iotaledger/iota-caip.git", features = ["serde"] }
2727
iota-sdk = { version = "1.1.5", default-features = false, features = ["serde", "std"] }
28-
iota-sdk-types = { git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "35a27488b887e28e844a1e46d7edb78605871155", default-features = false }
29-
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.21", package = "iota_interaction", default-features = false }
30-
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.21", package = "iota_interaction_ts" }
28+
iota-sdk-types = { git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "36bffd625e1b1d38307eb9e49bd2cb7dd988bb11", default-features = false }
29+
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.22", package = "iota_interaction", default-features = false }
30+
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.22", package = "iota_interaction_ts" }
3131
js-sys = { version = "0.3.61" }
3232
json-proof-token = "0.4"
3333
proc_typescript = { version = "0.1.0", path = "./proc_typescript" }
34-
product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.21", package = "product_common", features = ["core-client", "transaction", "bindings", "gas-station", "default-http-client"] }
34+
product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.22", package = "product_common", features = ["core-client", "transaction", "bindings", "gas-station", "default-http-client"] }
3535
secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", default-features = false, tag = "v0.3.0" }
3636
serde = { version = "1.0", features = ["derive"] }
3737
serde-wasm-bindgen = "0.6.5"

bindings/wasm/identity_wasm/src/rebased/identity.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use identity_iota::iota::rebased::migration::IdentityBuilder;
99
use identity_iota::iota::rebased::migration::OnChainIdentity;
1010
use identity_iota::iota::rebased::Error as RebasedError;
1111
use identity_iota::iota::IotaDocument;
12-
use iota_interaction::types::base_types::IotaAddress;
1312
use iota_interaction_ts::bindings::WasmIotaTransactionBlockEffects;
1413
use iota_interaction_ts::core_client::WasmCoreClientReadOnly;
1514
use iota_interaction_ts::wasm_error::WasmError;
15+
use iota_sdk_types::Address;
1616
use iota_sdk_types::ObjectId;
1717
use js_sys::Object;
1818
use product_common::bindings::core_client::WasmManagedCoreClientReadOnly;
@@ -131,9 +131,7 @@ impl WasmOnChainIdentity {
131131
address: &str,
132132
client: &WasmIdentityClient,
133133
) -> Result<Option<WasmControllerToken>> {
134-
let address = address
135-
.parse::<IotaAddress>()
136-
.map_err(|e| JsError::new(&e.to_string()))?;
134+
let address = address.parse::<Address>().map_err(|e| JsError::new(&e.to_string()))?;
137135
let maybe_controller_token = self
138136
.0
139137
.read()

bindings/wasm/identity_wasm/src/rebased/proposals/borrow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ use identity_iota::iota::rebased::proposals::ProposalResult;
1414
use identity_iota::iota::rebased::proposals::ProposalT as _;
1515
use iota_interaction::rpc_types::IotaObjectData;
1616
use iota_interaction::types::programmable_transaction_builder::ProgrammableTransactionBuilder;
17-
use iota_interaction::types::transaction::ProgrammableTransaction;
18-
use iota_interaction::types::transaction::TransactionKind;
1917
use iota_interaction_ts::bindings::WasmIotaTransactionBlockEffects;
2018
use iota_interaction_ts::core_client::WasmCoreClientReadOnly;
19+
use iota_sdk_types::transaction::TransactionKind;
2120
use iota_sdk_types::Argument;
2221
use iota_sdk_types::ObjectId;
22+
use iota_sdk_types::ProgrammableTransaction;
2323
use product_common::bindings::core_client::WasmManagedCoreClientReadOnly;
2424
use product_common::bindings::transaction::WasmTransactionBuilder;
2525
use product_common::core_client::CoreClientReadOnly;

bindings/wasm/identity_wasm/src/rebased/proposals/controller_execution.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ use identity_iota::iota::rebased::proposals::ControllerExecution;
1111
use identity_iota::iota::rebased::proposals::ControllerIntentFnT;
1212
use identity_iota::iota::rebased::proposals::ProposalResult;
1313
use identity_iota::iota::rebased::proposals::ProposalT as _;
14-
use iota_interaction::types::base_types::IotaAddress;
1514
use iota_interaction::types::programmable_transaction_builder::ProgrammableTransactionBuilder;
16-
use iota_interaction::types::transaction::ProgrammableTransaction;
17-
use iota_interaction::types::transaction::TransactionKind;
1815
use iota_interaction_ts::bindings::WasmIotaTransactionBlockEffects;
1916
use iota_interaction_ts::core_client::WasmCoreClientReadOnly;
17+
use iota_sdk_types::transaction::TransactionKind;
18+
use iota_sdk_types::Address;
2019
use iota_sdk_types::Argument;
2120
use iota_sdk_types::ObjectId;
21+
use iota_sdk_types::ProgrammableTransaction;
2222
use product_common::bindings::core_client::WasmManagedCoreClientReadOnly;
2323
use product_common::bindings::transaction::WasmTransactionBuilder;
2424
use product_common::core_client::CoreClientReadOnly;
@@ -98,7 +98,7 @@ impl WasmControllerExecutionFn {
9898
#[wasm_bindgen(js_name = ControllerExecution, inspectable, getter_with_clone)]
9999
pub struct WasmControllerExecution {
100100
controller_cap: ObjectId,
101-
identity: IotaAddress,
101+
identity: Address,
102102
pub controller_exec_fn: Option<WasmControllerExecutionFn>,
103103
}
104104

bindings/wasm/identity_wasm/src/rebased/proposals/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub use update_did::*;
1818
use std::collections::HashMap;
1919
use std::collections::HashSet;
2020

21-
use identity_iota::iota_interaction::types::base_types::IotaAddress;
21+
use iota_sdk_types::Address;
2222
use iota_sdk_types::ObjectId;
2323
use js_sys::JsString;
2424
use js_sys::Reflect;
@@ -63,16 +63,16 @@ impl From<(String, String)> for StringCouple {
6363
}
6464
}
6565

66-
impl TryFrom<MapStringNumber> for HashMap<IotaAddress, u64> {
66+
impl TryFrom<MapStringNumber> for HashMap<Address, u64> {
6767
type Error = JsValue;
6868
fn try_from(value: MapStringNumber) -> Result<Self, Self::Error> {
6969
Ok(serde_wasm_bindgen::from_value(value.into())?)
7070
}
7171
}
7272

73-
impl TryFrom<&'_ HashMap<IotaAddress, u64>> for MapStringNumber {
73+
impl TryFrom<&'_ HashMap<Address, u64>> for MapStringNumber {
7474
type Error = JsValue;
75-
fn try_from(value: &'_ HashMap<IotaAddress, u64>) -> Result<Self, Self::Error> {
75+
fn try_from(value: &'_ HashMap<Address, u64>) -> Result<Self, Self::Error> {
7676
let js_value = serde_wasm_bindgen::to_value(value)?;
7777
js_value.dyn_into()
7878
}

bindings/wasm/identity_wasm/src/rebased/wasm_identity_client_read_only.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use std::str::FromStr;
77

88
use identity_iota::iota::rebased::client::IdentityClientReadOnly;
99
use identity_iota::iota::rebased::migration::Identity;
10-
use iota_interaction::types::base_types::IotaAddress;
1110
use iota_interaction_ts::bindings::WasmIotaClient;
11+
use iota_sdk_types::Address;
1212
use iota_sdk_types::ObjectId;
1313
use product_common::core_client::CoreClientReadOnly as _;
1414
use wasm_bindgen::prelude::*;
@@ -142,7 +142,7 @@ impl WasmIdentityClientReadOnly {
142142
/// @throws {Error} when the passed `address` string is not a valid IOTA address.
143143
#[wasm_bindgen(js_name = didsControlledBy)]
144144
pub async fn dids_controlled_by(&self, address: &str) -> Result<Vec<WasmIotaDID>, js_sys::Error> {
145-
let address = IotaAddress::from_str(address).map_err(|e| js_sys::Error::new(&format!("{e:#}")))?;
145+
let address = Address::from_str(address).map_err(|e| js_sys::Error::new(&format!("{e:#}")))?;
146146
let dids = self
147147
.0
148148
.dids_controlled_by(address)

0 commit comments

Comments
 (0)