+ * Indicates that this is the only struct which contains the same pointer.
+ * Rust functions which take ownership of an object provided via an argument require
+ * this to be true and invalidate the object pointed to by inner.
+ */
+ bool is_owned;
+} LDKReplyChannelRange;
+
+/**
+ * An event generated by ChannelManager which indicates a message should be sent to a peer (or
+ * broadcast to most peers).
+ * These events are handled by PeerManager::process_events if you are using a PeerManager.
+ */
+typedef enum LDKMessageSendEvent_Tag {
+ /**
+ * Used to indicate that we've accepted a channel open and should send the accept_channel
+ * message provided to the given peer.
+ */
+ LDKMessageSendEvent_SendAcceptChannel,
+ /**
+ * Used to indicate that we've initiated a channel open and should send the open_channel
+ * message provided to the given peer.
+ */
+ LDKMessageSendEvent_SendOpenChannel,
+ /**
+ * Used to indicate that a funding_created message should be sent to the peer with the given node_id.
+ */
+ LDKMessageSendEvent_SendFundingCreated,
+ /**
+ * Used to indicate that a funding_signed message should be sent to the peer with the given node_id.
+ */
+ LDKMessageSendEvent_SendFundingSigned,
+ /**
+ * Used to indicate that a funding_locked message should be sent to the peer with the given node_id.
+ */
+ LDKMessageSendEvent_SendFundingLocked,
+ /**
+ * Used to indicate that an announcement_signatures message should be sent to the peer with the given node_id.
+ */
+ LDKMessageSendEvent_SendAnnouncementSignatures,
+ /**
+ * Used to indicate that a series of HTLC update messages, as well as a commitment_signed
+ * message should be sent to the peer with the given node_id.
+ */
+ LDKMessageSendEvent_UpdateHTLCs,
+ /**
+ * Used to indicate that a revoke_and_ack message should be sent to the peer with the given node_id.
+ */
+ LDKMessageSendEvent_SendRevokeAndACK,
+ /**
+ * Used to indicate that a closing_signed message should be sent to the peer with the given node_id.
+ */
+ LDKMessageSendEvent_SendClosingSigned,
+ /**
+ * Used to indicate that a shutdown message should be sent to the peer with the given node_id.
+ */
+ LDKMessageSendEvent_SendShutdown,
+ /**
+ * Used to indicate that a channel_reestablish message should be sent to the peer with the given node_id.
+ */
+ LDKMessageSendEvent_SendChannelReestablish,
+ /**
+ * Used to indicate that a channel_announcement and channel_update should be broadcast to all
+ * peers (except the peer with node_id either msg.contents.node_id_1 or msg.contents.node_id_2).
+ *
+ * Note that after doing so, you very likely (unless you did so very recently) want to call
+ * ChannelManager::broadcast_node_announcement to trigger a BroadcastNodeAnnouncement event.
+ * This ensures that any nodes which see our channel_announcement also have a relevant
+ * node_announcement, including relevant feature flags which may be important for routing
+ * through or to us.
+ */
+ LDKMessageSendEvent_BroadcastChannelAnnouncement,
+ /**
+ * Used to indicate that a node_announcement should be broadcast to all peers.
+ */
+ LDKMessageSendEvent_BroadcastNodeAnnouncement,
+ /**
+ * Used to indicate that a channel_update should be broadcast to all peers.
+ */
+ LDKMessageSendEvent_BroadcastChannelUpdate,
+ /**
+ * Broadcast an error downstream to be handled
+ */
+ LDKMessageSendEvent_HandleError,
+ /**
+ * When a payment fails we may receive updates back from the hop where it failed. In such
+ * cases this event is generated so that we can inform the network graph of this information.
+ */
+ LDKMessageSendEvent_PaymentFailureNetworkUpdate,
+ /**
+ * Query a peer for channels with funding transaction UTXOs in a block range.
+ */
+ LDKMessageSendEvent_SendChannelRangeQuery,
+ /**
+ * Request routing gossip messages from a peer for a list of channels identified by
+ * their short_channel_ids.
+ */
+ LDKMessageSendEvent_SendShortIdsQuery,
+ /**
+ * Sends a reply to a channel range query. This may be one of several SendReplyChannelRange events
+ * emitted during processing of the query.
+ */
+ LDKMessageSendEvent_SendReplyChannelRange,
+ /**
+ * Must be last for serialization purposes
+ */
+ LDKMessageSendEvent_Sentinel,
+} LDKMessageSendEvent_Tag;
+
+typedef struct LDKMessageSendEvent_LDKSendAcceptChannel_Body {
+ /**
+ * The node_id of the node which should receive this message
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The message which should be sent.
+ */
+ struct LDKAcceptChannel msg;
+} LDKMessageSendEvent_LDKSendAcceptChannel_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendOpenChannel_Body {
+ /**
+ * The node_id of the node which should receive this message
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The message which should be sent.
+ */
+ struct LDKOpenChannel msg;
+} LDKMessageSendEvent_LDKSendOpenChannel_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendFundingCreated_Body {
+ /**
+ * The node_id of the node which should receive this message
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The message which should be sent.
+ */
+ struct LDKFundingCreated msg;
+} LDKMessageSendEvent_LDKSendFundingCreated_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendFundingSigned_Body {
+ /**
+ * The node_id of the node which should receive this message
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The message which should be sent.
+ */
+ struct LDKFundingSigned msg;
+} LDKMessageSendEvent_LDKSendFundingSigned_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendFundingLocked_Body {
+ /**
+ * The node_id of the node which should receive these message(s)
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The funding_locked message which should be sent.
+ */
+ struct LDKFundingLocked msg;
+} LDKMessageSendEvent_LDKSendFundingLocked_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body {
+ /**
+ * The node_id of the node which should receive these message(s)
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The announcement_signatures message which should be sent.
+ */
+ struct LDKAnnouncementSignatures msg;
+} LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body;
+
+typedef struct LDKMessageSendEvent_LDKUpdateHTLCs_Body {
+ /**
+ * The node_id of the node which should receive these message(s)
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The update messages which should be sent. ALL messages in the struct should be sent!
+ */
+ struct LDKCommitmentUpdate updates;
+} LDKMessageSendEvent_LDKUpdateHTLCs_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendRevokeAndACK_Body {
+ /**
+ * The node_id of the node which should receive this message
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The message which should be sent.
+ */
+ struct LDKRevokeAndACK msg;
+} LDKMessageSendEvent_LDKSendRevokeAndACK_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendClosingSigned_Body {
+ /**
+ * The node_id of the node which should receive this message
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The message which should be sent.
+ */
+ struct LDKClosingSigned msg;
+} LDKMessageSendEvent_LDKSendClosingSigned_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendShutdown_Body {
+ /**
+ * The node_id of the node which should receive this message
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The message which should be sent.
+ */
+ struct LDKShutdown msg;
+} LDKMessageSendEvent_LDKSendShutdown_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendChannelReestablish_Body {
+ /**
+ * The node_id of the node which should receive this message
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The message which should be sent.
+ */
+ struct LDKChannelReestablish msg;
+} LDKMessageSendEvent_LDKSendChannelReestablish_Body;
+
+typedef struct LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body {
+ /**
+ * The channel_announcement which should be sent.
+ */
+ struct LDKChannelAnnouncement msg;
+ /**
+ * The followup channel_update which should be sent.
+ */
+ struct LDKChannelUpdate update_msg;
+} LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body;
+
+typedef struct LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body {
+ /**
+ * The node_announcement which should be sent.
+ */
+ struct LDKNodeAnnouncement msg;
+} LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body;
+
+typedef struct LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body {
+ /**
+ * The channel_update which should be sent.
+ */
+ struct LDKChannelUpdate msg;
+} LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body;
+
+typedef struct LDKMessageSendEvent_LDKHandleError_Body {
+ /**
+ * The node_id of the node which should receive this message
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The action which should be taken.
+ */
+ struct LDKErrorAction action;
+} LDKMessageSendEvent_LDKHandleError_Body;
+
+typedef struct LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body {
+ /**
+ * The channel/node update which should be sent to NetGraphMsgHandler
+ */
+ struct LDKHTLCFailChannelUpdate update;
+} LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendChannelRangeQuery_Body {
+ /**
+ * The node_id of this message recipient
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The query_channel_range which should be sent.
+ */
+ struct LDKQueryChannelRange msg;
+} LDKMessageSendEvent_LDKSendChannelRangeQuery_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendShortIdsQuery_Body {
+ /**
+ * The node_id of this message recipient
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The query_short_channel_ids which should be sent.
+ */
+ struct LDKQueryShortChannelIds msg;
+} LDKMessageSendEvent_LDKSendShortIdsQuery_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendReplyChannelRange_Body {
+ /**
+ * The node_id of this message recipient
+ */
+ struct LDKPublicKey node_id;
+ /**
+ * The reply_channel_range which should be sent.
+ */
+ struct LDKReplyChannelRange msg;
+} LDKMessageSendEvent_LDKSendReplyChannelRange_Body;
+
+typedef struct MUST_USE_STRUCT LDKMessageSendEvent {
+ LDKMessageSendEvent_Tag tag;
+ union {
+ LDKMessageSendEvent_LDKSendAcceptChannel_Body send_accept_channel;
+ LDKMessageSendEvent_LDKSendOpenChannel_Body send_open_channel;
+ LDKMessageSendEvent_LDKSendFundingCreated_Body send_funding_created;
+ LDKMessageSendEvent_LDKSendFundingSigned_Body send_funding_signed;
+ LDKMessageSendEvent_LDKSendFundingLocked_Body send_funding_locked;
+ LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body send_announcement_signatures;
+ LDKMessageSendEvent_LDKUpdateHTLCs_Body update_htl_cs;
+ LDKMessageSendEvent_LDKSendRevokeAndACK_Body send_revoke_and_ack;
+ LDKMessageSendEvent_LDKSendClosingSigned_Body send_closing_signed;
+ LDKMessageSendEvent_LDKSendShutdown_Body send_shutdown;
+ LDKMessageSendEvent_LDKSendChannelReestablish_Body send_channel_reestablish;
+ LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body broadcast_channel_announcement;
+ LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body broadcast_node_announcement;
+ LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body broadcast_channel_update;
+ LDKMessageSendEvent_LDKHandleError_Body handle_error;
+ LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body payment_failure_network_update;
+ LDKMessageSendEvent_LDKSendChannelRangeQuery_Body send_channel_range_query;
+ LDKMessageSendEvent_LDKSendShortIdsQuery_Body send_short_ids_query;
+ LDKMessageSendEvent_LDKSendReplyChannelRange_Body send_reply_channel_range;
+ };
+} LDKMessageSendEvent;
+
+/**
+ * A dynamically-allocated array of crate::lightning::util::events::MessageSendEvents of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_MessageSendEventZ {
+ /**
+ * The elements in the array.
+ * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().