Bitcoin–Monero Cross-chain Atomic Swap
Go to file
bors[bot] d487aa3c5b
Merge #327 #330 #331
327: Bump actions/setup-python from v1 to v2.2.1 r=thomaseizinger a=dependabot[bot]

Bumps [actions/setup-python](https://github.com/actions/setup-python) from v1 to v2.2.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/setup-python/releases">actions/setup-python's releases</a>.</em></p>
<blockquote>
<h2>v2.2.1</h2>
<ul>
<li>Fix PyPy3 issues with Windows</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="3105fb18c0"><code>3105fb1</code></a> fix is_windows (<a href="https://github.com/actions/setup-python/issues/172">#172</a>)</li>
<li><a href="8c5ea631b2"><code>8c5ea63</code></a> Adding support for more PyPy versions and installing them on-flight (<a href="https://github.com/actions/setup-python/issues/168">#168</a>)</li>
<li><a href="2831efe49a"><code>2831efe</code></a> Improve find-python to add &quot;Scripts&quot; folder to PATH on Windows machines (<a href="https://github.com/actions/setup-python/issues/169">#169</a>)</li>
<li><a href="3b3f2de1b1"><code>3b3f2de</code></a> update pypy3 to point to 3.6 (<a href="https://github.com/actions/setup-python/issues/164">#164</a>)</li>
<li><a href="723e46dad7"><code>723e46d</code></a> CODEOWNERS needs the org name for teams</li>
<li><a href="195f5c388b"><code>195f5c3</code></a> Create CODEOWNERS</li>
<li><a href="41b7212b16"><code>41b7212</code></a> Update README.md (<a href="https://github.com/actions/setup-python/issues/145">#145</a>)</li>
<li><a href="878156f1de"><code>878156f</code></a> Inject LD_LIBRARY_PATH library path into Python manifest install and setup (#...</li>
<li><a href="c181ffa198"><code>c181ffa</code></a> Add Environment Files (<a href="https://github.com/actions/setup-python/issues/138">#138</a>)</li>
<li><a href="1ce870e10f"><code>1ce870e</code></a> Fix links in documentation (<a href="https://github.com/actions/setup-python/issues/135">#135</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/actions/setup-python/compare/v1...3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually 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>

330: Bump dialoguer from 0.7.1 to 0.8.0 r=thomaseizinger a=dependabot[bot]

Bumps [dialoguer](https://github.com/mitsuhiko/dialoguer) from 0.7.1 to 0.8.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/mitsuhiko/dialoguer/blob/master/CHANGELOG.md">dialoguer's changelog</a>.</em></p>
<blockquote>
<h2>0.8.0</h2>
<h3>Enhancements</h3>
<ul>
<li><code>Input::validate_with</code> can take a <code>FnMut</code> (allowing multiple references)</li>
</ul>
<h3>Breaking</h3>
<ul>
<li><code>Input::interact*</code> methods take <code>&amp;mut self</code> instead of <code>&amp;self</code></li>
</ul>
<h2>0.7.0</h2>
<h3>Enhancements</h3>
<ul>
<li>Added <code>wait_for_newline</code> to <code>Confirm</code></li>
<li>More secure password prompt</li>
<li>More documentation</li>
<li>Added <code>interact_text</code> method for input prompt</li>
<li>Added <code>inline_selections</code> to <code>ColorfulTheme</code></li>
</ul>
<h3>Breaking</h3>
<ul>
<li>Removed <code>theme::CustomPromptCharacterTheme</code></li>
<li><code>Input</code> validators now take the input type <code>T</code> as arg</li>
<li><code>Confirm</code> has no <code>default</code> value by default now</li>
</ul>
<h2>0.6.2</h2>
<h3>Enhancements</h3>
<ul>
<li>Updating some docs</li>
</ul>
<h2>0.6.1</h2>
<h3>Bugfixes</h3>
<ul>
<li><code>theme::ColorfulTheme</code> default styles are for stderr</li>
</ul>
<h2>0.6.0</h2>
<h3>Breaking</h3>
<ul>
<li>Removed <code>theme::SelectionStyle</code> enum</li>
<li>Allowed more customization for <code>theme::Theme</code> trait by changing methods</li>
<li>Allowed more customization for <code>theme::ColorfulTheme</code> by changing members</li>
<li>Renamed prompt <code>Confirmation</code> to <code>Confirm</code></li>
<li>Renamed prompt <code>PasswordInput</code> to <code>Password</code></li>
<li>Renamed prompt <code>OrderList</code> to <code>Sort</code></li>
<li>Renamed prompt <code>Checkboxes</code> to <code>MultiSelect</code></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="2c3fe6b646"><code>2c3fe6b</code></a> Release 0.8.0</li>
<li><a href="64f5f9c6f5"><code>64f5f9c</code></a> Allow confirm with no choice (<a href="https://github.com/mitsuhiko/dialoguer/issues/101">#101</a>)</li>
<li><a href="0250090f95"><code>0250090</code></a> Update some docs in confirm prompt</li>
<li><a href="a76fb72c54"><code>a76fb72</code></a> Merge pull request <a href="https://github.com/mitsuhiko/dialoguer/issues/102">#102</a> from spenserblack/typo-fix</li>
<li><a href="3dd93bb75a"><code>3dd93bb</code></a> Fix typo: ereased -&gt; erased</li>
<li><a href="7ea6275caa"><code>7ea6275</code></a> Update CI for i686 ubuntu</li>
<li><a href="af664807da"><code>af66480</code></a> Allow FnMut for validate (<a href="https://github.com/mitsuhiko/dialoguer/issues/96">#96</a>)</li>
<li><a href="2b5722d0f5"><code>2b5722d</code></a> Update README.md</li>
<li><a href="2df3a705eb"><code>2df3a70</code></a> Update ci.yml</li>
<li><a href="8cebf522b3"><code>8cebf52</code></a> Merge pull request <a href="https://github.com/mitsuhiko/dialoguer/issues/94">#94</a> from mitsuhiko/remove-travis</li>
<li>Additional commits viewable in <a href="https://github.com/mitsuhiko/dialoguer/compare/0.7.1...0.8.0">compare view</a></li>
</ul>
</details>
<br />


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

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually 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>

331: Bump tokio from 1.0.2 to 1.3.0 r=thomaseizinger a=dependabot[bot]

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.0.2 to 1.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/tokio-rs/tokio/releases">tokio's releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.3.0</h2>
<h3>Added</h3>
<ul>
<li>coop: expose an <code>unconstrained()</code> opt-out (<a href="https://github.com/tokio-rs/tokio/issues/3547">#3547</a>)</li>
<li>net: add <code>into_std</code> for net types without it (<a href="https://github.com/tokio-rs/tokio/issues/3509">#3509</a>)</li>
<li>sync: add <code>same_channel</code> method to <code>mpsc::Sender</code> (<a href="https://github.com/tokio-rs/tokio/issues/3532">#3532</a>)</li>
<li>sync: add <code>{try_,}acquire_many_owned</code> to <code>Semaphore</code> (<a href="https://github.com/tokio-rs/tokio/issues/3535">#3535</a>)</li>
<li>sync: add back <code>RwLockWriteGuard::map</code> and <code>RwLockWriteGuard::try_map</code> (<a href="https://github.com/tokio-rs/tokio/issues/3348">#3348</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>sync: allow <code>oneshot::Receiver::close</code> after successful <code>try_recv</code> (<a href="https://github.com/tokio-rs/tokio/issues/3552">#3552</a>)</li>
<li>time: do not panic on <code>timeout(Duration::MAX)</code> (<a href="https://github.com/tokio-rs/tokio/issues/3551">#3551</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>doc: doc aliases for pre-1.0 function names (<a href="https://github.com/tokio-rs/tokio/issues/3523">#3523</a>)</li>
<li>io: fix typos (<a href="https://github.com/tokio-rs/tokio/issues/3541">#3541</a>)</li>
<li>io: note the EOF behaviour of <code>read_until</code> (<a href="https://github.com/tokio-rs/tokio/issues/3536">#3536</a>)</li>
<li>io: update <code>AsyncRead::poll_read</code> doc (<a href="https://github.com/tokio-rs/tokio/issues/3557">#3557</a>)</li>
<li>net: update <code>UdpSocket</code> splitting doc (<a href="https://github.com/tokio-rs/tokio/issues/3517">#3517</a>)</li>
<li>runtime: add link to <code>LocalSet</code> on <code>new_current_thread</code> (<a href="https://github.com/tokio-rs/tokio/issues/3508">#3508</a>)</li>
<li>runtime: update documentation of thread limits (<a href="https://github.com/tokio-rs/tokio/issues/3527">#3527</a>)</li>
<li>sync: do not recommend <code>join_all</code> for <code>Barrier</code> (<a href="https://github.com/tokio-rs/tokio/issues/3514">#3514</a>)</li>
<li>sync: documentation for <code>oneshot</code> (<a href="https://github.com/tokio-rs/tokio/issues/3592">#3592</a>)</li>
<li>sync: rename <code>notify</code> to <code>notify_one</code> (<a href="https://github.com/tokio-rs/tokio/issues/3526">#3526</a>)</li>
<li>time: fix typo in <code>Sleep</code> doc (<a href="https://github.com/tokio-rs/tokio/issues/3515">#3515</a>)</li>
<li>time: sync <code>interval.rs</code> and <code>time/mod.rs</code> docs (<a href="https://github.com/tokio-rs/tokio/issues/3533">#3533</a>)</li>
</ul>
<h2>Tokio v1.2.0</h2>
<h3>Added</h3>
<ul>
<li>signal: make <code>Signal::poll_recv</code> method public (<a href="https://github.com/tokio-rs/tokio/issues/3383">#3383</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>time: make <code>test-util</code> paused time fully deterministic (<a href="https://github.com/tokio-rs/tokio/issues/3492">#3492</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>sync: link to new broadcast and watch wrappers (<a href="https://github.com/tokio-rs/tokio/issues/3504">#3504</a>)</li>
</ul>
<h2>Tokio v1.1.1</h2>
<p>Forward ports 1.0.3 fix.</p>
<h3>Fixed</h3>
<ul>
<li>io: memory leak during shutdown (<a href="https://github.com/tokio-rs/tokio/issues/3477">#3477</a>).</li>
</ul>
<h2>Tokio v1.1.0</h2>
<h3>Added</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d0e4dd1d7b"><code>d0e4dd1</code></a> chore: prepare Tokio v1.3.0 (<a href="https://github.com/tokio-rs/tokio/issues/3597">#3597</a>)</li>
<li><a href="872bc09e83"><code>872bc09</code></a> examples: update chat example (<a href="https://github.com/tokio-rs/tokio/issues/3587">#3587</a>)</li>
<li><a href="db1d90453c"><code>db1d904</code></a> util: fuse PollSemaphore (<a href="https://github.com/tokio-rs/tokio/issues/3578">#3578</a>)</li>
<li><a href="05eeea570e"><code>05eeea5</code></a> coop: expose an unconstrained() opt-out (<a href="https://github.com/tokio-rs/tokio/issues/3547">#3547</a>)</li>
<li><a href="f70b9b84f7"><code>f70b9b8</code></a> sync: documenation for oneshot (<a href="https://github.com/tokio-rs/tokio/issues/3592">#3592</a>)</li>
<li><a href="704de8c01b"><code>704de8c</code></a> stream: remove duplicate <code>doc(test(..))</code> &amp; <code>cfg_attr</code> declarations (<a href="https://github.com/tokio-rs/tokio/issues/3571">#3571</a>)</li>
<li><a href="47be928444"><code>47be928</code></a> sync: yield initial value in WatchStream (<a href="https://github.com/tokio-rs/tokio/issues/3576">#3576</a>)</li>
<li><a href="e06b257e09"><code>e06b257</code></a> sync: add same_channel method to mpsc Senders (<a href="https://github.com/tokio-rs/tokio/issues/3532">#3532</a>)</li>
<li><a href="0867a6fc03"><code>0867a6f</code></a> util: add pollable mpsc::Sender (<a href="https://github.com/tokio-rs/tokio/issues/3490">#3490</a>)</li>
<li><a href="0d838bf5ad"><code>0d838bf</code></a> io: fix link to std src in util (<a href="https://github.com/tokio-rs/tokio/issues/3568">#3568</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-1.0.2...tokio-1.3.0">compare view</a></li>
</ul>
</details>
<br />


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

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually 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-03-17 11:02:11 +00:00
.cargo .cargo/config.toml for specifying linker 2021-03-15 14:36:05 +11:00
.github Bump actions/setup-python from v1 to v2.2.1 2021-03-17 07:52:29 +00:00
monero-harness Bump tokio from 1.0.2 to 1.3.0 2021-03-17 10:53:55 +00:00
monero-rpc Remove unused field 2021-03-11 15:34:27 +11:00
swap Merge #327 #330 #331 2021-03-17 11:02:11 +00:00
tokio-tar Download and run monero wallet rpc on swap cli startup 2021-02-25 11:21:41 +11:00
.gitignore Push cargo lock to git as we are building a binary 2020-12-01 09:31:41 +11:00
bors.toml Re-introduce punish test 2021-03-16 18:34:00 +11:00
Cargo.lock Merge #327 #330 #331 2021-03-17 11:02:11 +00:00
Cargo.toml Split monero-harness into harness and rpc 2021-02-23 14:30:20 +11:00
LICENSE Change license to GPLv3 2020-10-12 17:13:25 +11:00
README.md Minor fixes in README.md 2021-03-16 13:05:43 +11:00
rust-toolchain Add asb to release including ARM build 2021-03-15 09:58:18 +11:00
rustfmt.toml Change imports_granularity to module 2021-03-04 14:48:13 +11: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.

Quick start

  1. Download the latest release for your operating system
  2. Run the binary: ./swap buy-xmr --receive-address <YOUR MONERO ADDRESS>
  3. Follow the instructions printed to the terminal

Limitations

For now, the MVP is limited to testnet3 on Bitcoin and stagenet on Monero.

How it works

This repository primarily hosts two components:

  • the swap CLI
  • the asb service

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.

Contact

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