App Submission: Fedimint Lightning Gateway (#4554)
This commit is contained in:
parent
d7c93503a5
commit
e103bfbda8
9
fedimint-gateway/data/entrypoint.sh
Executable file
9
fedimint-gateway/data/entrypoint.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Bcrypt hash the password before giving it to the gateway
|
||||
export FM_GATEWAY_BCRYPT_PASSWORD_HASH=$(gateway-cli create-password-hash $APP_PASSWORD \
|
||||
| sed 's/^"//; s/"$//' \
|
||||
| sed 's/\$/$$/g'
|
||||
)
|
||||
|
||||
gatewayd lnd
|
||||
33
fedimint-gateway/docker-compose.yml
Normal file
33
fedimint-gateway/docker-compose.yml
Normal file
@ -0,0 +1,33 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
app_proxy:
|
||||
environment:
|
||||
APP_HOST: fedimint-gateway_gatewayd_1
|
||||
APP_PORT: 8178 # ui
|
||||
|
||||
gatewayd:
|
||||
image: fedimint/gatewayd:v0.10.0@sha256:4e9a41fe0f0705c463709fa34bdcbc4e29e396bb99ab5c2cc101fc5db2ac3069
|
||||
restart: on-failure
|
||||
ports:
|
||||
- 8177:8177/udp # iroh
|
||||
volumes:
|
||||
- ${APP_DATA_DIR}/data:/data
|
||||
- ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro
|
||||
environment:
|
||||
FM_GATEWAY_DATA_DIR: "/data"
|
||||
FM_GATEWAY_NETWORK: ${APP_BITCOIN_NETWORK_ELECTRS}
|
||||
FM_GATEWAY_LISTEN_ADDR: 0.0.0.0:8178
|
||||
FM_GATEWAY_IROH_LISTEN_ADDR: 0.0.0.0:8177
|
||||
APP_PASSWORD: "${APP_PASSWORD}"
|
||||
|
||||
# LND connection environment variables
|
||||
FM_LND_RPC_ADDR: "https://${APP_LIGHTNING_NODE_IP}:${APP_LIGHTNING_NODE_GRPC_PORT}"
|
||||
FM_LND_TLS_CERT: "/lnd/tls.cert"
|
||||
FM_LND_MACAROON: "/lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/admin.macaroon"
|
||||
|
||||
# Bitcoind connection environment variables
|
||||
FM_BITCOIND_USERNAME: ${APP_BITCOIN_RPC_USER}
|
||||
FM_BITCOIND_PASSWORD: ${APP_BITCOIN_RPC_PASS}
|
||||
FM_BITCOIND_URL: "http://${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_RPC_PORT}"
|
||||
entrypoint: /data/entrypoint.sh
|
||||
50
fedimint-gateway/umbrel-app.yml
Normal file
50
fedimint-gateway/umbrel-app.yml
Normal file
@ -0,0 +1,50 @@
|
||||
manifestVersion: 1
|
||||
id: fedimint-gateway
|
||||
category: bitcoin
|
||||
name: Fedimint Lightning Gateway
|
||||
version: "v0.10.0"
|
||||
tagline: Lightning routing for Fedimints
|
||||
description: >-
|
||||
The Fedimint Lightning Gateway is an ecash wallet that connects Fedimint users to the broader Lightning Network. Operators can earn fees by providing outbound
|
||||
and inbound Lightning liquidity via their existing LND node.
|
||||
|
||||
# Key Characteristics
|
||||
- Trust Model: Just like a Lightning node, a Lightning Gateway is not a custodian of the payments it is routing. Lightning Gateways should trust the federations they provide liquidity services to, but users do not need to trust the Lightning Gateway.
|
||||
|
||||
- Multi-federation support: A single gateway can service multiple Fedimints simultaneously and swap ecash when payments occur between federations, bypassing the Lightning Network altogether.
|
||||
|
||||
- Liquidity Management: Also like a Lightning node, gateways must maintain ecash balances in each federation to facilitate incoming payments, similar to inbound liquidity in Lightning.
|
||||
|
||||
# Operating a Lightning Gateway
|
||||
|
||||
1. Installing a Lightning Gateway is easy, just one click and it connects to your already provisioned LND node!
|
||||
|
||||
2. Make sure your LND node has sufficient connectivity to the broader Lightning Network, ideally with balanced outbound and inbound liquidity.
|
||||
|
||||
3. Operators must then connect to a federation using the federation's invite code.
|
||||
|
||||
4. After connected, operators must pegin some ecash to the federation so that there is inbound liquidity.
|
||||
|
||||
5. After the operator has obtained the ecash, the connection URL of the Lightning Gateway can be provided to the guardians. The guardians will then advertise that this Lightning Gateway is providing Lightning services to the federation.
|
||||
|
||||
6. All set! The Fedimint can now send and receive payments over the Lightning Network.
|
||||
|
||||
developer: Fedimint Developers
|
||||
website: https://fedimint.org/
|
||||
dependencies:
|
||||
- bitcoin
|
||||
- lightning
|
||||
repo: https://github.com/fedimint/fedimint
|
||||
support: https://github.com/fedimint/fedimint/issues
|
||||
port: 8178
|
||||
gallery:
|
||||
- 1.jpg
|
||||
- 2.jpg
|
||||
- 3.jpg
|
||||
path: ""
|
||||
deterministicPassword: true
|
||||
defaultUsername: ""
|
||||
defaultPassword: ""
|
||||
submitter: Fedimint Developers
|
||||
submission: https://github.com/getumbrel/umbrel-apps/pull/4554
|
||||
releaseNotes: ""
|
||||
@ -43,9 +43,10 @@ description: >-
|
||||
|
||||
Fedimint supports Lightning payments via a Lightning Gateway. To use Lightning in your federation, there are two options:
|
||||
|
||||
1. Use an existing Lightning Gateway. [Reach out on Discord to get setup](https://chat.fedimint.org).
|
||||
1. Run your own! - [Deploy a Lightning Gateway on your Umbrel](https://apps.umbrel.com/app/fedimint-gateway).
|
||||
|
||||
2. Use an existing Lightning Gateway. [Reach out on Discord to get setup](https://chat.fedimint.org).
|
||||
|
||||
2. Run your own - [see Lightning Gateway docs for more information](https://github.com/fedimint/fedimint/blob/master/docs/gateway.md).
|
||||
|
||||
developer: Fedimint Developers
|
||||
website: https://fedimint.org/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user