Skip to content

Commit

Permalink
Add a method to the pyln-client for using the sendcustommsg api
Browse files Browse the repository at this point in the history
  • Loading branch information
gkrizek authored and cdecker committed Feb 7, 2024
1 parent f56b9e9 commit f5ddb89
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contrib/pyln-client/pyln/client/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,16 @@ def plugin_rescan(self):
}
return self.call("plugin", payload)

def sendcustommsg(self, peer_id, message):
"""
Sending custom message {message} to {peer_id}.
"""
payload = {
"node_id": peer_id,
"msg": message
}
return self.call("sendcustommsg", payload)

def sendpay(self, route, payment_hash, label=None, amount_msat=None, bolt11=None, payment_secret=None, partid=None, groupid=None, payment_metadata=None):
"""
Send along {route} in return for preimage of {payment_hash}.
Expand Down

0 comments on commit f5ddb89

Please sign in to comment.