Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove excess features #1278

Merged
merged 4 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions bindings/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ serde = { version = "1.0.188", default-features = false }
serde_json = { version = "1.0.107", default-features = false }
thiserror = { version = "1.0.48", default-features = false }
tokio = { version = "1.32.0", default-features = false }
url = { version = "2.4.1", default-features = false, features = [
"serde",
] }
zeroize = { version = "1.6.0", default-features = false }

[features]
Expand Down
2 changes: 1 addition & 1 deletion bindings/core/src/method/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ use iota_sdk::{
},
ClientOptions,
},
Url,
};
use serde::{Deserialize, Serialize};
use url::Url;

use crate::method::account::AccountMethod;
#[cfg(feature = "stronghold")]
Expand Down
39 changes: 19 additions & 20 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,19 @@ tokio = { version = "1.32.0", default-features = false, features = [
[features]
default = ["client", "wallet", "tls"]

irc_27 = ["url", "serde"]
irc_30 = ["url", "serde"]
ledger_nano = ["iota-ledger-nano"]
mqtt = ["std", "regex", "rumqttc", "dep:once_cell"]
irc_27 = ["serde", "dep:url"]
irc_30 = ["serde", "dep:url"]
ledger_nano = ["dep:iota-ledger-nano"]
mqtt = ["std", "tls", "dep:regex", "dep:rumqttc", "dep:once_cell"]
participation = ["storage"]
rand = ["dep:rand"]
rocksdb = ["dep:rocksdb", "storage"]
rocksdb = ["storage", "dep:rocksdb"]
serde = [
"serde_repr",
"hashbrown/serde",
"packable/serde",
"primitive-types/serde_no_std",
"iota-crypto/serde",
"zeroize?/serde",
thibault-martinez marked this conversation as resolved.
Show resolved Hide resolved
"dep:serde_repr",
]
std = [
"packable/std",
Expand All @@ -167,34 +166,34 @@ std = [
]
storage = ["iota-crypto/chacha", "dep:time", "dep:anymap", "dep:once_cell"]
stronghold = [
"iota_stronghold",
"iota-crypto/chacha",
"dep:iota_stronghold",
"dep:time",
"dep:anymap",
"dep:once_cell",
]
tls = ["reqwest?/rustls-tls", "rumqttc?/use-rustls"]
events = []
private_key_secret_manager = ["bs58"]
private_key_secret_manager = ["dep:bs58"]

client = [
"async-trait",
"futures",
"instant",
"std",
"serde",
"iota-crypto/bip39",
"iota-crypto/bip39-en",
"iota-crypto/bip44",
"iota-crypto/keccak",
"iota-crypto/random",
"iota-crypto/slip10",
"log",
"reqwest",
"serde",
"std",
"thiserror",
"tokio",
"url",
"zeroize",
"dep:async-trait",
"dep:futures",
"dep:instant",
"dep:log",
"dep:reqwest",
"dep:thiserror",
"dep:tokio",
"dep:url",
"dep:zeroize",
]
wallet = ["client"]

Expand Down
3 changes: 2 additions & 1 deletion sdk/examples/wallet/participation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
use iota_sdk::{
client::node_manager::node::Node,
wallet::{account::types::participation::ParticipationEventRegistrationOptions, Result},
Url, Wallet,
Wallet,
};
use url::Url;

// The node that runs the participation plugin
const PARTICPATION_NODE_URL: &str = "https://api.testnet.shimmer.network";
Expand Down
3 changes: 1 addition & 2 deletions sdk/src/client/node_manager/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use std::hash::Hash;

use serde::{Deserialize, Serialize};

use crate::Url;
use url::Url;

/// Node authentication object.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Hash)]
Expand Down
2 changes: 0 additions & 2 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ pub mod utils;
pub use crypto;
pub use packable;
pub use primitive_types::U256;
#[cfg(feature = "url")]
pub use url::Url;

#[cfg(feature = "wallet")]
pub type Wallet = self::wallet::Wallet<client::secret::SecretManager>;
2 changes: 1 addition & 1 deletion sdk/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#[cfg(feature = "serde")]
pub mod serde;

#[cfg(feature = "instant")]
#[cfg(feature = "client")]
pub fn unix_timestamp_now() -> core::time::Duration {
thibault-martinez marked this conversation as resolved.
Show resolved Hide resolved
instant::SystemTime::now()
.duration_since(instant::SystemTime::UNIX_EPOCH)
Expand Down
3 changes: 2 additions & 1 deletion sdk/src/wallet/core/operations/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

use std::collections::{HashMap, HashSet};

use url::Url;

use super::storage::SaveLoadWallet;
use crate::{
client::{
Expand All @@ -14,7 +16,6 @@ use crate::{
Client, ClientBuilder,
},
wallet::{Wallet, WalletBuilder},
Url,
};

impl<S: 'static + SecretManage> Wallet<S> {
Expand Down
2 changes: 1 addition & 1 deletion sdk/tests/wallet/backup_restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use iota_sdk::{
secret::{mnemonic::MnemonicSecretManager, stronghold::StrongholdSecretManager, SecretManager},
},
wallet::{ClientOptions, Result, Wallet},
Url,
};
use url::Url;

use crate::wallet::common::{setup, tear_down, NODE_LOCAL, NODE_OTHER};

Expand Down
2 changes: 1 addition & 1 deletion sdk/tests/wallet/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use iota_sdk::{
client::constants::SHIMMER_COIN_TYPE,
client::node_manager::node::{Node, NodeDto},
wallet::Error,
Url,
};
use iota_sdk::{
client::{
Expand All @@ -17,6 +16,7 @@ use iota_sdk::{
types::block::address::Bech32Address,
wallet::{ClientOptions, Result, Wallet},
};
use url::Url;

#[cfg(feature = "storage")]
use crate::wallet::common::NODE_OTHER;
Expand Down
Loading