Monetize your API with LND
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
src
.eslintrc.json
.gitignore
LICENSE
README.md
package-lock.json
package.json

README.md

lncall npm dependencies status

Monetize your API with the Lightning Network Daemon. This project is literally the same as paypercall but for LND instead of c-lightning.

lncall can be used as library for node.js or as reverse proxy for your existing API.

Library

You can implement lncall directly into your node.js application. Please note that if you want to use the middleware function you have to use express. If you don't want to use express you can handle the tokens lncall generates yourself because middleware is just a wrapper of the other functions of lncall.

You can find an example for using lncall here.

Reverse proxy

lncall can also be used as reverse proxy. The rates have to be a JSON string with the API URL as key and the amount you want to charge in Satoshis as value. It could look like this:

{
    "/sms": 125,
    "/test": 1
}