From 6470630db98b146239bbd616d118a4c9d9c7bf58 Mon Sep 17 00:00:00 2001 From: Conor Scott Date: Tue, 13 Nov 2018 17:10:37 +0400 Subject: [PATCH] [doc] Add lightning-pay script as example for using pylightning library --- contrib/pylightning/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/contrib/pylightning/README.md b/contrib/pylightning/README.md index 441ad02d9..fe18070d1 100644 --- a/contrib/pylightning/README.md +++ b/contrib/pylightning/README.md @@ -14,9 +14,12 @@ pylightning is available on pip pip install pylightning ``` -### Example +### Examples ```py +""" +Generate invoice on one daemon and pay it on the other +""" from lightning import LightningRpc import random @@ -38,3 +41,11 @@ print(route) # Pay invoice print(l1.sendpay(route['route'], invoice['payment_hash'])) ``` + +Also see the included [lightning-pay](./lightning-pay) script, which uses the client library to pay invoices + +```sh +lightning-pay +# or explicitly with +lightning-pay +```