mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-12 07:16:43 -05:00
Remove data from message until Message0 impl serde
This commit is contained in:
parent
7dffe4cf5f
commit
bb94643943
8 changed files with 92 additions and 51 deletions
|
|
@ -32,5 +32,6 @@ tracing-core = "0.1"
|
||||||
tracing-futures = { version = "0.2", features = ["std-future", "futures-03"] }
|
tracing-futures = { version = "0.2", features = ["std-future", "futures-03"] }
|
||||||
tracing-log = "0.1"
|
tracing-log = "0.1"
|
||||||
tracing-subscriber = { version = "0.2", default-features = false, features = ["fmt", "ansi", "env-filter"] }
|
tracing-subscriber = { version = "0.2", default-features = false, features = ["fmt", "ansi", "env-filter"] }
|
||||||
|
url = "2.1"
|
||||||
void = "1"
|
void = "1"
|
||||||
xmr-btc = { path = "../xmr-btc" }
|
xmr-btc = { path = "../xmr-btc" }
|
||||||
|
|
@ -32,7 +32,7 @@ pub async fn swap<R: RngCore + CryptoRng>(
|
||||||
redeem_address: ::bitcoin::Address,
|
redeem_address: ::bitcoin::Address,
|
||||||
punish_address: ::bitcoin::Address,
|
punish_address: ::bitcoin::Address,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let mut message0: Option<bob::Message0> = None;
|
let message0: Option<bob::Message0> = None;
|
||||||
let mut last_amounts: Option<SwapParams> = None;
|
let mut last_amounts: Option<SwapParams> = None;
|
||||||
|
|
||||||
let mut swarm = new_swarm(listen)?;
|
let mut swarm = new_swarm(listen)?;
|
||||||
|
|
@ -48,13 +48,12 @@ pub async fn swap<R: RngCore + CryptoRng>(
|
||||||
last_amounts = Some(p);
|
last_amounts = Some(p);
|
||||||
swarm.send(channel, AliceToBob::Amounts(p));
|
swarm.send(channel, AliceToBob::Amounts(p));
|
||||||
}
|
}
|
||||||
OutEvent::Message0(msg) => {
|
OutEvent::Message0 => {
|
||||||
debug!("Got message0 from Bob");
|
debug!("Got message0 from Bob");
|
||||||
// TODO: Do this in a more Rusty/functional way.
|
// TODO: Do this in a more Rusty/functional way.
|
||||||
message0 = Some(msg);
|
// message0 = Some(msg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
other => panic!("unexpected event: {:?}", other),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -78,9 +77,9 @@ pub async fn swap<R: RngCore + CryptoRng>(
|
||||||
);
|
);
|
||||||
swarm.set_state0(state0.clone());
|
swarm.set_state0(state0.clone());
|
||||||
|
|
||||||
let state1 = match message0 {
|
let _state1 = match message0 {
|
||||||
Some(msg) => state0.receive(msg),
|
Some(msg) => state0.receive(msg),
|
||||||
None => unreachable!("should have msg by here"),
|
None => todo!("implement serde on Message0"),
|
||||||
};
|
};
|
||||||
|
|
||||||
tracing::warn!("parking thread ...");
|
tracing::warn!("parking thread ...");
|
||||||
|
|
@ -117,7 +116,8 @@ fn new_swarm(listen: Multiaddr) -> Result<Swarm> {
|
||||||
pub enum OutEvent {
|
pub enum OutEvent {
|
||||||
ConnectionEstablished(PeerId),
|
ConnectionEstablished(PeerId),
|
||||||
Request(amounts::OutEvent),
|
Request(amounts::OutEvent),
|
||||||
Message0(bob::Message0),
|
// Message0(bob::Message0),
|
||||||
|
Message0,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<peer_tracker::OutEvent> for OutEvent {
|
impl From<peer_tracker::OutEvent> for OutEvent {
|
||||||
|
|
@ -139,7 +139,8 @@ impl From<amounts::OutEvent> for OutEvent {
|
||||||
impl From<message0::OutEvent> for OutEvent {
|
impl From<message0::OutEvent> for OutEvent {
|
||||||
fn from(event: message0::OutEvent) -> Self {
|
fn from(event: message0::OutEvent) -> Self {
|
||||||
match event {
|
match event {
|
||||||
message0::OutEvent::Msg(msg) => OutEvent::Message0(msg),
|
// message0::OutEvent::Msg(msg) => OutEvent::Message0(msg),
|
||||||
|
message0::OutEvent::Msg => OutEvent::Message0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -171,7 +172,7 @@ impl Alice {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_state0(&mut self, state: State0) {
|
pub fn set_state0(&mut self, state: State0) {
|
||||||
self.message0.set_state(state);
|
let _ = self.message0.set_state(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ use libp2p::{
|
||||||
swarm::{NetworkBehaviourAction, NetworkBehaviourEventProcess, PollParameters},
|
swarm::{NetworkBehaviourAction, NetworkBehaviourEventProcess, PollParameters},
|
||||||
NetworkBehaviour,
|
NetworkBehaviour,
|
||||||
};
|
};
|
||||||
use rand::rngs::OsRng;
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::VecDeque,
|
collections::VecDeque,
|
||||||
task::{Context, Poll},
|
task::{Context, Poll},
|
||||||
|
|
@ -16,11 +15,12 @@ use std::{
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
||||||
use crate::network::request_response::{AliceToBob, BobToAlice, Codec, Protocol};
|
use crate::network::request_response::{AliceToBob, BobToAlice, Codec, Protocol};
|
||||||
use xmr_btc::{alice::State0, bob};
|
use xmr_btc::alice::State0;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum OutEvent {
|
pub enum OutEvent {
|
||||||
Msg(bob::Message0),
|
// Msg(bob::Message0),
|
||||||
|
Msg,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A `NetworkBehaviour` that represents getting the amounts of an XMR/BTC swap.
|
/// A `NetworkBehaviour` that represents getting the amounts of an XMR/BTC swap.
|
||||||
|
|
@ -85,16 +85,18 @@ impl NetworkBehaviourEventProcess<RequestResponseEvent<BobToAlice, AliceToBob>>
|
||||||
channel,
|
channel,
|
||||||
},
|
},
|
||||||
} => match request {
|
} => match request {
|
||||||
BobToAlice::Message0(msg) => {
|
BobToAlice::Message0 => {
|
||||||
let response = match self.state {
|
let response = match &self.state {
|
||||||
None => panic!("No state, did you forget to set it?"),
|
None => panic!("No state, did you forget to set it?"),
|
||||||
Some(state) => {
|
Some(_state) => {
|
||||||
// TODO: Get OsRng from somewhere?
|
// TODO: Get OsRng from somewhere?
|
||||||
AliceToBob::Message0(state.next_message(&mut OsRng))
|
// AliceToBob::Message0(state.next_message(&mut OsRng))
|
||||||
|
AliceToBob::Message0
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
self.rr.send_response(channel, response);
|
self.rr.send_response(channel, response);
|
||||||
self.events.push_back(OutEvent::Msg(msg));
|
|
||||||
|
self.events.push_back(OutEvent::Msg);
|
||||||
}
|
}
|
||||||
_ => panic!("unexpected request"),
|
_ => panic!("unexpected request"),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use futures::{
|
||||||
StreamExt,
|
StreamExt,
|
||||||
};
|
};
|
||||||
use libp2p::{core::identity::Keypair, Multiaddr, NetworkBehaviour, PeerId};
|
use libp2p::{core::identity::Keypair, Multiaddr, NetworkBehaviour, PeerId};
|
||||||
use rand::{CryptoRng, RngCore};
|
use rand::rngs::OsRng;
|
||||||
use std::{process, thread, time::Duration};
|
use std::{process, thread, time::Duration};
|
||||||
use tracing::{debug, info, warn};
|
use tracing::{debug, info, warn};
|
||||||
|
|
||||||
|
|
@ -23,23 +23,20 @@ use crate::{
|
||||||
Cmd, Rsp, PUNISH_TIMELOCK, REFUND_TIMELOCK,
|
Cmd, Rsp, PUNISH_TIMELOCK, REFUND_TIMELOCK,
|
||||||
};
|
};
|
||||||
use xmr_btc::{
|
use xmr_btc::{
|
||||||
alice,
|
|
||||||
bitcoin::BuildTxLockPsbt,
|
bitcoin::BuildTxLockPsbt,
|
||||||
bob::{self, State0},
|
bob::{self, State0},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub async fn swap<W, R>(
|
pub async fn swap<W>(
|
||||||
btc: u64,
|
btc: u64,
|
||||||
addr: Multiaddr,
|
addr: Multiaddr,
|
||||||
mut cmd_tx: Sender<Cmd>,
|
mut cmd_tx: Sender<Cmd>,
|
||||||
mut rsp_rx: Receiver<Rsp>,
|
mut rsp_rx: Receiver<Rsp>,
|
||||||
rng: &mut R,
|
|
||||||
refund_address: ::bitcoin::Address,
|
refund_address: ::bitcoin::Address,
|
||||||
wallet: &W,
|
_wallet: W,
|
||||||
) -> Result<()>
|
) -> Result<()>
|
||||||
where
|
where
|
||||||
W: BuildTxLockPsbt,
|
W: BuildTxLockPsbt + Send + Sync + 'static,
|
||||||
R: RngCore + CryptoRng,
|
|
||||||
{
|
{
|
||||||
let mut swarm = new_swarm()?;
|
let mut swarm = new_swarm()?;
|
||||||
|
|
||||||
|
|
@ -73,6 +70,7 @@ where
|
||||||
let xmr = xmr_btc::monero::Amount::from_piconero(xmr.as_piconero());
|
let xmr = xmr_btc::monero::Amount::from_piconero(xmr.as_piconero());
|
||||||
let btc = ::bitcoin::Amount::from_sat(btc.as_sat());
|
let btc = ::bitcoin::Amount::from_sat(btc.as_sat());
|
||||||
|
|
||||||
|
let rng = &mut OsRng;
|
||||||
let state0 = State0::new(
|
let state0 = State0::new(
|
||||||
rng,
|
rng,
|
||||||
btc,
|
btc,
|
||||||
|
|
@ -82,9 +80,11 @@ where
|
||||||
refund_address,
|
refund_address,
|
||||||
);
|
);
|
||||||
swarm.send_message0(alice.clone(), state0.next_message(rng));
|
swarm.send_message0(alice.clone(), state0.next_message(rng));
|
||||||
let state1 = match swarm.next().await {
|
let _state1 = match swarm.next().await {
|
||||||
OutEvent::Message0(msg) => {
|
OutEvent::Message0 => {
|
||||||
state0.receive(wallet, msg) // TODO: More graceful error handling.
|
// state0.receive(wallet, msg) // TODO: More graceful error
|
||||||
|
// handling.
|
||||||
|
println!("TODO: receive after serde is done for Message0")
|
||||||
}
|
}
|
||||||
other => panic!("unexpected event: {:?}", other),
|
other => panic!("unexpected event: {:?}", other),
|
||||||
};
|
};
|
||||||
|
|
@ -120,7 +120,8 @@ fn new_swarm() -> Result<Swarm> {
|
||||||
pub enum OutEvent {
|
pub enum OutEvent {
|
||||||
ConnectionEstablished(PeerId),
|
ConnectionEstablished(PeerId),
|
||||||
Amounts(amounts::OutEvent),
|
Amounts(amounts::OutEvent),
|
||||||
Message0(alice::Message0),
|
// Message0(alice::Message0),
|
||||||
|
Message0,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<peer_tracker::OutEvent> for OutEvent {
|
impl From<peer_tracker::OutEvent> for OutEvent {
|
||||||
|
|
@ -142,7 +143,8 @@ impl From<amounts::OutEvent> for OutEvent {
|
||||||
impl From<message0::OutEvent> for OutEvent {
|
impl From<message0::OutEvent> for OutEvent {
|
||||||
fn from(event: message0::OutEvent) -> Self {
|
fn from(event: message0::OutEvent) -> Self {
|
||||||
match event {
|
match event {
|
||||||
message0::OutEvent::Msg(msg) => OutEvent::Message0(msg),
|
// message0::OutEvent::Msg(msg) => OutEvent::Message0(msg),
|
||||||
|
message0::OutEvent::Msg => OutEvent::Message0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ impl NetworkBehaviourEventProcess<RequestResponseEvent<BobToAlice, AliceToBob>>
|
||||||
},
|
},
|
||||||
} => match response {
|
} => match response {
|
||||||
AliceToBob::Amounts(p) => self.events.push_back(OutEvent::Amounts(p)),
|
AliceToBob::Amounts(p) => self.events.push_back(OutEvent::Amounts(p)),
|
||||||
|
AliceToBob::Message0 => panic!("shouldn't get message0 here"),
|
||||||
},
|
},
|
||||||
|
|
||||||
RequestResponseEvent::InboundFailure { .. } => {
|
RequestResponseEvent::InboundFailure { .. } => {
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,12 @@ use std::{
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
||||||
use crate::network::request_response::{AliceToBob, BobToAlice, Codec, Protocol};
|
use crate::network::request_response::{AliceToBob, BobToAlice, Codec, Protocol};
|
||||||
use xmr_btc::{alice, bob};
|
use xmr_btc::bob;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum OutEvent {
|
pub enum OutEvent {
|
||||||
Msg(alice::Message0),
|
// Msg(alice::Message0),
|
||||||
|
Msg,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A `NetworkBehaviour` that represents send/recv of message 0.
|
/// A `NetworkBehaviour` that represents send/recv of message 0.
|
||||||
|
|
@ -46,8 +47,9 @@ impl Message0 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn send(&mut self, alice: PeerId, msg: bob::Message0) {
|
pub fn send(&mut self, alice: PeerId, _msg: bob::Message0) {
|
||||||
let msg = BobToAlice::Message0(msg);
|
// let msg = BobToAlice::Message0(msg);
|
||||||
|
let msg = BobToAlice::Message0;
|
||||||
let _id = self.rr.send_request(&alice, msg);
|
let _id = self.rr.send_request(&alice, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -79,7 +81,9 @@ impl NetworkBehaviourEventProcess<RequestResponseEvent<BobToAlice, AliceToBob>>
|
||||||
request_id: _,
|
request_id: _,
|
||||||
},
|
},
|
||||||
} => match response {
|
} => match response {
|
||||||
AliceToBob::Message0(msg) => self.events.push_back(OutEvent::Msg(msg)),
|
// AliceToBob::Message0(msg) => self.events.push_back(OutEvent::Msg(msg)),
|
||||||
|
AliceToBob::Message0 => self.events.push_back(OutEvent::Msg),
|
||||||
|
AliceToBob::Amounts(_) => panic!("shouldn't get amounts here"),
|
||||||
},
|
},
|
||||||
|
|
||||||
RequestResponseEvent::InboundFailure { .. } => {
|
RequestResponseEvent::InboundFailure { .. } => {
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,20 @@ use rand::rngs::OsRng;
|
||||||
use std::{io, io::Write, process};
|
use std::{io, io::Write, process};
|
||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
use tracing::info;
|
use tracing::info;
|
||||||
|
use url::Url;
|
||||||
|
|
||||||
mod cli;
|
mod cli;
|
||||||
mod trace;
|
mod trace;
|
||||||
|
|
||||||
use cli::Options;
|
use cli::Options;
|
||||||
use swap::{alice, bob, Cmd, Rsp, SwapParams};
|
use swap::{alice, bitcoin::Wallet, bob, Cmd, Rsp, SwapParams};
|
||||||
|
use xmr_btc::bitcoin::BuildTxLockPsbt;
|
||||||
// TODO: Add root seed file instead of generating new seed each run.
|
// TODO: Add root seed file instead of generating new seed each run.
|
||||||
|
|
||||||
// Alice's address and port until we have a config file.
|
// Alice's address and port until we have a config file.
|
||||||
pub const PORT: u16 = 9876; // Arbitrarily chosen.
|
pub const PORT: u16 = 9876; // Arbitrarily chosen.
|
||||||
pub const ADDR: &str = "127.0.0.1";
|
pub const ADDR: &str = "127.0.0.1";
|
||||||
|
pub const BITCOIND_JSON_RPC_URL: &str = "127.0.0.1:8332";
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
|
|
@ -48,23 +51,40 @@ async fn main() -> Result<()> {
|
||||||
bail!("Alice cannot set the amount to swap via the cli");
|
bail!("Alice cannot set the amount to swap via the cli");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Get these addresses from command line
|
let url = Url::parse(BITCOIND_JSON_RPC_URL).expect("failed to parse url");
|
||||||
let redeem = bitcoin::Address::default();
|
let bitcoin_wallet = Wallet::new("alice", &url)
|
||||||
let punish = bitcoin::Address::default();
|
.await
|
||||||
|
.expect("failed to create bitcoin wallet");
|
||||||
|
|
||||||
swap_as_alice(alice, redeem, refund).await?;
|
let redeem = bitcoin_wallet
|
||||||
|
.new_address()
|
||||||
|
.await
|
||||||
|
.expect("failed to get new redeem address");
|
||||||
|
let punish = bitcoin_wallet
|
||||||
|
.new_address()
|
||||||
|
.await
|
||||||
|
.expect("failed to get new punish address");
|
||||||
|
|
||||||
|
swap_as_alice(alice.clone(), redeem, punish).await?;
|
||||||
} else {
|
} else {
|
||||||
info!("running swap node as Bob ...");
|
info!("running swap node as Bob ...");
|
||||||
|
|
||||||
// TODO: Get refund address from command line
|
let url = Url::parse(BITCOIND_JSON_RPC_URL).expect("failed to parse url");
|
||||||
let refund = bitcoin::Address::default();
|
let bitcoin_wallet = Wallet::new("bob", &url)
|
||||||
|
.await
|
||||||
|
.expect("failed to create bitcoin wallet");
|
||||||
|
|
||||||
|
let refund = bitcoin_wallet
|
||||||
|
.new_address()
|
||||||
|
.await
|
||||||
|
.expect("failed to get new address");
|
||||||
|
|
||||||
match (opt.piconeros, opt.satoshis) {
|
match (opt.piconeros, opt.satoshis) {
|
||||||
(Some(_), Some(_)) => bail!("Please supply only a single amount to swap"),
|
(Some(_), Some(_)) => bail!("Please supply only a single amount to swap"),
|
||||||
(None, None) => bail!("Please supply an amount to swap"),
|
(None, None) => bail!("Please supply an amount to swap"),
|
||||||
(Some(_picos), _) => todo!("support starting with picos"),
|
(Some(_picos), _) => todo!("support starting with picos"),
|
||||||
(None, Some(sats)) => {
|
(None, Some(sats)) => {
|
||||||
swap_as_bob(sats, alice_addr, refund).await?;
|
swap_as_bob(sats, alice, refund, bitcoin_wallet).await?;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -74,16 +94,24 @@ async fn main() -> Result<()> {
|
||||||
|
|
||||||
async fn swap_as_alice(
|
async fn swap_as_alice(
|
||||||
addr: Multiaddr,
|
addr: Multiaddr,
|
||||||
redeem: bitcoin::Address::default(),
|
redeem: bitcoin::Address,
|
||||||
punish: bitcoin::Address::default(),
|
punish: bitcoin::Address,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
alice::swap(addr, OsRng, redeem, punish).await
|
alice::swap(addr, &mut OsRng, redeem, punish).await
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn swap_as_bob(sats: u64, addr: Multiaddr, refund: bitcoin::Address) -> Result<()> {
|
async fn swap_as_bob<W>(
|
||||||
|
sats: u64,
|
||||||
|
addr: Multiaddr,
|
||||||
|
refund: bitcoin::Address,
|
||||||
|
wallet: W,
|
||||||
|
) -> Result<()>
|
||||||
|
where
|
||||||
|
W: BuildTxLockPsbt + Send + Sync + 'static,
|
||||||
|
{
|
||||||
let (cmd_tx, mut cmd_rx) = mpsc::channel(1);
|
let (cmd_tx, mut cmd_rx) = mpsc::channel(1);
|
||||||
let (mut rsp_tx, rsp_rx) = mpsc::channel(1);
|
let (mut rsp_tx, rsp_rx) = mpsc::channel(1);
|
||||||
tokio::spawn(bob::swap(sats, addr, cmd_tx, rsp_rx, OsRng, refund));
|
tokio::spawn(bob::swap(sats, addr, cmd_tx, rsp_rx, refund, wallet));
|
||||||
loop {
|
loop {
|
||||||
let read = cmd_rx.next().await;
|
let read = cmd_rx.next().await;
|
||||||
match read {
|
match read {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize};
|
||||||
use std::{fmt::Debug, io};
|
use std::{fmt::Debug, io};
|
||||||
|
|
||||||
use crate::SwapParams;
|
use crate::SwapParams;
|
||||||
use xmr_btc::{alice, bob, monero};
|
use xmr_btc::monero;
|
||||||
|
|
||||||
/// Time to wait for a response back once we send a request.
|
/// Time to wait for a response back once we send a request.
|
||||||
pub const TIMEOUT: u64 = 3600; // One hour.
|
pub const TIMEOUT: u64 = 3600; // One hour.
|
||||||
|
|
@ -19,14 +19,16 @@ pub enum BobToAlice {
|
||||||
#[serde(with = "::bitcoin::util::amount::serde::as_sat")]
|
#[serde(with = "::bitcoin::util::amount::serde::as_sat")]
|
||||||
AmountsFromBtc(::bitcoin::Amount),
|
AmountsFromBtc(::bitcoin::Amount),
|
||||||
AmountsFromXmr(monero::Amount),
|
AmountsFromXmr(monero::Amount),
|
||||||
Message0(bob::Message0),
|
Message0,
|
||||||
|
// Message0(bob::Message0),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Messages Alice sends to Bob.
|
/// Messages Alice sends to Bob.
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub enum AliceToBob {
|
pub enum AliceToBob {
|
||||||
Amounts(SwapParams),
|
Amounts(SwapParams),
|
||||||
Message0(alice::Message0),
|
Message0,
|
||||||
|
// Message0(alice::Message0),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, Default)]
|
#[derive(Debug, Clone, Copy, Default)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue