diff --git a/cmd/soroban-cli/src/commands/keys/address.rs b/cmd/soroban-cli/src/commands/keys/address.rs index aa5a2940d..1a7ab21cd 100644 --- a/cmd/soroban-cli/src/commands/keys/address.rs +++ b/cmd/soroban-cli/src/commands/keys/address.rs @@ -1,6 +1,9 @@ use clap::arg; -use crate::commands::config::{address, locator, secret}; +use crate::{ + commands::config::{address, locator, secret}, + config::UnresolvedMuxedAccount, +}; #[derive(thiserror::Error, Debug)] pub enum Error { @@ -47,6 +50,11 @@ impl Cmd { pub fn public_key(&self) -> Result { if let Ok(key) = stellar_strkey::ed25519::PublicKey::from_string(&self.name) { Ok(key) + } else if let Ok(unresolved) = self.name.parse::() { + let muxed = unresolved.resolve_muxed_account(&self.locator, self.hd_path)?; + Ok(stellar_strkey::ed25519::PublicKey::from_string( + &muxed.to_string(), + )?) } else { Ok(stellar_strkey::ed25519::PublicKey::from_payload( self.private_key()?.verifying_key().as_bytes(),