From 38e4f97c151a991056293afce5d41f6e2fda3c7d Mon Sep 17 00:00:00 2001 From: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com> Date: Wed, 29 Nov 2023 09:31:01 +0100 Subject: [PATCH 1/3] Fix `needs_blind_signing()` for non Ed25519 addresses (#1710) --- sdk/CHANGELOG.md | 4 ++++ sdk/src/client/secret/ledger_nano.rs | 8 +++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sdk/CHANGELOG.md b/sdk/CHANGELOG.md index 4b1fbe3df7..49e228b612 100644 --- a/sdk/CHANGELOG.md +++ b/sdk/CHANGELOG.md @@ -29,6 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Display of `WalletError::InsufficientFunds`; +### Fixed + +- `needs_blind_signing()` for non Ed25519 addresses; + ## 1.1.2 - 2023-10-26 ### Added diff --git a/sdk/src/client/secret/ledger_nano.rs b/sdk/src/client/secret/ledger_nano.rs index 9b67239f5f..aff66f3a6b 100644 --- a/sdk/src/client/secret/ledger_nano.rs +++ b/sdk/src/client/secret/ledger_nano.rs @@ -426,11 +426,9 @@ impl SecretManagerConfig for LedgerSecretManager { pub fn needs_blind_signing(prepared_transaction: &PreparedTransactionData, buffer_size: usize) -> bool { let TransactionEssence::Regular(essence) = &prepared_transaction.essence; - if !essence - .outputs() - .iter() - .all(|output| matches!(output, Output::Basic(o) if o.simple_deposit_address().is_some())) - { + if !essence.outputs().iter().all( + |output| matches!(output, Output::Basic(o) if o.simple_deposit_address().is_some() && o.address().is_ed25519()), + ) { return true; } From 69c695b7396ea3fd052462fd2dd3454cb1f773c2 Mon Sep 17 00:00:00 2001 From: Brord van Wierst Date: Wed, 29 Nov 2023 11:10:08 +0100 Subject: [PATCH 2/3] Rust: Added env check to examples (#1676) * Added check * changed to expect * allow single for loop * fix logger test * changed to unwrap_or --- sdk/Cargo.toml | 2 +- sdk/examples/client/01_generate_addresses.rs | 4 ++++ sdk/examples/client/02_address_balance.rs | 4 ++++ sdk/examples/client/block/00_block_no_payload.rs | 4 ++++ .../client/block/01_block_confirmation_time.rs | 4 ++++ sdk/examples/client/block/02_block_custom_parents.rs | 4 ++++ sdk/examples/client/block/03_block_custom_payload.rs | 4 ++++ sdk/examples/client/block/04_block_tagged_data.rs | 4 ++++ sdk/examples/client/block/custom_inputs.rs | 4 ++++ sdk/examples/client/block/output.rs | 4 ++++ sdk/examples/client/block/transaction.rs | 4 ++++ sdk/examples/client/custom_remainder_address.rs | 10 +++++++--- sdk/examples/client/get_block.rs | 5 +++++ sdk/examples/client/high_level/consolidation.rs | 4 ++++ .../client/high_level/inputs_from_transaction_id.rs | 5 +++++ sdk/examples/client/high_level/search_address.rs | 4 ++++ sdk/examples/client/ledger_nano_transaction.rs | 4 ++++ sdk/examples/client/logger.rs | 5 +++++ sdk/examples/client/node_api_core/01_get_routes.rs | 3 +-- sdk/examples/client/node_api_core/03_get_tips.rs | 2 +- sdk/examples/client/node_api_core/04_post_block.rs | 7 ++++++- .../client/node_api_core/05_post_block_raw.rs | 7 ++++++- sdk/examples/client/node_api_core/06_get_block.rs | 2 +- sdk/examples/client/node_api_core/07_get_block_raw.rs | 2 +- .../client/node_api_core/08_get_block_metadata.rs | 2 +- sdk/examples/client/node_api_core/09_get_output.rs | 2 +- .../client/node_api_core/10_get_output_raw.rs | 2 +- .../client/node_api_core/11_get_output_metadata.rs | 2 +- sdk/examples/client/node_api_core/12_get_receipts.rs | 2 +- .../node_api_core/13_get_receipts_migrated_at.rs | 2 +- sdk/examples/client/node_api_core/14_get_treasury.rs | 2 +- .../client/node_api_core/17_get_milestone_by_id.rs | 2 +- .../node_api_core/18_get_milestone_by_id_raw.rs | 2 +- .../client/node_api_core/19_get_utxo_changes_by_id.rs | 2 +- .../client/node_api_core/20_get_milestone_by_index.rs | 2 +- .../node_api_core/21_get_milestone_by_index_raw.rs | 2 +- .../node_api_core/22_get_utxo_changes_by_index.rs | 2 +- .../client/node_api_indexer/01_get_alias_output.rs | 2 +- .../client/node_api_indexer/02_get_alias_outputs.rs | 2 +- .../client/node_api_indexer/03_get_foundry_output.rs | 2 +- .../client/node_api_indexer/04_get_foundry_outputs.rs | 2 +- .../client/node_api_indexer/05_get_nft_output.rs | 2 +- .../client/node_api_indexer/06_get_nft_outputs.rs | 2 +- .../node_api_indexer/07_get_random_basic_outputs.rs | 2 +- .../client/offline_signing/0_address_generation.rs | 5 +++++ .../offline_signing/1_transaction_preparation.rs | 5 +++++ .../client/offline_signing/2_transaction_signing.rs | 5 +++++ sdk/examples/client/offline_signing/3_send_block.rs | 5 +++++ sdk/examples/client/output/alias.rs | 4 ++++ sdk/examples/client/output/all.rs | 4 ++++ .../client/output/all_automatic_input_selection.rs | 4 ++++ sdk/examples/client/output/basic.rs | 4 ++++ sdk/examples/client/output/build_alias_output.rs | 5 +++++ sdk/examples/client/output/build_basic_output.rs | 5 +++++ sdk/examples/client/output/build_nft_output.rs | 5 +++++ sdk/examples/client/output/expiration.rs | 4 ++++ sdk/examples/client/output/foundry.rs | 4 ++++ sdk/examples/client/output/micro_transaction.rs | 4 ++++ sdk/examples/client/output/native_tokens.rs | 4 ++++ sdk/examples/client/output/nft.rs | 4 ++++ sdk/examples/client/output/recursive_alias.rs | 4 ++++ sdk/examples/client/participation.rs | 4 ++++ sdk/examples/client/quorum.rs | 5 +++++ sdk/examples/client/send_all.rs | 4 ++++ sdk/examples/client/split_funds.rs | 4 ++++ sdk/examples/client/stronghold.rs | 11 ++++++++--- .../how_tos/accounts_and_addresses/check_balance.rs | 4 ++++ .../accounts_and_addresses/consolidate_outputs.rs | 6 ++++++ .../how_tos/accounts_and_addresses/create_account.rs | 10 ++++++++++ .../how_tos/accounts_and_addresses/create_address.rs | 4 ++++ .../how_tos/accounts_and_addresses/list_accounts.rs | 5 +++++ .../how_tos/accounts_and_addresses/list_addresses.rs | 5 +++++ .../how_tos/accounts_and_addresses/list_outputs.rs | 5 +++++ .../accounts_and_addresses/list_transactions.rs | 5 +++++ .../advanced_transactions/advanced_transaction.rs | 4 ++++ .../advanced_transactions/claim_transaction.rs | 4 ++++ .../advanced_transactions/send_micro_transaction.rs | 4 ++++ sdk/examples/how_tos/alias/create.rs | 4 ++++ sdk/examples/how_tos/alias/destroy.rs | 4 ++++ sdk/examples/how_tos/alias/governance_transition.rs | 4 ++++ sdk/examples/how_tos/alias/state_transition.rs | 4 ++++ sdk/examples/how_tos/alias_wallet/request_funds.rs | 4 ++++ sdk/examples/how_tos/alias_wallet/transaction.rs | 8 +++++++- sdk/examples/how_tos/client/get_health.rs | 2 +- sdk/examples/how_tos/client/get_info.rs | 2 +- sdk/examples/how_tos/client/get_outputs.rs | 2 +- sdk/examples/how_tos/native_tokens/burn.rs | 4 ++++ sdk/examples/how_tos/native_tokens/create.rs | 4 ++++ sdk/examples/how_tos/native_tokens/destroy_foundry.rs | 4 ++++ sdk/examples/how_tos/native_tokens/melt.rs | 4 ++++ sdk/examples/how_tos/native_tokens/mint.rs | 4 ++++ sdk/examples/how_tos/native_tokens/send.rs | 4 ++++ .../how_tos/nft_collection/00_mint_issuer_nft.rs | 4 ++++ .../how_tos/nft_collection/01_mint_collection_nft.rs | 4 ++++ sdk/examples/how_tos/nfts/burn_nft.rs | 4 ++++ sdk/examples/how_tos/nfts/mint_nft.rs | 4 ++++ sdk/examples/how_tos/nfts/send_nft.rs | 4 ++++ sdk/examples/how_tos/outputs/features.rs | 5 +++++ sdk/examples/how_tos/outputs/unlock_conditions.rs | 5 +++++ .../how_tos/sign_and_verify_ed25519/sign_ed25519.rs | 4 ++++ .../how_tos/simple_transaction/request_funds.rs | 4 ++++ .../how_tos/simple_transaction/simple_transaction.rs | 4 ++++ sdk/examples/wallet/17_check_unlock_conditions.rs | 5 +++++ sdk/examples/wallet/accounts.rs | 4 ++++ sdk/examples/wallet/background_syncing.rs | 4 ++++ sdk/examples/wallet/events.rs | 4 ++++ sdk/examples/wallet/getting_started.rs | 10 +++++++++- sdk/examples/wallet/ledger_nano.rs | 4 ++++ sdk/examples/wallet/logger.rs | 4 ++++ .../wallet/offline_signing/0_generate_addresses.rs | 4 ++++ .../wallet/offline_signing/1_prepare_transaction.rs | 5 +++++ .../wallet/offline_signing/2_sign_transaction.rs | 5 +++++ .../wallet/offline_signing/3_send_transaction.rs | 5 +++++ sdk/examples/wallet/participation.rs | 4 ++++ sdk/examples/wallet/recover_accounts.rs | 4 ++++ sdk/examples/wallet/spammer.rs | 4 ++++ sdk/examples/wallet/split_funds.rs | 4 ++++ sdk/examples/wallet/storage.rs | 4 ++++ sdk/examples/wallet/wallet.rs | 4 ++++ 119 files changed, 440 insertions(+), 39 deletions(-) diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index 684cf7d554..5e63421305 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -847,7 +847,7 @@ required-features = ["wallet", "participation"] [[example]] name = "logger" path = "examples/wallet/logger.rs" -required-features = ["wallet"] +required-features = ["wallet", "storage"] [[example]] name = "recover_accounts" diff --git a/sdk/examples/client/01_generate_addresses.rs b/sdk/examples/client/01_generate_addresses.rs index 2b70abd286..f4295576a6 100644 --- a/sdk/examples/client/01_generate_addresses.rs +++ b/sdk/examples/client/01_generate_addresses.rs @@ -19,6 +19,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/02_address_balance.rs b/sdk/examples/client/02_address_balance.rs index e3622665a0..7ed97f51f8 100644 --- a/sdk/examples/client/02_address_balance.rs +++ b/sdk/examples/client/02_address_balance.rs @@ -22,6 +22,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/block/00_block_no_payload.rs b/sdk/examples/client/block/00_block_no_payload.rs index 4f6a9b0f38..1af35967d2 100644 --- a/sdk/examples/client/block/00_block_no_payload.rs +++ b/sdk/examples/client/block/00_block_no_payload.rs @@ -15,6 +15,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Create a node client. diff --git a/sdk/examples/client/block/01_block_confirmation_time.rs b/sdk/examples/client/block/01_block_confirmation_time.rs index 4c21443487..c24562e862 100644 --- a/sdk/examples/client/block/01_block_confirmation_time.rs +++ b/sdk/examples/client/block/01_block_confirmation_time.rs @@ -15,6 +15,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Create a node client. diff --git a/sdk/examples/client/block/02_block_custom_parents.rs b/sdk/examples/client/block/02_block_custom_parents.rs index a063f0b9b5..bbb5f66e97 100644 --- a/sdk/examples/client/block/02_block_custom_parents.rs +++ b/sdk/examples/client/block/02_block_custom_parents.rs @@ -15,6 +15,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Create a node client. diff --git a/sdk/examples/client/block/03_block_custom_payload.rs b/sdk/examples/client/block/03_block_custom_payload.rs index 5271b52d7d..d6401221d7 100644 --- a/sdk/examples/client/block/03_block_custom_payload.rs +++ b/sdk/examples/client/block/03_block_custom_payload.rs @@ -18,6 +18,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Create a node client. diff --git a/sdk/examples/client/block/04_block_tagged_data.rs b/sdk/examples/client/block/04_block_tagged_data.rs index 88a74d5616..0bd1b9d366 100644 --- a/sdk/examples/client/block/04_block_tagged_data.rs +++ b/sdk/examples/client/block/04_block_tagged_data.rs @@ -18,6 +18,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); let tag = std::env::args().nth(1).unwrap_or_else(|| "Hello".to_string()); diff --git a/sdk/examples/client/block/custom_inputs.rs b/sdk/examples/client/block/custom_inputs.rs index 68e41221c9..a426b0a302 100644 --- a/sdk/examples/client/block/custom_inputs.rs +++ b/sdk/examples/client/block/custom_inputs.rs @@ -21,6 +21,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL", "FAUCET_URL", "MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); let faucet_url = std::env::var("FAUCET_URL").unwrap(); diff --git a/sdk/examples/client/block/output.rs b/sdk/examples/client/block/output.rs index 3be62122ac..695b5b3a5f 100644 --- a/sdk/examples/client/block/output.rs +++ b/sdk/examples/client/block/output.rs @@ -18,6 +18,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL", "FAUCET_URL", "MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); let faucet_url = std::env::var("FAUCET_URL").unwrap(); diff --git a/sdk/examples/client/block/transaction.rs b/sdk/examples/client/block/transaction.rs index 18b0294209..3d7302039c 100644 --- a/sdk/examples/client/block/transaction.rs +++ b/sdk/examples/client/block/transaction.rs @@ -15,6 +15,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL", "FAUCET_URL", "MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); let faucet_url = std::env::var("FAUCET_URL").unwrap(); diff --git a/sdk/examples/client/custom_remainder_address.rs b/sdk/examples/client/custom_remainder_address.rs index cd85414994..64d83701fa 100644 --- a/sdk/examples/client/custom_remainder_address.rs +++ b/sdk/examples/client/custom_remainder_address.rs @@ -16,14 +16,18 @@ use iota_sdk::client::{ #[tokio::main] async fn main() -> Result<()> { + // This example uses secrets in environment variables for simplicity which should not be done in production. + dotenvy::dotenv().ok(); + + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let amount = std::env::args() .nth(1) .map(|s| s.parse::().unwrap()) .unwrap_or(9_000_000); - // This example uses secrets in environment variables for simplicity which should not be done in production. - dotenvy::dotenv().ok(); - // Create a client instance. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/get_block.rs b/sdk/examples/client/get_block.rs index 8fa6ae79a3..b07143ab8b 100644 --- a/sdk/examples/client/get_block.rs +++ b/sdk/examples/client/get_block.rs @@ -15,6 +15,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/high_level/consolidation.rs b/sdk/examples/client/high_level/consolidation.rs index 6fb4002c59..ef4de78fe5 100644 --- a/sdk/examples/client/high_level/consolidation.rs +++ b/sdk/examples/client/high_level/consolidation.rs @@ -15,6 +15,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL", "MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let address_range_start = std::env::args().nth(1).map(|s| s.parse::().unwrap()).unwrap_or(0); let address_range_len = std::env::args().nth(2).map(|s| s.parse::().unwrap()).unwrap_or(10); diff --git a/sdk/examples/client/high_level/inputs_from_transaction_id.rs b/sdk/examples/client/high_level/inputs_from_transaction_id.rs index 1b8f1072c2..a48e7a1e7a 100644 --- a/sdk/examples/client/high_level/inputs_from_transaction_id.rs +++ b/sdk/examples/client/high_level/inputs_from_transaction_id.rs @@ -20,6 +20,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Create a node client. diff --git a/sdk/examples/client/high_level/search_address.rs b/sdk/examples/client/high_level/search_address.rs index a20ad6c4b4..f0809142d4 100644 --- a/sdk/examples/client/high_level/search_address.rs +++ b/sdk/examples/client/high_level/search_address.rs @@ -20,6 +20,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Create a node client. diff --git a/sdk/examples/client/ledger_nano_transaction.rs b/sdk/examples/client/ledger_nano_transaction.rs index 05ec2b0f74..545f289c4a 100644 --- a/sdk/examples/client/ledger_nano_transaction.rs +++ b/sdk/examples/client/ledger_nano_transaction.rs @@ -30,6 +30,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a client instance let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/logger.rs b/sdk/examples/client/logger.rs index e261e335aa..fc860e6f4b 100644 --- a/sdk/examples/client/logger.rs +++ b/sdk/examples/client/logger.rs @@ -15,6 +15,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Generates a client.log file with logs for debugging. // We exclude logs from h2, hyper and rustls to reduce the noise. let logger_output_config = fern_logger::LoggerOutputConfigBuilder::new() diff --git a/sdk/examples/client/node_api_core/01_get_routes.rs b/sdk/examples/client/node_api_core/01_get_routes.rs index 74c8b672d1..f8e8dfb614 100644 --- a/sdk/examples/client/node_api_core/01_get_routes.rs +++ b/sdk/examples/client/node_api_core/01_get_routes.rs @@ -14,11 +14,10 @@ use iota_sdk::client::{Client, Result}; async fn main() -> Result<()> { // If not provided we use the default node from the `.env` file. dotenvy::dotenv().ok(); - // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(1) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder() diff --git a/sdk/examples/client/node_api_core/03_get_tips.rs b/sdk/examples/client/node_api_core/03_get_tips.rs index 11f2ecbc2e..187b55c2c7 100644 --- a/sdk/examples/client/node_api_core/03_get_tips.rs +++ b/sdk/examples/client/node_api_core/03_get_tips.rs @@ -18,7 +18,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(1) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/04_post_block.rs b/sdk/examples/client/node_api_core/04_post_block.rs index 3380c1de8a..20000ccdf1 100644 --- a/sdk/examples/client/node_api_core/04_post_block.rs +++ b/sdk/examples/client/node_api_core/04_post_block.rs @@ -15,10 +15,15 @@ async fn main() -> Result<()> { // If not provided we use the default node from the `.env` file. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(1) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/05_post_block_raw.rs b/sdk/examples/client/node_api_core/05_post_block_raw.rs index 8d2e3e5de9..4fd4a5bbb9 100644 --- a/sdk/examples/client/node_api_core/05_post_block_raw.rs +++ b/sdk/examples/client/node_api_core/05_post_block_raw.rs @@ -15,10 +15,15 @@ async fn main() -> Result<()> { // If not provided we use the default node from the `.env` file. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(1) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/06_get_block.rs b/sdk/examples/client/node_api_core/06_get_block.rs index c61c4aa4cd..011dbbba1a 100644 --- a/sdk/examples/client/node_api_core/06_get_block.rs +++ b/sdk/examples/client/node_api_core/06_get_block.rs @@ -18,7 +18,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/07_get_block_raw.rs b/sdk/examples/client/node_api_core/07_get_block_raw.rs index 5a9bc10fa3..42c59c9d9e 100644 --- a/sdk/examples/client/node_api_core/07_get_block_raw.rs +++ b/sdk/examples/client/node_api_core/07_get_block_raw.rs @@ -18,7 +18,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/08_get_block_metadata.rs b/sdk/examples/client/node_api_core/08_get_block_metadata.rs index 1c507015e2..fcac0dd6ab 100644 --- a/sdk/examples/client/node_api_core/08_get_block_metadata.rs +++ b/sdk/examples/client/node_api_core/08_get_block_metadata.rs @@ -18,7 +18,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/09_get_output.rs b/sdk/examples/client/node_api_core/09_get_output.rs index b3ce27baef..dcf5d5cc3b 100644 --- a/sdk/examples/client/node_api_core/09_get_output.rs +++ b/sdk/examples/client/node_api_core/09_get_output.rs @@ -23,7 +23,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/10_get_output_raw.rs b/sdk/examples/client/node_api_core/10_get_output_raw.rs index bd553a7e44..4d2ddaa250 100644 --- a/sdk/examples/client/node_api_core/10_get_output_raw.rs +++ b/sdk/examples/client/node_api_core/10_get_output_raw.rs @@ -23,7 +23,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/11_get_output_metadata.rs b/sdk/examples/client/node_api_core/11_get_output_metadata.rs index 3bc469a09c..b6a89bb59b 100644 --- a/sdk/examples/client/node_api_core/11_get_output_metadata.rs +++ b/sdk/examples/client/node_api_core/11_get_output_metadata.rs @@ -23,7 +23,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/12_get_receipts.rs b/sdk/examples/client/node_api_core/12_get_receipts.rs index b3c9a93f0c..08ebdd199e 100644 --- a/sdk/examples/client/node_api_core/12_get_receipts.rs +++ b/sdk/examples/client/node_api_core/12_get_receipts.rs @@ -18,7 +18,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(1) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/13_get_receipts_migrated_at.rs b/sdk/examples/client/node_api_core/13_get_receipts_migrated_at.rs index 6285236b96..35855cc1f4 100644 --- a/sdk/examples/client/node_api_core/13_get_receipts_migrated_at.rs +++ b/sdk/examples/client/node_api_core/13_get_receipts_migrated_at.rs @@ -19,7 +19,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/14_get_treasury.rs b/sdk/examples/client/node_api_core/14_get_treasury.rs index 1d8cdd480e..459e01e309 100644 --- a/sdk/examples/client/node_api_core/14_get_treasury.rs +++ b/sdk/examples/client/node_api_core/14_get_treasury.rs @@ -18,7 +18,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(1) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/17_get_milestone_by_id.rs b/sdk/examples/client/node_api_core/17_get_milestone_by_id.rs index fb5bf58afe..cfb7c66376 100644 --- a/sdk/examples/client/node_api_core/17_get_milestone_by_id.rs +++ b/sdk/examples/client/node_api_core/17_get_milestone_by_id.rs @@ -22,7 +22,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/18_get_milestone_by_id_raw.rs b/sdk/examples/client/node_api_core/18_get_milestone_by_id_raw.rs index e21c4be4ba..64f2a67cb8 100644 --- a/sdk/examples/client/node_api_core/18_get_milestone_by_id_raw.rs +++ b/sdk/examples/client/node_api_core/18_get_milestone_by_id_raw.rs @@ -22,7 +22,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/19_get_utxo_changes_by_id.rs b/sdk/examples/client/node_api_core/19_get_utxo_changes_by_id.rs index 61dc28920f..e0a10a6b1d 100644 --- a/sdk/examples/client/node_api_core/19_get_utxo_changes_by_id.rs +++ b/sdk/examples/client/node_api_core/19_get_utxo_changes_by_id.rs @@ -22,7 +22,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/20_get_milestone_by_index.rs b/sdk/examples/client/node_api_core/20_get_milestone_by_index.rs index fd8d7824f9..7dda72e9dd 100644 --- a/sdk/examples/client/node_api_core/20_get_milestone_by_index.rs +++ b/sdk/examples/client/node_api_core/20_get_milestone_by_index.rs @@ -19,7 +19,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/21_get_milestone_by_index_raw.rs b/sdk/examples/client/node_api_core/21_get_milestone_by_index_raw.rs index 7ae7c47b4e..cf62663ec4 100644 --- a/sdk/examples/client/node_api_core/21_get_milestone_by_index_raw.rs +++ b/sdk/examples/client/node_api_core/21_get_milestone_by_index_raw.rs @@ -19,7 +19,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_core/22_get_utxo_changes_by_index.rs b/sdk/examples/client/node_api_core/22_get_utxo_changes_by_index.rs index 4bb0c8c679..48da221bab 100644 --- a/sdk/examples/client/node_api_core/22_get_utxo_changes_by_index.rs +++ b/sdk/examples/client/node_api_core/22_get_utxo_changes_by_index.rs @@ -19,7 +19,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_indexer/01_get_alias_output.rs b/sdk/examples/client/node_api_indexer/01_get_alias_output.rs index 9013f5ced2..0f04c2422b 100644 --- a/sdk/examples/client/node_api_indexer/01_get_alias_output.rs +++ b/sdk/examples/client/node_api_indexer/01_get_alias_output.rs @@ -24,7 +24,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_indexer/02_get_alias_outputs.rs b/sdk/examples/client/node_api_indexer/02_get_alias_outputs.rs index 5873991e76..7922476bae 100644 --- a/sdk/examples/client/node_api_indexer/02_get_alias_outputs.rs +++ b/sdk/examples/client/node_api_indexer/02_get_alias_outputs.rs @@ -24,7 +24,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder() diff --git a/sdk/examples/client/node_api_indexer/03_get_foundry_output.rs b/sdk/examples/client/node_api_indexer/03_get_foundry_output.rs index 5006b35448..0099831889 100644 --- a/sdk/examples/client/node_api_indexer/03_get_foundry_output.rs +++ b/sdk/examples/client/node_api_indexer/03_get_foundry_output.rs @@ -24,7 +24,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_indexer/04_get_foundry_outputs.rs b/sdk/examples/client/node_api_indexer/04_get_foundry_outputs.rs index e07becadff..cddfcf8992 100644 --- a/sdk/examples/client/node_api_indexer/04_get_foundry_outputs.rs +++ b/sdk/examples/client/node_api_indexer/04_get_foundry_outputs.rs @@ -24,7 +24,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder() diff --git a/sdk/examples/client/node_api_indexer/05_get_nft_output.rs b/sdk/examples/client/node_api_indexer/05_get_nft_output.rs index 10a7d14546..a433e08266 100644 --- a/sdk/examples/client/node_api_indexer/05_get_nft_output.rs +++ b/sdk/examples/client/node_api_indexer/05_get_nft_output.rs @@ -24,7 +24,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/node_api_indexer/06_get_nft_outputs.rs b/sdk/examples/client/node_api_indexer/06_get_nft_outputs.rs index a765b0d3be..55b8c0c82e 100644 --- a/sdk/examples/client/node_api_indexer/06_get_nft_outputs.rs +++ b/sdk/examples/client/node_api_indexer/06_get_nft_outputs.rs @@ -24,7 +24,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder() diff --git a/sdk/examples/client/node_api_indexer/07_get_random_basic_outputs.rs b/sdk/examples/client/node_api_indexer/07_get_random_basic_outputs.rs index 23eb1c0e57..21b5a5f720 100644 --- a/sdk/examples/client/node_api_indexer/07_get_random_basic_outputs.rs +++ b/sdk/examples/client/node_api_indexer/07_get_random_basic_outputs.rs @@ -21,7 +21,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/client/offline_signing/0_address_generation.rs b/sdk/examples/client/offline_signing/0_address_generation.rs index 783224ff42..d897fa22ea 100644 --- a/sdk/examples/client/offline_signing/0_address_generation.rs +++ b/sdk/examples/client/offline_signing/0_address_generation.rs @@ -20,6 +20,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let secret_manager = SecretManager::try_from_mnemonic(std::env::var("MNEMONIC").unwrap())?; // Generates an address offline. diff --git a/sdk/examples/client/offline_signing/1_transaction_preparation.rs b/sdk/examples/client/offline_signing/1_transaction_preparation.rs index bd5ed8cb70..57eabe89d3 100644 --- a/sdk/examples/client/offline_signing/1_transaction_preparation.rs +++ b/sdk/examples/client/offline_signing/1_transaction_preparation.rs @@ -26,6 +26,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Address to which we want to send the amount. diff --git a/sdk/examples/client/offline_signing/2_transaction_signing.rs b/sdk/examples/client/offline_signing/2_transaction_signing.rs index fae203b491..db87f8fd02 100644 --- a/sdk/examples/client/offline_signing/2_transaction_signing.rs +++ b/sdk/examples/client/offline_signing/2_transaction_signing.rs @@ -27,6 +27,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let secret_manager = SecretManager::try_from_mnemonic(std::env::var("MNEMONIC").unwrap())?; let prepared_transaction_data = read_prepared_transaction_from_file(PREPARED_TRANSACTION_FILE_NAME).await?; diff --git a/sdk/examples/client/offline_signing/3_send_block.rs b/sdk/examples/client/offline_signing/3_send_block.rs index 9f31b1c265..d1bd98ae27 100644 --- a/sdk/examples/client/offline_signing/3_send_block.rs +++ b/sdk/examples/client/offline_signing/3_send_block.rs @@ -28,6 +28,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Create a node client. diff --git a/sdk/examples/client/output/alias.rs b/sdk/examples/client/output/alias.rs index 4c94c58469..3f9bb58d55 100644 --- a/sdk/examples/client/output/alias.rs +++ b/sdk/examples/client/output/alias.rs @@ -27,6 +27,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/all.rs b/sdk/examples/client/output/all.rs index 1baf58ffc2..3a4c669957 100644 --- a/sdk/examples/client/output/all.rs +++ b/sdk/examples/client/output/all.rs @@ -36,6 +36,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/all_automatic_input_selection.rs b/sdk/examples/client/output/all_automatic_input_selection.rs index 4644b3fdd0..1de8fcb6e8 100644 --- a/sdk/examples/client/output/all_automatic_input_selection.rs +++ b/sdk/examples/client/output/all_automatic_input_selection.rs @@ -33,6 +33,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/basic.rs b/sdk/examples/client/output/basic.rs index 782363aa13..5fe1a1457d 100644 --- a/sdk/examples/client/output/basic.rs +++ b/sdk/examples/client/output/basic.rs @@ -27,6 +27,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/build_alias_output.rs b/sdk/examples/client/output/build_alias_output.rs index 27d31f1ed4..8ff737f960 100644 --- a/sdk/examples/client/output/build_alias_output.rs +++ b/sdk/examples/client/output/build_alias_output.rs @@ -25,6 +25,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let metadata = std::env::args().nth(1).unwrap_or_else(|| "hello".to_string()); let metadata = metadata.as_bytes(); diff --git a/sdk/examples/client/output/build_basic_output.rs b/sdk/examples/client/output/build_basic_output.rs index f4ac4680d6..44f2d8f343 100644 --- a/sdk/examples/client/output/build_basic_output.rs +++ b/sdk/examples/client/output/build_basic_output.rs @@ -30,6 +30,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/build_nft_output.rs b/sdk/examples/client/output/build_nft_output.rs index 2b5a9a6c53..11c3bb8e62 100644 --- a/sdk/examples/client/output/build_nft_output.rs +++ b/sdk/examples/client/output/build_nft_output.rs @@ -28,6 +28,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/expiration.rs b/sdk/examples/client/output/expiration.rs index c64ed4b2b8..e726bc136b 100644 --- a/sdk/examples/client/output/expiration.rs +++ b/sdk/examples/client/output/expiration.rs @@ -28,6 +28,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/foundry.rs b/sdk/examples/client/output/foundry.rs index 890599aabb..04df895c23 100644 --- a/sdk/examples/client/output/foundry.rs +++ b/sdk/examples/client/output/foundry.rs @@ -38,6 +38,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/micro_transaction.rs b/sdk/examples/client/output/micro_transaction.rs index 6b6894f6e1..fe8ed9a1b1 100644 --- a/sdk/examples/client/output/micro_transaction.rs +++ b/sdk/examples/client/output/micro_transaction.rs @@ -27,6 +27,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/native_tokens.rs b/sdk/examples/client/output/native_tokens.rs index 5a02f5dff7..d41d907122 100644 --- a/sdk/examples/client/output/native_tokens.rs +++ b/sdk/examples/client/output/native_tokens.rs @@ -25,6 +25,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/output/nft.rs b/sdk/examples/client/output/nft.rs index 96112d2832..38dd5c63e3 100644 --- a/sdk/examples/client/output/nft.rs +++ b/sdk/examples/client/output/nft.rs @@ -29,6 +29,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); let explorer_url = std::env::var("EXPLORER_URL").unwrap(); let faucet_url = std::env::var("FAUCET_URL").unwrap(); diff --git a/sdk/examples/client/output/recursive_alias.rs b/sdk/examples/client/output/recursive_alias.rs index c8700efcd4..2594a4fee1 100644 --- a/sdk/examples/client/output/recursive_alias.rs +++ b/sdk/examples/client/output/recursive_alias.rs @@ -28,6 +28,10 @@ async fn main() -> Result<()> { // non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/participation.rs b/sdk/examples/client/participation.rs index 4ba263235f..437767cb64 100644 --- a/sdk/examples/client/participation.rs +++ b/sdk/examples/client/participation.rs @@ -29,6 +29,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/quorum.rs b/sdk/examples/client/quorum.rs index f5ebbf59eb..b0d9277a6f 100644 --- a/sdk/examples/client/quorum.rs +++ b/sdk/examples/client/quorum.rs @@ -23,6 +23,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_1 = std::env::args().nth(1).expect("missing example argument: NODE 1"); let node_2 = std::env::args().nth(2).expect("missing example argument: NODE 2"); let node_3 = std::env::args().nth(3).expect("missing example argument: NODE 3"); diff --git a/sdk/examples/client/send_all.rs b/sdk/examples/client/send_all.rs index 6a7caf0a39..ff33470e1c 100644 --- a/sdk/examples/client/send_all.rs +++ b/sdk/examples/client/send_all.rs @@ -24,6 +24,10 @@ async fn main() -> Result<()> { // `NON_SECURE_USE_DEVELOPMENT_MNEMONIC_1` must contain non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "MNEMONIC_2", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/split_funds.rs b/sdk/examples/client/split_funds.rs index ca7eb31b5b..d5a5d5d12a 100644 --- a/sdk/examples/client/split_funds.rs +++ b/sdk/examples/client/split_funds.rs @@ -17,6 +17,10 @@ async fn main() -> Result<()> { // `MNEMONIC` must contain non-zero balance. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "FAUCET_URL", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a node client. let client = Client::builder() .with_node(&std::env::var("NODE_URL").unwrap())? diff --git a/sdk/examples/client/stronghold.rs b/sdk/examples/client/stronghold.rs index 50ed797069..6bdd1a2776 100644 --- a/sdk/examples/client/stronghold.rs +++ b/sdk/examples/client/stronghold.rs @@ -20,13 +20,18 @@ use iota_sdk::{ #[tokio::main] async fn main() -> Result<()> { + // This example uses secrets in environment variables for simplicity which should not be done in production. + dotenvy::dotenv().ok(); + + #[allow(clippy::single_element_loop)] + for var in ["MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let stronghold_secret_manager = StrongholdSecretManager::builder() .password("some_hopefully_secure_password".to_owned()) .build("test.stronghold")?; - // This example uses secrets in environment variables for simplicity which should not be done in production. - dotenvy::dotenv().ok(); - let mnemonic = Mnemonic::from(std::env::var("MNEMONIC").unwrap()); // The mnemonic only needs to be stored the first time diff --git a/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs b/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs index f06f913a7f..53645d4cfb 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/check_balance.rs @@ -18,6 +18,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs b/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs index 60e10b771f..2aea01175a 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/consolidate_outputs.rs @@ -23,6 +23,12 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "EXPLORER_URL", "STRONGHOLD_PASSWORD"] { + if std::env::var(var).is_err() { + panic!(".env variable '{}' is undefined, see .env.example", var); + } + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/accounts_and_addresses/create_account.rs b/sdk/examples/how_tos/accounts_and_addresses/create_account.rs index af62241b55..e203a6cf97 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/create_account.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/create_account.rs @@ -24,6 +24,16 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in [ + "STRONGHOLD_PASSWORD", + "STRONGHOLD_SNAPSHOT_PATH", + "MNEMONIC", + "NODE_URL", + "WALLET_DB_PATH", + ] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Setup Stronghold secret_manager let secret_manager = StrongholdSecretManager::builder() .password(std::env::var("STRONGHOLD_PASSWORD").unwrap()) diff --git a/sdk/examples/how_tos/accounts_and_addresses/create_address.rs b/sdk/examples/how_tos/accounts_and_addresses/create_address.rs index 0ea29cb5e8..b76c8a6b4e 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/create_address.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/create_address.rs @@ -21,6 +21,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "EXPLORER_URL", "STRONGHOLD_PASSWORD"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/accounts_and_addresses/list_accounts.rs b/sdk/examples/how_tos/accounts_and_addresses/list_accounts.rs index ffc57e6e45..6eb0485243 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/list_accounts.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/list_accounts.rs @@ -15,6 +15,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["WALLET_DB_PATH"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/accounts_and_addresses/list_addresses.rs b/sdk/examples/how_tos/accounts_and_addresses/list_addresses.rs index b4ef1f315f..0ee314333b 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/list_addresses.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/list_addresses.rs @@ -15,6 +15,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["WALLET_DB_PATH"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs b/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs index 3593cbd5ee..40759683ac 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/list_outputs.rs @@ -15,6 +15,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["WALLET_DB_PATH"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/accounts_and_addresses/list_transactions.rs b/sdk/examples/how_tos/accounts_and_addresses/list_transactions.rs index 59b46f5044..39d0bcff60 100644 --- a/sdk/examples/how_tos/accounts_and_addresses/list_transactions.rs +++ b/sdk/examples/how_tos/accounts_and_addresses/list_transactions.rs @@ -18,6 +18,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["WALLET_DB_PATH"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/advanced_transactions/advanced_transaction.rs b/sdk/examples/how_tos/advanced_transactions/advanced_transaction.rs index fafa2cc4b6..7ce65289aa 100644 --- a/sdk/examples/how_tos/advanced_transactions/advanced_transaction.rs +++ b/sdk/examples/how_tos/advanced_transactions/advanced_transaction.rs @@ -23,6 +23,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["EXPLORER_URL", "STRONGHOLD_PASSWORD"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create the wallet let wallet = Wallet::builder().finish().await?; diff --git a/sdk/examples/how_tos/advanced_transactions/claim_transaction.rs b/sdk/examples/how_tos/advanced_transactions/claim_transaction.rs index 4bd018ee05..636a4ec1b6 100644 --- a/sdk/examples/how_tos/advanced_transactions/claim_transaction.rs +++ b/sdk/examples/how_tos/advanced_transactions/claim_transaction.rs @@ -16,6 +16,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["EXPLORER_URL", "STRONGHOLD_PASSWORD"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create the wallet let wallet = Wallet::builder().finish().await?; diff --git a/sdk/examples/how_tos/advanced_transactions/send_micro_transaction.rs b/sdk/examples/how_tos/advanced_transactions/send_micro_transaction.rs index da955a04a0..38a70f4808 100644 --- a/sdk/examples/how_tos/advanced_transactions/send_micro_transaction.rs +++ b/sdk/examples/how_tos/advanced_transactions/send_micro_transaction.rs @@ -26,6 +26,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/alias/create.rs b/sdk/examples/how_tos/alias/create.rs index 00bdcc664c..b7be9c463a 100644 --- a/sdk/examples/how_tos/alias/create.rs +++ b/sdk/examples/how_tos/alias/create.rs @@ -19,6 +19,10 @@ async fn main() -> Result<()> { //  This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/alias/destroy.rs b/sdk/examples/how_tos/alias/destroy.rs index 1955f97343..e919527146 100644 --- a/sdk/examples/how_tos/alias/destroy.rs +++ b/sdk/examples/how_tos/alias/destroy.rs @@ -19,6 +19,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/alias/governance_transition.rs b/sdk/examples/how_tos/alias/governance_transition.rs index cd650502c8..62d1511575 100644 --- a/sdk/examples/how_tos/alias/governance_transition.rs +++ b/sdk/examples/how_tos/alias/governance_transition.rs @@ -24,6 +24,10 @@ async fn main() -> Result<()> { //  This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/alias/state_transition.rs b/sdk/examples/how_tos/alias/state_transition.rs index 3654cb529b..a98d500476 100644 --- a/sdk/examples/how_tos/alias/state_transition.rs +++ b/sdk/examples/how_tos/alias/state_transition.rs @@ -21,6 +21,10 @@ async fn main() -> Result<()> { //  This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/alias_wallet/request_funds.rs b/sdk/examples/how_tos/alias_wallet/request_funds.rs index 731636dece..74f68f3b2e 100644 --- a/sdk/examples/how_tos/alias_wallet/request_funds.rs +++ b/sdk/examples/how_tos/alias_wallet/request_funds.rs @@ -21,6 +21,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["FAUCET_URL", "WALLET_DB_PATH"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let faucet_url = std::env::var("FAUCET_URL").unwrap(); // Create the wallet diff --git a/sdk/examples/how_tos/alias_wallet/transaction.rs b/sdk/examples/how_tos/alias_wallet/transaction.rs index d33aaac1ea..c794ab67ad 100644 --- a/sdk/examples/how_tos/alias_wallet/transaction.rs +++ b/sdk/examples/how_tos/alias_wallet/transaction.rs @@ -21,6 +21,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let sync_options = SyncOptions { alias: AliasSyncOptions { basic_outputs: true, @@ -73,8 +77,10 @@ async fn main() -> Result<()> { account .retry_transaction_until_included(&transaction.transaction_id, None, None) .await?; + println!( - "Transaction with custom input: https://explorer.shimmer.network/testnet/transaction/{}", + "Transaction with custom input: {}/transaction/{}", + std::env::var("EXPLORER_URL").unwrap(), transaction.transaction_id ); diff --git a/sdk/examples/how_tos/client/get_health.rs b/sdk/examples/how_tos/client/get_health.rs index ab0a68262d..7a42ef8978 100644 --- a/sdk/examples/how_tos/client/get_health.rs +++ b/sdk/examples/how_tos/client/get_health.rs @@ -18,7 +18,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(1) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder() diff --git a/sdk/examples/how_tos/client/get_info.rs b/sdk/examples/how_tos/client/get_info.rs index cbfabd8199..95a781b221 100644 --- a/sdk/examples/how_tos/client/get_info.rs +++ b/sdk/examples/how_tos/client/get_info.rs @@ -18,7 +18,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(1) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder() diff --git a/sdk/examples/how_tos/client/get_outputs.rs b/sdk/examples/how_tos/client/get_outputs.rs index 46f4d23309..1f9fb18c3f 100644 --- a/sdk/examples/how_tos/client/get_outputs.rs +++ b/sdk/examples/how_tos/client/get_outputs.rs @@ -25,7 +25,7 @@ async fn main() -> Result<()> { // Take the node URL from command line argument or use one from env as default. let node_url = std::env::args() .nth(2) - .unwrap_or_else(|| std::env::var("NODE_URL").unwrap()); + .unwrap_or_else(|| std::env::var("NODE_URL").expect("NODE_URL not set")); // Create a node client. let client = Client::builder().with_node(&node_url)?.finish().await?; diff --git a/sdk/examples/how_tos/native_tokens/burn.rs b/sdk/examples/how_tos/native_tokens/burn.rs index 95d25f061d..5529157fd2 100644 --- a/sdk/examples/how_tos/native_tokens/burn.rs +++ b/sdk/examples/how_tos/native_tokens/burn.rs @@ -32,6 +32,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/native_tokens/create.rs b/sdk/examples/how_tos/native_tokens/create.rs index 8eff34f88b..70e9266790 100644 --- a/sdk/examples/how_tos/native_tokens/create.rs +++ b/sdk/examples/how_tos/native_tokens/create.rs @@ -27,6 +27,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/native_tokens/destroy_foundry.rs b/sdk/examples/how_tos/native_tokens/destroy_foundry.rs index fca8c58984..2d02b61912 100644 --- a/sdk/examples/how_tos/native_tokens/destroy_foundry.rs +++ b/sdk/examples/how_tos/native_tokens/destroy_foundry.rs @@ -19,6 +19,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/native_tokens/melt.rs b/sdk/examples/how_tos/native_tokens/melt.rs index 67198a48e3..e1047866ff 100644 --- a/sdk/examples/how_tos/native_tokens/melt.rs +++ b/sdk/examples/how_tos/native_tokens/melt.rs @@ -26,6 +26,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/native_tokens/mint.rs b/sdk/examples/how_tos/native_tokens/mint.rs index 0280f55676..174d99f5ea 100644 --- a/sdk/examples/how_tos/native_tokens/mint.rs +++ b/sdk/examples/how_tos/native_tokens/mint.rs @@ -26,6 +26,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/native_tokens/send.rs b/sdk/examples/how_tos/native_tokens/send.rs index 778c9c1159..d55498e89d 100644 --- a/sdk/examples/how_tos/native_tokens/send.rs +++ b/sdk/examples/how_tos/native_tokens/send.rs @@ -28,6 +28,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/nft_collection/00_mint_issuer_nft.rs b/sdk/examples/how_tos/nft_collection/00_mint_issuer_nft.rs index 1efc6f0398..a5327ac423 100644 --- a/sdk/examples/how_tos/nft_collection/00_mint_issuer_nft.rs +++ b/sdk/examples/how_tos/nft_collection/00_mint_issuer_nft.rs @@ -28,6 +28,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/nft_collection/01_mint_collection_nft.rs b/sdk/examples/how_tos/nft_collection/01_mint_collection_nft.rs index becf2b33dc..0034dd1e65 100644 --- a/sdk/examples/how_tos/nft_collection/01_mint_collection_nft.rs +++ b/sdk/examples/how_tos/nft_collection/01_mint_collection_nft.rs @@ -34,6 +34,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let issuer_nft_id = std::env::args() .nth(1) .expect("missing example argument: ISSUER_NFT_ID") diff --git a/sdk/examples/how_tos/nfts/burn_nft.rs b/sdk/examples/how_tos/nfts/burn_nft.rs index 37182618d2..305909bd2f 100644 --- a/sdk/examples/how_tos/nfts/burn_nft.rs +++ b/sdk/examples/how_tos/nfts/burn_nft.rs @@ -18,6 +18,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create the wallet let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) diff --git a/sdk/examples/how_tos/nfts/mint_nft.rs b/sdk/examples/how_tos/nfts/mint_nft.rs index cde3d42259..1134cd2f58 100644 --- a/sdk/examples/how_tos/nfts/mint_nft.rs +++ b/sdk/examples/how_tos/nfts/mint_nft.rs @@ -35,6 +35,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create the wallet let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) diff --git a/sdk/examples/how_tos/nfts/send_nft.rs b/sdk/examples/how_tos/nfts/send_nft.rs index 2b5df323a9..825eb2be0b 100644 --- a/sdk/examples/how_tos/nfts/send_nft.rs +++ b/sdk/examples/how_tos/nfts/send_nft.rs @@ -24,6 +24,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create the wallet let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) diff --git a/sdk/examples/how_tos/outputs/features.rs b/sdk/examples/how_tos/outputs/features.rs index 41db52055c..187f584d0d 100644 --- a/sdk/examples/how_tos/outputs/features.rs +++ b/sdk/examples/how_tos/outputs/features.rs @@ -26,6 +26,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Create a client instance. diff --git a/sdk/examples/how_tos/outputs/unlock_conditions.rs b/sdk/examples/how_tos/outputs/unlock_conditions.rs index c0dec1fd49..b72bc7eb0b 100644 --- a/sdk/examples/how_tos/outputs/unlock_conditions.rs +++ b/sdk/examples/how_tos/outputs/unlock_conditions.rs @@ -29,6 +29,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let node_url = std::env::var("NODE_URL").unwrap(); // Create a client instance. diff --git a/sdk/examples/how_tos/sign_and_verify_ed25519/sign_ed25519.rs b/sdk/examples/how_tos/sign_and_verify_ed25519/sign_ed25519.rs index fde71e50a2..9304b224ab 100644 --- a/sdk/examples/how_tos/sign_and_verify_ed25519/sign_ed25519.rs +++ b/sdk/examples/how_tos/sign_and_verify_ed25519/sign_ed25519.rs @@ -29,6 +29,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["STRONGHOLD_PASSWORD", "MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Setup Stronghold secret_manager let stronghold = StrongholdSecretManager::builder() .password(std::env::var("STRONGHOLD_PASSWORD").unwrap()) diff --git a/sdk/examples/how_tos/simple_transaction/request_funds.rs b/sdk/examples/how_tos/simple_transaction/request_funds.rs index 9eba872978..2875dcc98c 100644 --- a/sdk/examples/how_tos/simple_transaction/request_funds.rs +++ b/sdk/examples/how_tos/simple_transaction/request_funds.rs @@ -18,6 +18,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "FAUCET_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/how_tos/simple_transaction/simple_transaction.rs b/sdk/examples/how_tos/simple_transaction/simple_transaction.rs index 5e4698ba8e..431ea1f419 100644 --- a/sdk/examples/how_tos/simple_transaction/simple_transaction.rs +++ b/sdk/examples/how_tos/simple_transaction/simple_transaction.rs @@ -23,6 +23,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/wallet/17_check_unlock_conditions.rs b/sdk/examples/wallet/17_check_unlock_conditions.rs index 6ffdb3e445..0951e2e516 100644 --- a/sdk/examples/wallet/17_check_unlock_conditions.rs +++ b/sdk/examples/wallet/17_check_unlock_conditions.rs @@ -27,6 +27,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["WALLET_DB_PATH"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/wallet/accounts.rs b/sdk/examples/wallet/accounts.rs index 21d9541bbe..98f869d74c 100644 --- a/sdk/examples/wallet/accounts.rs +++ b/sdk/examples/wallet/accounts.rs @@ -28,6 +28,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "WALLET_DB_PATH", "FAUCET_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let client_options = ClientOptions::new().with_node(&std::env::var("NODE_URL").unwrap())?; let secret_manager = MnemonicSecretManager::try_from_mnemonic(std::env::var("MNEMONIC").unwrap())?; diff --git a/sdk/examples/wallet/background_syncing.rs b/sdk/examples/wallet/background_syncing.rs index eda91075d0..054d7fb97f 100644 --- a/sdk/examples/wallet/background_syncing.rs +++ b/sdk/examples/wallet/background_syncing.rs @@ -22,6 +22,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "WALLET_DB_PATH", "FAUCET_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create a wallet let client_options = ClientOptions::new().with_node(&std::env::var("NODE_URL").unwrap())?; let secret_manager = MnemonicSecretManager::try_from_mnemonic(std::env::var("MNEMONIC").unwrap())?; diff --git a/sdk/examples/wallet/events.rs b/sdk/examples/wallet/events.rs index 01abf19c8d..4ec7b34c7b 100644 --- a/sdk/examples/wallet/events.rs +++ b/sdk/examples/wallet/events.rs @@ -31,6 +31,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "WALLET_DB_PATH", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let client_options = ClientOptions::new().with_node(&std::env::var("NODE_URL").unwrap())?; let secret_manager = MnemonicSecretManager::try_from_mnemonic(std::env::var("MNEMONIC").unwrap())?; diff --git a/sdk/examples/wallet/getting_started.rs b/sdk/examples/wallet/getting_started.rs index 69468337fb..3a9bf87f53 100644 --- a/sdk/examples/wallet/getting_started.rs +++ b/sdk/examples/wallet/getting_started.rs @@ -19,13 +19,21 @@ use iota_sdk::{ #[tokio::main] async fn main() -> Result<()> { + // This example uses secrets in environment variables for simplicity which should not be done in production. + dotenvy::dotenv().ok(); + + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Setup Stronghold secret manager. // WARNING: Never hardcode passwords in production code. let secret_manager = StrongholdSecretManager::builder() .password("password".to_owned()) // A password to encrypt the stored data. .build("vault.stronghold")?; // The path to store the account snapshot. - let client_options = ClientOptions::new().with_node("https://api.testnet.shimmer.network")?; + let client_options = ClientOptions::new().with_node(&std::env::var("NODE_URL").unwrap())?; // Set up and store the wallet. let wallet = Wallet::builder() diff --git a/sdk/examples/wallet/ledger_nano.rs b/sdk/examples/wallet/ledger_nano.rs index caa272af05..83b371a50d 100644 --- a/sdk/examples/wallet/ledger_nano.rs +++ b/sdk/examples/wallet/ledger_nano.rs @@ -36,6 +36,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "WALLET_DB_PATH", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let client_options = ClientOptions::new().with_node(&std::env::var("NODE_URL").unwrap())?; let secret_manager = LedgerSecretManager::new(true); let wallet = Wallet::builder() diff --git a/sdk/examples/wallet/logger.rs b/sdk/examples/wallet/logger.rs index 4cb69e54ca..24f6d9a61e 100644 --- a/sdk/examples/wallet/logger.rs +++ b/sdk/examples/wallet/logger.rs @@ -24,6 +24,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "WALLET_DB_PATH"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Initialize a logger that writes to the specified file let logger_output_config = fern_logger::LoggerOutputConfigBuilder::new() .name("example.log") diff --git a/sdk/examples/wallet/offline_signing/0_generate_addresses.rs b/sdk/examples/wallet/offline_signing/0_generate_addresses.rs index 138bc23fb2..3b2f052c7c 100644 --- a/sdk/examples/wallet/offline_signing/0_generate_addresses.rs +++ b/sdk/examples/wallet/offline_signing/0_generate_addresses.rs @@ -26,6 +26,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["STRONGHOLD_PASSWORD", "MNEMONIC"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let offline_client = ClientOptions::new(); // Setup Stronghold secret_manager diff --git a/sdk/examples/wallet/offline_signing/1_prepare_transaction.rs b/sdk/examples/wallet/offline_signing/1_prepare_transaction.rs index 32113c1b4d..fa5886717d 100644 --- a/sdk/examples/wallet/offline_signing/1_prepare_transaction.rs +++ b/sdk/examples/wallet/offline_signing/1_prepare_transaction.rs @@ -30,6 +30,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["NODE_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let params = [SendParams::new(SEND_AMOUNT, RECV_ADDRESS)?]; // Recovers addresses from example `0_address_generation`. diff --git a/sdk/examples/wallet/offline_signing/2_sign_transaction.rs b/sdk/examples/wallet/offline_signing/2_sign_transaction.rs index b17ede4cdf..1ea175da0d 100644 --- a/sdk/examples/wallet/offline_signing/2_sign_transaction.rs +++ b/sdk/examples/wallet/offline_signing/2_sign_transaction.rs @@ -29,6 +29,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["STRONGHOLD_PASSWORD"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Setup Stronghold secret_manager let secret_manager = StrongholdSecretManager::builder() .password(std::env::var("STRONGHOLD_PASSWORD").unwrap()) diff --git a/sdk/examples/wallet/offline_signing/3_send_transaction.rs b/sdk/examples/wallet/offline_signing/3_send_transaction.rs index 974bfcbcd1..210eaf8066 100644 --- a/sdk/examples/wallet/offline_signing/3_send_transaction.rs +++ b/sdk/examples/wallet/offline_signing/3_send_transaction.rs @@ -27,6 +27,11 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + #[allow(clippy::single_element_loop)] + for var in ["EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + // Create the wallet with the secret_manager and client options let wallet = Wallet::builder() .with_storage_path(ONLINE_WALLET_DB_PATH) diff --git a/sdk/examples/wallet/participation.rs b/sdk/examples/wallet/participation.rs index 2b19927aa6..5e2df5b62d 100644 --- a/sdk/examples/wallet/participation.rs +++ b/sdk/examples/wallet/participation.rs @@ -41,6 +41,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["WALLET_DB_PATH", "STRONGHOLD_PASSWORD", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = Wallet::builder() .with_storage_path(&std::env::var("WALLET_DB_PATH").unwrap()) .finish() diff --git a/sdk/examples/wallet/recover_accounts.rs b/sdk/examples/wallet/recover_accounts.rs index 61a05dfb13..030f6347df 100644 --- a/sdk/examples/wallet/recover_accounts.rs +++ b/sdk/examples/wallet/recover_accounts.rs @@ -23,6 +23,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "WALLET_DB_PATH"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let client_options = ClientOptions::new().with_node(&std::env::var("NODE_URL").unwrap())?; let secret_manager = MnemonicSecretManager::try_from_mnemonic(std::env::var("MNEMONIC").unwrap())?; diff --git a/sdk/examples/wallet/spammer.rs b/sdk/examples/wallet/spammer.rs index 997a21c6cf..7214da5c21 100644 --- a/sdk/examples/wallet/spammer.rs +++ b/sdk/examples/wallet/spammer.rs @@ -32,6 +32,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "EXPLORER_URL", "FAUCET_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let num_simultaneous_txs = NUM_SIMULTANEOUS_TXS.min(num_cpus::get()); println!("Spammer set up to issue {num_simultaneous_txs} transactions simultaneously."); diff --git a/sdk/examples/wallet/split_funds.rs b/sdk/examples/wallet/split_funds.rs index 963ca287cf..76aac23e30 100644 --- a/sdk/examples/wallet/split_funds.rs +++ b/sdk/examples/wallet/split_funds.rs @@ -30,6 +30,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "WALLET_DB_PATH", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let client_options = ClientOptions::new().with_node(&std::env::var("NODE_URL").unwrap())?; let secret_manager = MnemonicSecretManager::try_from_mnemonic(std::env::var("MNEMONIC").unwrap())?; diff --git a/sdk/examples/wallet/storage.rs b/sdk/examples/wallet/storage.rs index 3ea3fe36e5..4694bdd11f 100644 --- a/sdk/examples/wallet/storage.rs +++ b/sdk/examples/wallet/storage.rs @@ -24,6 +24,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "WALLET_DB_PATH"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let secret_manager = MnemonicSecretManager::try_from_mnemonic(std::env::var("MNEMONIC").unwrap())?; let client_options = ClientOptions::new().with_node(&std::env::var("NODE_URL").unwrap())?; diff --git a/sdk/examples/wallet/wallet.rs b/sdk/examples/wallet/wallet.rs index 0e2dcdb191..608f4b8ea0 100644 --- a/sdk/examples/wallet/wallet.rs +++ b/sdk/examples/wallet/wallet.rs @@ -37,6 +37,10 @@ async fn main() -> Result<()> { // This example uses secrets in environment variables for simplicity which should not be done in production. dotenvy::dotenv().ok(); + for var in ["NODE_URL", "MNEMONIC", "WALLET_DB_PATH", "EXPLORER_URL"] { + std::env::var(var).unwrap_or_else(|_| panic!(".env variable '{var}' is undefined, see .env.example")); + } + let wallet = create_wallet().await?; let account = wallet.get_or_create_account("Alice").await?; From d2daecd341449351bdc058434dd7e16a4828f5ce Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Thu, 30 Nov 2023 10:22:12 +0100 Subject: [PATCH 3/3] Bump dependencies (#1716) * Bump dependencies * Bump CLI wasm-bindgen-cli --- .github/workflows/bindings-wasm-publish.yml | 2 +- .github/workflows/bindings-wasm.yml | 2 +- Cargo.lock | 400 ++++++++++++-------- bindings/core/Cargo.toml | 8 +- bindings/nodejs/Cargo.toml | 4 +- bindings/python/Cargo.toml | 4 +- bindings/wasm/Cargo.toml | 12 +- cli/Cargo.toml | 8 +- sdk/Cargo.toml | 22 +- 9 files changed, 267 insertions(+), 195 deletions(-) diff --git a/.github/workflows/bindings-wasm-publish.yml b/.github/workflows/bindings-wasm-publish.yml index c2552a6630..8640c86540 100644 --- a/.github/workflows/bindings-wasm-publish.yml +++ b/.github/workflows/bindings-wasm-publish.yml @@ -25,7 +25,7 @@ jobs: - name: Install wasm-bindgen-cli uses: jetli/wasm-bindgen-action@v0.2.0 with: - version: "0.2.87" + version: "0.2.89" - name: Set up Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/bindings-wasm.yml b/.github/workflows/bindings-wasm.yml index 92686ebacf..4847138f3b 100644 --- a/.github/workflows/bindings-wasm.yml +++ b/.github/workflows/bindings-wasm.yml @@ -65,7 +65,7 @@ jobs: - name: Install wasm-bindgen-cli uses: jetli/wasm-bindgen-action@v0.2.0 with: - version: "0.2.87" + version: "0.2.89" - name: Set Up Node.js ${{ matrix.node }} and Yarn Cache uses: actions/setup-node@v3 diff --git a/Cargo.lock b/Cargo.lock index 14b616f85d..1159daae1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -159,7 +159,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -274,7 +274,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -468,9 +468,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.7" +version = "4.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" dependencies = [ "clap_builder", "clap_derive", @@ -478,9 +478,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" dependencies = [ "anstream", "anstyle", @@ -497,7 +497,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -651,9 +651,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -712,20 +712,20 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "der" @@ -864,9 +864,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "ecdsa" -version = "0.16.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", "digest 0.10.7", @@ -895,7 +895,7 @@ checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ "curve25519-dalek 4.1.1", "ed25519", - "hashbrown 0.14.2", + "hashbrown", "hex", "rand_core 0.6.4", "serde", @@ -911,9 +911,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" -version = "0.13.6" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", @@ -979,12 +979,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1043,9 +1043,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "field-offset" @@ -1088,9 +1088,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1158,7 +1158,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1204,9 +1204,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "js-sys", @@ -1239,9 +1239,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -1302,9 +1302,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -1312,7 +1312,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap", "slab", "tokio", "tokio-util", @@ -1321,15 +1321,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", @@ -1395,9 +1389,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1473,9 +1467,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1512,22 +1506,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown", ] [[package]] @@ -1631,7 +1615,7 @@ dependencies = [ "getset", "gloo-storage", "gloo-timers", - "hashbrown 0.14.2", + "hashbrown", "heck", "hex", "instant", @@ -1771,9 +1755,9 @@ checksum = "d101775d2bc8f99f4ac18bf29b9ed70c0dd138b9a1e88d7b80179470cbbe8bd2" [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" dependencies = [ "either", ] @@ -1795,18 +1779,18 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ "cfg-if", "ecdsa", @@ -1867,9 +1851,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -1891,6 +1875,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall", +] + [[package]] name = "librocksdb-sys" version = "0.11.0+8.1.1" @@ -1931,9 +1926,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lock_api" @@ -2182,7 +2177,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567693dd2f9a4339cb0a54adfcc0cb431c0ac88b2e46c6ddfb5f5d11a1cc4f" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -2191,9 +2186,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec", "bitvec", @@ -2205,11 +2200,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -2233,7 +2228,7 @@ checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall", "smallvec", "windows-targets 0.48.5", ] @@ -2271,9 +2266,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pharos" @@ -2315,9 +2310,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" -version = "3.1.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "poly1305" @@ -2382,7 +2377,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2404,7 +2399,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", ] [[package]] @@ -2433,9 +2437,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -2486,7 +2490,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2498,7 +2502,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2562,15 +2566,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -2582,12 +2577,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] @@ -2672,9 +2667,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" dependencies = [ "cc", "getrandom", @@ -2756,9 +2751,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" dependencies = [ "bitflags 2.4.1", "errno", @@ -2769,9 +2764,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.8" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", "ring", @@ -2793,9 +2788,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64 0.21.5", ] @@ -2842,7 +2837,7 @@ checksum = "5a32af5427251d2e4be14fc151eabe18abb4a7aad5efee7044da9f096c906a43" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2966,29 +2961,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -2997,13 +2992,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3064,9 +3059,9 @@ checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -3083,9 +3078,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snafu" @@ -3140,9 +3135,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -3243,9 +3238,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -3313,7 +3308,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3382,9 +3377,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.33.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ "backtrace", "bytes", @@ -3399,13 +3394,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3444,7 +3439,18 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.2", + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap", "toml_datetime", "winnow", ] @@ -3474,7 +3480,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3598,9 +3604,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -3659,9 +3665,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "serde", @@ -3671,24 +3677,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if", "js-sys", @@ -3698,9 +3704,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3708,22 +3714,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "wasm-logger" @@ -3738,9 +3744,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -3748,9 +3754,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "widestring" @@ -3832,6 +3838,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -3862,6 +3877,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -3874,6 +3904,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -3892,6 +3928,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -3910,6 +3952,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -3928,6 +3976,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -3946,6 +4000,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -3958,6 +4018,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -3976,11 +4042,17 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" -version = "0.5.17" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ "memchr", ] @@ -4043,29 +4115,29 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zerocopy" -version = "0.7.18" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7d7c7970ca2215b8c1ccf4d4f354c4733201dfaaba72d44ae5b37472e4901" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.18" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b27b1bb92570f989aac0ab7e9cbfbacdd65973f7ee920d9f0e71ebac878fd0b" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "serde", "zeroize_derive", @@ -4079,5 +4151,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] diff --git a/bindings/core/Cargo.toml b/bindings/core/Cargo.toml index 1937dfc8ae..9b889278cb 100644 --- a/bindings/core/Cargo.toml +++ b/bindings/core/Cargo.toml @@ -26,11 +26,11 @@ log = { version = "0.4.20", default-features = false } packable = { version = "0.8.3", default-features = false } prefix-hex = { version = "0.7.1", default-features = false } primitive-types = { version = "0.12.2", default-features = false } -serde = { version = "1.0.190", default-features = false } -serde_json = { version = "1.0.107", default-features = false } +serde = { version = "1.0.193", default-features = false } +serde_json = { version = "1.0.108", default-features = false } thiserror = { version = "1.0.50", default-features = false } -tokio = { version = "1.33.0", default-features = false } -zeroize = { version = "1.6.0", default-features = false } +tokio = { version = "1.34.0", default-features = false } +zeroize = { version = "1.7.0", default-features = false } [dev-dependencies] pretty_assertions = { version = "1.4.0", default-features = false, features = [ diff --git a/bindings/nodejs/Cargo.toml b/bindings/nodejs/Cargo.toml index 1f3e6d8dd0..945e7444d6 100644 --- a/bindings/nodejs/Cargo.toml +++ b/bindings/nodejs/Cargo.toml @@ -36,8 +36,8 @@ neon = { version = "0.10.1", default-features = false, features = [ "promise-api", ] } once_cell = { version = "1.18.0", default-features = false } -serde_json = { version = "1.0.107", default-features = false } -tokio = { version = "1.33.0", default-features = false } +serde_json = { version = "1.0.108", default-features = false } +tokio = { version = "1.34.0", default-features = false } [profile.production] codegen-units = 1 diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index eae8434b01..457fad6ca7 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -33,5 +33,5 @@ pyo3 = { version = "0.20.0", default-features = false, features = [ "macros", "extension-module", ] } -serde_json = { version = "1.0.107", default-features = false } -tokio = { version = "1.33.0", default-features = false } +serde_json = { version = "1.0.108", default-features = false } +tokio = { version = "1.34.0", default-features = false } diff --git a/bindings/wasm/Cargo.toml b/bindings/wasm/Cargo.toml index df3eb5d3ca..70d292358f 100644 --- a/bindings/wasm/Cargo.toml +++ b/bindings/wasm/Cargo.toml @@ -24,20 +24,20 @@ iota-sdk-bindings-core = { path = "../core", default-features = false, features ] } console_error_panic_hook = { version = "0.1.7", default-features = false } -js-sys = { version = "0.3.64", default-features = false, features = [] } +js-sys = { version = "0.3.66", default-features = false, features = [] } log = { version = "0.4.20", default-features = false } -serde_json = { version = "1.0.107", default-features = false } -tokio = { version = "1.33.0", default-features = false, features = ["sync"] } -wasm-bindgen = { version = "0.2.87", default-features = false, features = [ +serde_json = { version = "1.0.108", default-features = false } +tokio = { version = "1.34.0", default-features = false, features = ["sync"] } +wasm-bindgen = { version = "0.2.89", default-features = false, features = [ "spans", "std", "serde-serialize", ] } -wasm-bindgen-futures = { version = "0.4.37", default-features = false } +wasm-bindgen-futures = { version = "0.4.39", default-features = false } wasm-logger = { version = "0.2.0", default-features = false } [target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies] -getrandom = { version = "0.2.10", default-features = false, features = ["js"] } +getrandom = { version = "0.2.11", default-features = false, features = ["js"] } instant = { version = "0.1.12", default-features = false, features = [ "wasm-bindgen", ] } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e27642ec2b..abb61addb9 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -25,7 +25,7 @@ iota-sdk = { path = "../sdk", default-features = false, features = [ ] } chrono = { version = "0.4.31", default-features = false, features = ["std"] } -clap = { version = "4.4.7", default-features = false, features = [ +clap = { version = "4.4.10", default-features = false, features = [ "std", "color", "help", @@ -45,10 +45,10 @@ humantime = { version = "2.1.0", default-features = false } log = { version = "0.4.20", default-features = false } prefix-hex = { version = "0.7.1", default-features = false, features = ["std"] } rustyline = { version = "12.0.0", features = ["derive"] } -serde_json = { version = "1.0.107", default-features = false } +serde_json = { version = "1.0.108", default-features = false } thiserror = { version = "1.0.50", default-features = false } -tokio = { version = "1.33.0", default-features = false, features = ["fs"] } -zeroize = { version = "1.6.0", default-features = false } +tokio = { version = "1.34.0", default-features = false, features = ["fs"] } +zeroize = { version = "1.7.0", default-features = false } [target.'cfg(target_os = "windows")'.dependencies] winapi = { version = "0.3.9", default-features = false } diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index 5e63421305..187ac78dc0 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -29,7 +29,7 @@ derive_more = { version = "0.99.17", default-features = false, features = [ "display", ] } getset = { version = "0.1.2", default-features = false } -hashbrown = { version = "0.14.2", default-features = false, features = [ +hashbrown = { version = "0.14.3", default-features = false, features = [ "ahash", "inline-more", ] } @@ -41,7 +41,7 @@ iota-crypto = { version = "0.23.0", default-features = false, features = [ "ternary_encoding", ] } iterator-sorted = { version = "0.1.0", default-features = false } -itertools = { version = "0.11.0", default-features = false, features = [ +itertools = { version = "0.12.0", default-features = false, features = [ "use_alloc", ] } packable = { version = "0.8.3", default-features = false, features = [ @@ -51,8 +51,8 @@ prefix-hex = { version = "0.7.1", default-features = false, features = [ "primitive-types", ] } primitive-types = { version = "0.12.2", default-features = false } -serde = { version = "1.0.190", default-features = false, features = ["derive"] } -serde_json = { version = "1.0.107", default-features = false, features = [ +serde = { version = "1.0.193", default-features = false, features = ["derive"] } +serde_json = { version = "1.0.108", default-features = false, features = [ "alloc", ] } @@ -86,21 +86,21 @@ rocksdb = { version = "0.21.0", default-features = false, features = [ rumqttc = { version = "0.23.0", default-features = false, features = [ "websocket", ], optional = true } -serde_repr = { version = "0.1.16", default-features = false, optional = true } +serde_repr = { version = "0.1.17", default-features = false, optional = true } thiserror = { version = "1.0.50", default-features = false, optional = true } time = { version = "0.3.30", default-features = false, features = [ "serde", "macros", ], optional = true } -url = { version = "2.4.1", default-features = false, features = [ +url = { version = "2.5.0", default-features = false, features = [ "serde", ], optional = true } -zeroize = { version = "1.6.0", default-features = false, features = [ +zeroize = { version = "1.7.0", default-features = false, features = [ "zeroize_derive", ], optional = true } [target.'cfg(not(target_family = "wasm"))'.dependencies] -tokio = { version = "1.33.0", default-features = false, features = [ +tokio = { version = "1.34.0", default-features = false, features = [ "macros", "rt-multi-thread", "time", @@ -116,13 +116,13 @@ instant = { version = "0.1.12", default-features = false, features = [ "wasm-bindgen", ], optional = true } lazy_static = { version = "1.4.0", default-features = false } -tokio = { version = "1.33.0", default-features = false, features = [ +tokio = { version = "1.34.0", default-features = false, features = [ "macros", "rt", "time", "sync", ], optional = true } -wasm-bindgen-futures = { version = "0.4.37", default-features = false, optional = true } +wasm-bindgen-futures = { version = "0.4.39", default-features = false, optional = true } [dev-dependencies] iota-sdk = { path = ".", default-features = false, features = ["rand"] } @@ -132,7 +132,7 @@ pretty_assertions = { version = "1.4.0", default-features = false, features = [ dotenvy = { version = "0.15.7", default-features = false } fern-logger = { version = "0.5.0", default-features = false } -tokio = { version = "1.33.0", default-features = false, features = [ +tokio = { version = "1.34.0", default-features = false, features = [ "macros", "rt", "rt-multi-thread",