mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Merge branch 'next' into next-polkadot-sdk
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serai_abi::primitives::NetworkId;
|
||||
use zeroize::Zeroizing;
|
||||
use rand_core::OsRng;
|
||||
|
||||
use frost::curve::Ristretto;
|
||||
use ciphersuite::{WrappedGroup, GroupIo};
|
||||
use dkg_musig::musig;
|
||||
use schnorrkel::Schnorrkel;
|
||||
|
||||
use sp_core::{
|
||||
ConstU32,
|
||||
bounded::BoundedVec,
|
||||
@@ -11,10 +15,7 @@ use sp_core::{
|
||||
Pair as PairTrait,
|
||||
};
|
||||
|
||||
use dalek_ff_group::Ristretto;
|
||||
use ciphersuite::Ciphersuite;
|
||||
use dkg_musig::musig;
|
||||
use schnorrkel::Schnorrkel;
|
||||
use serai_abi::primitives::NetworkId;
|
||||
|
||||
use serai_client::{
|
||||
primitives::{EmbeddedEllipticCurve, Amount},
|
||||
@@ -37,13 +38,13 @@ pub async fn set_keys(
|
||||
let mut pub_keys = vec![];
|
||||
for pair in pairs {
|
||||
let public_key =
|
||||
<Ristretto as Ciphersuite>::read_G::<&[u8]>(&mut pair.public().0.as_ref()).unwrap();
|
||||
<Ristretto as GroupIo>::read_G::<&[u8]>(&mut pair.public().0.as_ref()).unwrap();
|
||||
pub_keys.push(public_key);
|
||||
}
|
||||
|
||||
let mut threshold_keys = vec![];
|
||||
for i in 0 .. pairs.len() {
|
||||
let secret_key = <Ristretto as Ciphersuite>::read_F::<&[u8]>(
|
||||
let secret_key = <Ristretto as GroupIo>::read_F::<&[u8]>(
|
||||
&mut pairs[i].as_ref().secret.to_bytes()[.. 32].as_ref(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user