LIGHTNING-NOTIFI...EL_STATE_CHANGED(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

✨ LIGHTNING-NOTIFI...EL_STATE_CHANGED ✨

ok so bestie, welcome to lightning-notifi...el_state_changed(7) β€” the notification page for when your channel goes through a whole glow-up (or a whole crisis, no in between πŸ’€). This is section 7 of the lightning manual, and it's literally just about one notification. One. But she's iconic.


πŸ’– NAME πŸ’–

channel_state_changed β€” the notification that's like "hey girl, your channel's state just changed" πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So the channel_state_changed notification slides into your notifications whenever the state of the channel has been updated. That's it, that's the whole job. Lowkey the most reliable friend in the group chat 🫢


🌸 NOTIFICATION PAYLOAD 🌸

okay so here's everything that comes in the payload, one by one, no skipping (i would never πŸ™ˆ):

  • peer_id (pubkey) β€” the peer id of the channel. that's your counterparty, your channel buddy ✨
  • channel_id (hash) β€” the channel id of the channel.
  • timestamp (string) β€” the timestamp of the state change. when did it happen, bestie ⏰
  • new_state (string) (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN", "CHANNELD_AWAITING_SPLICE", "DUALOPEND_OPEN_COMMITTED", "DUALOPEND_OPEN_COMMIT_READY", "CLOSED") β€” the channel state. and listen, in particular "CHANNELD_NORMAL" and "CHANNELD_AWAITING_SPLICE" mean the channel can be used normally πŸ‘‘ that's the good timeline.
⚠️ note: the CLOSED state was only added in v25.12. so if you're on something ancient, she's not there yet 😭
  • cause (string) (one of "unknown", "local", "user", "remote", "protocol", "onchain") β€” the cause of the state change. like, who did this. why. πŸ”₯
  • short_channel_id (short_channel_id, optional) β€” the short channel id of the channel. if the channel is not yet confirmed, this field will be null. so don't panic if it's empty, she's just not that far along yet πŸ“
  • old_state (string, optional) (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN", "CHANNELD_AWAITING_SPLICE", "DUALOPEND_OPEN_COMMITTED", "DUALOPEND_OPEN_COMMIT_READY") β€” the channel state. same deal: in particular "CHANNELD_NORMAL" and "CHANNELD_AWAITING_SPLICE" mean the channel can be used normally πŸ’œ
🫢 history lesson: the deprecated value 'unknown' was also present for new channels up until v26.04, and it was removed in v26.06. she's gone, bestie. RIP. πŸ•―οΈ
  • message (string, optional) β€” the state change message.

🌈 and that's the whole page, no cap. this one came to you straight out of Core Lightning v26.06.9 β€” thanks for reading the LIGHTNING-NOTIFI...EL_STATE_CHANGED(7) manual with me, mwah πŸ’‹ periodt ✨

πŸ“¦ where this page comes from