Bitcoin–Monero Cross-chain Atomic Swap
Go to file
bors[bot] 95d721b4df
Merge #561 #565 #569 #570
561: Bump dprint/check from 1.4 to 1.5 r=thomaseizinger a=dependabot[bot]

Bumps [dprint/check](https://github.com/dprint/check) from 1.4 to 1.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dprint/check/releases">dprint/check's releases</a>.</em></p>
<blockquote>
<h2>v1.5</h2>
<p>Upgrade to dprint 0.15.0.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="2981c7cc88"><code>2981c7c</code></a> chore(release): Upgrade to dprint 0.15.0</li>
<li>See full diff in <a href="https://github.com/dprint/check/compare/v1.4...v1.5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dprint/check&package-manager=github_actions&previous-version=1.4&new-version=1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

565: Bump anyhow from 1.0.40 to 1.0.41 r=thomaseizinger a=dependabot[bot]

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.40 to 1.0.41.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/anyhow/releases">anyhow's releases</a>.</em></p>
<blockquote>
<h2>1.0.41</h2>
<ul>
<li>Disallow incompatible old versions of backtrace crate (<a href="https://github-redirect.dependabot.com/dtolnay/anyhow/issues/155">#155</a>, thanks <a href="https://github.com/jfirebaugh"><code>@​jfirebaugh</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b4f670dbe3"><code>b4f670d</code></a> Release 1.0.41</li>
<li><a href="8bf68c81ec"><code>8bf68c8</code></a> Merge pull request 155 from jfirebaugh/patch-1</li>
<li><a href="254c3b6638"><code>254c3b6</code></a> Depend on a recent-enough version of backtrace</li>
<li><a href="29e4e0e9fd"><code>29e4e0e</code></a> Update ui test suite to nightly-2021-05-14</li>
<li><a href="aa6c83d3bb"><code>aa6c83d</code></a> Resolve branches_sharing_code clippy lint</li>
<li>See full diff in <a href="https://github.com/dtolnay/anyhow/compare/1.0.40...1.0.41">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=anyhow&package-manager=cargo&previous-version=1.0.40&new-version=1.0.41)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

569: Bump itertools from 0.10.0 to 0.10.1 r=thomaseizinger a=dependabot[bot]

Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.0 to 0.10.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md">itertools's changelog</a>.</em></p>
<blockquote>
<h2>0.10.1</h2>
<ul>
<li>Add <code>Itertools::contains</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/514">#514</a>)</li>
<li>Add <code>Itertools::counts_by</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/515">#515</a>)</li>
<li>Add <code>Itertools::partition_result</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/511">#511</a>)</li>
<li>Add <code>Itertools::all_unique</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/241">#241</a>)</li>
<li>Add <code>Itertools::duplicates</code> and <code>Itertools::duplicates_by</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/502">#502</a>)</li>
<li>Add <code>chain!</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/525">#525</a>)</li>
<li>Add <code>Itertools::at_most_one</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/523">#523</a>)</li>
<li>Add <code>Itertools::flatten_ok</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/527">#527</a>)</li>
<li>Add <code>EitherOrBoth::or_default</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/583">#583</a>)</li>
<li>Add <code>Itertools::find_or_last</code> and <code>Itertools::find_or_first</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/535">#535</a>)</li>
<li>Implement <code>FusedIterator</code> for <code>FilterOk</code>, <code>FilterMapOk</code>, <code>InterleaveShortest</code>, <code>KMergeBy</code>, <code>MergeBy</code>, <code>PadUsing</code>, <code>Positions</code>, <code>Product</code> , <code>RcIter</code>, <code>TupleWindows</code>, <code>Unique</code>, <code>UniqueBy</code>,  <code>Update</code>, <code>WhileSome</code>, <code>Combinations</code>, <code>CombinationsWithReplacement</code>, <code>Powerset</code>, <code>RepeatN</code>, and <code>WithPosition</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/550">#550</a>)</li>
<li>Implement <code>FusedIterator</code> for <code>Interleave</code>, <code>IntersperseWith</code>, and <code>ZipLongest</code> (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/548">#548</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="20c09bd4fe"><code>20c09bd</code></a> (cargo-release) version 0.10.1</li>
<li><a href="30e6cb5051"><code>30e6cb5</code></a> Update CHANGELOG.md for 0.10.1 (<a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/542">#542</a>)</li>
<li><a href="9ed31f0a6e"><code>9ed31f0</code></a> Fix dead link to GroupingMap::fold</li>
<li><a href="24f40bde28"><code>24f40bd</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/548">#548</a></li>
<li><a href="e1f24baa5d"><code>e1f24ba</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/539">#539</a></li>
<li><a href="a33134ecee"><code>a33134e</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/543">#543</a></li>
<li><a href="eedea19e89"><code>eedea19</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-itertools/itertools/issues/550">#550</a></li>
<li><a href="f9ccc345d1"><code>f9ccc34</code></a> Add more FusedIterator</li>
<li><a href="ccc5081c32"><code>ccc5081</code></a> Add more FusedIterator</li>
<li><a href="4f4230f876"><code>4f4230f</code></a> Add FusedIterator for which it is commented fused.</li>
<li>Additional commits viewable in <a href="https://github.com/rust-itertools/itertools/compare/v0.10.0...v0.10.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=itertools&package-manager=cargo&previous-version=0.10.0&new-version=0.10.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

570: Bump time from 0.2.26 to 0.2.27 r=thomaseizinger a=dependabot[bot]

Bumps [time](https://github.com/time-rs/time) from 0.2.26 to 0.2.27.
<details>
<summary>Commits</summary>
<ul>
<li><a href="d26562b930"><code>d26562b</code></a> New release</li>
<li><a href="bcb0b5249f"><code>bcb0b52</code></a> Fix all lints</li>
<li><a href="3bd207c28d"><code>3bd207c</code></a> Fix <a href="https://github-redirect.dependabot.com/time-rs/time/issues/329">#329</a></li>
<li><a href="6bf1f0b00f"><code>6bf1f0b</code></a> fix documentation for %C</li>
<li>See full diff in <a href="https://github.com/time-rs/time/compare/v0.2.26...v0.2.27">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=time&package-manager=cargo&previous-version=0.2.26&new-version=0.2.27)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-21 01:06:14 +00:00
.cargo .cargo/config.toml for specifying linker 2021-03-15 14:36:05 +11:00
.github Bump dprint/check from 1.4 to 1.5 2021-06-17 11:05:20 +00:00
docs/asb Update ASB readme 2021-05-24 16:00:31 +10:00
monero-harness More resilient MoneroWalletRpc startup in the harness 2021-05-27 17:03:06 +10:00
monero-rpc Update metadata and remove outdated config files / READMEs 2021-05-17 11:03:43 +10:00
monero-wallet Introduce monero-wallet crate 2021-04-30 10:28:46 +10:00
swap Make log message a proper statement 2021-06-21 09:01:21 +10:00
.gitignore Push cargo lock to git as we are building a binary 2020-12-01 09:31:41 +11:00
bors.toml Move recovery commands in dedicated module 2021-05-07 16:21:02 +10:00
Cargo.lock Merge #561 #565 #569 #570 2021-06-21 01:06:14 +00:00
Cargo.toml Update secp256kfun and rand to latest version 2021-05-25 15:35:13 +10:00
CHANGELOG.md Refactor transports to construct them specific for each application 2021-06-21 09:01:19 +10:00
dprint.json Replace cargo-fmt with dprint 2021-05-25 16:11:48 +10:00
LICENSE Change license to GPLv3 2020-10-12 17:13:25 +11:00
README.md Update the README for mainnet 2021-05-24 10:31:51 +10:00
rust-toolchain.toml Change to stable Rust 1.52 2021-05-25 16:11:49 +10:00

XMR to BTC Atomic Swap

This repository hosts an MVP for atomically swapping BTC to XMR. It implements the protocol described in section 3 of this paper.

More information about the protocol in this presentation and this blog post.

Quick start - CLI

From version 0.6.0 onwards the software default to running on mainnet. It is recommended to try the software on testnet first, which can be achieved by providing the --testnet flag. This quickstart guide assumes that you are running the software on testnet (i.e. Bitcoin testnet3 and Monero stagenet):

  1. Download the latest swap binary release for your operating system
  2. Run the binary specifying the monero address where you wish to receive monero and the connection details of the seller: ./swap --testnet buy-xmr --receive-address <YOUR MONERO ADDRESS> --seller-peer-id <SELLERS PEER ID> --seller-addr <SELLERS MULTIADDRESS> You can generate a receive address using your monero wallet. The seller will provide you their peer id and multiaddress. We are running an asb instance on testnet. You can swap with to get familiar with the swap CLI. Our peer id is 12D3KooWCdMKjesXMJz1SiZ7HgotrxuqhQJbP5sgBm2BwP1cqThi and our multiaddress is /dnsaddr/xmr-btc-asb.coblox.tech
  3. Follow the instructions printed to the terminal

For running the software on mainnet you just omit the --testnet flag. Running on mainnet will automatically apply sane defaults. Be aware that this software is still early-stage. Make sure to check --help and understand how the cancel and refund commands work before running on mainnet. You are running this software at your own risk. As always we recommend: Verify, don't trust. All code is available in this repository.

How it works

This repository primarily hosts two components:

swap CLI

The swap CLI acts in the role of Bob and swaps BTC for XMR. See ./swap --help for a description of all commands. The main command is buy-xmr which automatically connects to an instance of asb.

asb service

asb is short for automated swap backend (we are open to suggestions for better names!). The service acts as the counter-party for the swap CLI in the role of Alice. It provides the CLI with a quote and the liquidity necessary for swapping BTC into XMR.

For details on how to run the ASB please refer to the ASB docs.

Contact

Feel free to reach out to us in the COMIT-Monero Matrix channel.