Skip to content

Commit

Permalink
Merge pull request #37 from Impa10r/v1.3.7
Browse files Browse the repository at this point in the history
v1.3.7
  • Loading branch information
Impa10r authored May 15, 2024
2 parents 405805f + bc1cfba commit a4ea6a6
Show file tree
Hide file tree
Showing 13 changed files with 506 additions and 163 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Versions

## 1.3.7

- Enable automatic Liquid swap-ins
- Report fees paid via LN for initiated swap-outs
- Fix rotating hourglass
- Fix failed swaps shortening flow timeframe

## 1.3.6

- Fix Elements host and port values passed via Env
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
![image](https://github.com/Impa10r/peerswap-web/assets/101550606/7ca46925-d892-491e-8e0b-326dd882b836)
![image](https://github.com/Impa10r/peerswap-web/assets/101550606/80f8f9a0-7771-47ad-8484-27c79a8ff37f)

# PeerSwap Web UI

A lightweight server-side rendered Web UI for PeerSwap, which allows trustless p2p submarine swaps Lightning<->BTC and Lightning<->Liquid. Also facilitates BTC->Liquid peg-ins. PeerSwap with [Liquid](https://help.blockstream.com/hc/en-us/articles/900001408623-How-does-Liquid-Bitcoin-L-BTC-work) is a great cost efficient way to [rebalance lightning channels](https://medium.com/@goryachev/liquid-rebalancing-of-lightning-channels-2dadf4b2397a).

### Disclaimer

This source code is free speech. The contributors do not solicit its use for any purpose, do not control, are not responsible for and gain no financial benefits from such use.

# Setup

## Install dependencies
Expand Down Expand Up @@ -133,7 +137,7 @@ sudo systemctl restart psweb

Take care to backup PeerSwap wallet after each Liquid transaction. In case of a catastrophic failure of your SSD all L-BTC funds may be lost. Always run your node with a UPS.

Back up is done from the Liquid page. The file name ```<hexkey>.bak``` is your master blinding key hex. The contents is the backup of wallet.dat. For safety, this .bak will be zipped with the same password as the Elements RPC. For Umbrel, this is the password displayed in the Elements Core App. For the rest, this is the .elements/elements.conf rpcpassword parameter.
Backup is done from the Liquid page. The file name ```<hexkey>.bak``` is your master blinding key hex. The contents is the backup of wallet.dat. For safety, this .bak will be zipped with the same password as the Elements RPC. For Umbrel, this is the password displayed in the Elements Core App. For the rest, this is the .elements/elements.conf rpcpassword parameter.

**Make sure you keep this password safe in a separate location!**

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Bootstrapping a secure connection over an insecure network and avoiding MITM att

## Privacy Disclosure

There is no centralized server. PeerSwap Web UI does not share your private data with the developers. The software, however, may utilize API endpoints of github.com, mempool.space, telegram.org and getblock.io to send and receive certain information. You can avoid leaking your IP address to these websites by specifying a Tor proxy on the Configuration page. You may also provide URL of a locally installed Mempool server.
There is no centralized server. PeerSwap Web UI does not share your private data with the contributors. The software, however, may utilize API endpoints of github.com, mempool.space, telegram.org and getblock.io to send and receive certain information. You can avoid leaking your IP address to these websites by specifying a Tor proxy on the Configuration page. You may also provide URL of a locally installed Mempool server.

Getblock runs a publicly available Bitcoin Core server. It is used as a fallback when your local installation is not accessible via API or is not configured to enable Liquid peg-ins. The default account is anonymous, but the developers of PeerSwap Web UI do have access to monitor usage statistics. You may opt out by registering your own free account at getblock.io and providing its endpoint, or by running your local suitably configured Bitcoin Core software.
Getblock runs a publicly available Bitcoin Core server. It is used as a fallback when your local installation is not accessible via API or is not configured to enable Liquid peg-ins. The default account is anonymous, but some contributors may have access to monitor usage statistics. You may opt out by registering your own free account at getblock.io and providing its endpoint, or by running your local suitably configured Bitcoin Core software.

## Reporting a Vulnerability

Expand Down
73 changes: 40 additions & 33 deletions cmd/psweb/config/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,43 @@ import (
)

type Configuration struct {
AllowSwapRequests bool
RpcHost string
ListenPort string
ColorScheme string
BitcoinApi string // for bitcoin tx links
LiquidApi string // for liquid tx links
NodeApi string // for node links
MaxHistory uint
DataDir string
ElementsUser string
ElementsPass string
BitcoinSwaps bool
Chain string
LocalMempool string
ElementsDir string // what Elements see inside its docker container
ElementsDirMapped string // what will be mapped to PeerSwap docker
ElementsBackupAmount uint64
ElementsHost string
ElementsPort string
ElementsWallet string
TelegramToken string
TelegramChatId int64
PeginClaimScript string
PeginTxId string
PeginReplacedTxId string
PeginAddress string
PeginAmount int64
PeginFeeRate uint32
LightningDir string
BitcoinHost string
BitcoinUser string
BitcoinPass string
ProxyURL string
AllowSwapRequests bool
RpcHost string
ListenPort string
ColorScheme string
BitcoinApi string // for bitcoin tx links
LiquidApi string // for liquid tx links
NodeApi string // for node links
MaxHistory uint
DataDir string
ElementsUser string
ElementsPass string
BitcoinSwaps bool
Chain string
LocalMempool string
ElementsDir string // what Elements see inside its docker container
ElementsDirMapped string // what will be mapped to PeerSwap docker
ElementsBackupAmount uint64
ElementsHost string
ElementsPort string
ElementsWallet string
TelegramToken string
TelegramChatId int64
PeginClaimScript string
PeginTxId string
PeginReplacedTxId string
PeginAddress string
PeginAmount int64
PeginFeeRate uint32
LightningDir string
BitcoinHost string
BitcoinUser string
BitcoinPass string
ProxyURL string
AutoSwapEnabled bool
AutoSwapThresholdAmount uint64
AutoSwapThresholdPPM uint64
AutoSwapTargetPct uint64
}

var Config Configuration
Expand Down Expand Up @@ -72,6 +76,9 @@ func Load(dataDir string) {
Config.NodeApi = "https://amboss.space/node"
Config.BitcoinApi = "https://mempool.space"
Config.LiquidApi = "https://liquid.network"
Config.AutoSwapThresholdAmount = 5000000
Config.AutoSwapThresholdPPM = 500
Config.AutoSwapTargetPct = 50

if os.Getenv("NETWORK") == "testnet" {
Config.Chain = "testnet"
Expand Down
Loading

0 comments on commit a4ea6a6

Please sign in to comment.