75 lines
2.4 KiB
Markdown
75 lines
2.4 KiB
Markdown
# Dero Swap Client
|
|
|
|
## Build from source
|
|
Clone the repository to your local disk.\
|
|
Run `go mod tidy` and compile with `go build`.
|
|
|
|
## Configuration
|
|
There are no paramters (yet).\
|
|
Instead, 2 config files are used.\
|
|
Place the following two config files in the program directory.
|
|
- **config.json**
|
|
```
|
|
{
|
|
"server" : (string) IP:Port of swap server,
|
|
"nickname" : (string) name of client,
|
|
"monero_wallet" : (string) IP:Port of Monero Wallet,
|
|
"dero_daemon" : (string) IP:Port of Dero Daemon,
|
|
"dero_wallet" : (string) IP:Port of Dero Wallet,
|
|
"dero_login" : (string, optional) user:password used to access wallet RPC,
|
|
"pairs" : (string array) enabled pairs
|
|
}
|
|
```
|
|
- **fees.json**
|
|
```
|
|
{
|
|
"withdrawal" : {
|
|
"dero-btc" : (float) Bitcoin withdrawal fee,
|
|
"dero-ltc" : (float) Litecoin withdrawal fee,
|
|
"dero-arrr" : (float) Pirate withdrawal fee,
|
|
"dero-xmr" : (float) Monero withdrawal fee
|
|
},
|
|
"swap" : {
|
|
"bid": (float) in percent, Bid fees
|
|
"ask": (float) in percent, Ask fees
|
|
}
|
|
}
|
|
```
|
|
Example file:
|
|
```
|
|
{
|
|
"withdrawal" : {
|
|
"dero-btc" : 0.00004,
|
|
"dero-ltc" : 0.0002,
|
|
"dero-arrr" : 0.001,
|
|
"dero-xmr" : 0.00006
|
|
},
|
|
"swap" : {
|
|
"bid": 0.75,
|
|
"ask": 0.75
|
|
}
|
|
}
|
|
```
|
|
|
|
The mentioned *withdrawal* fees are recommended and can be adjusted later.
|
|
### Available Pairs
|
|
The following Pairs are supported:
|
|
- xmr-dero
|
|
- dero-xmr
|
|
- ltc-dero
|
|
- dero-ltc
|
|
|
|
|
|
## Usage
|
|
The swap client connects to the specified server, provides information about the current balance and listens for incoming swap requests.
|
|
|
|
Download the Monero-CLI files from https://www.getmonero.org/downloads/#cli\
|
|
Create a new wallet. If there is no local daemon, use a remote node\
|
|
(eg. node.moneroworld.com:18089; `./monero-wallet-cli --daemon-address node.moneroworld.com:18089`)\
|
|
Start the RPC server (RPC login not implemented yet)\
|
|
(eg. `./monero-wallet-rpc --daemon-address node.moneroworld.com:18089 --rpc-bind-port 18090 --wallet-file <wallet> --password <wallet_pw> --disable-rpc-login`)\
|
|
Update **config.json**\
|
|
Run client
|
|
|
|
## Important Notes
|
|
The Dero wallet needs the "missing entries" fix! (https://github.com/deroproject/derohe/pull/150) |