mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
a0ef1f96ec
The bitcoind wallet required the user to run a bitcoind node. It was replaced with a bdk wallet which allows the user to connect to an electrum instance hosted remotely. An electrum and bitcoind testcontainer were created to the test the bdk wallet. The electrum container reads the blockdata from the bitcoind testcontainer through a shared volume. bitcoind-harness was removed as bitcoind initialisation code was moved into test_utils. The bdk wallet differs from the bitcoind wallet in that it needs to be manually synced with an electrum node. We synchronise the wallet once upon initialisation to prevent a potentially long running blocking task from interrupting protocol execution. The electrum HTTP API was used to get the latest block height and the transaction block height as this functionality was not present in the bdk wallet API or it required the bdk wallet to be re-synced to get an up to date value.
75 lines
2.8 KiB
TOML
75 lines
2.8 KiB
TOML
[package]
|
|
name = "swap"
|
|
version = "0.1.0"
|
|
authors = ["CoBloX developers <team@coblox.tech>"]
|
|
edition = "2018"
|
|
description = "XMR/BTC trustless atomic swaps."
|
|
|
|
[[bin]]
|
|
name = "swap_cli"
|
|
|
|
[lib]
|
|
name = "swap"
|
|
|
|
[dependencies]
|
|
anyhow = "1"
|
|
async-recursion = "0.3.1"
|
|
async-trait = "0.1"
|
|
atty = "0.2"
|
|
backoff = { git = "https://github.com/ihrwein/backoff", rev = "9d03992a83dfdc596be26276d4e5c5254a4b11a2", features = ["tokio"] }
|
|
base64 = "0.12"
|
|
bdk = { version = "0.3" }
|
|
bitcoin = { version = "0.25", features = ["rand", "use-serde"] }
|
|
bitcoin-harness = { git = "https://github.com/coblox/bitcoin-harness-rs", rev = "ae2f6cd547496e680941c0910018bbe884128799" }
|
|
config = { version = "0.10", default-features = false, features = ["toml"] }
|
|
conquer-once = "0.3"
|
|
cross-curve-dleq = { git = "https://github.com/comit-network/cross-curve-dleq", rev = "eddcdea1d1f16fa33ef581d1744014ece535c920", features = ["serde"] }
|
|
curve25519-dalek = "2"
|
|
derivative = "2"
|
|
dialoguer = "0.7"
|
|
directories-next = "2"
|
|
ecdsa_fun = { git = "https://github.com/LLFourn/secp256kfun", rev = "cdfbc766045ea678a41780919d6228dd5acee3be", features = ["libsecp_compat", "serde"] }
|
|
ed25519-dalek = { version = "1.0.0-pre.4", features = ["serde"] }# Cannot be 1 because they depend on curve25519-dalek version 3
|
|
futures = { version = "0.3", default-features = false }
|
|
libp2p = { version = "0.34", default-features = false, features = ["tcp-tokio", "yamux", "mplex", "dns", "noise", "request-response"] }
|
|
libp2p-async-await = { git = "https://github.com/comit-network/rust-libp2p-async-await", rev = "1429cd780204624b4d244e7d8179fe6ff77988c3" }
|
|
log = { version = "0.4", features = ["serde"] }
|
|
miniscript = { version = "4", features = ["serde"] }
|
|
monero = { version = "0.9", features = ["serde_support"] }
|
|
monero-harness = { path = "../monero-harness" }
|
|
pem = "0.8"
|
|
prettytable-rs = "0.8"
|
|
rand = "0.7"
|
|
reqwest = { version = "0.11", default-features = false }
|
|
rust_decimal = "1.10"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_cbor = "0.11"
|
|
serde_derive = "1.0"
|
|
serde_json = "1"
|
|
sha2 = "0.9"
|
|
sled = "0.34"
|
|
structopt = "0.3"
|
|
strum = { version = "0.20", features = ["derive"] }
|
|
tempfile = "3"
|
|
thiserror = "1"
|
|
time = "0.2"
|
|
tokio = { version = "1.0", features = ["rt-multi-thread", "time", "macros", "sync"] }
|
|
toml = "0.5"
|
|
tracing = { version = "0.1", features = ["attributes"] }
|
|
tracing-core = "0.1"
|
|
tracing-futures = { version = "0.2", features = ["std-future", "futures-03"] }
|
|
tracing-log = "0.1"
|
|
tracing-subscriber = { version = "0.2", default-features = false, features = ["fmt", "ansi", "env-filter"] }
|
|
url = { version = "2.1", features = ["serde"] }
|
|
uuid = { version = "0.8", features = ["serde", "v4"] }
|
|
void = "1"
|
|
|
|
[dev-dependencies]
|
|
get-port = "3"
|
|
hyper = "0.14"
|
|
port_check = "0.1"
|
|
serde_cbor = "0.11"
|
|
spectral = "0.6"
|
|
tempfile = "3"
|
|
testcontainers = "0.11"
|