Skip to content
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* Fixed a race condition in `pruneIrrelevantBlocks` that could delete the current block header when multiple tabs share IndexedDB, causing sync to panic ([#1650](https://github.com/0xMiden/miden-client/pull/1650)).
* Fixed a race condition where concurrent sync operations could cause sync height to go backwards, leading to block header deletion and subsequent panics ([#1650](https://github.com/0xMiden/miden-client/pull/1650)).
* Changed `get_current_partial_mmr` to return a `StoreError::BlockHeaderNotFound` error instead of panicking when the block header is missing ([#1650](https://github.com/0xMiden/miden-client/pull/1650)).
* Added `CliClient` wrapper and `CliConfig::from_system()` to allow creating a CLI-configured client programmatically ([#1642](https://github.com/0xMiden/miden-client/pull/1642)).

## 0.12.6 (2026-01-08)

Expand Down
4 changes: 2 additions & 2 deletions bin/miden-cli/src/commands/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use miden_client::{Client, PrettyPrint, ZERO};

use crate::config::CliConfig;
use crate::errors::CliError;
use crate::utils::{load_config_file, load_faucet_details_map, parse_account_id};
use crate::utils::{load_faucet_details_map, parse_account_id};
use crate::{client_binary_name, create_dynamic_table};

pub const DEFAULT_ACCOUNT_ID_KEY: &str = "default_account_id";
Expand Down Expand Up @@ -47,7 +47,7 @@ pub struct AccountCmd {

impl AccountCmd {
pub async fn execute<AUTH>(&self, mut client: Client<AUTH>) -> Result<(), CliError> {
let (cli_config, _) = load_config_file()?;
let cli_config = CliConfig::from_system()?;
match self {
AccountCmd {
list: false,
Expand Down
7 changes: 4 additions & 3 deletions bin/miden-cli/src/commands/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ use miden_client::Client;
use miden_client::address::{Address, AddressInterface, NetworkId, RoutingParameters};
use miden_client::note::{NoteExecutionMode, NoteTag};

use crate::config::CliConfig;
use crate::errors::CliError;
use crate::utils::parse_account_id;
use crate::{Parser, Subcommand, create_dynamic_table, load_config_file};
use crate::{Parser, Subcommand, create_dynamic_table};

#[derive(Debug, Clone)]
pub enum CliAddressInterface {
Expand Down Expand Up @@ -67,7 +68,7 @@ impl AddressCmd {
pub async fn execute<AUTH>(&self, client: Client<AUTH>) -> Result<(), CliError> {
match &self.command {
Some(AddressSubCommand::List { account_id: Some(account_id) }) => {
let (cli_config, _) = load_config_file()?;
let cli_config = CliConfig::from_system()?;
let network_id = cli_config.rpc.endpoint.0.to_network_id();
list_account_addresses(client, account_id, network_id).await?;
},
Expand All @@ -79,7 +80,7 @@ impl AddressCmd {
},
_ => {
// List all addresses as default
let (cli_config, _) = load_config_file()?;
let cli_config = CliConfig::from_system()?;
let network_id = cli_config.rpc.endpoint.0.to_network_id();
list_all_addresses(client, network_id).await?;
},
Expand Down
11 changes: 5 additions & 6 deletions bin/miden-cli/src/commands/new_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use miden_client::account::component::{
};
use miden_client::account::{Account, AccountBuilder, AccountStorageMode, AccountType};
use miden_client::auth::{AuthRpoFalcon512, AuthSecretKey, TransactionAuthenticator};
use miden_client::keystore::FilesystemKeyStore;
use miden_client::transaction::TransactionRequestBuilder;
use miden_client::utils::Deserializable;
use miden_client::vm::{Package, SectionId};
Expand All @@ -26,7 +25,7 @@ use tracing::{debug, warn};
use crate::commands::account::set_default_account_if_unset;
use crate::config::CliConfig;
use crate::errors::CliError;
use crate::{client_binary_name, load_config_file};
use crate::{CliKeyStore, client_binary_name};

// CLI TYPES
// ================================================================================================
Expand Down Expand Up @@ -103,7 +102,7 @@ impl NewWalletCmd {
pub async fn execute<AUTH: TransactionAuthenticator + Sync + 'static>(
&self,
mut client: Client<AUTH>,
keystore: FilesystemKeyStore,
keystore: CliKeyStore,
) -> Result<(), CliError> {
let package_paths: Vec<PathBuf> = [PathBuf::from("basic-wallet")]
.into_iter()
Expand Down Expand Up @@ -198,7 +197,7 @@ impl NewAccountCmd {
pub async fn execute<AUTH: TransactionAuthenticator + Sync + 'static>(
&self,
mut client: Client<AUTH>,
keystore: FilesystemKeyStore,
keystore: CliKeyStore,
) -> Result<(), CliError> {
let new_account = create_client_account(
&mut client,
Expand Down Expand Up @@ -349,7 +348,7 @@ fn separate_auth_components(
/// If no auth component is detected in the packages, a Falcon-based auth component will be added.
async fn create_client_account<AUTH: TransactionAuthenticator + Sync + 'static>(
client: &mut Client<AUTH>,
keystore: &FilesystemKeyStore,
keystore: &CliKeyStore,
account_type: AccountType,
storage_mode: AccountStorageMode,
package_paths: &[PathBuf],
Expand All @@ -365,7 +364,7 @@ async fn create_client_account<AUTH: TransactionAuthenticator + Sync + 'static>(

// Load the component templates and initialization storage data.

let (cli_config, _) = load_config_file()?;
let cli_config = CliConfig::from_system()?;
debug!("Loading packages...");
let packages = load_packages(&cli_config, package_paths)?;
debug!("Loaded {} packages", packages.len());
Expand Down
4 changes: 2 additions & 2 deletions bin/miden-cli/src/commands/new_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ use miden_client::transaction::{
use miden_client::{Client, RemoteTransactionProver};
use tracing::info;

use crate::config::CliConfig;
use crate::create_dynamic_table;
use crate::errors::CliError;
use crate::utils::{
SHARED_TOKEN_DOCUMENTATION,
get_input_acc_id_by_prefix_or_default,
load_config_file,
load_faucet_details_map,
parse_account_id,
};
Expand Down Expand Up @@ -412,7 +412,7 @@ async fn execute_transaction<AUTH: TransactionAuthenticator + Sync + 'static>(
println!("Proving transaction...");

let prover = if delegated_proving {
let (cli_config, _) = load_config_file()?;
let cli_config = CliConfig::from_system()?;
let remote_prover_endpoint =
cli_config.remote_prover_endpoint.as_ref().ok_or(CliError::Config(
"Remote prover endpoint".to_string().into(),
Expand Down
Loading
Loading