swapserver: cleanup, add description
This commit is contained in:
@@ -1,6 +1,15 @@
|
|||||||
from electrum.i18n import _
|
from electrum.i18n import _
|
||||||
|
|
||||||
fullname = _('SwapServer')
|
fullname = _('SwapServer')
|
||||||
description = ''
|
description = """
|
||||||
|
Submarine swap server for an Electrum daemon.
|
||||||
|
|
||||||
|
Example setup:
|
||||||
|
|
||||||
|
electrum -o setconfig use_swapserver True
|
||||||
|
electrum -o setconfig swapserver_address localhost:5455
|
||||||
|
electrum daemon -v
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
available_for = ['qt', 'cmdline']
|
available_for = ['qt', 'cmdline']
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ class SwapServer(Logger, EventListener):
|
|||||||
@ignore_exceptions
|
@ignore_exceptions
|
||||||
@log_exceptions
|
@log_exceptions
|
||||||
async def run(self):
|
async def run(self):
|
||||||
self.root = '/root'
|
|
||||||
app = web.Application()
|
app = web.Application()
|
||||||
app.add_routes([web.get('/api/getpairs', self.get_pairs)])
|
app.add_routes([web.get('/api/getpairs', self.get_pairs)])
|
||||||
app.add_routes([web.post('/api/createswap', self.create_swap)])
|
app.add_routes([web.post('/api/createswap', self.create_swap)])
|
||||||
@@ -57,7 +56,6 @@ class SwapServer(Logger, EventListener):
|
|||||||
"warnings": [],
|
"warnings": [],
|
||||||
"pairs": {
|
"pairs": {
|
||||||
"BTC/BTC": {
|
"BTC/BTC": {
|
||||||
"hash": "dfe692a026d6964601bfd79703611af333d1d5aa49ef5fedd288f5a620fced60",
|
|
||||||
"rate": 1,
|
"rate": 1,
|
||||||
"limits": {
|
"limits": {
|
||||||
"maximal": sm._max_amount,
|
"maximal": sm._max_amount,
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ if [[ $1 == "init" ]]; then
|
|||||||
if [[ $2 == "bob" ]]; then
|
if [[ $2 == "bob" ]]; then
|
||||||
$bob setconfig --offline lightning_listen localhost:9735
|
$bob setconfig --offline lightning_listen localhost:9735
|
||||||
$bob setconfig --offline use_swapserver true
|
$bob setconfig --offline use_swapserver true
|
||||||
#else
|
|
||||||
fi
|
fi
|
||||||
echo "funding $2"
|
echo "funding $2"
|
||||||
$bitcoin_cli sendtoaddress $($agent getunusedaddress -o) 1
|
$bitcoin_cli sendtoaddress $($agent getunusedaddress -o) 1
|
||||||
|
|||||||
Reference in New Issue
Block a user