A new accounting wrapper for the Lightning Network written in Go
Today we are announcing LndHub.go, a Go implementation of a LndHub server.
First released in 2018, BlueWallet was one of the first wallets to implement support for the Lightning Network on both Android and iOS. The BlueWallet team pragmatically asserted at the time that for amounts in the context of day-to-day spending, the UX improvement of a custodial Lightning wallet far outweighs the risks that come with it.
Open-sourcing their backend meant that anyone could deploy their own instance and connect BlueWallet directly to their own wallet, or even start their own lightning-bank for their family, friends or community.
At Alby we leveraged the simplicity of the LndHub API to allow users to import their existing BlueWallet Lightning wallets directly into their browser and experience the Lightning-native web. Vice versa, users that don't yet have a Lightning wallet can create an Alby-hosted wallet and import it into the BlueWallet or Zeus mobile applications. This way, your Lightning wallet is always with you, no matter what platform you are on.
Accounting tools can not only be helpful for external end-users. They can also be used internally in a system, to allow existing applications to send and receive lightning transactions. Either an hosted service can be used or if you run your own node, it is useful to interact with it through an accounting layer. LndHub with its simple HTTP REST API can be very helpful here.
In general, we believe that community banking concepts and shared-custody of funds among community or circle of friends are very helpful for Bitcoin adoption. LndHub provides a simple accounting solution that makes it possible for everyone to provide lightning accounts to their friends and family.
We have decided to write an implementation of LndHub in Go that focuses on simplicity, maintainability and ease of deployment.
There are multiple reasons why this seems like a good idea:
- No runtime dependencies (all you need is a single binary executable), as opposed to the current implementation which requires a NodeJS runtime.
- Use of an ORM (bun) to support deployments with SQLite and PostgreSQL as databases, a more conventional approach than using Redis.
- Support multiple node backends, where LndHub currently only supports LND. (Hello BOLT12 👀)
- Using constraints and functions in the DB to prevent inconsistent data.
- Extensibility to add more features or plugins later on. Why not let the user have fiat-denominated accounts?
- The BlueWallet team has currenlty shifted it's attention more towards a non-custodial mobile wallet using LDK.
We have released version 0.2.0 - “Blown away by Eunice” on GitHub where you can also follow the development.
If you have feedback how a simple accounting system can be helpful for you or if you have feature ideas, then please let us know.