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:
Luke Parker
2022-09-28 07:44:49 -05:00
committed by GitHub
parent f48a48ec3f
commit fd48bbd15e
28 changed files with 153 additions and 35 deletions

View File

@@ -115,6 +115,7 @@ fn offset(ring: &[u64]) -> Vec<u64> {
res
}
/// Decoy data, containing the actual member as well (at index `i`).
#[derive(Clone, PartialEq, Eq, Debug, Zeroize, ZeroizeOnDrop)]
pub struct Decoys {
pub i: u8,
@@ -127,6 +128,7 @@ impl Decoys {
self.offsets.len()
}
/// Select decoys using the same distribution as Monero.
pub async fn select<R: RngCore + CryptoRng>(
rng: &mut R,
rpc: &Rpc,