Fix clippy, update old dependencies

This commit is contained in:
Luke Parker
2025-08-25 09:17:29 -04:00
parent c24b694fb2
commit 9dddfd91c8
93 changed files with 637 additions and 663 deletions

View File

@@ -1,5 +1,5 @@
use ciphersuite::{group::GroupEncoding, Ciphersuite, Secp256k1};
use frost::ThresholdKeys;
use ciphersuite::{group::GroupEncoding, Ciphersuite};
use dkg::{ThresholdKeys, Curves, Secp256k1};
use crate::{primitives::x_coord_to_even_point, scan::scanner};
@@ -9,20 +9,26 @@ impl key_gen::KeyGenParams for KeyGenParams {
type ExternalNetworkCiphersuite = Secp256k1;
fn tweak_keys(keys: &mut ThresholdKeys<Self::ExternalNetworkCiphersuite>) {
*keys = bitcoin_serai::wallet::tweak_keys(keys);
fn tweak_keys(
keys: &mut ThresholdKeys<<Self::ExternalNetworkCiphersuite as Curves>::ToweringCurve>,
) {
*keys = bitcoin_serai::wallet::tweak_keys(keys.clone());
// Also create a scanner to assert these keys, and all expected paths, are usable
scanner(keys.group_key());
}
fn encode_key(key: <Self::ExternalNetworkCiphersuite as Ciphersuite>::G) -> Vec<u8> {
fn encode_key(
key: <<Self::ExternalNetworkCiphersuite as Curves>::ToweringCurve as Ciphersuite>::G,
) -> Vec<u8> {
let key = key.to_bytes();
let key: &[u8] = key.as_ref();
// Skip the parity encoding as we know this key is even
key[1 ..].to_vec()
}
fn decode_key(key: &[u8]) -> Option<<Self::ExternalNetworkCiphersuite as Ciphersuite>::G> {
fn decode_key(
key: &[u8],
) -> Option<<<Self::ExternalNetworkCiphersuite as Curves>::ToweringCurve as Ciphersuite>::G> {
x_coord_to_even_point(key)
}
}

View File

@@ -1,7 +1,8 @@
use core::fmt;
use std::collections::HashMap;
use ciphersuite::{Ciphersuite, Secp256k1};
use ciphersuite::Ciphersuite;
use ciphersuite_kp256::Secp256k1;
use bitcoin_serai::bitcoin::block::{Header, Block as BBlock};

View File

@@ -1,4 +1,5 @@
use ciphersuite::{Ciphersuite, Secp256k1};
use ciphersuite::Ciphersuite;
use ciphersuite_kp256::Secp256k1;
use bitcoin_serai::bitcoin::key::{Parity, XOnlyPublicKey};

View File

@@ -1,6 +1,7 @@
use std::io;
use ciphersuite::{Ciphersuite, Secp256k1};
use ciphersuite::Ciphersuite;
use ciphersuite_kp256::Secp256k1;
use bitcoin_serai::{
bitcoin::{

View File

@@ -2,7 +2,7 @@ use std::io;
use rand_core::{RngCore, CryptoRng};
use ciphersuite::Secp256k1;
use ciphersuite_kp256::Secp256k1;
use frost::{dkg::ThresholdKeys, sign::PreprocessMachine};
use bitcoin_serai::{

View File

@@ -1,6 +1,7 @@
use std::{sync::LazyLock, collections::HashMap};
use ciphersuite::{Ciphersuite, Secp256k1};
use ciphersuite::Ciphersuite;
use ciphersuite_kp256::Secp256k1;
use bitcoin_serai::{
bitcoin::{

View File

@@ -1,6 +1,7 @@
use core::future::Future;
use ciphersuite::{Ciphersuite, Secp256k1};
use ciphersuite::Ciphersuite;
use ciphersuite_kp256::Secp256k1;
use bitcoin_serai::{
bitcoin::ScriptBuf,