2 unstable releases
0.2.0 | Nov 23, 2022 |
---|---|
0.1.0 | Oct 14, 2022 |
#7 in #ln
12MB
1.5K
SLoC
Contains (WOFF font, 315KB) boxicons.woff, (WOFF font, 150KB) bootstrap-icons.woff, (WOFF font, 115KB) bootstrap-icons.woff2, (WOFF font, 115KB) boxicons.woff2
Lightning address federated server implementation in Rust
Live Version |
Documentation
Crates.io
·
Report a Bug
·
Feature Request
About The Project
This is a rust implementation of Federated Lightning Address Server.
Lightning address / alias helps with greatly improving the user experience of using LN payments by using email-like addresses for recieving and sending bitcoin lightning payments.
The federated server allows you to easily handle LN Address requests and add those capabilties to the domains you own.
The project consists of server and cli tool:
- Server is responsible for handling requests from LN wallets and serving the alias reservation page and APIs.
- CLI tool can be used to interact with the embedded database in order to export/import data or generate usage statistics.
Keysend
Currently sataddress
is the only federated server supporting keysend (pubkey) aliasing implementation.
The solution is being achieved by introducing an intermediate lightning node which recieves payments and forwards them automatically to the desination node.
Thanks to the setup above, the user does not have to expose the API (including secrets) of their Lightning Node and is able to recieve payments passively.
Getting Started
First, check out the latest deployed version at satspay.to
The easiest way to run the server is just using the automatically published docker container.
You can configure the container easily by providing enivronment variables either by passing them to docker or by putting them into dot-env
file.
# .env file
DOMAINS=sataddress.rs,another-domain.com
PIN_SECRET=my-secret-phrase
SITE_NAME=SATADDRESS
SITE_SUB_NAME=.rs
# keysend requires lnbits proxy to work
LNBITS_URL=http://127.0.0.1:5001
LNBITS_API_KEY=THE_API_KEY
LNBITS_ADMIN_ID=ADMIN_ID_UNDER_WHICH_SUBACCOUNTS_ARE_CREATED
Once you have your config figured out, just run the container:
$ docker run -v $(pwd)/.env:/opt/sataddress/.env -v $(pwd)/sataddress.db:/opt/sataddress/sataddress.db --name sataddress -it --rm sataddress:latest
As an alternative, if you're familiar with the rust toolset, you can use just which will also automatically load your .env
file.
$ just run
Roadmap
- keysend support
- improve tests
- add REST API functionality for data manipulation
- better error generation & handling
- customizable image, memo, max/min invoice sats
- implementation for more backends/nodes (contributions welcome!)
See the open issues for a full list of proposed features (and known issues).
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Bernard Kobos - @bkobos - bkobos+nospam!@gmail.com
Project Link: https://github.com/bernii/sataddress-rs
Acknowledgments
- satdress original federated lightning address server implementation which this implementation is based on
- go-lnurl which was helpful for learning about LN URL structures
- Lightning Address documentation and explanations
- BTC lightning logo for creating an open source vector btc logo
Dependencies
~17–31MB
~491K SLoC