forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
peer_wiregen.h
862 lines (742 loc) · 42.3 KB
/
peer_wiregen.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_WIRE_PEER_WIREGEN_H
#define LIGHTNING_WIRE_PEER_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <common/channel_id.h>
#include <bitcoin/tx.h>
#include <bitcoin/preimage.h>
#include <bitcoin/short_channel_id.h>
#include <common/node_id.h>
#include <common/bigsize.h>
#include <bitcoin/block.h>
#include <bitcoin/privkey.h>
enum peer_wire {
WIRE_INIT = 16,
WIRE_ERROR = 17,
WIRE_WARNING = 1,
WIRE_PING = 18,
WIRE_PONG = 19,
WIRE_TX_ADD_INPUT = 66,
WIRE_TX_ADD_OUTPUT = 67,
WIRE_TX_REMOVE_INPUT = 68,
WIRE_TX_REMOVE_OUTPUT = 69,
WIRE_TX_COMPLETE = 70,
WIRE_TX_SIGNATURES = 71,
WIRE_OPEN_CHANNEL = 32,
WIRE_ACCEPT_CHANNEL = 33,
WIRE_FUNDING_CREATED = 34,
WIRE_FUNDING_SIGNED = 35,
WIRE_FUNDING_LOCKED = 36,
WIRE_OPEN_CHANNEL2 = 64,
WIRE_ACCEPT_CHANNEL2 = 65,
WIRE_INIT_RBF = 72,
WIRE_ACK_RBF = 73,
WIRE_SHUTDOWN = 38,
WIRE_CLOSING_SIGNED = 39,
WIRE_UPDATE_ADD_HTLC = 128,
WIRE_UPDATE_FULFILL_HTLC = 130,
WIRE_UPDATE_FAIL_HTLC = 131,
WIRE_UPDATE_FAIL_MALFORMED_HTLC = 135,
WIRE_COMMITMENT_SIGNED = 132,
WIRE_REVOKE_AND_ACK = 133,
WIRE_UPDATE_FEE = 134,
WIRE_CHANNEL_REESTABLISH = 136,
WIRE_ANNOUNCEMENT_SIGNATURES = 259,
WIRE_CHANNEL_ANNOUNCEMENT = 256,
WIRE_NODE_ANNOUNCEMENT = 257,
WIRE_CHANNEL_UPDATE = 258,
WIRE_QUERY_SHORT_CHANNEL_IDS = 261,
WIRE_REPLY_SHORT_CHANNEL_IDS_END = 262,
WIRE_QUERY_CHANNEL_RANGE = 263,
WIRE_REPLY_CHANNEL_RANGE = 264,
WIRE_GOSSIP_TIMESTAMP_FILTER = 265,
WIRE_ONION_MESSAGE = 385,
};
const char *peer_wire_name(int e);
/**
* Determine whether a given message type is defined as a message.
*
* Returns true if the message type is part of the message definitions we have
* generated parsers for, false if it is a custom message that cannot be
* handled internally.
*/
bool peer_wire_is_defined(u16 type);
struct witness_element {
u8 *witness;
};
struct channel_update_checksums {
u32 checksum_node_id_1;
u32 checksum_node_id_2;
};
struct channel_update_timestamps {
u32 timestamp_node_id_1;
u32 timestamp_node_id_2;
};
struct witness_stack {
struct witness_element **witness_element;
};
struct tlv_n1_tlv3 {
struct pubkey node_id;
struct amount_msat amount_msat_1;
struct amount_msat amount_msat_2;
};
struct tlv_opening_tlvs_option_upfront_shutdown_script {
u8 *shutdown_scriptpubkey;
};
struct tlv_accept_tlvs_option_upfront_shutdown_script {
u8 *shutdown_scriptpubkey;
};
struct tlv_shutdown_tlvs_wrong_funding {
struct bitcoin_txid txid;
u32 outnum;
};
struct tlv_query_short_channel_ids_tlvs_query_flags {
u8 encoding_type;
u8 *encoded_query_flags;
};
struct tlv_reply_channel_range_tlvs_timestamps_tlv {
u8 encoding_type;
u8 *encoded_timestamps;
};
struct tlv_init_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
struct bitcoin_blkid *networks;
};
struct tlv_n1 {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
u64 *tlv1;
struct short_channel_id *tlv2;
struct tlv_n1_tlv3 *tlv3;
u16 *tlv4;
};
struct tlv_n2 {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
u64 *tlv1;
u32 *tlv2;
};
struct tlv_open_channel_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
u8 *upfront_shutdown_script;
};
struct tlv_accept_channel_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
u8 *upfront_shutdown_script;
};
struct tlv_opening_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
struct tlv_opening_tlvs_option_upfront_shutdown_script *option_upfront_shutdown_script;
};
struct tlv_accept_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
struct tlv_accept_tlvs_option_upfront_shutdown_script *option_upfront_shutdown_script;
};
struct tlv_shutdown_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
struct tlv_shutdown_tlvs_wrong_funding *wrong_funding;
};
struct tlv_query_short_channel_ids_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
struct tlv_query_short_channel_ids_tlvs_query_flags *query_flags;
};
struct tlv_query_channel_range_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
bigsize *query_option;
};
struct tlv_reply_channel_range_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
struct tlv_reply_channel_range_tlvs_timestamps_tlv *timestamps_tlv;
struct channel_update_checksums *checksums_tlv;
};
struct tlv_onion_message_tlvs {
/* Raw fields including unknown ones. */
struct tlv_field *fields;
/* TODO The following explicit fields could just point into the
* tlv_field entries above to save on memory. */
struct pubkey *blinding;
};
struct tlv_init_tlvs *tlv_init_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the init_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using init_tlvs_is_valid.
*/
bool fromwire_init_tlvs(const u8 **cursor, size_t *max,
struct tlv_init_tlvs * record);
/**
* Serialize a TLV stream for the init_tlvs namespace.
*
* This function only considers known fields from the init_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `init_tlvs_is_valid`.
*/
void towire_init_tlvs(u8 **pptr, const struct tlv_init_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool init_tlvs_is_valid(const struct tlv_init_tlvs *record,
size_t *err_index);
struct tlv_n1 *tlv_n1_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the n1 namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using n1_is_valid.
*/
bool fromwire_n1(const u8 **cursor, size_t *max,
struct tlv_n1 * record);
/**
* Serialize a TLV stream for the n1 namespace.
*
* This function only considers known fields from the n1 namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `n1_is_valid`.
*/
void towire_n1(u8 **pptr, const struct tlv_n1 *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool n1_is_valid(const struct tlv_n1 *record,
size_t *err_index);
#define TLVS_ARRAY_SIZE_n1 4
extern const struct tlv_record_type tlvs_n1[];
/* Define an enum with the constants */
enum n1_types {
TLV_N1_TLV1 = 1,
TLV_N1_TLV2 = 2,
TLV_N1_TLV3 = 3,
TLV_N1_TLV4 = 254,
};
struct tlv_n2 *tlv_n2_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the n2 namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using n2_is_valid.
*/
bool fromwire_n2(const u8 **cursor, size_t *max,
struct tlv_n2 * record);
/**
* Serialize a TLV stream for the n2 namespace.
*
* This function only considers known fields from the n2 namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `n2_is_valid`.
*/
void towire_n2(u8 **pptr, const struct tlv_n2 *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool n2_is_valid(const struct tlv_n2 *record,
size_t *err_index);
#define TLVS_ARRAY_SIZE_n2 2
extern const struct tlv_record_type tlvs_n2[];
/* Define an enum with the constants */
enum n2_types {
TLV_N2_TLV1 = 0,
TLV_N2_TLV2 = 11,
};
struct tlv_open_channel_tlvs *tlv_open_channel_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the open_channel_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using open_channel_tlvs_is_valid.
*/
bool fromwire_open_channel_tlvs(const u8 **cursor, size_t *max,
struct tlv_open_channel_tlvs * record);
/**
* Serialize a TLV stream for the open_channel_tlvs namespace.
*
* This function only considers known fields from the open_channel_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `open_channel_tlvs_is_valid`.
*/
void towire_open_channel_tlvs(u8 **pptr, const struct tlv_open_channel_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool open_channel_tlvs_is_valid(const struct tlv_open_channel_tlvs *record,
size_t *err_index);
struct tlv_accept_channel_tlvs *tlv_accept_channel_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the accept_channel_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using accept_channel_tlvs_is_valid.
*/
bool fromwire_accept_channel_tlvs(const u8 **cursor, size_t *max,
struct tlv_accept_channel_tlvs * record);
/**
* Serialize a TLV stream for the accept_channel_tlvs namespace.
*
* This function only considers known fields from the accept_channel_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `accept_channel_tlvs_is_valid`.
*/
void towire_accept_channel_tlvs(u8 **pptr, const struct tlv_accept_channel_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool accept_channel_tlvs_is_valid(const struct tlv_accept_channel_tlvs *record,
size_t *err_index);
struct tlv_opening_tlvs *tlv_opening_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the opening_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using opening_tlvs_is_valid.
*/
bool fromwire_opening_tlvs(const u8 **cursor, size_t *max,
struct tlv_opening_tlvs * record);
/**
* Serialize a TLV stream for the opening_tlvs namespace.
*
* This function only considers known fields from the opening_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `opening_tlvs_is_valid`.
*/
void towire_opening_tlvs(u8 **pptr, const struct tlv_opening_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool opening_tlvs_is_valid(const struct tlv_opening_tlvs *record,
size_t *err_index);
struct tlv_accept_tlvs *tlv_accept_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the accept_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using accept_tlvs_is_valid.
*/
bool fromwire_accept_tlvs(const u8 **cursor, size_t *max,
struct tlv_accept_tlvs * record);
/**
* Serialize a TLV stream for the accept_tlvs namespace.
*
* This function only considers known fields from the accept_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `accept_tlvs_is_valid`.
*/
void towire_accept_tlvs(u8 **pptr, const struct tlv_accept_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool accept_tlvs_is_valid(const struct tlv_accept_tlvs *record,
size_t *err_index);
struct tlv_shutdown_tlvs *tlv_shutdown_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the shutdown_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using shutdown_tlvs_is_valid.
*/
bool fromwire_shutdown_tlvs(const u8 **cursor, size_t *max,
struct tlv_shutdown_tlvs * record);
/**
* Serialize a TLV stream for the shutdown_tlvs namespace.
*
* This function only considers known fields from the shutdown_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `shutdown_tlvs_is_valid`.
*/
void towire_shutdown_tlvs(u8 **pptr, const struct tlv_shutdown_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool shutdown_tlvs_is_valid(const struct tlv_shutdown_tlvs *record,
size_t *err_index);
struct tlv_query_short_channel_ids_tlvs *tlv_query_short_channel_ids_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the query_short_channel_ids_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using query_short_channel_ids_tlvs_is_valid.
*/
bool fromwire_query_short_channel_ids_tlvs(const u8 **cursor, size_t *max,
struct tlv_query_short_channel_ids_tlvs * record);
/**
* Serialize a TLV stream for the query_short_channel_ids_tlvs namespace.
*
* This function only considers known fields from the query_short_channel_ids_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `query_short_channel_ids_tlvs_is_valid`.
*/
void towire_query_short_channel_ids_tlvs(u8 **pptr, const struct tlv_query_short_channel_ids_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool query_short_channel_ids_tlvs_is_valid(const struct tlv_query_short_channel_ids_tlvs *record,
size_t *err_index);
struct tlv_query_channel_range_tlvs *tlv_query_channel_range_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the query_channel_range_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using query_channel_range_tlvs_is_valid.
*/
bool fromwire_query_channel_range_tlvs(const u8 **cursor, size_t *max,
struct tlv_query_channel_range_tlvs * record);
/**
* Serialize a TLV stream for the query_channel_range_tlvs namespace.
*
* This function only considers known fields from the query_channel_range_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `query_channel_range_tlvs_is_valid`.
*/
void towire_query_channel_range_tlvs(u8 **pptr, const struct tlv_query_channel_range_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool query_channel_range_tlvs_is_valid(const struct tlv_query_channel_range_tlvs *record,
size_t *err_index);
struct tlv_reply_channel_range_tlvs *tlv_reply_channel_range_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the reply_channel_range_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using reply_channel_range_tlvs_is_valid.
*/
bool fromwire_reply_channel_range_tlvs(const u8 **cursor, size_t *max,
struct tlv_reply_channel_range_tlvs * record);
/**
* Serialize a TLV stream for the reply_channel_range_tlvs namespace.
*
* This function only considers known fields from the reply_channel_range_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `reply_channel_range_tlvs_is_valid`.
*/
void towire_reply_channel_range_tlvs(u8 **pptr, const struct tlv_reply_channel_range_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool reply_channel_range_tlvs_is_valid(const struct tlv_reply_channel_range_tlvs *record,
size_t *err_index);
struct tlv_onion_message_tlvs *tlv_onion_message_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the onion_message_tlvs namespace.
*
* This function will parse any TLV stream, as long as the type, length and
* value fields are formatted correctly. Fields that are not known in the
* current namespace are stored in the `fields` member. Validity can be
* checked using onion_message_tlvs_is_valid.
*/
bool fromwire_onion_message_tlvs(const u8 **cursor, size_t *max,
struct tlv_onion_message_tlvs * record);
/**
* Serialize a TLV stream for the onion_message_tlvs namespace.
*
* This function only considers known fields from the onion_message_tlvs namespace,
* and will ignore any fields that may be stored in the `fields` member. This
* ensures that the resulting stream is valid according to
* `onion_message_tlvs_is_valid`.
*/
void towire_onion_message_tlvs(u8 **pptr, const struct tlv_onion_message_tlvs *record);
/**
* Check that the TLV stream is valid.
*
* Enforces the followin validity rules:
* - Types must be in monotonic non-repeating order
* - We must understand all even types
*
* Returns false if an error was detected, otherwise returns true. If err_index
* is non-null and we detect an error it is set to the index of the first error
* detected.
*/
bool onion_message_tlvs_is_valid(const struct tlv_onion_message_tlvs *record,
size_t *err_index);
/* SUBTYPE: WITNESS_ELEMENT */
void towire_witness_element(u8 **p, const struct witness_element *witness_element);
struct witness_element *fromwire_witness_element(const tal_t *ctx, const u8 **cursor, size_t *plen);
/* SUBTYPE: CHANNEL_UPDATE_CHECKSUMS */
void towire_channel_update_checksums(u8 **p, const struct channel_update_checksums *channel_update_checksums);
void fromwire_channel_update_checksums(const u8 **cursor, size_t *plen, struct channel_update_checksums *channel_update_checksums);
/* SUBTYPE: CHANNEL_UPDATE_TIMESTAMPS */
void towire_channel_update_timestamps(u8 **p, const struct channel_update_timestamps *channel_update_timestamps);
void fromwire_channel_update_timestamps(const u8 **cursor, size_t *plen, struct channel_update_timestamps *channel_update_timestamps);
/* SUBTYPE: WITNESS_STACK */
void towire_witness_stack(u8 **p, const struct witness_stack *witness_stack);
struct witness_stack *fromwire_witness_stack(const tal_t *ctx, const u8 **cursor, size_t *plen);
/* WIRE: INIT */
u8 *towire_init(const tal_t *ctx, const u8 *globalfeatures, const u8 *features, const struct tlv_init_tlvs *tlvs);
bool fromwire_init(const tal_t *ctx, const void *p, u8 **globalfeatures, u8 **features, struct tlv_init_tlvs *tlvs);
/* WIRE: ERROR */
u8 *towire_error(const tal_t *ctx, const struct channel_id *channel_id, const u8 *data);
bool fromwire_error(const tal_t *ctx, const void *p, struct channel_id *channel_id, u8 **data);
/* WIRE: WARNING */
u8 *towire_warning(const tal_t *ctx, const struct channel_id *channel_id, const u8 *data);
bool fromwire_warning(const tal_t *ctx, const void *p, struct channel_id *channel_id, u8 **data);
/* WIRE: PING */
u8 *towire_ping(const tal_t *ctx, u16 num_pong_bytes, const u8 *ignored);
bool fromwire_ping(const tal_t *ctx, const void *p, u16 *num_pong_bytes, u8 **ignored);
/* WIRE: PONG */
u8 *towire_pong(const tal_t *ctx, const u8 *ignored);
bool fromwire_pong(const tal_t *ctx, const void *p, u8 **ignored);
/* WIRE: TX_ADD_INPUT */
u8 *towire_tx_add_input(const tal_t *ctx, const struct channel_id *channel_id, u64 serial_id, const u8 *prevtx, u32 prevtx_vout, u32 sequence, const u8 *script_sig);
bool fromwire_tx_add_input(const tal_t *ctx, const void *p, struct channel_id *channel_id, u64 *serial_id, u8 **prevtx, u32 *prevtx_vout, u32 *sequence, u8 **script_sig);
/* WIRE: TX_ADD_OUTPUT */
u8 *towire_tx_add_output(const tal_t *ctx, const struct channel_id *channel_id, u64 serial_id, u64 sats, const u8 *script);
bool fromwire_tx_add_output(const tal_t *ctx, const void *p, struct channel_id *channel_id, u64 *serial_id, u64 *sats, u8 **script);
/* WIRE: TX_REMOVE_INPUT */
u8 *towire_tx_remove_input(const tal_t *ctx, const struct channel_id *channel_id, u64 serial_id);
bool fromwire_tx_remove_input(const void *p, struct channel_id *channel_id, u64 *serial_id);
/* WIRE: TX_REMOVE_OUTPUT */
u8 *towire_tx_remove_output(const tal_t *ctx, const struct channel_id *channel_id, u64 serial_id);
bool fromwire_tx_remove_output(const void *p, struct channel_id *channel_id, u64 *serial_id);
/* WIRE: TX_COMPLETE */
u8 *towire_tx_complete(const tal_t *ctx, const struct channel_id *channel_id);
bool fromwire_tx_complete(const void *p, struct channel_id *channel_id);
/* WIRE: TX_SIGNATURES */
u8 *towire_tx_signatures(const tal_t *ctx, const struct channel_id *channel_id, const struct bitcoin_txid *txid, const struct witness_stack **witness_stack);
bool fromwire_tx_signatures(const tal_t *ctx, const void *p, struct channel_id *channel_id, struct bitcoin_txid *txid, struct witness_stack ***witness_stack);
/* WIRE: OPEN_CHANNEL */
u8 *towire_open_channel(const tal_t *ctx, const struct bitcoin_blkid *chain_hash, const struct channel_id *temporary_channel_id, struct amount_sat funding_satoshis, struct amount_msat push_msat, struct amount_sat dust_limit_satoshis, struct amount_msat max_htlc_value_in_flight_msat, struct amount_sat channel_reserve_satoshis, struct amount_msat htlc_minimum_msat, u32 feerate_per_kw, u16 to_self_delay, u16 max_accepted_htlcs, const struct pubkey *funding_pubkey, const struct pubkey *revocation_basepoint, const struct pubkey *payment_basepoint, const struct pubkey *delayed_payment_basepoint, const struct pubkey *htlc_basepoint, const struct pubkey *first_per_commitment_point, u8 channel_flags, const struct tlv_open_channel_tlvs *tlvs);
bool fromwire_open_channel(const void *p, struct bitcoin_blkid *chain_hash, struct channel_id *temporary_channel_id, struct amount_sat *funding_satoshis, struct amount_msat *push_msat, struct amount_sat *dust_limit_satoshis, struct amount_msat *max_htlc_value_in_flight_msat, struct amount_sat *channel_reserve_satoshis, struct amount_msat *htlc_minimum_msat, u32 *feerate_per_kw, u16 *to_self_delay, u16 *max_accepted_htlcs, struct pubkey *funding_pubkey, struct pubkey *revocation_basepoint, struct pubkey *payment_basepoint, struct pubkey *delayed_payment_basepoint, struct pubkey *htlc_basepoint, struct pubkey *first_per_commitment_point, u8 *channel_flags, struct tlv_open_channel_tlvs *tlvs);
/* WIRE: ACCEPT_CHANNEL */
u8 *towire_accept_channel(const tal_t *ctx, const struct channel_id *temporary_channel_id, struct amount_sat dust_limit_satoshis, struct amount_msat max_htlc_value_in_flight_msat, struct amount_sat channel_reserve_satoshis, struct amount_msat htlc_minimum_msat, u32 minimum_depth, u16 to_self_delay, u16 max_accepted_htlcs, const struct pubkey *funding_pubkey, const struct pubkey *revocation_basepoint, const struct pubkey *payment_basepoint, const struct pubkey *delayed_payment_basepoint, const struct pubkey *htlc_basepoint, const struct pubkey *first_per_commitment_point, const struct tlv_accept_channel_tlvs *tlvs);
bool fromwire_accept_channel(const void *p, struct channel_id *temporary_channel_id, struct amount_sat *dust_limit_satoshis, struct amount_msat *max_htlc_value_in_flight_msat, struct amount_sat *channel_reserve_satoshis, struct amount_msat *htlc_minimum_msat, u32 *minimum_depth, u16 *to_self_delay, u16 *max_accepted_htlcs, struct pubkey *funding_pubkey, struct pubkey *revocation_basepoint, struct pubkey *payment_basepoint, struct pubkey *delayed_payment_basepoint, struct pubkey *htlc_basepoint, struct pubkey *first_per_commitment_point, struct tlv_accept_channel_tlvs *tlvs);
/* WIRE: FUNDING_CREATED */
u8 *towire_funding_created(const tal_t *ctx, const struct channel_id *temporary_channel_id, const struct bitcoin_txid *funding_txid, u16 funding_output_index, const secp256k1_ecdsa_signature *signature);
bool fromwire_funding_created(const void *p, struct channel_id *temporary_channel_id, struct bitcoin_txid *funding_txid, u16 *funding_output_index, secp256k1_ecdsa_signature *signature);
/* WIRE: FUNDING_SIGNED */
u8 *towire_funding_signed(const tal_t *ctx, const struct channel_id *channel_id, const secp256k1_ecdsa_signature *signature);
bool fromwire_funding_signed(const void *p, struct channel_id *channel_id, secp256k1_ecdsa_signature *signature);
/* WIRE: FUNDING_LOCKED */
u8 *towire_funding_locked(const tal_t *ctx, const struct channel_id *channel_id, const struct pubkey *next_per_commitment_point);
bool fromwire_funding_locked(const void *p, struct channel_id *channel_id, struct pubkey *next_per_commitment_point);
/* WIRE: OPEN_CHANNEL2 */
u8 *towire_open_channel2(const tal_t *ctx, const struct bitcoin_blkid *chain_hash, const struct channel_id *channel_id, u32 funding_feerate_perkw, u32 commitment_feerate_perkw, struct amount_sat funding_satoshis, struct amount_sat dust_limit_satoshis, struct amount_msat max_htlc_value_in_flight_msat, struct amount_msat htlc_minimum_msat, u16 to_self_delay, u16 max_accepted_htlcs, u32 locktime, const struct pubkey *funding_pubkey, const struct pubkey *revocation_basepoint, const struct pubkey *payment_basepoint, const struct pubkey *delayed_payment_basepoint, const struct pubkey *htlc_basepoint, const struct pubkey *first_per_commitment_point, u8 channel_flags, const struct tlv_opening_tlvs *tlvs);
bool fromwire_open_channel2(const void *p, struct bitcoin_blkid *chain_hash, struct channel_id *channel_id, u32 *funding_feerate_perkw, u32 *commitment_feerate_perkw, struct amount_sat *funding_satoshis, struct amount_sat *dust_limit_satoshis, struct amount_msat *max_htlc_value_in_flight_msat, struct amount_msat *htlc_minimum_msat, u16 *to_self_delay, u16 *max_accepted_htlcs, u32 *locktime, struct pubkey *funding_pubkey, struct pubkey *revocation_basepoint, struct pubkey *payment_basepoint, struct pubkey *delayed_payment_basepoint, struct pubkey *htlc_basepoint, struct pubkey *first_per_commitment_point, u8 *channel_flags, struct tlv_opening_tlvs *tlvs);
/* WIRE: ACCEPT_CHANNEL2 */
u8 *towire_accept_channel2(const tal_t *ctx, const struct channel_id *channel_id, struct amount_sat funding_satoshis, struct amount_sat dust_limit_satoshis, struct amount_msat max_htlc_value_in_flight_msat, struct amount_msat htlc_minimum_msat, u32 minimum_depth, u16 to_self_delay, u16 max_accepted_htlcs, const struct pubkey *funding_pubkey, const struct pubkey *revocation_basepoint, const struct pubkey *payment_basepoint, const struct pubkey *delayed_payment_basepoint, const struct pubkey *htlc_basepoint, const struct pubkey *first_per_commitment_point, const struct tlv_accept_tlvs *tlvs);
bool fromwire_accept_channel2(const void *p, struct channel_id *channel_id, struct amount_sat *funding_satoshis, struct amount_sat *dust_limit_satoshis, struct amount_msat *max_htlc_value_in_flight_msat, struct amount_msat *htlc_minimum_msat, u32 *minimum_depth, u16 *to_self_delay, u16 *max_accepted_htlcs, struct pubkey *funding_pubkey, struct pubkey *revocation_basepoint, struct pubkey *payment_basepoint, struct pubkey *delayed_payment_basepoint, struct pubkey *htlc_basepoint, struct pubkey *first_per_commitment_point, struct tlv_accept_tlvs *tlvs);
/* WIRE: INIT_RBF */
u8 *towire_init_rbf(const tal_t *ctx, const struct channel_id *channel_id, struct amount_sat funding_satoshis, u32 locktime, u8 fee_step);
bool fromwire_init_rbf(const void *p, struct channel_id *channel_id, struct amount_sat *funding_satoshis, u32 *locktime, u8 *fee_step);
/* WIRE: ACK_RBF */
u8 *towire_ack_rbf(const tal_t *ctx, const struct channel_id *channel_id, struct amount_sat funding_satoshis);
bool fromwire_ack_rbf(const void *p, struct channel_id *channel_id, struct amount_sat *funding_satoshis);
/* WIRE: SHUTDOWN */
u8 *towire_shutdown(const tal_t *ctx, const struct channel_id *channel_id, const u8 *scriptpubkey, const struct tlv_shutdown_tlvs *tlvs);
bool fromwire_shutdown(const tal_t *ctx, const void *p, struct channel_id *channel_id, u8 **scriptpubkey, struct tlv_shutdown_tlvs *tlvs);
/* WIRE: CLOSING_SIGNED */
u8 *towire_closing_signed(const tal_t *ctx, const struct channel_id *channel_id, struct amount_sat fee_satoshis, const secp256k1_ecdsa_signature *signature);
bool fromwire_closing_signed(const void *p, struct channel_id *channel_id, struct amount_sat *fee_satoshis, secp256k1_ecdsa_signature *signature);
/* WIRE: UPDATE_ADD_HTLC */
u8 *towire_update_add_htlc(const tal_t *ctx, const struct channel_id *channel_id, u64 id, struct amount_msat amount_msat, const struct sha256 *payment_hash, u32 cltv_expiry, const u8 onion_routing_packet[1366]);
bool fromwire_update_add_htlc(const void *p, struct channel_id *channel_id, u64 *id, struct amount_msat *amount_msat, struct sha256 *payment_hash, u32 *cltv_expiry, u8 onion_routing_packet[1366]);
/* WIRE: UPDATE_FULFILL_HTLC */
u8 *towire_update_fulfill_htlc(const tal_t *ctx, const struct channel_id *channel_id, u64 id, const struct preimage *payment_preimage);
bool fromwire_update_fulfill_htlc(const void *p, struct channel_id *channel_id, u64 *id, struct preimage *payment_preimage);
/* WIRE: UPDATE_FAIL_HTLC */
u8 *towire_update_fail_htlc(const tal_t *ctx, const struct channel_id *channel_id, u64 id, const u8 *reason);
bool fromwire_update_fail_htlc(const tal_t *ctx, const void *p, struct channel_id *channel_id, u64 *id, u8 **reason);
/* WIRE: UPDATE_FAIL_MALFORMED_HTLC */
u8 *towire_update_fail_malformed_htlc(const tal_t *ctx, const struct channel_id *channel_id, u64 id, const struct sha256 *sha256_of_onion, u16 failure_code);
bool fromwire_update_fail_malformed_htlc(const void *p, struct channel_id *channel_id, u64 *id, struct sha256 *sha256_of_onion, u16 *failure_code);
/* WIRE: COMMITMENT_SIGNED */
u8 *towire_commitment_signed(const tal_t *ctx, const struct channel_id *channel_id, const secp256k1_ecdsa_signature *signature, const secp256k1_ecdsa_signature *htlc_signature);
bool fromwire_commitment_signed(const tal_t *ctx, const void *p, struct channel_id *channel_id, secp256k1_ecdsa_signature *signature, secp256k1_ecdsa_signature **htlc_signature);
/* WIRE: REVOKE_AND_ACK */
u8 *towire_revoke_and_ack(const tal_t *ctx, const struct channel_id *channel_id, const struct secret *per_commitment_secret, const struct pubkey *next_per_commitment_point);
bool fromwire_revoke_and_ack(const void *p, struct channel_id *channel_id, struct secret *per_commitment_secret, struct pubkey *next_per_commitment_point);
/* WIRE: UPDATE_FEE */
u8 *towire_update_fee(const tal_t *ctx, const struct channel_id *channel_id, u32 feerate_per_kw);
bool fromwire_update_fee(const void *p, struct channel_id *channel_id, u32 *feerate_per_kw);
/* WIRE: CHANNEL_REESTABLISH */
u8 *towire_channel_reestablish(const tal_t *ctx, const struct channel_id *channel_id, u64 next_commitment_number, u64 next_revocation_number, const struct secret *your_last_per_commitment_secret, const struct pubkey *my_current_per_commitment_point);
bool fromwire_channel_reestablish(const void *p, struct channel_id *channel_id, u64 *next_commitment_number, u64 *next_revocation_number, struct secret *your_last_per_commitment_secret, struct pubkey *my_current_per_commitment_point);
/* WIRE: ANNOUNCEMENT_SIGNATURES */
u8 *towire_announcement_signatures(const tal_t *ctx, const struct channel_id *channel_id, const struct short_channel_id *short_channel_id, const secp256k1_ecdsa_signature *node_signature, const secp256k1_ecdsa_signature *bitcoin_signature);
bool fromwire_announcement_signatures(const void *p, struct channel_id *channel_id, struct short_channel_id *short_channel_id, secp256k1_ecdsa_signature *node_signature, secp256k1_ecdsa_signature *bitcoin_signature);
/* WIRE: CHANNEL_ANNOUNCEMENT */
u8 *towire_channel_announcement(const tal_t *ctx, const secp256k1_ecdsa_signature *node_signature_1, const secp256k1_ecdsa_signature *node_signature_2, const secp256k1_ecdsa_signature *bitcoin_signature_1, const secp256k1_ecdsa_signature *bitcoin_signature_2, const u8 *features, const struct bitcoin_blkid *chain_hash, const struct short_channel_id *short_channel_id, const struct node_id *node_id_1, const struct node_id *node_id_2, const struct pubkey *bitcoin_key_1, const struct pubkey *bitcoin_key_2);
bool fromwire_channel_announcement(const tal_t *ctx, const void *p, secp256k1_ecdsa_signature *node_signature_1, secp256k1_ecdsa_signature *node_signature_2, secp256k1_ecdsa_signature *bitcoin_signature_1, secp256k1_ecdsa_signature *bitcoin_signature_2, u8 **features, struct bitcoin_blkid *chain_hash, struct short_channel_id *short_channel_id, struct node_id *node_id_1, struct node_id *node_id_2, struct pubkey *bitcoin_key_1, struct pubkey *bitcoin_key_2);
/* WIRE: NODE_ANNOUNCEMENT */
u8 *towire_node_announcement(const tal_t *ctx, const secp256k1_ecdsa_signature *signature, const u8 *features, u32 timestamp, const struct node_id *node_id, const u8 rgb_color[3], const u8 alias[32], const u8 *addresses);
bool fromwire_node_announcement(const tal_t *ctx, const void *p, secp256k1_ecdsa_signature *signature, u8 **features, u32 *timestamp, struct node_id *node_id, u8 rgb_color[3], u8 alias[32], u8 **addresses);
/* WIRE: CHANNEL_UPDATE */
u8 *towire_channel_update(const tal_t *ctx, const secp256k1_ecdsa_signature *signature, const struct bitcoin_blkid *chain_hash, const struct short_channel_id *short_channel_id, u32 timestamp, u8 message_flags, u8 channel_flags, u16 cltv_expiry_delta, struct amount_msat htlc_minimum_msat, u32 fee_base_msat, u32 fee_proportional_millionths);
bool fromwire_channel_update(const void *p, secp256k1_ecdsa_signature *signature, struct bitcoin_blkid *chain_hash, struct short_channel_id *short_channel_id, u32 *timestamp, u8 *message_flags, u8 *channel_flags, u16 *cltv_expiry_delta, struct amount_msat *htlc_minimum_msat, u32 *fee_base_msat, u32 *fee_proportional_millionths);
/* WIRE: QUERY_SHORT_CHANNEL_IDS */
u8 *towire_query_short_channel_ids(const tal_t *ctx, const struct bitcoin_blkid *chain_hash, const u8 *encoded_short_ids, const struct tlv_query_short_channel_ids_tlvs *tlvs);
bool fromwire_query_short_channel_ids(const tal_t *ctx, const void *p, struct bitcoin_blkid *chain_hash, u8 **encoded_short_ids, struct tlv_query_short_channel_ids_tlvs *tlvs);
/* WIRE: REPLY_SHORT_CHANNEL_IDS_END */
u8 *towire_reply_short_channel_ids_end(const tal_t *ctx, const struct bitcoin_blkid *chain_hash, u8 full_information);
bool fromwire_reply_short_channel_ids_end(const void *p, struct bitcoin_blkid *chain_hash, u8 *full_information);
/* WIRE: QUERY_CHANNEL_RANGE */
u8 *towire_query_channel_range(const tal_t *ctx, const struct bitcoin_blkid *chain_hash, u32 first_blocknum, u32 number_of_blocks, const struct tlv_query_channel_range_tlvs *tlvs);
bool fromwire_query_channel_range(const void *p, struct bitcoin_blkid *chain_hash, u32 *first_blocknum, u32 *number_of_blocks, struct tlv_query_channel_range_tlvs *tlvs);
/* WIRE: REPLY_CHANNEL_RANGE */
u8 *towire_reply_channel_range(const tal_t *ctx, const struct bitcoin_blkid *chain_hash, u32 first_blocknum, u32 number_of_blocks, u8 sync_complete, const u8 *encoded_short_ids, const struct tlv_reply_channel_range_tlvs *tlvs);
bool fromwire_reply_channel_range(const tal_t *ctx, const void *p, struct bitcoin_blkid *chain_hash, u32 *first_blocknum, u32 *number_of_blocks, u8 *sync_complete, u8 **encoded_short_ids, struct tlv_reply_channel_range_tlvs *tlvs);
/* WIRE: GOSSIP_TIMESTAMP_FILTER */
u8 *towire_gossip_timestamp_filter(const tal_t *ctx, const struct bitcoin_blkid *chain_hash, u32 first_timestamp, u32 timestamp_range);
bool fromwire_gossip_timestamp_filter(const void *p, struct bitcoin_blkid *chain_hash, u32 *first_timestamp, u32 *timestamp_range);
/* WIRE: ONION_MESSAGE */
u8 *towire_onion_message(const tal_t *ctx, const u8 *onionmsg, const struct tlv_onion_message_tlvs *onion_message_tlvs);
bool fromwire_onion_message(const tal_t *ctx, const void *p, u8 **onionmsg, struct tlv_onion_message_tlvs *onion_message_tlvs);
/* WIRE: CHANNEL_UPDATE_OPTION_CHANNEL_HTLC_MAX */
u8 *towire_channel_update_option_channel_htlc_max(const tal_t *ctx, const secp256k1_ecdsa_signature *signature, const struct bitcoin_blkid *chain_hash, const struct short_channel_id *short_channel_id, u32 timestamp, u8 message_flags, u8 channel_flags, u16 cltv_expiry_delta, struct amount_msat htlc_minimum_msat, u32 fee_base_msat, u32 fee_proportional_millionths, struct amount_msat htlc_maximum_msat);
bool fromwire_channel_update_option_channel_htlc_max(const void *p, secp256k1_ecdsa_signature *signature, struct bitcoin_blkid *chain_hash, struct short_channel_id *short_channel_id, u32 *timestamp, u8 *message_flags, u8 *channel_flags, u16 *cltv_expiry_delta, struct amount_msat *htlc_minimum_msat, u32 *fee_base_msat, u32 *fee_proportional_millionths, struct amount_msat *htlc_maximum_msat);
#endif /* LIGHTNING_WIRE_PEER_WIREGEN_H */
// SHA256STAMP:aecb66d3600732f50b4279272e4c057d1ea410bddf41cbb01b6326320f5b9de8