Commit Graph

15 Commits (9ac5b635d72c6bb2bccdadd70bb8261c7fec5983)

Author SHA1 Message Date
Philipp Hoenisch fc0cceb180
Toggle json logs using commandline flag. 3 years ago
Daniel Karzel 1d62f4916c
Move `max_buy` and `ask_spread` into config
Max-buy and spread is not something that one would configure on every run.
More convenient to keep this in the config.

The max-buy Bitcoin value was adapted to `0.02` which is more reasonable for mainnet.
Activated feature `serde-float` to serialize the spread (Decimal) as float instead of string.

```
...

[maker]
max_buy_btc = 0.02
ask_spread = 0.02
```
3 years ago
Daniel Karzel daa572e5bf
Move recovery commands in dedicated module
Less clutter in the folder structure.
3 years ago
Daniel Karzel 4deb96a3c5
ASB manual recovery commands
Adds `cancel`, `refund`, `punish`, `redeem` and `safely-abort` commands to the ASB that can be used to trigger the specific scenario for the swap by ID.
3 years ago
Daniel Karzel efcd39eeef
Add info messages to each subcommand
`asb --help` :

(...)

SUBCOMMANDS:
    balance         Prints the Bitcoin and Monero balance. Requires the monero-wallet-rpc to be running.
    help            Prints this message or the help of the given subcommand(s)
    history         Prints swap-id and the state of each swap ever made.
    start           Main command to run the ASB.
    withdraw-btc    Allows withdrawing BTC from the internal Bitcoin wallet.
3 years ago
Daniel Karzel f6497778ed
Add resume-only mode for the ASB
Resume-only is a maintenance mode where no swaps are accepted but unfinished swaps are resumed.
This is achieve by ignoring incoming spot-price requests (that would lead to execution setup) in the event-loop.
3 years ago
Thomas Eizinger a99d12b9df
Add a configurable spread to the ASB
Fixes #381.
3 years ago
Daniel Karzel 04b49d7117 Add command to print Bitcoin and Monero balance 3 years ago
Daniel Karzel 96008ec130 Add command to withdraw BTC
If no amount is given the wallet will be drained.
3 years ago
Thomas Eizinger 393ed45b9e
Say who we are in the `--help` message
The message now says:

swap 0.3.0
The COMIT guys <hello@comit.network>
CLI for swapping BTC for XMR

USAGE:
    swap [FLAGS] [OPTIONS] <SUBCOMMAND>

...
3 years ago
Daniel Karzel 105e291e67 Update the application name for `--version` print
swap --version
xmr-btc-swap 0.3.0

asb --version
xmr-btc-asb 0.3.0
3 years ago
Thomas Eizinger 6d9b21cb47
Change `imports_granularity` to module
This reduces the overall amount of LoC that imports take up in our
codebase by almost 100.
It also makes merge-conflicts less likely because there is less
grouping together of imports that may lead to layout changes which
in turn can cause merge conflicts.
3 years ago
Thomas Eizinger 2440964385
Allow ASB to be configured with max BTC buy amount
This will make it easier to also configure the CLI to display an appropriate max amount the user has to deal with.
3 years ago
Daniel Karzel 019d6c725a Maximum sell amount for ASB that defaults to 0.5 XMR 3 years ago
Daniel Karzel fe3d6f1fef Rename nectar to asb (automated swap backend) 3 years ago