Several APIs, written in Go, with a paywall that's payable via the Lightning Network
925
This Docker image contains the paywalled API of https://lightning.ws, which is an example API for the project ln-paywall. For more information please visit https://github.com/philippgille/ln-paywall.
latest (Dockerfile)develop (Dockerfile)mkdir datatls.cert and invoice.macaroon from your lnd to the data directorydocker run -d --restart unless-stopped -v $(pwd)/data:/root/data -p 8080:8080 philippgille/ln-ws-api -addr "123.123.123.123:10009" -translateApiKey "abc123def456" -visionRegion "westus" -visionApiKey "abc123def456"curl http://localhost:8080/qrcurl http://localhost:8080/translatecurl http://localhost:8080/ocrcurl -H "x-preimage: 123abc456def" http://localhost:8080/qr?data=testtextcurl -H "x-preimage: 123abc456def" http://localhost:8080/translate?text=Hallo%Welt&to=encurl -H "x-preimage: 123abc456def" http://localhost:8080/ocr?imageUrl=http%3A%2F%2Fexample%2Ecom%2Fimage%2EpngThe response contains: - QR code: The QR code as PNG image - Translation: A JSON array with the translated text and other info - OCR: A JSON object with the bounding boxes and text of recognized text
You can try out a deployed version on https://lightning.ws.
-addr string
Address of the lnd node (including gRPC port) (default "localhost:10009")
-dataDir string
Relative path to the data directory, where tls.cert and invoice.macaroon are located (default "data/")
-ocrPrice int
Price of one request in Satoshis (at an exchange rate of $1,000 for 1 BTC 1000 Satoshis would be $0.01) (default 1000)
-qrPrice int
Price of one request in Satoshis (at an exchange rate of $1,000 for 1 BTC 1000 Satoshis would be $0.01) (default 1000)
-translateApiKey string
Azure Cognitive Services subscription key for the "Translator Text API"
-translatePrice int
Price of one request in Satoshis (at an exchange rate of $1,000 for 1 BTC 1000 Satoshis would be $0.01) (default 1000)
-visionApiKey string
Azure Cognitive Services subscription key for "Computer Vision"
-visionRegion string
Azure region of your created Azure resource - your "Computer Vision" subscription key is bound to this region (default "westcentralus")
Content type
Image
Digest
Size
8.2 MB
Last updated
about 8 years ago
docker pull philippgille/ln-ws-api