mirror of
https://github.com/serai-dex/serai.git
synced 2025-03-22 23:28:46 +00:00
The Processor's coins folder referred to the networks it could process, as did its Coin trait. This, and other similar cases throughout the codebase, have now been corrected. Also corrects dated documentation for a key pair is confirmed under the validator-sets pallet.
14 lines
554 B
Rust
14 lines
554 B
Rust
use ciphersuite::Ciphersuite;
|
|
|
|
use crate::networks::Network;
|
|
|
|
// 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 fn additional_key<N: Network>(k: u64) -> <N::Curve as Ciphersuite>::F {
|
|
<N::Curve as Ciphersuite>::hash_to_F(
|
|
b"Serai DEX Additional Key",
|
|
&[N::ID.as_bytes(), &k.to_le_bytes()].concat(),
|
|
)
|
|
}
|