Appendix C. Wire Protocol Messages

This appendix lists all the currently defined message types used in the Lightning P2P protocol. Additionally, we show the structure of each message, grouping the messages into logical groupings based on the protocol flows.

Note

Lightning Protocol messages are extensible and their structure may change during network-wide upgrades. For the authoritative information, consult the latest version of the BOLTs found in the GitHub Lightning-RFC repository.

Message Types

Currently defined message types are listed in Table C-1.

Table C-1. Message types
Type integer Message name Category

16

init

Connection Establishment

17

error

Error Communication

18

ping

Connection Liveness

19

pong

Connection Liveness

32

open_channel

Channel Funding

33

accept_channel

Channel Funding

34

funding_created

Channel Funding

35

funding_signed

Channel Funding

36

funding_locked

Channel Funding + Channel Operation

38

shutdown

Channel Closing

39

closing_signed

Channel Closing

128

update_add_htlc

Channel Operation

130

update_fulfill_hltc

Channel Operation

131

update_fail_htlc

Channel Operation

132

commit_sig

Channel Operation

133

revoke_and_ack

Channel Operation

134

update_fee

Channel Operation

135

update_fail_malformed_htlc

Channel Operation

136

channel_reestablish

Channel Operation

256

channel_announcement

Channel Announcement

257

node_announcement

Channel Announcement

258

channel_update

Channel Announcement

259

announce_signatures ...

Get Mastering the Lightning Network now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.