diff --git a/CHANGELOG.md b/CHANGELOG.md index d347501f9..9ba6743a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Memory` and `Wasm` storage adapters; - `ParticipationEventWithNodes`; - Support for target `wasm32-unknown-unknown`; +- `Error::Participation`; ### Changed @@ -59,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Message::{GetAccount, VerifyMnemonic, SetClientOptions, SetStrongholdPassword, SetStrongholdPasswordClearInterval, StoreMnemonic, EmitTestEvent, Bech32ToHex, ClearListeners}` to named fields for better error messages; - Made `AccountManager::stop_background_syncing()` async to await until syncing actually stopped; - `OutputData::input_signing_data` returns `Result>` instead of `Result>`; +- `OutputData::input_signing_data` accepts `Option` instead of `bool`; ### Removed @@ -72,6 +74,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Stop endlessly requesting inaccessible incoming transactions; - Update addresses when a client config with a different HRP is passed; +- Return client errors from `Account::get_participation_overview()`; ## 1.0.0-rc.4 - 2022-12-23 diff --git a/Cargo.toml b/Cargo.toml index 3cabd97da..d0bfa2660 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ fern-logger = { version = "0.5.0", default-features = false } futures = { version = "0.3.25", default-features = false } getset = { version = "0.1.2", default-features = false } # iota-client = { version = "2.0.1-rc.5", default-features = false, features = [ "message_interface", "tls" ] } -iota-client = { git = "https://github.com/iotaledger/iota.rs", rev = "767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1", default-features = false, features = [ "message_interface", "tls" ] } +iota-client = { git = "https://github.com/iotaledger/iota.rs", rev = "59cf0dd10ced608aab55913bbc261c3765e618f2", default-features = false, features = [ "message_interface", "tls" ] } iota-crypto = { version = "0.15.3", default-features = false, features = [ "std", "chacha", "blake2b", "ed25519", "random", "slip10", "bip39", "bip39-en" ] } log = { version = "0.4.17", default-features = false } packable = { version = "0.7.0", default-features = false, features = [ "serde", "primitive-types" ] } diff --git a/bindings/nodejs/Cargo.lock b/bindings/nodejs/Cargo.lock index 3979159a0..c7f7f477d 100644 --- a/bindings/nodejs/Cargo.lock +++ b/bindings/nodejs/Cargo.lock @@ -1095,14 +1095,13 @@ dependencies = [ [[package]] name = "iota-client" version = "2.0.1-rc.5" -source = "git+https://github.com/iotaledger/iota.rs?rev=767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1#767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1" +source = "git+https://github.com/iotaledger/iota.rs?rev=59cf0dd10ced608aab55913bbc261c3765e618f2#59cf0dd10ced608aab55913bbc261c3765e618f2" dependencies = [ "async-trait", "backtrace", "derive_builder", "derive_more", "futures", - "getset", "gloo-timers", "hashbrown 0.13.2", "instant", @@ -1119,7 +1118,6 @@ dependencies = [ "reqwest", "serde", "serde_json", - "serde_repr", "thiserror", "tokio", "url", @@ -1177,7 +1175,7 @@ dependencies = [ [[package]] name = "iota-pow" version = "1.0.0-rc.2" -source = "git+https://github.com/iotaledger/iota.rs?rev=767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1#767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1" +source = "git+https://github.com/iotaledger/iota.rs?rev=59cf0dd10ced608aab55913bbc261c3765e618f2#59cf0dd10ced608aab55913bbc261c3765e618f2" dependencies = [ "instant", "iota-crypto", @@ -1188,12 +1186,13 @@ dependencies = [ [[package]] name = "iota-types" version = "1.0.0-rc.4" -source = "git+https://github.com/iotaledger/iota.rs?rev=767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1#767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1" +source = "git+https://github.com/iotaledger/iota.rs?rev=59cf0dd10ced608aab55913bbc261c3765e618f2#59cf0dd10ced608aab55913bbc261c3765e618f2" dependencies = [ "bech32 0.9.1", "bitflags", "bytemuck", "derive_more", + "getset", "hashbrown 0.13.2", "hex", "iota-crypto", @@ -1205,6 +1204,7 @@ dependencies = [ "serde", "serde-big-array", "serde_json", + "serde_repr", "thiserror", ] diff --git a/bindings/python/Cargo.lock b/bindings/python/Cargo.lock index 69d13434b..f780b954c 100644 --- a/bindings/python/Cargo.lock +++ b/bindings/python/Cargo.lock @@ -772,6 +772,21 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "gloo-storage" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6ab60bf5dbfd6f0ed1f7843da31b41010515c745735c970e821945ca91e480" +dependencies = [ + "gloo-utils", + "js-sys", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "gloo-timers" version = "0.2.6" @@ -784,6 +799,19 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gloo-utils" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8e8fc851e9c7b9852508bc6e3f690f452f474417e8545ec9857b7f7377036b5" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "h2" version = "0.3.15" @@ -1011,7 +1039,7 @@ dependencies = [ [[package]] name = "iota-client" version = "2.0.1-rc.5" -source = "git+https://github.com/iotaledger/iota.rs?rev=767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1#767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1" +source = "git+https://github.com/iotaledger/iota.rs?rev=59cf0dd10ced608aab55913bbc261c3765e618f2#59cf0dd10ced608aab55913bbc261c3765e618f2" dependencies = [ "async-trait", "backtrace", @@ -1069,7 +1097,7 @@ dependencies = [ [[package]] name = "iota-pow" version = "1.0.0-rc.2" -source = "git+https://github.com/iotaledger/iota.rs?rev=767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1#767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1" +source = "git+https://github.com/iotaledger/iota.rs?rev=59cf0dd10ced608aab55913bbc261c3765e618f2#59cf0dd10ced608aab55913bbc261c3765e618f2" dependencies = [ "instant", "iota-crypto", @@ -1080,12 +1108,13 @@ dependencies = [ [[package]] name = "iota-types" version = "1.0.0-rc.4" -source = "git+https://github.com/iotaledger/iota.rs?rev=767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1#767eb0e3d2e3ac7a4653a736b5ca20f8ff0b3dd1" +source = "git+https://github.com/iotaledger/iota.rs?rev=59cf0dd10ced608aab55913bbc261c3765e618f2#59cf0dd10ced608aab55913bbc261c3765e618f2" dependencies = [ "bech32", "bitflags", "bytemuck", "derive_more", + "getset", "hashbrown 0.13.2", "hex", "iota-crypto", @@ -1097,6 +1126,7 @@ dependencies = [ "serde", "serde-big-array", "serde_json", + "serde_repr", "thiserror", ] @@ -1109,6 +1139,7 @@ dependencies = [ "fern-logger", "futures", "getset", + "gloo-storage", "gloo-timers", "iota-client", "iota-crypto", @@ -1950,6 +1981,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" diff --git a/examples/participation.rs b/examples/participation.rs index a776dd08f..d527165d7 100644 --- a/examples/participation.rs +++ b/examples/participation.rs @@ -7,7 +7,8 @@ use std::{env, str::FromStr}; use dotenv::dotenv; use iota_client::{ - node_api::participation::types::ParticipationEventId, node_manager::node::Node, request_funds_from_faucet, Url, + api_types::plugins::participation::types::ParticipationEventId, node_manager::node::Node, + request_funds_from_faucet, Url, }; use iota_wallet::{ account_manager::AccountManager, diff --git a/src/account/mod.rs b/src/account/mod.rs index cc481ce54..dea179d48 100644 --- a/src/account/mod.rs +++ b/src/account/mod.rs @@ -22,7 +22,7 @@ use std::{ use getset::{Getters, Setters}; use iota_client::{ - api_types::response::OutputWithMetadataResponse, + api_types::core::response::OutputWithMetadataResponse, block::{ output::{FoundryId, FoundryOutput, OutputId}, payload::{ diff --git a/src/account/operations/helpers/time.rs b/src/account/operations/helpers/time.rs index 70f0a7506..70d85120c 100644 --- a/src/account/operations/helpers/time.rs +++ b/src/account/operations/helpers/time.rs @@ -1,7 +1,7 @@ // Copyright 2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use iota_client::block::address::Address; +use iota_client::block::{address::Address, output::AliasTransition}; use crate::account::types::{AddressWithUnspentOutputs, OutputData}; @@ -13,7 +13,7 @@ pub(crate) fn can_output_be_unlocked_now( alias_and_nft_addresses: &[Address], output_data: &OutputData, current_time: u32, - alias_state_transition: bool, + alias_transition: Option, ) -> crate::Result { if let Some(unlock_conditions) = output_data.output.unlock_conditions() { if unlock_conditions.is_time_locked(current_time) { @@ -21,11 +21,10 @@ pub(crate) fn can_output_be_unlocked_now( } } - let (required_unlock_address, _unlocked_alias_or_nft_address) = output_data.output.required_and_unlocked_address( - current_time, - &output_data.output_id, - alias_state_transition, - )?; + let (required_unlock_address, _unlocked_alias_or_nft_address) = + output_data + .output + .required_and_unlocked_address(current_time, &output_data.output_id, alias_transition)?; Ok(account_addresses .iter() diff --git a/src/account/operations/output_claiming.rs b/src/account/operations/output_claiming.rs index a6e10f44f..54901f19d 100644 --- a/src/account/operations/output_claiming.rs +++ b/src/account/operations/output_claiming.rs @@ -67,7 +67,7 @@ impl AccountHandle { output, local_time, // Not relevant without alias addresses - true, + None, )? { match outputs_to_claim { @@ -105,7 +105,7 @@ impl AccountHandle { output, local_time, // Not relevant without alias addresses - true, + None, )? { match outputs_to_claim { diff --git a/src/account/operations/output_consolidation.rs b/src/account/operations/output_consolidation.rs index ac810b49a..357fe9448 100644 --- a/src/account/operations/output_consolidation.rs +++ b/src/account/operations/output_consolidation.rs @@ -57,7 +57,7 @@ impl AccountHandle { return Ok(false); } - can_output_be_unlocked_now(account_addresses, &[], output_data, current_time, true)? + can_output_be_unlocked_now(account_addresses, &[], output_data, current_time, None)? } else { false }) diff --git a/src/account/operations/participation/event.rs b/src/account/operations/participation/event.rs index e7baa5f10..2a0577ea6 100644 --- a/src/account/operations/participation/event.rs +++ b/src/account/operations/participation/event.rs @@ -4,7 +4,9 @@ use std::collections::HashMap; use iota_client::{ - node_api::participation::types::{ParticipationEventId, ParticipationEventStatus, ParticipationEventType}, + api_types::plugins::participation::types::{ + ParticipationEventId, ParticipationEventStatus, ParticipationEventType, + }, node_manager::node::Node, Client, }; diff --git a/src/account/operations/participation/mod.rs b/src/account/operations/participation/mod.rs index d4ce6dfa8..50b12a1e8 100644 --- a/src/account/operations/participation/mod.rs +++ b/src/account/operations/participation/mod.rs @@ -15,11 +15,11 @@ pub mod voting_power; use std::collections::{hash_map::Entry, HashMap}; use iota_client::{ - block::output::{unlock_condition::UnlockCondition, Output, OutputId}, - node_api::participation::{ + api_types::plugins::participation::{ responses::TrackedParticipation, - types::{participation::Participations, ParticipationEventData, ParticipationEventId, PARTICIPATION_TAG}, + types::{ParticipationEventData, ParticipationEventId, Participations, PARTICIPATION_TAG}, }, + block::output::{unlock_condition::UnlockCondition, Output, OutputId}, node_manager::node::Node, Client, }; @@ -97,17 +97,21 @@ impl AccountHandle { let results = futures::future::try_join_all(tasks).await?; for (result, output_data) in results { - if let Ok(status) = result { - for (event_id, participation) in status.participations { - match participations.entry(event_id) { - Entry::Vacant(entry) => { - entry.insert(HashMap::from([(output_data.output_id, participation)])); - } - Entry::Occupied(mut entry) => { - entry.get_mut().insert(output_data.output_id, participation); + match result { + Ok(status) => { + for (event_id, participation) in status.participations { + match participations.entry(event_id) { + Entry::Vacant(entry) => { + entry.insert(HashMap::from([(output_data.output_id, participation)])); + } + Entry::Occupied(mut entry) => { + entry.get_mut().insert(output_data.output_id, participation); + } } } } + Err(iota_client::Error::NotFound(_)) => {} + Err(e) => return Err(crate::Error::Client(e.into())), } } } diff --git a/src/account/operations/participation/voting.rs b/src/account/operations/participation/voting.rs index 4bd91fbb2..87857f873 100644 --- a/src/account/operations/participation/voting.rs +++ b/src/account/operations/participation/voting.rs @@ -2,6 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 use iota_client::{ + api_types::plugins::participation::types::{ + Participation, ParticipationEventId, Participations, PARTICIPATION_TAG, + }, block::{ output::{ feature::{MetadataFeature, TagFeature}, @@ -9,10 +12,6 @@ use iota_client::{ }, payload::TaggedDataPayload, }, - node_api::participation::types::{ - participation::{Participation, Participations}, - ParticipationEventId, PARTICIPATION_TAG, - }, }; use crate::{ diff --git a/src/account/operations/participation/voting_power.rs b/src/account/operations/participation/voting_power.rs index 293517857..d6886039d 100644 --- a/src/account/operations/participation/voting_power.rs +++ b/src/account/operations/participation/voting_power.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use iota_client::{ + api_types::plugins::participation::types::{Participations, PARTICIPATION_TAG}, block::{ output::{ feature::{MetadataFeature, TagFeature}, @@ -10,7 +11,6 @@ use iota_client::{ }, payload::TaggedDataPayload, }, - node_api::participation::types::{participation::Participations, PARTICIPATION_TAG}, }; use crate::{ diff --git a/src/account/operations/retry.rs b/src/account/operations/retry.rs index a16093e31..9e5963718 100644 --- a/src/account/operations/retry.rs +++ b/src/account/operations/retry.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use iota_client::{ - api_types::dto::LedgerInclusionStateDto, + api_types::core::dto::LedgerInclusionStateDto, block::{ payload::{transaction::TransactionId, Payload}, Block, BlockId, diff --git a/src/account/operations/syncing/outputs.rs b/src/account/operations/syncing/outputs.rs index f3370554f..9f7e88893 100644 --- a/src/account/operations/syncing/outputs.rs +++ b/src/account/operations/syncing/outputs.rs @@ -5,7 +5,7 @@ use std::{str::FromStr, time::Instant}; use crypto::keys::slip10::Chain; use iota_client::{ - api_types::response::OutputWithMetadataResponse, + api_types::core::response::OutputWithMetadataResponse, block::{ input::Input, output::{dto::OutputDto, Output, OutputId}, diff --git a/src/account/operations/syncing/transactions.rs b/src/account/operations/syncing/transactions.rs index dd11e86d3..e095de7d0 100644 --- a/src/account/operations/syncing/transactions.rs +++ b/src/account/operations/syncing/transactions.rs @@ -7,7 +7,7 @@ use std::{ }; use iota_client::{ - api_types::dto::LedgerInclusionStateDto, + api_types::core::dto::LedgerInclusionStateDto, block::{input::Input, output::OutputId, payload::transaction::TransactionEssence, BlockId}, Error as ClientError, }; diff --git a/src/account/operations/transaction/high_level/burning_melting/burn_nft.rs b/src/account/operations/transaction/high_level/burning_melting/burn_nft.rs index adf3739cd..6876bc50c 100644 --- a/src/account/operations/transaction/high_level/burning_melting/burn_nft.rs +++ b/src/account/operations/transaction/high_level/burning_melting/burn_nft.rs @@ -35,7 +35,7 @@ impl AccountHandle { &[Address::Nft(NftAddress::new(nft_id))], &output_data, current_time, - true, + None, )? { owned_outputs.push(output_data); } diff --git a/src/account/operations/transaction/high_level/burning_melting/destroy_alias.rs b/src/account/operations/transaction/high_level/burning_melting/destroy_alias.rs index e2e6d14d7..4b926349c 100644 --- a/src/account/operations/transaction/high_level/burning_melting/destroy_alias.rs +++ b/src/account/operations/transaction/high_level/burning_melting/destroy_alias.rs @@ -41,7 +41,7 @@ impl AccountHandle { &[Address::Alias(AliasAddress::new(alias_id))], &output_data, current_time, - true, + None, )? { owned_outputs.push(output_data); } diff --git a/src/account/operations/transaction/input_selection.rs b/src/account/operations/transaction/input_selection.rs index c5305b9f5..d5a088df5 100644 --- a/src/account/operations/transaction/input_selection.rs +++ b/src/account/operations/transaction/input_selection.rs @@ -8,7 +8,7 @@ use iota_client::{ block::{ address::Address, input::INPUT_COUNT_MAX, - output::{Output, OutputId}, + output::{AliasTransition, Output, OutputId}, }, secret::types::InputSigningData, }; @@ -255,7 +255,7 @@ fn filter_inputs( } // Defaults to state transition if it is not explicitly a governance transition or a burn. - let alias_state_transition = alias_state_transition(output_data, outputs, burn)?.unwrap_or(true); + let alias_state_transition = alias_state_transition(output_data, outputs, burn)?; if let Some(available_input) = output_data.input_signing_data(account, current_time, bech32_hrp, alias_state_transition)? @@ -272,7 +272,7 @@ pub(crate) fn alias_state_transition( output_data: &OutputData, outputs: &[Output], burn: Option<&Burn>, -) -> crate::Result> { +) -> crate::Result> { Ok(if let Output::Alias(alias_input) = &output_data.output { let alias_id = alias_input.alias_id_non_null(&output_data.output_id); // Check if alias exists in the outputs and get the required transition type @@ -282,9 +282,9 @@ pub(crate) fn alias_state_transition( if let Output::Alias(alias_output) = o { if *alias_output.alias_id() == alias_id { if alias_output.state_index() == alias_input.state_index() { - Some(Some(false)) + Some(Some(AliasTransition::Governance)) } else { - Some(Some(true)) + Some(Some(AliasTransition::State)) } } else { None @@ -294,7 +294,15 @@ pub(crate) fn alias_state_transition( } // if not find in the outputs, the alias gets burned which is a governance transaction }) - .unwrap_or_else(|| burn.map(|burn| !burn.aliases().contains(&alias_id))) + .unwrap_or_else(|| { + burn.and_then(|burn| { + if burn.aliases().contains(&alias_id) { + Some(AliasTransition::Governance) + } else { + None + } + }) + }) } else { None }) diff --git a/src/account/operations/transaction/mod.rs b/src/account/operations/transaction/mod.rs index 802d28249..bad979ac8 100644 --- a/src/account/operations/transaction/mod.rs +++ b/src/account/operations/transaction/mod.rs @@ -14,7 +14,7 @@ use std::time::{SystemTime, UNIX_EPOCH}; use iota_client::{ api::{verify_semantic, PreparedTransactionData, SignedTransactionData}, - api_types::response::OutputWithMetadataResponse, + api_types::core::response::OutputWithMetadataResponse, block::{ output::{ dto::{OutputDto, OutputMetadataDto}, diff --git a/src/account/types/mod.rs b/src/account/types/mod.rs index 1ba1c36c2..85033e3a4 100644 --- a/src/account/types/mod.rs +++ b/src/account/types/mod.rs @@ -11,12 +11,12 @@ use std::str::FromStr; use crypto::keys::slip10::Chain; use iota_client::{ - api_types::response::OutputWithMetadataResponse, + api_types::core::response::OutputWithMetadataResponse, block::{ address::{dto::AddressDto, Address}, output::{ dto::{OutputDto, OutputMetadataDto}, - Output, OutputId, OutputMetadata, + AliasTransition, Output, OutputId, OutputMetadata, }, payload::transaction::{dto::TransactionPayloadDto, TransactionId, TransactionPayload}, BlockId, @@ -62,11 +62,11 @@ impl OutputData { account: &Account, current_time: u32, bech32_hrp: &str, - alias_state_transition: bool, + alias_transition: Option, ) -> crate::Result> { let (unlock_address, _unlocked_alias_or_nft_address) = self.output - .required_and_unlocked_address(current_time, &self.output_id, alias_state_transition)?; + .required_and_unlocked_address(current_time, &self.output_id, alias_transition)?; let chain = if unlock_address == self.address { self.chain.clone() diff --git a/src/account/update.rs b/src/account/update.rs index 19287ef21..f504b5637 100644 --- a/src/account/update.rs +++ b/src/account/update.rs @@ -18,7 +18,7 @@ use crate::account::{ use crate::{ account::types::OutputDataDto, events::types::{NewOutputEvent, SpentOutputEvent, TransactionInclusionEvent, WalletEvent}, - iota_client::api_types::response::OutputWithMetadataResponse, + iota_client::api_types::core::response::OutputWithMetadataResponse, iota_client::block::payload::transaction::dto::TransactionPayloadDto, }; diff --git a/src/error.rs b/src/error.rs index 457b4d007..f29c9e234 100644 --- a/src/error.rs +++ b/src/error.rs @@ -87,6 +87,11 @@ pub enum Error { #[cfg(feature = "participation")] #[error("voting error {0}")] Voting(String), + /// Participation error + #[cfg(feature = "participation")] + #[error("participation error {0}")] + #[serde(serialize_with = "display_string")] + Participation(#[from] iota_client::api_types::plugins::participation::error::Error), /// No outputs available for consolidating #[error( "nothing to consolidate: available outputs: {available_outputs}, consolidation threshold: {consolidation_threshold}" diff --git a/src/events/types.rs b/src/events/types.rs index d869a0951..bfb17ef06 100644 --- a/src/events/types.rs +++ b/src/events/types.rs @@ -4,7 +4,7 @@ use getset::Getters; use iota_client::{ api::PreparedTransactionDataDto, - api_types::response::OutputWithMetadataResponse, + api_types::core::response::OutputWithMetadataResponse, block::payload::transaction::{dto::TransactionPayloadDto, TransactionId}, }; use serde::{Deserialize, Serialize}; diff --git a/src/message_interface/account_method.rs b/src/message_interface/account_method.rs index 3e65e22cd..a33efa683 100644 --- a/src/message_interface/account_method.rs +++ b/src/message_interface/account_method.rs @@ -16,7 +16,7 @@ use iota_client::{ }; #[cfg(feature = "participation")] use iota_client::{ - node_api::participation::types::{ParticipationEventId, ParticipationEventType}, + api_types::plugins::participation::types::{ParticipationEventId, ParticipationEventType}, node_manager::node::Node, }; use serde::{Deserialize, Serialize}; diff --git a/src/message_interface/response.rs b/src/message_interface/response.rs index a8135df03..266b2e9df 100644 --- a/src/message_interface/response.rs +++ b/src/message_interface/response.rs @@ -18,7 +18,7 @@ use serde::Serialize; #[cfg(feature = "participation")] use { crate::account::operations::participation::{AccountParticipationOverview, ParticipationEventWithNodes}, - iota_client::node_api::participation::types::{ParticipationEventId, ParticipationEventStatus}, + iota_client::api_types::plugins::participation::types::{ParticipationEventId, ParticipationEventStatus}, std::collections::HashMap, }; diff --git a/src/storage/participation.rs b/src/storage/participation.rs index cd779fc7e..a69a1ffcf 100644 --- a/src/storage/participation.rs +++ b/src/storage/participation.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; -use iota_client::node_api::participation::types::ParticipationEventId; +use iota_client::api_types::plugins::participation::types::ParticipationEventId; use super::manager::StorageManager; use crate::{