This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This app is an example of how you could charge for access to an API using | |
the lightning network and LND. The example uses a JWT token that grants 1-hour access | |
(the default jwt token expirey) but many different payment schemes could be | |
imagined (bulk payments/pay per call etc). | |
But for now I just wanted to show how simple it could be to add a paywall to an api service. | |
To use this api: | |
1. Make a POST request to get a new token and invoice at `/token` |