From: Matt Corallo Date: Mon, 4 Jan 2021 19:23:16 +0000 (-0500) Subject: - bindings updates X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=b8f49c04ba3e86a02f101861e61826086e40b7e7;p=rust-lightning - bindings updates --- diff --git a/lightning-c-bindings/include/lightning.h b/lightning-c-bindings/include/lightning.h index 335fa60a3..8cd1511d6 100644 --- a/lightning-c-bindings/include/lightning.h +++ b/lightning-c-bindings/include/lightning.h @@ -2054,6 +2054,32 @@ typedef struct LDKCVecTempl_C2TupleTempl_usize__Transaction LDKCVec_C2Tuple_usiz +/** + * An error in decoding a message or struct. + */ +typedef struct MUST_USE_STRUCT LDKDecodeError { + /** + * 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. + */ + LDKnativeDecodeError *inner; + bool is_owned; +} LDKDecodeError; + +typedef union LDKCResultPtr_ChannelMonitorUpdate__DecodeError { + struct LDKChannelMonitorUpdate *result; + struct LDKDecodeError *err; +} LDKCResultPtr_ChannelMonitorUpdate__DecodeError; + +typedef struct LDKCResultTempl_ChannelMonitorUpdate__DecodeError { + union LDKCResultPtr_ChannelMonitorUpdate__DecodeError contents; + bool result_ok; +} LDKCResultTempl_ChannelMonitorUpdate__DecodeError; + +typedef struct LDKCResultTempl_ChannelMonitorUpdate__DecodeError LDKCResult_ChannelMonitorUpdateDecodeErrorZ; + + + /** * Simple structure sent back by `chain::Watch` when an HTLC from a forward channel is detected on * chain. Used to update the corresponding HTLC in the backward channel. Failing to pass the @@ -2088,20 +2114,6 @@ typedef struct LDKSecretKey { uint8_t bytes[32]; } LDKSecretKey; - - -/** - * An error in decoding a message or struct. - */ -typedef struct MUST_USE_STRUCT LDKDecodeError { - /** - * 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. - */ - LDKnativeDecodeError *inner; - bool is_owned; -} LDKDecodeError; - typedef union LDKCResultPtr_ChannelKeys__DecodeError { struct LDKChannelKeys *result; struct LDKDecodeError *err; @@ -2171,6 +2183,18 @@ typedef struct MUST_USE_STRUCT LDKInMemoryChannelKeys { bool is_owned; } LDKInMemoryChannelKeys; +typedef union LDKCResultPtr_InMemoryChannelKeys__DecodeError { + struct LDKInMemoryChannelKeys *result; + struct LDKDecodeError *err; +} LDKCResultPtr_InMemoryChannelKeys__DecodeError; + +typedef struct LDKCResultTempl_InMemoryChannelKeys__DecodeError { + union LDKCResultPtr_InMemoryChannelKeys__DecodeError contents; + bool result_ok; +} LDKCResultTempl_InMemoryChannelKeys__DecodeError; + +typedef struct LDKCResultTempl_InMemoryChannelKeys__DecodeError LDKCResult_InMemoryChannelKeysDecodeErrorZ; + /** @@ -2887,6 +2911,162 @@ typedef struct LDKRoutingMessageHandler { void (*free)(void *this_arg); } LDKRoutingMessageHandler; +typedef union LDKCResultPtr_ChannelReestablish__DecodeError { + struct LDKChannelReestablish *result; + struct LDKDecodeError *err; +} LDKCResultPtr_ChannelReestablish__DecodeError; + +typedef struct LDKCResultTempl_ChannelReestablish__DecodeError { + union LDKCResultPtr_ChannelReestablish__DecodeError contents; + bool result_ok; +} LDKCResultTempl_ChannelReestablish__DecodeError; + +typedef struct LDKCResultTempl_ChannelReestablish__DecodeError LDKCResult_ChannelReestablishDecodeErrorZ; + +typedef union LDKCResultPtr_Init__DecodeError { + struct LDKInit *result; + struct LDKDecodeError *err; +} LDKCResultPtr_Init__DecodeError; + +typedef struct LDKCResultTempl_Init__DecodeError { + union LDKCResultPtr_Init__DecodeError contents; + bool result_ok; +} LDKCResultTempl_Init__DecodeError; + +typedef struct LDKCResultTempl_Init__DecodeError LDKCResult_InitDecodeErrorZ; + +typedef union LDKCResultPtr_Ping__DecodeError { + struct LDKPing *result; + struct LDKDecodeError *err; +} LDKCResultPtr_Ping__DecodeError; + +typedef struct LDKCResultTempl_Ping__DecodeError { + union LDKCResultPtr_Ping__DecodeError contents; + bool result_ok; +} LDKCResultTempl_Ping__DecodeError; + +typedef struct LDKCResultTempl_Ping__DecodeError LDKCResult_PingDecodeErrorZ; + +typedef union LDKCResultPtr_Pong__DecodeError { + struct LDKPong *result; + struct LDKDecodeError *err; +} LDKCResultPtr_Pong__DecodeError; + +typedef struct LDKCResultTempl_Pong__DecodeError { + union LDKCResultPtr_Pong__DecodeError contents; + bool result_ok; +} LDKCResultTempl_Pong__DecodeError; + +typedef struct LDKCResultTempl_Pong__DecodeError LDKCResult_PongDecodeErrorZ; + +typedef union LDKCResultPtr_UnsignedChannelAnnouncement__DecodeError { + struct LDKUnsignedChannelAnnouncement *result; + struct LDKDecodeError *err; +} LDKCResultPtr_UnsignedChannelAnnouncement__DecodeError; + +typedef struct LDKCResultTempl_UnsignedChannelAnnouncement__DecodeError { + union LDKCResultPtr_UnsignedChannelAnnouncement__DecodeError contents; + bool result_ok; +} LDKCResultTempl_UnsignedChannelAnnouncement__DecodeError; + +typedef struct LDKCResultTempl_UnsignedChannelAnnouncement__DecodeError LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ; + +typedef union LDKCResultPtr_UnsignedChannelUpdate__DecodeError { + struct LDKUnsignedChannelUpdate *result; + struct LDKDecodeError *err; +} LDKCResultPtr_UnsignedChannelUpdate__DecodeError; + +typedef struct LDKCResultTempl_UnsignedChannelUpdate__DecodeError { + union LDKCResultPtr_UnsignedChannelUpdate__DecodeError contents; + bool result_ok; +} LDKCResultTempl_UnsignedChannelUpdate__DecodeError; + +typedef struct LDKCResultTempl_UnsignedChannelUpdate__DecodeError LDKCResult_UnsignedChannelUpdateDecodeErrorZ; + +typedef union LDKCResultPtr_ErrorMessage__DecodeError { + struct LDKErrorMessage *result; + struct LDKDecodeError *err; +} LDKCResultPtr_ErrorMessage__DecodeError; + +typedef struct LDKCResultTempl_ErrorMessage__DecodeError { + union LDKCResultPtr_ErrorMessage__DecodeError contents; + bool result_ok; +} LDKCResultTempl_ErrorMessage__DecodeError; + +typedef struct LDKCResultTempl_ErrorMessage__DecodeError LDKCResult_ErrorMessageDecodeErrorZ; + +typedef union LDKCResultPtr_UnsignedNodeAnnouncement__DecodeError { + struct LDKUnsignedNodeAnnouncement *result; + struct LDKDecodeError *err; +} LDKCResultPtr_UnsignedNodeAnnouncement__DecodeError; + +typedef struct LDKCResultTempl_UnsignedNodeAnnouncement__DecodeError { + union LDKCResultPtr_UnsignedNodeAnnouncement__DecodeError contents; + bool result_ok; +} LDKCResultTempl_UnsignedNodeAnnouncement__DecodeError; + +typedef struct LDKCResultTempl_UnsignedNodeAnnouncement__DecodeError LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ; + +typedef union LDKCResultPtr_QueryShortChannelIds__DecodeError { + struct LDKQueryShortChannelIds *result; + struct LDKDecodeError *err; +} LDKCResultPtr_QueryShortChannelIds__DecodeError; + +typedef struct LDKCResultTempl_QueryShortChannelIds__DecodeError { + union LDKCResultPtr_QueryShortChannelIds__DecodeError contents; + bool result_ok; +} LDKCResultTempl_QueryShortChannelIds__DecodeError; + +typedef struct LDKCResultTempl_QueryShortChannelIds__DecodeError LDKCResult_QueryShortChannelIdsDecodeErrorZ; + +typedef union LDKCResultPtr_ReplyShortChannelIdsEnd__DecodeError { + struct LDKReplyShortChannelIdsEnd *result; + struct LDKDecodeError *err; +} LDKCResultPtr_ReplyShortChannelIdsEnd__DecodeError; + +typedef struct LDKCResultTempl_ReplyShortChannelIdsEnd__DecodeError { + union LDKCResultPtr_ReplyShortChannelIdsEnd__DecodeError contents; + bool result_ok; +} LDKCResultTempl_ReplyShortChannelIdsEnd__DecodeError; + +typedef struct LDKCResultTempl_ReplyShortChannelIdsEnd__DecodeError LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ; + +typedef union LDKCResultPtr_QueryChannelRange__DecodeError { + struct LDKQueryChannelRange *result; + struct LDKDecodeError *err; +} LDKCResultPtr_QueryChannelRange__DecodeError; + +typedef struct LDKCResultTempl_QueryChannelRange__DecodeError { + union LDKCResultPtr_QueryChannelRange__DecodeError contents; + bool result_ok; +} LDKCResultTempl_QueryChannelRange__DecodeError; + +typedef struct LDKCResultTempl_QueryChannelRange__DecodeError LDKCResult_QueryChannelRangeDecodeErrorZ; + +typedef union LDKCResultPtr_ReplyChannelRange__DecodeError { + struct LDKReplyChannelRange *result; + struct LDKDecodeError *err; +} LDKCResultPtr_ReplyChannelRange__DecodeError; + +typedef struct LDKCResultTempl_ReplyChannelRange__DecodeError { + union LDKCResultPtr_ReplyChannelRange__DecodeError contents; + bool result_ok; +} LDKCResultTempl_ReplyChannelRange__DecodeError; + +typedef struct LDKCResultTempl_ReplyChannelRange__DecodeError LDKCResult_ReplyChannelRangeDecodeErrorZ; + +typedef union LDKCResultPtr_GossipTimestampFilter__DecodeError { + struct LDKGossipTimestampFilter *result; + struct LDKDecodeError *err; +} LDKCResultPtr_GossipTimestampFilter__DecodeError; + +typedef struct LDKCResultTempl_GossipTimestampFilter__DecodeError { + union LDKCResultPtr_GossipTimestampFilter__DecodeError contents; + bool result_ok; +} LDKCResultTempl_GossipTimestampFilter__DecodeError; + +typedef struct LDKCResultTempl_GossipTimestampFilter__DecodeError LDKCResult_GossipTimestampFilterDecodeErrorZ; + /** @@ -3131,6 +3311,18 @@ typedef struct LDKCVecTempl_CVecTempl_RouteHop { typedef struct LDKCVecTempl_CVecTempl_RouteHop LDKCVec_CVec_RouteHopZZ; +typedef union LDKCResultPtr_Route__DecodeError { + struct LDKRoute *result; + struct LDKDecodeError *err; +} LDKCResultPtr_Route__DecodeError; + +typedef struct LDKCResultTempl_Route__DecodeError { + union LDKCResultPtr_Route__DecodeError contents; + bool result_ok; +} LDKCResultTempl_Route__DecodeError; + +typedef struct LDKCResultTempl_Route__DecodeError LDKCResult_RouteDecodeErrorZ; + /** @@ -3256,6 +3448,18 @@ typedef struct MUST_USE_STRUCT LDKChannelInfo { bool is_owned; } LDKChannelInfo; +typedef union LDKCResultPtr_RoutingFees__DecodeError { + struct LDKRoutingFees *result; + struct LDKDecodeError *err; +} LDKCResultPtr_RoutingFees__DecodeError; + +typedef struct LDKCResultTempl_RoutingFees__DecodeError { + union LDKCResultPtr_RoutingFees__DecodeError contents; + bool result_ok; +} LDKCResultTempl_RoutingFees__DecodeError; + +typedef struct LDKCResultTempl_RoutingFees__DecodeError LDKCResult_RoutingFeesDecodeErrorZ; + /** @@ -3270,6 +3474,18 @@ typedef struct MUST_USE_STRUCT LDKNodeAnnouncementInfo { bool is_owned; } LDKNodeAnnouncementInfo; +typedef union LDKCResultPtr_NodeAnnouncementInfo__DecodeError { + struct LDKNodeAnnouncementInfo *result; + struct LDKDecodeError *err; +} LDKCResultPtr_NodeAnnouncementInfo__DecodeError; + +typedef struct LDKCResultTempl_NodeAnnouncementInfo__DecodeError { + union LDKCResultPtr_NodeAnnouncementInfo__DecodeError contents; + bool result_ok; +} LDKCResultTempl_NodeAnnouncementInfo__DecodeError; + +typedef struct LDKCResultTempl_NodeAnnouncementInfo__DecodeError LDKCResult_NodeAnnouncementInfoDecodeErrorZ; + /** @@ -3284,6 +3500,30 @@ typedef struct MUST_USE_STRUCT LDKNodeInfo { bool is_owned; } LDKNodeInfo; +typedef union LDKCResultPtr_NodeInfo__DecodeError { + struct LDKNodeInfo *result; + struct LDKDecodeError *err; +} LDKCResultPtr_NodeInfo__DecodeError; + +typedef struct LDKCResultTempl_NodeInfo__DecodeError { + union LDKCResultPtr_NodeInfo__DecodeError contents; + bool result_ok; +} LDKCResultTempl_NodeInfo__DecodeError; + +typedef struct LDKCResultTempl_NodeInfo__DecodeError LDKCResult_NodeInfoDecodeErrorZ; + +typedef union LDKCResultPtr_NetworkGraph__DecodeError { + struct LDKNetworkGraph *result; + struct LDKDecodeError *err; +} LDKCResultPtr_NetworkGraph__DecodeError; + +typedef struct LDKCResultTempl_NetworkGraph__DecodeError { + union LDKCResultPtr_NetworkGraph__DecodeError contents; + bool result_ok; +} LDKCResultTempl_NetworkGraph__DecodeError; + +typedef struct LDKCResultTempl_NetworkGraph__DecodeError LDKCResult_NetworkGraphDecodeErrorZ; + typedef struct LDKCVecTempl_RouteHop LDKCVec_RouteHopZ; extern const void (*CVec_SpendableOutputDescriptorZ_free)(LDKCVec_SpendableOutputDescriptorZ); @@ -3302,6 +3542,12 @@ extern const LDKCResult_NoneChannelMonitorUpdateErrZ (*CResult_NoneChannelMonito extern const void (*CVec_MonitorEventZ_free)(LDKCVec_MonitorEventZ); +extern const void (*CResult_ChannelMonitorUpdateDecodeErrorZ_free)(LDKCResult_ChannelMonitorUpdateDecodeErrorZ); + +extern const LDKCResult_ChannelMonitorUpdateDecodeErrorZ (*CResult_ChannelMonitorUpdateDecodeErrorZ_ok)(struct LDKChannelMonitorUpdate); + +extern const LDKCResult_ChannelMonitorUpdateDecodeErrorZ (*CResult_ChannelMonitorUpdateDecodeErrorZ_err)(struct LDKDecodeError); + extern const void (*CResult_NoneMonitorUpdateErrorZ_free)(LDKCResult_NoneMonitorUpdateErrorZ); extern const LDKCResult_NoneMonitorUpdateErrorZ (*CResult_NoneMonitorUpdateErrorZ_err)(struct LDKMonitorUpdateError); @@ -3342,6 +3588,12 @@ extern const LDKCResult_ChanKeySignerDecodeErrorZ (*CResult_ChanKeySignerDecodeE extern const LDKCResult_ChanKeySignerDecodeErrorZ (*CResult_ChanKeySignerDecodeErrorZ_err)(struct LDKDecodeError); +extern const void (*CResult_InMemoryChannelKeysDecodeErrorZ_free)(LDKCResult_InMemoryChannelKeysDecodeErrorZ); + +extern const LDKCResult_InMemoryChannelKeysDecodeErrorZ (*CResult_InMemoryChannelKeysDecodeErrorZ_ok)(struct LDKInMemoryChannelKeys); + +extern const LDKCResult_InMemoryChannelKeysDecodeErrorZ (*CResult_InMemoryChannelKeysDecodeErrorZ_err)(struct LDKDecodeError); + extern const void (*CResult_TxOutAccessErrorZ_free)(LDKCResult_TxOutAccessErrorZ); extern const LDKCResult_TxOutAccessErrorZ (*CResult_TxOutAccessErrorZ_ok)(struct LDKTxOut); @@ -3388,6 +3640,84 @@ extern const void (*CResult_NoneLightningErrorZ_free)(LDKCResult_NoneLightningEr extern const LDKCResult_NoneLightningErrorZ (*CResult_NoneLightningErrorZ_err)(struct LDKLightningError); +extern const void (*CResult_ChannelReestablishDecodeErrorZ_free)(LDKCResult_ChannelReestablishDecodeErrorZ); + +extern const LDKCResult_ChannelReestablishDecodeErrorZ (*CResult_ChannelReestablishDecodeErrorZ_ok)(struct LDKChannelReestablish); + +extern const LDKCResult_ChannelReestablishDecodeErrorZ (*CResult_ChannelReestablishDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_InitDecodeErrorZ_free)(LDKCResult_InitDecodeErrorZ); + +extern const LDKCResult_InitDecodeErrorZ (*CResult_InitDecodeErrorZ_ok)(struct LDKInit); + +extern const LDKCResult_InitDecodeErrorZ (*CResult_InitDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_PingDecodeErrorZ_free)(LDKCResult_PingDecodeErrorZ); + +extern const LDKCResult_PingDecodeErrorZ (*CResult_PingDecodeErrorZ_ok)(struct LDKPing); + +extern const LDKCResult_PingDecodeErrorZ (*CResult_PingDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_PongDecodeErrorZ_free)(LDKCResult_PongDecodeErrorZ); + +extern const LDKCResult_PongDecodeErrorZ (*CResult_PongDecodeErrorZ_ok)(struct LDKPong); + +extern const LDKCResult_PongDecodeErrorZ (*CResult_PongDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_UnsignedChannelAnnouncementDecodeErrorZ_free)(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ); + +extern const LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ (*CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok)(struct LDKUnsignedChannelAnnouncement); + +extern const LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ (*CResult_UnsignedChannelAnnouncementDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_UnsignedChannelUpdateDecodeErrorZ_free)(LDKCResult_UnsignedChannelUpdateDecodeErrorZ); + +extern const LDKCResult_UnsignedChannelUpdateDecodeErrorZ (*CResult_UnsignedChannelUpdateDecodeErrorZ_ok)(struct LDKUnsignedChannelUpdate); + +extern const LDKCResult_UnsignedChannelUpdateDecodeErrorZ (*CResult_UnsignedChannelUpdateDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_ErrorMessageDecodeErrorZ_free)(LDKCResult_ErrorMessageDecodeErrorZ); + +extern const LDKCResult_ErrorMessageDecodeErrorZ (*CResult_ErrorMessageDecodeErrorZ_ok)(struct LDKErrorMessage); + +extern const LDKCResult_ErrorMessageDecodeErrorZ (*CResult_ErrorMessageDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_UnsignedNodeAnnouncementDecodeErrorZ_free)(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ); + +extern const LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ (*CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok)(struct LDKUnsignedNodeAnnouncement); + +extern const LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ (*CResult_UnsignedNodeAnnouncementDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_QueryShortChannelIdsDecodeErrorZ_free)(LDKCResult_QueryShortChannelIdsDecodeErrorZ); + +extern const LDKCResult_QueryShortChannelIdsDecodeErrorZ (*CResult_QueryShortChannelIdsDecodeErrorZ_ok)(struct LDKQueryShortChannelIds); + +extern const LDKCResult_QueryShortChannelIdsDecodeErrorZ (*CResult_QueryShortChannelIdsDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_ReplyShortChannelIdsEndDecodeErrorZ_free)(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ); + +extern const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ (*CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok)(struct LDKReplyShortChannelIdsEnd); + +extern const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ (*CResult_ReplyShortChannelIdsEndDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_QueryChannelRangeDecodeErrorZ_free)(LDKCResult_QueryChannelRangeDecodeErrorZ); + +extern const LDKCResult_QueryChannelRangeDecodeErrorZ (*CResult_QueryChannelRangeDecodeErrorZ_ok)(struct LDKQueryChannelRange); + +extern const LDKCResult_QueryChannelRangeDecodeErrorZ (*CResult_QueryChannelRangeDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_ReplyChannelRangeDecodeErrorZ_free)(LDKCResult_ReplyChannelRangeDecodeErrorZ); + +extern const LDKCResult_ReplyChannelRangeDecodeErrorZ (*CResult_ReplyChannelRangeDecodeErrorZ_ok)(struct LDKReplyChannelRange); + +extern const LDKCResult_ReplyChannelRangeDecodeErrorZ (*CResult_ReplyChannelRangeDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_GossipTimestampFilterDecodeErrorZ_free)(LDKCResult_GossipTimestampFilterDecodeErrorZ); + +extern const LDKCResult_GossipTimestampFilterDecodeErrorZ (*CResult_GossipTimestampFilterDecodeErrorZ_ok)(struct LDKGossipTimestampFilter); + +extern const LDKCResult_GossipTimestampFilterDecodeErrorZ (*CResult_GossipTimestampFilterDecodeErrorZ_err)(struct LDKDecodeError); + extern const void (*CVec_PublicKeyZ_free)(LDKCVec_PublicKeyZ); extern const void (*CVec_u8Z_free)(LDKCVec_u8Z); @@ -3434,6 +3764,12 @@ extern const void (*CVec_RouteHopZ_free)(LDKCVec_RouteHopZ); extern const void (*CVec_CVec_RouteHopZZ_free)(LDKCVec_CVec_RouteHopZZ); +extern const void (*CResult_RouteDecodeErrorZ_free)(LDKCResult_RouteDecodeErrorZ); + +extern const LDKCResult_RouteDecodeErrorZ (*CResult_RouteDecodeErrorZ_ok)(struct LDKRoute); + +extern const LDKCResult_RouteDecodeErrorZ (*CResult_RouteDecodeErrorZ_err)(struct LDKDecodeError); + extern const void (*CVec_RouteHintZ_free)(LDKCVec_RouteHintZ); extern const void (*CResult_RouteLightningErrorZ_free)(LDKCResult_RouteLightningErrorZ); @@ -3442,6 +3778,30 @@ extern const LDKCResult_RouteLightningErrorZ (*CResult_RouteLightningErrorZ_ok)( extern const LDKCResult_RouteLightningErrorZ (*CResult_RouteLightningErrorZ_err)(struct LDKLightningError); +extern const void (*CResult_RoutingFeesDecodeErrorZ_free)(LDKCResult_RoutingFeesDecodeErrorZ); + +extern const LDKCResult_RoutingFeesDecodeErrorZ (*CResult_RoutingFeesDecodeErrorZ_ok)(struct LDKRoutingFees); + +extern const LDKCResult_RoutingFeesDecodeErrorZ (*CResult_RoutingFeesDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_NodeAnnouncementInfoDecodeErrorZ_free)(LDKCResult_NodeAnnouncementInfoDecodeErrorZ); + +extern const LDKCResult_NodeAnnouncementInfoDecodeErrorZ (*CResult_NodeAnnouncementInfoDecodeErrorZ_ok)(struct LDKNodeAnnouncementInfo); + +extern const LDKCResult_NodeAnnouncementInfoDecodeErrorZ (*CResult_NodeAnnouncementInfoDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_NodeInfoDecodeErrorZ_free)(LDKCResult_NodeInfoDecodeErrorZ); + +extern const LDKCResult_NodeInfoDecodeErrorZ (*CResult_NodeInfoDecodeErrorZ_ok)(struct LDKNodeInfo); + +extern const LDKCResult_NodeInfoDecodeErrorZ (*CResult_NodeInfoDecodeErrorZ_err)(struct LDKDecodeError); + +extern const void (*CResult_NetworkGraphDecodeErrorZ_free)(LDKCResult_NetworkGraphDecodeErrorZ); + +extern const LDKCResult_NetworkGraphDecodeErrorZ (*CResult_NetworkGraphDecodeErrorZ_ok)(struct LDKNetworkGraph); + +extern const LDKCResult_NetworkGraphDecodeErrorZ (*CResult_NetworkGraphDecodeErrorZ_err)(struct LDKDecodeError); + extern const uintptr_t MAX_BUF_SIZE; extern const uint64_t MIN_RELAY_FEE_SAT_PER_1000_WEIGHT; @@ -4036,7 +4396,7 @@ void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *this_ptr LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *obj); -struct LDKChannelMonitorUpdate ChannelMonitorUpdate_read(struct LDKu8slice ser); +LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser); enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *orig); @@ -4298,7 +4658,7 @@ struct LDKChannelKeys InMemoryChannelKeys_as_ChannelKeys(const struct LDKInMemor LDKCVec_u8Z InMemoryChannelKeys_write(const struct LDKInMemoryChannelKeys *obj); -struct LDKInMemoryChannelKeys InMemoryChannelKeys_read(struct LDKu8slice ser); +LDKCResult_InMemoryChannelKeysDecodeErrorZ InMemoryChannelKeys_read(struct LDKu8slice ser); void KeysManager_free(struct LDKKeysManager this_ptr); @@ -6307,7 +6667,7 @@ struct LDKAnnouncementSignatures AnnouncementSignatures_read(struct LDKu8slice s LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *obj); -struct LDKChannelReestablish ChannelReestablish_read(struct LDKu8slice ser); +LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser); LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *obj); @@ -6331,7 +6691,7 @@ struct LDKFundingLocked FundingLocked_read(struct LDKu8slice ser); LDKCVec_u8Z Init_write(const struct LDKInit *obj); -struct LDKInit Init_read(struct LDKu8slice ser); +LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser); LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *obj); @@ -6367,15 +6727,15 @@ struct LDKUpdateAddHTLC UpdateAddHTLC_read(struct LDKu8slice ser); LDKCVec_u8Z Ping_write(const struct LDKPing *obj); -struct LDKPing Ping_read(struct LDKu8slice ser); +LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser); LDKCVec_u8Z Pong_write(const struct LDKPong *obj); -struct LDKPong Pong_read(struct LDKu8slice ser); +LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser); LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *obj); -struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_read(struct LDKu8slice ser); +LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser); LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *obj); @@ -6383,7 +6743,7 @@ struct LDKChannelAnnouncement ChannelAnnouncement_read(struct LDKu8slice ser); LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *obj); -struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_read(struct LDKu8slice ser); +LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser); LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *obj); @@ -6391,33 +6751,33 @@ struct LDKChannelUpdate ChannelUpdate_read(struct LDKu8slice ser); LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *obj); -struct LDKErrorMessage ErrorMessage_read(struct LDKu8slice ser); +LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser); LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *obj); -struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_read(struct LDKu8slice ser); +LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser); LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *obj); struct LDKNodeAnnouncement NodeAnnouncement_read(struct LDKu8slice ser); -struct LDKQueryShortChannelIds QueryShortChannelIds_read(struct LDKu8slice ser); +LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser); LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *obj); -struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_read(struct LDKu8slice ser); +LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser); LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *obj); -struct LDKQueryChannelRange QueryChannelRange_read(struct LDKu8slice ser); +LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser); LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *obj); -struct LDKReplyChannelRange ReplyChannelRange_read(struct LDKu8slice ser); +LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser); LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *obj); -struct LDKGossipTimestampFilter GossipTimestampFilter_read(struct LDKu8slice ser); +LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser); LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *obj); @@ -7255,7 +7615,7 @@ MUST_USE_RES struct LDKRoute Route_new(LDKCVec_CVec_RouteHopZZ paths_arg); LDKCVec_u8Z Route_write(const struct LDKRoute *obj); -struct LDKRoute Route_read(struct LDKu8slice ser); +LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser); void RouteHint_free(struct LDKRouteHint this_ptr); @@ -7545,7 +7905,7 @@ void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *this_ptr, ui MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg); -struct LDKRoutingFees RoutingFees_read(struct LDKu8slice ser); +LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser); LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *obj); @@ -7622,7 +7982,7 @@ MUST_USE_RES struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(struct LDKN LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *obj); -struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_read(struct LDKu8slice ser); +LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser); void NodeInfo_free(struct LDKNodeInfo this_ptr); @@ -7663,11 +8023,11 @@ MUST_USE_RES struct LDKNodeInfo NodeInfo_new(LDKCVec_u64Z channels_arg, struct L LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *obj); -struct LDKNodeInfo NodeInfo_read(struct LDKu8slice ser); +LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser); LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *obj); -struct LDKNetworkGraph NetworkGraph_read(struct LDKu8slice ser); +LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser); /** * Creates a new, empty, network graph. diff --git a/lightning-c-bindings/include/lightningpp.hpp b/lightning-c-bindings/include/lightningpp.hpp index b313d1fd3..8e972eac8 100644 --- a/lightning-c-bindings/include/lightningpp.hpp +++ b/lightning-c-bindings/include/lightningpp.hpp @@ -1480,20 +1480,6 @@ public: const LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator &() const { return &self; } const LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator ->() const { return &self; } }; -class C2Tuple_u32TxOutZ { -private: - LDKC2Tuple_u32TxOutZ self; -public: - C2Tuple_u32TxOutZ(const C2Tuple_u32TxOutZ&) = delete; - ~C2Tuple_u32TxOutZ() { C2Tuple_u32TxOutZ_free(self); } - C2Tuple_u32TxOutZ(C2Tuple_u32TxOutZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_u32TxOutZ)); } - C2Tuple_u32TxOutZ(LDKC2Tuple_u32TxOutZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_u32TxOutZ)); } - operator LDKC2Tuple_u32TxOutZ() { LDKC2Tuple_u32TxOutZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_u32TxOutZ)); return res; } - LDKC2Tuple_u32TxOutZ* operator &() { return &self; } - LDKC2Tuple_u32TxOutZ* operator ->() { return &self; } - const LDKC2Tuple_u32TxOutZ* operator &() const { return &self; } - const LDKC2Tuple_u32TxOutZ* operator ->() const { return &self; } -}; class CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ { private: LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ self; @@ -1508,34 +1494,6 @@ public: const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator &() const { return &self; } const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator ->() const { return &self; } }; -class CVec_PublicKeyZ { -private: - LDKCVec_PublicKeyZ self; -public: - CVec_PublicKeyZ(const CVec_PublicKeyZ&) = delete; - ~CVec_PublicKeyZ() { CVec_PublicKeyZ_free(self); } - CVec_PublicKeyZ(CVec_PublicKeyZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_PublicKeyZ)); } - CVec_PublicKeyZ(LDKCVec_PublicKeyZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_PublicKeyZ)); } - operator LDKCVec_PublicKeyZ() { LDKCVec_PublicKeyZ res = self; memset(&self, 0, sizeof(LDKCVec_PublicKeyZ)); return res; } - LDKCVec_PublicKeyZ* operator &() { return &self; } - LDKCVec_PublicKeyZ* operator ->() { return &self; } - const LDKCVec_PublicKeyZ* operator &() const { return &self; } - const LDKCVec_PublicKeyZ* operator ->() const { return &self; } -}; -class CResult_boolLightningErrorZ { -private: - LDKCResult_boolLightningErrorZ self; -public: - CResult_boolLightningErrorZ(const CResult_boolLightningErrorZ&) = delete; - ~CResult_boolLightningErrorZ() { CResult_boolLightningErrorZ_free(self); } - CResult_boolLightningErrorZ(CResult_boolLightningErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_boolLightningErrorZ)); } - CResult_boolLightningErrorZ(LDKCResult_boolLightningErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_boolLightningErrorZ)); } - operator LDKCResult_boolLightningErrorZ() { LDKCResult_boolLightningErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_boolLightningErrorZ)); return res; } - LDKCResult_boolLightningErrorZ* operator &() { return &self; } - LDKCResult_boolLightningErrorZ* operator ->() { return &self; } - const LDKCResult_boolLightningErrorZ* operator &() const { return &self; } - const LDKCResult_boolLightningErrorZ* operator ->() const { return &self; } -}; class CVec_C2Tuple_u32TxOutZZ { private: LDKCVec_C2Tuple_u32TxOutZZ self; @@ -1592,47 +1550,47 @@ public: const LDKCVec_u64Z* operator &() const { return &self; } const LDKCVec_u64Z* operator ->() const { return &self; } }; -class CVec_UpdateFailMalformedHTLCZ { +class CResult_GossipTimestampFilterDecodeErrorZ { private: - LDKCVec_UpdateFailMalformedHTLCZ self; + LDKCResult_GossipTimestampFilterDecodeErrorZ self; public: - CVec_UpdateFailMalformedHTLCZ(const CVec_UpdateFailMalformedHTLCZ&) = delete; - ~CVec_UpdateFailMalformedHTLCZ() { CVec_UpdateFailMalformedHTLCZ_free(self); } - CVec_UpdateFailMalformedHTLCZ(CVec_UpdateFailMalformedHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateFailMalformedHTLCZ)); } - CVec_UpdateFailMalformedHTLCZ(LDKCVec_UpdateFailMalformedHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateFailMalformedHTLCZ)); } - operator LDKCVec_UpdateFailMalformedHTLCZ() { LDKCVec_UpdateFailMalformedHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateFailMalformedHTLCZ)); return res; } - LDKCVec_UpdateFailMalformedHTLCZ* operator &() { return &self; } - LDKCVec_UpdateFailMalformedHTLCZ* operator ->() { return &self; } - const LDKCVec_UpdateFailMalformedHTLCZ* operator &() const { return &self; } - const LDKCVec_UpdateFailMalformedHTLCZ* operator ->() const { return &self; } + CResult_GossipTimestampFilterDecodeErrorZ(const CResult_GossipTimestampFilterDecodeErrorZ&) = delete; + ~CResult_GossipTimestampFilterDecodeErrorZ() { CResult_GossipTimestampFilterDecodeErrorZ_free(self); } + CResult_GossipTimestampFilterDecodeErrorZ(CResult_GossipTimestampFilterDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_GossipTimestampFilterDecodeErrorZ)); } + CResult_GossipTimestampFilterDecodeErrorZ(LDKCResult_GossipTimestampFilterDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ)); } + operator LDKCResult_GossipTimestampFilterDecodeErrorZ() { LDKCResult_GossipTimestampFilterDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ)); return res; } + LDKCResult_GossipTimestampFilterDecodeErrorZ* operator &() { return &self; } + LDKCResult_GossipTimestampFilterDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_GossipTimestampFilterDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_GossipTimestampFilterDecodeErrorZ* operator ->() const { return &self; } }; -class CResult_SecretKeySecpErrorZ { +class CResult_ChannelMonitorUpdateDecodeErrorZ { private: - LDKCResult_SecretKeySecpErrorZ self; + LDKCResult_ChannelMonitorUpdateDecodeErrorZ self; public: - CResult_SecretKeySecpErrorZ(const CResult_SecretKeySecpErrorZ&) = delete; - ~CResult_SecretKeySecpErrorZ() { CResult_SecretKeySecpErrorZ_free(self); } - CResult_SecretKeySecpErrorZ(CResult_SecretKeySecpErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_SecretKeySecpErrorZ)); } - CResult_SecretKeySecpErrorZ(LDKCResult_SecretKeySecpErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_SecretKeySecpErrorZ)); } - operator LDKCResult_SecretKeySecpErrorZ() { LDKCResult_SecretKeySecpErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_SecretKeySecpErrorZ)); return res; } - LDKCResult_SecretKeySecpErrorZ* operator &() { return &self; } - LDKCResult_SecretKeySecpErrorZ* operator ->() { return &self; } - const LDKCResult_SecretKeySecpErrorZ* operator &() const { return &self; } - const LDKCResult_SecretKeySecpErrorZ* operator ->() const { return &self; } + CResult_ChannelMonitorUpdateDecodeErrorZ(const CResult_ChannelMonitorUpdateDecodeErrorZ&) = delete; + ~CResult_ChannelMonitorUpdateDecodeErrorZ() { CResult_ChannelMonitorUpdateDecodeErrorZ_free(self); } + CResult_ChannelMonitorUpdateDecodeErrorZ(CResult_ChannelMonitorUpdateDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelMonitorUpdateDecodeErrorZ)); } + CResult_ChannelMonitorUpdateDecodeErrorZ(LDKCResult_ChannelMonitorUpdateDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ)); } + operator LDKCResult_ChannelMonitorUpdateDecodeErrorZ() { LDKCResult_ChannelMonitorUpdateDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ)); return res; } + LDKCResult_ChannelMonitorUpdateDecodeErrorZ* operator &() { return &self; } + LDKCResult_ChannelMonitorUpdateDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_ChannelMonitorUpdateDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_ChannelMonitorUpdateDecodeErrorZ* operator ->() const { return &self; } }; -class CVec_EventZ { +class CResult_ReplyChannelRangeDecodeErrorZ { private: - LDKCVec_EventZ self; + LDKCResult_ReplyChannelRangeDecodeErrorZ self; public: - CVec_EventZ(const CVec_EventZ&) = delete; - ~CVec_EventZ() { CVec_EventZ_free(self); } - CVec_EventZ(CVec_EventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_EventZ)); } - CVec_EventZ(LDKCVec_EventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_EventZ)); } - operator LDKCVec_EventZ() { LDKCVec_EventZ res = self; memset(&self, 0, sizeof(LDKCVec_EventZ)); return res; } - LDKCVec_EventZ* operator &() { return &self; } - LDKCVec_EventZ* operator ->() { return &self; } - const LDKCVec_EventZ* operator &() const { return &self; } - const LDKCVec_EventZ* operator ->() const { return &self; } + CResult_ReplyChannelRangeDecodeErrorZ(const CResult_ReplyChannelRangeDecodeErrorZ&) = delete; + ~CResult_ReplyChannelRangeDecodeErrorZ() { CResult_ReplyChannelRangeDecodeErrorZ_free(self); } + CResult_ReplyChannelRangeDecodeErrorZ(CResult_ReplyChannelRangeDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ReplyChannelRangeDecodeErrorZ)); } + CResult_ReplyChannelRangeDecodeErrorZ(LDKCResult_ReplyChannelRangeDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ)); } + operator LDKCResult_ReplyChannelRangeDecodeErrorZ() { LDKCResult_ReplyChannelRangeDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ)); return res; } + LDKCResult_ReplyChannelRangeDecodeErrorZ* operator &() { return &self; } + LDKCResult_ReplyChannelRangeDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_ReplyChannelRangeDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_ReplyChannelRangeDecodeErrorZ* operator ->() const { return &self; } }; class CResult_CVec_u8ZPeerHandleErrorZ { private: @@ -1648,48 +1606,6 @@ public: const LDKCResult_CVec_u8ZPeerHandleErrorZ* operator &() const { return &self; } const LDKCResult_CVec_u8ZPeerHandleErrorZ* operator ->() const { return &self; } }; -class CVec_MonitorEventZ { -private: - LDKCVec_MonitorEventZ self; -public: - CVec_MonitorEventZ(const CVec_MonitorEventZ&) = delete; - ~CVec_MonitorEventZ() { CVec_MonitorEventZ_free(self); } - CVec_MonitorEventZ(CVec_MonitorEventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_MonitorEventZ)); } - CVec_MonitorEventZ(LDKCVec_MonitorEventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_MonitorEventZ)); } - operator LDKCVec_MonitorEventZ() { LDKCVec_MonitorEventZ res = self; memset(&self, 0, sizeof(LDKCVec_MonitorEventZ)); return res; } - LDKCVec_MonitorEventZ* operator &() { return &self; } - LDKCVec_MonitorEventZ* operator ->() { return &self; } - const LDKCVec_MonitorEventZ* operator &() const { return &self; } - const LDKCVec_MonitorEventZ* operator ->() const { return &self; } -}; -class CResult_ChanKeySignerDecodeErrorZ { -private: - LDKCResult_ChanKeySignerDecodeErrorZ self; -public: - CResult_ChanKeySignerDecodeErrorZ(const CResult_ChanKeySignerDecodeErrorZ&) = delete; - ~CResult_ChanKeySignerDecodeErrorZ() { CResult_ChanKeySignerDecodeErrorZ_free(self); } - CResult_ChanKeySignerDecodeErrorZ(CResult_ChanKeySignerDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChanKeySignerDecodeErrorZ)); } - CResult_ChanKeySignerDecodeErrorZ(LDKCResult_ChanKeySignerDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChanKeySignerDecodeErrorZ)); } - operator LDKCResult_ChanKeySignerDecodeErrorZ() { LDKCResult_ChanKeySignerDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChanKeySignerDecodeErrorZ)); return res; } - LDKCResult_ChanKeySignerDecodeErrorZ* operator &() { return &self; } - LDKCResult_ChanKeySignerDecodeErrorZ* operator ->() { return &self; } - const LDKCResult_ChanKeySignerDecodeErrorZ* operator &() const { return &self; } - const LDKCResult_ChanKeySignerDecodeErrorZ* operator ->() const { return &self; } -}; -class CVec_RouteHopZ { -private: - LDKCVec_RouteHopZ self; -public: - CVec_RouteHopZ(const CVec_RouteHopZ&) = delete; - ~CVec_RouteHopZ() { CVec_RouteHopZ_free(self); } - CVec_RouteHopZ(CVec_RouteHopZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_RouteHopZ)); } - CVec_RouteHopZ(LDKCVec_RouteHopZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_RouteHopZ)); } - operator LDKCVec_RouteHopZ() { LDKCVec_RouteHopZ res = self; memset(&self, 0, sizeof(LDKCVec_RouteHopZ)); return res; } - LDKCVec_RouteHopZ* operator &() { return &self; } - LDKCVec_RouteHopZ* operator ->() { return &self; } - const LDKCVec_RouteHopZ* operator &() const { return &self; } - const LDKCVec_RouteHopZ* operator ->() const { return &self; } -}; class CResult_TxOutAccessErrorZ { private: LDKCResult_TxOutAccessErrorZ self; @@ -1704,33 +1620,19 @@ public: const LDKCResult_TxOutAccessErrorZ* operator &() const { return &self; } const LDKCResult_TxOutAccessErrorZ* operator ->() const { return &self; } }; -class CResult_NoneChannelMonitorUpdateErrZ { -private: - LDKCResult_NoneChannelMonitorUpdateErrZ self; -public: - CResult_NoneChannelMonitorUpdateErrZ(const CResult_NoneChannelMonitorUpdateErrZ&) = delete; - ~CResult_NoneChannelMonitorUpdateErrZ() { CResult_NoneChannelMonitorUpdateErrZ_free(self); } - CResult_NoneChannelMonitorUpdateErrZ(CResult_NoneChannelMonitorUpdateErrZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneChannelMonitorUpdateErrZ)); } - CResult_NoneChannelMonitorUpdateErrZ(LDKCResult_NoneChannelMonitorUpdateErrZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ)); } - operator LDKCResult_NoneChannelMonitorUpdateErrZ() { LDKCResult_NoneChannelMonitorUpdateErrZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ)); return res; } - LDKCResult_NoneChannelMonitorUpdateErrZ* operator &() { return &self; } - LDKCResult_NoneChannelMonitorUpdateErrZ* operator ->() { return &self; } - const LDKCResult_NoneChannelMonitorUpdateErrZ* operator &() const { return &self; } - const LDKCResult_NoneChannelMonitorUpdateErrZ* operator ->() const { return &self; } -}; -class CResult_NonePaymentSendFailureZ { +class CResult_UnsignedNodeAnnouncementDecodeErrorZ { private: - LDKCResult_NonePaymentSendFailureZ self; + LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ self; public: - CResult_NonePaymentSendFailureZ(const CResult_NonePaymentSendFailureZ&) = delete; - ~CResult_NonePaymentSendFailureZ() { CResult_NonePaymentSendFailureZ_free(self); } - CResult_NonePaymentSendFailureZ(CResult_NonePaymentSendFailureZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NonePaymentSendFailureZ)); } - CResult_NonePaymentSendFailureZ(LDKCResult_NonePaymentSendFailureZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NonePaymentSendFailureZ)); } - operator LDKCResult_NonePaymentSendFailureZ() { LDKCResult_NonePaymentSendFailureZ res = self; memset(&self, 0, sizeof(LDKCResult_NonePaymentSendFailureZ)); return res; } - LDKCResult_NonePaymentSendFailureZ* operator &() { return &self; } - LDKCResult_NonePaymentSendFailureZ* operator ->() { return &self; } - const LDKCResult_NonePaymentSendFailureZ* operator &() const { return &self; } - const LDKCResult_NonePaymentSendFailureZ* operator ->() const { return &self; } + CResult_UnsignedNodeAnnouncementDecodeErrorZ(const CResult_UnsignedNodeAnnouncementDecodeErrorZ&) = delete; + ~CResult_UnsignedNodeAnnouncementDecodeErrorZ() { CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(self); } + CResult_UnsignedNodeAnnouncementDecodeErrorZ(CResult_UnsignedNodeAnnouncementDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UnsignedNodeAnnouncementDecodeErrorZ)); } + CResult_UnsignedNodeAnnouncementDecodeErrorZ(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ)); } + operator LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ() { LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ)); return res; } + LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* operator &() { return &self; } + LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* operator ->() const { return &self; } }; class CResult_TxCreationKeysSecpErrorZ { private: @@ -1746,34 +1648,6 @@ public: const LDKCResult_TxCreationKeysSecpErrorZ* operator &() const { return &self; } const LDKCResult_TxCreationKeysSecpErrorZ* operator ->() const { return &self; } }; -class CVec_u8Z { -private: - LDKCVec_u8Z self; -public: - CVec_u8Z(const CVec_u8Z&) = delete; - ~CVec_u8Z() { CVec_u8Z_free(self); } - CVec_u8Z(CVec_u8Z&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_u8Z)); } - CVec_u8Z(LDKCVec_u8Z&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_u8Z)); } - operator LDKCVec_u8Z() { LDKCVec_u8Z res = self; memset(&self, 0, sizeof(LDKCVec_u8Z)); return res; } - LDKCVec_u8Z* operator &() { return &self; } - LDKCVec_u8Z* operator ->() { return &self; } - const LDKCVec_u8Z* operator &() const { return &self; } - const LDKCVec_u8Z* operator ->() const { return &self; } -}; -class CResult_PublicKeySecpErrorZ { -private: - LDKCResult_PublicKeySecpErrorZ self; -public: - CResult_PublicKeySecpErrorZ(const CResult_PublicKeySecpErrorZ&) = delete; - ~CResult_PublicKeySecpErrorZ() { CResult_PublicKeySecpErrorZ_free(self); } - CResult_PublicKeySecpErrorZ(CResult_PublicKeySecpErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PublicKeySecpErrorZ)); } - CResult_PublicKeySecpErrorZ(LDKCResult_PublicKeySecpErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PublicKeySecpErrorZ)); } - operator LDKCResult_PublicKeySecpErrorZ() { LDKCResult_PublicKeySecpErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_PublicKeySecpErrorZ)); return res; } - LDKCResult_PublicKeySecpErrorZ* operator &() { return &self; } - LDKCResult_PublicKeySecpErrorZ* operator ->() { return &self; } - const LDKCResult_PublicKeySecpErrorZ* operator &() const { return &self; } - const LDKCResult_PublicKeySecpErrorZ* operator ->() const { return &self; } -}; class CVec_RouteHintZ { private: LDKCVec_RouteHintZ self; @@ -1788,19 +1662,19 @@ public: const LDKCVec_RouteHintZ* operator &() const { return &self; } const LDKCVec_RouteHintZ* operator ->() const { return &self; } }; -class C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { +class CResult_ChannelReestablishDecodeErrorZ { private: - LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ self; + LDKCResult_ChannelReestablishDecodeErrorZ self; public: - C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(const C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&) = delete; - ~C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ() { C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(self); } - C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& o) : self(o.self) { memset(&o, 0, sizeof(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); } - C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); } - operator LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ() { LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ res = self; memset(&self, 0, sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); return res; } - LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator &() { return &self; } - LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator ->() { return &self; } - const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator &() const { return &self; } - const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator ->() const { return &self; } + CResult_ChannelReestablishDecodeErrorZ(const CResult_ChannelReestablishDecodeErrorZ&) = delete; + ~CResult_ChannelReestablishDecodeErrorZ() { CResult_ChannelReestablishDecodeErrorZ_free(self); } + CResult_ChannelReestablishDecodeErrorZ(CResult_ChannelReestablishDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelReestablishDecodeErrorZ)); } + CResult_ChannelReestablishDecodeErrorZ(LDKCResult_ChannelReestablishDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelReestablishDecodeErrorZ)); } + operator LDKCResult_ChannelReestablishDecodeErrorZ() { LDKCResult_ChannelReestablishDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelReestablishDecodeErrorZ)); return res; } + LDKCResult_ChannelReestablishDecodeErrorZ* operator &() { return &self; } + LDKCResult_ChannelReestablishDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_ChannelReestablishDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_ChannelReestablishDecodeErrorZ* operator ->() const { return &self; } }; class CVec_CVec_RouteHopZZ { private: @@ -1858,20 +1732,6 @@ public: const LDKCResult_NonePeerHandleErrorZ* operator &() const { return &self; } const LDKCResult_NonePeerHandleErrorZ* operator ->() const { return &self; } }; -class CResult_boolPeerHandleErrorZ { -private: - LDKCResult_boolPeerHandleErrorZ self; -public: - CResult_boolPeerHandleErrorZ(const CResult_boolPeerHandleErrorZ&) = delete; - ~CResult_boolPeerHandleErrorZ() { CResult_boolPeerHandleErrorZ_free(self); } - CResult_boolPeerHandleErrorZ(CResult_boolPeerHandleErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_boolPeerHandleErrorZ)); } - CResult_boolPeerHandleErrorZ(LDKCResult_boolPeerHandleErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_boolPeerHandleErrorZ)); } - operator LDKCResult_boolPeerHandleErrorZ() { LDKCResult_boolPeerHandleErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_boolPeerHandleErrorZ)); return res; } - LDKCResult_boolPeerHandleErrorZ* operator &() { return &self; } - LDKCResult_boolPeerHandleErrorZ* operator ->() { return &self; } - const LDKCResult_boolPeerHandleErrorZ* operator &() const { return &self; } - const LDKCResult_boolPeerHandleErrorZ* operator ->() const { return &self; } -}; class CResult_TrustedCommitmentTransactionNoneZ { private: LDKCResult_TrustedCommitmentTransactionNoneZ self; @@ -1886,20 +1746,6 @@ public: const LDKCResult_TrustedCommitmentTransactionNoneZ* operator &() const { return &self; } const LDKCResult_TrustedCommitmentTransactionNoneZ* operator ->() const { return &self; } }; -class CResult_RouteLightningErrorZ { -private: - LDKCResult_RouteLightningErrorZ self; -public: - CResult_RouteLightningErrorZ(const CResult_RouteLightningErrorZ&) = delete; - ~CResult_RouteLightningErrorZ() { CResult_RouteLightningErrorZ_free(self); } - CResult_RouteLightningErrorZ(CResult_RouteLightningErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RouteLightningErrorZ)); } - CResult_RouteLightningErrorZ(LDKCResult_RouteLightningErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RouteLightningErrorZ)); } - operator LDKCResult_RouteLightningErrorZ() { LDKCResult_RouteLightningErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RouteLightningErrorZ)); return res; } - LDKCResult_RouteLightningErrorZ* operator &() { return &self; } - LDKCResult_RouteLightningErrorZ* operator ->() { return &self; } - const LDKCResult_RouteLightningErrorZ* operator &() const { return &self; } - const LDKCResult_RouteLightningErrorZ* operator ->() const { return &self; } -}; class CResult_CVec_SignatureZNoneZ { private: LDKCResult_CVec_SignatureZNoneZ self; @@ -1914,121 +1760,93 @@ public: const LDKCResult_CVec_SignatureZNoneZ* operator &() const { return &self; } const LDKCResult_CVec_SignatureZNoneZ* operator ->() const { return &self; } }; -class CVec_UpdateFulfillHTLCZ { +class CResult_PingDecodeErrorZ { +private: + LDKCResult_PingDecodeErrorZ self; +public: + CResult_PingDecodeErrorZ(const CResult_PingDecodeErrorZ&) = delete; + ~CResult_PingDecodeErrorZ() { CResult_PingDecodeErrorZ_free(self); } + CResult_PingDecodeErrorZ(CResult_PingDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PingDecodeErrorZ)); } + CResult_PingDecodeErrorZ(LDKCResult_PingDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PingDecodeErrorZ)); } + operator LDKCResult_PingDecodeErrorZ() { LDKCResult_PingDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_PingDecodeErrorZ)); return res; } + LDKCResult_PingDecodeErrorZ* operator &() { return &self; } + LDKCResult_PingDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_PingDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_PingDecodeErrorZ* operator ->() const { return &self; } +}; +class CResult_RoutingFeesDecodeErrorZ { +private: + LDKCResult_RoutingFeesDecodeErrorZ self; +public: + CResult_RoutingFeesDecodeErrorZ(const CResult_RoutingFeesDecodeErrorZ&) = delete; + ~CResult_RoutingFeesDecodeErrorZ() { CResult_RoutingFeesDecodeErrorZ_free(self); } + CResult_RoutingFeesDecodeErrorZ(CResult_RoutingFeesDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RoutingFeesDecodeErrorZ)); } + CResult_RoutingFeesDecodeErrorZ(LDKCResult_RoutingFeesDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RoutingFeesDecodeErrorZ)); } + operator LDKCResult_RoutingFeesDecodeErrorZ() { LDKCResult_RoutingFeesDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RoutingFeesDecodeErrorZ)); return res; } + LDKCResult_RoutingFeesDecodeErrorZ* operator &() { return &self; } + LDKCResult_RoutingFeesDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_RoutingFeesDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_RoutingFeesDecodeErrorZ* operator ->() const { return &self; } +}; +class CResult_ErrorMessageDecodeErrorZ { +private: + LDKCResult_ErrorMessageDecodeErrorZ self; +public: + CResult_ErrorMessageDecodeErrorZ(const CResult_ErrorMessageDecodeErrorZ&) = delete; + ~CResult_ErrorMessageDecodeErrorZ() { CResult_ErrorMessageDecodeErrorZ_free(self); } + CResult_ErrorMessageDecodeErrorZ(CResult_ErrorMessageDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ErrorMessageDecodeErrorZ)); } + CResult_ErrorMessageDecodeErrorZ(LDKCResult_ErrorMessageDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ErrorMessageDecodeErrorZ)); } + operator LDKCResult_ErrorMessageDecodeErrorZ() { LDKCResult_ErrorMessageDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ErrorMessageDecodeErrorZ)); return res; } + LDKCResult_ErrorMessageDecodeErrorZ* operator &() { return &self; } + LDKCResult_ErrorMessageDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_ErrorMessageDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_ErrorMessageDecodeErrorZ* operator ->() const { return &self; } +}; +class CResult_QueryShortChannelIdsDecodeErrorZ { +private: + LDKCResult_QueryShortChannelIdsDecodeErrorZ self; +public: + CResult_QueryShortChannelIdsDecodeErrorZ(const CResult_QueryShortChannelIdsDecodeErrorZ&) = delete; + ~CResult_QueryShortChannelIdsDecodeErrorZ() { CResult_QueryShortChannelIdsDecodeErrorZ_free(self); } + CResult_QueryShortChannelIdsDecodeErrorZ(CResult_QueryShortChannelIdsDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_QueryShortChannelIdsDecodeErrorZ)); } + CResult_QueryShortChannelIdsDecodeErrorZ(LDKCResult_QueryShortChannelIdsDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ)); } + operator LDKCResult_QueryShortChannelIdsDecodeErrorZ() { LDKCResult_QueryShortChannelIdsDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ)); return res; } + LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator &() { return &self; } + LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator ->() const { return &self; } +}; +class CResult_NoneAPIErrorZ { private: - LDKCVec_UpdateFulfillHTLCZ self; + LDKCResult_NoneAPIErrorZ self; public: - CVec_UpdateFulfillHTLCZ(const CVec_UpdateFulfillHTLCZ&) = delete; - ~CVec_UpdateFulfillHTLCZ() { CVec_UpdateFulfillHTLCZ_free(self); } - CVec_UpdateFulfillHTLCZ(CVec_UpdateFulfillHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateFulfillHTLCZ)); } - CVec_UpdateFulfillHTLCZ(LDKCVec_UpdateFulfillHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateFulfillHTLCZ)); } - operator LDKCVec_UpdateFulfillHTLCZ() { LDKCVec_UpdateFulfillHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateFulfillHTLCZ)); return res; } - LDKCVec_UpdateFulfillHTLCZ* operator &() { return &self; } - LDKCVec_UpdateFulfillHTLCZ* operator ->() { return &self; } - const LDKCVec_UpdateFulfillHTLCZ* operator &() const { return &self; } - const LDKCVec_UpdateFulfillHTLCZ* operator ->() const { return &self; } + CResult_NoneAPIErrorZ(const CResult_NoneAPIErrorZ&) = delete; + ~CResult_NoneAPIErrorZ() { CResult_NoneAPIErrorZ_free(self); } + CResult_NoneAPIErrorZ(CResult_NoneAPIErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneAPIErrorZ)); } + CResult_NoneAPIErrorZ(LDKCResult_NoneAPIErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneAPIErrorZ)); } + operator LDKCResult_NoneAPIErrorZ() { LDKCResult_NoneAPIErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneAPIErrorZ)); return res; } + LDKCResult_NoneAPIErrorZ* operator &() { return &self; } + LDKCResult_NoneAPIErrorZ* operator ->() { return &self; } + const LDKCResult_NoneAPIErrorZ* operator &() const { return &self; } + const LDKCResult_NoneAPIErrorZ* operator ->() const { return &self; } }; -class CResult_SignatureNoneZ { +class CResult_QueryChannelRangeDecodeErrorZ { private: - LDKCResult_SignatureNoneZ self; + LDKCResult_QueryChannelRangeDecodeErrorZ self; public: - CResult_SignatureNoneZ(const CResult_SignatureNoneZ&) = delete; - ~CResult_SignatureNoneZ() { CResult_SignatureNoneZ_free(self); } - CResult_SignatureNoneZ(CResult_SignatureNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_SignatureNoneZ)); } - CResult_SignatureNoneZ(LDKCResult_SignatureNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_SignatureNoneZ)); } - operator LDKCResult_SignatureNoneZ() { LDKCResult_SignatureNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_SignatureNoneZ)); return res; } - LDKCResult_SignatureNoneZ* operator &() { return &self; } - LDKCResult_SignatureNoneZ* operator ->() { return &self; } - const LDKCResult_SignatureNoneZ* operator &() const { return &self; } - const LDKCResult_SignatureNoneZ* operator ->() const { return &self; } + CResult_QueryChannelRangeDecodeErrorZ(const CResult_QueryChannelRangeDecodeErrorZ&) = delete; + ~CResult_QueryChannelRangeDecodeErrorZ() { CResult_QueryChannelRangeDecodeErrorZ_free(self); } + CResult_QueryChannelRangeDecodeErrorZ(CResult_QueryChannelRangeDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_QueryChannelRangeDecodeErrorZ)); } + CResult_QueryChannelRangeDecodeErrorZ(LDKCResult_QueryChannelRangeDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ)); } + operator LDKCResult_QueryChannelRangeDecodeErrorZ() { LDKCResult_QueryChannelRangeDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ)); return res; } + LDKCResult_QueryChannelRangeDecodeErrorZ* operator &() { return &self; } + LDKCResult_QueryChannelRangeDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_QueryChannelRangeDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_QueryChannelRangeDecodeErrorZ* operator ->() const { return &self; } }; -class C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { +class CVec_NetAddressZ { private: - LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ self; -public: - C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ(const C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ&) = delete; - ~C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ() { C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(self); } - C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ(C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ)); } - C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ)); } - operator LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ() { LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ)); return res; } - LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator &() { return &self; } - LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator ->() { return &self; } - const LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator &() const { return &self; } - const LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator ->() const { return &self; } -}; -class CVec_ChannelDetailsZ { -private: - LDKCVec_ChannelDetailsZ self; -public: - CVec_ChannelDetailsZ(const CVec_ChannelDetailsZ&) = delete; - ~CVec_ChannelDetailsZ() { CVec_ChannelDetailsZ_free(self); } - CVec_ChannelDetailsZ(CVec_ChannelDetailsZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_ChannelDetailsZ)); } - CVec_ChannelDetailsZ(LDKCVec_ChannelDetailsZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_ChannelDetailsZ)); } - operator LDKCVec_ChannelDetailsZ() { LDKCVec_ChannelDetailsZ res = self; memset(&self, 0, sizeof(LDKCVec_ChannelDetailsZ)); return res; } - LDKCVec_ChannelDetailsZ* operator &() { return &self; } - LDKCVec_ChannelDetailsZ* operator ->() { return &self; } - const LDKCVec_ChannelDetailsZ* operator &() const { return &self; } - const LDKCVec_ChannelDetailsZ* operator ->() const { return &self; } -}; -class CVec_MessageSendEventZ { -private: - LDKCVec_MessageSendEventZ self; -public: - CVec_MessageSendEventZ(const CVec_MessageSendEventZ&) = delete; - ~CVec_MessageSendEventZ() { CVec_MessageSendEventZ_free(self); } - CVec_MessageSendEventZ(CVec_MessageSendEventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_MessageSendEventZ)); } - CVec_MessageSendEventZ(LDKCVec_MessageSendEventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_MessageSendEventZ)); } - operator LDKCVec_MessageSendEventZ() { LDKCVec_MessageSendEventZ res = self; memset(&self, 0, sizeof(LDKCVec_MessageSendEventZ)); return res; } - LDKCVec_MessageSendEventZ* operator &() { return &self; } - LDKCVec_MessageSendEventZ* operator ->() { return &self; } - const LDKCVec_MessageSendEventZ* operator &() const { return &self; } - const LDKCVec_MessageSendEventZ* operator ->() const { return &self; } -}; -class CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ { -private: - LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ self; -public: - CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ(const CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ&) = delete; - ~CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ() { CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(self); } - CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ(CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ)); } - CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ)); } - operator LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ() { LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ res = self; memset(&self, 0, sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ)); return res; } - LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator &() { return &self; } - LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator ->() { return &self; } - const LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator &() const { return &self; } - const LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator ->() const { return &self; } -}; -class CResult_NoneAPIErrorZ { -private: - LDKCResult_NoneAPIErrorZ self; -public: - CResult_NoneAPIErrorZ(const CResult_NoneAPIErrorZ&) = delete; - ~CResult_NoneAPIErrorZ() { CResult_NoneAPIErrorZ_free(self); } - CResult_NoneAPIErrorZ(CResult_NoneAPIErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneAPIErrorZ)); } - CResult_NoneAPIErrorZ(LDKCResult_NoneAPIErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneAPIErrorZ)); } - operator LDKCResult_NoneAPIErrorZ() { LDKCResult_NoneAPIErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneAPIErrorZ)); return res; } - LDKCResult_NoneAPIErrorZ* operator &() { return &self; } - LDKCResult_NoneAPIErrorZ* operator ->() { return &self; } - const LDKCResult_NoneAPIErrorZ* operator &() const { return &self; } - const LDKCResult_NoneAPIErrorZ* operator ->() const { return &self; } -}; -class C2Tuple_OutPointScriptZ { -private: - LDKC2Tuple_OutPointScriptZ self; -public: - C2Tuple_OutPointScriptZ(const C2Tuple_OutPointScriptZ&) = delete; - ~C2Tuple_OutPointScriptZ() { C2Tuple_OutPointScriptZ_free(self); } - C2Tuple_OutPointScriptZ(C2Tuple_OutPointScriptZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_OutPointScriptZ)); } - C2Tuple_OutPointScriptZ(LDKC2Tuple_OutPointScriptZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_OutPointScriptZ)); } - operator LDKC2Tuple_OutPointScriptZ() { LDKC2Tuple_OutPointScriptZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_OutPointScriptZ)); return res; } - LDKC2Tuple_OutPointScriptZ* operator &() { return &self; } - LDKC2Tuple_OutPointScriptZ* operator ->() { return &self; } - const LDKC2Tuple_OutPointScriptZ* operator &() const { return &self; } - const LDKC2Tuple_OutPointScriptZ* operator ->() const { return &self; } -}; -class CVec_NetAddressZ { -private: - LDKCVec_NetAddressZ self; + LDKCVec_NetAddressZ self; public: CVec_NetAddressZ(const CVec_NetAddressZ&) = delete; ~CVec_NetAddressZ() { CVec_NetAddressZ_free(self); } @@ -2054,6 +1872,20 @@ public: const LDKC2Tuple_usizeTransactionZ* operator &() const { return &self; } const LDKC2Tuple_usizeTransactionZ* operator ->() const { return &self; } }; +class CVec_PublicKeyZ { +private: + LDKCVec_PublicKeyZ self; +public: + CVec_PublicKeyZ(const CVec_PublicKeyZ&) = delete; + ~CVec_PublicKeyZ() { CVec_PublicKeyZ_free(self); } + CVec_PublicKeyZ(CVec_PublicKeyZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_PublicKeyZ)); } + CVec_PublicKeyZ(LDKCVec_PublicKeyZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_PublicKeyZ)); } + operator LDKCVec_PublicKeyZ() { LDKCVec_PublicKeyZ res = self; memset(&self, 0, sizeof(LDKCVec_PublicKeyZ)); return res; } + LDKCVec_PublicKeyZ* operator &() { return &self; } + LDKCVec_PublicKeyZ* operator ->() { return &self; } + const LDKCVec_PublicKeyZ* operator &() const { return &self; } + const LDKCVec_PublicKeyZ* operator ->() const { return &self; } +}; class CVec_C2Tuple_usizeTransactionZZ { private: LDKCVec_C2Tuple_usizeTransactionZZ self; @@ -2096,6 +1928,398 @@ public: const LDKCVec_ChannelMonitorZ* operator &() const { return &self; } const LDKCVec_ChannelMonitorZ* operator ->() const { return &self; } }; +class C2Tuple_u64u64Z { +private: + LDKC2Tuple_u64u64Z self; +public: + C2Tuple_u64u64Z(const C2Tuple_u64u64Z&) = delete; + ~C2Tuple_u64u64Z() { C2Tuple_u64u64Z_free(self); } + C2Tuple_u64u64Z(C2Tuple_u64u64Z&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_u64u64Z)); } + C2Tuple_u64u64Z(LDKC2Tuple_u64u64Z&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_u64u64Z)); } + operator LDKC2Tuple_u64u64Z() { LDKC2Tuple_u64u64Z res = self; memset(&self, 0, sizeof(LDKC2Tuple_u64u64Z)); return res; } + LDKC2Tuple_u64u64Z* operator &() { return &self; } + LDKC2Tuple_u64u64Z* operator ->() { return &self; } + const LDKC2Tuple_u64u64Z* operator &() const { return &self; } + const LDKC2Tuple_u64u64Z* operator ->() const { return &self; } +}; +class C2Tuple_u32TxOutZ { +private: + LDKC2Tuple_u32TxOutZ self; +public: + C2Tuple_u32TxOutZ(const C2Tuple_u32TxOutZ&) = delete; + ~C2Tuple_u32TxOutZ() { C2Tuple_u32TxOutZ_free(self); } + C2Tuple_u32TxOutZ(C2Tuple_u32TxOutZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_u32TxOutZ)); } + C2Tuple_u32TxOutZ(LDKC2Tuple_u32TxOutZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_u32TxOutZ)); } + operator LDKC2Tuple_u32TxOutZ() { LDKC2Tuple_u32TxOutZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_u32TxOutZ)); return res; } + LDKC2Tuple_u32TxOutZ* operator &() { return &self; } + LDKC2Tuple_u32TxOutZ* operator ->() { return &self; } + const LDKC2Tuple_u32TxOutZ* operator &() const { return &self; } + const LDKC2Tuple_u32TxOutZ* operator ->() const { return &self; } +}; +class CResult_boolLightningErrorZ { +private: + LDKCResult_boolLightningErrorZ self; +public: + CResult_boolLightningErrorZ(const CResult_boolLightningErrorZ&) = delete; + ~CResult_boolLightningErrorZ() { CResult_boolLightningErrorZ_free(self); } + CResult_boolLightningErrorZ(CResult_boolLightningErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_boolLightningErrorZ)); } + CResult_boolLightningErrorZ(LDKCResult_boolLightningErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_boolLightningErrorZ)); } + operator LDKCResult_boolLightningErrorZ() { LDKCResult_boolLightningErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_boolLightningErrorZ)); return res; } + LDKCResult_boolLightningErrorZ* operator &() { return &self; } + LDKCResult_boolLightningErrorZ* operator ->() { return &self; } + const LDKCResult_boolLightningErrorZ* operator &() const { return &self; } + const LDKCResult_boolLightningErrorZ* operator ->() const { return &self; } +}; +class CResult_SecretKeySecpErrorZ { +private: + LDKCResult_SecretKeySecpErrorZ self; +public: + CResult_SecretKeySecpErrorZ(const CResult_SecretKeySecpErrorZ&) = delete; + ~CResult_SecretKeySecpErrorZ() { CResult_SecretKeySecpErrorZ_free(self); } + CResult_SecretKeySecpErrorZ(CResult_SecretKeySecpErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_SecretKeySecpErrorZ)); } + CResult_SecretKeySecpErrorZ(LDKCResult_SecretKeySecpErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_SecretKeySecpErrorZ)); } + operator LDKCResult_SecretKeySecpErrorZ() { LDKCResult_SecretKeySecpErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_SecretKeySecpErrorZ)); return res; } + LDKCResult_SecretKeySecpErrorZ* operator &() { return &self; } + LDKCResult_SecretKeySecpErrorZ* operator ->() { return &self; } + const LDKCResult_SecretKeySecpErrorZ* operator &() const { return &self; } + const LDKCResult_SecretKeySecpErrorZ* operator ->() const { return &self; } +}; +class CResult_NodeAnnouncementInfoDecodeErrorZ { +private: + LDKCResult_NodeAnnouncementInfoDecodeErrorZ self; +public: + CResult_NodeAnnouncementInfoDecodeErrorZ(const CResult_NodeAnnouncementInfoDecodeErrorZ&) = delete; + ~CResult_NodeAnnouncementInfoDecodeErrorZ() { CResult_NodeAnnouncementInfoDecodeErrorZ_free(self); } + CResult_NodeAnnouncementInfoDecodeErrorZ(CResult_NodeAnnouncementInfoDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NodeAnnouncementInfoDecodeErrorZ)); } + CResult_NodeAnnouncementInfoDecodeErrorZ(LDKCResult_NodeAnnouncementInfoDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ)); } + operator LDKCResult_NodeAnnouncementInfoDecodeErrorZ() { LDKCResult_NodeAnnouncementInfoDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ)); return res; } + LDKCResult_NodeAnnouncementInfoDecodeErrorZ* operator &() { return &self; } + LDKCResult_NodeAnnouncementInfoDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_NodeAnnouncementInfoDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_NodeAnnouncementInfoDecodeErrorZ* operator ->() const { return &self; } +}; +class CVec_UpdateFailMalformedHTLCZ { +private: + LDKCVec_UpdateFailMalformedHTLCZ self; +public: + CVec_UpdateFailMalformedHTLCZ(const CVec_UpdateFailMalformedHTLCZ&) = delete; + ~CVec_UpdateFailMalformedHTLCZ() { CVec_UpdateFailMalformedHTLCZ_free(self); } + CVec_UpdateFailMalformedHTLCZ(CVec_UpdateFailMalformedHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateFailMalformedHTLCZ)); } + CVec_UpdateFailMalformedHTLCZ(LDKCVec_UpdateFailMalformedHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateFailMalformedHTLCZ)); } + operator LDKCVec_UpdateFailMalformedHTLCZ() { LDKCVec_UpdateFailMalformedHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateFailMalformedHTLCZ)); return res; } + LDKCVec_UpdateFailMalformedHTLCZ* operator &() { return &self; } + LDKCVec_UpdateFailMalformedHTLCZ* operator ->() { return &self; } + const LDKCVec_UpdateFailMalformedHTLCZ* operator &() const { return &self; } + const LDKCVec_UpdateFailMalformedHTLCZ* operator ->() const { return &self; } +}; +class CResult_UnsignedChannelUpdateDecodeErrorZ { +private: + LDKCResult_UnsignedChannelUpdateDecodeErrorZ self; +public: + CResult_UnsignedChannelUpdateDecodeErrorZ(const CResult_UnsignedChannelUpdateDecodeErrorZ&) = delete; + ~CResult_UnsignedChannelUpdateDecodeErrorZ() { CResult_UnsignedChannelUpdateDecodeErrorZ_free(self); } + CResult_UnsignedChannelUpdateDecodeErrorZ(CResult_UnsignedChannelUpdateDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UnsignedChannelUpdateDecodeErrorZ)); } + CResult_UnsignedChannelUpdateDecodeErrorZ(LDKCResult_UnsignedChannelUpdateDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ)); } + operator LDKCResult_UnsignedChannelUpdateDecodeErrorZ() { LDKCResult_UnsignedChannelUpdateDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ)); return res; } + LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator &() { return &self; } + LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator ->() const { return &self; } +}; +class CVec_EventZ { +private: + LDKCVec_EventZ self; +public: + CVec_EventZ(const CVec_EventZ&) = delete; + ~CVec_EventZ() { CVec_EventZ_free(self); } + CVec_EventZ(CVec_EventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_EventZ)); } + CVec_EventZ(LDKCVec_EventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_EventZ)); } + operator LDKCVec_EventZ() { LDKCVec_EventZ res = self; memset(&self, 0, sizeof(LDKCVec_EventZ)); return res; } + LDKCVec_EventZ* operator &() { return &self; } + LDKCVec_EventZ* operator ->() { return &self; } + const LDKCVec_EventZ* operator &() const { return &self; } + const LDKCVec_EventZ* operator ->() const { return &self; } +}; +class CResult_NetworkGraphDecodeErrorZ { +private: + LDKCResult_NetworkGraphDecodeErrorZ self; +public: + CResult_NetworkGraphDecodeErrorZ(const CResult_NetworkGraphDecodeErrorZ&) = delete; + ~CResult_NetworkGraphDecodeErrorZ() { CResult_NetworkGraphDecodeErrorZ_free(self); } + CResult_NetworkGraphDecodeErrorZ(CResult_NetworkGraphDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NetworkGraphDecodeErrorZ)); } + CResult_NetworkGraphDecodeErrorZ(LDKCResult_NetworkGraphDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NetworkGraphDecodeErrorZ)); } + operator LDKCResult_NetworkGraphDecodeErrorZ() { LDKCResult_NetworkGraphDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NetworkGraphDecodeErrorZ)); return res; } + LDKCResult_NetworkGraphDecodeErrorZ* operator &() { return &self; } + LDKCResult_NetworkGraphDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_NetworkGraphDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_NetworkGraphDecodeErrorZ* operator ->() const { return &self; } +}; +class CVec_MonitorEventZ { +private: + LDKCVec_MonitorEventZ self; +public: + CVec_MonitorEventZ(const CVec_MonitorEventZ&) = delete; + ~CVec_MonitorEventZ() { CVec_MonitorEventZ_free(self); } + CVec_MonitorEventZ(CVec_MonitorEventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_MonitorEventZ)); } + CVec_MonitorEventZ(LDKCVec_MonitorEventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_MonitorEventZ)); } + operator LDKCVec_MonitorEventZ() { LDKCVec_MonitorEventZ res = self; memset(&self, 0, sizeof(LDKCVec_MonitorEventZ)); return res; } + LDKCVec_MonitorEventZ* operator &() { return &self; } + LDKCVec_MonitorEventZ* operator ->() { return &self; } + const LDKCVec_MonitorEventZ* operator &() const { return &self; } + const LDKCVec_MonitorEventZ* operator ->() const { return &self; } +}; +class CResult_ChanKeySignerDecodeErrorZ { +private: + LDKCResult_ChanKeySignerDecodeErrorZ self; +public: + CResult_ChanKeySignerDecodeErrorZ(const CResult_ChanKeySignerDecodeErrorZ&) = delete; + ~CResult_ChanKeySignerDecodeErrorZ() { CResult_ChanKeySignerDecodeErrorZ_free(self); } + CResult_ChanKeySignerDecodeErrorZ(CResult_ChanKeySignerDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChanKeySignerDecodeErrorZ)); } + CResult_ChanKeySignerDecodeErrorZ(LDKCResult_ChanKeySignerDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChanKeySignerDecodeErrorZ)); } + operator LDKCResult_ChanKeySignerDecodeErrorZ() { LDKCResult_ChanKeySignerDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChanKeySignerDecodeErrorZ)); return res; } + LDKCResult_ChanKeySignerDecodeErrorZ* operator &() { return &self; } + LDKCResult_ChanKeySignerDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_ChanKeySignerDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_ChanKeySignerDecodeErrorZ* operator ->() const { return &self; } +}; +class CVec_RouteHopZ { +private: + LDKCVec_RouteHopZ self; +public: + CVec_RouteHopZ(const CVec_RouteHopZ&) = delete; + ~CVec_RouteHopZ() { CVec_RouteHopZ_free(self); } + CVec_RouteHopZ(CVec_RouteHopZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_RouteHopZ)); } + CVec_RouteHopZ(LDKCVec_RouteHopZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_RouteHopZ)); } + operator LDKCVec_RouteHopZ() { LDKCVec_RouteHopZ res = self; memset(&self, 0, sizeof(LDKCVec_RouteHopZ)); return res; } + LDKCVec_RouteHopZ* operator &() { return &self; } + LDKCVec_RouteHopZ* operator ->() { return &self; } + const LDKCVec_RouteHopZ* operator &() const { return &self; } + const LDKCVec_RouteHopZ* operator ->() const { return &self; } +}; +class CResult_NoneChannelMonitorUpdateErrZ { +private: + LDKCResult_NoneChannelMonitorUpdateErrZ self; +public: + CResult_NoneChannelMonitorUpdateErrZ(const CResult_NoneChannelMonitorUpdateErrZ&) = delete; + ~CResult_NoneChannelMonitorUpdateErrZ() { CResult_NoneChannelMonitorUpdateErrZ_free(self); } + CResult_NoneChannelMonitorUpdateErrZ(CResult_NoneChannelMonitorUpdateErrZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneChannelMonitorUpdateErrZ)); } + CResult_NoneChannelMonitorUpdateErrZ(LDKCResult_NoneChannelMonitorUpdateErrZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ)); } + operator LDKCResult_NoneChannelMonitorUpdateErrZ() { LDKCResult_NoneChannelMonitorUpdateErrZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ)); return res; } + LDKCResult_NoneChannelMonitorUpdateErrZ* operator &() { return &self; } + LDKCResult_NoneChannelMonitorUpdateErrZ* operator ->() { return &self; } + const LDKCResult_NoneChannelMonitorUpdateErrZ* operator &() const { return &self; } + const LDKCResult_NoneChannelMonitorUpdateErrZ* operator ->() const { return &self; } +}; +class CResult_NonePaymentSendFailureZ { +private: + LDKCResult_NonePaymentSendFailureZ self; +public: + CResult_NonePaymentSendFailureZ(const CResult_NonePaymentSendFailureZ&) = delete; + ~CResult_NonePaymentSendFailureZ() { CResult_NonePaymentSendFailureZ_free(self); } + CResult_NonePaymentSendFailureZ(CResult_NonePaymentSendFailureZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NonePaymentSendFailureZ)); } + CResult_NonePaymentSendFailureZ(LDKCResult_NonePaymentSendFailureZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NonePaymentSendFailureZ)); } + operator LDKCResult_NonePaymentSendFailureZ() { LDKCResult_NonePaymentSendFailureZ res = self; memset(&self, 0, sizeof(LDKCResult_NonePaymentSendFailureZ)); return res; } + LDKCResult_NonePaymentSendFailureZ* operator &() { return &self; } + LDKCResult_NonePaymentSendFailureZ* operator ->() { return &self; } + const LDKCResult_NonePaymentSendFailureZ* operator &() const { return &self; } + const LDKCResult_NonePaymentSendFailureZ* operator ->() const { return &self; } +}; +class CResult_NodeInfoDecodeErrorZ { +private: + LDKCResult_NodeInfoDecodeErrorZ self; +public: + CResult_NodeInfoDecodeErrorZ(const CResult_NodeInfoDecodeErrorZ&) = delete; + ~CResult_NodeInfoDecodeErrorZ() { CResult_NodeInfoDecodeErrorZ_free(self); } + CResult_NodeInfoDecodeErrorZ(CResult_NodeInfoDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NodeInfoDecodeErrorZ)); } + CResult_NodeInfoDecodeErrorZ(LDKCResult_NodeInfoDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NodeInfoDecodeErrorZ)); } + operator LDKCResult_NodeInfoDecodeErrorZ() { LDKCResult_NodeInfoDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NodeInfoDecodeErrorZ)); return res; } + LDKCResult_NodeInfoDecodeErrorZ* operator &() { return &self; } + LDKCResult_NodeInfoDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_NodeInfoDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_NodeInfoDecodeErrorZ* operator ->() const { return &self; } +}; +class CVec_u8Z { +private: + LDKCVec_u8Z self; +public: + CVec_u8Z(const CVec_u8Z&) = delete; + ~CVec_u8Z() { CVec_u8Z_free(self); } + CVec_u8Z(CVec_u8Z&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_u8Z)); } + CVec_u8Z(LDKCVec_u8Z&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_u8Z)); } + operator LDKCVec_u8Z() { LDKCVec_u8Z res = self; memset(&self, 0, sizeof(LDKCVec_u8Z)); return res; } + LDKCVec_u8Z* operator &() { return &self; } + LDKCVec_u8Z* operator ->() { return &self; } + const LDKCVec_u8Z* operator &() const { return &self; } + const LDKCVec_u8Z* operator ->() const { return &self; } +}; +class CResult_PublicKeySecpErrorZ { +private: + LDKCResult_PublicKeySecpErrorZ self; +public: + CResult_PublicKeySecpErrorZ(const CResult_PublicKeySecpErrorZ&) = delete; + ~CResult_PublicKeySecpErrorZ() { CResult_PublicKeySecpErrorZ_free(self); } + CResult_PublicKeySecpErrorZ(CResult_PublicKeySecpErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PublicKeySecpErrorZ)); } + CResult_PublicKeySecpErrorZ(LDKCResult_PublicKeySecpErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PublicKeySecpErrorZ)); } + operator LDKCResult_PublicKeySecpErrorZ() { LDKCResult_PublicKeySecpErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_PublicKeySecpErrorZ)); return res; } + LDKCResult_PublicKeySecpErrorZ* operator &() { return &self; } + LDKCResult_PublicKeySecpErrorZ* operator ->() { return &self; } + const LDKCResult_PublicKeySecpErrorZ* operator &() const { return &self; } + const LDKCResult_PublicKeySecpErrorZ* operator ->() const { return &self; } +}; +class CResult_RouteLightningErrorZ { +private: + LDKCResult_RouteLightningErrorZ self; +public: + CResult_RouteLightningErrorZ(const CResult_RouteLightningErrorZ&) = delete; + ~CResult_RouteLightningErrorZ() { CResult_RouteLightningErrorZ_free(self); } + CResult_RouteLightningErrorZ(CResult_RouteLightningErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RouteLightningErrorZ)); } + CResult_RouteLightningErrorZ(LDKCResult_RouteLightningErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RouteLightningErrorZ)); } + operator LDKCResult_RouteLightningErrorZ() { LDKCResult_RouteLightningErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RouteLightningErrorZ)); return res; } + LDKCResult_RouteLightningErrorZ* operator &() { return &self; } + LDKCResult_RouteLightningErrorZ* operator ->() { return &self; } + const LDKCResult_RouteLightningErrorZ* operator &() const { return &self; } + const LDKCResult_RouteLightningErrorZ* operator ->() const { return &self; } +}; +class C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { +private: + LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ self; +public: + C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(const C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&) = delete; + ~C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ() { C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(self); } + C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& o) : self(o.self) { memset(&o, 0, sizeof(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); } + C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); } + operator LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ() { LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ res = self; memset(&self, 0, sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); return res; } + LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator &() { return &self; } + LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator ->() { return &self; } + const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator &() const { return &self; } + const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator ->() const { return &self; } +}; +class CResult_boolPeerHandleErrorZ { +private: + LDKCResult_boolPeerHandleErrorZ self; +public: + CResult_boolPeerHandleErrorZ(const CResult_boolPeerHandleErrorZ&) = delete; + ~CResult_boolPeerHandleErrorZ() { CResult_boolPeerHandleErrorZ_free(self); } + CResult_boolPeerHandleErrorZ(CResult_boolPeerHandleErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_boolPeerHandleErrorZ)); } + CResult_boolPeerHandleErrorZ(LDKCResult_boolPeerHandleErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_boolPeerHandleErrorZ)); } + operator LDKCResult_boolPeerHandleErrorZ() { LDKCResult_boolPeerHandleErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_boolPeerHandleErrorZ)); return res; } + LDKCResult_boolPeerHandleErrorZ* operator &() { return &self; } + LDKCResult_boolPeerHandleErrorZ* operator ->() { return &self; } + const LDKCResult_boolPeerHandleErrorZ* operator &() const { return &self; } + const LDKCResult_boolPeerHandleErrorZ* operator ->() const { return &self; } +}; +class CVec_UpdateFulfillHTLCZ { +private: + LDKCVec_UpdateFulfillHTLCZ self; +public: + CVec_UpdateFulfillHTLCZ(const CVec_UpdateFulfillHTLCZ&) = delete; + ~CVec_UpdateFulfillHTLCZ() { CVec_UpdateFulfillHTLCZ_free(self); } + CVec_UpdateFulfillHTLCZ(CVec_UpdateFulfillHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateFulfillHTLCZ)); } + CVec_UpdateFulfillHTLCZ(LDKCVec_UpdateFulfillHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateFulfillHTLCZ)); } + operator LDKCVec_UpdateFulfillHTLCZ() { LDKCVec_UpdateFulfillHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateFulfillHTLCZ)); return res; } + LDKCVec_UpdateFulfillHTLCZ* operator &() { return &self; } + LDKCVec_UpdateFulfillHTLCZ* operator ->() { return &self; } + const LDKCVec_UpdateFulfillHTLCZ* operator &() const { return &self; } + const LDKCVec_UpdateFulfillHTLCZ* operator ->() const { return &self; } +}; +class CResult_SignatureNoneZ { +private: + LDKCResult_SignatureNoneZ self; +public: + CResult_SignatureNoneZ(const CResult_SignatureNoneZ&) = delete; + ~CResult_SignatureNoneZ() { CResult_SignatureNoneZ_free(self); } + CResult_SignatureNoneZ(CResult_SignatureNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_SignatureNoneZ)); } + CResult_SignatureNoneZ(LDKCResult_SignatureNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_SignatureNoneZ)); } + operator LDKCResult_SignatureNoneZ() { LDKCResult_SignatureNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_SignatureNoneZ)); return res; } + LDKCResult_SignatureNoneZ* operator &() { return &self; } + LDKCResult_SignatureNoneZ* operator ->() { return &self; } + const LDKCResult_SignatureNoneZ* operator &() const { return &self; } + const LDKCResult_SignatureNoneZ* operator ->() const { return &self; } +}; +class C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { +private: + LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ self; +public: + C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ(const C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ&) = delete; + ~C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ() { C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(self); } + C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ(C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ)); } + C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ)); } + operator LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ() { LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ)); return res; } + LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator &() { return &self; } + LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator ->() { return &self; } + const LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator &() const { return &self; } + const LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator ->() const { return &self; } +}; +class CResult_InitDecodeErrorZ { +private: + LDKCResult_InitDecodeErrorZ self; +public: + CResult_InitDecodeErrorZ(const CResult_InitDecodeErrorZ&) = delete; + ~CResult_InitDecodeErrorZ() { CResult_InitDecodeErrorZ_free(self); } + CResult_InitDecodeErrorZ(CResult_InitDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_InitDecodeErrorZ)); } + CResult_InitDecodeErrorZ(LDKCResult_InitDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_InitDecodeErrorZ)); } + operator LDKCResult_InitDecodeErrorZ() { LDKCResult_InitDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_InitDecodeErrorZ)); return res; } + LDKCResult_InitDecodeErrorZ* operator &() { return &self; } + LDKCResult_InitDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_InitDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_InitDecodeErrorZ* operator ->() const { return &self; } +}; +class CResult_ReplyShortChannelIdsEndDecodeErrorZ { +private: + LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ self; +public: + CResult_ReplyShortChannelIdsEndDecodeErrorZ(const CResult_ReplyShortChannelIdsEndDecodeErrorZ&) = delete; + ~CResult_ReplyShortChannelIdsEndDecodeErrorZ() { CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(self); } + CResult_ReplyShortChannelIdsEndDecodeErrorZ(CResult_ReplyShortChannelIdsEndDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ReplyShortChannelIdsEndDecodeErrorZ)); } + CResult_ReplyShortChannelIdsEndDecodeErrorZ(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ)); } + operator LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ() { LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ)); return res; } + LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator &() { return &self; } + LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator ->() const { return &self; } +}; +class CVec_ChannelDetailsZ { +private: + LDKCVec_ChannelDetailsZ self; +public: + CVec_ChannelDetailsZ(const CVec_ChannelDetailsZ&) = delete; + ~CVec_ChannelDetailsZ() { CVec_ChannelDetailsZ_free(self); } + CVec_ChannelDetailsZ(CVec_ChannelDetailsZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_ChannelDetailsZ)); } + CVec_ChannelDetailsZ(LDKCVec_ChannelDetailsZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_ChannelDetailsZ)); } + operator LDKCVec_ChannelDetailsZ() { LDKCVec_ChannelDetailsZ res = self; memset(&self, 0, sizeof(LDKCVec_ChannelDetailsZ)); return res; } + LDKCVec_ChannelDetailsZ* operator &() { return &self; } + LDKCVec_ChannelDetailsZ* operator ->() { return &self; } + const LDKCVec_ChannelDetailsZ* operator &() const { return &self; } + const LDKCVec_ChannelDetailsZ* operator ->() const { return &self; } +}; +class CVec_MessageSendEventZ { +private: + LDKCVec_MessageSendEventZ self; +public: + CVec_MessageSendEventZ(const CVec_MessageSendEventZ&) = delete; + ~CVec_MessageSendEventZ() { CVec_MessageSendEventZ_free(self); } + CVec_MessageSendEventZ(CVec_MessageSendEventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_MessageSendEventZ)); } + CVec_MessageSendEventZ(LDKCVec_MessageSendEventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_MessageSendEventZ)); } + operator LDKCVec_MessageSendEventZ() { LDKCVec_MessageSendEventZ res = self; memset(&self, 0, sizeof(LDKCVec_MessageSendEventZ)); return res; } + LDKCVec_MessageSendEventZ* operator &() { return &self; } + LDKCVec_MessageSendEventZ* operator ->() { return &self; } + const LDKCVec_MessageSendEventZ* operator &() const { return &self; } + const LDKCVec_MessageSendEventZ* operator ->() const { return &self; } +}; +class CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ { +private: + LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ self; +public: + CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ(const CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ&) = delete; + ~CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ() { CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(self); } + CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ(CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ)); } + CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ)); } + operator LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ() { LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ res = self; memset(&self, 0, sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ)); return res; } + LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator &() { return &self; } + LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator ->() { return &self; } + const LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator &() const { return &self; } + const LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator ->() const { return &self; } +}; class CVec_UpdateFailHTLCZ { private: LDKCVec_UpdateFailHTLCZ self; @@ -2110,6 +2334,48 @@ public: const LDKCVec_UpdateFailHTLCZ* operator &() const { return &self; } const LDKCVec_UpdateFailHTLCZ* operator ->() const { return &self; } }; +class C2Tuple_OutPointScriptZ { +private: + LDKC2Tuple_OutPointScriptZ self; +public: + C2Tuple_OutPointScriptZ(const C2Tuple_OutPointScriptZ&) = delete; + ~C2Tuple_OutPointScriptZ() { C2Tuple_OutPointScriptZ_free(self); } + C2Tuple_OutPointScriptZ(C2Tuple_OutPointScriptZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_OutPointScriptZ)); } + C2Tuple_OutPointScriptZ(LDKC2Tuple_OutPointScriptZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_OutPointScriptZ)); } + operator LDKC2Tuple_OutPointScriptZ() { LDKC2Tuple_OutPointScriptZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_OutPointScriptZ)); return res; } + LDKC2Tuple_OutPointScriptZ* operator &() { return &self; } + LDKC2Tuple_OutPointScriptZ* operator ->() { return &self; } + const LDKC2Tuple_OutPointScriptZ* operator &() const { return &self; } + const LDKC2Tuple_OutPointScriptZ* operator ->() const { return &self; } +}; +class CResult_InMemoryChannelKeysDecodeErrorZ { +private: + LDKCResult_InMemoryChannelKeysDecodeErrorZ self; +public: + CResult_InMemoryChannelKeysDecodeErrorZ(const CResult_InMemoryChannelKeysDecodeErrorZ&) = delete; + ~CResult_InMemoryChannelKeysDecodeErrorZ() { CResult_InMemoryChannelKeysDecodeErrorZ_free(self); } + CResult_InMemoryChannelKeysDecodeErrorZ(CResult_InMemoryChannelKeysDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_InMemoryChannelKeysDecodeErrorZ)); } + CResult_InMemoryChannelKeysDecodeErrorZ(LDKCResult_InMemoryChannelKeysDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ)); } + operator LDKCResult_InMemoryChannelKeysDecodeErrorZ() { LDKCResult_InMemoryChannelKeysDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ)); return res; } + LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator &() { return &self; } + LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator ->() const { return &self; } +}; +class CResult_RouteDecodeErrorZ { +private: + LDKCResult_RouteDecodeErrorZ self; +public: + CResult_RouteDecodeErrorZ(const CResult_RouteDecodeErrorZ&) = delete; + ~CResult_RouteDecodeErrorZ() { CResult_RouteDecodeErrorZ_free(self); } + CResult_RouteDecodeErrorZ(CResult_RouteDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RouteDecodeErrorZ)); } + CResult_RouteDecodeErrorZ(LDKCResult_RouteDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RouteDecodeErrorZ)); } + operator LDKCResult_RouteDecodeErrorZ() { LDKCResult_RouteDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RouteDecodeErrorZ)); return res; } + LDKCResult_RouteDecodeErrorZ* operator &() { return &self; } + LDKCResult_RouteDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_RouteDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_RouteDecodeErrorZ* operator ->() const { return &self; } +}; class CVec_NodeAnnouncementZ { private: LDKCVec_NodeAnnouncementZ self; @@ -2124,19 +2390,33 @@ public: const LDKCVec_NodeAnnouncementZ* operator &() const { return &self; } const LDKCVec_NodeAnnouncementZ* operator ->() const { return &self; } }; -class C2Tuple_u64u64Z { -private: - LDKC2Tuple_u64u64Z self; -public: - C2Tuple_u64u64Z(const C2Tuple_u64u64Z&) = delete; - ~C2Tuple_u64u64Z() { C2Tuple_u64u64Z_free(self); } - C2Tuple_u64u64Z(C2Tuple_u64u64Z&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_u64u64Z)); } - C2Tuple_u64u64Z(LDKC2Tuple_u64u64Z&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_u64u64Z)); } - operator LDKC2Tuple_u64u64Z() { LDKC2Tuple_u64u64Z res = self; memset(&self, 0, sizeof(LDKC2Tuple_u64u64Z)); return res; } - LDKC2Tuple_u64u64Z* operator &() { return &self; } - LDKC2Tuple_u64u64Z* operator ->() { return &self; } - const LDKC2Tuple_u64u64Z* operator &() const { return &self; } - const LDKC2Tuple_u64u64Z* operator ->() const { return &self; } +class CResult_UnsignedChannelAnnouncementDecodeErrorZ { +private: + LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ self; +public: + CResult_UnsignedChannelAnnouncementDecodeErrorZ(const CResult_UnsignedChannelAnnouncementDecodeErrorZ&) = delete; + ~CResult_UnsignedChannelAnnouncementDecodeErrorZ() { CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(self); } + CResult_UnsignedChannelAnnouncementDecodeErrorZ(CResult_UnsignedChannelAnnouncementDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UnsignedChannelAnnouncementDecodeErrorZ)); } + CResult_UnsignedChannelAnnouncementDecodeErrorZ(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ)); } + operator LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ() { LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ)); return res; } + LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator &() { return &self; } + LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator ->() const { return &self; } +}; +class CResult_PongDecodeErrorZ { +private: + LDKCResult_PongDecodeErrorZ self; +public: + CResult_PongDecodeErrorZ(const CResult_PongDecodeErrorZ&) = delete; + ~CResult_PongDecodeErrorZ() { CResult_PongDecodeErrorZ_free(self); } + CResult_PongDecodeErrorZ(CResult_PongDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PongDecodeErrorZ)); } + CResult_PongDecodeErrorZ(LDKCResult_PongDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PongDecodeErrorZ)); } + operator LDKCResult_PongDecodeErrorZ() { LDKCResult_PongDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_PongDecodeErrorZ)); return res; } + LDKCResult_PongDecodeErrorZ* operator &() { return &self; } + LDKCResult_PongDecodeErrorZ* operator ->() { return &self; } + const LDKCResult_PongDecodeErrorZ* operator &() const { return &self; } + const LDKCResult_PongDecodeErrorZ* operator ->() const { return &self; } }; class CResult_NoneMonitorUpdateErrorZ { private: diff --git a/lightning-c-bindings/src/c_types/derived.rs b/lightning-c-bindings/src/c_types/derived.rs index 0e92f2088..c586c0b27 100644 --- a/lightning-c-bindings/src/c_types/derived.rs +++ b/lightning-c-bindings/src/c_types/derived.rs @@ -38,6 +38,17 @@ pub type CVec_MonitorEventZ = crate::c_types::CVecTempl; +pub type CResult_ChannelMonitorUpdateDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_ChannelMonitorUpdateDecodeErrorZ_free: extern "C" fn(CResult_ChannelMonitorUpdateDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_ChannelMonitorUpdateDecodeErrorZ_ok: extern "C" fn (crate::chain::channelmonitor::ChannelMonitorUpdate) -> CResult_ChannelMonitorUpdateDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_ChannelMonitorUpdateDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ChannelMonitorUpdateDecodeErrorZ = + crate::c_types::CResultTempl::::err; + pub type CResult_NoneMonitorUpdateErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_NoneMonitorUpdateErrorZ_free: extern "C" fn(CResult_NoneMonitorUpdateErrorZ) = crate::c_types::CResultTempl_free::; @@ -153,6 +164,17 @@ pub static CResult_ChanKeySignerDecodeErrorZ_ok: extern "C" fn (crate::chain::ke pub static CResult_ChanKeySignerDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ChanKeySignerDecodeErrorZ = crate::c_types::CResultTempl::::err; +pub type CResult_InMemoryChannelKeysDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_InMemoryChannelKeysDecodeErrorZ_free: extern "C" fn(CResult_InMemoryChannelKeysDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_InMemoryChannelKeysDecodeErrorZ_ok: extern "C" fn (crate::chain::keysinterface::InMemoryChannelKeys) -> CResult_InMemoryChannelKeysDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_InMemoryChannelKeysDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_InMemoryChannelKeysDecodeErrorZ = + crate::c_types::CResultTempl::::err; + pub type CResult_TxOutAccessErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_TxOutAccessErrorZ_free: extern "C" fn(CResult_TxOutAccessErrorZ) = crate::c_types::CResultTempl_free::; @@ -259,6 +281,149 @@ pub extern "C" fn CResult_NoneLightningErrorZ_ok() -> CResult_NoneLightningError pub static CResult_NoneLightningErrorZ_err: extern "C" fn (crate::ln::msgs::LightningError) -> CResult_NoneLightningErrorZ = crate::c_types::CResultTempl::::err; +pub type CResult_ChannelReestablishDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_ChannelReestablishDecodeErrorZ_free: extern "C" fn(CResult_ChannelReestablishDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_ChannelReestablishDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::ChannelReestablish) -> CResult_ChannelReestablishDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_ChannelReestablishDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ChannelReestablishDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_InitDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_InitDecodeErrorZ_free: extern "C" fn(CResult_InitDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_InitDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::Init) -> CResult_InitDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_InitDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_InitDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_PingDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_PingDecodeErrorZ_free: extern "C" fn(CResult_PingDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_PingDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::Ping) -> CResult_PingDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_PingDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_PingDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_PongDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_PongDecodeErrorZ_free: extern "C" fn(CResult_PongDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_PongDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::Pong) -> CResult_PongDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_PongDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_PongDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_UnsignedChannelAnnouncementDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_UnsignedChannelAnnouncementDecodeErrorZ_free: extern "C" fn(CResult_UnsignedChannelAnnouncementDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::UnsignedChannelAnnouncement) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_UnsignedChannelAnnouncementDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_UnsignedChannelUpdateDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_UnsignedChannelUpdateDecodeErrorZ_free: extern "C" fn(CResult_UnsignedChannelUpdateDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_UnsignedChannelUpdateDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::UnsignedChannelUpdate) -> CResult_UnsignedChannelUpdateDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_UnsignedChannelUpdateDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_UnsignedChannelUpdateDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_ErrorMessageDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_ErrorMessageDecodeErrorZ_free: extern "C" fn(CResult_ErrorMessageDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_ErrorMessageDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::ErrorMessage) -> CResult_ErrorMessageDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_ErrorMessageDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ErrorMessageDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_UnsignedNodeAnnouncementDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_UnsignedNodeAnnouncementDecodeErrorZ_free: extern "C" fn(CResult_UnsignedNodeAnnouncementDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::UnsignedNodeAnnouncement) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_UnsignedNodeAnnouncementDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_QueryShortChannelIdsDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_QueryShortChannelIdsDecodeErrorZ_free: extern "C" fn(CResult_QueryShortChannelIdsDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_QueryShortChannelIdsDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::QueryShortChannelIds) -> CResult_QueryShortChannelIdsDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_QueryShortChannelIdsDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_QueryShortChannelIdsDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_ReplyShortChannelIdsEndDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_ReplyShortChannelIdsEndDecodeErrorZ_free: extern "C" fn(CResult_ReplyShortChannelIdsEndDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::ReplyShortChannelIdsEnd) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_ReplyShortChannelIdsEndDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_QueryChannelRangeDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_QueryChannelRangeDecodeErrorZ_free: extern "C" fn(CResult_QueryChannelRangeDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_QueryChannelRangeDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::QueryChannelRange) -> CResult_QueryChannelRangeDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_QueryChannelRangeDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_QueryChannelRangeDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_ReplyChannelRangeDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_ReplyChannelRangeDecodeErrorZ_free: extern "C" fn(CResult_ReplyChannelRangeDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_ReplyChannelRangeDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::ReplyChannelRange) -> CResult_ReplyChannelRangeDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_ReplyChannelRangeDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ReplyChannelRangeDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_GossipTimestampFilterDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_GossipTimestampFilterDecodeErrorZ_free: extern "C" fn(CResult_GossipTimestampFilterDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_GossipTimestampFilterDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::GossipTimestampFilter) -> CResult_GossipTimestampFilterDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_GossipTimestampFilterDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_GossipTimestampFilterDecodeErrorZ = + crate::c_types::CResultTempl::::err; + pub type CVec_PublicKeyZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_PublicKeyZ_free: extern "C" fn(CVec_PublicKeyZ) = crate::c_types::CVecTempl_free::; @@ -354,6 +519,17 @@ pub type CVec_CVec_RouteHopZZ = crate::c_types::CVecTempl>; +pub type CResult_RouteDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_RouteDecodeErrorZ_free: extern "C" fn(CResult_RouteDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_RouteDecodeErrorZ_ok: extern "C" fn (crate::routing::router::Route) -> CResult_RouteDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_RouteDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_RouteDecodeErrorZ = + crate::c_types::CResultTempl::::err; + pub type CVec_RouteHintZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_RouteHintZ_free: extern "C" fn(CVec_RouteHintZ) = crate::c_types::CVecTempl_free::; @@ -369,3 +545,47 @@ pub static CResult_RouteLightningErrorZ_ok: extern "C" fn (crate::routing::route pub static CResult_RouteLightningErrorZ_err: extern "C" fn (crate::ln::msgs::LightningError) -> CResult_RouteLightningErrorZ = crate::c_types::CResultTempl::::err; +pub type CResult_RoutingFeesDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_RoutingFeesDecodeErrorZ_free: extern "C" fn(CResult_RoutingFeesDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_RoutingFeesDecodeErrorZ_ok: extern "C" fn (crate::routing::network_graph::RoutingFees) -> CResult_RoutingFeesDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_RoutingFeesDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_RoutingFeesDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_NodeAnnouncementInfoDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_NodeAnnouncementInfoDecodeErrorZ_free: extern "C" fn(CResult_NodeAnnouncementInfoDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_NodeAnnouncementInfoDecodeErrorZ_ok: extern "C" fn (crate::routing::network_graph::NodeAnnouncementInfo) -> CResult_NodeAnnouncementInfoDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_NodeAnnouncementInfoDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_NodeAnnouncementInfoDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_NodeInfoDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_NodeInfoDecodeErrorZ_free: extern "C" fn(CResult_NodeInfoDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_NodeInfoDecodeErrorZ_ok: extern "C" fn (crate::routing::network_graph::NodeInfo) -> CResult_NodeInfoDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_NodeInfoDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_NodeInfoDecodeErrorZ = + crate::c_types::CResultTempl::::err; + +pub type CResult_NetworkGraphDecodeErrorZ = crate::c_types::CResultTempl; +#[no_mangle] +pub static CResult_NetworkGraphDecodeErrorZ_free: extern "C" fn(CResult_NetworkGraphDecodeErrorZ) = crate::c_types::CResultTempl_free::; +#[no_mangle] +pub static CResult_NetworkGraphDecodeErrorZ_ok: extern "C" fn (crate::routing::network_graph::NetworkGraph) -> CResult_NetworkGraphDecodeErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +pub static CResult_NetworkGraphDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_NetworkGraphDecodeErrorZ = + crate::c_types::CResultTempl::::err; + diff --git a/lightning-c-bindings/src/chain/channelmonitor.rs b/lightning-c-bindings/src/chain/channelmonitor.rs index 886812516..8ebedc067 100644 --- a/lightning-c-bindings/src/chain/channelmonitor.rs +++ b/lightning-c-bindings/src/chain/channelmonitor.rs @@ -120,12 +120,10 @@ pub(crate) extern "C" fn ChannelMonitorUpdate_write_void(obj: *const c_void) -> crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeChannelMonitorUpdate) }) } #[no_mangle] -pub extern "C" fn ChannelMonitorUpdate_read(ser: crate::c_types::u8slice) -> ChannelMonitorUpdate { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - ChannelMonitorUpdate { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - ChannelMonitorUpdate { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn ChannelMonitorUpdate_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChannelMonitorUpdateDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::chain::channelmonitor::ChannelMonitorUpdate { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } /// An error enum representing a failure to persist a channel monitor update. #[must_use] diff --git a/lightning-c-bindings/src/chain/keysinterface.rs b/lightning-c-bindings/src/chain/keysinterface.rs index 788f1063b..53702a9d7 100644 --- a/lightning-c-bindings/src/chain/keysinterface.rs +++ b/lightning-c-bindings/src/chain/keysinterface.rs @@ -880,12 +880,10 @@ pub(crate) extern "C" fn InMemoryChannelKeys_write_void(obj: *const c_void) -> c crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeInMemoryChannelKeys) }) } #[no_mangle] -pub extern "C" fn InMemoryChannelKeys_read(ser: crate::c_types::u8slice) -> InMemoryChannelKeys { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - InMemoryChannelKeys { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - InMemoryChannelKeys { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn InMemoryChannelKeys_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_InMemoryChannelKeysDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::chain::keysinterface::InMemoryChannelKeys { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } use lightning::chain::keysinterface::KeysManager as nativeKeysManagerImport; diff --git a/lightning-c-bindings/src/ln/msgs.rs b/lightning-c-bindings/src/ln/msgs.rs index 3680c2ac2..cdd4c7b03 100644 --- a/lightning-c-bindings/src/ln/msgs.rs +++ b/lightning-c-bindings/src/ln/msgs.rs @@ -4332,12 +4332,10 @@ pub(crate) extern "C" fn ChannelReestablish_write_void(obj: *const c_void) -> cr crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeChannelReestablish) }) } #[no_mangle] -pub extern "C" fn ChannelReestablish_read(ser: crate::c_types::u8slice) -> ChannelReestablish { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - ChannelReestablish { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - ChannelReestablish { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn ChannelReestablish_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChannelReestablishDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::ChannelReestablish { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn ClosingSigned_write(obj: *const ClosingSigned) -> crate::c_types::derived::CVec_u8Z { @@ -4428,12 +4426,10 @@ pub(crate) extern "C" fn Init_write_void(obj: *const c_void) -> crate::c_types:: crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeInit) }) } #[no_mangle] -pub extern "C" fn Init_read(ser: crate::c_types::u8slice) -> Init { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - Init { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - Init { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn Init_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_InitDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::Init { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn OpenChannel_write(obj: *const OpenChannel) -> crate::c_types::derived::CVec_u8Z { @@ -4572,12 +4568,10 @@ pub(crate) extern "C" fn Ping_write_void(obj: *const c_void) -> crate::c_types:: crate::c_types::serialize_obj(unsafe { &*(obj as *const nativePing) }) } #[no_mangle] -pub extern "C" fn Ping_read(ser: crate::c_types::u8slice) -> Ping { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - Ping { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - Ping { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn Ping_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_PingDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::Ping { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn Pong_write(obj: *const Pong) -> crate::c_types::derived::CVec_u8Z { @@ -4588,12 +4582,10 @@ pub(crate) extern "C" fn Pong_write_void(obj: *const c_void) -> crate::c_types:: crate::c_types::serialize_obj(unsafe { &*(obj as *const nativePong) }) } #[no_mangle] -pub extern "C" fn Pong_read(ser: crate::c_types::u8slice) -> Pong { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - Pong { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - Pong { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn Pong_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_PongDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::Pong { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn UnsignedChannelAnnouncement_write(obj: *const UnsignedChannelAnnouncement) -> crate::c_types::derived::CVec_u8Z { @@ -4604,12 +4596,10 @@ pub(crate) extern "C" fn UnsignedChannelAnnouncement_write_void(obj: *const c_vo crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeUnsignedChannelAnnouncement) }) } #[no_mangle] -pub extern "C" fn UnsignedChannelAnnouncement_read(ser: crate::c_types::u8slice) -> UnsignedChannelAnnouncement { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - UnsignedChannelAnnouncement { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - UnsignedChannelAnnouncement { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn UnsignedChannelAnnouncement_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_UnsignedChannelAnnouncementDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::UnsignedChannelAnnouncement { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn ChannelAnnouncement_write(obj: *const ChannelAnnouncement) -> crate::c_types::derived::CVec_u8Z { @@ -4636,12 +4626,10 @@ pub(crate) extern "C" fn UnsignedChannelUpdate_write_void(obj: *const c_void) -> crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeUnsignedChannelUpdate) }) } #[no_mangle] -pub extern "C" fn UnsignedChannelUpdate_read(ser: crate::c_types::u8slice) -> UnsignedChannelUpdate { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - UnsignedChannelUpdate { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - UnsignedChannelUpdate { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn UnsignedChannelUpdate_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_UnsignedChannelUpdateDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::UnsignedChannelUpdate { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn ChannelUpdate_write(obj: *const ChannelUpdate) -> crate::c_types::derived::CVec_u8Z { @@ -4668,12 +4656,10 @@ pub(crate) extern "C" fn ErrorMessage_write_void(obj: *const c_void) -> crate::c crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeErrorMessage) }) } #[no_mangle] -pub extern "C" fn ErrorMessage_read(ser: crate::c_types::u8slice) -> ErrorMessage { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - ErrorMessage { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - ErrorMessage { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn ErrorMessage_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ErrorMessageDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::ErrorMessage { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn UnsignedNodeAnnouncement_write(obj: *const UnsignedNodeAnnouncement) -> crate::c_types::derived::CVec_u8Z { @@ -4684,12 +4670,10 @@ pub(crate) extern "C" fn UnsignedNodeAnnouncement_write_void(obj: *const c_void) crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeUnsignedNodeAnnouncement) }) } #[no_mangle] -pub extern "C" fn UnsignedNodeAnnouncement_read(ser: crate::c_types::u8slice) -> UnsignedNodeAnnouncement { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - UnsignedNodeAnnouncement { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - UnsignedNodeAnnouncement { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn UnsignedNodeAnnouncement_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_UnsignedNodeAnnouncementDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::UnsignedNodeAnnouncement { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn NodeAnnouncement_write(obj: *const NodeAnnouncement) -> crate::c_types::derived::CVec_u8Z { @@ -4708,12 +4692,10 @@ pub extern "C" fn NodeAnnouncement_read(ser: crate::c_types::u8slice) -> NodeAnn } } #[no_mangle] -pub extern "C" fn QueryShortChannelIds_read(ser: crate::c_types::u8slice) -> QueryShortChannelIds { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - QueryShortChannelIds { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - QueryShortChannelIds { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn QueryShortChannelIds_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_QueryShortChannelIdsDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::QueryShortChannelIds { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn QueryShortChannelIds_write(obj: *const QueryShortChannelIds) -> crate::c_types::derived::CVec_u8Z { @@ -4724,12 +4706,10 @@ pub(crate) extern "C" fn QueryShortChannelIds_write_void(obj: *const c_void) -> crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeQueryShortChannelIds) }) } #[no_mangle] -pub extern "C" fn ReplyShortChannelIdsEnd_read(ser: crate::c_types::u8slice) -> ReplyShortChannelIdsEnd { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - ReplyShortChannelIdsEnd { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - ReplyShortChannelIdsEnd { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn ReplyShortChannelIdsEnd_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ReplyShortChannelIdsEndDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::ReplyShortChannelIdsEnd { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn ReplyShortChannelIdsEnd_write(obj: *const ReplyShortChannelIdsEnd) -> crate::c_types::derived::CVec_u8Z { @@ -4740,12 +4720,10 @@ pub(crate) extern "C" fn ReplyShortChannelIdsEnd_write_void(obj: *const c_void) crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeReplyShortChannelIdsEnd) }) } #[no_mangle] -pub extern "C" fn QueryChannelRange_read(ser: crate::c_types::u8slice) -> QueryChannelRange { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - QueryChannelRange { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - QueryChannelRange { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn QueryChannelRange_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_QueryChannelRangeDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::QueryChannelRange { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn QueryChannelRange_write(obj: *const QueryChannelRange) -> crate::c_types::derived::CVec_u8Z { @@ -4756,12 +4734,10 @@ pub(crate) extern "C" fn QueryChannelRange_write_void(obj: *const c_void) -> cra crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeQueryChannelRange) }) } #[no_mangle] -pub extern "C" fn ReplyChannelRange_read(ser: crate::c_types::u8slice) -> ReplyChannelRange { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - ReplyChannelRange { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - ReplyChannelRange { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn ReplyChannelRange_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ReplyChannelRangeDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::ReplyChannelRange { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn ReplyChannelRange_write(obj: *const ReplyChannelRange) -> crate::c_types::derived::CVec_u8Z { @@ -4772,12 +4748,10 @@ pub(crate) extern "C" fn ReplyChannelRange_write_void(obj: *const c_void) -> cra crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeReplyChannelRange) }) } #[no_mangle] -pub extern "C" fn GossipTimestampFilter_read(ser: crate::c_types::u8slice) -> GossipTimestampFilter { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - GossipTimestampFilter { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - GossipTimestampFilter { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn GossipTimestampFilter_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_GossipTimestampFilterDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::GossipTimestampFilter { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn GossipTimestampFilter_write(obj: *const GossipTimestampFilter) -> crate::c_types::derived::CVec_u8Z { diff --git a/lightning-c-bindings/src/routing/network_graph.rs b/lightning-c-bindings/src/routing/network_graph.rs index f70b2e41e..51898d618 100644 --- a/lightning-c-bindings/src/routing/network_graph.rs +++ b/lightning-c-bindings/src/routing/network_graph.rs @@ -647,12 +647,10 @@ pub extern "C" fn RoutingFees_new(mut base_msat_arg: u32, mut proportional_milli })), is_owned: true } } #[no_mangle] -pub extern "C" fn RoutingFees_read(ser: crate::c_types::u8slice) -> RoutingFees { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - RoutingFees { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - RoutingFees { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn RoutingFees_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_RoutingFeesDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::network_graph::RoutingFees { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn RoutingFees_write(obj: *const RoutingFees) -> crate::c_types::derived::CVec_u8Z { @@ -798,12 +796,10 @@ pub(crate) extern "C" fn NodeAnnouncementInfo_write_void(obj: *const c_void) -> crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeNodeAnnouncementInfo) }) } #[no_mangle] -pub extern "C" fn NodeAnnouncementInfo_read(ser: crate::c_types::u8slice) -> NodeAnnouncementInfo { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - NodeAnnouncementInfo { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - NodeAnnouncementInfo { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn NodeAnnouncementInfo_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_NodeAnnouncementInfoDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::network_graph::NodeAnnouncementInfo { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } use lightning::routing::network_graph::NodeInfo as nativeNodeInfoImport; @@ -904,12 +900,10 @@ pub(crate) extern "C" fn NodeInfo_write_void(obj: *const c_void) -> crate::c_typ crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeNodeInfo) }) } #[no_mangle] -pub extern "C" fn NodeInfo_read(ser: crate::c_types::u8slice) -> NodeInfo { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - NodeInfo { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - NodeInfo { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn NodeInfo_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_NodeInfoDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::network_graph::NodeInfo { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } #[no_mangle] pub extern "C" fn NetworkGraph_write(obj: *const NetworkGraph) -> crate::c_types::derived::CVec_u8Z { @@ -920,12 +914,10 @@ pub(crate) extern "C" fn NetworkGraph_write_void(obj: *const c_void) -> crate::c crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeNetworkGraph) }) } #[no_mangle] -pub extern "C" fn NetworkGraph_read(ser: crate::c_types::u8slice) -> NetworkGraph { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - NetworkGraph { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - NetworkGraph { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn NetworkGraph_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_NetworkGraphDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::network_graph::NetworkGraph { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } /// Creates a new, empty, network graph. #[must_use] diff --git a/lightning-c-bindings/src/routing/router.rs b/lightning-c-bindings/src/routing/router.rs index 47f89af45..f65ecf7da 100644 --- a/lightning-c-bindings/src/routing/router.rs +++ b/lightning-c-bindings/src/routing/router.rs @@ -230,12 +230,10 @@ pub(crate) extern "C" fn Route_write_void(obj: *const c_void) -> crate::c_types: crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeRoute) }) } #[no_mangle] -pub extern "C" fn Route_read(ser: crate::c_types::u8slice) -> Route { - if let Ok(res) = crate::c_types::deserialize_obj(ser) { - Route { inner: Box::into_raw(Box::new(res)), is_owned: true } - } else { - Route { inner: std::ptr::null_mut(), is_owned: true } - } +pub extern "C" fn Route_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_RouteDecodeErrorZ { + let res = crate::c_types::deserialize_obj(ser); + let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::router::Route { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) }; + local_res } use lightning::routing::router::RouteHint as nativeRouteHintImport;