rgb-cln/channeld/channeld_wire.csv

9.7 KiB

1#include <common/cryptomsg.h>
2#include <common/channel_config.h>
3#include <common/derive_basepoints.h>
4#include <common/features.h>
5#include <common/fee_states.h>
6#include <common/per_peer_state.h>
7# Begin! (passes gossipd-client fd)
8msgtype,channeld_init,1000
9msgdata,channeld_init,chainparams,chainparams,
10msgdata,channeld_init,our_features,feature_set,
11msgdata,channeld_init,funding_txid,bitcoin_txid,
12msgdata,channeld_init,funding_txout,u16,
13msgdata,channeld_init,funding_satoshi,amount_sat,
14msgdata,channeld_init,minimum_depth,u32,
15msgdata,channeld_init,our_config,channel_config,
16msgdata,channeld_init,their_config,channel_config,
17msgdata,channeld_init,fee_states,fee_states,
18msgdata,channeld_init,feerate_min,u32,
19msgdata,channeld_init,feerate_max,u32,
20msgdata,channeld_init,feerate_penalty,u32,
21msgdata,channeld_init,first_commit_sig,bitcoin_signature,
22msgdata,channeld_init,per_peer_state,per_peer_state,
23msgdata,channeld_init,remote_fundingkey,pubkey,
24msgdata,channeld_init,remote_basepoints,basepoints,
25msgdata,channeld_init,remote_per_commit,pubkey,
26msgdata,channeld_init,old_remote_per_commit,pubkey,
27msgdata,channeld_init,opener,enum side,
28msgdata,channeld_init,fee_base,u32,
29msgdata,channeld_init,fee_proportional,u32,
30msgdata,channeld_init,local_msatoshi,amount_msat,
31msgdata,channeld_init,our_basepoints,basepoints,
32msgdata,channeld_init,our_funding_pubkey,pubkey,
33msgdata,channeld_init,local_node_id,node_id,
34msgdata,channeld_init,remote_node_id,node_id,
35msgdata,channeld_init,commit_msec,u32,
36msgdata,channeld_init,cltv_delta,u16,
37msgdata,channeld_init,last_was_revoke,bool,
38msgdata,channeld_init,num_last_sent_commit,u16,
39msgdata,channeld_init,last_sent_commit,changed_htlc,num_last_sent_commit
40msgdata,channeld_init,next_index_local,u64,
41msgdata,channeld_init,next_index_remote,u64,
42msgdata,channeld_init,revocations_received,u64,
43msgdata,channeld_init,next_htlc_id,u64,
44msgdata,channeld_init,num_existing_htlcs,u16,
45msgdata,channeld_init,htlcs,existing_htlc,num_existing_htlcs
46msgdata,channeld_init,local_funding_locked,bool,
47msgdata,channeld_init,remote_funding_locked,bool,
48msgdata,channeld_init,funding_short_id,short_channel_id,
49msgdata,channeld_init,reestablish,bool,
50msgdata,channeld_init,send_shutdown,bool,
51msgdata,channeld_init,remote_shutdown_received,bool,
52msgdata,channeld_init,final_scriptpubkey_len,u16,
53msgdata,channeld_init,final_scriptpubkey,u8,final_scriptpubkey_len
54msgdata,channeld_init,flags,u8,
55msgdata,channeld_init,init_peer_pkt_len,u16,
56msgdata,channeld_init,init_peer_pkt,u8,init_peer_pkt_len
57msgdata,channeld_init,reached_announce_depth,bool,
58msgdata,channeld_init,last_remote_secret,secret,
59msgdata,channeld_init,flen,u16,
60msgdata,channeld_init,their_features,u8,flen
61msgdata,channeld_init,upfront_shutdown_script_len,u16,
62msgdata,channeld_init,upfront_shutdown_script,u8,upfront_shutdown_script_len
63msgdata,channeld_init,remote_ann_node_sig,?secp256k1_ecdsa_signature,
64msgdata,channeld_init,remote_ann_bitcoin_sig,?secp256k1_ecdsa_signature,
65msgdata,channeld_init,option_static_remotekey,bool,
66msgdata,channeld_init,option_anchor_outputs,bool,
67msgdata,channeld_init,dev_fast_gossip,bool,
68msgdata,channeld_init,dev_fail_process_onionpacket,bool,
69msgdata,channeld_init,num_penalty_bases,u32,
70msgdata,channeld_init,pbases,penalty_base,num_penalty_bases
71# master->channeld funding hit new depth(funding locked if >= lock depth)
72msgtype,channeld_funding_depth,1002
73msgdata,channeld_funding_depth,short_channel_id,?short_channel_id,
74msgdata,channeld_funding_depth,depth,u32,
75# Tell channel to offer this htlc
76msgtype,channeld_offer_htlc,1004
77msgdata,channeld_offer_htlc,amount_msat,amount_msat,
78msgdata,channeld_offer_htlc,cltv_expiry,u32,
79msgdata,channeld_offer_htlc,payment_hash,sha256,
80msgdata,channeld_offer_htlc,onion_routing_packet,u8,1366
81msgdata,channeld_offer_htlc,blinding,?pubkey,
82# Reply; synchronous since IDs have to increment.
83msgtype,channeld_offer_htlc_reply,1104
84msgdata,channeld_offer_htlc_reply,id,u64,
85# Empty failure message means success.
86msgdata,channeld_offer_htlc_reply,len,u16,
87msgdata,channeld_offer_htlc_reply,failuremsg,u8,len
88msgdata,channeld_offer_htlc_reply,failurestr,wirestring,
89# Main daemon found out the preimage for an HTLC
90#include <bitcoin/preimage.h>
91msgtype,channeld_fulfill_htlc,1005
92msgdata,channeld_fulfill_htlc,fulfilled_htlc,fulfilled_htlc,
93# Main daemon says HTLC failed
94msgtype,channeld_fail_htlc,1006
95msgdata,channeld_fail_htlc,failed_htlc,failed_htlc,
96# When we receive funding_locked.
97msgtype,channeld_got_funding_locked,1019
98msgdata,channeld_got_funding_locked,next_per_commit_point,pubkey,
99#include <common/penalty_base.h>
100# When we send a commitment_signed message, tell master.
101msgtype,channeld_sending_commitsig,1020
102msgdata,channeld_sending_commitsig,commitnum,u64,
103msgdata,channeld_sending_commitsig,pbase,?penalty_base,
104msgdata,channeld_sending_commitsig,fee_states,fee_states,
105# SENT_ADD_COMMIT, SENT_REMOVE_ACK_COMMIT, SENT_ADD_ACK_COMMIT, SENT_REMOVE_COMMIT
106msgdata,channeld_sending_commitsig,num_changed,u16,
107msgdata,channeld_sending_commitsig,changed,changed_htlc,num_changed
108msgdata,channeld_sending_commitsig,commit_sig,bitcoin_signature,
109msgdata,channeld_sending_commitsig,num_htlc_sigs,u16,
110msgdata,channeld_sending_commitsig,htlc_sigs,bitcoin_signature,num_htlc_sigs
111# Wait for reply, to make sure it's on disk before we send commit.
112msgtype,channeld_sending_commitsig_reply,1120
113# When we have a commitment_signed message, tell master to remember.
114msgtype,channeld_got_commitsig,1021
115msgdata,channeld_got_commitsig,commitnum,u64,
116msgdata,channeld_got_commitsig,fee_states,fee_states,
117msgdata,channeld_got_commitsig,signature,bitcoin_signature,
118msgdata,channeld_got_commitsig,num_htlcs,u16,
119msgdata,channeld_got_commitsig,htlc_signature,bitcoin_signature,num_htlcs
120# RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs.
121msgdata,channeld_got_commitsig,num_added,u16,
122msgdata,channeld_got_commitsig,added,added_htlc,num_added
123# RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs.
124msgdata,channeld_got_commitsig,num_fulfilled,u16,
125msgdata,channeld_got_commitsig,fulfilled,fulfilled_htlc,num_fulfilled
126msgdata,channeld_got_commitsig,num_failed,u16,
127msgdata,channeld_got_commitsig,failed,failed_htlc,num_failed
128# RCVD_ADD_ACK_COMMIT, RCVD_REMOVE_ACK_COMMIT
129msgdata,channeld_got_commitsig,num_changed,u16,
130msgdata,channeld_got_commitsig,changed,changed_htlc,num_changed
131msgdata,channeld_got_commitsig,tx,bitcoin_tx,
132# Wait for reply, to make sure it's on disk before we send revocation.
133msgtype,channeld_got_commitsig_reply,1121
134#include <common/htlc_wire.h>
135msgtype,channeld_got_revoke,1022
136msgdata,channeld_got_revoke,revokenum,u64,
137msgdata,channeld_got_revoke,per_commitment_secret,secret,
138msgdata,channeld_got_revoke,next_per_commit_point,pubkey,
139# RCVD_ADD_ACK_REVOCATION, RCVD_REMOVE_ACK_REVOCATION, RCVD_ADD_REVOCATION, RCVD_REMOVE_REVOCATION
140msgdata,channeld_got_revoke,fee_states,fee_states,
141msgdata,channeld_got_revoke,num_changed,u16,
142msgdata,channeld_got_revoke,changed,changed_htlc,num_changed
143msgdata,channeld_got_revoke,pbase,?penalty_base,
144msgdata,channeld_got_revoke,penalty_tx,?bitcoin_tx,
145# Wait for reply, to make sure it's on disk before we continue
146# (eg. if we sent another commitment_signed, that would implicitly ack).
147msgtype,channeld_got_revoke_reply,1122
148# Tell peer to shut down channel.
149msgtype,channeld_send_shutdown,1023
150msgdata,channeld_send_shutdown,shutdown_len,u16,
151msgdata,channeld_send_shutdown,shutdown_scriptpubkey,u8,shutdown_len
152# Peer told us that channel is shutting down
153msgtype,channeld_got_shutdown,1024
154msgdata,channeld_got_shutdown,scriptpubkey_len,u16,
155msgdata,channeld_got_shutdown,scriptpubkey,u8,scriptpubkey_len
156# Shutdown is complete, ready for closing negotiation. + peer_fd & gossip_fd.
157msgtype,channeld_shutdown_complete,1025
158msgdata,channeld_shutdown_complete,per_peer_state,per_peer_state,
159# Re-enable commit timer.
160msgtype,channeld_dev_reenable_commit,1026
161msgtype,channeld_dev_reenable_commit_reply,1126,
162msgtype,channeld_feerates,1027
163msgdata,channeld_feerates,feerate,u32,
164msgdata,channeld_feerates,min_feerate,u32,
165msgdata,channeld_feerates,max_feerate,u32,
166msgdata,channeld_feerates,penalty_feerate,u32,
167# master -> channeld: do you have a memleak?
168msgtype,channeld_dev_memleak,1033
169msgtype,channeld_dev_memleak_reply,1133
170msgdata,channeld_dev_memleak_reply,leak,bool,
171# Peer presented proof it was from the future.
172msgtype,channeld_fail_fallen_behind,1028
173# This is NULL if option_static_remotekey.
174msgdata,channeld_fail_fallen_behind,remote_per_commitment_point,?pubkey,
175# Handle a channel specific feerate base ppm configuration
176msgtype,channeld_specific_feerates,1029
177msgdata,channeld_specific_feerates,feerate_base,u32,
178msgdata,channeld_specific_feerates,feerate_ppm,u32,
179# When we receive announcement_signatures for channel announce
180msgtype,channeld_got_announcement,1017
181msgdata,channeld_got_announcement,remote_ann_node_sig,secp256k1_ecdsa_signature,
182msgdata,channeld_got_announcement,remote_ann_bitcoin_sig,secp256k1_ecdsa_signature,
183# Ask channeld to send a error message. Used in forgetting channel case.
184msgtype,channeld_send_error,1008
185msgdata,channeld_send_error,reason,wirestring,
186# Tell master channeld has sent the error message.
187msgtype,channeld_send_error_reply,1108
188# Tell lightningd we got a onion message (for us, or to fwd)
189msgtype,got_onionmsg_to_us,1142
190msgdata,got_onionmsg_to_us,reply_blinding,?pubkey,
191msgdata,got_onionmsg_to_us,reply_path_len,u16,
192msgdata,got_onionmsg_to_us,reply_path,onionmsg_path,reply_path_len
193msgtype,got_onionmsg_forward,1143
194msgdata,got_onionmsg_forward,next_scid,?short_channel_id,
195msgdata,got_onionmsg_forward,next_node_id,?node_id,
196msgdata,got_onionmsg_forward,next_blinding,?pubkey,
197msgdata,got_onionmsg_forward,next_onion,u8,1366
198# Lightningd tells us to send a onion message.
199msgtype,send_onionmsg,1040
200msgdata,send_onionmsg,onion,u8,1366
201msgdata,send_onionmsg,blinding,?pubkey,