lightningd: make notifications from plugins just like native ones.

Rather than forcing them to wrap their parameters in a "payload"
sub-object, copy in params directly.  We include the "origin" field
one level up, if they care.

The next patch restores compatibility for the one place we currently use
them, which is the pay plugin.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: pyln-client: plugin custom notifications origins and payload (use parameters directly)
This commit is contained in:
Rusty Russell
2025-08-17 09:39:12 +09:30
parent fc5edea999
commit 16819f345d
9 changed files with 160 additions and 38 deletions

View File

@@ -22,6 +22,7 @@ hidden: false
| coin_movement.utxo_txid | Notification Field | v25.09 | v26.09 | Use `utxo` instead of `utxo_txid` & `vout` |
| coin_movement.txid | Notification Field | v25.09 | v26.09 | Use `spending_txid` instead |
| channel_state_changed.null_scid | Notification Field | v25.09 | v26.09 | In channel_state_changed notification, `short_channel_id` will be missing instead of `null` |
| notification.payload | Notification Field | v25.09 | v26.09 | Notifications from plugins used to have fields in `payload` sub-object, now they are not (just like normal notifications) |
Inevitably there are features which need to change: either to be generalized, or removed when they can no longer be supported.