Implement Guaranteed Addresses

Closes https://github.com/serai-dex/serai/issues/27.

monero-rs is now solely used for Extra encoding.
This commit is contained in:
Luke Parker
2022-06-28 00:01:20 -04:00
parent 7b70baaa96
commit 7c86e4593a
12 changed files with 311 additions and 117 deletions

View File

@@ -4,10 +4,6 @@ use async_trait::async_trait;
use rand::rngs::OsRng;
use group::Group;
use frost::curve::Curve;
use crate::{NetworkError, Network, coin::{Coin, Monero}, wallet::{WalletKeys, MemCoinDb, Wallet}};
#[derive(Clone)]
@@ -55,7 +51,7 @@ impl Network for LocalNetwork {
async fn test_send<C: Coin + Clone>(coin: C, fee: C::Fee) {
// Mine a block so there's a confirmed height
coin.mine_block(coin.address(<C::Curve as Curve>::G::generator())).await;
coin.mine_block().await;
let height = coin.get_height().await.unwrap();
let mut keys = frost::tests::key_gen::<_, C::Curve>(&mut OsRng);
@@ -74,7 +70,7 @@ async fn test_send<C: Coin + Clone>(coin: C, fee: C::Fee) {
// Get the chain to a height where blocks have sufficient confirmations
while (height + C::CONFIRMATIONS) > coin.get_height().await.unwrap() {
coin.mine_block(coin.address(<C::Curve as Curve>::G::generator())).await;
coin.mine_block().await;
}
for wallet in wallets.iter_mut() {