Removes monero, yet we still use monero-rs's base58 and epee libraries.
This commit is contained in:
Luke Parker
2022-08-21 08:41:19 -04:00
parent d12507e612
commit c5beee5648
9 changed files with 209 additions and 113 deletions

View File

@@ -4,13 +4,9 @@ use curve25519_dalek::constants::ED25519_BASEPOINT_TABLE;
use serde_json::json;
use monero::{
network::Network,
util::{key::PublicKey, address::Address},
};
use monero_serai::{
Protocol, random_scalar,
wallet::address::{Network, AddressType, AddressMeta, Address},
rpc::{EmptyResponse, RpcError, Rpc},
};
@@ -22,11 +18,11 @@ pub async fn rpc() -> Rpc {
return rpc;
}
let addr = Address::standard(
Network::Mainnet,
PublicKey { point: (&random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE).compress() },
PublicKey { point: (&random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE).compress() },
)
let addr = Address {
meta: AddressMeta { network: Network::Mainnet, kind: AddressType::Standard, guaranteed: false },
spend: &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
view: &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
}
.to_string();
// Mine 20 blocks to ensure decoy availability