mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
plugin:added invoice creation event
New invoice_creation event triggered when an new invoice is created Changelog-Added: plugin: New invoice_creation plugin event
This commit is contained in:
@@ -48,6 +48,14 @@ def on_payment(plugin, invoice_payment, **kwargs):
|
||||
invoice_payment.get("msat")))
|
||||
|
||||
|
||||
@plugin.subscribe("invoice_creation")
|
||||
def on_invoice_creation(plugin, invoice_creation, **kwargs):
|
||||
plugin.log("Received invoice_creation event for label {}, preimage {},"
|
||||
" and amount of {}".format(invoice_creation.get("label"),
|
||||
invoice_creation.get("preimage"),
|
||||
invoice_creation.get("msat")))
|
||||
|
||||
|
||||
@plugin.hook("htlc_accepted")
|
||||
def on_htlc_accepted(onion, htlc, plugin, **kwargs):
|
||||
plugin.log('on_htlc_accepted called')
|
||||
|
||||
Reference in New Issue
Block a user