core-lightning/wire/peer_wiregen.h
Rusty Russell 183fe107e8 lightningd: use channel_type, pass to-and-from channeld.
Instead of explicit option_static_remotekey and option_anchor_outputs flags.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-09-13 15:53:23 +02:00

985 lines
47 KiB
C
Generated

/* 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_UPDATE_BLOCKHEIGHT = 137,
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 lease_rates {
u16 funding_weight;
u16 lease_fee_basis;
u16 channel_fee_max_proportional_thousandths;
u32 lease_fee_base_sat;
u32 channel_fee_max_base_msat;
};
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_opening_tlvs_request_funds {
u64 requested_sats;
u32 blockheight;
};
struct tlv_accept_tlvs_option_upfront_shutdown_script {
u8 *shutdown_scriptpubkey;
};
struct tlv_accept_tlvs_will_fund {
secp256k1_ecdsa_signature signature;
struct lease_rates lease_rates;
};
struct tlv_shutdown_tlvs_wrong_funding {
struct bitcoin_txid txid;
u32 outnum;
};
struct tlv_closing_signed_tlvs_fee_range {
struct amount_sat min_fee_satoshis;
struct amount_sat max_fee_satoshis;
};
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;
u8 *channel_type;
};
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;
u8 *channel_type;
};
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_opening_tlvs_request_funds *request_funds;
};
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_accept_tlvs_will_fund *will_fund;
};
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_closing_signed_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_closing_signed_tlvs_fee_range *fee_range;
};
struct tlv_node_ann_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 lease_rates *option_will_fund;
};
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_closing_signed_tlvs *tlv_closing_signed_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the closing_signed_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 closing_signed_tlvs_is_valid.
*/
bool fromwire_closing_signed_tlvs(const u8 **cursor, size_t *max,
struct tlv_closing_signed_tlvs * record);
/**
* Serialize a TLV stream for the closing_signed_tlvs namespace.
*
* This function only considers known fields from the closing_signed_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
* `closing_signed_tlvs_is_valid`.
*/
void towire_closing_signed_tlvs(u8 **pptr, const struct tlv_closing_signed_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 closing_signed_tlvs_is_valid(const struct tlv_closing_signed_tlvs *record,
size_t *err_index);
struct tlv_node_ann_tlvs *tlv_node_ann_tlvs_new(const tal_t *ctx);
/**
* Deserialize a TLV stream for the node_ann_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 node_ann_tlvs_is_valid.
*/
bool fromwire_node_ann_tlvs(const u8 **cursor, size_t *max,
struct tlv_node_ann_tlvs * record);
/**
* Serialize a TLV stream for the node_ann_tlvs namespace.
*
* This function only considers known fields from the node_ann_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
* `node_ann_tlvs_is_valid`.
*/
void towire_node_ann_tlvs(u8 **pptr, const struct tlv_node_ann_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 node_ann_tlvs_is_valid(const struct tlv_node_ann_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: LEASE_RATES */
void towire_lease_rates(u8 **p, const struct lease_rates *lease_rates);
void fromwire_lease_rates(const u8 **cursor, size_t *plen, struct lease_rates *lease_rates);
/* 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, u32 funding_feerate_perkw);
bool fromwire_init_rbf(const void *p, struct channel_id *channel_id, struct amount_sat *funding_satoshis, u32 *locktime, u32 *funding_feerate_perkw);
/* 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, const struct tlv_closing_signed_tlvs *tlvs);
bool fromwire_closing_signed(const void *p, struct channel_id *channel_id, struct amount_sat *fee_satoshis, secp256k1_ecdsa_signature *signature, struct tlv_closing_signed_tlvs *tlvs);
/* 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: UPDATE_BLOCKHEIGHT */
u8 *towire_update_blockheight(const tal_t *ctx, const struct channel_id *channel_id, u32 blockheight);
bool fromwire_update_blockheight(const void *p, struct channel_id *channel_id, u32 *blockheight);
/* 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, const struct tlv_node_ann_tlvs *tlvs);
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, struct tlv_node_ann_tlvs *tlvs);
/* 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:d2dbf0b5768a6a6c940a353621f8a0521f49104c99d7f5d350c500587a7d54c4