mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Remove coin crate
Effective reversion of past few commits by request.
This commit is contained in:
@@ -3,10 +3,10 @@ use std::{marker::Send, io::Cursor, collections::HashMap};
|
||||
use async_trait::async_trait;
|
||||
use thiserror::Error;
|
||||
|
||||
use frost::FrostError;
|
||||
use frost::{curve::Curve, FrostError};
|
||||
|
||||
pub use serai_coin as coin;
|
||||
use coin::CoinError;
|
||||
mod coin;
|
||||
use coin::{CoinError, Coin};
|
||||
|
||||
mod wallet;
|
||||
|
||||
@@ -30,3 +30,11 @@ pub enum SignError {
|
||||
#[error("network had an error {0}")]
|
||||
NetworkError(NetworkError),
|
||||
}
|
||||
|
||||
// Generate a static additional key for a given chain in a globally consistent manner
|
||||
// Doesn't consider the current group key to increase the simplicity of verifying Serai's status
|
||||
// Takes an index, k, to support protocols which use multiple secondary keys
|
||||
// Presumably a view key
|
||||
pub(crate) fn additional_key<C: Coin>(k: u64) -> <C::Curve as Curve>::F {
|
||||
C::Curve::hash_to_F(b"Serai DEX Additional Key", &[C::ID, &k.to_le_bytes()].concat())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user