mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
14 lines
402 B
Rust
14 lines
402 B
Rust
#![cfg_attr(docsrs, feature(doc_cfg))]
|
|
#![doc = include_str!("../README.md")]
|
|
#![deny(missing_docs)]
|
|
|
|
use ciphersuite::*;
|
|
|
|
/// Generate a view key for usage within Serai.
|
|
///
|
|
/// `k` is the index of the key to generate (enabling generating multiple view keys within a
|
|
/// single context).
|
|
pub fn view_key<C: Ciphersuite>(k: u64) -> C::F {
|
|
C::hash_to_F(format!("Serai DEX View Key {k}").as_bytes())
|
|
}
|