From 4daa3ca7e19e551d1ba0dd5d2978ab3d4a36f46d Mon Sep 17 00:00:00 2001 From: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com> Date: Tue, 13 Aug 2024 17:44:26 +0200 Subject: [PATCH] feat!(iota): remove MultiSigCombinePartialSigLegacy (#1767) * feat!(iota): remove MultiSigCombinePartialSigLegacy * Remove unused imports --------- Co-authored-by: Thibault Martinez --- crates/iota/src/keytool.rs | 43 -------------------------------------- 1 file changed, 43 deletions(-) diff --git a/crates/iota/src/keytool.rs b/crates/iota/src/keytool.rs index f0166cefeb4..6339952b231 100644 --- a/crates/iota/src/keytool.rs +++ b/crates/iota/src/keytool.rs @@ -39,7 +39,6 @@ use iota_types::{ }, error::IotaResult, multisig::{MultiSig, MultiSigPublicKey, ThresholdUnit, WeightUnit}, - multisig_legacy::{MultiSigLegacy, MultiSigPublicKeyLegacy}, signature::{AuthenticatorTrait, GenericSignature, VerifyParams}, transaction::{TransactionData, TransactionDataAPI}, }; @@ -180,16 +179,6 @@ pub enum KeyToolCommand { #[clap(long)] threshold: ThresholdUnit, }, - MultiSigCombinePartialSigLegacy { - #[clap(long, num_args(1..))] - sigs: Vec, - #[clap(long, num_args(1..))] - pks: Vec, - #[clap(long, num_args(1..))] - weights: Vec, - #[clap(long)] - threshold: ThresholdUnit, - }, /// Read the content at the provided file path. The accepted format can be /// [enum IotaKeyPair] (Base64 encoded of 33-byte `flag || privkey`) or @@ -384,14 +373,6 @@ pub struct MultiSigCombinePartialSig { multisig_serialized: String, } -#[derive(Serialize)] -#[serde(rename_all = "camelCase")] -pub struct MultiSigCombinePartialSigLegacyOutput { - multisig_address: IotaAddress, - multisig_legacy_parsed: GenericSignature, - multisig_legacy_serialized: String, -} - #[derive(Serialize)] #[serde(rename_all = "camelCase")] pub struct MultiSigOutput { @@ -476,7 +457,6 @@ pub enum CommandOutput { LoadKeypair(KeypairData), MultiSigAddress(MultiSigAddress), MultiSigCombinePartialSig(MultiSigCombinePartialSig), - MultiSigCombinePartialSigLegacy(MultiSigCombinePartialSigLegacyOutput), PrivateKeyBase64(PrivateKeyBase64), Show(Key), Sign(SignData), @@ -751,29 +731,6 @@ impl KeyToolCommand { }) } - KeyToolCommand::MultiSigCombinePartialSigLegacy { - sigs, - pks, - weights, - threshold, - } => { - let multisig_pk_legacy = - MultiSigPublicKeyLegacy::new(pks.clone(), weights.clone(), threshold)?; - let multisig_pk = MultiSigPublicKey::new(pks, weights, threshold)?; - let address: IotaAddress = (&multisig_pk).into(); - let multisig = MultiSigLegacy::combine(sigs, multisig_pk_legacy)?; - let generic_sig: GenericSignature = multisig.into(); - let multisig_legacy_serialized = generic_sig.encode_base64(); - - CommandOutput::MultiSigCombinePartialSigLegacy( - MultiSigCombinePartialSigLegacyOutput { - multisig_address: address, - multisig_legacy_parsed: generic_sig, - multisig_legacy_serialized, - }, - ) - } - KeyToolCommand::Show { file } => { let res = read_keypair_from_file(&file); match res {