xmr-btc-swap/swap/src/protocol.rs
Thomas Eizinger 6d9b21cb47
Change imports_granularity to module
This reduces the overall amount of LoC that imports take up in our
codebase by almost 100.
It also makes merge-conflicts less likely because there is less
grouping together of imports that may lead to layout changes which
in turn can cause merge conflicts.
2021-03-04 14:48:13 +11:00

24 lines
679 B
Rust

use conquer_once::Lazy;
use ecdsa_fun::fun::marker::Mark;
use sha2::Sha256;
use sigma_fun::ext::dl_secp256k1_ed25519_eq::CrossCurveDLEQ;
use sigma_fun::HashTranscript;
pub mod alice;
pub mod bob;
pub static CROSS_CURVE_PROOF_SYSTEM: Lazy<
CrossCurveDLEQ<HashTranscript<Sha256, rand_chacha::ChaCha20Rng>>,
> = Lazy::new(|| {
CrossCurveDLEQ::<HashTranscript<Sha256, rand_chacha::ChaCha20Rng>>::new(
(*ecdsa_fun::fun::G).mark::<ecdsa_fun::fun::marker::Normal>(),
curve25519_dalek::constants::ED25519_BASEPOINT_POINT,
)
});
#[derive(Debug, Copy, Clone)]
pub struct StartingBalances {
pub xmr: crate::monero::Amount,
pub btc: bitcoin::Amount,
}