Go middleware for monetizing APIs with per-request Bitcoin Lightning Network payments.
ln-paywall is a Go middleware that enables API monetization through per-request payments via the Bitcoin Lightning Network. It solves traditional paywall issues like high fees, centralization, and privacy concerns by leveraging near-instant microtransactions with extremely low fees.
Go developers building web services or APIs who want to monetize access on a per-request basis using the Lightning Network, particularly those using frameworks like Gin, Echo, gorilla/mux, httprouter, chi, or net/http.
Developers choose ln-paywall because it offers multi-framework support, integrates with major Lightning Network nodes (lnd and c-lightning via Lightning Charge), and provides flexible storage backends for caching payment preimages, making decentralized API monetization simple and efficient.
Go middleware for monetizing your API on a per-request basis with Bitcoin and Lightning ⚡️
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Gin, Echo, gorilla/mux, httprouter, chi, and standard net/http, making integration straightforward for most Go web services.
Leverages near-instant microtransactions with low fees via lnd or c-lightning, solving traditional paywall issues like high costs and centralization.
Offers in-memory, bbolt, and Redis options, allowing tailored setups from single instances to horizontally scaled services with persistent caching.
Provides a payment-handling HTTP client that abstracts Lightning Network complexity, simplifying consumption of paywalled APIs.
Requires running and securing a Lightning Network node (lnd or c-lightning with Lightning Charge), adding significant setup and operational overhead.
In-memory and bbolt backends don't support horizontal scaling, forcing Redis adoption for distributed environments, which introduces additional infrastructure.
As a version 0.x project, it may introduce breaking changes per Semantic Versioning, requiring careful version management and potential code updates.