mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Initial documentation for the Monero libraries (#122)
* Document all features * Largely document the Monero libraries Relevant to https://github.com/serai-dex/serai/issues/103 and likely sufficient to get this removed from https://github.com/serai-dex/serai/issues/102.
This commit is contained in:
@@ -14,6 +14,7 @@ use crate::{
|
||||
ringct::{clsag::Clsag, bulletproofs::Bulletproofs},
|
||||
};
|
||||
|
||||
/// Generate a key image for a given key. Defined as `x * hash_to_point(xG)`.
|
||||
pub fn generate_key_image(mut secret: Scalar) -> EdwardsPoint {
|
||||
let res = secret * hash_to_point(&secret * &ED25519_BASEPOINT_TABLE);
|
||||
secret.zeroize();
|
||||
@@ -74,6 +75,7 @@ pub enum RctPrunable {
|
||||
}
|
||||
|
||||
impl RctPrunable {
|
||||
/// RCT Type byte for a given RctPrunable struct.
|
||||
pub fn rct_type(&self) -> u8 {
|
||||
match self {
|
||||
RctPrunable::Null => 0,
|
||||
|
||||
Reference in New Issue
Block a user