Merge pull request #46 from TheBlueMatt/main
[ldk-c-bindings] / lightning-c-bindings / include / lightningpp.hpp
index e59512b0c400aae4cccf072acec4191b65cc0926..d05c71cda8898f9bd48925f38425be4dda684eaf 100644 (file)
@@ -1,5 +1,351 @@
 #include <string.h>
 namespace LDK {
+// Forward declarations
+class Str;
+class TxCreationKeys;
+class ChannelPublicKeys;
+class HTLCOutputInCommitment;
+class ChannelTransactionParameters;
+class CounterpartyChannelTransactionParameters;
+class DirectedChannelTransactionParameters;
+class HolderCommitmentTransaction;
+class BuiltCommitmentTransaction;
+class ClosingTransaction;
+class TrustedClosingTransaction;
+class CommitmentTransaction;
+class TrustedCommitmentTransaction;
+class ShutdownScript;
+class InvalidShutdownScript;
+class BackgroundProcessor;
+class ChannelManagerPersister;
+class RouteHop;
+class Route;
+class RouteHint;
+class RouteHintHop;
+class BroadcasterInterface;
+class ConfirmationTarget;
+class FeeEstimator;
+class BestBlock;
+class AccessError;
+class Access;
+class Listen;
+class Confirm;
+class ChannelMonitorUpdateErr;
+class Watch;
+class Filter;
+class WatchedOutput;
+class PaymentPurpose;
+class ClosureReason;
+class Event;
+class MessageSendEvent;
+class MessageSendEventsProvider;
+class EventsProvider;
+class EventHandler;
+class Score;
+class InitFeatures;
+class NodeFeatures;
+class ChannelFeatures;
+class InvoiceFeatures;
+class Scorer;
+class DelayedPaymentOutputDescriptor;
+class StaticPaymentOutputDescriptor;
+class SpendableOutputDescriptor;
+class BaseSign;
+class Sign;
+class KeysInterface;
+class InMemorySigner;
+class KeysManager;
+class FilesystemPersister;
+class PaymentId;
+class ChannelManager;
+class ChainParameters;
+class CounterpartyForwardingInfo;
+class ChannelCounterparty;
+class ChannelDetails;
+class PaymentSendFailure;
+class ChannelManagerReadArgs;
+class ChannelHandshakeConfig;
+class ChannelHandshakeLimits;
+class ChannelConfig;
+class UserConfig;
+class APIError;
+class OutPoint;
+class CustomMessageReader;
+class Type;
+class Invoice;
+class SignedRawInvoice;
+class RawInvoice;
+class RawDataPart;
+class PositiveTimestamp;
+class SiPrefix;
+class Currency;
+class Sha256;
+class Description;
+class PayeePubKey;
+class ExpiryTime;
+class MinFinalCltvExpiry;
+class Fallback;
+class InvoiceSignature;
+class PrivateRoute;
+class CreationError;
+class SemanticError;
+class SignOrCreationError;
+class ChannelMonitorUpdate;
+class MonitorUpdateError;
+class MonitorEvent;
+class HTLCUpdate;
+class Balance;
+class ChannelMonitor;
+class CustomMessageHandler;
+class IgnoringMessageHandler;
+class ErroringMessageHandler;
+class MessageHandler;
+class SocketDescriptor;
+class PeerHandleError;
+class PeerManager;
+class NodeId;
+class NetworkGraph;
+class ReadOnlyNetworkGraph;
+class NetworkUpdate;
+class NetGraphMsgHandler;
+class DirectionalChannelInfo;
+class ChannelInfo;
+class RoutingFees;
+class NodeAnnouncementInfo;
+class NodeInfo;
+class DecodeError;
+class Init;
+class ErrorMessage;
+class Ping;
+class Pong;
+class OpenChannel;
+class AcceptChannel;
+class FundingCreated;
+class FundingSigned;
+class FundingLocked;
+class Shutdown;
+class ClosingSignedFeeRange;
+class ClosingSigned;
+class UpdateAddHTLC;
+class UpdateFulfillHTLC;
+class UpdateFailHTLC;
+class UpdateFailMalformedHTLC;
+class CommitmentSigned;
+class RevokeAndACK;
+class UpdateFee;
+class DataLossProtect;
+class ChannelReestablish;
+class AnnouncementSignatures;
+class NetAddress;
+class UnsignedNodeAnnouncement;
+class NodeAnnouncement;
+class UnsignedChannelAnnouncement;
+class ChannelAnnouncement;
+class UnsignedChannelUpdate;
+class ChannelUpdate;
+class QueryChannelRange;
+class ReplyChannelRange;
+class QueryShortChannelIds;
+class ReplyShortChannelIdsEnd;
+class GossipTimestampFilter;
+class ErrorAction;
+class LightningError;
+class CommitmentUpdate;
+class ChannelMessageHandler;
+class RoutingMessageHandler;
+class Level;
+class Logger;
+class Persist;
+class LockedChannelMonitor;
+class ChainMonitor;
+class CVec_SpendableOutputDescriptorZ;
+class CResult_LockedChannelMonitorNoneZ;
+class CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ;
+class CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ;
+class CResult_HTLCUpdateDecodeErrorZ;
+class C2Tuple_SignatureCVec_SignatureZZ;
+class CVec_C2Tuple_u32TxOutZZ;
+class CResult_ChannelInfoDecodeErrorZ;
+class CResult_FundingCreatedDecodeErrorZ;
+class CResult_ChannelAnnouncementDecodeErrorZ;
+class CVec_OutPointZ;
+class CResult_PositiveTimestampCreationErrorZ;
+class CResult_CVec_u8ZPeerHandleErrorZ;
+class CResult_InvoiceFeaturesDecodeErrorZ;
+class COption_NetworkUpdateZ;
+class COption_u64Z;
+class CResult_TxOutAccessErrorZ;
+class CResult_TrustedClosingTransactionNoneZ;
+class CResult_ChannelMonitorUpdateDecodeErrorZ;
+class C2Tuple_PublicKeyTypeZ;
+class CResult_NetAddressDecodeErrorZ;
+class CResult_ChannelReestablishDecodeErrorZ;
+class CResult_UnsignedNodeAnnouncementDecodeErrorZ;
+class CResult_ReplyChannelRangeDecodeErrorZ;
+class CResult_CommitmentSignedDecodeErrorZ;
+class CVec_UpdateAddHTLCZ;
+class CResult_GossipTimestampFilterDecodeErrorZ;
+class COption_u32Z;
+class CResult_InitFeaturesDecodeErrorZ;
+class CResult_StaticPaymentOutputDescriptorDecodeErrorZ;
+class CResult_PaymentIdPaymentSendFailureZ;
+class CResult_InvoiceSignOrCreationErrorZ;
+class CResult_CommitmentTransactionDecodeErrorZ;
+class COption_C2Tuple_usizeTransactionZZ;
+class CResult_TransactionNoneZ;
+class CResult_SignedRawInvoiceNoneZ;
+class CResult_ExpiryTimeCreationErrorZ;
+class CResult_ClosingSignedFeeRangeDecodeErrorZ;
+class CResult_PingDecodeErrorZ;
+class COption_FilterZ;
+class CVec_TransactionOutputsZ;
+class CResult_ErrorMessageDecodeErrorZ;
+class CResult_OpenChannelDecodeErrorZ;
+class CVec_CVec_u8ZZ;
+class CResult_SecretKeyErrorZ;
+class CResult_ShutdownScriptDecodeErrorZ;
+class CResult_InvoiceNoneZ;
+class CResult_QueryChannelRangeDecodeErrorZ;
+class CResult_TxCreationKeysDecodeErrorZ;
+class C2Tuple_usizeTransactionZ;
+class CResult_ChannelFeaturesDecodeErrorZ;
+class CVec_ChannelMonitorZ;
+class CVec_TransactionZ;
+class CResult_UpdateFeeDecodeErrorZ;
+class CResult_RouteHopDecodeErrorZ;
+class CResult_NodeAnnouncementDecodeErrorZ;
+class CVec_BalanceZ;
+class CResult_HTLCOutputInCommitmentDecodeErrorZ;
+class CResult_boolLightningErrorZ;
+class CResult_TxCreationKeysErrorZ;
+class C2Tuple_BlockHashChannelMonitorZ;
+class CResult_NodeIdDecodeErrorZ;
+class CResult_ShutdownScriptInvalidShutdownScriptZ;
+class CResult_RecoverableSignatureNoneZ;
+class CResult_NodeAnnouncementInfoDecodeErrorZ;
+class CResult_NetAddressu8Z;
+class C3Tuple_RawInvoice_u832InvoiceSignatureZ;
+class CVec_UpdateFailMalformedHTLCZ;
+class CResult_FundingSignedDecodeErrorZ;
+class CResult_NetworkGraphDecodeErrorZ;
+class CVec_RouteHopZ;
+class CVec_C2Tuple_BlockHashChannelMonitorZZ;
+class CResult_NonePaymentSendFailureZ;
+class CResult_RouteLightningErrorZ;
+class CResult_ChannelPublicKeysDecodeErrorZ;
+class CVec_u8Z;
+class CResult_NodeInfoDecodeErrorZ;
+class CResult_ClosingSignedDecodeErrorZ;
+class CResult_HolderCommitmentTransactionDecodeErrorZ;
+class CVec_CResult_NoneAPIErrorZZ;
+class CResult_SignatureNoneZ;
+class C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ;
+class CResult_InitDecodeErrorZ;
+class CResult_OutPointDecodeErrorZ;
+class CVec_ChannelDetailsZ;
+class CResult_SignDecodeErrorZ;
+class CVec_MessageSendEventZ;
+class C2Tuple_OutPointScriptZ;
+class CResult_PaymentIdDecodeErrorZ;
+class CResult_UpdateFailMalformedHTLCDecodeErrorZ;
+class CVec_NodeAnnouncementZ;
+class CResult_UnsignedChannelAnnouncementDecodeErrorZ;
+class CVec_TxidZ;
+class CResult_NoneMonitorUpdateErrorZ;
+class CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ;
+class CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ;
+class CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ;
+class CResult_CVec_CVec_u8ZZNoneZ;
+class C2Tuple_PaymentHashPaymentSecretZ;
+class COption_AccessZ;
+class C2Tuple_BlockHashChannelManagerZ;
+class CResult_ChannelTransactionParametersDecodeErrorZ;
+class CResult_AcceptChannelDecodeErrorZ;
+class CVec_SignatureZ;
+class CVec_u64Z;
+class CResult_PongDecodeErrorZ;
+class CResult_DelayedPaymentOutputDescriptorDecodeErrorZ;
+class C2Tuple_PaymentHashPaymentIdZ;
+class CResult_StringErrorZ;
+class CResult_NoneErrorZ;
+class C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ;
+class CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ;
+class CVec_RouteHintZ;
+class COption_u16Z;
+class CVec_CVec_RouteHopZZ;
+class CResult_TrustedCommitmentTransactionNoneZ;
+class CResult_NoneLightningErrorZ;
+class CResult_NonePeerHandleErrorZ;
+class COption_CVec_NetAddressZZ;
+class CResult_CVec_SignatureZNoneZ;
+class CResult__u832APIErrorZ;
+class CResult_DescriptionCreationErrorZ;
+class CVec_C2Tuple_PublicKeyTypeZZ;
+class CResult_RoutingFeesDecodeErrorZ;
+class CResult_PayeePubKeyErrorZ;
+class CResult_QueryShortChannelIdsDecodeErrorZ;
+class CResult_InvoiceSemanticErrorZ;
+class CResult_UpdateAddHTLCDecodeErrorZ;
+class CResult_CounterpartyChannelTransactionParametersDecodeErrorZ;
+class CResult_NoneAPIErrorZ;
+class CVec_NetAddressZ;
+class CVec_C2Tuple_usizeTransactionZZ;
+class CVec_PublicKeyZ;
+class COption_TypeZ;
+class CResult_COption_TypeZDecodeErrorZ;
+class CResult_DirectionalChannelInfoDecodeErrorZ;
+class C2Tuple_u32TxOutZ;
+class CResult_UpdateFailHTLCDecodeErrorZ;
+class CResult_ChannelConfigDecodeErrorZ;
+class CVec_PrivateRouteZ;
+class CResult_SpendableOutputDescriptorDecodeErrorZ;
+class CResult_RevokeAndACKDecodeErrorZ;
+class CResult_UnsignedChannelUpdateDecodeErrorZ;
+class CResult_ShutdownDecodeErrorZ;
+class CVec_EventZ;
+class CResult_NoneSemanticErrorZ;
+class CVec_MonitorEventZ;
+class CVec_C2Tuple_u32ScriptZZ;
+class CResult_NoneChannelMonitorUpdateErrZ;
+class CResult_SiPrefixNoneZ;
+class CResult_PublicKeyErrorZ;
+class C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ;
+class CResult_NoneNoneZ;
+class CResult_PrivateRouteCreationErrorZ;
+class CResult_boolPeerHandleErrorZ;
+class CVec_APIErrorZ;
+class CResult_ChannelUpdateDecodeErrorZ;
+class CVec_UpdateFulfillHTLCZ;
+class CResult_AnnouncementSignaturesDecodeErrorZ;
+class CResult_UpdateFulfillHTLCDecodeErrorZ;
+class CResult_NodeFeaturesDecodeErrorZ;
+class CResult_InMemorySignerDecodeErrorZ;
+class CResult_PaymentSecretAPIErrorZ;
+class C2Tuple_u32ScriptZ;
+class CResult_CResult_NetAddressu8ZDecodeErrorZ;
+class CResult_ReplyShortChannelIdsEndDecodeErrorZ;
+class CResult_RouteDecodeErrorZ;
+class CResult_BuiltCommitmentTransactionDecodeErrorZ;
+class CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ;
+class CVec_TxOutZ;
+class CVec_UpdateFailHTLCZ;
+class CResult_FundingLockedDecodeErrorZ;
+
+class Str {
+private:
+       LDKStr self;
+public:
+       Str(const Str&) = delete;
+       Str(Str&& o) : self(o.self) { memset(&o, 0, sizeof(Str)); }
+       Str(LDKStr&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKStr)); }
+       operator LDKStr() && { LDKStr res = self; memset(&self, 0, sizeof(LDKStr)); return res; }
+       ~Str() { Str_free(self); }
+       Str& operator=(Str&& o) { Str_free(self); self = o.self; memset(&o, 0, sizeof(Str)); return *this; }
+       LDKStr* operator &() { return &self; }
+       LDKStr* operator ->() { return &self; }
+       const LDKStr* operator &() const { return &self; }
+       const LDKStr* operator ->() const { return &self; }
+};
 class TxCreationKeys {
 private:
        LDKTxCreationKeys self;
@@ -120,6 +466,36 @@ public:
        const LDKBuiltCommitmentTransaction* operator &() const { return &self; }
        const LDKBuiltCommitmentTransaction* operator ->() const { return &self; }
 };
+class ClosingTransaction {
+private:
+       LDKClosingTransaction self;
+public:
+       ClosingTransaction(const ClosingTransaction&) = delete;
+       ClosingTransaction(ClosingTransaction&& o) : self(o.self) { memset(&o, 0, sizeof(ClosingTransaction)); }
+       ClosingTransaction(LDKClosingTransaction&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKClosingTransaction)); }
+       operator LDKClosingTransaction() && { LDKClosingTransaction res = self; memset(&self, 0, sizeof(LDKClosingTransaction)); return res; }
+       ~ClosingTransaction() { ClosingTransaction_free(self); }
+       ClosingTransaction& operator=(ClosingTransaction&& o) { ClosingTransaction_free(self); self = o.self; memset(&o, 0, sizeof(ClosingTransaction)); return *this; }
+       LDKClosingTransaction* operator &() { return &self; }
+       LDKClosingTransaction* operator ->() { return &self; }
+       const LDKClosingTransaction* operator &() const { return &self; }
+       const LDKClosingTransaction* operator ->() const { return &self; }
+};
+class TrustedClosingTransaction {
+private:
+       LDKTrustedClosingTransaction self;
+public:
+       TrustedClosingTransaction(const TrustedClosingTransaction&) = delete;
+       TrustedClosingTransaction(TrustedClosingTransaction&& o) : self(o.self) { memset(&o, 0, sizeof(TrustedClosingTransaction)); }
+       TrustedClosingTransaction(LDKTrustedClosingTransaction&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKTrustedClosingTransaction)); }
+       operator LDKTrustedClosingTransaction() && { LDKTrustedClosingTransaction res = self; memset(&self, 0, sizeof(LDKTrustedClosingTransaction)); return res; }
+       ~TrustedClosingTransaction() { TrustedClosingTransaction_free(self); }
+       TrustedClosingTransaction& operator=(TrustedClosingTransaction&& o) { TrustedClosingTransaction_free(self); self = o.self; memset(&o, 0, sizeof(TrustedClosingTransaction)); return *this; }
+       LDKTrustedClosingTransaction* operator &() { return &self; }
+       LDKTrustedClosingTransaction* operator ->() { return &self; }
+       const LDKTrustedClosingTransaction* operator &() const { return &self; }
+       const LDKTrustedClosingTransaction* operator ->() const { return &self; }
+};
 class CommitmentTransaction {
 private:
        LDKCommitmentTransaction self;
@@ -150,6 +526,36 @@ public:
        const LDKTrustedCommitmentTransaction* operator &() const { return &self; }
        const LDKTrustedCommitmentTransaction* operator ->() const { return &self; }
 };
+class ShutdownScript {
+private:
+       LDKShutdownScript self;
+public:
+       ShutdownScript(const ShutdownScript&) = delete;
+       ShutdownScript(ShutdownScript&& o) : self(o.self) { memset(&o, 0, sizeof(ShutdownScript)); }
+       ShutdownScript(LDKShutdownScript&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKShutdownScript)); }
+       operator LDKShutdownScript() && { LDKShutdownScript res = self; memset(&self, 0, sizeof(LDKShutdownScript)); return res; }
+       ~ShutdownScript() { ShutdownScript_free(self); }
+       ShutdownScript& operator=(ShutdownScript&& o) { ShutdownScript_free(self); self = o.self; memset(&o, 0, sizeof(ShutdownScript)); return *this; }
+       LDKShutdownScript* operator &() { return &self; }
+       LDKShutdownScript* operator ->() { return &self; }
+       const LDKShutdownScript* operator &() const { return &self; }
+       const LDKShutdownScript* operator ->() const { return &self; }
+};
+class InvalidShutdownScript {
+private:
+       LDKInvalidShutdownScript self;
+public:
+       InvalidShutdownScript(const InvalidShutdownScript&) = delete;
+       InvalidShutdownScript(InvalidShutdownScript&& o) : self(o.self) { memset(&o, 0, sizeof(InvalidShutdownScript)); }
+       InvalidShutdownScript(LDKInvalidShutdownScript&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInvalidShutdownScript)); }
+       operator LDKInvalidShutdownScript() && { LDKInvalidShutdownScript res = self; memset(&self, 0, sizeof(LDKInvalidShutdownScript)); return res; }
+       ~InvalidShutdownScript() { InvalidShutdownScript_free(self); }
+       InvalidShutdownScript& operator=(InvalidShutdownScript&& o) { InvalidShutdownScript_free(self); self = o.self; memset(&o, 0, sizeof(InvalidShutdownScript)); return *this; }
+       LDKInvalidShutdownScript* operator &() { return &self; }
+       LDKInvalidShutdownScript* operator ->() { return &self; }
+       const LDKInvalidShutdownScript* operator &() const { return &self; }
+       const LDKInvalidShutdownScript* operator ->() const { return &self; }
+};
 class BackgroundProcessor {
 private:
        LDKBackgroundProcessor self;
@@ -179,6 +585,13 @@ public:
        LDKChannelManagerPersister* operator ->() { return &self; }
        const LDKChannelManagerPersister* operator &() const { return &self; }
        const LDKChannelManagerPersister* operator ->() const { return &self; }
+       /**
+        *  Persist the given [`ChannelManager`] to disk, returning an error if persistence failed
+        *  (which will cause the [`BackgroundProcessor`] which called this method to exit.
+        * 
+        *  [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
+        */
+       inline LDK::CResult_NoneErrorZ persist_manager(const struct LDKChannelManager *NONNULL_PTR channel_manager);
 };
 class RouteHop {
 private:
@@ -254,6 +667,10 @@ public:
        LDKBroadcasterInterface* operator ->() { return &self; }
        const LDKBroadcasterInterface* operator &() const { return &self; }
        const LDKBroadcasterInterface* operator ->() const { return &self; }
+       /**
+        *  Sends a transaction out to (hopefully) be mined.
+        */
+       inline void broadcast_transaction(struct LDKTransaction tx);
 };
 class ConfirmationTarget {
 private:
@@ -283,6 +700,17 @@ public:
        LDKFeeEstimator* operator ->() { return &self; }
        const LDKFeeEstimator* operator &() const { return &self; }
        const LDKFeeEstimator* operator ->() const { return &self; }
+       /**
+        *  Gets estimated satoshis of fee required per 1000 Weight-Units.
+        * 
+        *  Must be no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later round-downs
+        *  don't put us below 1 satoshi-per-byte).
+        * 
+        *  This translates to:
+        *   * satoshis-per-byte * 250
+        *   * ceil(satoshis-per-kbyte / 4)
+        */
+       inline uint32_t get_est_sat_per_1000_weight(enum LDKConfirmationTarget confirmation_target);
 };
 class BestBlock {
 private:
@@ -327,6 +755,14 @@ public:
        LDKAccess* operator ->() { return &self; }
        const LDKAccess* operator &() const { return &self; }
        const LDKAccess* operator ->() const { return &self; }
+       /**
+        *  Returns the transaction output of a funding transaction encoded by [`short_channel_id`].
+        *  Returns an error if `genesis_hash` is for a different chain or if such a transaction output
+        *  is unknown.
+        * 
+        *  [`short_channel_id`]: https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#definition-of-short_channel_id
+        */
+       inline LDK::CResult_TxOutAccessErrorZ get_utxo(const uint8_t (*genesis_hash)[32], uint64_t short_channel_id);
 };
 class Listen {
 private:
@@ -342,6 +778,14 @@ public:
        LDKListen* operator ->() { return &self; }
        const LDKListen* operator &() const { return &self; }
        const LDKListen* operator ->() const { return &self; }
+       /**
+        *  Notifies the listener that a block was added at the given height.
+        */
+       inline void block_connected(struct LDKu8slice block, uint32_t height);
+       /**
+        *  Notifies the listener that a block was removed at the given height.
+        */
+       inline void block_disconnected(const uint8_t (*header)[80], uint32_t height);
 };
 class Confirm {
 private:
@@ -357,6 +801,70 @@ public:
        LDKConfirm* operator ->() { return &self; }
        const LDKConfirm* operator &() const { return &self; }
        const LDKConfirm* operator ->() const { return &self; }
+       /**
+        *  Processes transactions confirmed in a block with a given header and height.
+        * 
+        *  Should be called for any transactions registered by [`Filter::register_tx`] or any
+        *  transactions spending an output registered by [`Filter::register_output`]. Such transactions
+        *  appearing in the same block do not need to be included in the same call; instead, multiple
+        *  calls with additional transactions may be made so long as they are made in [chain order].
+        * 
+        *  May be called before or after [`best_block_updated`] for the corresponding block. However,
+        *  in the event of a chain reorganization, it must not be called with a `header` that is no
+        *  longer in the chain as of the last call to [`best_block_updated`].
+        * 
+        *  [chain order]: Confirm#Order
+        *  [`best_block_updated`]: Self::best_block_updated
+        */
+       inline void transactions_confirmed(const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
+       /**
+        *  Processes a transaction that is no longer confirmed as result of a chain reorganization.
+        * 
+        *  Should be called for any transaction returned by [`get_relevant_txids`] if it has been
+        *  reorganized out of the best chain. Once called, the given transaction should not be returned
+        *  by [`get_relevant_txids`] unless it has been reconfirmed via [`transactions_confirmed`].
+        * 
+        *  [`get_relevant_txids`]: Self::get_relevant_txids
+        *  [`transactions_confirmed`]: Self::transactions_confirmed
+        */
+       inline void transaction_unconfirmed(const uint8_t (*txid)[32]);
+       /**
+        *  Processes an update to the best header connected at the given height.
+        * 
+        *  Should be called when a new header is available but may be skipped for intermediary blocks
+        *  if they become available at the same time.
+        */
+       inline void best_block_updated(const uint8_t (*header)[80], uint32_t height);
+       /**
+        *  Returns transactions that should be monitored for reorganization out of the chain.
+        * 
+        *  Should include any transactions passed to [`transactions_confirmed`] that have insufficient
+        *  confirmations to be safe from a chain reorganization. Should not include any transactions
+        *  passed to [`transaction_unconfirmed`] unless later reconfirmed.
+        * 
+        *  May be called to determine the subset of transactions that must still be monitored for
+        *  reorganization. Will be idempotent between calls but may change as a result of calls to the
+        *  other interface methods. Thus, this is useful to determine which transactions may need to be
+        *  given to [`transaction_unconfirmed`].
+        * 
+        *  [`transactions_confirmed`]: Self::transactions_confirmed
+        *  [`transaction_unconfirmed`]: Self::transaction_unconfirmed
+        */
+       inline LDK::CVec_TxidZ get_relevant_txids();
+};
+class ChannelMonitorUpdateErr {
+private:
+       LDKChannelMonitorUpdateErr self;
+public:
+       ChannelMonitorUpdateErr(const ChannelMonitorUpdateErr&) = delete;
+       ChannelMonitorUpdateErr(ChannelMonitorUpdateErr&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelMonitorUpdateErr)); }
+       ChannelMonitorUpdateErr(LDKChannelMonitorUpdateErr&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelMonitorUpdateErr)); }
+       operator LDKChannelMonitorUpdateErr() && { LDKChannelMonitorUpdateErr res = self; memset(&self, 0, sizeof(LDKChannelMonitorUpdateErr)); return res; }
+       ChannelMonitorUpdateErr& operator=(ChannelMonitorUpdateErr&& o) { self = o.self; memset(&o, 0, sizeof(ChannelMonitorUpdateErr)); return *this; }
+       LDKChannelMonitorUpdateErr* operator &() { return &self; }
+       LDKChannelMonitorUpdateErr* operator ->() { return &self; }
+       const LDKChannelMonitorUpdateErr* operator &() const { return &self; }
+       const LDKChannelMonitorUpdateErr* operator ->() const { return &self; }
 };
 class Watch {
 private:
@@ -372,6 +880,35 @@ public:
        LDKWatch* operator ->() { return &self; }
        const LDKWatch* operator &() const { return &self; }
        const LDKWatch* operator ->() const { return &self; }
+       /**
+        *  Watches a channel identified by `funding_txo` using `monitor`.
+        * 
+        *  Implementations are responsible for watching the chain for the funding transaction along
+        *  with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
+        *  calling [`block_connected`] and [`block_disconnected`] on the monitor.
+        * 
+        *  Note: this interface MUST error with `ChannelMonitorUpdateErr::PermanentFailure` if
+        *  the given `funding_txo` has previously been registered via `watch_channel`.
+        * 
+        *  [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
+        *  [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
+        *  [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
+        */
+       inline LDK::CResult_NoneChannelMonitorUpdateErrZ watch_channel(struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor);
+       /**
+        *  Updates a channel identified by `funding_txo` by applying `update` to its monitor.
+        * 
+        *  Implementations must call [`update_monitor`] with the given update. See
+        *  [`ChannelMonitorUpdateErr`] for invariants around returning an error.
+        * 
+        *  [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
+        */
+       inline LDK::CResult_NoneChannelMonitorUpdateErrZ update_channel(struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update);
+       /**
+        *  Returns any monitor events since the last call. Subsequent calls must only return new
+        *  events.
+        */
+       inline LDK::CVec_MonitorEventZ release_pending_monitor_events();
 };
 class Filter {
 private:
@@ -387,6 +924,23 @@ public:
        LDKFilter* operator ->() { return &self; }
        const LDKFilter* operator &() const { return &self; }
        const LDKFilter* operator ->() const { return &self; }
+       /**
+        *  Registers interest in a transaction with `txid` and having an output with `script_pubkey` as
+        *  a spending condition.
+        */
+       inline void register_tx(const uint8_t (*txid)[32], struct LDKu8slice script_pubkey);
+       /**
+        *  Registers interest in spends of a transaction output.
+        * 
+        *  Optionally, when `output.block_hash` is set, should return any transaction spending the
+        *  output that is found in the corresponding block along with its index.
+        * 
+        *  This return value is useful for Electrum clients in order to supply in-block descendant
+        *  transactions which otherwise were not included. This is not necessary for other clients if
+        *  such descendant transactions were already included (e.g., when a BIP 157 client provides the
+        *  full block).
+        */
+       inline LDK::COption_C2Tuple_usizeTransactionZZ register_output(struct LDKWatchedOutput output);
 };
 class WatchedOutput {
 private:
@@ -403,6 +957,36 @@ public:
        const LDKWatchedOutput* operator &() const { return &self; }
        const LDKWatchedOutput* operator ->() const { return &self; }
 };
+class PaymentPurpose {
+private:
+       LDKPaymentPurpose self;
+public:
+       PaymentPurpose(const PaymentPurpose&) = delete;
+       PaymentPurpose(PaymentPurpose&& o) : self(o.self) { memset(&o, 0, sizeof(PaymentPurpose)); }
+       PaymentPurpose(LDKPaymentPurpose&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPaymentPurpose)); }
+       operator LDKPaymentPurpose() && { LDKPaymentPurpose res = self; memset(&self, 0, sizeof(LDKPaymentPurpose)); return res; }
+       ~PaymentPurpose() { PaymentPurpose_free(self); }
+       PaymentPurpose& operator=(PaymentPurpose&& o) { PaymentPurpose_free(self); self = o.self; memset(&o, 0, sizeof(PaymentPurpose)); return *this; }
+       LDKPaymentPurpose* operator &() { return &self; }
+       LDKPaymentPurpose* operator ->() { return &self; }
+       const LDKPaymentPurpose* operator &() const { return &self; }
+       const LDKPaymentPurpose* operator ->() const { return &self; }
+};
+class ClosureReason {
+private:
+       LDKClosureReason self;
+public:
+       ClosureReason(const ClosureReason&) = delete;
+       ClosureReason(ClosureReason&& o) : self(o.self) { memset(&o, 0, sizeof(ClosureReason)); }
+       ClosureReason(LDKClosureReason&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKClosureReason)); }
+       operator LDKClosureReason() && { LDKClosureReason res = self; memset(&self, 0, sizeof(LDKClosureReason)); return res; }
+       ~ClosureReason() { ClosureReason_free(self); }
+       ClosureReason& operator=(ClosureReason&& o) { ClosureReason_free(self); self = o.self; memset(&o, 0, sizeof(ClosureReason)); return *this; }
+       LDKClosureReason* operator &() { return &self; }
+       LDKClosureReason* operator ->() { return &self; }
+       const LDKClosureReason* operator &() const { return &self; }
+       const LDKClosureReason* operator ->() const { return &self; }
+};
 class Event {
 private:
        LDKEvent self;
@@ -447,6 +1031,11 @@ public:
        LDKMessageSendEventsProvider* operator ->() { return &self; }
        const LDKMessageSendEventsProvider* operator &() const { return &self; }
        const LDKMessageSendEventsProvider* operator ->() const { return &self; }
+       /**
+        *  Gets the list of pending events which were generated by previous actions, clearing the list
+        *  in the process.
+        */
+       inline LDK::CVec_MessageSendEventZ get_and_clear_pending_msg_events();
 };
 class EventsProvider {
 private:
@@ -462,6 +1051,14 @@ public:
        LDKEventsProvider* operator ->() { return &self; }
        const LDKEventsProvider* operator &() const { return &self; }
        const LDKEventsProvider* operator ->() const { return &self; }
+       /**
+        *  Processes any events generated since the last call using the given event handler.
+        * 
+        *  Subsequent calls must only process new events. However, handlers must be capable of handling
+        *  duplicate events across process restarts. This may occur if the provider was recovered from
+        *  an old state (i.e., it hadn't been successfully persisted after processing pending events).
+        */
+       inline void process_pending_events(struct LDKEventHandler handler);
 };
 class EventHandler {
 private:
@@ -477,6 +1074,31 @@ public:
        LDKEventHandler* operator ->() { return &self; }
        const LDKEventHandler* operator &() const { return &self; }
        const LDKEventHandler* operator ->() const { return &self; }
+       /**
+        *  Handles the given [`Event`].
+        * 
+        *  See [`EventsProvider`] for details that must be considered when implementing this method.
+        */
+       inline void handle_event(const struct LDKEvent *NONNULL_PTR event);
+};
+class Score {
+private:
+       LDKScore self;
+public:
+       Score(const Score&) = delete;
+       Score(Score&& o) : self(o.self) { memset(&o, 0, sizeof(Score)); }
+       Score(LDKScore&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKScore)); }
+       operator LDKScore() && { LDKScore res = self; memset(&self, 0, sizeof(LDKScore)); return res; }
+       ~Score() { Score_free(self); }
+       Score& operator=(Score&& o) { Score_free(self); self = o.self; memset(&o, 0, sizeof(Score)); return *this; }
+       LDKScore* operator &() { return &self; }
+       LDKScore* operator ->() { return &self; }
+       const LDKScore* operator &() const { return &self; }
+       const LDKScore* operator ->() const { return &self; }
+       /**
+        *  Returns the fee in msats willing to be paid to avoid routing through the given channel.
+        */
+       inline uint64_t channel_penalty_msat(uint64_t short_channel_id);
 };
 class InitFeatures {
 private:
@@ -538,6 +1160,21 @@ public:
        const LDKInvoiceFeatures* operator &() const { return &self; }
        const LDKInvoiceFeatures* operator ->() const { return &self; }
 };
+class Scorer {
+private:
+       LDKScorer self;
+public:
+       Scorer(const Scorer&) = delete;
+       Scorer(Scorer&& o) : self(o.self) { memset(&o, 0, sizeof(Scorer)); }
+       Scorer(LDKScorer&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKScorer)); }
+       operator LDKScorer() && { LDKScorer res = self; memset(&self, 0, sizeof(LDKScorer)); return res; }
+       ~Scorer() { Scorer_free(self); }
+       Scorer& operator=(Scorer&& o) { Scorer_free(self); self = o.self; memset(&o, 0, sizeof(Scorer)); return *this; }
+       LDKScorer* operator &() { return &self; }
+       LDKScorer* operator ->() { return &self; }
+       const LDKScorer* operator &() const { return &self; }
+       const LDKScorer* operator ->() const { return &self; }
+};
 class DelayedPaymentOutputDescriptor {
 private:
        LDKDelayedPaymentOutputDescriptor self;
@@ -597,6 +1234,154 @@ public:
        LDKBaseSign* operator ->() { return &self; }
        const LDKBaseSign* operator &() const { return &self; }
        const LDKBaseSign* operator ->() const { return &self; }
+       /**
+        *  Gets the per-commitment point for a specific commitment number
+        * 
+        *  Note that the commitment number starts at (1 << 48) - 1 and counts backwards.
+        */
+       inline LDKPublicKey get_per_commitment_point(uint64_t idx);
+       /**
+        *  Gets the commitment secret for a specific commitment number as part of the revocation process
+        * 
+        *  An external signer implementation should error here if the commitment was already signed
+        *  and should refuse to sign it in the future.
+        * 
+        *  May be called more than once for the same index.
+        * 
+        *  Note that the commitment number starts at (1 << 48) - 1 and counts backwards.
+        */
+       inline LDKThirtyTwoBytes release_commitment_secret(uint64_t idx);
+       /**
+        *  Validate the counterparty's signatures on the holder commitment transaction and HTLCs.
+        * 
+        *  This is required in order for the signer to make sure that releasing a commitment
+        *  secret won't leave us without a broadcastable holder transaction.
+        *  Policy checks should be implemented in this function, including checking the amount
+        *  sent to us and checking the HTLCs.
+        */
+       inline LDK::CResult_NoneNoneZ validate_holder_commitment(const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx);
+       /**
+        *  Gets an arbitrary identifier describing the set of keys which are provided back to you in
+        *  some SpendableOutputDescriptor types. This should be sufficient to identify this
+        *  Sign object uniquely and lookup or re-derive its keys.
+        */
+       inline LDKThirtyTwoBytes channel_keys_id();
+       /**
+        *  Create a signature for a counterparty's commitment transaction and associated HTLC transactions.
+        * 
+        *  Note that if signing fails or is rejected, the channel will be force-closed.
+        * 
+        *  Policy checks should be implemented in this function, including checking the amount
+        *  sent to us and checking the HTLCs.
+        */
+       inline LDK::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment(const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx);
+       /**
+        *  Validate the counterparty's revocation.
+        * 
+        *  This is required in order for the signer to make sure that the state has moved
+        *  forward and it is safe to sign the next counterparty commitment.
+        */
+       inline LDK::CResult_NoneNoneZ validate_counterparty_revocation(uint64_t idx, const uint8_t (*secret)[32]);
+       /**
+        *  Create a signatures for a holder's commitment transaction and its claiming HTLC transactions.
+        *  This will only ever be called with a non-revoked commitment_tx.  This will be called with the
+        *  latest commitment_tx when we initiate a force-close.
+        *  This will be called with the previous latest, just to get claiming HTLC signatures, if we are
+        *  reacting to a ChannelMonitor replica that decided to broadcast before it had been updated to
+        *  the latest.
+        *  This may be called multiple times for the same transaction.
+        * 
+        *  An external signer implementation should check that the commitment has not been revoked.
+        * 
+        *  May return Err if key derivation fails.  Callers, such as ChannelMonitor, will panic in such a case.
+        */
+       inline LDK::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs(const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx);
+       /**
+        *  Create a signature for the given input in a transaction spending an HTLC transaction output
+        *  or a commitment transaction `to_local` output when our counterparty broadcasts an old state.
+        * 
+        *  A justice transaction may claim multiple outputs at the same time if timelocks are
+        *  similar, but only a signature for the input at index `input` should be signed for here.
+        *  It may be called multiple times for same output(s) if a fee-bump is needed with regards
+        *  to an upcoming timelock expiration.
+        * 
+        *  Amount is value of the output spent by this input, committed to in the BIP 143 signature.
+        * 
+        *  per_commitment_key is revocation secret which was provided by our counterparty when they
+        *  revoked the state which they eventually broadcast. It's not a _holder_ secret key and does
+        *  not allow the spending of any funds by itself (you need our holder revocation_secret to do
+        *  so).
+        */
+       inline LDK::CResult_SignatureNoneZ sign_justice_revoked_output(struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]);
+       /**
+        *  Create a signature for the given input in a transaction spending a commitment transaction
+        *  HTLC output when our counterparty broadcasts an old state.
+        * 
+        *  A justice transaction may claim multiple outputs at the same time if timelocks are
+        *  similar, but only a signature for the input at index `input` should be signed for here.
+        *  It may be called multiple times for same output(s) if a fee-bump is needed with regards
+        *  to an upcoming timelock expiration.
+        * 
+        *  Amount is value of the output spent by this input, committed to in the BIP 143 signature.
+        * 
+        *  per_commitment_key is revocation secret which was provided by our counterparty when they
+        *  revoked the state which they eventually broadcast. It's not a _holder_ secret key and does
+        *  not allow the spending of any funds by itself (you need our holder revocation_secret to do
+        *  so).
+        * 
+        *  htlc holds HTLC elements (hash, timelock), thus changing the format of the witness script
+        *  (which is committed to in the BIP 143 signatures).
+        */
+       inline LDK::CResult_SignatureNoneZ sign_justice_revoked_htlc(struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc);
+       /**
+        *  Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment
+        *  transaction, either offered or received.
+        * 
+        *  Such a transaction may claim multiples offered outputs at same time if we know the
+        *  preimage for each when we create it, but only the input at index `input` should be
+        *  signed for here. It may be called multiple times for same output(s) if a fee-bump is
+        *  needed with regards to an upcoming timelock expiration.
+        * 
+        *  Witness_script is either a offered or received script as defined in BOLT3 for HTLC
+        *  outputs.
+        * 
+        *  Amount is value of the output spent by this input, committed to in the BIP 143 signature.
+        * 
+        *  Per_commitment_point is the dynamic point corresponding to the channel state
+        *  detected onchain. It has been generated by our counterparty and is used to derive
+        *  channel state keys, which are then included in the witness script and committed to in the
+        *  BIP 143 signature.
+        */
+       inline LDK::CResult_SignatureNoneZ sign_counterparty_htlc_transaction(struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc);
+       /**
+        *  Create a signature for a (proposed) closing transaction.
+        * 
+        *  Note that, due to rounding, there may be one "missing" satoshi, and either party may have
+        *  chosen to forgo their output as dust.
+        */
+       inline LDK::CResult_SignatureNoneZ sign_closing_transaction(const struct LDKClosingTransaction *NONNULL_PTR closing_tx);
+       /**
+        *  Signs a channel announcement message with our funding key, proving it comes from one
+        *  of the channel participants.
+        * 
+        *  Note that if this fails or is rejected, the channel will not be publicly announced and
+        *  our counterparty may (though likely will not) close the channel on us for violating the
+        *  protocol.
+        */
+       inline LDK::CResult_SignatureNoneZ sign_channel_announcement(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg);
+       /**
+        *  Set the counterparty static channel data, including basepoints,
+        *  counterparty_selected/holder_selected_contest_delay and funding outpoint.
+        *  This is done as soon as the funding outpoint is known.  Since these are static channel data,
+        *  they MUST NOT be allowed to change to different values once set.
+        * 
+        *  channel_parameters.is_populated() MUST be true.
+        * 
+        *  We bind holder_selected_contest_delay late here for API convenience.
+        * 
+        *  Will be called before any signatures are applied.
+        */
+       inline void ready_channel(const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters);
 };
 class Sign {
 private:
@@ -627,6 +1412,57 @@ public:
        LDKKeysInterface* operator ->() { return &self; }
        const LDKKeysInterface* operator &() const { return &self; }
        const LDKKeysInterface* operator ->() const { return &self; }
+       /**
+        *  Get node secret key (aka node_id or network_key).
+        * 
+        *  This method must return the same value each time it is called.
+        */
+       inline LDKSecretKey get_node_secret();
+       /**
+        *  Get a script pubkey which we send funds to when claiming on-chain contestable outputs.
+        * 
+        *  This method should return a different value each time it is called, to avoid linking
+        *  on-chain funds across channels as controlled to the same user.
+        */
+       inline LDK::CVec_u8Z get_destination_script();
+       /**
+        *  Get a script pubkey which we will send funds to when closing a channel.
+        * 
+        *  This method should return a different value each time it is called, to avoid linking
+        *  on-chain funds across channels as controlled to the same user.
+        */
+       inline LDK::ShutdownScript get_shutdown_scriptpubkey();
+       /**
+        *  Get a new set of Sign for per-channel secrets. These MUST be unique even if you
+        *  restarted with some stale data!
+        * 
+        *  This method must return a different value each time it is called.
+        */
+       inline LDK::Sign get_channel_signer(bool inbound, uint64_t channel_value_satoshis);
+       /**
+        *  Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting
+        *  onion packets and for temporary channel IDs. There is no requirement that these be
+        *  persisted anywhere, though they must be unique across restarts.
+        * 
+        *  This method must return a different value each time it is called.
+        */
+       inline LDKThirtyTwoBytes get_secure_random_bytes();
+       /**
+        *  Reads a `Signer` for this `KeysInterface` from the given input stream.
+        *  This is only called during deserialization of other objects which contain
+        *  `Sign`-implementing objects (ie `ChannelMonitor`s and `ChannelManager`s).
+        *  The bytes are exactly those which `<Self::Signer as Writeable>::write()` writes, and
+        *  contain no versioning scheme. You may wish to include your own version prefix and ensure
+        *  you've read all of the provided bytes to ensure no corruption occurred.
+        */
+       inline LDK::CResult_SignDecodeErrorZ read_chan_signer(struct LDKu8slice reader);
+       /**
+        *  Sign an invoice's preimage (note that this is the preimage of the invoice, not the HTLC's
+        *  preimage). By parameterizing by the preimage instead of the hash, we allow implementors of
+        *  this trait to parse the invoice and make sure they're signing what they expect, rather than
+        *  blindly signing the hash.
+        */
+       inline LDK::CResult_RecoverableSignatureNoneZ sign_invoice(struct LDKCVec_u8Z invoice_preimage);
 };
 class InMemorySigner {
 private:
@@ -673,6 +1509,21 @@ public:
        const LDKFilesystemPersister* operator &() const { return &self; }
        const LDKFilesystemPersister* operator ->() const { return &self; }
 };
+class PaymentId {
+private:
+       LDKPaymentId self;
+public:
+       PaymentId(const PaymentId&) = delete;
+       PaymentId(PaymentId&& o) : self(o.self) { memset(&o, 0, sizeof(PaymentId)); }
+       PaymentId(LDKPaymentId&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPaymentId)); }
+       operator LDKPaymentId() && { LDKPaymentId res = self; memset(&self, 0, sizeof(LDKPaymentId)); return res; }
+       ~PaymentId() { PaymentId_free(self); }
+       PaymentId& operator=(PaymentId&& o) { PaymentId_free(self); self = o.self; memset(&o, 0, sizeof(PaymentId)); return *this; }
+       LDKPaymentId* operator &() { return &self; }
+       LDKPaymentId* operator ->() { return &self; }
+       const LDKPaymentId* operator &() const { return &self; }
+       const LDKPaymentId* operator ->() const { return &self; }
+};
 class ChannelManager {
 private:
        LDKChannelManager self;
@@ -703,6 +1554,21 @@ public:
        const LDKChainParameters* operator &() const { return &self; }
        const LDKChainParameters* operator ->() const { return &self; }
 };
+class CounterpartyForwardingInfo {
+private:
+       LDKCounterpartyForwardingInfo self;
+public:
+       CounterpartyForwardingInfo(const CounterpartyForwardingInfo&) = delete;
+       CounterpartyForwardingInfo(CounterpartyForwardingInfo&& o) : self(o.self) { memset(&o, 0, sizeof(CounterpartyForwardingInfo)); }
+       CounterpartyForwardingInfo(LDKCounterpartyForwardingInfo&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCounterpartyForwardingInfo)); }
+       operator LDKCounterpartyForwardingInfo() && { LDKCounterpartyForwardingInfo res = self; memset(&self, 0, sizeof(LDKCounterpartyForwardingInfo)); return res; }
+       ~CounterpartyForwardingInfo() { CounterpartyForwardingInfo_free(self); }
+       CounterpartyForwardingInfo& operator=(CounterpartyForwardingInfo&& o) { CounterpartyForwardingInfo_free(self); self = o.self; memset(&o, 0, sizeof(CounterpartyForwardingInfo)); return *this; }
+       LDKCounterpartyForwardingInfo* operator &() { return &self; }
+       LDKCounterpartyForwardingInfo* operator ->() { return &self; }
+       const LDKCounterpartyForwardingInfo* operator &() const { return &self; }
+       const LDKCounterpartyForwardingInfo* operator ->() const { return &self; }
+};
 class ChannelCounterparty {
 private:
        LDKChannelCounterparty self;
@@ -853,6 +1719,51 @@ public:
        const LDKOutPoint* operator &() const { return &self; }
        const LDKOutPoint* operator ->() const { return &self; }
 };
+class CustomMessageReader {
+private:
+       LDKCustomMessageReader self;
+public:
+       CustomMessageReader(const CustomMessageReader&) = delete;
+       CustomMessageReader(CustomMessageReader&& o) : self(o.self) { memset(&o, 0, sizeof(CustomMessageReader)); }
+       CustomMessageReader(LDKCustomMessageReader&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCustomMessageReader)); }
+       operator LDKCustomMessageReader() && { LDKCustomMessageReader res = self; memset(&self, 0, sizeof(LDKCustomMessageReader)); return res; }
+       ~CustomMessageReader() { CustomMessageReader_free(self); }
+       CustomMessageReader& operator=(CustomMessageReader&& o) { CustomMessageReader_free(self); self = o.self; memset(&o, 0, sizeof(CustomMessageReader)); return *this; }
+       LDKCustomMessageReader* operator &() { return &self; }
+       LDKCustomMessageReader* operator ->() { return &self; }
+       const LDKCustomMessageReader* operator &() const { return &self; }
+       const LDKCustomMessageReader* operator ->() const { return &self; }
+       /**
+        *  Decodes a custom message to `CustomMessageType`. If the given message type is known to the
+        *  implementation and the message could be decoded, must return `Ok(Some(message))`. If the
+        *  message type is unknown to the implementation, must return `Ok(None)`. If a decoding error
+        *  occur, must return `Err(DecodeError::X)` where `X` details the encountered error.
+        */
+       inline LDK::CResult_COption_TypeZDecodeErrorZ read(uint16_t message_type, struct LDKu8slice buffer);
+};
+class Type {
+private:
+       LDKType self;
+public:
+       Type(const Type&) = delete;
+       Type(Type&& o) : self(o.self) { memset(&o, 0, sizeof(Type)); }
+       Type(LDKType&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKType)); }
+       operator LDKType() && { LDKType res = self; memset(&self, 0, sizeof(LDKType)); return res; }
+       ~Type() { Type_free(self); }
+       Type& operator=(Type&& o) { Type_free(self); self = o.self; memset(&o, 0, sizeof(Type)); return *this; }
+       LDKType* operator &() { return &self; }
+       LDKType* operator ->() { return &self; }
+       const LDKType* operator &() const { return &self; }
+       const LDKType* operator ->() const { return &self; }
+       /**
+        *  Returns the type identifying the message payload.
+        */
+       inline uint16_t type_id();
+       /**
+        * Return a human-readable "debug" string describing this object
+        */
+       inline LDK::Str debug_str();
+};
 class Invoice {
 private:
        LDKInvoice self;
@@ -1134,20 +2045,6 @@ public:
        const LDKChannelMonitorUpdate* operator &() const { return &self; }
        const LDKChannelMonitorUpdate* operator ->() const { return &self; }
 };
-class ChannelMonitorUpdateErr {
-private:
-       LDKChannelMonitorUpdateErr self;
-public:
-       ChannelMonitorUpdateErr(const ChannelMonitorUpdateErr&) = delete;
-       ChannelMonitorUpdateErr(ChannelMonitorUpdateErr&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelMonitorUpdateErr)); }
-       ChannelMonitorUpdateErr(LDKChannelMonitorUpdateErr&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelMonitorUpdateErr)); }
-       operator LDKChannelMonitorUpdateErr() && { LDKChannelMonitorUpdateErr res = self; memset(&self, 0, sizeof(LDKChannelMonitorUpdateErr)); return res; }
-       ChannelMonitorUpdateErr& operator=(ChannelMonitorUpdateErr&& o) { self = o.self; memset(&o, 0, sizeof(ChannelMonitorUpdateErr)); return *this; }
-       LDKChannelMonitorUpdateErr* operator &() { return &self; }
-       LDKChannelMonitorUpdateErr* operator ->() { return &self; }
-       const LDKChannelMonitorUpdateErr* operator &() const { return &self; }
-       const LDKChannelMonitorUpdateErr* operator ->() const { return &self; }
-};
 class MonitorUpdateError {
 private:
        LDKMonitorUpdateError self;
@@ -1193,6 +2090,21 @@ public:
        const LDKHTLCUpdate* operator &() const { return &self; }
        const LDKHTLCUpdate* operator ->() const { return &self; }
 };
+class Balance {
+private:
+       LDKBalance self;
+public:
+       Balance(const Balance&) = delete;
+       Balance(Balance&& o) : self(o.self) { memset(&o, 0, sizeof(Balance)); }
+       Balance(LDKBalance&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKBalance)); }
+       operator LDKBalance() && { LDKBalance res = self; memset(&self, 0, sizeof(LDKBalance)); return res; }
+       ~Balance() { Balance_free(self); }
+       Balance& operator=(Balance&& o) { Balance_free(self); self = o.self; memset(&o, 0, sizeof(Balance)); return *this; }
+       LDKBalance* operator &() { return &self; }
+       LDKBalance* operator ->() { return &self; }
+       const LDKBalance* operator &() const { return &self; }
+       const LDKBalance* operator ->() const { return &self; }
+};
 class ChannelMonitor {
 private:
        LDKChannelMonitor self;
@@ -1208,20 +2120,32 @@ public:
        const LDKChannelMonitor* operator &() const { return &self; }
        const LDKChannelMonitor* operator ->() const { return &self; }
 };
-class Persist {
-private:
-       LDKPersist self;
-public:
-       Persist(const Persist&) = delete;
-       Persist(Persist&& o) : self(o.self) { memset(&o, 0, sizeof(Persist)); }
-       Persist(LDKPersist&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPersist)); }
-       operator LDKPersist() && { LDKPersist res = self; memset(&self, 0, sizeof(LDKPersist)); return res; }
-       ~Persist() { Persist_free(self); }
-       Persist& operator=(Persist&& o) { Persist_free(self); self = o.self; memset(&o, 0, sizeof(Persist)); return *this; }
-       LDKPersist* operator &() { return &self; }
-       LDKPersist* operator ->() { return &self; }
-       const LDKPersist* operator &() const { return &self; }
-       const LDKPersist* operator ->() const { return &self; }
+class CustomMessageHandler {
+private:
+       LDKCustomMessageHandler self;
+public:
+       CustomMessageHandler(const CustomMessageHandler&) = delete;
+       CustomMessageHandler(CustomMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(CustomMessageHandler)); }
+       CustomMessageHandler(LDKCustomMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCustomMessageHandler)); }
+       operator LDKCustomMessageHandler() && { LDKCustomMessageHandler res = self; memset(&self, 0, sizeof(LDKCustomMessageHandler)); return res; }
+       ~CustomMessageHandler() { CustomMessageHandler_free(self); }
+       CustomMessageHandler& operator=(CustomMessageHandler&& o) { CustomMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(CustomMessageHandler)); return *this; }
+       LDKCustomMessageHandler* operator &() { return &self; }
+       LDKCustomMessageHandler* operator ->() { return &self; }
+       const LDKCustomMessageHandler* operator &() const { return &self; }
+       const LDKCustomMessageHandler* operator ->() const { return &self; }
+       /**
+        *  Called with the message type that was received and the buffer to be read.
+        *  Can return a `MessageHandlingError` if the message could not be handled.
+        */
+       inline LDK::CResult_NoneLightningErrorZ handle_custom_message(struct LDKType msg, struct LDKPublicKey sender_node_id);
+       /**
+        *  Gets the list of pending messages which were generated by the custom message
+        *  handler, clearing the list in the process. The first tuple element must
+        *  correspond to the intended recipients node ids. If no connection to one of the
+        *  specified node does not exist, the message is simply not sent to it.
+        */
+       inline LDK::CVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg();
 };
 class IgnoringMessageHandler {
 private:
@@ -1282,6 +2206,40 @@ public:
        LDKSocketDescriptor* operator ->() { return &self; }
        const LDKSocketDescriptor* operator &() const { return &self; }
        const LDKSocketDescriptor* operator ->() const { return &self; }
+       /**
+        *  Attempts to send some data from the given slice to the peer.
+        * 
+        *  Returns the amount of data which was sent, possibly 0 if the socket has since disconnected.
+        *  Note that in the disconnected case, [`PeerManager::socket_disconnected`] must still be
+        *  called and further write attempts may occur until that time.
+        * 
+        *  If the returned size is smaller than `data.len()`, a
+        *  [`PeerManager::write_buffer_space_avail`] call must be made the next time more data can be
+        *  written. Additionally, until a `send_data` event completes fully, no further
+        *  [`PeerManager::read_event`] calls should be made for the same peer! Because this is to
+        *  prevent denial-of-service issues, you should not read or buffer any data from the socket
+        *  until then.
+        * 
+        *  If a [`PeerManager::read_event`] call on this descriptor had previously returned true
+        *  (indicating that read events should be paused to prevent DoS in the send buffer),
+        *  `resume_read` may be set indicating that read events on this descriptor should resume. A
+        *  `resume_read` of false carries no meaning, and should not cause any action.
+        */
+       inline uintptr_t send_data(struct LDKu8slice data, bool resume_read);
+       /**
+        *  Disconnect the socket pointed to by this SocketDescriptor.
+        * 
+        *  You do *not* need to call [`PeerManager::socket_disconnected`] with this socket after this
+        *  call (doing so is a noop).
+        */
+       inline void disconnect_socket();
+       /** Checks if two objects are equal given this object's this_arg pointer and another object. */
+       inline bool eq(const struct LDKSocketDescriptor *NONNULL_PTR other_arg);
+       /**
+        * Calculate a succinct non-cryptographic hash for an object given its this_arg pointer.
+        * This is used, for example, for inclusion of this object in a hash map.
+        */
+       inline uint64_t hash();
 };
 class PeerHandleError {
 private:
@@ -1313,6 +2271,21 @@ public:
        const LDKPeerManager* operator &() const { return &self; }
        const LDKPeerManager* operator ->() const { return &self; }
 };
+class NodeId {
+private:
+       LDKNodeId self;
+public:
+       NodeId(const NodeId&) = delete;
+       NodeId(NodeId&& o) : self(o.self) { memset(&o, 0, sizeof(NodeId)); }
+       NodeId(LDKNodeId&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKNodeId)); }
+       operator LDKNodeId() && { LDKNodeId res = self; memset(&self, 0, sizeof(LDKNodeId)); return res; }
+       ~NodeId() { NodeId_free(self); }
+       NodeId& operator=(NodeId&& o) { NodeId_free(self); self = o.self; memset(&o, 0, sizeof(NodeId)); return *this; }
+       LDKNodeId* operator &() { return &self; }
+       LDKNodeId* operator ->() { return &self; }
+       const LDKNodeId* operator &() const { return &self; }
+       const LDKNodeId* operator ->() const { return &self; }
+};
 class NetworkGraph {
 private:
        LDKNetworkGraph self;
@@ -1328,20 +2301,35 @@ public:
        const LDKNetworkGraph* operator &() const { return &self; }
        const LDKNetworkGraph* operator ->() const { return &self; }
 };
-class LockedNetworkGraph {
+class ReadOnlyNetworkGraph {
+private:
+       LDKReadOnlyNetworkGraph self;
+public:
+       ReadOnlyNetworkGraph(const ReadOnlyNetworkGraph&) = delete;
+       ReadOnlyNetworkGraph(ReadOnlyNetworkGraph&& o) : self(o.self) { memset(&o, 0, sizeof(ReadOnlyNetworkGraph)); }
+       ReadOnlyNetworkGraph(LDKReadOnlyNetworkGraph&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKReadOnlyNetworkGraph)); }
+       operator LDKReadOnlyNetworkGraph() && { LDKReadOnlyNetworkGraph res = self; memset(&self, 0, sizeof(LDKReadOnlyNetworkGraph)); return res; }
+       ~ReadOnlyNetworkGraph() { ReadOnlyNetworkGraph_free(self); }
+       ReadOnlyNetworkGraph& operator=(ReadOnlyNetworkGraph&& o) { ReadOnlyNetworkGraph_free(self); self = o.self; memset(&o, 0, sizeof(ReadOnlyNetworkGraph)); return *this; }
+       LDKReadOnlyNetworkGraph* operator &() { return &self; }
+       LDKReadOnlyNetworkGraph* operator ->() { return &self; }
+       const LDKReadOnlyNetworkGraph* operator &() const { return &self; }
+       const LDKReadOnlyNetworkGraph* operator ->() const { return &self; }
+};
+class NetworkUpdate {
 private:
-       LDKLockedNetworkGraph self;
+       LDKNetworkUpdate self;
 public:
-       LockedNetworkGraph(const LockedNetworkGraph&) = delete;
-       LockedNetworkGraph(LockedNetworkGraph&& o) : self(o.self) { memset(&o, 0, sizeof(LockedNetworkGraph)); }
-       LockedNetworkGraph(LDKLockedNetworkGraph&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKLockedNetworkGraph)); }
-       operator LDKLockedNetworkGraph() && { LDKLockedNetworkGraph res = self; memset(&self, 0, sizeof(LDKLockedNetworkGraph)); return res; }
-       ~LockedNetworkGraph() { LockedNetworkGraph_free(self); }
-       LockedNetworkGraph& operator=(LockedNetworkGraph&& o) { LockedNetworkGraph_free(self); self = o.self; memset(&o, 0, sizeof(LockedNetworkGraph)); return *this; }
-       LDKLockedNetworkGraph* operator &() { return &self; }
-       LDKLockedNetworkGraph* operator ->() { return &self; }
-       const LDKLockedNetworkGraph* operator &() const { return &self; }
-       const LDKLockedNetworkGraph* operator ->() const { return &self; }
+       NetworkUpdate(const NetworkUpdate&) = delete;
+       NetworkUpdate(NetworkUpdate&& o) : self(o.self) { memset(&o, 0, sizeof(NetworkUpdate)); }
+       NetworkUpdate(LDKNetworkUpdate&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKNetworkUpdate)); }
+       operator LDKNetworkUpdate() && { LDKNetworkUpdate res = self; memset(&self, 0, sizeof(LDKNetworkUpdate)); return res; }
+       ~NetworkUpdate() { NetworkUpdate_free(self); }
+       NetworkUpdate& operator=(NetworkUpdate&& o) { NetworkUpdate_free(self); self = o.self; memset(&o, 0, sizeof(NetworkUpdate)); return *this; }
+       LDKNetworkUpdate* operator &() { return &self; }
+       LDKNetworkUpdate* operator ->() { return &self; }
+       const LDKNetworkUpdate* operator &() const { return &self; }
+       const LDKNetworkUpdate* operator ->() const { return &self; }
 };
 class NetGraphMsgHandler {
 private:
@@ -1598,6 +2586,21 @@ public:
        const LDKShutdown* operator &() const { return &self; }
        const LDKShutdown* operator ->() const { return &self; }
 };
+class ClosingSignedFeeRange {
+private:
+       LDKClosingSignedFeeRange self;
+public:
+       ClosingSignedFeeRange(const ClosingSignedFeeRange&) = delete;
+       ClosingSignedFeeRange(ClosingSignedFeeRange&& o) : self(o.self) { memset(&o, 0, sizeof(ClosingSignedFeeRange)); }
+       ClosingSignedFeeRange(LDKClosingSignedFeeRange&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKClosingSignedFeeRange)); }
+       operator LDKClosingSignedFeeRange() && { LDKClosingSignedFeeRange res = self; memset(&self, 0, sizeof(LDKClosingSignedFeeRange)); return res; }
+       ~ClosingSignedFeeRange() { ClosingSignedFeeRange_free(self); }
+       ClosingSignedFeeRange& operator=(ClosingSignedFeeRange&& o) { ClosingSignedFeeRange_free(self); self = o.self; memset(&o, 0, sizeof(ClosingSignedFeeRange)); return *this; }
+       LDKClosingSignedFeeRange* operator &() { return &self; }
+       LDKClosingSignedFeeRange* operator ->() { return &self; }
+       const LDKClosingSignedFeeRange* operator &() const { return &self; }
+       const LDKClosingSignedFeeRange* operator ->() const { return &self; }
+};
 class ClosingSigned {
 private:
        LDKClosingSigned self;
@@ -1988,21 +2991,6 @@ public:
        const LDKCommitmentUpdate* operator &() const { return &self; }
        const LDKCommitmentUpdate* operator ->() const { return &self; }
 };
-class HTLCFailChannelUpdate {
-private:
-       LDKHTLCFailChannelUpdate self;
-public:
-       HTLCFailChannelUpdate(const HTLCFailChannelUpdate&) = delete;
-       HTLCFailChannelUpdate(HTLCFailChannelUpdate&& o) : self(o.self) { memset(&o, 0, sizeof(HTLCFailChannelUpdate)); }
-       HTLCFailChannelUpdate(LDKHTLCFailChannelUpdate&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKHTLCFailChannelUpdate)); }
-       operator LDKHTLCFailChannelUpdate() && { LDKHTLCFailChannelUpdate res = self; memset(&self, 0, sizeof(LDKHTLCFailChannelUpdate)); return res; }
-       ~HTLCFailChannelUpdate() { HTLCFailChannelUpdate_free(self); }
-       HTLCFailChannelUpdate& operator=(HTLCFailChannelUpdate&& o) { HTLCFailChannelUpdate_free(self); self = o.self; memset(&o, 0, sizeof(HTLCFailChannelUpdate)); return *this; }
-       LDKHTLCFailChannelUpdate* operator &() { return &self; }
-       LDKHTLCFailChannelUpdate* operator ->() { return &self; }
-       const LDKHTLCFailChannelUpdate* operator &() const { return &self; }
-       const LDKHTLCFailChannelUpdate* operator ->() const { return &self; }
-};
 class ChannelMessageHandler {
 private:
        LDKChannelMessageHandler self;
@@ -2017,6 +3005,89 @@ public:
        LDKChannelMessageHandler* operator ->() { return &self; }
        const LDKChannelMessageHandler* operator &() const { return &self; }
        const LDKChannelMessageHandler* operator ->() const { return &self; }
+       /**
+        *  Handle an incoming open_channel message from the given peer.
+        */
+       inline void handle_open_channel(struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming accept_channel message from the given peer.
+        */
+       inline void handle_accept_channel(struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming funding_created message from the given peer.
+        */
+       inline void handle_funding_created(struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming funding_signed message from the given peer.
+        */
+       inline void handle_funding_signed(struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming funding_locked message from the given peer.
+        */
+       inline void handle_funding_locked(struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming shutdown message from the given peer.
+        */
+       inline void handle_shutdown(struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming closing_signed message from the given peer.
+        */
+       inline void handle_closing_signed(struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming update_add_htlc message from the given peer.
+        */
+       inline void handle_update_add_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming update_fulfill_htlc message from the given peer.
+        */
+       inline void handle_update_fulfill_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming update_fail_htlc message from the given peer.
+        */
+       inline void handle_update_fail_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming update_fail_malformed_htlc message from the given peer.
+        */
+       inline void handle_update_fail_malformed_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming commitment_signed message from the given peer.
+        */
+       inline void handle_commitment_signed(struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming revoke_and_ack message from the given peer.
+        */
+       inline void handle_revoke_and_ack(struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming update_fee message from the given peer.
+        */
+       inline void handle_update_fee(struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming announcement_signatures message from the given peer.
+        */
+       inline void handle_announcement_signatures(struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg);
+       /**
+        *  Indicates a connection to the peer failed/an existing connection was lost. If no connection
+        *  is believed to be possible in the future (eg they're sending us messages we don't
+        *  understand or indicate they require unknown feature bits), no_connection_possible is set
+        *  and any outstanding channels should be failed.
+        */
+       inline void peer_disconnected(struct LDKPublicKey their_node_id, bool no_connection_possible);
+       /**
+        *  Handle a peer reconnecting, possibly generating channel_reestablish message(s).
+        */
+       inline void peer_connected(struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming channel_reestablish message from the given peer.
+        */
+       inline void handle_channel_reestablish(struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming channel update from the given peer.
+        */
+       inline void handle_channel_update(struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming error message from the given peer.
+        */
+       inline void handle_error(struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg);
 };
 class RoutingMessageHandler {
 private:
@@ -2032,6 +3103,65 @@ public:
        LDKRoutingMessageHandler* operator ->() { return &self; }
        const LDKRoutingMessageHandler* operator &() const { return &self; }
        const LDKRoutingMessageHandler* operator ->() const { return &self; }
+       /**
+        *  Handle an incoming node_announcement message, returning true if it should be forwarded on,
+        *  false or returning an Err otherwise.
+        */
+       inline LDK::CResult_boolLightningErrorZ handle_node_announcement(const struct LDKNodeAnnouncement *NONNULL_PTR msg);
+       /**
+        *  Handle a channel_announcement message, returning true if it should be forwarded on, false
+        *  or returning an Err otherwise.
+        */
+       inline LDK::CResult_boolLightningErrorZ handle_channel_announcement(const struct LDKChannelAnnouncement *NONNULL_PTR msg);
+       /**
+        *  Handle an incoming channel_update message, returning true if it should be forwarded on,
+        *  false or returning an Err otherwise.
+        */
+       inline LDK::CResult_boolLightningErrorZ handle_channel_update(const struct LDKChannelUpdate *NONNULL_PTR msg);
+       /**
+        *  Gets a subset of the channel announcements and updates required to dump our routing table
+        *  to a remote node, starting at the short_channel_id indicated by starting_point and
+        *  including the batch_amount entries immediately higher in numerical value than starting_point.
+        */
+       inline LDK::CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements(uint64_t starting_point, uint8_t batch_amount);
+       /**
+        *  Gets a subset of the node announcements required to dump our routing table to a remote node,
+        *  starting at the node *after* the provided publickey and including batch_amount entries
+        *  immediately higher (as defined by <PublicKey as Ord>::cmp) than starting_point.
+        *  If None is provided for starting_point, we start at the first node.
+        * 
+        *  Note that starting_point (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       inline LDK::CVec_NodeAnnouncementZ get_next_node_announcements(struct LDKPublicKey starting_point, uint8_t batch_amount);
+       /**
+        *  Called when a connection is established with a peer. This can be used to
+        *  perform routing table synchronization using a strategy defined by the
+        *  implementor.
+        */
+       inline void sync_routing_table(struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init);
+       /**
+        *  Handles the reply of a query we initiated to learn about channels
+        *  for a given range of blocks. We can expect to receive one or more
+        *  replies to a single query.
+        */
+       inline LDK::CResult_NoneLightningErrorZ handle_reply_channel_range(struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg);
+       /**
+        *  Handles the reply of a query we initiated asking for routing gossip
+        *  messages for a list of channels. We should receive this message when
+        *  a node has completed its best effort to send us the pertaining routing
+        *  gossip messages.
+        */
+       inline LDK::CResult_NoneLightningErrorZ handle_reply_short_channel_ids_end(struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg);
+       /**
+        *  Handles when a peer asks us to send a list of short_channel_ids
+        *  for the requested range of blocks.
+        */
+       inline LDK::CResult_NoneLightningErrorZ handle_query_channel_range(struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg);
+       /**
+        *  Handles when a peer asks us to send routing gossip messages for a
+        *  list of short_channel_ids.
+        */
+       inline LDK::CResult_NoneLightningErrorZ handle_query_short_channel_ids(struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg);
 };
 class Level {
 private:
@@ -2061,6 +3191,80 @@ public:
        LDKLogger* operator ->() { return &self; }
        const LDKLogger* operator &() const { return &self; }
        const LDKLogger* operator ->() const { return &self; }
+       /**
+        *  Logs the `Record`
+        */
+       inline void log(const char *record);
+};
+class Persist {
+private:
+       LDKPersist self;
+public:
+       Persist(const Persist&) = delete;
+       Persist(Persist&& o) : self(o.self) { memset(&o, 0, sizeof(Persist)); }
+       Persist(LDKPersist&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPersist)); }
+       operator LDKPersist() && { LDKPersist res = self; memset(&self, 0, sizeof(LDKPersist)); return res; }
+       ~Persist() { Persist_free(self); }
+       Persist& operator=(Persist&& o) { Persist_free(self); self = o.self; memset(&o, 0, sizeof(Persist)); return *this; }
+       LDKPersist* operator &() { return &self; }
+       LDKPersist* operator ->() { return &self; }
+       const LDKPersist* operator &() const { return &self; }
+       const LDKPersist* operator ->() const { return &self; }
+       /**
+        *  Persist a new channel's data. The data can be stored any way you want, but
+        *  the identifier provided by Rust-Lightning is the channel's outpoint (and
+        *  it is up to you to maintain a correct mapping between the outpoint and the
+        *  stored channel data). Note that you **must** persist every new monitor to
+        *  disk. See the `Persist` trait documentation for more details.
+        * 
+        *  See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`
+        *  and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+        * 
+        *  [`Writeable::write`]: crate::util::ser::Writeable::write
+        */
+       inline LDK::CResult_NoneChannelMonitorUpdateErrZ persist_new_channel(struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data);
+       /**
+        *  Update one channel's data. The provided `ChannelMonitor` has already
+        *  applied the given update.
+        * 
+        *  Note that on every update, you **must** persist either the
+        *  `ChannelMonitorUpdate` or the updated monitor itself to disk/backups. See
+        *  the `Persist` trait documentation for more details.
+        * 
+        *  If an implementer chooses to persist the updates only, they need to make
+        *  sure that all the updates are applied to the `ChannelMonitors` *before*
+        *  the set of channel monitors is given to the `ChannelManager`
+        *  deserialization routine. See [`ChannelMonitor::update_monitor`] for
+        *  applying a monitor update to a monitor. If full `ChannelMonitors` are
+        *  persisted, then there is no need to persist individual updates.
+        * 
+        *  Note that there could be a performance tradeoff between persisting complete
+        *  channel monitors on every update vs. persisting only updates and applying
+        *  them in batches. The size of each monitor grows `O(number of state updates)`
+        *  whereas updates are small and `O(1)`.
+        * 
+        *  See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`,
+        *  [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and
+        *  [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+        * 
+        *  [`Writeable::write`]: crate::util::ser::Writeable::write
+        */
+       inline LDK::CResult_NoneChannelMonitorUpdateErrZ update_persisted_channel(struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data);
+};
+class LockedChannelMonitor {
+private:
+       LDKLockedChannelMonitor self;
+public:
+       LockedChannelMonitor(const LockedChannelMonitor&) = delete;
+       LockedChannelMonitor(LockedChannelMonitor&& o) : self(o.self) { memset(&o, 0, sizeof(LockedChannelMonitor)); }
+       LockedChannelMonitor(LDKLockedChannelMonitor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKLockedChannelMonitor)); }
+       operator LDKLockedChannelMonitor() && { LDKLockedChannelMonitor res = self; memset(&self, 0, sizeof(LDKLockedChannelMonitor)); return res; }
+       ~LockedChannelMonitor() { LockedChannelMonitor_free(self); }
+       LockedChannelMonitor& operator=(LockedChannelMonitor&& o) { LockedChannelMonitor_free(self); self = o.self; memset(&o, 0, sizeof(LockedChannelMonitor)); return *this; }
+       LDKLockedChannelMonitor* operator &() { return &self; }
+       LDKLockedChannelMonitor* operator ->() { return &self; }
+       const LDKLockedChannelMonitor* operator &() const { return &self; }
+       const LDKLockedChannelMonitor* operator ->() const { return &self; }
 };
 class ChainMonitor {
 private:
@@ -2092,6 +3296,21 @@ public:
        const LDKCVec_SpendableOutputDescriptorZ* operator &() const { return &self; }
        const LDKCVec_SpendableOutputDescriptorZ* operator ->() const { return &self; }
 };
+class CResult_LockedChannelMonitorNoneZ {
+private:
+       LDKCResult_LockedChannelMonitorNoneZ self;
+public:
+       CResult_LockedChannelMonitorNoneZ(const CResult_LockedChannelMonitorNoneZ&) = delete;
+       CResult_LockedChannelMonitorNoneZ(CResult_LockedChannelMonitorNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_LockedChannelMonitorNoneZ)); }
+       CResult_LockedChannelMonitorNoneZ(LDKCResult_LockedChannelMonitorNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_LockedChannelMonitorNoneZ)); }
+       operator LDKCResult_LockedChannelMonitorNoneZ() && { LDKCResult_LockedChannelMonitorNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_LockedChannelMonitorNoneZ)); return res; }
+       ~CResult_LockedChannelMonitorNoneZ() { CResult_LockedChannelMonitorNoneZ_free(self); }
+       CResult_LockedChannelMonitorNoneZ& operator=(CResult_LockedChannelMonitorNoneZ&& o) { CResult_LockedChannelMonitorNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_LockedChannelMonitorNoneZ)); return *this; }
+       LDKCResult_LockedChannelMonitorNoneZ* operator &() { return &self; }
+       LDKCResult_LockedChannelMonitorNoneZ* operator ->() { return &self; }
+       const LDKCResult_LockedChannelMonitorNoneZ* operator &() const { return &self; }
+       const LDKCResult_LockedChannelMonitorNoneZ* operator ->() const { return &self; }
+};
 class CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ {
 private:
        LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ self;
@@ -2212,6 +3431,21 @@ public:
        const LDKCResult_ChannelAnnouncementDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_ChannelAnnouncementDecodeErrorZ* operator ->() const { return &self; }
 };
+class CVec_OutPointZ {
+private:
+       LDKCVec_OutPointZ self;
+public:
+       CVec_OutPointZ(const CVec_OutPointZ&) = delete;
+       CVec_OutPointZ(CVec_OutPointZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_OutPointZ)); }
+       CVec_OutPointZ(LDKCVec_OutPointZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_OutPointZ)); }
+       operator LDKCVec_OutPointZ() && { LDKCVec_OutPointZ res = self; memset(&self, 0, sizeof(LDKCVec_OutPointZ)); return res; }
+       ~CVec_OutPointZ() { CVec_OutPointZ_free(self); }
+       CVec_OutPointZ& operator=(CVec_OutPointZ&& o) { CVec_OutPointZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_OutPointZ)); return *this; }
+       LDKCVec_OutPointZ* operator &() { return &self; }
+       LDKCVec_OutPointZ* operator ->() { return &self; }
+       const LDKCVec_OutPointZ* operator &() const { return &self; }
+       const LDKCVec_OutPointZ* operator ->() const { return &self; }
+};
 class CResult_PositiveTimestampCreationErrorZ {
 private:
        LDKCResult_PositiveTimestampCreationErrorZ self;
@@ -2257,20 +3491,20 @@ public:
        const LDKCResult_InvoiceFeaturesDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_InvoiceFeaturesDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_ChannelMonitorUpdateDecodeErrorZ {
+class COption_NetworkUpdateZ {
 private:
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ self;
+       LDKCOption_NetworkUpdateZ self;
 public:
-       CResult_ChannelMonitorUpdateDecodeErrorZ(const CResult_ChannelMonitorUpdateDecodeErrorZ&) = delete;
-       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; }
-       ~CResult_ChannelMonitorUpdateDecodeErrorZ() { CResult_ChannelMonitorUpdateDecodeErrorZ_free(self); }
-       CResult_ChannelMonitorUpdateDecodeErrorZ& operator=(CResult_ChannelMonitorUpdateDecodeErrorZ&& o) { CResult_ChannelMonitorUpdateDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelMonitorUpdateDecodeErrorZ)); return *this; }
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ChannelMonitorUpdateDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ChannelMonitorUpdateDecodeErrorZ* operator ->() const { return &self; }
+       COption_NetworkUpdateZ(const COption_NetworkUpdateZ&) = delete;
+       COption_NetworkUpdateZ(COption_NetworkUpdateZ&& o) : self(o.self) { memset(&o, 0, sizeof(COption_NetworkUpdateZ)); }
+       COption_NetworkUpdateZ(LDKCOption_NetworkUpdateZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCOption_NetworkUpdateZ)); }
+       operator LDKCOption_NetworkUpdateZ() && { LDKCOption_NetworkUpdateZ res = self; memset(&self, 0, sizeof(LDKCOption_NetworkUpdateZ)); return res; }
+       ~COption_NetworkUpdateZ() { COption_NetworkUpdateZ_free(self); }
+       COption_NetworkUpdateZ& operator=(COption_NetworkUpdateZ&& o) { COption_NetworkUpdateZ_free(self); self = o.self; memset(&o, 0, sizeof(COption_NetworkUpdateZ)); return *this; }
+       LDKCOption_NetworkUpdateZ* operator &() { return &self; }
+       LDKCOption_NetworkUpdateZ* operator ->() { return &self; }
+       const LDKCOption_NetworkUpdateZ* operator &() const { return &self; }
+       const LDKCOption_NetworkUpdateZ* operator ->() const { return &self; }
 };
 class COption_u64Z {
 private:
@@ -2302,6 +3536,51 @@ public:
        const LDKCResult_TxOutAccessErrorZ* operator &() const { return &self; }
        const LDKCResult_TxOutAccessErrorZ* operator ->() const { return &self; }
 };
+class CResult_TrustedClosingTransactionNoneZ {
+private:
+       LDKCResult_TrustedClosingTransactionNoneZ self;
+public:
+       CResult_TrustedClosingTransactionNoneZ(const CResult_TrustedClosingTransactionNoneZ&) = delete;
+       CResult_TrustedClosingTransactionNoneZ(CResult_TrustedClosingTransactionNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_TrustedClosingTransactionNoneZ)); }
+       CResult_TrustedClosingTransactionNoneZ(LDKCResult_TrustedClosingTransactionNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_TrustedClosingTransactionNoneZ)); }
+       operator LDKCResult_TrustedClosingTransactionNoneZ() && { LDKCResult_TrustedClosingTransactionNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_TrustedClosingTransactionNoneZ)); return res; }
+       ~CResult_TrustedClosingTransactionNoneZ() { CResult_TrustedClosingTransactionNoneZ_free(self); }
+       CResult_TrustedClosingTransactionNoneZ& operator=(CResult_TrustedClosingTransactionNoneZ&& o) { CResult_TrustedClosingTransactionNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_TrustedClosingTransactionNoneZ)); return *this; }
+       LDKCResult_TrustedClosingTransactionNoneZ* operator &() { return &self; }
+       LDKCResult_TrustedClosingTransactionNoneZ* operator ->() { return &self; }
+       const LDKCResult_TrustedClosingTransactionNoneZ* operator &() const { return &self; }
+       const LDKCResult_TrustedClosingTransactionNoneZ* operator ->() const { return &self; }
+};
+class CResult_ChannelMonitorUpdateDecodeErrorZ {
+private:
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ self;
+public:
+       CResult_ChannelMonitorUpdateDecodeErrorZ(const CResult_ChannelMonitorUpdateDecodeErrorZ&) = delete;
+       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; }
+       ~CResult_ChannelMonitorUpdateDecodeErrorZ() { CResult_ChannelMonitorUpdateDecodeErrorZ_free(self); }
+       CResult_ChannelMonitorUpdateDecodeErrorZ& operator=(CResult_ChannelMonitorUpdateDecodeErrorZ&& o) { CResult_ChannelMonitorUpdateDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelMonitorUpdateDecodeErrorZ)); return *this; }
+       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 C2Tuple_PublicKeyTypeZ {
+private:
+       LDKC2Tuple_PublicKeyTypeZ self;
+public:
+       C2Tuple_PublicKeyTypeZ(const C2Tuple_PublicKeyTypeZ&) = delete;
+       C2Tuple_PublicKeyTypeZ(C2Tuple_PublicKeyTypeZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_PublicKeyTypeZ)); }
+       C2Tuple_PublicKeyTypeZ(LDKC2Tuple_PublicKeyTypeZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_PublicKeyTypeZ)); }
+       operator LDKC2Tuple_PublicKeyTypeZ() && { LDKC2Tuple_PublicKeyTypeZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_PublicKeyTypeZ)); return res; }
+       ~C2Tuple_PublicKeyTypeZ() { C2Tuple_PublicKeyTypeZ_free(self); }
+       C2Tuple_PublicKeyTypeZ& operator=(C2Tuple_PublicKeyTypeZ&& o) { C2Tuple_PublicKeyTypeZ_free(self); self = o.self; memset(&o, 0, sizeof(C2Tuple_PublicKeyTypeZ)); return *this; }
+       LDKC2Tuple_PublicKeyTypeZ* operator &() { return &self; }
+       LDKC2Tuple_PublicKeyTypeZ* operator ->() { return &self; }
+       const LDKC2Tuple_PublicKeyTypeZ* operator &() const { return &self; }
+       const LDKC2Tuple_PublicKeyTypeZ* operator ->() const { return &self; }
+};
 class CResult_NetAddressDecodeErrorZ {
 private:
        LDKCResult_NetAddressDecodeErrorZ self;
@@ -2317,6 +3596,21 @@ public:
        const LDKCResult_NetAddressDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_NetAddressDecodeErrorZ* operator ->() const { return &self; }
 };
+class CResult_ChannelReestablishDecodeErrorZ {
+private:
+       LDKCResult_ChannelReestablishDecodeErrorZ self;
+public:
+       CResult_ChannelReestablishDecodeErrorZ(const CResult_ChannelReestablishDecodeErrorZ&) = delete;
+       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; }
+       ~CResult_ChannelReestablishDecodeErrorZ() { CResult_ChannelReestablishDecodeErrorZ_free(self); }
+       CResult_ChannelReestablishDecodeErrorZ& operator=(CResult_ChannelReestablishDecodeErrorZ&& o) { CResult_ChannelReestablishDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelReestablishDecodeErrorZ)); return *this; }
+       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 CResult_UnsignedNodeAnnouncementDecodeErrorZ {
 private:
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ self;
@@ -2347,51 +3641,6 @@ public:
        const LDKCResult_ReplyChannelRangeDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_ReplyChannelRangeDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_ChannelReestablishDecodeErrorZ {
-private:
-       LDKCResult_ChannelReestablishDecodeErrorZ self;
-public:
-       CResult_ChannelReestablishDecodeErrorZ(const CResult_ChannelReestablishDecodeErrorZ&) = delete;
-       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; }
-       ~CResult_ChannelReestablishDecodeErrorZ() { CResult_ChannelReestablishDecodeErrorZ_free(self); }
-       CResult_ChannelReestablishDecodeErrorZ& operator=(CResult_ChannelReestablishDecodeErrorZ&& o) { CResult_ChannelReestablishDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelReestablishDecodeErrorZ)); return *this; }
-       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 CResult_GossipTimestampFilterDecodeErrorZ {
-private:
-       LDKCResult_GossipTimestampFilterDecodeErrorZ self;
-public:
-       CResult_GossipTimestampFilterDecodeErrorZ(const CResult_GossipTimestampFilterDecodeErrorZ&) = delete;
-       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; }
-       ~CResult_GossipTimestampFilterDecodeErrorZ() { CResult_GossipTimestampFilterDecodeErrorZ_free(self); }
-       CResult_GossipTimestampFilterDecodeErrorZ& operator=(CResult_GossipTimestampFilterDecodeErrorZ&& o) { CResult_GossipTimestampFilterDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_GossipTimestampFilterDecodeErrorZ)); return *this; }
-       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_InvoiceSignOrCreationErrorZ {
-private:
-       LDKCResult_InvoiceSignOrCreationErrorZ self;
-public:
-       CResult_InvoiceSignOrCreationErrorZ(const CResult_InvoiceSignOrCreationErrorZ&) = delete;
-       CResult_InvoiceSignOrCreationErrorZ(CResult_InvoiceSignOrCreationErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_InvoiceSignOrCreationErrorZ)); }
-       CResult_InvoiceSignOrCreationErrorZ(LDKCResult_InvoiceSignOrCreationErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_InvoiceSignOrCreationErrorZ)); }
-       operator LDKCResult_InvoiceSignOrCreationErrorZ() && { LDKCResult_InvoiceSignOrCreationErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_InvoiceSignOrCreationErrorZ)); return res; }
-       ~CResult_InvoiceSignOrCreationErrorZ() { CResult_InvoiceSignOrCreationErrorZ_free(self); }
-       CResult_InvoiceSignOrCreationErrorZ& operator=(CResult_InvoiceSignOrCreationErrorZ&& o) { CResult_InvoiceSignOrCreationErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_InvoiceSignOrCreationErrorZ)); return *this; }
-       LDKCResult_InvoiceSignOrCreationErrorZ* operator &() { return &self; }
-       LDKCResult_InvoiceSignOrCreationErrorZ* operator ->() { return &self; }
-       const LDKCResult_InvoiceSignOrCreationErrorZ* operator &() const { return &self; }
-       const LDKCResult_InvoiceSignOrCreationErrorZ* operator ->() const { return &self; }
-};
 class CResult_CommitmentSignedDecodeErrorZ {
 private:
        LDKCResult_CommitmentSignedDecodeErrorZ self;
@@ -2422,6 +3671,21 @@ public:
        const LDKCVec_UpdateAddHTLCZ* operator &() const { return &self; }
        const LDKCVec_UpdateAddHTLCZ* operator ->() const { return &self; }
 };
+class CResult_GossipTimestampFilterDecodeErrorZ {
+private:
+       LDKCResult_GossipTimestampFilterDecodeErrorZ self;
+public:
+       CResult_GossipTimestampFilterDecodeErrorZ(const CResult_GossipTimestampFilterDecodeErrorZ&) = delete;
+       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; }
+       ~CResult_GossipTimestampFilterDecodeErrorZ() { CResult_GossipTimestampFilterDecodeErrorZ_free(self); }
+       CResult_GossipTimestampFilterDecodeErrorZ& operator=(CResult_GossipTimestampFilterDecodeErrorZ&& o) { CResult_GossipTimestampFilterDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_GossipTimestampFilterDecodeErrorZ)); return *this; }
+       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 COption_u32Z {
 private:
        LDKCOption_u32Z self;
@@ -2467,6 +3731,36 @@ public:
        const LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* operator ->() const { return &self; }
 };
+class CResult_PaymentIdPaymentSendFailureZ {
+private:
+       LDKCResult_PaymentIdPaymentSendFailureZ self;
+public:
+       CResult_PaymentIdPaymentSendFailureZ(const CResult_PaymentIdPaymentSendFailureZ&) = delete;
+       CResult_PaymentIdPaymentSendFailureZ(CResult_PaymentIdPaymentSendFailureZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PaymentIdPaymentSendFailureZ)); }
+       CResult_PaymentIdPaymentSendFailureZ(LDKCResult_PaymentIdPaymentSendFailureZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PaymentIdPaymentSendFailureZ)); }
+       operator LDKCResult_PaymentIdPaymentSendFailureZ() && { LDKCResult_PaymentIdPaymentSendFailureZ res = self; memset(&self, 0, sizeof(LDKCResult_PaymentIdPaymentSendFailureZ)); return res; }
+       ~CResult_PaymentIdPaymentSendFailureZ() { CResult_PaymentIdPaymentSendFailureZ_free(self); }
+       CResult_PaymentIdPaymentSendFailureZ& operator=(CResult_PaymentIdPaymentSendFailureZ&& o) { CResult_PaymentIdPaymentSendFailureZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_PaymentIdPaymentSendFailureZ)); return *this; }
+       LDKCResult_PaymentIdPaymentSendFailureZ* operator &() { return &self; }
+       LDKCResult_PaymentIdPaymentSendFailureZ* operator ->() { return &self; }
+       const LDKCResult_PaymentIdPaymentSendFailureZ* operator &() const { return &self; }
+       const LDKCResult_PaymentIdPaymentSendFailureZ* operator ->() const { return &self; }
+};
+class CResult_InvoiceSignOrCreationErrorZ {
+private:
+       LDKCResult_InvoiceSignOrCreationErrorZ self;
+public:
+       CResult_InvoiceSignOrCreationErrorZ(const CResult_InvoiceSignOrCreationErrorZ&) = delete;
+       CResult_InvoiceSignOrCreationErrorZ(CResult_InvoiceSignOrCreationErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_InvoiceSignOrCreationErrorZ)); }
+       CResult_InvoiceSignOrCreationErrorZ(LDKCResult_InvoiceSignOrCreationErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_InvoiceSignOrCreationErrorZ)); }
+       operator LDKCResult_InvoiceSignOrCreationErrorZ() && { LDKCResult_InvoiceSignOrCreationErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_InvoiceSignOrCreationErrorZ)); return res; }
+       ~CResult_InvoiceSignOrCreationErrorZ() { CResult_InvoiceSignOrCreationErrorZ_free(self); }
+       CResult_InvoiceSignOrCreationErrorZ& operator=(CResult_InvoiceSignOrCreationErrorZ&& o) { CResult_InvoiceSignOrCreationErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_InvoiceSignOrCreationErrorZ)); return *this; }
+       LDKCResult_InvoiceSignOrCreationErrorZ* operator &() { return &self; }
+       LDKCResult_InvoiceSignOrCreationErrorZ* operator ->() { return &self; }
+       const LDKCResult_InvoiceSignOrCreationErrorZ* operator &() const { return &self; }
+       const LDKCResult_InvoiceSignOrCreationErrorZ* operator ->() const { return &self; }
+};
 class CResult_CommitmentTransactionDecodeErrorZ {
 private:
        LDKCResult_CommitmentTransactionDecodeErrorZ self;
@@ -2542,6 +3836,21 @@ public:
        const LDKCResult_ExpiryTimeCreationErrorZ* operator &() const { return &self; }
        const LDKCResult_ExpiryTimeCreationErrorZ* operator ->() const { return &self; }
 };
+class CResult_ClosingSignedFeeRangeDecodeErrorZ {
+private:
+       LDKCResult_ClosingSignedFeeRangeDecodeErrorZ self;
+public:
+       CResult_ClosingSignedFeeRangeDecodeErrorZ(const CResult_ClosingSignedFeeRangeDecodeErrorZ&) = delete;
+       CResult_ClosingSignedFeeRangeDecodeErrorZ(CResult_ClosingSignedFeeRangeDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ClosingSignedFeeRangeDecodeErrorZ)); }
+       CResult_ClosingSignedFeeRangeDecodeErrorZ(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ)); }
+       operator LDKCResult_ClosingSignedFeeRangeDecodeErrorZ() && { LDKCResult_ClosingSignedFeeRangeDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ)); return res; }
+       ~CResult_ClosingSignedFeeRangeDecodeErrorZ() { CResult_ClosingSignedFeeRangeDecodeErrorZ_free(self); }
+       CResult_ClosingSignedFeeRangeDecodeErrorZ& operator=(CResult_ClosingSignedFeeRangeDecodeErrorZ&& o) { CResult_ClosingSignedFeeRangeDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ClosingSignedFeeRangeDecodeErrorZ)); return *this; }
+       LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* operator ->() const { return &self; }
+};
 class CResult_PingDecodeErrorZ {
 private:
        LDKCResult_PingDecodeErrorZ self;
@@ -2557,6 +3866,21 @@ public:
        const LDKCResult_PingDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_PingDecodeErrorZ* operator ->() const { return &self; }
 };
+class COption_FilterZ {
+private:
+       LDKCOption_FilterZ self;
+public:
+       COption_FilterZ(const COption_FilterZ&) = delete;
+       COption_FilterZ(COption_FilterZ&& o) : self(o.self) { memset(&o, 0, sizeof(COption_FilterZ)); }
+       COption_FilterZ(LDKCOption_FilterZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCOption_FilterZ)); }
+       operator LDKCOption_FilterZ() && { LDKCOption_FilterZ res = self; memset(&self, 0, sizeof(LDKCOption_FilterZ)); return res; }
+       ~COption_FilterZ() { COption_FilterZ_free(self); }
+       COption_FilterZ& operator=(COption_FilterZ&& o) { COption_FilterZ_free(self); self = o.self; memset(&o, 0, sizeof(COption_FilterZ)); return *this; }
+       LDKCOption_FilterZ* operator &() { return &self; }
+       LDKCOption_FilterZ* operator ->() { return &self; }
+       const LDKCOption_FilterZ* operator &() const { return &self; }
+       const LDKCOption_FilterZ* operator ->() const { return &self; }
+};
 class CVec_TransactionOutputsZ {
 private:
        LDKCVec_TransactionOutputsZ self;
@@ -2632,6 +3956,21 @@ public:
        const LDKCResult_SecretKeyErrorZ* operator &() const { return &self; }
        const LDKCResult_SecretKeyErrorZ* operator ->() const { return &self; }
 };
+class CResult_ShutdownScriptDecodeErrorZ {
+private:
+       LDKCResult_ShutdownScriptDecodeErrorZ self;
+public:
+       CResult_ShutdownScriptDecodeErrorZ(const CResult_ShutdownScriptDecodeErrorZ&) = delete;
+       CResult_ShutdownScriptDecodeErrorZ(CResult_ShutdownScriptDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ShutdownScriptDecodeErrorZ)); }
+       CResult_ShutdownScriptDecodeErrorZ(LDKCResult_ShutdownScriptDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ShutdownScriptDecodeErrorZ)); }
+       operator LDKCResult_ShutdownScriptDecodeErrorZ() && { LDKCResult_ShutdownScriptDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ShutdownScriptDecodeErrorZ)); return res; }
+       ~CResult_ShutdownScriptDecodeErrorZ() { CResult_ShutdownScriptDecodeErrorZ_free(self); }
+       CResult_ShutdownScriptDecodeErrorZ& operator=(CResult_ShutdownScriptDecodeErrorZ&& o) { CResult_ShutdownScriptDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ShutdownScriptDecodeErrorZ)); return *this; }
+       LDKCResult_ShutdownScriptDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ShutdownScriptDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ShutdownScriptDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ShutdownScriptDecodeErrorZ* operator ->() const { return &self; }
+};
 class CResult_InvoiceNoneZ {
 private:
        LDKCResult_InvoiceNoneZ self;
@@ -2662,24 +4001,9 @@ public:
        const LDKCResult_QueryChannelRangeDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_QueryChannelRangeDecodeErrorZ* operator ->() const { return &self; }
 };
-class C2Tuple_usizeTransactionZ {
+class CResult_TxCreationKeysDecodeErrorZ {
 private:
-       LDKC2Tuple_usizeTransactionZ self;
-public:
-       C2Tuple_usizeTransactionZ(const C2Tuple_usizeTransactionZ&) = delete;
-       C2Tuple_usizeTransactionZ(C2Tuple_usizeTransactionZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_usizeTransactionZ)); }
-       C2Tuple_usizeTransactionZ(LDKC2Tuple_usizeTransactionZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_usizeTransactionZ)); }
-       operator LDKC2Tuple_usizeTransactionZ() && { LDKC2Tuple_usizeTransactionZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_usizeTransactionZ)); return res; }
-       ~C2Tuple_usizeTransactionZ() { C2Tuple_usizeTransactionZ_free(self); }
-       C2Tuple_usizeTransactionZ& operator=(C2Tuple_usizeTransactionZ&& o) { C2Tuple_usizeTransactionZ_free(self); self = o.self; memset(&o, 0, sizeof(C2Tuple_usizeTransactionZ)); return *this; }
-       LDKC2Tuple_usizeTransactionZ* operator &() { return &self; }
-       LDKC2Tuple_usizeTransactionZ* operator ->() { return &self; }
-       const LDKC2Tuple_usizeTransactionZ* operator &() const { return &self; }
-       const LDKC2Tuple_usizeTransactionZ* operator ->() const { return &self; }
-};
-class CResult_TxCreationKeysDecodeErrorZ {
-private:
-       LDKCResult_TxCreationKeysDecodeErrorZ self;
+       LDKCResult_TxCreationKeysDecodeErrorZ self;
 public:
        CResult_TxCreationKeysDecodeErrorZ(const CResult_TxCreationKeysDecodeErrorZ&) = delete;
        CResult_TxCreationKeysDecodeErrorZ(CResult_TxCreationKeysDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_TxCreationKeysDecodeErrorZ)); }
@@ -2692,6 +4016,21 @@ public:
        const LDKCResult_TxCreationKeysDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_TxCreationKeysDecodeErrorZ* operator ->() const { return &self; }
 };
+class C2Tuple_usizeTransactionZ {
+private:
+       LDKC2Tuple_usizeTransactionZ self;
+public:
+       C2Tuple_usizeTransactionZ(const C2Tuple_usizeTransactionZ&) = delete;
+       C2Tuple_usizeTransactionZ(C2Tuple_usizeTransactionZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_usizeTransactionZ)); }
+       C2Tuple_usizeTransactionZ(LDKC2Tuple_usizeTransactionZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_usizeTransactionZ)); }
+       operator LDKC2Tuple_usizeTransactionZ() && { LDKC2Tuple_usizeTransactionZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_usizeTransactionZ)); return res; }
+       ~C2Tuple_usizeTransactionZ() { C2Tuple_usizeTransactionZ_free(self); }
+       C2Tuple_usizeTransactionZ& operator=(C2Tuple_usizeTransactionZ&& o) { C2Tuple_usizeTransactionZ_free(self); self = o.self; memset(&o, 0, sizeof(C2Tuple_usizeTransactionZ)); return *this; }
+       LDKC2Tuple_usizeTransactionZ* operator &() { return &self; }
+       LDKC2Tuple_usizeTransactionZ* operator ->() { return &self; }
+       const LDKC2Tuple_usizeTransactionZ* operator &() const { return &self; }
+       const LDKC2Tuple_usizeTransactionZ* operator ->() const { return &self; }
+};
 class CResult_ChannelFeaturesDecodeErrorZ {
 private:
        LDKCResult_ChannelFeaturesDecodeErrorZ self;
@@ -2782,6 +4121,21 @@ public:
        const LDKCResult_NodeAnnouncementDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_NodeAnnouncementDecodeErrorZ* operator ->() const { return &self; }
 };
+class CVec_BalanceZ {
+private:
+       LDKCVec_BalanceZ self;
+public:
+       CVec_BalanceZ(const CVec_BalanceZ&) = delete;
+       CVec_BalanceZ(CVec_BalanceZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_BalanceZ)); }
+       CVec_BalanceZ(LDKCVec_BalanceZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_BalanceZ)); }
+       operator LDKCVec_BalanceZ() && { LDKCVec_BalanceZ res = self; memset(&self, 0, sizeof(LDKCVec_BalanceZ)); return res; }
+       ~CVec_BalanceZ() { CVec_BalanceZ_free(self); }
+       CVec_BalanceZ& operator=(CVec_BalanceZ&& o) { CVec_BalanceZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_BalanceZ)); return *this; }
+       LDKCVec_BalanceZ* operator &() { return &self; }
+       LDKCVec_BalanceZ* operator ->() { return &self; }
+       const LDKCVec_BalanceZ* operator &() const { return &self; }
+       const LDKCVec_BalanceZ* operator ->() const { return &self; }
+};
 class CResult_HTLCOutputInCommitmentDecodeErrorZ {
 private:
        LDKCResult_HTLCOutputInCommitmentDecodeErrorZ self;
@@ -2842,20 +4196,35 @@ public:
        const LDKC2Tuple_BlockHashChannelMonitorZ* operator &() const { return &self; }
        const LDKC2Tuple_BlockHashChannelMonitorZ* operator ->() const { return &self; }
 };
-class CResult_FundingSignedDecodeErrorZ {
+class CResult_NodeIdDecodeErrorZ {
 private:
-       LDKCResult_FundingSignedDecodeErrorZ self;
+       LDKCResult_NodeIdDecodeErrorZ self;
 public:
-       CResult_FundingSignedDecodeErrorZ(const CResult_FundingSignedDecodeErrorZ&) = delete;
-       CResult_FundingSignedDecodeErrorZ(CResult_FundingSignedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_FundingSignedDecodeErrorZ)); }
-       CResult_FundingSignedDecodeErrorZ(LDKCResult_FundingSignedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_FundingSignedDecodeErrorZ)); }
-       operator LDKCResult_FundingSignedDecodeErrorZ() && { LDKCResult_FundingSignedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_FundingSignedDecodeErrorZ)); return res; }
-       ~CResult_FundingSignedDecodeErrorZ() { CResult_FundingSignedDecodeErrorZ_free(self); }
-       CResult_FundingSignedDecodeErrorZ& operator=(CResult_FundingSignedDecodeErrorZ&& o) { CResult_FundingSignedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_FundingSignedDecodeErrorZ)); return *this; }
-       LDKCResult_FundingSignedDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_FundingSignedDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_FundingSignedDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_FundingSignedDecodeErrorZ* operator ->() const { return &self; }
+       CResult_NodeIdDecodeErrorZ(const CResult_NodeIdDecodeErrorZ&) = delete;
+       CResult_NodeIdDecodeErrorZ(CResult_NodeIdDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NodeIdDecodeErrorZ)); }
+       CResult_NodeIdDecodeErrorZ(LDKCResult_NodeIdDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NodeIdDecodeErrorZ)); }
+       operator LDKCResult_NodeIdDecodeErrorZ() && { LDKCResult_NodeIdDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NodeIdDecodeErrorZ)); return res; }
+       ~CResult_NodeIdDecodeErrorZ() { CResult_NodeIdDecodeErrorZ_free(self); }
+       CResult_NodeIdDecodeErrorZ& operator=(CResult_NodeIdDecodeErrorZ&& o) { CResult_NodeIdDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NodeIdDecodeErrorZ)); return *this; }
+       LDKCResult_NodeIdDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_NodeIdDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_NodeIdDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_NodeIdDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_ShutdownScriptInvalidShutdownScriptZ {
+private:
+       LDKCResult_ShutdownScriptInvalidShutdownScriptZ self;
+public:
+       CResult_ShutdownScriptInvalidShutdownScriptZ(const CResult_ShutdownScriptInvalidShutdownScriptZ&) = delete;
+       CResult_ShutdownScriptInvalidShutdownScriptZ(CResult_ShutdownScriptInvalidShutdownScriptZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ShutdownScriptInvalidShutdownScriptZ)); }
+       CResult_ShutdownScriptInvalidShutdownScriptZ(LDKCResult_ShutdownScriptInvalidShutdownScriptZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ShutdownScriptInvalidShutdownScriptZ)); }
+       operator LDKCResult_ShutdownScriptInvalidShutdownScriptZ() && { LDKCResult_ShutdownScriptInvalidShutdownScriptZ res = self; memset(&self, 0, sizeof(LDKCResult_ShutdownScriptInvalidShutdownScriptZ)); return res; }
+       ~CResult_ShutdownScriptInvalidShutdownScriptZ() { CResult_ShutdownScriptInvalidShutdownScriptZ_free(self); }
+       CResult_ShutdownScriptInvalidShutdownScriptZ& operator=(CResult_ShutdownScriptInvalidShutdownScriptZ&& o) { CResult_ShutdownScriptInvalidShutdownScriptZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ShutdownScriptInvalidShutdownScriptZ)); return *this; }
+       LDKCResult_ShutdownScriptInvalidShutdownScriptZ* operator &() { return &self; }
+       LDKCResult_ShutdownScriptInvalidShutdownScriptZ* operator ->() { return &self; }
+       const LDKCResult_ShutdownScriptInvalidShutdownScriptZ* operator &() const { return &self; }
+       const LDKCResult_ShutdownScriptInvalidShutdownScriptZ* operator ->() const { return &self; }
 };
 class CResult_RecoverableSignatureNoneZ {
 private:
@@ -2902,6 +4271,21 @@ public:
        const LDKCResult_NetAddressu8Z* operator &() const { return &self; }
        const LDKCResult_NetAddressu8Z* operator ->() const { return &self; }
 };
+class C3Tuple_RawInvoice_u832InvoiceSignatureZ {
+private:
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ self;
+public:
+       C3Tuple_RawInvoice_u832InvoiceSignatureZ(const C3Tuple_RawInvoice_u832InvoiceSignatureZ&) = delete;
+       C3Tuple_RawInvoice_u832InvoiceSignatureZ(C3Tuple_RawInvoice_u832InvoiceSignatureZ&& o) : self(o.self) { memset(&o, 0, sizeof(C3Tuple_RawInvoice_u832InvoiceSignatureZ)); }
+       C3Tuple_RawInvoice_u832InvoiceSignatureZ(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ)); }
+       operator LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ() && { LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ res = self; memset(&self, 0, sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ)); return res; }
+       ~C3Tuple_RawInvoice_u832InvoiceSignatureZ() { C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(self); }
+       C3Tuple_RawInvoice_u832InvoiceSignatureZ& operator=(C3Tuple_RawInvoice_u832InvoiceSignatureZ&& o) { C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(self); self = o.self; memset(&o, 0, sizeof(C3Tuple_RawInvoice_u832InvoiceSignatureZ)); return *this; }
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* operator &() { return &self; }
+       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* operator ->() { return &self; }
+       const LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* operator &() const { return &self; }
+       const LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* operator ->() const { return &self; }
+};
 class CVec_UpdateFailMalformedHTLCZ {
 private:
        LDKCVec_UpdateFailMalformedHTLCZ self;
@@ -2917,20 +4301,20 @@ public:
        const LDKCVec_UpdateFailMalformedHTLCZ* operator &() const { return &self; }
        const LDKCVec_UpdateFailMalformedHTLCZ* operator ->() const { return &self; }
 };
-class C3Tuple_RawInvoice_u832InvoiceSignatureZ {
+class CResult_FundingSignedDecodeErrorZ {
 private:
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ self;
+       LDKCResult_FundingSignedDecodeErrorZ self;
 public:
-       C3Tuple_RawInvoice_u832InvoiceSignatureZ(const C3Tuple_RawInvoice_u832InvoiceSignatureZ&) = delete;
-       C3Tuple_RawInvoice_u832InvoiceSignatureZ(C3Tuple_RawInvoice_u832InvoiceSignatureZ&& o) : self(o.self) { memset(&o, 0, sizeof(C3Tuple_RawInvoice_u832InvoiceSignatureZ)); }
-       C3Tuple_RawInvoice_u832InvoiceSignatureZ(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ)); }
-       operator LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ() && { LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ res = self; memset(&self, 0, sizeof(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ)); return res; }
-       ~C3Tuple_RawInvoice_u832InvoiceSignatureZ() { C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(self); }
-       C3Tuple_RawInvoice_u832InvoiceSignatureZ& operator=(C3Tuple_RawInvoice_u832InvoiceSignatureZ&& o) { C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(self); self = o.self; memset(&o, 0, sizeof(C3Tuple_RawInvoice_u832InvoiceSignatureZ)); return *this; }
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* operator &() { return &self; }
-       LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* operator ->() { return &self; }
-       const LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* operator &() const { return &self; }
-       const LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ* operator ->() const { return &self; }
+       CResult_FundingSignedDecodeErrorZ(const CResult_FundingSignedDecodeErrorZ&) = delete;
+       CResult_FundingSignedDecodeErrorZ(CResult_FundingSignedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_FundingSignedDecodeErrorZ)); }
+       CResult_FundingSignedDecodeErrorZ(LDKCResult_FundingSignedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_FundingSignedDecodeErrorZ)); }
+       operator LDKCResult_FundingSignedDecodeErrorZ() && { LDKCResult_FundingSignedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_FundingSignedDecodeErrorZ)); return res; }
+       ~CResult_FundingSignedDecodeErrorZ() { CResult_FundingSignedDecodeErrorZ_free(self); }
+       CResult_FundingSignedDecodeErrorZ& operator=(CResult_FundingSignedDecodeErrorZ&& o) { CResult_FundingSignedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_FundingSignedDecodeErrorZ)); return *this; }
+       LDKCResult_FundingSignedDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_FundingSignedDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_FundingSignedDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_FundingSignedDecodeErrorZ* operator ->() const { return &self; }
 };
 class CResult_NetworkGraphDecodeErrorZ {
 private:
@@ -3217,6 +4601,21 @@ public:
        const LDKC2Tuple_OutPointScriptZ* operator &() const { return &self; }
        const LDKC2Tuple_OutPointScriptZ* operator ->() const { return &self; }
 };
+class CResult_PaymentIdDecodeErrorZ {
+private:
+       LDKCResult_PaymentIdDecodeErrorZ self;
+public:
+       CResult_PaymentIdDecodeErrorZ(const CResult_PaymentIdDecodeErrorZ&) = delete;
+       CResult_PaymentIdDecodeErrorZ(CResult_PaymentIdDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PaymentIdDecodeErrorZ)); }
+       CResult_PaymentIdDecodeErrorZ(LDKCResult_PaymentIdDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PaymentIdDecodeErrorZ)); }
+       operator LDKCResult_PaymentIdDecodeErrorZ() && { LDKCResult_PaymentIdDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_PaymentIdDecodeErrorZ)); return res; }
+       ~CResult_PaymentIdDecodeErrorZ() { CResult_PaymentIdDecodeErrorZ_free(self); }
+       CResult_PaymentIdDecodeErrorZ& operator=(CResult_PaymentIdDecodeErrorZ&& o) { CResult_PaymentIdDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_PaymentIdDecodeErrorZ)); return *this; }
+       LDKCResult_PaymentIdDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_PaymentIdDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_PaymentIdDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_PaymentIdDecodeErrorZ* operator ->() const { return &self; }
+};
 class CResult_UpdateFailMalformedHTLCDecodeErrorZ {
 private:
        LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ self;
@@ -3367,20 +4766,20 @@ public:
        const LDKC2Tuple_PaymentHashPaymentSecretZ* operator &() const { return &self; }
        const LDKC2Tuple_PaymentHashPaymentSecretZ* operator ->() const { return &self; }
 };
-class CResult_AcceptChannelDecodeErrorZ {
+class COption_AccessZ {
 private:
-       LDKCResult_AcceptChannelDecodeErrorZ self;
+       LDKCOption_AccessZ self;
 public:
-       CResult_AcceptChannelDecodeErrorZ(const CResult_AcceptChannelDecodeErrorZ&) = delete;
-       CResult_AcceptChannelDecodeErrorZ(CResult_AcceptChannelDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_AcceptChannelDecodeErrorZ)); }
-       CResult_AcceptChannelDecodeErrorZ(LDKCResult_AcceptChannelDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_AcceptChannelDecodeErrorZ)); }
-       operator LDKCResult_AcceptChannelDecodeErrorZ() && { LDKCResult_AcceptChannelDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_AcceptChannelDecodeErrorZ)); return res; }
-       ~CResult_AcceptChannelDecodeErrorZ() { CResult_AcceptChannelDecodeErrorZ_free(self); }
-       CResult_AcceptChannelDecodeErrorZ& operator=(CResult_AcceptChannelDecodeErrorZ&& o) { CResult_AcceptChannelDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_AcceptChannelDecodeErrorZ)); return *this; }
-       LDKCResult_AcceptChannelDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_AcceptChannelDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_AcceptChannelDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_AcceptChannelDecodeErrorZ* operator ->() const { return &self; }
+       COption_AccessZ(const COption_AccessZ&) = delete;
+       COption_AccessZ(COption_AccessZ&& o) : self(o.self) { memset(&o, 0, sizeof(COption_AccessZ)); }
+       COption_AccessZ(LDKCOption_AccessZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCOption_AccessZ)); }
+       operator LDKCOption_AccessZ() && { LDKCOption_AccessZ res = self; memset(&self, 0, sizeof(LDKCOption_AccessZ)); return res; }
+       ~COption_AccessZ() { COption_AccessZ_free(self); }
+       COption_AccessZ& operator=(COption_AccessZ&& o) { COption_AccessZ_free(self); self = o.self; memset(&o, 0, sizeof(COption_AccessZ)); return *this; }
+       LDKCOption_AccessZ* operator &() { return &self; }
+       LDKCOption_AccessZ* operator ->() { return &self; }
+       const LDKCOption_AccessZ* operator &() const { return &self; }
+       const LDKCOption_AccessZ* operator ->() const { return &self; }
 };
 class C2Tuple_BlockHashChannelManagerZ {
 private:
@@ -3412,20 +4811,20 @@ public:
        const LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_PongDecodeErrorZ {
+class CResult_AcceptChannelDecodeErrorZ {
 private:
-       LDKCResult_PongDecodeErrorZ self;
+       LDKCResult_AcceptChannelDecodeErrorZ self;
 public:
-       CResult_PongDecodeErrorZ(const CResult_PongDecodeErrorZ&) = delete;
-       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; }
-       ~CResult_PongDecodeErrorZ() { CResult_PongDecodeErrorZ_free(self); }
-       CResult_PongDecodeErrorZ& operator=(CResult_PongDecodeErrorZ&& o) { CResult_PongDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_PongDecodeErrorZ)); return *this; }
-       LDKCResult_PongDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_PongDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_PongDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_PongDecodeErrorZ* operator ->() const { return &self; }
+       CResult_AcceptChannelDecodeErrorZ(const CResult_AcceptChannelDecodeErrorZ&) = delete;
+       CResult_AcceptChannelDecodeErrorZ(CResult_AcceptChannelDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_AcceptChannelDecodeErrorZ)); }
+       CResult_AcceptChannelDecodeErrorZ(LDKCResult_AcceptChannelDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_AcceptChannelDecodeErrorZ)); }
+       operator LDKCResult_AcceptChannelDecodeErrorZ() && { LDKCResult_AcceptChannelDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_AcceptChannelDecodeErrorZ)); return res; }
+       ~CResult_AcceptChannelDecodeErrorZ() { CResult_AcceptChannelDecodeErrorZ_free(self); }
+       CResult_AcceptChannelDecodeErrorZ& operator=(CResult_AcceptChannelDecodeErrorZ&& o) { CResult_AcceptChannelDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_AcceptChannelDecodeErrorZ)); return *this; }
+       LDKCResult_AcceptChannelDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_AcceptChannelDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_AcceptChannelDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_AcceptChannelDecodeErrorZ* operator ->() const { return &self; }
 };
 class CVec_SignatureZ {
 private:
@@ -3457,6 +4856,21 @@ public:
        const LDKCVec_u64Z* operator &() const { return &self; }
        const LDKCVec_u64Z* operator ->() const { return &self; }
 };
+class CResult_PongDecodeErrorZ {
+private:
+       LDKCResult_PongDecodeErrorZ self;
+public:
+       CResult_PongDecodeErrorZ(const CResult_PongDecodeErrorZ&) = delete;
+       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; }
+       ~CResult_PongDecodeErrorZ() { CResult_PongDecodeErrorZ_free(self); }
+       CResult_PongDecodeErrorZ& operator=(CResult_PongDecodeErrorZ&& o) { CResult_PongDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_PongDecodeErrorZ)); return *this; }
+       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_DelayedPaymentOutputDescriptorDecodeErrorZ {
 private:
        LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ self;
@@ -3472,6 +4886,21 @@ public:
        const LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* operator ->() const { return &self; }
 };
+class C2Tuple_PaymentHashPaymentIdZ {
+private:
+       LDKC2Tuple_PaymentHashPaymentIdZ self;
+public:
+       C2Tuple_PaymentHashPaymentIdZ(const C2Tuple_PaymentHashPaymentIdZ&) = delete;
+       C2Tuple_PaymentHashPaymentIdZ(C2Tuple_PaymentHashPaymentIdZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_PaymentHashPaymentIdZ)); }
+       C2Tuple_PaymentHashPaymentIdZ(LDKC2Tuple_PaymentHashPaymentIdZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_PaymentHashPaymentIdZ)); }
+       operator LDKC2Tuple_PaymentHashPaymentIdZ() && { LDKC2Tuple_PaymentHashPaymentIdZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_PaymentHashPaymentIdZ)); return res; }
+       ~C2Tuple_PaymentHashPaymentIdZ() { C2Tuple_PaymentHashPaymentIdZ_free(self); }
+       C2Tuple_PaymentHashPaymentIdZ& operator=(C2Tuple_PaymentHashPaymentIdZ&& o) { C2Tuple_PaymentHashPaymentIdZ_free(self); self = o.self; memset(&o, 0, sizeof(C2Tuple_PaymentHashPaymentIdZ)); return *this; }
+       LDKC2Tuple_PaymentHashPaymentIdZ* operator &() { return &self; }
+       LDKC2Tuple_PaymentHashPaymentIdZ* operator ->() { return &self; }
+       const LDKC2Tuple_PaymentHashPaymentIdZ* operator &() const { return &self; }
+       const LDKC2Tuple_PaymentHashPaymentIdZ* operator ->() const { return &self; }
+};
 class CResult_StringErrorZ {
 private:
        LDKCResult_StringErrorZ self;
@@ -3517,6 +4946,21 @@ public:
        const LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* operator &() const { return &self; }
        const LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ* operator ->() const { return &self; }
 };
+class CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ {
+private:
+       LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ self;
+public:
+       CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ(const CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ&) = delete;
+       CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ(CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ)); }
+       CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ)); }
+       operator LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ() && { LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ res = self; memset(&self, 0, sizeof(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ)); return res; }
+       ~CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ() { CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(self); }
+       CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ& operator=(CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ&& o) { CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ)); return *this; }
+       LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ* operator &() { return &self; }
+       LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ* operator ->() { return &self; }
+       const LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ* operator &() const { return &self; }
+       const LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ* operator ->() const { return &self; }
+};
 class CVec_RouteHintZ {
 private:
        LDKCVec_RouteHintZ self;
@@ -3607,6 +5051,21 @@ public:
        const LDKCResult_NonePeerHandleErrorZ* operator &() const { return &self; }
        const LDKCResult_NonePeerHandleErrorZ* operator ->() const { return &self; }
 };
+class COption_CVec_NetAddressZZ {
+private:
+       LDKCOption_CVec_NetAddressZZ self;
+public:
+       COption_CVec_NetAddressZZ(const COption_CVec_NetAddressZZ&) = delete;
+       COption_CVec_NetAddressZZ(COption_CVec_NetAddressZZ&& o) : self(o.self) { memset(&o, 0, sizeof(COption_CVec_NetAddressZZ)); }
+       COption_CVec_NetAddressZZ(LDKCOption_CVec_NetAddressZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCOption_CVec_NetAddressZZ)); }
+       operator LDKCOption_CVec_NetAddressZZ() && { LDKCOption_CVec_NetAddressZZ res = self; memset(&self, 0, sizeof(LDKCOption_CVec_NetAddressZZ)); return res; }
+       ~COption_CVec_NetAddressZZ() { COption_CVec_NetAddressZZ_free(self); }
+       COption_CVec_NetAddressZZ& operator=(COption_CVec_NetAddressZZ&& o) { COption_CVec_NetAddressZZ_free(self); self = o.self; memset(&o, 0, sizeof(COption_CVec_NetAddressZZ)); return *this; }
+       LDKCOption_CVec_NetAddressZZ* operator &() { return &self; }
+       LDKCOption_CVec_NetAddressZZ* operator ->() { return &self; }
+       const LDKCOption_CVec_NetAddressZZ* operator &() const { return &self; }
+       const LDKCOption_CVec_NetAddressZZ* operator ->() const { return &self; }
+};
 class CResult_CVec_SignatureZNoneZ {
 private:
        LDKCResult_CVec_SignatureZNoneZ self;
@@ -3622,6 +5081,21 @@ public:
        const LDKCResult_CVec_SignatureZNoneZ* operator &() const { return &self; }
        const LDKCResult_CVec_SignatureZNoneZ* operator ->() const { return &self; }
 };
+class CResult__u832APIErrorZ {
+private:
+       LDKCResult__u832APIErrorZ self;
+public:
+       CResult__u832APIErrorZ(const CResult__u832APIErrorZ&) = delete;
+       CResult__u832APIErrorZ(CResult__u832APIErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult__u832APIErrorZ)); }
+       CResult__u832APIErrorZ(LDKCResult__u832APIErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult__u832APIErrorZ)); }
+       operator LDKCResult__u832APIErrorZ() && { LDKCResult__u832APIErrorZ res = self; memset(&self, 0, sizeof(LDKCResult__u832APIErrorZ)); return res; }
+       ~CResult__u832APIErrorZ() { CResult__u832APIErrorZ_free(self); }
+       CResult__u832APIErrorZ& operator=(CResult__u832APIErrorZ&& o) { CResult__u832APIErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult__u832APIErrorZ)); return *this; }
+       LDKCResult__u832APIErrorZ* operator &() { return &self; }
+       LDKCResult__u832APIErrorZ* operator ->() { return &self; }
+       const LDKCResult__u832APIErrorZ* operator &() const { return &self; }
+       const LDKCResult__u832APIErrorZ* operator ->() const { return &self; }
+};
 class CResult_DescriptionCreationErrorZ {
 private:
        LDKCResult_DescriptionCreationErrorZ self;
@@ -3637,6 +5111,21 @@ public:
        const LDKCResult_DescriptionCreationErrorZ* operator &() const { return &self; }
        const LDKCResult_DescriptionCreationErrorZ* operator ->() const { return &self; }
 };
+class CVec_C2Tuple_PublicKeyTypeZZ {
+private:
+       LDKCVec_C2Tuple_PublicKeyTypeZZ self;
+public:
+       CVec_C2Tuple_PublicKeyTypeZZ(const CVec_C2Tuple_PublicKeyTypeZZ&) = delete;
+       CVec_C2Tuple_PublicKeyTypeZZ(CVec_C2Tuple_PublicKeyTypeZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_C2Tuple_PublicKeyTypeZZ)); }
+       CVec_C2Tuple_PublicKeyTypeZZ(LDKCVec_C2Tuple_PublicKeyTypeZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ)); }
+       operator LDKCVec_C2Tuple_PublicKeyTypeZZ() && { LDKCVec_C2Tuple_PublicKeyTypeZZ res = self; memset(&self, 0, sizeof(LDKCVec_C2Tuple_PublicKeyTypeZZ)); return res; }
+       ~CVec_C2Tuple_PublicKeyTypeZZ() { CVec_C2Tuple_PublicKeyTypeZZ_free(self); }
+       CVec_C2Tuple_PublicKeyTypeZZ& operator=(CVec_C2Tuple_PublicKeyTypeZZ&& o) { CVec_C2Tuple_PublicKeyTypeZZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_C2Tuple_PublicKeyTypeZZ)); return *this; }
+       LDKCVec_C2Tuple_PublicKeyTypeZZ* operator &() { return &self; }
+       LDKCVec_C2Tuple_PublicKeyTypeZZ* operator ->() { return &self; }
+       const LDKCVec_C2Tuple_PublicKeyTypeZZ* operator &() const { return &self; }
+       const LDKCVec_C2Tuple_PublicKeyTypeZZ* operator ->() const { return &self; }
+};
 class CResult_RoutingFeesDecodeErrorZ {
 private:
        LDKCResult_RoutingFeesDecodeErrorZ self;
@@ -3712,21 +5201,6 @@ public:
        const LDKCResult_UpdateAddHTLCDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_UpdateAddHTLCDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_NoneAPIErrorZ {
-private:
-       LDKCResult_NoneAPIErrorZ self;
-public:
-       CResult_NoneAPIErrorZ(const CResult_NoneAPIErrorZ&) = delete;
-       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; }
-       ~CResult_NoneAPIErrorZ() { CResult_NoneAPIErrorZ_free(self); }
-       CResult_NoneAPIErrorZ& operator=(CResult_NoneAPIErrorZ&& o) { CResult_NoneAPIErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NoneAPIErrorZ)); return *this; }
-       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_CounterpartyChannelTransactionParametersDecodeErrorZ {
 private:
        LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ self;
@@ -3742,6 +5216,21 @@ public:
        const LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator ->() const { return &self; }
 };
+class CResult_NoneAPIErrorZ {
+private:
+       LDKCResult_NoneAPIErrorZ self;
+public:
+       CResult_NoneAPIErrorZ(const CResult_NoneAPIErrorZ&) = delete;
+       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; }
+       ~CResult_NoneAPIErrorZ() { CResult_NoneAPIErrorZ_free(self); }
+       CResult_NoneAPIErrorZ& operator=(CResult_NoneAPIErrorZ&& o) { CResult_NoneAPIErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NoneAPIErrorZ)); return *this; }
+       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 CVec_NetAddressZ {
 private:
        LDKCVec_NetAddressZ self;
@@ -3787,6 +5276,36 @@ public:
        const LDKCVec_PublicKeyZ* operator &() const { return &self; }
        const LDKCVec_PublicKeyZ* operator ->() const { return &self; }
 };
+class COption_TypeZ {
+private:
+       LDKCOption_TypeZ self;
+public:
+       COption_TypeZ(const COption_TypeZ&) = delete;
+       COption_TypeZ(COption_TypeZ&& o) : self(o.self) { memset(&o, 0, sizeof(COption_TypeZ)); }
+       COption_TypeZ(LDKCOption_TypeZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCOption_TypeZ)); }
+       operator LDKCOption_TypeZ() && { LDKCOption_TypeZ res = self; memset(&self, 0, sizeof(LDKCOption_TypeZ)); return res; }
+       ~COption_TypeZ() { COption_TypeZ_free(self); }
+       COption_TypeZ& operator=(COption_TypeZ&& o) { COption_TypeZ_free(self); self = o.self; memset(&o, 0, sizeof(COption_TypeZ)); return *this; }
+       LDKCOption_TypeZ* operator &() { return &self; }
+       LDKCOption_TypeZ* operator ->() { return &self; }
+       const LDKCOption_TypeZ* operator &() const { return &self; }
+       const LDKCOption_TypeZ* operator ->() const { return &self; }
+};
+class CResult_COption_TypeZDecodeErrorZ {
+private:
+       LDKCResult_COption_TypeZDecodeErrorZ self;
+public:
+       CResult_COption_TypeZDecodeErrorZ(const CResult_COption_TypeZDecodeErrorZ&) = delete;
+       CResult_COption_TypeZDecodeErrorZ(CResult_COption_TypeZDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_COption_TypeZDecodeErrorZ)); }
+       CResult_COption_TypeZDecodeErrorZ(LDKCResult_COption_TypeZDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_COption_TypeZDecodeErrorZ)); }
+       operator LDKCResult_COption_TypeZDecodeErrorZ() && { LDKCResult_COption_TypeZDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_COption_TypeZDecodeErrorZ)); return res; }
+       ~CResult_COption_TypeZDecodeErrorZ() { CResult_COption_TypeZDecodeErrorZ_free(self); }
+       CResult_COption_TypeZDecodeErrorZ& operator=(CResult_COption_TypeZDecodeErrorZ&& o) { CResult_COption_TypeZDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_COption_TypeZDecodeErrorZ)); return *this; }
+       LDKCResult_COption_TypeZDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_COption_TypeZDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_COption_TypeZDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_COption_TypeZDecodeErrorZ* operator ->() const { return &self; }
+};
 class CResult_DirectionalChannelInfoDecodeErrorZ {
 private:
        LDKCResult_DirectionalChannelInfoDecodeErrorZ self;
@@ -4042,6 +5561,21 @@ public:
        const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator &() const { return &self; }
        const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator ->() const { return &self; }
 };
+class CResult_NoneNoneZ {
+private:
+       LDKCResult_NoneNoneZ self;
+public:
+       CResult_NoneNoneZ(const CResult_NoneNoneZ&) = delete;
+       CResult_NoneNoneZ(CResult_NoneNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneNoneZ)); }
+       CResult_NoneNoneZ(LDKCResult_NoneNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneNoneZ)); }
+       operator LDKCResult_NoneNoneZ() && { LDKCResult_NoneNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneNoneZ)); return res; }
+       ~CResult_NoneNoneZ() { CResult_NoneNoneZ_free(self); }
+       CResult_NoneNoneZ& operator=(CResult_NoneNoneZ&& o) { CResult_NoneNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NoneNoneZ)); return *this; }
+       LDKCResult_NoneNoneZ* operator &() { return &self; }
+       LDKCResult_NoneNoneZ* operator ->() { return &self; }
+       const LDKCResult_NoneNoneZ* operator &() const { return &self; }
+       const LDKCResult_NoneNoneZ* operator ->() const { return &self; }
+};
 class CResult_PrivateRouteCreationErrorZ {
 private:
        LDKCResult_PrivateRouteCreationErrorZ self;
@@ -4072,21 +5606,6 @@ public:
        const LDKCResult_boolPeerHandleErrorZ* operator &() const { return &self; }
        const LDKCResult_boolPeerHandleErrorZ* operator ->() const { return &self; }
 };
-class CResult_ChannelUpdateDecodeErrorZ {
-private:
-       LDKCResult_ChannelUpdateDecodeErrorZ self;
-public:
-       CResult_ChannelUpdateDecodeErrorZ(const CResult_ChannelUpdateDecodeErrorZ&) = delete;
-       CResult_ChannelUpdateDecodeErrorZ(CResult_ChannelUpdateDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelUpdateDecodeErrorZ)); }
-       CResult_ChannelUpdateDecodeErrorZ(LDKCResult_ChannelUpdateDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelUpdateDecodeErrorZ)); }
-       operator LDKCResult_ChannelUpdateDecodeErrorZ() && { LDKCResult_ChannelUpdateDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelUpdateDecodeErrorZ)); return res; }
-       ~CResult_ChannelUpdateDecodeErrorZ() { CResult_ChannelUpdateDecodeErrorZ_free(self); }
-       CResult_ChannelUpdateDecodeErrorZ& operator=(CResult_ChannelUpdateDecodeErrorZ&& o) { CResult_ChannelUpdateDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelUpdateDecodeErrorZ)); return *this; }
-       LDKCResult_ChannelUpdateDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ChannelUpdateDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ChannelUpdateDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ChannelUpdateDecodeErrorZ* operator ->() const { return &self; }
-};
 class CVec_APIErrorZ {
 private:
        LDKCVec_APIErrorZ self;
@@ -4102,6 +5621,21 @@ public:
        const LDKCVec_APIErrorZ* operator &() const { return &self; }
        const LDKCVec_APIErrorZ* operator ->() const { return &self; }
 };
+class CResult_ChannelUpdateDecodeErrorZ {
+private:
+       LDKCResult_ChannelUpdateDecodeErrorZ self;
+public:
+       CResult_ChannelUpdateDecodeErrorZ(const CResult_ChannelUpdateDecodeErrorZ&) = delete;
+       CResult_ChannelUpdateDecodeErrorZ(CResult_ChannelUpdateDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelUpdateDecodeErrorZ)); }
+       CResult_ChannelUpdateDecodeErrorZ(LDKCResult_ChannelUpdateDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelUpdateDecodeErrorZ)); }
+       operator LDKCResult_ChannelUpdateDecodeErrorZ() && { LDKCResult_ChannelUpdateDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelUpdateDecodeErrorZ)); return res; }
+       ~CResult_ChannelUpdateDecodeErrorZ() { CResult_ChannelUpdateDecodeErrorZ_free(self); }
+       CResult_ChannelUpdateDecodeErrorZ& operator=(CResult_ChannelUpdateDecodeErrorZ&& o) { CResult_ChannelUpdateDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelUpdateDecodeErrorZ)); return *this; }
+       LDKCResult_ChannelUpdateDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ChannelUpdateDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ChannelUpdateDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ChannelUpdateDecodeErrorZ* operator ->() const { return &self; }
+};
 class CVec_UpdateFulfillHTLCZ {
 private:
        LDKCVec_UpdateFulfillHTLCZ self;
@@ -4327,4 +5861,296 @@ public:
        const LDKCResult_FundingLockedDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_FundingLockedDecodeErrorZ* operator ->() const { return &self; }
 };
+
+inline LDK::CResult_NoneErrorZ ChannelManagerPersister::persist_manager(const struct LDKChannelManager *NONNULL_PTR channel_manager) {
+       LDK::CResult_NoneErrorZ ret = (self.persist_manager)(self.this_arg, channel_manager);
+       return ret;
+}
+inline void BroadcasterInterface::broadcast_transaction(struct LDKTransaction tx) {
+       (self.broadcast_transaction)(self.this_arg, tx);
+}
+inline uint32_t FeeEstimator::get_est_sat_per_1000_weight(enum LDKConfirmationTarget confirmation_target) {
+       uint32_t ret = (self.get_est_sat_per_1000_weight)(self.this_arg, confirmation_target);
+       return ret;
+}
+inline LDK::CResult_TxOutAccessErrorZ Access::get_utxo(const uint8_t (*genesis_hash)[32], uint64_t short_channel_id) {
+       LDK::CResult_TxOutAccessErrorZ ret = (self.get_utxo)(self.this_arg, genesis_hash, short_channel_id);
+       return ret;
+}
+inline void Listen::block_connected(struct LDKu8slice block, uint32_t height) {
+       (self.block_connected)(self.this_arg, block, height);
+}
+inline void Listen::block_disconnected(const uint8_t (*header)[80], uint32_t height) {
+       (self.block_disconnected)(self.this_arg, header, height);
+}
+inline void Confirm::transactions_confirmed(const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height) {
+       (self.transactions_confirmed)(self.this_arg, header, txdata, height);
+}
+inline void Confirm::transaction_unconfirmed(const uint8_t (*txid)[32]) {
+       (self.transaction_unconfirmed)(self.this_arg, txid);
+}
+inline void Confirm::best_block_updated(const uint8_t (*header)[80], uint32_t height) {
+       (self.best_block_updated)(self.this_arg, header, height);
+}
+inline LDK::CVec_TxidZ Confirm::get_relevant_txids() {
+       LDK::CVec_TxidZ ret = (self.get_relevant_txids)(self.this_arg);
+       return ret;
+}
+inline LDK::CResult_NoneChannelMonitorUpdateErrZ Watch::watch_channel(struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor) {
+       LDK::CResult_NoneChannelMonitorUpdateErrZ ret = (self.watch_channel)(self.this_arg, funding_txo, monitor);
+       return ret;
+}
+inline LDK::CResult_NoneChannelMonitorUpdateErrZ Watch::update_channel(struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update) {
+       LDK::CResult_NoneChannelMonitorUpdateErrZ ret = (self.update_channel)(self.this_arg, funding_txo, update);
+       return ret;
+}
+inline LDK::CVec_MonitorEventZ Watch::release_pending_monitor_events() {
+       LDK::CVec_MonitorEventZ ret = (self.release_pending_monitor_events)(self.this_arg);
+       return ret;
+}
+inline void Filter::register_tx(const uint8_t (*txid)[32], struct LDKu8slice script_pubkey) {
+       (self.register_tx)(self.this_arg, txid, script_pubkey);
+}
+inline LDK::COption_C2Tuple_usizeTransactionZZ Filter::register_output(struct LDKWatchedOutput output) {
+       LDK::COption_C2Tuple_usizeTransactionZZ ret = (self.register_output)(self.this_arg, output);
+       return ret;
+}
+inline LDK::CVec_MessageSendEventZ MessageSendEventsProvider::get_and_clear_pending_msg_events() {
+       LDK::CVec_MessageSendEventZ ret = (self.get_and_clear_pending_msg_events)(self.this_arg);
+       return ret;
+}
+inline void EventsProvider::process_pending_events(struct LDKEventHandler handler) {
+       (self.process_pending_events)(self.this_arg, handler);
+}
+inline void EventHandler::handle_event(const struct LDKEvent *NONNULL_PTR event) {
+       (self.handle_event)(self.this_arg, event);
+}
+inline uint64_t Score::channel_penalty_msat(uint64_t short_channel_id) {
+       uint64_t ret = (self.channel_penalty_msat)(self.this_arg, short_channel_id);
+       return ret;
+}
+inline LDKPublicKey BaseSign::get_per_commitment_point(uint64_t idx) {
+       LDKPublicKey ret = (self.get_per_commitment_point)(self.this_arg, idx);
+       return ret;
+}
+inline LDKThirtyTwoBytes BaseSign::release_commitment_secret(uint64_t idx) {
+       LDKThirtyTwoBytes ret = (self.release_commitment_secret)(self.this_arg, idx);
+       return ret;
+}
+inline LDK::CResult_NoneNoneZ BaseSign::validate_holder_commitment(const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx) {
+       LDK::CResult_NoneNoneZ ret = (self.validate_holder_commitment)(self.this_arg, holder_tx);
+       return ret;
+}
+inline LDKThirtyTwoBytes BaseSign::channel_keys_id() {
+       LDKThirtyTwoBytes ret = (self.channel_keys_id)(self.this_arg);
+       return ret;
+}
+inline LDK::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign::sign_counterparty_commitment(const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx) {
+       LDK::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = (self.sign_counterparty_commitment)(self.this_arg, commitment_tx);
+       return ret;
+}
+inline LDK::CResult_NoneNoneZ BaseSign::validate_counterparty_revocation(uint64_t idx, const uint8_t (*secret)[32]) {
+       LDK::CResult_NoneNoneZ ret = (self.validate_counterparty_revocation)(self.this_arg, idx, secret);
+       return ret;
+}
+inline LDK::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign::sign_holder_commitment_and_htlcs(const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx) {
+       LDK::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = (self.sign_holder_commitment_and_htlcs)(self.this_arg, commitment_tx);
+       return ret;
+}
+inline LDK::CResult_SignatureNoneZ BaseSign::sign_justice_revoked_output(struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]) {
+       LDK::CResult_SignatureNoneZ ret = (self.sign_justice_revoked_output)(self.this_arg, justice_tx, input, amount, per_commitment_key);
+       return ret;
+}
+inline LDK::CResult_SignatureNoneZ BaseSign::sign_justice_revoked_htlc(struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc) {
+       LDK::CResult_SignatureNoneZ ret = (self.sign_justice_revoked_htlc)(self.this_arg, justice_tx, input, amount, per_commitment_key, htlc);
+       return ret;
+}
+inline LDK::CResult_SignatureNoneZ BaseSign::sign_counterparty_htlc_transaction(struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc) {
+       LDK::CResult_SignatureNoneZ ret = (self.sign_counterparty_htlc_transaction)(self.this_arg, htlc_tx, input, amount, per_commitment_point, htlc);
+       return ret;
+}
+inline LDK::CResult_SignatureNoneZ BaseSign::sign_closing_transaction(const struct LDKClosingTransaction *NONNULL_PTR closing_tx) {
+       LDK::CResult_SignatureNoneZ ret = (self.sign_closing_transaction)(self.this_arg, closing_tx);
+       return ret;
+}
+inline LDK::CResult_SignatureNoneZ BaseSign::sign_channel_announcement(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg) {
+       LDK::CResult_SignatureNoneZ ret = (self.sign_channel_announcement)(self.this_arg, msg);
+       return ret;
+}
+inline void BaseSign::ready_channel(const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters) {
+       (self.ready_channel)(self.this_arg, channel_parameters);
+}
+inline LDKSecretKey KeysInterface::get_node_secret() {
+       LDKSecretKey ret = (self.get_node_secret)(self.this_arg);
+       return ret;
+}
+inline LDK::CVec_u8Z KeysInterface::get_destination_script() {
+       LDK::CVec_u8Z ret = (self.get_destination_script)(self.this_arg);
+       return ret;
+}
+inline LDK::ShutdownScript KeysInterface::get_shutdown_scriptpubkey() {
+       LDK::ShutdownScript ret = (self.get_shutdown_scriptpubkey)(self.this_arg);
+       return ret;
+}
+inline LDK::Sign KeysInterface::get_channel_signer(bool inbound, uint64_t channel_value_satoshis) {
+       LDK::Sign ret = (self.get_channel_signer)(self.this_arg, inbound, channel_value_satoshis);
+       return ret;
+}
+inline LDKThirtyTwoBytes KeysInterface::get_secure_random_bytes() {
+       LDKThirtyTwoBytes ret = (self.get_secure_random_bytes)(self.this_arg);
+       return ret;
+}
+inline LDK::CResult_SignDecodeErrorZ KeysInterface::read_chan_signer(struct LDKu8slice reader) {
+       LDK::CResult_SignDecodeErrorZ ret = (self.read_chan_signer)(self.this_arg, reader);
+       return ret;
+}
+inline LDK::CResult_RecoverableSignatureNoneZ KeysInterface::sign_invoice(struct LDKCVec_u8Z invoice_preimage) {
+       LDK::CResult_RecoverableSignatureNoneZ ret = (self.sign_invoice)(self.this_arg, invoice_preimage);
+       return ret;
+}
+inline LDK::CResult_COption_TypeZDecodeErrorZ CustomMessageReader::read(uint16_t message_type, struct LDKu8slice buffer) {
+       LDK::CResult_COption_TypeZDecodeErrorZ ret = (self.read)(self.this_arg, message_type, buffer);
+       return ret;
+}
+inline uint16_t Type::type_id() {
+       uint16_t ret = (self.type_id)(self.this_arg);
+       return ret;
+}
+inline LDK::Str Type::debug_str() {
+       LDK::Str ret = (self.debug_str)(self.this_arg);
+       return ret;
+}
+inline LDK::CResult_NoneLightningErrorZ CustomMessageHandler::handle_custom_message(struct LDKType msg, struct LDKPublicKey sender_node_id) {
+       LDK::CResult_NoneLightningErrorZ ret = (self.handle_custom_message)(self.this_arg, msg, sender_node_id);
+       return ret;
+}
+inline LDK::CVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler::get_and_clear_pending_msg() {
+       LDK::CVec_C2Tuple_PublicKeyTypeZZ ret = (self.get_and_clear_pending_msg)(self.this_arg);
+       return ret;
+}
+inline uintptr_t SocketDescriptor::send_data(struct LDKu8slice data, bool resume_read) {
+       uintptr_t ret = (self.send_data)(self.this_arg, data, resume_read);
+       return ret;
+}
+inline void SocketDescriptor::disconnect_socket() {
+       (self.disconnect_socket)(self.this_arg);
+}
+inline bool SocketDescriptor::eq(const struct LDKSocketDescriptor *NONNULL_PTR other_arg) {
+       bool ret = (self.eq)(self.this_arg, other_arg);
+       return ret;
+}
+inline uint64_t SocketDescriptor::hash() {
+       uint64_t ret = (self.hash)(self.this_arg);
+       return ret;
+}
+inline void ChannelMessageHandler::handle_open_channel(struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg) {
+       (self.handle_open_channel)(self.this_arg, their_node_id, their_features, msg);
+}
+inline void ChannelMessageHandler::handle_accept_channel(struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg) {
+       (self.handle_accept_channel)(self.this_arg, their_node_id, their_features, msg);
+}
+inline void ChannelMessageHandler::handle_funding_created(struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg) {
+       (self.handle_funding_created)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_funding_signed(struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg) {
+       (self.handle_funding_signed)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_funding_locked(struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg) {
+       (self.handle_funding_locked)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_shutdown(struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg) {
+       (self.handle_shutdown)(self.this_arg, their_node_id, their_features, msg);
+}
+inline void ChannelMessageHandler::handle_closing_signed(struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg) {
+       (self.handle_closing_signed)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_update_add_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg) {
+       (self.handle_update_add_htlc)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_update_fulfill_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg) {
+       (self.handle_update_fulfill_htlc)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_update_fail_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg) {
+       (self.handle_update_fail_htlc)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_update_fail_malformed_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg) {
+       (self.handle_update_fail_malformed_htlc)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_commitment_signed(struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg) {
+       (self.handle_commitment_signed)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_revoke_and_ack(struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg) {
+       (self.handle_revoke_and_ack)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_update_fee(struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg) {
+       (self.handle_update_fee)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_announcement_signatures(struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg) {
+       (self.handle_announcement_signatures)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::peer_disconnected(struct LDKPublicKey their_node_id, bool no_connection_possible) {
+       (self.peer_disconnected)(self.this_arg, their_node_id, no_connection_possible);
+}
+inline void ChannelMessageHandler::peer_connected(struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg) {
+       (self.peer_connected)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_channel_reestablish(struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg) {
+       (self.handle_channel_reestablish)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_channel_update(struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg) {
+       (self.handle_channel_update)(self.this_arg, their_node_id, msg);
+}
+inline void ChannelMessageHandler::handle_error(struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg) {
+       (self.handle_error)(self.this_arg, their_node_id, msg);
+}
+inline LDK::CResult_boolLightningErrorZ RoutingMessageHandler::handle_node_announcement(const struct LDKNodeAnnouncement *NONNULL_PTR msg) {
+       LDK::CResult_boolLightningErrorZ ret = (self.handle_node_announcement)(self.this_arg, msg);
+       return ret;
+}
+inline LDK::CResult_boolLightningErrorZ RoutingMessageHandler::handle_channel_announcement(const struct LDKChannelAnnouncement *NONNULL_PTR msg) {
+       LDK::CResult_boolLightningErrorZ ret = (self.handle_channel_announcement)(self.this_arg, msg);
+       return ret;
+}
+inline LDK::CResult_boolLightningErrorZ RoutingMessageHandler::handle_channel_update(const struct LDKChannelUpdate *NONNULL_PTR msg) {
+       LDK::CResult_boolLightningErrorZ ret = (self.handle_channel_update)(self.this_arg, msg);
+       return ret;
+}
+inline LDK::CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler::get_next_channel_announcements(uint64_t starting_point, uint8_t batch_amount) {
+       LDK::CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret = (self.get_next_channel_announcements)(self.this_arg, starting_point, batch_amount);
+       return ret;
+}
+inline LDK::CVec_NodeAnnouncementZ RoutingMessageHandler::get_next_node_announcements(struct LDKPublicKey starting_point, uint8_t batch_amount) {
+       LDK::CVec_NodeAnnouncementZ ret = (self.get_next_node_announcements)(self.this_arg, starting_point, batch_amount);
+       return ret;
+}
+inline void RoutingMessageHandler::sync_routing_table(struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init) {
+       (self.sync_routing_table)(self.this_arg, their_node_id, init);
+}
+inline LDK::CResult_NoneLightningErrorZ RoutingMessageHandler::handle_reply_channel_range(struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg) {
+       LDK::CResult_NoneLightningErrorZ ret = (self.handle_reply_channel_range)(self.this_arg, their_node_id, msg);
+       return ret;
+}
+inline LDK::CResult_NoneLightningErrorZ RoutingMessageHandler::handle_reply_short_channel_ids_end(struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg) {
+       LDK::CResult_NoneLightningErrorZ ret = (self.handle_reply_short_channel_ids_end)(self.this_arg, their_node_id, msg);
+       return ret;
+}
+inline LDK::CResult_NoneLightningErrorZ RoutingMessageHandler::handle_query_channel_range(struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg) {
+       LDK::CResult_NoneLightningErrorZ ret = (self.handle_query_channel_range)(self.this_arg, their_node_id, msg);
+       return ret;
+}
+inline LDK::CResult_NoneLightningErrorZ RoutingMessageHandler::handle_query_short_channel_ids(struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg) {
+       LDK::CResult_NoneLightningErrorZ ret = (self.handle_query_short_channel_ids)(self.this_arg, their_node_id, msg);
+       return ret;
+}
+inline void Logger::log(const char *record) {
+       (self.log)(self.this_arg, record);
+}
+inline LDK::CResult_NoneChannelMonitorUpdateErrZ Persist::persist_new_channel(struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data) {
+       LDK::CResult_NoneChannelMonitorUpdateErrZ ret = (self.persist_new_channel)(self.this_arg, id, data);
+       return ret;
+}
+inline LDK::CResult_NoneChannelMonitorUpdateErrZ Persist::update_persisted_channel(struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data) {
+       LDK::CResult_NoneChannelMonitorUpdateErrZ ret = (self.update_persisted_channel)(self.this_arg, id, update, data);
+       return ret;
+}
 }