- LDKErrorAction_DisconnectPeer,
- /**
- * The peer did something harmless that we weren't able to process, just log and ignore
- */
- LDKErrorAction_IgnoreError,
- /**
- * The peer did something incorrect. Tell them.
- */
- LDKErrorAction_SendErrorMessage,
- /**
- * Must be last for serialization purposes
- */
- LDKErrorAction_Sentinel,
-} LDKErrorAction_Tag;
-
-typedef struct LDKErrorAction_LDKDisconnectPeer_Body {
- /**
- * An error message which we should make an effort to send before we disconnect.
- */
- struct LDKErrorMessage msg;
-} LDKErrorAction_LDKDisconnectPeer_Body;
-
-typedef struct LDKErrorAction_LDKSendErrorMessage_Body {
- /**
- * The message to send.
- */
- struct LDKErrorMessage msg;
-} LDKErrorAction_LDKSendErrorMessage_Body;
-
-typedef struct MUST_USE_STRUCT LDKErrorAction {
- LDKErrorAction_Tag tag;
- union {
- LDKErrorAction_LDKDisconnectPeer_Body disconnect_peer;
- LDKErrorAction_LDKSendErrorMessage_Body send_error_message;
- };
-} LDKErrorAction;
-
-/**
- * The information we received from a peer along the route of a payment we originated. This is
- * returned by ChannelMessageHandler::handle_update_fail_htlc to be passed into
- * RoutingMessageHandler::handle_htlc_fail_channel_update to update our network map.
- */
-typedef enum LDKHTLCFailChannelUpdate_Tag {
- /**
- * We received an error which included a full ChannelUpdate message.
- */
- LDKHTLCFailChannelUpdate_ChannelUpdateMessage,
- /**
- * We received an error which indicated only that a channel has been closed
- */
- LDKHTLCFailChannelUpdate_ChannelClosed,
- /**
- * We received an error which indicated only that a node has failed
- */
- LDKHTLCFailChannelUpdate_NodeFailure,
- /**
- * Must be last for serialization purposes
- */
- LDKHTLCFailChannelUpdate_Sentinel,
-} LDKHTLCFailChannelUpdate_Tag;
-
-typedef struct LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body {
- /**
- * The unwrapped message we received
- */
- struct LDKChannelUpdate msg;
-} LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body;
-
-typedef struct LDKHTLCFailChannelUpdate_LDKChannelClosed_Body {
- /**
- * The short_channel_id which has now closed.
- */
- uint64_t short_channel_id;
- /**
- * when this true, this channel should be permanently removed from the
- * consideration. Otherwise, this channel can be restored as new channel_update is received
- */
- bool is_permanent;
-} LDKHTLCFailChannelUpdate_LDKChannelClosed_Body;
-
-typedef struct LDKHTLCFailChannelUpdate_LDKNodeFailure_Body {
- /**
- * The node_id that has failed.
- */
- struct LDKPublicKey node_id;
- /**
- * when this true, node should be permanently removed from the
- * consideration. Otherwise, the channels connected to this node can be
- * restored as new channel_update is received
- */
- bool is_permanent;
-} LDKHTLCFailChannelUpdate_LDKNodeFailure_Body;
-
-typedef struct MUST_USE_STRUCT LDKHTLCFailChannelUpdate {
- LDKHTLCFailChannelUpdate_Tag tag;
- union {
- LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body channel_update_message;
- LDKHTLCFailChannelUpdate_LDKChannelClosed_Body channel_closed;
- LDKHTLCFailChannelUpdate_LDKNodeFailure_Body node_failure;
- };
-} LDKHTLCFailChannelUpdate;
-
-
-
-/**
- * A query_channel_range message is used to query a peer for channel
- * UTXOs in a range of blocks. The recipient of a query makes a best
- * effort to reply to the query using one or more reply_channel_range
- * messages.
- */
-typedef struct MUST_USE_STRUCT LDKQueryChannelRange {
- /**
- * A pointer to the opaque Rust object.
- * Nearly everywhere, inner must be non-null, however in places where
- * the Rust equivalent takes an Option, it may be set to null to indicate None.
- */
- LDKnativeQueryChannelRange *inner;
- /**
- * 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;
-} LDKQueryChannelRange;
-
-
-
-/**
- * A query_short_channel_ids message is used to query a peer for
- * routing gossip messages related to one or more short_channel_ids.
- * The query recipient will reply with the latest, if available,
- * channel_announcement, channel_update and node_announcement messages
- * it maintains for the requested short_channel_ids followed by a
- * reply_short_channel_ids_end message. The short_channel_ids sent in
- * this query are encoded. We only support encoding_type=0 uncompressed
- * serialization and do not support encoding_type=1 zlib serialization.
- */
-typedef struct MUST_USE_STRUCT LDKQueryShortChannelIds {
- /**
- * A pointer to the opaque Rust object.
- * Nearly everywhere, inner must be non-null, however in places where
- * the Rust equivalent takes an Option, it may be set to null to indicate None.
- */
- LDKnativeQueryShortChannelIds *inner;
- /**
- * 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;
-} LDKQueryShortChannelIds;
-
-
-
-/**
- * A reply_channel_range message is a reply to a query_channel_range
- * message. Multiple reply_channel_range messages can be sent in reply
- * to a single query_channel_range message. The query recipient makes a
- * best effort to respond based on their local network view which may
- * not be a perfect view of the network. The short_channel_ids in the
- * reply are encoded. We only support encoding_type=0 uncompressed
- * serialization and do not support encoding_type=1 zlib serialization.
- */
-typedef struct MUST_USE_STRUCT LDKReplyChannelRange {
- /**
- * A pointer to the opaque Rust object.
- * Nearly everywhere, inner must be non-null, however in places where
- * the Rust equivalent takes an Option, it may be set to null to indicate None.
- */
- LDKnativeReplyChannelRange *inner;
- /**
- * 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,