diff --git a/cmd/soroban-cli/src/commands/tx/args.rs b/cmd/soroban-cli/src/commands/tx/args.rs index 8c0ebb387..5d2099d26 100644 --- a/cmd/soroban-cli/src/commands/tx/args.rs +++ b/cmd/soroban-cli/src/commands/tx/args.rs @@ -130,7 +130,7 @@ impl Args { op_source: Option<&address::Address>, ) -> Result { let source_account = op_source - .map(|a| self.reslove_muxed_address(a)) + .map(|a| self.resolve_muxed_address(a)) .transpose()?; let op = xdr::Operation { source_account, diff --git a/cmd/soroban-cli/src/commands/tx/new/account_merge.rs b/cmd/soroban-cli/src/commands/tx/new/account_merge.rs index e52e1fc42..c087c6b13 100644 --- a/cmd/soroban-cli/src/commands/tx/new/account_merge.rs +++ b/cmd/soroban-cli/src/commands/tx/new/account_merge.rs @@ -22,7 +22,7 @@ impl TryFrom<&Cmd> for xdr::OperationBody { type Error = tx::args::Error; fn try_from(cmd: &Cmd) -> Result { Ok(xdr::OperationBody::AccountMerge( - cmd.tx.reslove_muxed_address(&cmd.op.account)?, + cmd.tx.resolve_muxed_address(&cmd.op.account)?, )) } } diff --git a/cmd/soroban-cli/src/commands/tx/new/create_account.rs b/cmd/soroban-cli/src/commands/tx/new/create_account.rs index d062a07d5..13bcac4d4 100644 --- a/cmd/soroban-cli/src/commands/tx/new/create_account.rs +++ b/cmd/soroban-cli/src/commands/tx/new/create_account.rs @@ -25,7 +25,7 @@ impl TryFrom<&Cmd> for xdr::OperationBody { type Error = tx::args::Error; fn try_from(cmd: &Cmd) -> Result { Ok(xdr::OperationBody::CreateAccount(xdr::CreateAccountOp { - destination: cmd.tx.reslove_account_id(&cmd.op.destination)?, + destination: cmd.tx.resolve_account_id(&cmd.op.destination)?, starting_balance: cmd.op.starting_balance.into(), })) } diff --git a/cmd/soroban-cli/src/commands/tx/new/payment.rs b/cmd/soroban-cli/src/commands/tx/new/payment.rs index 4b472e141..3599d7010 100644 --- a/cmd/soroban-cli/src/commands/tx/new/payment.rs +++ b/cmd/soroban-cli/src/commands/tx/new/payment.rs @@ -28,7 +28,7 @@ impl TryFrom<&Cmd> for xdr::OperationBody { type Error = tx::args::Error; fn try_from(cmd: &Cmd) -> Result { Ok(xdr::OperationBody::Payment(xdr::PaymentOp { - destination: cmd.tx.reslove_muxed_address(&cmd.op.destination)?, + destination: cmd.tx.resolve_muxed_address(&cmd.op.destination)?, asset: cmd.op.asset.clone().into(), amount: cmd.op.amount.into(), })) diff --git a/cmd/soroban-cli/src/commands/tx/new/set_options.rs b/cmd/soroban-cli/src/commands/tx/new/set_options.rs index 42a0767b5..cf38bf574 100644 --- a/cmd/soroban-cli/src/commands/tx/new/set_options.rs +++ b/cmd/soroban-cli/src/commands/tx/new/set_options.rs @@ -120,7 +120,7 @@ impl TryFrom<&Cmd> for xdr::OperationBody { let inflation_dest: Option = cmd .inflation_dest .as_ref() - .map(|dest| tx.reslove_account_id(dest)) + .map(|dest| tx.resolve_account_id(dest)) .transpose()?; Ok(xdr::OperationBody::SetOptions(xdr::SetOptionsOp { inflation_dest, diff --git a/cmd/soroban-cli/src/commands/tx/new/set_trustline_flags.rs b/cmd/soroban-cli/src/commands/tx/new/set_trustline_flags.rs index 3e6465115..7a175915e 100644 --- a/cmd/soroban-cli/src/commands/tx/new/set_trustline_flags.rs +++ b/cmd/soroban-cli/src/commands/tx/new/set_trustline_flags.rs @@ -68,7 +68,7 @@ impl TryFrom<&Cmd> for xdr::OperationBody { Ok(xdr::OperationBody::SetTrustLineFlags( xdr::SetTrustLineFlagsOp { - trustor: cmd.tx.reslove_account_id(&cmd.op.trustor)?, + trustor: cmd.tx.resolve_account_id(&cmd.op.trustor)?, asset: cmd.op.asset.clone().into(), clear_flags, set_flags, diff --git a/cmd/soroban-cli/src/config/address.rs b/cmd/soroban-cli/src/config/address.rs index ac2adc762..6975d9e53 100644 --- a/cmd/soroban-cli/src/config/address.rs +++ b/cmd/soroban-cli/src/config/address.rs @@ -54,7 +54,7 @@ impl Address { pub fn resolve_secret(&self, locator: &locator::Args) -> Result { match &self { - Address::AliasOrSecret(alias) => Ok(locator.get_private_key(alias)?), + Address::AliasOrSecret(alias) => Ok(locator.get_secret_key(alias)?), Address::MuxedAccount(muxed_account) => Err(Error::CannotSign(muxed_account.clone())), } } diff --git a/cmd/soroban-cli/src/config/locator.rs b/cmd/soroban-cli/src/config/locator.rs index e769f1314..4ab698111 100644 --- a/cmd/soroban-cli/src/config/locator.rs +++ b/cmd/soroban-cli/src/config/locator.rs @@ -180,7 +180,7 @@ impl Args { } pub fn write_key(&self, name: &str, key: &Key) -> Result<(), Error> { - KeyType::Identity.write(name, public_key, &self.config_dir()?) + KeyType::Identity.write(name, key, &self.config_dir()?) } pub fn write_network(&self, name: &str, network: &Network) -> Result<(), Error> { diff --git a/cmd/soroban-cli/src/config/sign_with.rs b/cmd/soroban-cli/src/config/sign_with.rs index c9d164914..baac7a528 100644 --- a/cmd/soroban-cli/src/config/sign_with.rs +++ b/cmd/soroban-cli/src/config/sign_with.rs @@ -64,7 +64,7 @@ impl Args { } } else { let key_or_name = self.sign_with_key.as_deref().ok_or(Error::NoSignWithKey)?; - let secret = locator.get_private_key(key_or_name)?; + let secret = locator.get_secret_key(key_or_name)?; secret.signer(self.hd_path, print)? }; Ok(signer.sign_tx_env(tx, network)?)