From a4a5d6002c6f635378ead86aa703bbb20b494762 Mon Sep 17 00:00:00 2001 From: ZmnSCPxj Date: Sun, 4 Mar 2018 22:37:50 +0000 Subject: [PATCH] pylightning: Add new waitsendpay command --- contrib/pylightning/lightning/lightning.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contrib/pylightning/lightning/lightning.py b/contrib/pylightning/lightning/lightning.py index 0f3c498a0..0503eb57e 100644 --- a/contrib/pylightning/lightning/lightning.py +++ b/contrib/pylightning/lightning/lightning.py @@ -264,6 +264,16 @@ class LightningRpc(UnixDomainSocketRpc): } return self.call("sendpay", payload) + def waitsendpay(self, payment_hash, timeout=None): + """ + Wait for payment for preimage of {payment_hash} to complete + """ + payload = { + "payment_hash": payment_hash, + "timeout": timeout + } + return self.call("waitsendpay", payload) + def pay(self, bolt11, msatoshi=None, description=None, riskfactor=None): """ Send payment specified by {bolt11} with optional {msatoshi}