+ ConfirmationTarget(const ConfirmationTarget&) = delete;
+ ConfirmationTarget(ConfirmationTarget&& o) : self(o.self) { memset(&o, 0, sizeof(ConfirmationTarget)); }
+ ConfirmationTarget(LDKConfirmationTarget&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKConfirmationTarget)); }
+ operator LDKConfirmationTarget() && { LDKConfirmationTarget res = self; memset(&self, 0, sizeof(LDKConfirmationTarget)); return res; }
+ ConfirmationTarget& operator=(ConfirmationTarget&& o) { self = o.self; memset(&o, 0, sizeof(ConfirmationTarget)); return *this; }
+ LDKConfirmationTarget* operator &() { return &self; }
+ LDKConfirmationTarget* operator ->() { return &self; }
+ const LDKConfirmationTarget* operator &() const { return &self; }
+ const LDKConfirmationTarget* operator ->() const { return &self; }
+};
+class FeeEstimator {
+private:
+ LDKFeeEstimator self;
+public:
+ FeeEstimator(const FeeEstimator&) = delete;
+ FeeEstimator(FeeEstimator&& o) : self(o.self) { memset(&o, 0, sizeof(FeeEstimator)); }
+ FeeEstimator(LDKFeeEstimator&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKFeeEstimator)); }
+ operator LDKFeeEstimator() && { LDKFeeEstimator res = self; memset(&self, 0, sizeof(LDKFeeEstimator)); return res; }
+ ~FeeEstimator() { FeeEstimator_free(self); }
+ FeeEstimator& operator=(FeeEstimator&& o) { FeeEstimator_free(self); self = o.self; memset(&o, 0, sizeof(FeeEstimator)); return *this; }
+ LDKFeeEstimator* operator &() { return &self; }
+ 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.
+ *
+ * LDK will wrap this method and ensure that the value returned is 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).
+ *
+ * The following unit conversions can be used to convert to sats/KW:
+ * * satoshis-per-byte * 250
+ * * satoshis-per-kbyte / 4
+ */
+ inline uint32_t get_est_sat_per_1000_weight(enum LDKConfirmationTarget confirmation_target);
+};
+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 HTLCDestination {
+private:
+ LDKHTLCDestination self;
+public:
+ HTLCDestination(const HTLCDestination&) = delete;
+ HTLCDestination(HTLCDestination&& o) : self(o.self) { memset(&o, 0, sizeof(HTLCDestination)); }
+ HTLCDestination(LDKHTLCDestination&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKHTLCDestination)); }
+ operator LDKHTLCDestination() && { LDKHTLCDestination res = self; memset(&self, 0, sizeof(LDKHTLCDestination)); return res; }
+ ~HTLCDestination() { HTLCDestination_free(self); }
+ HTLCDestination& operator=(HTLCDestination&& o) { HTLCDestination_free(self); self = o.self; memset(&o, 0, sizeof(HTLCDestination)); return *this; }
+ LDKHTLCDestination* operator &() { return &self; }
+ LDKHTLCDestination* operator ->() { return &self; }
+ const LDKHTLCDestination* operator &() const { return &self; }
+ const LDKHTLCDestination* operator ->() const { return &self; }
+};
+class Event {
+private:
+ LDKEvent self;
+public:
+ Event(const Event&) = delete;
+ Event(Event&& o) : self(o.self) { memset(&o, 0, sizeof(Event)); }
+ Event(LDKEvent&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKEvent)); }
+ operator LDKEvent() && { LDKEvent res = self; memset(&self, 0, sizeof(LDKEvent)); return res; }
+ ~Event() { Event_free(self); }
+ Event& operator=(Event&& o) { Event_free(self); self = o.self; memset(&o, 0, sizeof(Event)); return *this; }
+ LDKEvent* operator &() { return &self; }
+ LDKEvent* operator ->() { return &self; }
+ const LDKEvent* operator &() const { return &self; }
+ const LDKEvent* operator ->() const { return &self; }
+};
+class MessageSendEvent {
+private:
+ LDKMessageSendEvent self;
+public:
+ MessageSendEvent(const MessageSendEvent&) = delete;
+ MessageSendEvent(MessageSendEvent&& o) : self(o.self) { memset(&o, 0, sizeof(MessageSendEvent)); }
+ MessageSendEvent(LDKMessageSendEvent&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMessageSendEvent)); }
+ operator LDKMessageSendEvent() && { LDKMessageSendEvent res = self; memset(&self, 0, sizeof(LDKMessageSendEvent)); return res; }
+ ~MessageSendEvent() { MessageSendEvent_free(self); }
+ MessageSendEvent& operator=(MessageSendEvent&& o) { MessageSendEvent_free(self); self = o.self; memset(&o, 0, sizeof(MessageSendEvent)); return *this; }
+ LDKMessageSendEvent* operator &() { return &self; }
+ LDKMessageSendEvent* operator ->() { return &self; }
+ const LDKMessageSendEvent* operator &() const { return &self; }
+ const LDKMessageSendEvent* operator ->() const { return &self; }
+};
+class MessageSendEventsProvider {
+private:
+ LDKMessageSendEventsProvider self;
+public:
+ MessageSendEventsProvider(const MessageSendEventsProvider&) = delete;
+ MessageSendEventsProvider(MessageSendEventsProvider&& o) : self(o.self) { memset(&o, 0, sizeof(MessageSendEventsProvider)); }
+ MessageSendEventsProvider(LDKMessageSendEventsProvider&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMessageSendEventsProvider)); }
+ operator LDKMessageSendEventsProvider() && { LDKMessageSendEventsProvider res = self; memset(&self, 0, sizeof(LDKMessageSendEventsProvider)); return res; }
+ ~MessageSendEventsProvider() { MessageSendEventsProvider_free(self); }
+ MessageSendEventsProvider& operator=(MessageSendEventsProvider&& o) { MessageSendEventsProvider_free(self); self = o.self; memset(&o, 0, sizeof(MessageSendEventsProvider)); return *this; }
+ LDKMessageSendEventsProvider* operator &() { return &self; }
+ 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 OnionMessageProvider {
+private:
+ LDKOnionMessageProvider self;
+public:
+ OnionMessageProvider(const OnionMessageProvider&) = delete;
+ OnionMessageProvider(OnionMessageProvider&& o) : self(o.self) { memset(&o, 0, sizeof(OnionMessageProvider)); }
+ OnionMessageProvider(LDKOnionMessageProvider&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKOnionMessageProvider)); }
+ operator LDKOnionMessageProvider() && { LDKOnionMessageProvider res = self; memset(&self, 0, sizeof(LDKOnionMessageProvider)); return res; }
+ ~OnionMessageProvider() { OnionMessageProvider_free(self); }
+ OnionMessageProvider& operator=(OnionMessageProvider&& o) { OnionMessageProvider_free(self); self = o.self; memset(&o, 0, sizeof(OnionMessageProvider)); return *this; }
+ LDKOnionMessageProvider* operator &() { return &self; }
+ LDKOnionMessageProvider* operator ->() { return &self; }
+ const LDKOnionMessageProvider* operator &() const { return &self; }
+ const LDKOnionMessageProvider* operator ->() const { return &self; }
+ /**
+ * Gets the next pending onion message for the peer with the given node id.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ inline LDK::OnionMessage next_onion_message_for_peer(struct LDKPublicKey peer_node_id);
+};
+class EventsProvider {
+private:
+ LDKEventsProvider self;
+public:
+ EventsProvider(const EventsProvider&) = delete;
+ EventsProvider(EventsProvider&& o) : self(o.self) { memset(&o, 0, sizeof(EventsProvider)); }
+ EventsProvider(LDKEventsProvider&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKEventsProvider)); }
+ operator LDKEventsProvider() && { LDKEventsProvider res = self; memset(&self, 0, sizeof(LDKEventsProvider)); return res; }
+ ~EventsProvider() { EventsProvider_free(self); }
+ EventsProvider& operator=(EventsProvider&& o) { EventsProvider_free(self); self = o.self; memset(&o, 0, sizeof(EventsProvider)); return *this; }
+ LDKEventsProvider* operator &() { return &self; }
+ 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.
+ *
+ * See the trait-level documentation for requirements.
+ */
+ inline void process_pending_events(struct LDKEventHandler handler);
+};
+class EventHandler {
+private:
+ LDKEventHandler self;
+public:
+ EventHandler(const EventHandler&) = delete;
+ EventHandler(EventHandler&& o) : self(o.self) { memset(&o, 0, sizeof(EventHandler)); }
+ EventHandler(LDKEventHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKEventHandler)); }
+ operator LDKEventHandler() && { LDKEventHandler res = self; memset(&self, 0, sizeof(LDKEventHandler)); return res; }
+ ~EventHandler() { EventHandler_free(self); }
+ EventHandler& operator=(EventHandler&& o) { EventHandler_free(self); self = o.self; memset(&o, 0, sizeof(EventHandler)); return *this; }
+ LDKEventHandler* operator &() { return &self; }
+ 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(struct LDKEvent event);
+};
+class BestBlock {
+private:
+ LDKBestBlock self;
+public:
+ BestBlock(const BestBlock&) = delete;
+ BestBlock(BestBlock&& o) : self(o.self) { memset(&o, 0, sizeof(BestBlock)); }
+ BestBlock(LDKBestBlock&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKBestBlock)); }
+ operator LDKBestBlock() && { LDKBestBlock res = self; memset(&self, 0, sizeof(LDKBestBlock)); return res; }
+ ~BestBlock() { BestBlock_free(self); }
+ BestBlock& operator=(BestBlock&& o) { BestBlock_free(self); self = o.self; memset(&o, 0, sizeof(BestBlock)); return *this; }
+ LDKBestBlock* operator &() { return &self; }
+ LDKBestBlock* operator ->() { return &self; }
+ const LDKBestBlock* operator &() const { return &self; }
+ const LDKBestBlock* operator ->() const { return &self; }
+};
+class AccessError {
+private:
+ LDKAccessError self;
+public:
+ AccessError(const AccessError&) = delete;
+ AccessError(AccessError&& o) : self(o.self) { memset(&o, 0, sizeof(AccessError)); }
+ AccessError(LDKAccessError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKAccessError)); }
+ operator LDKAccessError() && { LDKAccessError res = self; memset(&self, 0, sizeof(LDKAccessError)); return res; }
+ AccessError& operator=(AccessError&& o) { self = o.self; memset(&o, 0, sizeof(AccessError)); return *this; }
+ LDKAccessError* operator &() { return &self; }
+ LDKAccessError* operator ->() { return &self; }
+ const LDKAccessError* operator &() const { return &self; }
+ const LDKAccessError* operator ->() const { return &self; }
+};
+class Access {
+private:
+ LDKAccess self;
+public:
+ Access(const Access&) = delete;
+ Access(Access&& o) : self(o.self) { memset(&o, 0, sizeof(Access)); }
+ Access(LDKAccess&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKAccess)); }
+ operator LDKAccess() && { LDKAccess res = self; memset(&self, 0, sizeof(LDKAccess)); return res; }
+ ~Access() { Access_free(self); }
+ Access& operator=(Access&& o) { Access_free(self); self = o.self; memset(&o, 0, sizeof(Access)); return *this; }
+ LDKAccess* operator &() { return &self; }
+ 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/lightning/bolts/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:
+ LDKListen self;
+public:
+ Listen(const Listen&) = delete;
+ Listen(Listen&& o) : self(o.self) { memset(&o, 0, sizeof(Listen)); }
+ Listen(LDKListen&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKListen)); }
+ operator LDKListen() && { LDKListen res = self; memset(&self, 0, sizeof(LDKListen)); return res; }
+ ~Listen() { Listen_free(self); }
+ Listen& operator=(Listen&& o) { Listen_free(self); self = o.self; memset(&o, 0, sizeof(Listen)); return *this; }
+ LDKListen* operator &() { return &self; }
+ 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, with the transaction data
+ * possibly filtered.
+ */
+ inline void filtered_block_connected(const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
+ /**
+ * 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:
+ LDKConfirm self;
+public:
+ Confirm(const Confirm&) = delete;
+ Confirm(Confirm&& o) : self(o.self) { memset(&o, 0, sizeof(Confirm)); }
+ Confirm(LDKConfirm&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKConfirm)); }
+ operator LDKConfirm() && { LDKConfirm res = self; memset(&self, 0, sizeof(LDKConfirm)); return res; }
+ ~Confirm() { Confirm_free(self); }
+ Confirm& operator=(Confirm&& o) { Confirm_free(self); self = o.self; memset(&o, 0, sizeof(Confirm)); return *this; }
+ LDKConfirm* operator &() { return &self; }
+ LDKConfirm* operator ->() { return &self; }
+ const LDKConfirm* operator &() const { return &self; }
+ const LDKConfirm* operator ->() const { return &self; }
+ /**
+ * Notifies LDK of transactions confirmed in a block with a given header and height.
+ *
+ * Must 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);
+ /**
+ * Notifies LDK of a transaction that is no longer confirmed as result of a chain reorganization.
+ *
+ * Must be called for any transaction returned by [`get_relevant_txids`] if it has been
+ * reorganized out of the best chain or if it is no longer confirmed in the block with the
+ * given block hash. Once called, the given transaction will 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]);
+ /**
+ * Notifies LDK of an update to the best header connected at the given height.
+ *
+ * Must be called whenever a new chain tip becomes available. May be skipped for intermediary
+ * blocks.
+ */
+ inline void best_block_updated(const uint8_t (*header)[80], uint32_t height);
+ /**
+ * Returns transactions that must be monitored for reorganization out of the chain along
+ * with the hash of the block as part of which it had been previously confirmed.
+ *
+ * Will include any transactions passed to [`transactions_confirmed`] that have insufficient
+ * confirmations to be safe from a chain reorganization. Will not include any transactions
+ * passed to [`transaction_unconfirmed`], unless later reconfirmed.
+ *
+ * Must be called to determine the subset of transactions that must 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 must be
+ * given to [`transaction_unconfirmed`].
+ *
+ * If any of the returned transactions are confirmed in a block other than the one with the
+ * given hash, they need to be unconfirmed and reconfirmed via [`transaction_unconfirmed`] and
+ * [`transactions_confirmed`], respectively.
+ *
+ * [`transactions_confirmed`]: Self::transactions_confirmed
+ * [`transaction_unconfirmed`]: Self::transaction_unconfirmed
+ */
+ inline LDK::CVec_C2Tuple_TxidBlockHashZZ get_relevant_txids();
+};
+class ChannelMonitorUpdateStatus {
+private:
+ LDKChannelMonitorUpdateStatus self;
+public:
+ ChannelMonitorUpdateStatus(const ChannelMonitorUpdateStatus&) = delete;
+ ChannelMonitorUpdateStatus(ChannelMonitorUpdateStatus&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelMonitorUpdateStatus)); }
+ ChannelMonitorUpdateStatus(LDKChannelMonitorUpdateStatus&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelMonitorUpdateStatus)); }
+ operator LDKChannelMonitorUpdateStatus() && { LDKChannelMonitorUpdateStatus res = self; memset(&self, 0, sizeof(LDKChannelMonitorUpdateStatus)); return res; }
+ ChannelMonitorUpdateStatus& operator=(ChannelMonitorUpdateStatus&& o) { self = o.self; memset(&o, 0, sizeof(ChannelMonitorUpdateStatus)); return *this; }
+ LDKChannelMonitorUpdateStatus* operator &() { return &self; }
+ LDKChannelMonitorUpdateStatus* operator ->() { return &self; }
+ const LDKChannelMonitorUpdateStatus* operator &() const { return &self; }
+ const LDKChannelMonitorUpdateStatus* operator ->() const { return &self; }
+};
+class Watch {
+private:
+ LDKWatch self;
+public:
+ Watch(const Watch&) = delete;
+ Watch(Watch&& o) : self(o.self) { memset(&o, 0, sizeof(Watch)); }
+ Watch(LDKWatch&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKWatch)); }
+ operator LDKWatch() && { LDKWatch res = self; memset(&self, 0, sizeof(LDKWatch)); return res; }
+ ~Watch() { Watch_free(self); }
+ Watch& operator=(Watch&& o) { Watch_free(self); self = o.self; memset(&o, 0, sizeof(Watch)); return *this; }
+ LDKWatch* operator &() { return &self; }
+ 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 [`ChannelMonitorUpdateStatus::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::ChannelMonitorUpdateStatus 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
+ * [`ChannelMonitorUpdateStatus`] for invariants around returning an error.
+ *
+ * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
+ */
+ inline LDK::ChannelMonitorUpdateStatus update_channel(struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update);
+ /**
+ * Returns any monitor events since the last call. Subsequent calls must only return new
+ * events.
+ *
+ * Note that after any block- or transaction-connection calls to a [`ChannelMonitor`], no
+ * further events may be returned here until the [`ChannelMonitor`] has been fully persisted
+ * to disk.
+ *
+ * For details on asynchronous [`ChannelMonitor`] updating and returning
+ * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
+ */
+ inline LDK::CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events();
+};
+class Filter {
+private:
+ LDKFilter self;
+public:
+ Filter(const Filter&) = delete;
+ Filter(Filter&& o) : self(o.self) { memset(&o, 0, sizeof(Filter)); }
+ Filter(LDKFilter&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKFilter)); }
+ operator LDKFilter() && { LDKFilter res = self; memset(&self, 0, sizeof(LDKFilter)); return res; }
+ ~Filter() { Filter_free(self); }
+ Filter& operator=(Filter&& o) { Filter_free(self); self = o.self; memset(&o, 0, sizeof(Filter)); return *this; }
+ LDKFilter* operator &() { return &self; }
+ 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.
+ *
+ * Note that this method might be called during processing of a new block. You therefore need
+ * to ensure that also dependent output spents within an already connected block are correctly
+ * handled, e.g., by re-scanning the block in question whenever new outputs have been
+ * registered mid-processing.
+ */
+ inline void register_output(struct LDKWatchedOutput output);
+};
+class WatchedOutput {
+private:
+ LDKWatchedOutput self;
+public:
+ WatchedOutput(const WatchedOutput&) = delete;
+ WatchedOutput(WatchedOutput&& o) : self(o.self) { memset(&o, 0, sizeof(WatchedOutput)); }
+ WatchedOutput(LDKWatchedOutput&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKWatchedOutput)); }
+ operator LDKWatchedOutput() && { LDKWatchedOutput res = self; memset(&self, 0, sizeof(LDKWatchedOutput)); return res; }
+ ~WatchedOutput() { WatchedOutput_free(self); }
+ WatchedOutput& operator=(WatchedOutput&& o) { WatchedOutput_free(self); self = o.self; memset(&o, 0, sizeof(WatchedOutput)); return *this; }
+ LDKWatchedOutput* operator &() { return &self; }
+ LDKWatchedOutput* operator ->() { return &self; }
+ const LDKWatchedOutput* operator &() const { return &self; }
+ const LDKWatchedOutput* operator ->() const { return &self; }
+};
+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 `send_amt_msat` through the
+ * given channel in the direction from `source` to `target`.
+ *
+ * The channel's capacity (less any other MPP parts that are also being considered for use in
+ * the same payment) is given by `capacity_msat`. It may be determined from various sources
+ * such as a chain data, network gossip, or invoice hints. For invoice hints, a capacity near
+ * [`u64::max_value`] is given to indicate sufficient capacity for the invoice's full amount.
+ * Thus, implementations should be overflow-safe.
+ */
+ inline uint64_t channel_penalty_msat(uint64_t short_channel_id, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target, struct LDKChannelUsage usage);
+ /**
+ * Handles updating channel penalties after failing to route through a channel.
+ */
+ inline void payment_path_failed(struct LDKCVec_RouteHopZ path, uint64_t short_channel_id);
+ /**
+ * Handles updating channel penalties after successfully routing along a path.
+ */
+ inline void payment_path_successful(struct LDKCVec_RouteHopZ path);
+ /**
+ * Handles updating channel penalties after a probe over the given path failed.
+ */
+ inline void probe_failed(struct LDKCVec_RouteHopZ path, uint64_t short_channel_id);
+ /**
+ * Handles updating channel penalties after a probe over the given path succeeded.
+ */
+ inline void probe_successful(struct LDKCVec_RouteHopZ path);
+};
+class LockableScore {
+private:
+ LDKLockableScore self;
+public:
+ LockableScore(const LockableScore&) = delete;
+ LockableScore(LockableScore&& o) : self(o.self) { memset(&o, 0, sizeof(LockableScore)); }
+ LockableScore(LDKLockableScore&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKLockableScore)); }
+ operator LDKLockableScore() && { LDKLockableScore res = self; memset(&self, 0, sizeof(LDKLockableScore)); return res; }
+ ~LockableScore() { LockableScore_free(self); }
+ LockableScore& operator=(LockableScore&& o) { LockableScore_free(self); self = o.self; memset(&o, 0, sizeof(LockableScore)); return *this; }
+ LDKLockableScore* operator &() { return &self; }
+ LDKLockableScore* operator ->() { return &self; }
+ const LDKLockableScore* operator &() const { return &self; }
+ const LDKLockableScore* operator ->() const { return &self; }
+ /**
+ * Returns the locked scorer.
+ */
+ inline LDK::Score lock();
+};
+class WriteableScore {
+private:
+ LDKWriteableScore self;
+public:
+ WriteableScore(const WriteableScore&) = delete;
+ WriteableScore(WriteableScore&& o) : self(o.self) { memset(&o, 0, sizeof(WriteableScore)); }
+ WriteableScore(LDKWriteableScore&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKWriteableScore)); }
+ operator LDKWriteableScore() && { LDKWriteableScore res = self; memset(&self, 0, sizeof(LDKWriteableScore)); return res; }
+ ~WriteableScore() { WriteableScore_free(self); }
+ WriteableScore& operator=(WriteableScore&& o) { WriteableScore_free(self); self = o.self; memset(&o, 0, sizeof(WriteableScore)); return *this; }
+ LDKWriteableScore* operator &() { return &self; }
+ LDKWriteableScore* operator ->() { return &self; }
+ const LDKWriteableScore* operator &() const { return &self; }
+ const LDKWriteableScore* operator ->() const { return &self; }
+};
+class MultiThreadedLockableScore {
+private:
+ LDKMultiThreadedLockableScore self;
+public:
+ MultiThreadedLockableScore(const MultiThreadedLockableScore&) = delete;
+ MultiThreadedLockableScore(MultiThreadedLockableScore&& o) : self(o.self) { memset(&o, 0, sizeof(MultiThreadedLockableScore)); }
+ MultiThreadedLockableScore(LDKMultiThreadedLockableScore&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMultiThreadedLockableScore)); }
+ operator LDKMultiThreadedLockableScore() && { LDKMultiThreadedLockableScore res = self; memset(&self, 0, sizeof(LDKMultiThreadedLockableScore)); return res; }
+ ~MultiThreadedLockableScore() { MultiThreadedLockableScore_free(self); }
+ MultiThreadedLockableScore& operator=(MultiThreadedLockableScore&& o) { MultiThreadedLockableScore_free(self); self = o.self; memset(&o, 0, sizeof(MultiThreadedLockableScore)); return *this; }
+ LDKMultiThreadedLockableScore* operator &() { return &self; }
+ LDKMultiThreadedLockableScore* operator ->() { return &self; }
+ const LDKMultiThreadedLockableScore* operator &() const { return &self; }
+ const LDKMultiThreadedLockableScore* operator ->() const { return &self; }
+};
+class MultiThreadedScoreLock {
+private:
+ LDKMultiThreadedScoreLock self;
+public:
+ MultiThreadedScoreLock(const MultiThreadedScoreLock&) = delete;
+ MultiThreadedScoreLock(MultiThreadedScoreLock&& o) : self(o.self) { memset(&o, 0, sizeof(MultiThreadedScoreLock)); }
+ MultiThreadedScoreLock(LDKMultiThreadedScoreLock&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMultiThreadedScoreLock)); }
+ operator LDKMultiThreadedScoreLock() && { LDKMultiThreadedScoreLock res = self; memset(&self, 0, sizeof(LDKMultiThreadedScoreLock)); return res; }
+ ~MultiThreadedScoreLock() { MultiThreadedScoreLock_free(self); }
+ MultiThreadedScoreLock& operator=(MultiThreadedScoreLock&& o) { MultiThreadedScoreLock_free(self); self = o.self; memset(&o, 0, sizeof(MultiThreadedScoreLock)); return *this; }
+ LDKMultiThreadedScoreLock* operator &() { return &self; }
+ LDKMultiThreadedScoreLock* operator ->() { return &self; }
+ const LDKMultiThreadedScoreLock* operator &() const { return &self; }
+ const LDKMultiThreadedScoreLock* operator ->() const { return &self; }
+};
+class ChannelUsage {
+private:
+ LDKChannelUsage self;
+public:
+ ChannelUsage(const ChannelUsage&) = delete;
+ ChannelUsage(ChannelUsage&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelUsage)); }
+ ChannelUsage(LDKChannelUsage&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelUsage)); }
+ operator LDKChannelUsage() && { LDKChannelUsage res = self; memset(&self, 0, sizeof(LDKChannelUsage)); return res; }
+ ~ChannelUsage() { ChannelUsage_free(self); }
+ ChannelUsage& operator=(ChannelUsage&& o) { ChannelUsage_free(self); self = o.self; memset(&o, 0, sizeof(ChannelUsage)); return *this; }
+ LDKChannelUsage* operator &() { return &self; }
+ LDKChannelUsage* operator ->() { return &self; }
+ const LDKChannelUsage* operator &() const { return &self; }
+ const LDKChannelUsage* operator ->() const { return &self; }
+};
+class FixedPenaltyScorer {
+private:
+ LDKFixedPenaltyScorer self;
+public:
+ FixedPenaltyScorer(const FixedPenaltyScorer&) = delete;
+ FixedPenaltyScorer(FixedPenaltyScorer&& o) : self(o.self) { memset(&o, 0, sizeof(FixedPenaltyScorer)); }
+ FixedPenaltyScorer(LDKFixedPenaltyScorer&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKFixedPenaltyScorer)); }
+ operator LDKFixedPenaltyScorer() && { LDKFixedPenaltyScorer res = self; memset(&self, 0, sizeof(LDKFixedPenaltyScorer)); return res; }
+ ~FixedPenaltyScorer() { FixedPenaltyScorer_free(self); }
+ FixedPenaltyScorer& operator=(FixedPenaltyScorer&& o) { FixedPenaltyScorer_free(self); self = o.self; memset(&o, 0, sizeof(FixedPenaltyScorer)); return *this; }
+ LDKFixedPenaltyScorer* operator &() { return &self; }
+ LDKFixedPenaltyScorer* operator ->() { return &self; }
+ const LDKFixedPenaltyScorer* operator &() const { return &self; }
+ const LDKFixedPenaltyScorer* operator ->() const { return &self; }
+};
+class ProbabilisticScorer {
+private:
+ LDKProbabilisticScorer self;
+public:
+ ProbabilisticScorer(const ProbabilisticScorer&) = delete;
+ ProbabilisticScorer(ProbabilisticScorer&& o) : self(o.self) { memset(&o, 0, sizeof(ProbabilisticScorer)); }
+ ProbabilisticScorer(LDKProbabilisticScorer&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKProbabilisticScorer)); }
+ operator LDKProbabilisticScorer() && { LDKProbabilisticScorer res = self; memset(&self, 0, sizeof(LDKProbabilisticScorer)); return res; }
+ ~ProbabilisticScorer() { ProbabilisticScorer_free(self); }
+ ProbabilisticScorer& operator=(ProbabilisticScorer&& o) { ProbabilisticScorer_free(self); self = o.self; memset(&o, 0, sizeof(ProbabilisticScorer)); return *this; }
+ LDKProbabilisticScorer* operator &() { return &self; }
+ LDKProbabilisticScorer* operator ->() { return &self; }
+ const LDKProbabilisticScorer* operator &() const { return &self; }
+ const LDKProbabilisticScorer* operator ->() const { return &self; }
+};
+class ProbabilisticScoringParameters {
+private:
+ LDKProbabilisticScoringParameters self;
+public:
+ ProbabilisticScoringParameters(const ProbabilisticScoringParameters&) = delete;
+ ProbabilisticScoringParameters(ProbabilisticScoringParameters&& o) : self(o.self) { memset(&o, 0, sizeof(ProbabilisticScoringParameters)); }
+ ProbabilisticScoringParameters(LDKProbabilisticScoringParameters&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKProbabilisticScoringParameters)); }
+ operator LDKProbabilisticScoringParameters() && { LDKProbabilisticScoringParameters res = self; memset(&self, 0, sizeof(LDKProbabilisticScoringParameters)); return res; }
+ ~ProbabilisticScoringParameters() { ProbabilisticScoringParameters_free(self); }
+ ProbabilisticScoringParameters& operator=(ProbabilisticScoringParameters&& o) { ProbabilisticScoringParameters_free(self); self = o.self; memset(&o, 0, sizeof(ProbabilisticScoringParameters)); return *this; }
+ LDKProbabilisticScoringParameters* operator &() { return &self; }
+ LDKProbabilisticScoringParameters* operator ->() { return &self; }
+ const LDKProbabilisticScoringParameters* operator &() const { return &self; }
+ const LDKProbabilisticScoringParameters* operator ->() const { return &self; }
+};
+class InitFeatures {
+private:
+ LDKInitFeatures self;
+public:
+ InitFeatures(const InitFeatures&) = delete;
+ InitFeatures(InitFeatures&& o) : self(o.self) { memset(&o, 0, sizeof(InitFeatures)); }
+ InitFeatures(LDKInitFeatures&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInitFeatures)); }
+ operator LDKInitFeatures() && { LDKInitFeatures res = self; memset(&self, 0, sizeof(LDKInitFeatures)); return res; }
+ ~InitFeatures() { InitFeatures_free(self); }
+ InitFeatures& operator=(InitFeatures&& o) { InitFeatures_free(self); self = o.self; memset(&o, 0, sizeof(InitFeatures)); return *this; }
+ LDKInitFeatures* operator &() { return &self; }
+ LDKInitFeatures* operator ->() { return &self; }
+ const LDKInitFeatures* operator &() const { return &self; }
+ const LDKInitFeatures* operator ->() const { return &self; }
+};
+class NodeFeatures {
+private:
+ LDKNodeFeatures self;
+public:
+ NodeFeatures(const NodeFeatures&) = delete;
+ NodeFeatures(NodeFeatures&& o) : self(o.self) { memset(&o, 0, sizeof(NodeFeatures)); }
+ NodeFeatures(LDKNodeFeatures&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKNodeFeatures)); }
+ operator LDKNodeFeatures() && { LDKNodeFeatures res = self; memset(&self, 0, sizeof(LDKNodeFeatures)); return res; }
+ ~NodeFeatures() { NodeFeatures_free(self); }
+ NodeFeatures& operator=(NodeFeatures&& o) { NodeFeatures_free(self); self = o.self; memset(&o, 0, sizeof(NodeFeatures)); return *this; }
+ LDKNodeFeatures* operator &() { return &self; }
+ LDKNodeFeatures* operator ->() { return &self; }
+ const LDKNodeFeatures* operator &() const { return &self; }
+ const LDKNodeFeatures* operator ->() const { return &self; }
+};
+class ChannelFeatures {
+private:
+ LDKChannelFeatures self;
+public:
+ ChannelFeatures(const ChannelFeatures&) = delete;
+ ChannelFeatures(ChannelFeatures&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelFeatures)); }
+ ChannelFeatures(LDKChannelFeatures&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelFeatures)); }
+ operator LDKChannelFeatures() && { LDKChannelFeatures res = self; memset(&self, 0, sizeof(LDKChannelFeatures)); return res; }
+ ~ChannelFeatures() { ChannelFeatures_free(self); }
+ ChannelFeatures& operator=(ChannelFeatures&& o) { ChannelFeatures_free(self); self = o.self; memset(&o, 0, sizeof(ChannelFeatures)); return *this; }
+ LDKChannelFeatures* operator &() { return &self; }
+ LDKChannelFeatures* operator ->() { return &self; }
+ const LDKChannelFeatures* operator &() const { return &self; }
+ const LDKChannelFeatures* operator ->() const { return &self; }
+};
+class InvoiceFeatures {
+private:
+ LDKInvoiceFeatures self;
+public:
+ InvoiceFeatures(const InvoiceFeatures&) = delete;
+ InvoiceFeatures(InvoiceFeatures&& o) : self(o.self) { memset(&o, 0, sizeof(InvoiceFeatures)); }
+ InvoiceFeatures(LDKInvoiceFeatures&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInvoiceFeatures)); }
+ operator LDKInvoiceFeatures() && { LDKInvoiceFeatures res = self; memset(&self, 0, sizeof(LDKInvoiceFeatures)); return res; }
+ ~InvoiceFeatures() { InvoiceFeatures_free(self); }
+ InvoiceFeatures& operator=(InvoiceFeatures&& o) { InvoiceFeatures_free(self); self = o.self; memset(&o, 0, sizeof(InvoiceFeatures)); return *this; }
+ LDKInvoiceFeatures* operator &() { return &self; }
+ LDKInvoiceFeatures* operator ->() { return &self; }
+ const LDKInvoiceFeatures* operator &() const { return &self; }
+ const LDKInvoiceFeatures* operator ->() const { return &self; }
+};
+class OfferFeatures {
+private:
+ LDKOfferFeatures self;
+public:
+ OfferFeatures(const OfferFeatures&) = delete;
+ OfferFeatures(OfferFeatures&& o) : self(o.self) { memset(&o, 0, sizeof(OfferFeatures)); }
+ OfferFeatures(LDKOfferFeatures&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKOfferFeatures)); }
+ operator LDKOfferFeatures() && { LDKOfferFeatures res = self; memset(&self, 0, sizeof(LDKOfferFeatures)); return res; }
+ ~OfferFeatures() { OfferFeatures_free(self); }
+ OfferFeatures& operator=(OfferFeatures&& o) { OfferFeatures_free(self); self = o.self; memset(&o, 0, sizeof(OfferFeatures)); return *this; }
+ LDKOfferFeatures* operator &() { return &self; }
+ LDKOfferFeatures* operator ->() { return &self; }
+ const LDKOfferFeatures* operator &() const { return &self; }
+ const LDKOfferFeatures* operator ->() const { return &self; }
+};
+class InvoiceRequestFeatures {
+private:
+ LDKInvoiceRequestFeatures self;
+public:
+ InvoiceRequestFeatures(const InvoiceRequestFeatures&) = delete;
+ InvoiceRequestFeatures(InvoiceRequestFeatures&& o) : self(o.self) { memset(&o, 0, sizeof(InvoiceRequestFeatures)); }
+ InvoiceRequestFeatures(LDKInvoiceRequestFeatures&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInvoiceRequestFeatures)); }
+ operator LDKInvoiceRequestFeatures() && { LDKInvoiceRequestFeatures res = self; memset(&self, 0, sizeof(LDKInvoiceRequestFeatures)); return res; }
+ ~InvoiceRequestFeatures() { InvoiceRequestFeatures_free(self); }
+ InvoiceRequestFeatures& operator=(InvoiceRequestFeatures&& o) { InvoiceRequestFeatures_free(self); self = o.self; memset(&o, 0, sizeof(InvoiceRequestFeatures)); return *this; }
+ LDKInvoiceRequestFeatures* operator &() { return &self; }
+ LDKInvoiceRequestFeatures* operator ->() { return &self; }
+ const LDKInvoiceRequestFeatures* operator &() const { return &self; }
+ const LDKInvoiceRequestFeatures* operator ->() const { return &self; }
+};
+class ChannelTypeFeatures {
+private:
+ LDKChannelTypeFeatures self;
+public:
+ ChannelTypeFeatures(const ChannelTypeFeatures&) = delete;
+ ChannelTypeFeatures(ChannelTypeFeatures&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelTypeFeatures)); }
+ ChannelTypeFeatures(LDKChannelTypeFeatures&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelTypeFeatures)); }
+ operator LDKChannelTypeFeatures() && { LDKChannelTypeFeatures res = self; memset(&self, 0, sizeof(LDKChannelTypeFeatures)); return res; }
+ ~ChannelTypeFeatures() { ChannelTypeFeatures_free(self); }
+ ChannelTypeFeatures& operator=(ChannelTypeFeatures&& o) { ChannelTypeFeatures_free(self); self = o.self; memset(&o, 0, sizeof(ChannelTypeFeatures)); return *this; }
+ LDKChannelTypeFeatures* operator &() { return &self; }
+ LDKChannelTypeFeatures* operator ->() { return &self; }
+ const LDKChannelTypeFeatures* operator &() const { return &self; }
+ const LDKChannelTypeFeatures* operator ->() const { return &self; }
+};
+class OnionMessageContents {
+private:
+ LDKOnionMessageContents self;
+public:
+ OnionMessageContents(const OnionMessageContents&) = delete;
+ OnionMessageContents(OnionMessageContents&& o) : self(o.self) { memset(&o, 0, sizeof(OnionMessageContents)); }
+ OnionMessageContents(LDKOnionMessageContents&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKOnionMessageContents)); }
+ operator LDKOnionMessageContents() && { LDKOnionMessageContents res = self; memset(&self, 0, sizeof(LDKOnionMessageContents)); return res; }
+ ~OnionMessageContents() { OnionMessageContents_free(self); }
+ OnionMessageContents& operator=(OnionMessageContents&& o) { OnionMessageContents_free(self); self = o.self; memset(&o, 0, sizeof(OnionMessageContents)); return *this; }
+ LDKOnionMessageContents* operator &() { return &self; }
+ LDKOnionMessageContents* operator ->() { return &self; }
+ const LDKOnionMessageContents* operator &() const { return &self; }
+ const LDKOnionMessageContents* operator ->() const { return &self; }
+};
+class CustomOnionMessageContents {
+private:
+ LDKCustomOnionMessageContents self;
+public:
+ CustomOnionMessageContents(const CustomOnionMessageContents&) = delete;
+ CustomOnionMessageContents(CustomOnionMessageContents&& o) : self(o.self) { memset(&o, 0, sizeof(CustomOnionMessageContents)); }
+ CustomOnionMessageContents(LDKCustomOnionMessageContents&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCustomOnionMessageContents)); }
+ operator LDKCustomOnionMessageContents() && { LDKCustomOnionMessageContents res = self; memset(&self, 0, sizeof(LDKCustomOnionMessageContents)); return res; }
+ ~CustomOnionMessageContents() { CustomOnionMessageContents_free(self); }
+ CustomOnionMessageContents& operator=(CustomOnionMessageContents&& o) { CustomOnionMessageContents_free(self); self = o.self; memset(&o, 0, sizeof(CustomOnionMessageContents)); return *this; }
+ LDKCustomOnionMessageContents* operator &() { return &self; }
+ LDKCustomOnionMessageContents* operator ->() { return &self; }
+ const LDKCustomOnionMessageContents* operator &() const { return &self; }
+ const LDKCustomOnionMessageContents* operator ->() const { return &self; }
+ /**
+ * Returns the TLV type identifying the message contents. MUST be >= 64.
+ */
+ inline uint64_t tlv_type();
+};
+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;
+public:
+ NetworkGraph(const NetworkGraph&) = delete;
+ NetworkGraph(NetworkGraph&& o) : self(o.self) { memset(&o, 0, sizeof(NetworkGraph)); }
+ NetworkGraph(LDKNetworkGraph&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKNetworkGraph)); }
+ operator LDKNetworkGraph() && { LDKNetworkGraph res = self; memset(&self, 0, sizeof(LDKNetworkGraph)); return res; }
+ ~NetworkGraph() { NetworkGraph_free(self); }
+ NetworkGraph& operator=(NetworkGraph&& o) { NetworkGraph_free(self); self = o.self; memset(&o, 0, sizeof(NetworkGraph)); return *this; }
+ LDKNetworkGraph* operator &() { return &self; }
+ LDKNetworkGraph* operator ->() { return &self; }
+ const LDKNetworkGraph* operator &() const { return &self; }
+ const LDKNetworkGraph* operator ->() const { return &self; }
+};
+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:
+ LDKNetworkUpdate self;
+public:
+ 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 P2PGossipSync {
+private:
+ LDKP2PGossipSync self;
+public:
+ P2PGossipSync(const P2PGossipSync&) = delete;
+ P2PGossipSync(P2PGossipSync&& o) : self(o.self) { memset(&o, 0, sizeof(P2PGossipSync)); }
+ P2PGossipSync(LDKP2PGossipSync&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKP2PGossipSync)); }
+ operator LDKP2PGossipSync() && { LDKP2PGossipSync res = self; memset(&self, 0, sizeof(LDKP2PGossipSync)); return res; }
+ ~P2PGossipSync() { P2PGossipSync_free(self); }
+ P2PGossipSync& operator=(P2PGossipSync&& o) { P2PGossipSync_free(self); self = o.self; memset(&o, 0, sizeof(P2PGossipSync)); return *this; }
+ LDKP2PGossipSync* operator &() { return &self; }
+ LDKP2PGossipSync* operator ->() { return &self; }
+ const LDKP2PGossipSync* operator &() const { return &self; }
+ const LDKP2PGossipSync* operator ->() const { return &self; }
+};
+class ChannelUpdateInfo {
+private:
+ LDKChannelUpdateInfo self;
+public:
+ ChannelUpdateInfo(const ChannelUpdateInfo&) = delete;
+ ChannelUpdateInfo(ChannelUpdateInfo&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelUpdateInfo)); }
+ ChannelUpdateInfo(LDKChannelUpdateInfo&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelUpdateInfo)); }
+ operator LDKChannelUpdateInfo() && { LDKChannelUpdateInfo res = self; memset(&self, 0, sizeof(LDKChannelUpdateInfo)); return res; }
+ ~ChannelUpdateInfo() { ChannelUpdateInfo_free(self); }
+ ChannelUpdateInfo& operator=(ChannelUpdateInfo&& o) { ChannelUpdateInfo_free(self); self = o.self; memset(&o, 0, sizeof(ChannelUpdateInfo)); return *this; }
+ LDKChannelUpdateInfo* operator &() { return &self; }
+ LDKChannelUpdateInfo* operator ->() { return &self; }
+ const LDKChannelUpdateInfo* operator &() const { return &self; }
+ const LDKChannelUpdateInfo* operator ->() const { return &self; }
+};
+class ChannelInfo {
+private:
+ LDKChannelInfo self;
+public:
+ ChannelInfo(const ChannelInfo&) = delete;
+ ChannelInfo(ChannelInfo&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelInfo)); }
+ ChannelInfo(LDKChannelInfo&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelInfo)); }
+ operator LDKChannelInfo() && { LDKChannelInfo res = self; memset(&self, 0, sizeof(LDKChannelInfo)); return res; }
+ ~ChannelInfo() { ChannelInfo_free(self); }
+ ChannelInfo& operator=(ChannelInfo&& o) { ChannelInfo_free(self); self = o.self; memset(&o, 0, sizeof(ChannelInfo)); return *this; }
+ LDKChannelInfo* operator &() { return &self; }
+ LDKChannelInfo* operator ->() { return &self; }
+ const LDKChannelInfo* operator &() const { return &self; }
+ const LDKChannelInfo* operator ->() const { return &self; }
+};
+class DirectedChannelInfo {
+private:
+ LDKDirectedChannelInfo self;
+public:
+ DirectedChannelInfo(const DirectedChannelInfo&) = delete;
+ DirectedChannelInfo(DirectedChannelInfo&& o) : self(o.self) { memset(&o, 0, sizeof(DirectedChannelInfo)); }
+ DirectedChannelInfo(LDKDirectedChannelInfo&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKDirectedChannelInfo)); }
+ operator LDKDirectedChannelInfo() && { LDKDirectedChannelInfo res = self; memset(&self, 0, sizeof(LDKDirectedChannelInfo)); return res; }
+ ~DirectedChannelInfo() { DirectedChannelInfo_free(self); }
+ DirectedChannelInfo& operator=(DirectedChannelInfo&& o) { DirectedChannelInfo_free(self); self = o.self; memset(&o, 0, sizeof(DirectedChannelInfo)); return *this; }
+ LDKDirectedChannelInfo* operator &() { return &self; }
+ LDKDirectedChannelInfo* operator ->() { return &self; }
+ const LDKDirectedChannelInfo* operator &() const { return &self; }
+ const LDKDirectedChannelInfo* operator ->() const { return &self; }
+};
+class EffectiveCapacity {
+private:
+ LDKEffectiveCapacity self;
+public:
+ EffectiveCapacity(const EffectiveCapacity&) = delete;
+ EffectiveCapacity(EffectiveCapacity&& o) : self(o.self) { memset(&o, 0, sizeof(EffectiveCapacity)); }
+ EffectiveCapacity(LDKEffectiveCapacity&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKEffectiveCapacity)); }
+ operator LDKEffectiveCapacity() && { LDKEffectiveCapacity res = self; memset(&self, 0, sizeof(LDKEffectiveCapacity)); return res; }
+ ~EffectiveCapacity() { EffectiveCapacity_free(self); }
+ EffectiveCapacity& operator=(EffectiveCapacity&& o) { EffectiveCapacity_free(self); self = o.self; memset(&o, 0, sizeof(EffectiveCapacity)); return *this; }
+ LDKEffectiveCapacity* operator &() { return &self; }
+ LDKEffectiveCapacity* operator ->() { return &self; }
+ const LDKEffectiveCapacity* operator &() const { return &self; }
+ const LDKEffectiveCapacity* operator ->() const { return &self; }
+};
+class RoutingFees {
+private:
+ LDKRoutingFees self;
+public:
+ RoutingFees(const RoutingFees&) = delete;
+ RoutingFees(RoutingFees&& o) : self(o.self) { memset(&o, 0, sizeof(RoutingFees)); }
+ RoutingFees(LDKRoutingFees&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRoutingFees)); }
+ operator LDKRoutingFees() && { LDKRoutingFees res = self; memset(&self, 0, sizeof(LDKRoutingFees)); return res; }
+ ~RoutingFees() { RoutingFees_free(self); }
+ RoutingFees& operator=(RoutingFees&& o) { RoutingFees_free(self); self = o.self; memset(&o, 0, sizeof(RoutingFees)); return *this; }
+ LDKRoutingFees* operator &() { return &self; }
+ LDKRoutingFees* operator ->() { return &self; }
+ const LDKRoutingFees* operator &() const { return &self; }
+ const LDKRoutingFees* operator ->() const { return &self; }
+};
+class NodeAnnouncementInfo {
+private:
+ LDKNodeAnnouncementInfo self;
+public:
+ NodeAnnouncementInfo(const NodeAnnouncementInfo&) = delete;
+ NodeAnnouncementInfo(NodeAnnouncementInfo&& o) : self(o.self) { memset(&o, 0, sizeof(NodeAnnouncementInfo)); }
+ NodeAnnouncementInfo(LDKNodeAnnouncementInfo&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKNodeAnnouncementInfo)); }
+ operator LDKNodeAnnouncementInfo() && { LDKNodeAnnouncementInfo res = self; memset(&self, 0, sizeof(LDKNodeAnnouncementInfo)); return res; }
+ ~NodeAnnouncementInfo() { NodeAnnouncementInfo_free(self); }
+ NodeAnnouncementInfo& operator=(NodeAnnouncementInfo&& o) { NodeAnnouncementInfo_free(self); self = o.self; memset(&o, 0, sizeof(NodeAnnouncementInfo)); return *this; }
+ LDKNodeAnnouncementInfo* operator &() { return &self; }
+ LDKNodeAnnouncementInfo* operator ->() { return &self; }
+ const LDKNodeAnnouncementInfo* operator &() const { return &self; }
+ const LDKNodeAnnouncementInfo* operator ->() const { return &self; }
+};
+class NodeAlias {
+private:
+ LDKNodeAlias self;
+public:
+ NodeAlias(const NodeAlias&) = delete;
+ NodeAlias(NodeAlias&& o) : self(o.self) { memset(&o, 0, sizeof(NodeAlias)); }
+ NodeAlias(LDKNodeAlias&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKNodeAlias)); }
+ operator LDKNodeAlias() && { LDKNodeAlias res = self; memset(&self, 0, sizeof(LDKNodeAlias)); return res; }
+ ~NodeAlias() { NodeAlias_free(self); }
+ NodeAlias& operator=(NodeAlias&& o) { NodeAlias_free(self); self = o.self; memset(&o, 0, sizeof(NodeAlias)); return *this; }
+ LDKNodeAlias* operator &() { return &self; }
+ LDKNodeAlias* operator ->() { return &self; }
+ const LDKNodeAlias* operator &() const { return &self; }
+ const LDKNodeAlias* operator ->() const { return &self; }
+};
+class NodeInfo {
+private:
+ LDKNodeInfo self;
+public:
+ NodeInfo(const NodeInfo&) = delete;
+ NodeInfo(NodeInfo&& o) : self(o.self) { memset(&o, 0, sizeof(NodeInfo)); }
+ NodeInfo(LDKNodeInfo&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKNodeInfo)); }
+ operator LDKNodeInfo() && { LDKNodeInfo res = self; memset(&self, 0, sizeof(LDKNodeInfo)); return res; }
+ ~NodeInfo() { NodeInfo_free(self); }
+ NodeInfo& operator=(NodeInfo&& o) { NodeInfo_free(self); self = o.self; memset(&o, 0, sizeof(NodeInfo)); return *this; }
+ LDKNodeInfo* operator &() { return &self; }
+ LDKNodeInfo* operator ->() { return &self; }
+ const LDKNodeInfo* operator &() const { return &self; }
+ const LDKNodeInfo* operator ->() const { return &self; }
+};
+class DelayedPaymentOutputDescriptor {
+private:
+ LDKDelayedPaymentOutputDescriptor self;
+public:
+ DelayedPaymentOutputDescriptor(const DelayedPaymentOutputDescriptor&) = delete;
+ DelayedPaymentOutputDescriptor(DelayedPaymentOutputDescriptor&& o) : self(o.self) { memset(&o, 0, sizeof(DelayedPaymentOutputDescriptor)); }
+ DelayedPaymentOutputDescriptor(LDKDelayedPaymentOutputDescriptor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKDelayedPaymentOutputDescriptor)); }
+ operator LDKDelayedPaymentOutputDescriptor() && { LDKDelayedPaymentOutputDescriptor res = self; memset(&self, 0, sizeof(LDKDelayedPaymentOutputDescriptor)); return res; }
+ ~DelayedPaymentOutputDescriptor() { DelayedPaymentOutputDescriptor_free(self); }
+ DelayedPaymentOutputDescriptor& operator=(DelayedPaymentOutputDescriptor&& o) { DelayedPaymentOutputDescriptor_free(self); self = o.self; memset(&o, 0, sizeof(DelayedPaymentOutputDescriptor)); return *this; }
+ LDKDelayedPaymentOutputDescriptor* operator &() { return &self; }
+ LDKDelayedPaymentOutputDescriptor* operator ->() { return &self; }
+ const LDKDelayedPaymentOutputDescriptor* operator &() const { return &self; }
+ const LDKDelayedPaymentOutputDescriptor* operator ->() const { return &self; }
+};
+class StaticPaymentOutputDescriptor {
+private:
+ LDKStaticPaymentOutputDescriptor self;
+public:
+ StaticPaymentOutputDescriptor(const StaticPaymentOutputDescriptor&) = delete;
+ StaticPaymentOutputDescriptor(StaticPaymentOutputDescriptor&& o) : self(o.self) { memset(&o, 0, sizeof(StaticPaymentOutputDescriptor)); }
+ StaticPaymentOutputDescriptor(LDKStaticPaymentOutputDescriptor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKStaticPaymentOutputDescriptor)); }
+ operator LDKStaticPaymentOutputDescriptor() && { LDKStaticPaymentOutputDescriptor res = self; memset(&self, 0, sizeof(LDKStaticPaymentOutputDescriptor)); return res; }
+ ~StaticPaymentOutputDescriptor() { StaticPaymentOutputDescriptor_free(self); }
+ StaticPaymentOutputDescriptor& operator=(StaticPaymentOutputDescriptor&& o) { StaticPaymentOutputDescriptor_free(self); self = o.self; memset(&o, 0, sizeof(StaticPaymentOutputDescriptor)); return *this; }
+ LDKStaticPaymentOutputDescriptor* operator &() { return &self; }
+ LDKStaticPaymentOutputDescriptor* operator ->() { return &self; }
+ const LDKStaticPaymentOutputDescriptor* operator &() const { return &self; }
+ const LDKStaticPaymentOutputDescriptor* operator ->() const { return &self; }
+};
+class SpendableOutputDescriptor {
+private:
+ LDKSpendableOutputDescriptor self;
+public:
+ SpendableOutputDescriptor(const SpendableOutputDescriptor&) = delete;
+ SpendableOutputDescriptor(SpendableOutputDescriptor&& o) : self(o.self) { memset(&o, 0, sizeof(SpendableOutputDescriptor)); }
+ SpendableOutputDescriptor(LDKSpendableOutputDescriptor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSpendableOutputDescriptor)); }
+ operator LDKSpendableOutputDescriptor() && { LDKSpendableOutputDescriptor res = self; memset(&self, 0, sizeof(LDKSpendableOutputDescriptor)); return res; }
+ ~SpendableOutputDescriptor() { SpendableOutputDescriptor_free(self); }
+ SpendableOutputDescriptor& operator=(SpendableOutputDescriptor&& o) { SpendableOutputDescriptor_free(self); self = o.self; memset(&o, 0, sizeof(SpendableOutputDescriptor)); return *this; }
+ LDKSpendableOutputDescriptor* operator &() { return &self; }
+ LDKSpendableOutputDescriptor* operator ->() { return &self; }
+ const LDKSpendableOutputDescriptor* operator &() const { return &self; }
+ const LDKSpendableOutputDescriptor* operator ->() const { return &self; }
+};
+class BaseSign {
+private:
+ LDKBaseSign self;
+public:
+ BaseSign(const BaseSign&) = delete;
+ BaseSign(BaseSign&& o) : self(o.self) { memset(&o, 0, sizeof(BaseSign)); }
+ BaseSign(LDKBaseSign&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKBaseSign)); }
+ operator LDKBaseSign() && { LDKBaseSign res = self; memset(&self, 0, sizeof(LDKBaseSign)); return res; }
+ ~BaseSign() { BaseSign_free(self); }
+ BaseSign& operator=(BaseSign&& o) { BaseSign_free(self); self = o.self; memset(&o, 0, sizeof(BaseSign)); return *this; }
+ LDKBaseSign* operator &() { return &self; }
+ 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.
+ *
+ * The preimages of outgoing HTLCs that were fulfilled since the last commitment are provided.
+ * A validating signer should ensure that an HTLC output is removed only when the matching
+ * preimage is provided, or when the value to holder is restored.
+ *
+ * Note that all the relevant preimages will be provided, but there may also be additional
+ * irrelevant or duplicate preimages.
+ */
+ inline LDK::CResult_NoneNoneZ validate_holder_commitment(const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx, struct LDKCVec_PaymentPreimageZ preimages);
+ /**
+ * Returns 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
+ * [`BaseSign`] 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.
+ *
+ * The preimages of outgoing HTLCs that were fulfilled since the last commitment are provided.
+ * A validating signer should ensure that an HTLC output is removed only when the matching
+ * preimage is provided, or when the value to holder is restored.
+ *
+ * Note that all the relevant preimages will be provided, but there may also be additional
+ * irrelevant or duplicate preimages.
+ */
+ inline LDK::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment(const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx, struct LDKCVec_PaymentPreimageZ preimages);
+ /**
+ * 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]);
+ /**
+ * Creates a signature for a holder's commitment transaction and its claiming HTLC transactions.
+ *
+ * This will be called
+ * - with a non-revoked `commitment_tx`.
+ * - with the latest `commitment_tx` when we initiate a force-close.
+ * - with the previous `commitment_tx`, just to get claiming HTLC
+ * signatures, if we are reacting to a [`ChannelMonitor`]
+ * [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas)
+ * that decided to broadcast before it had been updated to the latest `commitment_tx`.
+ *
+ * This may be called multiple times for the same transaction.
+ *
+ * An external signer implementation should check that the commitment has not been revoked.
+ *
+ * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+ */
+ 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 the 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 an 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);
+ /**
+ * Computes the signature for a commitment transaction's anchor output used as an
+ * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+ */
+ inline LDK::CResult_SignatureNoneZ sign_holder_anchor_input(struct LDKTransaction anchor_tx, uintptr_t input);
+ /**
+ * Signs a channel announcement message with our funding key and our node secret key (aka
+ * node_id or network_key), proving it comes from one of the channel participants.
+ *
+ * The first returned signature should be from our node secret key, the second from our
+ * funding key.
+ *
+ * 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_C2Tuple_SignatureSignatureZNoneZ 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. Since these
+ * are static channel data, they MUST NOT be allowed to change to different values once set,
+ * as LDK may call this method more than once.
+ *
+ * channel_parameters.is_populated() MUST be true.
+ */
+ inline void provide_channel_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters);
+};
+class Sign {
+private:
+ LDKSign self;
+public:
+ Sign(const Sign&) = delete;
+ Sign(Sign&& o) : self(o.self) { memset(&o, 0, sizeof(Sign)); }
+ Sign(LDKSign&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSign)); }
+ operator LDKSign() && { LDKSign res = self; memset(&self, 0, sizeof(LDKSign)); return res; }
+ ~Sign() { Sign_free(self); }
+ Sign& operator=(Sign&& o) { Sign_free(self); self = o.self; memset(&o, 0, sizeof(Sign)); return *this; }
+ LDKSign* operator &() { return &self; }
+ LDKSign* operator ->() { return &self; }
+ const LDKSign* operator &() const { return &self; }
+ const LDKSign* operator ->() const { return &self; }
+};
+class Recipient {
+private:
+ LDKRecipient self;
+public:
+ Recipient(const Recipient&) = delete;
+ Recipient(Recipient&& o) : self(o.self) { memset(&o, 0, sizeof(Recipient)); }
+ Recipient(LDKRecipient&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRecipient)); }
+ operator LDKRecipient() && { LDKRecipient res = self; memset(&self, 0, sizeof(LDKRecipient)); return res; }
+ Recipient& operator=(Recipient&& o) { self = o.self; memset(&o, 0, sizeof(Recipient)); return *this; }
+ LDKRecipient* operator &() { return &self; }
+ LDKRecipient* operator ->() { return &self; }
+ const LDKRecipient* operator &() const { return &self; }
+ const LDKRecipient* operator ->() const { return &self; }
+};
+class KeysInterface {
+private:
+ LDKKeysInterface self;
+public:
+ KeysInterface(const KeysInterface&) = delete;
+ KeysInterface(KeysInterface&& o) : self(o.self) { memset(&o, 0, sizeof(KeysInterface)); }
+ KeysInterface(LDKKeysInterface&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKKeysInterface)); }
+ operator LDKKeysInterface() && { LDKKeysInterface res = self; memset(&self, 0, sizeof(LDKKeysInterface)); return res; }
+ ~KeysInterface() { KeysInterface_free(self); }
+ KeysInterface& operator=(KeysInterface&& o) { KeysInterface_free(self); self = o.self; memset(&o, 0, sizeof(KeysInterface)); return *this; }
+ LDKKeysInterface* operator &() { return &self; }
+ LDKKeysInterface* operator ->() { return &self; }
+ const LDKKeysInterface* operator &() const { return &self; }
+ const LDKKeysInterface* operator ->() const { return &self; }
+ /**
+ * Get node secret key based on the provided [`Recipient`].
+ *
+ * The `node_id`/`network_key` is the public key that corresponds to this secret key.
+ *
+ * This method must return the same value each time it is called with a given [`Recipient`]
+ * parameter.
+ *
+ * Errors if the [`Recipient`] variant is not supported by the implementation.
+ */
+ inline LDK::CResult_SecretKeyNoneZ get_node_secret(enum LDKRecipient recipient);
+ /**
+ * Get node id based on the provided [`Recipient`]. This public key corresponds to the secret in
+ * [`get_node_secret`].
+ *
+ * This method must return the same value each time it is called with a given [`Recipient`]
+ * parameter.
+ *
+ * Errors if the [`Recipient`] variant is not supported by the implementation.
+ *
+ * [`get_node_secret`]: Self::get_node_secret
+ */
+ inline LDK::CResult_PublicKeyNoneZ get_node_id(enum LDKRecipient recipient);
+ /**
+ * Gets the ECDH shared secret of our [`node secret`] and `other_key`, multiplying by `tweak` if
+ * one is provided. Note that this tweak can be applied to `other_key` instead of our node
+ * secret, though this is less efficient.
+ *
+ * Errors if the [`Recipient`] variant is not supported by the implementation.
+ *
+ * [`node secret`]: Self::get_node_secret
+ */
+ inline LDK::CResult_SharedSecretNoneZ ecdh(enum LDKRecipient recipient, struct LDKPublicKey other_key, struct LDKCOption_ScalarZ tweak);
+ /**
+ * 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 LDKThirtyTwoBytes generate_channel_keys_id(bool inbound, uint64_t channel_value_satoshis, struct LDKU128 user_channel_id);
+ /**
+ * Derives the private key material backing a `Signer`.
+ *
+ * To derive a new `Signer`, a fresh `channel_keys_id` should be obtained through
+ * [`KeysInterface::generate_channel_keys_id`]. Otherwise, an existing `Signer` can be
+ * re-derived from its `channel_keys_id`, which can be obtained through its trait method
+ * [`BaseSign::channel_keys_id`].
+ */
+ inline LDK::Sign derive_channel_signer(uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id);
+ /**
+ * 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 (i.e., [`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.
+ *
+ * This method is slowly being phased out -- it will only be called when reading objects
+ * written by LDK versions prior to 0.0.113.
+ *
+ * [`Signer`]: Self::Signer
+ * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+ */
+ inline LDK::CResult_SignDecodeErrorZ read_chan_signer(struct LDKu8slice reader);
+ /**
+ * Sign an invoice.
+ * By parameterizing by the raw invoice bytes 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.
+ * The `hrp` is ASCII bytes, while the invoice data is base32-encoded.
+ *
+ * The secret key used to sign the invoice is dependent on the [`Recipient`].
+ *
+ * Errors if the [`Recipient`] variant is not supported by the implementation.
+ */
+ inline LDK::CResult_RecoverableSignatureNoneZ sign_invoice(struct LDKu8slice hrp_bytes, struct LDKCVec_U5Z invoice_data, enum LDKRecipient receipient);
+ /**
+ * Get secret key material as bytes for use in encrypting and decrypting inbound payment data.
+ *
+ * If the implementor of this trait supports [phantom node payments], then every node that is
+ * intended to be included in the phantom invoice route hints must return the same value from
+ * this method.
+ *
+ * This method must return the same value each time it is called.
+ *
+ * [phantom node payments]: PhantomKeysManager
+ */
+ inline LDKThirtyTwoBytes get_inbound_payment_key_material();
+};
+class InMemorySigner {
+private:
+ LDKInMemorySigner self;
+public:
+ InMemorySigner(const InMemorySigner&) = delete;
+ InMemorySigner(InMemorySigner&& o) : self(o.self) { memset(&o, 0, sizeof(InMemorySigner)); }
+ InMemorySigner(LDKInMemorySigner&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInMemorySigner)); }
+ operator LDKInMemorySigner() && { LDKInMemorySigner res = self; memset(&self, 0, sizeof(LDKInMemorySigner)); return res; }
+ ~InMemorySigner() { InMemorySigner_free(self); }
+ InMemorySigner& operator=(InMemorySigner&& o) { InMemorySigner_free(self); self = o.self; memset(&o, 0, sizeof(InMemorySigner)); return *this; }
+ LDKInMemorySigner* operator &() { return &self; }
+ LDKInMemorySigner* operator ->() { return &self; }
+ const LDKInMemorySigner* operator &() const { return &self; }
+ const LDKInMemorySigner* operator ->() const { return &self; }
+};
+class KeysManager {
+private:
+ LDKKeysManager self;
+public:
+ KeysManager(const KeysManager&) = delete;
+ KeysManager(KeysManager&& o) : self(o.self) { memset(&o, 0, sizeof(KeysManager)); }
+ KeysManager(LDKKeysManager&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKKeysManager)); }
+ operator LDKKeysManager() && { LDKKeysManager res = self; memset(&self, 0, sizeof(LDKKeysManager)); return res; }
+ ~KeysManager() { KeysManager_free(self); }
+ KeysManager& operator=(KeysManager&& o) { KeysManager_free(self); self = o.self; memset(&o, 0, sizeof(KeysManager)); return *this; }
+ LDKKeysManager* operator &() { return &self; }
+ LDKKeysManager* operator ->() { return &self; }
+ const LDKKeysManager* operator &() const { return &self; }
+ const LDKKeysManager* operator ->() const { return &self; }
+};
+class PhantomKeysManager {
+private:
+ LDKPhantomKeysManager self;
+public:
+ PhantomKeysManager(const PhantomKeysManager&) = delete;
+ PhantomKeysManager(PhantomKeysManager&& o) : self(o.self) { memset(&o, 0, sizeof(PhantomKeysManager)); }
+ PhantomKeysManager(LDKPhantomKeysManager&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPhantomKeysManager)); }
+ operator LDKPhantomKeysManager() && { LDKPhantomKeysManager res = self; memset(&self, 0, sizeof(LDKPhantomKeysManager)); return res; }
+ ~PhantomKeysManager() { PhantomKeysManager_free(self); }
+ PhantomKeysManager& operator=(PhantomKeysManager&& o) { PhantomKeysManager_free(self); self = o.self; memset(&o, 0, sizeof(PhantomKeysManager)); return *this; }
+ LDKPhantomKeysManager* operator &() { return &self; }
+ LDKPhantomKeysManager* operator ->() { return &self; }
+ const LDKPhantomKeysManager* operator &() const { return &self; }
+ const LDKPhantomKeysManager* operator ->() const { return &self; }
+};
+class FilesystemPersister {
+private:
+ LDKFilesystemPersister self;
+public:
+ FilesystemPersister(const FilesystemPersister&) = delete;
+ FilesystemPersister(FilesystemPersister&& o) : self(o.self) { memset(&o, 0, sizeof(FilesystemPersister)); }
+ FilesystemPersister(LDKFilesystemPersister&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKFilesystemPersister)); }
+ operator LDKFilesystemPersister() && { LDKFilesystemPersister res = self; memset(&self, 0, sizeof(LDKFilesystemPersister)); return res; }
+ ~FilesystemPersister() { FilesystemPersister_free(self); }
+ FilesystemPersister& operator=(FilesystemPersister&& o) { FilesystemPersister_free(self); self = o.self; memset(&o, 0, sizeof(FilesystemPersister)); return *this; }
+ LDKFilesystemPersister* operator &() { return &self; }
+ LDKFilesystemPersister* operator ->() { return &self; }
+ const LDKFilesystemPersister* operator &() const { return &self; }
+ const LDKFilesystemPersister* operator ->() const { return &self; }
+};
+class ChannelManager {
+private:
+ LDKChannelManager self;
+public:
+ ChannelManager(const ChannelManager&) = delete;
+ ChannelManager(ChannelManager&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelManager)); }
+ ChannelManager(LDKChannelManager&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelManager)); }
+ operator LDKChannelManager() && { LDKChannelManager res = self; memset(&self, 0, sizeof(LDKChannelManager)); return res; }
+ ~ChannelManager() { ChannelManager_free(self); }
+ ChannelManager& operator=(ChannelManager&& o) { ChannelManager_free(self); self = o.self; memset(&o, 0, sizeof(ChannelManager)); return *this; }
+ LDKChannelManager* operator &() { return &self; }
+ LDKChannelManager* operator ->() { return &self; }
+ const LDKChannelManager* operator &() const { return &self; }
+ const LDKChannelManager* operator ->() const { return &self; }
+};
+class ChainParameters {
+private:
+ LDKChainParameters self;
+public:
+ ChainParameters(const ChainParameters&) = delete;
+ ChainParameters(ChainParameters&& o) : self(o.self) { memset(&o, 0, sizeof(ChainParameters)); }
+ ChainParameters(LDKChainParameters&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChainParameters)); }
+ operator LDKChainParameters() && { LDKChainParameters res = self; memset(&self, 0, sizeof(LDKChainParameters)); return res; }
+ ~ChainParameters() { ChainParameters_free(self); }
+ ChainParameters& operator=(ChainParameters&& o) { ChainParameters_free(self); self = o.self; memset(&o, 0, sizeof(ChainParameters)); return *this; }
+ LDKChainParameters* operator &() { return &self; }
+ LDKChainParameters* operator ->() { return &self; }
+ 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;
+public:
+ ChannelCounterparty(const ChannelCounterparty&) = delete;
+ ChannelCounterparty(ChannelCounterparty&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelCounterparty)); }
+ ChannelCounterparty(LDKChannelCounterparty&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelCounterparty)); }
+ operator LDKChannelCounterparty() && { LDKChannelCounterparty res = self; memset(&self, 0, sizeof(LDKChannelCounterparty)); return res; }
+ ~ChannelCounterparty() { ChannelCounterparty_free(self); }
+ ChannelCounterparty& operator=(ChannelCounterparty&& o) { ChannelCounterparty_free(self); self = o.self; memset(&o, 0, sizeof(ChannelCounterparty)); return *this; }
+ LDKChannelCounterparty* operator &() { return &self; }
+ LDKChannelCounterparty* operator ->() { return &self; }
+ const LDKChannelCounterparty* operator &() const { return &self; }
+ const LDKChannelCounterparty* operator ->() const { return &self; }
+};
+class ChannelDetails {
+private:
+ LDKChannelDetails self;
+public:
+ ChannelDetails(const ChannelDetails&) = delete;
+ ChannelDetails(ChannelDetails&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelDetails)); }
+ ChannelDetails(LDKChannelDetails&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelDetails)); }
+ operator LDKChannelDetails() && { LDKChannelDetails res = self; memset(&self, 0, sizeof(LDKChannelDetails)); return res; }
+ ~ChannelDetails() { ChannelDetails_free(self); }
+ ChannelDetails& operator=(ChannelDetails&& o) { ChannelDetails_free(self); self = o.self; memset(&o, 0, sizeof(ChannelDetails)); return *this; }
+ LDKChannelDetails* operator &() { return &self; }
+ LDKChannelDetails* operator ->() { return &self; }
+ const LDKChannelDetails* operator &() const { return &self; }
+ const LDKChannelDetails* operator ->() const { return &self; }
+};
+class PaymentSendFailure {
+private:
+ LDKPaymentSendFailure self;
+public:
+ PaymentSendFailure(const PaymentSendFailure&) = delete;
+ PaymentSendFailure(PaymentSendFailure&& o) : self(o.self) { memset(&o, 0, sizeof(PaymentSendFailure)); }
+ PaymentSendFailure(LDKPaymentSendFailure&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPaymentSendFailure)); }
+ operator LDKPaymentSendFailure() && { LDKPaymentSendFailure res = self; memset(&self, 0, sizeof(LDKPaymentSendFailure)); return res; }
+ ~PaymentSendFailure() { PaymentSendFailure_free(self); }
+ PaymentSendFailure& operator=(PaymentSendFailure&& o) { PaymentSendFailure_free(self); self = o.self; memset(&o, 0, sizeof(PaymentSendFailure)); return *this; }
+ LDKPaymentSendFailure* operator &() { return &self; }
+ LDKPaymentSendFailure* operator ->() { return &self; }
+ const LDKPaymentSendFailure* operator &() const { return &self; }
+ const LDKPaymentSendFailure* operator ->() const { return &self; }
+};
+class PhantomRouteHints {
+private:
+ LDKPhantomRouteHints self;
+public:
+ PhantomRouteHints(const PhantomRouteHints&) = delete;
+ PhantomRouteHints(PhantomRouteHints&& o) : self(o.self) { memset(&o, 0, sizeof(PhantomRouteHints)); }
+ PhantomRouteHints(LDKPhantomRouteHints&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPhantomRouteHints)); }
+ operator LDKPhantomRouteHints() && { LDKPhantomRouteHints res = self; memset(&self, 0, sizeof(LDKPhantomRouteHints)); return res; }
+ ~PhantomRouteHints() { PhantomRouteHints_free(self); }
+ PhantomRouteHints& operator=(PhantomRouteHints&& o) { PhantomRouteHints_free(self); self = o.self; memset(&o, 0, sizeof(PhantomRouteHints)); return *this; }
+ LDKPhantomRouteHints* operator &() { return &self; }
+ LDKPhantomRouteHints* operator ->() { return &self; }
+ const LDKPhantomRouteHints* operator &() const { return &self; }
+ const LDKPhantomRouteHints* operator ->() const { return &self; }
+};
+class ChannelManagerReadArgs {
+private:
+ LDKChannelManagerReadArgs self;
+public:
+ ChannelManagerReadArgs(const ChannelManagerReadArgs&) = delete;
+ ChannelManagerReadArgs(ChannelManagerReadArgs&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelManagerReadArgs)); }
+ ChannelManagerReadArgs(LDKChannelManagerReadArgs&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelManagerReadArgs)); }
+ operator LDKChannelManagerReadArgs() && { LDKChannelManagerReadArgs res = self; memset(&self, 0, sizeof(LDKChannelManagerReadArgs)); return res; }
+ ~ChannelManagerReadArgs() { ChannelManagerReadArgs_free(self); }
+ ChannelManagerReadArgs& operator=(ChannelManagerReadArgs&& o) { ChannelManagerReadArgs_free(self); self = o.self; memset(&o, 0, sizeof(ChannelManagerReadArgs)); return *this; }
+ LDKChannelManagerReadArgs* operator &() { return &self; }
+ LDKChannelManagerReadArgs* operator ->() { return &self; }
+ const LDKChannelManagerReadArgs* operator &() const { return &self; }
+ const LDKChannelManagerReadArgs* operator ->() const { return &self; }
+};
+class ChannelHandshakeConfig {
+private:
+ LDKChannelHandshakeConfig self;
+public:
+ ChannelHandshakeConfig(const ChannelHandshakeConfig&) = delete;
+ ChannelHandshakeConfig(ChannelHandshakeConfig&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelHandshakeConfig)); }
+ ChannelHandshakeConfig(LDKChannelHandshakeConfig&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelHandshakeConfig)); }
+ operator LDKChannelHandshakeConfig() && { LDKChannelHandshakeConfig res = self; memset(&self, 0, sizeof(LDKChannelHandshakeConfig)); return res; }
+ ~ChannelHandshakeConfig() { ChannelHandshakeConfig_free(self); }
+ ChannelHandshakeConfig& operator=(ChannelHandshakeConfig&& o) { ChannelHandshakeConfig_free(self); self = o.self; memset(&o, 0, sizeof(ChannelHandshakeConfig)); return *this; }
+ LDKChannelHandshakeConfig* operator &() { return &self; }
+ LDKChannelHandshakeConfig* operator ->() { return &self; }
+ const LDKChannelHandshakeConfig* operator &() const { return &self; }
+ const LDKChannelHandshakeConfig* operator ->() const { return &self; }
+};
+class ChannelHandshakeLimits {
+private:
+ LDKChannelHandshakeLimits self;
+public:
+ ChannelHandshakeLimits(const ChannelHandshakeLimits&) = delete;
+ ChannelHandshakeLimits(ChannelHandshakeLimits&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelHandshakeLimits)); }
+ ChannelHandshakeLimits(LDKChannelHandshakeLimits&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelHandshakeLimits)); }
+ operator LDKChannelHandshakeLimits() && { LDKChannelHandshakeLimits res = self; memset(&self, 0, sizeof(LDKChannelHandshakeLimits)); return res; }
+ ~ChannelHandshakeLimits() { ChannelHandshakeLimits_free(self); }
+ ChannelHandshakeLimits& operator=(ChannelHandshakeLimits&& o) { ChannelHandshakeLimits_free(self); self = o.self; memset(&o, 0, sizeof(ChannelHandshakeLimits)); return *this; }
+ LDKChannelHandshakeLimits* operator &() { return &self; }
+ LDKChannelHandshakeLimits* operator ->() { return &self; }
+ const LDKChannelHandshakeLimits* operator &() const { return &self; }
+ const LDKChannelHandshakeLimits* operator ->() const { return &self; }
+};
+class ChannelConfig {
+private:
+ LDKChannelConfig self;
+public:
+ ChannelConfig(const ChannelConfig&) = delete;
+ ChannelConfig(ChannelConfig&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelConfig)); }
+ ChannelConfig(LDKChannelConfig&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelConfig)); }
+ operator LDKChannelConfig() && { LDKChannelConfig res = self; memset(&self, 0, sizeof(LDKChannelConfig)); return res; }
+ ~ChannelConfig() { ChannelConfig_free(self); }
+ ChannelConfig& operator=(ChannelConfig&& o) { ChannelConfig_free(self); self = o.self; memset(&o, 0, sizeof(ChannelConfig)); return *this; }
+ LDKChannelConfig* operator &() { return &self; }
+ LDKChannelConfig* operator ->() { return &self; }
+ const LDKChannelConfig* operator &() const { return &self; }
+ const LDKChannelConfig* operator ->() const { return &self; }
+};
+class UserConfig {
+private:
+ LDKUserConfig self;
+public:
+ UserConfig(const UserConfig&) = delete;
+ UserConfig(UserConfig&& o) : self(o.self) { memset(&o, 0, sizeof(UserConfig)); }
+ UserConfig(LDKUserConfig&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKUserConfig)); }
+ operator LDKUserConfig() && { LDKUserConfig res = self; memset(&self, 0, sizeof(LDKUserConfig)); return res; }
+ ~UserConfig() { UserConfig_free(self); }
+ UserConfig& operator=(UserConfig&& o) { UserConfig_free(self); self = o.self; memset(&o, 0, sizeof(UserConfig)); return *this; }
+ LDKUserConfig* operator &() { return &self; }
+ LDKUserConfig* operator ->() { return &self; }
+ const LDKUserConfig* operator &() const { return &self; }
+ const LDKUserConfig* operator ->() const { return &self; }
+};
+class APIError {
+private:
+ LDKAPIError self;
+public:
+ APIError(const APIError&) = delete;
+ APIError(APIError&& o) : self(o.self) { memset(&o, 0, sizeof(APIError)); }
+ APIError(LDKAPIError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKAPIError)); }
+ operator LDKAPIError() && { LDKAPIError res = self; memset(&self, 0, sizeof(LDKAPIError)); return res; }
+ ~APIError() { APIError_free(self); }
+ APIError& operator=(APIError&& o) { APIError_free(self); self = o.self; memset(&o, 0, sizeof(APIError)); return *this; }
+ LDKAPIError* operator &() { return &self; }
+ LDKAPIError* operator ->() { return &self; }
+ const LDKAPIError* operator &() const { return &self; }
+ const LDKAPIError* operator ->() const { return &self; }
+};
+class BigSize {
+private:
+ LDKBigSize self;
+public:
+ BigSize(const BigSize&) = delete;
+ BigSize(BigSize&& o) : self(o.self) { memset(&o, 0, sizeof(BigSize)); }
+ BigSize(LDKBigSize&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKBigSize)); }
+ operator LDKBigSize() && { LDKBigSize res = self; memset(&self, 0, sizeof(LDKBigSize)); return res; }
+ ~BigSize() { BigSize_free(self); }
+ BigSize& operator=(BigSize&& o) { BigSize_free(self); self = o.self; memset(&o, 0, sizeof(BigSize)); return *this; }
+ LDKBigSize* operator &() { return &self; }
+ LDKBigSize* operator ->() { return &self; }
+ const LDKBigSize* operator &() const { return &self; }
+ const LDKBigSize* operator ->() const { return &self; }
+};
+class Hostname {
+private:
+ LDKHostname self;
+public:
+ Hostname(const Hostname&) = delete;
+ Hostname(Hostname&& o) : self(o.self) { memset(&o, 0, sizeof(Hostname)); }
+ Hostname(LDKHostname&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKHostname)); }
+ operator LDKHostname() && { LDKHostname res = self; memset(&self, 0, sizeof(LDKHostname)); return res; }
+ ~Hostname() { Hostname_free(self); }
+ Hostname& operator=(Hostname&& o) { Hostname_free(self); self = o.self; memset(&o, 0, sizeof(Hostname)); return *this; }
+ LDKHostname* operator &() { return &self; }
+ LDKHostname* operator ->() { return &self; }
+ const LDKHostname* operator &() const { return &self; }
+ const LDKHostname* operator ->() const { return &self; }
+};
+class PrintableString {
+private:
+ LDKPrintableString self;
+public:
+ PrintableString(const PrintableString&) = delete;
+ PrintableString(PrintableString&& o) : self(o.self) { memset(&o, 0, sizeof(PrintableString)); }
+ PrintableString(LDKPrintableString&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPrintableString)); }
+ operator LDKPrintableString() && { LDKPrintableString res = self; memset(&self, 0, sizeof(LDKPrintableString)); return res; }
+ ~PrintableString() { PrintableString_free(self); }
+ PrintableString& operator=(PrintableString&& o) { PrintableString_free(self); self = o.self; memset(&o, 0, sizeof(PrintableString)); return *this; }
+ LDKPrintableString* operator &() { return &self; }
+ LDKPrintableString* operator ->() { return &self; }
+ const LDKPrintableString* operator &() const { return &self; }
+ const LDKPrintableString* operator ->() const { return &self; }
+};
+class OutPoint {
+private:
+ LDKOutPoint self;
+public:
+ OutPoint(const OutPoint&) = delete;
+ OutPoint(OutPoint&& o) : self(o.self) { memset(&o, 0, sizeof(OutPoint)); }
+ OutPoint(LDKOutPoint&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKOutPoint)); }
+ operator LDKOutPoint() && { LDKOutPoint res = self; memset(&self, 0, sizeof(LDKOutPoint)); return res; }
+ ~OutPoint() { OutPoint_free(self); }
+ OutPoint& operator=(OutPoint&& o) { OutPoint_free(self); self = o.self; memset(&o, 0, sizeof(OutPoint)); return *this; }
+ LDKOutPoint* operator &() { return &self; }
+ LDKOutPoint* operator ->() { return &self; }
+ 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 InvoicePayer {
+private:
+ LDKInvoicePayer self;
+public:
+ InvoicePayer(const InvoicePayer&) = delete;
+ InvoicePayer(InvoicePayer&& o) : self(o.self) { memset(&o, 0, sizeof(InvoicePayer)); }
+ InvoicePayer(LDKInvoicePayer&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInvoicePayer)); }
+ operator LDKInvoicePayer() && { LDKInvoicePayer res = self; memset(&self, 0, sizeof(LDKInvoicePayer)); return res; }
+ ~InvoicePayer() { InvoicePayer_free(self); }
+ InvoicePayer& operator=(InvoicePayer&& o) { InvoicePayer_free(self); self = o.self; memset(&o, 0, sizeof(InvoicePayer)); return *this; }
+ LDKInvoicePayer* operator &() { return &self; }
+ LDKInvoicePayer* operator ->() { return &self; }
+ const LDKInvoicePayer* operator &() const { return &self; }
+ const LDKInvoicePayer* operator ->() const { return &self; }
+};
+class Payer {
+private:
+ LDKPayer self;
+public:
+ Payer(const Payer&) = delete;
+ Payer(Payer&& o) : self(o.self) { memset(&o, 0, sizeof(Payer)); }
+ Payer(LDKPayer&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPayer)); }
+ operator LDKPayer() && { LDKPayer res = self; memset(&self, 0, sizeof(LDKPayer)); return res; }
+ ~Payer() { Payer_free(self); }
+ Payer& operator=(Payer&& o) { Payer_free(self); self = o.self; memset(&o, 0, sizeof(Payer)); return *this; }
+ LDKPayer* operator &() { return &self; }
+ LDKPayer* operator ->() { return &self; }
+ const LDKPayer* operator &() const { return &self; }
+ const LDKPayer* operator ->() const { return &self; }
+ /**
+ * Returns the payer's node id.
+ */
+ inline LDKPublicKey node_id();
+ /**
+ * Returns the payer's channels.
+ */
+ inline LDK::CVec_ChannelDetailsZ first_hops();
+ /**
+ * Sends a payment over the Lightning Network using the given [`Route`].
+ *
+ * Note that payment_secret (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ inline LDK::CResult_NonePaymentSendFailureZ send_payment(const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret, struct LDKThirtyTwoBytes payment_id);
+ /**
+ * Sends a spontaneous payment over the Lightning Network using the given [`Route`].
+ */
+ inline LDK::CResult_NonePaymentSendFailureZ send_spontaneous_payment(const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_id);
+ /**
+ * Retries a failed payment path for the [`PaymentId`] using the given [`Route`].
+ */
+ inline LDK::CResult_NonePaymentSendFailureZ retry_payment(const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id);
+ /**
+ * Signals that no further retries for the given payment will occur.
+ */
+ inline void abandon_payment(struct LDKThirtyTwoBytes payment_id);
+ /**
+ * Construct an [`InFlightHtlcs`] containing information about currently used up liquidity
+ * across payments.
+ */
+ inline LDK::InFlightHtlcs inflight_htlcs();
+};
+class Retry {
+private:
+ LDKRetry self;
+public:
+ Retry(const Retry&) = delete;
+ Retry(Retry&& o) : self(o.self) { memset(&o, 0, sizeof(Retry)); }
+ Retry(LDKRetry&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRetry)); }
+ operator LDKRetry() && { LDKRetry res = self; memset(&self, 0, sizeof(LDKRetry)); return res; }
+ ~Retry() { Retry_free(self); }
+ Retry& operator=(Retry&& o) { Retry_free(self); self = o.self; memset(&o, 0, sizeof(Retry)); return *this; }
+ LDKRetry* operator &() { return &self; }
+ LDKRetry* operator ->() { return &self; }
+ const LDKRetry* operator &() const { return &self; }
+ const LDKRetry* operator ->() const { return &self; }
+};
+class PaymentError {
+private:
+ LDKPaymentError self;
+public:
+ PaymentError(const PaymentError&) = delete;
+ PaymentError(PaymentError&& o) : self(o.self) { memset(&o, 0, sizeof(PaymentError)); }
+ PaymentError(LDKPaymentError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPaymentError)); }
+ operator LDKPaymentError() && { LDKPaymentError res = self; memset(&self, 0, sizeof(LDKPaymentError)); return res; }
+ ~PaymentError() { PaymentError_free(self); }
+ PaymentError& operator=(PaymentError&& o) { PaymentError_free(self); self = o.self; memset(&o, 0, sizeof(PaymentError)); return *this; }
+ LDKPaymentError* operator &() { return &self; }
+ LDKPaymentError* operator ->() { return &self; }
+ const LDKPaymentError* operator &() const { return &self; }
+ const LDKPaymentError* operator ->() const { return &self; }
+};
+class ChannelMonitorUpdate {
+private:
+ LDKChannelMonitorUpdate self;
+public:
+ ChannelMonitorUpdate(const ChannelMonitorUpdate&) = delete;
+ ChannelMonitorUpdate(ChannelMonitorUpdate&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelMonitorUpdate)); }
+ ChannelMonitorUpdate(LDKChannelMonitorUpdate&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelMonitorUpdate)); }
+ operator LDKChannelMonitorUpdate() && { LDKChannelMonitorUpdate res = self; memset(&self, 0, sizeof(LDKChannelMonitorUpdate)); return res; }
+ ~ChannelMonitorUpdate() { ChannelMonitorUpdate_free(self); }
+ ChannelMonitorUpdate& operator=(ChannelMonitorUpdate&& o) { ChannelMonitorUpdate_free(self); self = o.self; memset(&o, 0, sizeof(ChannelMonitorUpdate)); return *this; }
+ LDKChannelMonitorUpdate* operator &() { return &self; }
+ LDKChannelMonitorUpdate* operator ->() { return &self; }
+ const LDKChannelMonitorUpdate* operator &() const { return &self; }
+ const LDKChannelMonitorUpdate* operator ->() const { return &self; }
+};
+class MonitorEvent {
+private:
+ LDKMonitorEvent self;
+public:
+ MonitorEvent(const MonitorEvent&) = delete;
+ MonitorEvent(MonitorEvent&& o) : self(o.self) { memset(&o, 0, sizeof(MonitorEvent)); }
+ MonitorEvent(LDKMonitorEvent&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMonitorEvent)); }
+ operator LDKMonitorEvent() && { LDKMonitorEvent res = self; memset(&self, 0, sizeof(LDKMonitorEvent)); return res; }
+ ~MonitorEvent() { MonitorEvent_free(self); }
+ MonitorEvent& operator=(MonitorEvent&& o) { MonitorEvent_free(self); self = o.self; memset(&o, 0, sizeof(MonitorEvent)); return *this; }
+ LDKMonitorEvent* operator &() { return &self; }
+ LDKMonitorEvent* operator ->() { return &self; }
+ const LDKMonitorEvent* operator &() const { return &self; }
+ const LDKMonitorEvent* operator ->() const { return &self; }
+};
+class HTLCUpdate {
+private:
+ LDKHTLCUpdate self;
+public:
+ HTLCUpdate(const HTLCUpdate&) = delete;
+ HTLCUpdate(HTLCUpdate&& o) : self(o.self) { memset(&o, 0, sizeof(HTLCUpdate)); }
+ HTLCUpdate(LDKHTLCUpdate&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKHTLCUpdate)); }
+ operator LDKHTLCUpdate() && { LDKHTLCUpdate res = self; memset(&self, 0, sizeof(LDKHTLCUpdate)); return res; }
+ ~HTLCUpdate() { HTLCUpdate_free(self); }
+ HTLCUpdate& operator=(HTLCUpdate&& o) { HTLCUpdate_free(self); self = o.self; memset(&o, 0, sizeof(HTLCUpdate)); return *this; }
+ LDKHTLCUpdate* operator &() { return &self; }
+ LDKHTLCUpdate* operator ->() { return &self; }
+ 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;
+public:
+ ChannelMonitor(const ChannelMonitor&) = delete;
+ ChannelMonitor(ChannelMonitor&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelMonitor)); }
+ ChannelMonitor(LDKChannelMonitor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelMonitor)); }
+ operator LDKChannelMonitor() && { LDKChannelMonitor res = self; memset(&self, 0, sizeof(LDKChannelMonitor)); return res; }
+ ~ChannelMonitor() { ChannelMonitor_free(self); }
+ ChannelMonitor& operator=(ChannelMonitor&& o) { ChannelMonitor_free(self); self = o.self; memset(&o, 0, sizeof(ChannelMonitor)); return *this; }
+ LDKChannelMonitor* operator &() { return &self; }
+ LDKChannelMonitor* operator ->() { return &self; }
+ const LDKChannelMonitor* operator &() const { return &self; }
+ const LDKChannelMonitor* operator ->() const { return &self; }
+};
+class ExpandedKey {
+private:
+ LDKExpandedKey self;
+public:
+ ExpandedKey(const ExpandedKey&) = delete;
+ ExpandedKey(ExpandedKey&& o) : self(o.self) { memset(&o, 0, sizeof(ExpandedKey)); }
+ ExpandedKey(LDKExpandedKey&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKExpandedKey)); }
+ operator LDKExpandedKey() && { LDKExpandedKey res = self; memset(&self, 0, sizeof(LDKExpandedKey)); return res; }
+ ~ExpandedKey() { ExpandedKey_free(self); }
+ ExpandedKey& operator=(ExpandedKey&& o) { ExpandedKey_free(self); self = o.self; memset(&o, 0, sizeof(ExpandedKey)); return *this; }
+ LDKExpandedKey* operator &() { return &self; }
+ LDKExpandedKey* operator ->() { return &self; }
+ const LDKExpandedKey* operator &() const { return &self; }
+ const LDKExpandedKey* 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:
+ LDKIgnoringMessageHandler self;
+public:
+ IgnoringMessageHandler(const IgnoringMessageHandler&) = delete;
+ IgnoringMessageHandler(IgnoringMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(IgnoringMessageHandler)); }
+ IgnoringMessageHandler(LDKIgnoringMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKIgnoringMessageHandler)); }
+ operator LDKIgnoringMessageHandler() && { LDKIgnoringMessageHandler res = self; memset(&self, 0, sizeof(LDKIgnoringMessageHandler)); return res; }
+ ~IgnoringMessageHandler() { IgnoringMessageHandler_free(self); }
+ IgnoringMessageHandler& operator=(IgnoringMessageHandler&& o) { IgnoringMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(IgnoringMessageHandler)); return *this; }
+ LDKIgnoringMessageHandler* operator &() { return &self; }
+ LDKIgnoringMessageHandler* operator ->() { return &self; }
+ const LDKIgnoringMessageHandler* operator &() const { return &self; }
+ const LDKIgnoringMessageHandler* operator ->() const { return &self; }
+};
+class ErroringMessageHandler {
+private:
+ LDKErroringMessageHandler self;
+public:
+ ErroringMessageHandler(const ErroringMessageHandler&) = delete;
+ ErroringMessageHandler(ErroringMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(ErroringMessageHandler)); }
+ ErroringMessageHandler(LDKErroringMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKErroringMessageHandler)); }
+ operator LDKErroringMessageHandler() && { LDKErroringMessageHandler res = self; memset(&self, 0, sizeof(LDKErroringMessageHandler)); return res; }
+ ~ErroringMessageHandler() { ErroringMessageHandler_free(self); }
+ ErroringMessageHandler& operator=(ErroringMessageHandler&& o) { ErroringMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(ErroringMessageHandler)); return *this; }
+ LDKErroringMessageHandler* operator &() { return &self; }
+ LDKErroringMessageHandler* operator ->() { return &self; }
+ const LDKErroringMessageHandler* operator &() const { return &self; }
+ const LDKErroringMessageHandler* operator ->() const { return &self; }
+};
+class MessageHandler {
+private:
+ LDKMessageHandler self;
+public:
+ MessageHandler(const MessageHandler&) = delete;
+ MessageHandler(MessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(MessageHandler)); }
+ MessageHandler(LDKMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMessageHandler)); }
+ operator LDKMessageHandler() && { LDKMessageHandler res = self; memset(&self, 0, sizeof(LDKMessageHandler)); return res; }
+ ~MessageHandler() { MessageHandler_free(self); }
+ MessageHandler& operator=(MessageHandler&& o) { MessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(MessageHandler)); return *this; }
+ LDKMessageHandler* operator &() { return &self; }
+ LDKMessageHandler* operator ->() { return &self; }
+ const LDKMessageHandler* operator &() const { return &self; }
+ const LDKMessageHandler* operator ->() const { return &self; }
+};
+class SocketDescriptor {
+private:
+ LDKSocketDescriptor self;
+public:
+ SocketDescriptor(const SocketDescriptor&) = delete;
+ SocketDescriptor(SocketDescriptor&& o) : self(o.self) { memset(&o, 0, sizeof(SocketDescriptor)); }
+ SocketDescriptor(LDKSocketDescriptor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSocketDescriptor)); }
+ operator LDKSocketDescriptor() && { LDKSocketDescriptor res = self; memset(&self, 0, sizeof(LDKSocketDescriptor)); return res; }
+ ~SocketDescriptor() { SocketDescriptor_free(self); }
+ SocketDescriptor& operator=(SocketDescriptor&& o) { SocketDescriptor_free(self); self = o.self; memset(&o, 0, sizeof(SocketDescriptor)); return *this; }
+ LDKSocketDescriptor* operator &() { return &self; }
+ 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:
+ LDKPeerHandleError self;
+public:
+ PeerHandleError(const PeerHandleError&) = delete;
+ PeerHandleError(PeerHandleError&& o) : self(o.self) { memset(&o, 0, sizeof(PeerHandleError)); }
+ PeerHandleError(LDKPeerHandleError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPeerHandleError)); }
+ operator LDKPeerHandleError() && { LDKPeerHandleError res = self; memset(&self, 0, sizeof(LDKPeerHandleError)); return res; }
+ ~PeerHandleError() { PeerHandleError_free(self); }
+ PeerHandleError& operator=(PeerHandleError&& o) { PeerHandleError_free(self); self = o.self; memset(&o, 0, sizeof(PeerHandleError)); return *this; }
+ LDKPeerHandleError* operator &() { return &self; }
+ LDKPeerHandleError* operator ->() { return &self; }
+ const LDKPeerHandleError* operator &() const { return &self; }
+ const LDKPeerHandleError* operator ->() const { return &self; }
+};
+class PeerManager {
+private:
+ LDKPeerManager self;
+public:
+ PeerManager(const PeerManager&) = delete;
+ PeerManager(PeerManager&& o) : self(o.self) { memset(&o, 0, sizeof(PeerManager)); }
+ PeerManager(LDKPeerManager&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPeerManager)); }
+ operator LDKPeerManager() && { LDKPeerManager res = self; memset(&self, 0, sizeof(LDKPeerManager)); return res; }
+ ~PeerManager() { PeerManager_free(self); }
+ PeerManager& operator=(PeerManager&& o) { PeerManager_free(self); self = o.self; memset(&o, 0, sizeof(PeerManager)); return *this; }
+ LDKPeerManager* operator &() { return &self; }
+ LDKPeerManager* operator ->() { return &self; }
+ const LDKPeerManager* operator &() const { return &self; }
+ const LDKPeerManager* operator ->() const { return &self; }
+};
+class OnionMessenger {
+private:
+ LDKOnionMessenger self;
+public:
+ OnionMessenger(const OnionMessenger&) = delete;
+ OnionMessenger(OnionMessenger&& o) : self(o.self) { memset(&o, 0, sizeof(OnionMessenger)); }
+ OnionMessenger(LDKOnionMessenger&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKOnionMessenger)); }
+ operator LDKOnionMessenger() && { LDKOnionMessenger res = self; memset(&self, 0, sizeof(LDKOnionMessenger)); return res; }
+ ~OnionMessenger() { OnionMessenger_free(self); }
+ OnionMessenger& operator=(OnionMessenger&& o) { OnionMessenger_free(self); self = o.self; memset(&o, 0, sizeof(OnionMessenger)); return *this; }
+ LDKOnionMessenger* operator &() { return &self; }
+ LDKOnionMessenger* operator ->() { return &self; }
+ const LDKOnionMessenger* operator &() const { return &self; }
+ const LDKOnionMessenger* operator ->() const { return &self; }
+};
+class Destination {
+private:
+ LDKDestination self;
+public:
+ Destination(const Destination&) = delete;
+ Destination(Destination&& o) : self(o.self) { memset(&o, 0, sizeof(Destination)); }
+ Destination(LDKDestination&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKDestination)); }
+ operator LDKDestination() && { LDKDestination res = self; memset(&self, 0, sizeof(LDKDestination)); return res; }
+ ~Destination() { Destination_free(self); }
+ Destination& operator=(Destination&& o) { Destination_free(self); self = o.self; memset(&o, 0, sizeof(Destination)); return *this; }
+ LDKDestination* operator &() { return &self; }
+ LDKDestination* operator ->() { return &self; }
+ const LDKDestination* operator &() const { return &self; }
+ const LDKDestination* operator ->() const { return &self; }
+};
+class SendError {
+private:
+ LDKSendError self;
+public:
+ SendError(const SendError&) = delete;
+ SendError(SendError&& o) : self(o.self) { memset(&o, 0, sizeof(SendError)); }
+ SendError(LDKSendError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSendError)); }
+ operator LDKSendError() && { LDKSendError res = self; memset(&self, 0, sizeof(LDKSendError)); return res; }
+ ~SendError() { SendError_free(self); }
+ SendError& operator=(SendError&& o) { SendError_free(self); self = o.self; memset(&o, 0, sizeof(SendError)); return *this; }
+ LDKSendError* operator &() { return &self; }
+ LDKSendError* operator ->() { return &self; }
+ const LDKSendError* operator &() const { return &self; }
+ const LDKSendError* operator ->() const { return &self; }
+};
+class CustomOnionMessageHandler {
+private:
+ LDKCustomOnionMessageHandler self;
+public:
+ CustomOnionMessageHandler(const CustomOnionMessageHandler&) = delete;
+ CustomOnionMessageHandler(CustomOnionMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(CustomOnionMessageHandler)); }
+ CustomOnionMessageHandler(LDKCustomOnionMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCustomOnionMessageHandler)); }
+ operator LDKCustomOnionMessageHandler() && { LDKCustomOnionMessageHandler res = self; memset(&self, 0, sizeof(LDKCustomOnionMessageHandler)); return res; }
+ ~CustomOnionMessageHandler() { CustomOnionMessageHandler_free(self); }
+ CustomOnionMessageHandler& operator=(CustomOnionMessageHandler&& o) { CustomOnionMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(CustomOnionMessageHandler)); return *this; }
+ LDKCustomOnionMessageHandler* operator &() { return &self; }
+ LDKCustomOnionMessageHandler* operator ->() { return &self; }
+ const LDKCustomOnionMessageHandler* operator &() const { return &self; }
+ const LDKCustomOnionMessageHandler* operator ->() const { return &self; }
+ /**
+ * Called with the custom message that was received.
+ */
+ inline void handle_custom_message(struct LDKCustomOnionMessageContents msg);
+ /**
+ * Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the
+ * message type is unknown.
+ */
+ inline LDK::CResult_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message(uint64_t message_type, struct LDKu8slice buffer);
+};
+class ParseError {
+private:
+ LDKParseError self;
+public:
+ ParseError(const ParseError&) = delete;
+ ParseError(ParseError&& o) : self(o.self) { memset(&o, 0, sizeof(ParseError)); }
+ ParseError(LDKParseError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKParseError)); }
+ operator LDKParseError() && { LDKParseError res = self; memset(&self, 0, sizeof(LDKParseError)); return res; }
+ ~ParseError() { ParseError_free(self); }
+ ParseError& operator=(ParseError&& o) { ParseError_free(self); self = o.self; memset(&o, 0, sizeof(ParseError)); return *this; }
+ LDKParseError* operator &() { return &self; }
+ LDKParseError* operator ->() { return &self; }
+ const LDKParseError* operator &() const { return &self; }
+ const LDKParseError* operator ->() const { return &self; }
+};
+class ParseOrSemanticError {
+private:
+ LDKParseOrSemanticError self;
+public:
+ ParseOrSemanticError(const ParseOrSemanticError&) = delete;
+ ParseOrSemanticError(ParseOrSemanticError&& o) : self(o.self) { memset(&o, 0, sizeof(ParseOrSemanticError)); }
+ ParseOrSemanticError(LDKParseOrSemanticError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKParseOrSemanticError)); }
+ operator LDKParseOrSemanticError() && { LDKParseOrSemanticError res = self; memset(&self, 0, sizeof(LDKParseOrSemanticError)); return res; }
+ ~ParseOrSemanticError() { ParseOrSemanticError_free(self); }
+ ParseOrSemanticError& operator=(ParseOrSemanticError&& o) { ParseOrSemanticError_free(self); self = o.self; memset(&o, 0, sizeof(ParseOrSemanticError)); return *this; }
+ LDKParseOrSemanticError* operator &() { return &self; }
+ LDKParseOrSemanticError* operator ->() { return &self; }
+ const LDKParseOrSemanticError* operator &() const { return &self; }
+ const LDKParseOrSemanticError* operator ->() const { return &self; }
+};
+class Invoice {
+private:
+ LDKInvoice self;
+public:
+ Invoice(const Invoice&) = delete;
+ Invoice(Invoice&& o) : self(o.self) { memset(&o, 0, sizeof(Invoice)); }
+ Invoice(LDKInvoice&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInvoice)); }
+ operator LDKInvoice() && { LDKInvoice res = self; memset(&self, 0, sizeof(LDKInvoice)); return res; }
+ ~Invoice() { Invoice_free(self); }
+ Invoice& operator=(Invoice&& o) { Invoice_free(self); self = o.self; memset(&o, 0, sizeof(Invoice)); return *this; }
+ LDKInvoice* operator &() { return &self; }
+ LDKInvoice* operator ->() { return &self; }
+ const LDKInvoice* operator &() const { return &self; }
+ const LDKInvoice* operator ->() const { return &self; }
+};
+class SignedRawInvoice {
+private:
+ LDKSignedRawInvoice self;
+public:
+ SignedRawInvoice(const SignedRawInvoice&) = delete;
+ SignedRawInvoice(SignedRawInvoice&& o) : self(o.self) { memset(&o, 0, sizeof(SignedRawInvoice)); }
+ SignedRawInvoice(LDKSignedRawInvoice&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSignedRawInvoice)); }
+ operator LDKSignedRawInvoice() && { LDKSignedRawInvoice res = self; memset(&self, 0, sizeof(LDKSignedRawInvoice)); return res; }
+ ~SignedRawInvoice() { SignedRawInvoice_free(self); }
+ SignedRawInvoice& operator=(SignedRawInvoice&& o) { SignedRawInvoice_free(self); self = o.self; memset(&o, 0, sizeof(SignedRawInvoice)); return *this; }
+ LDKSignedRawInvoice* operator &() { return &self; }
+ LDKSignedRawInvoice* operator ->() { return &self; }
+ const LDKSignedRawInvoice* operator &() const { return &self; }
+ const LDKSignedRawInvoice* operator ->() const { return &self; }
+};
+class RawInvoice {
+private:
+ LDKRawInvoice self;
+public:
+ RawInvoice(const RawInvoice&) = delete;
+ RawInvoice(RawInvoice&& o) : self(o.self) { memset(&o, 0, sizeof(RawInvoice)); }
+ RawInvoice(LDKRawInvoice&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRawInvoice)); }
+ operator LDKRawInvoice() && { LDKRawInvoice res = self; memset(&self, 0, sizeof(LDKRawInvoice)); return res; }
+ ~RawInvoice() { RawInvoice_free(self); }
+ RawInvoice& operator=(RawInvoice&& o) { RawInvoice_free(self); self = o.self; memset(&o, 0, sizeof(RawInvoice)); return *this; }
+ LDKRawInvoice* operator &() { return &self; }
+ LDKRawInvoice* operator ->() { return &self; }
+ const LDKRawInvoice* operator &() const { return &self; }
+ const LDKRawInvoice* operator ->() const { return &self; }
+};
+class RawDataPart {
+private:
+ LDKRawDataPart self;
+public:
+ RawDataPart(const RawDataPart&) = delete;
+ RawDataPart(RawDataPart&& o) : self(o.self) { memset(&o, 0, sizeof(RawDataPart)); }
+ RawDataPart(LDKRawDataPart&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRawDataPart)); }
+ operator LDKRawDataPart() && { LDKRawDataPart res = self; memset(&self, 0, sizeof(LDKRawDataPart)); return res; }
+ ~RawDataPart() { RawDataPart_free(self); }
+ RawDataPart& operator=(RawDataPart&& o) { RawDataPart_free(self); self = o.self; memset(&o, 0, sizeof(RawDataPart)); return *this; }
+ LDKRawDataPart* operator &() { return &self; }
+ LDKRawDataPart* operator ->() { return &self; }
+ const LDKRawDataPart* operator &() const { return &self; }
+ const LDKRawDataPart* operator ->() const { return &self; }
+};
+class PositiveTimestamp {
+private:
+ LDKPositiveTimestamp self;
+public:
+ PositiveTimestamp(const PositiveTimestamp&) = delete;
+ PositiveTimestamp(PositiveTimestamp&& o) : self(o.self) { memset(&o, 0, sizeof(PositiveTimestamp)); }
+ PositiveTimestamp(LDKPositiveTimestamp&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPositiveTimestamp)); }
+ operator LDKPositiveTimestamp() && { LDKPositiveTimestamp res = self; memset(&self, 0, sizeof(LDKPositiveTimestamp)); return res; }
+ ~PositiveTimestamp() { PositiveTimestamp_free(self); }
+ PositiveTimestamp& operator=(PositiveTimestamp&& o) { PositiveTimestamp_free(self); self = o.self; memset(&o, 0, sizeof(PositiveTimestamp)); return *this; }
+ LDKPositiveTimestamp* operator &() { return &self; }
+ LDKPositiveTimestamp* operator ->() { return &self; }
+ const LDKPositiveTimestamp* operator &() const { return &self; }
+ const LDKPositiveTimestamp* operator ->() const { return &self; }
+};
+class SiPrefix {
+private:
+ LDKSiPrefix self;
+public:
+ SiPrefix(const SiPrefix&) = delete;
+ SiPrefix(SiPrefix&& o) : self(o.self) { memset(&o, 0, sizeof(SiPrefix)); }
+ SiPrefix(LDKSiPrefix&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSiPrefix)); }
+ operator LDKSiPrefix() && { LDKSiPrefix res = self; memset(&self, 0, sizeof(LDKSiPrefix)); return res; }
+ SiPrefix& operator=(SiPrefix&& o) { self = o.self; memset(&o, 0, sizeof(SiPrefix)); return *this; }
+ LDKSiPrefix* operator &() { return &self; }
+ LDKSiPrefix* operator ->() { return &self; }
+ const LDKSiPrefix* operator &() const { return &self; }
+ const LDKSiPrefix* operator ->() const { return &self; }
+};
+class Currency {
+private:
+ LDKCurrency self;
+public:
+ Currency(const Currency&) = delete;
+ Currency(Currency&& o) : self(o.self) { memset(&o, 0, sizeof(Currency)); }
+ Currency(LDKCurrency&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCurrency)); }
+ operator LDKCurrency() && { LDKCurrency res = self; memset(&self, 0, sizeof(LDKCurrency)); return res; }
+ Currency& operator=(Currency&& o) { self = o.self; memset(&o, 0, sizeof(Currency)); return *this; }
+ LDKCurrency* operator &() { return &self; }
+ LDKCurrency* operator ->() { return &self; }
+ const LDKCurrency* operator &() const { return &self; }
+ const LDKCurrency* operator ->() const { return &self; }
+};
+class Sha256 {
+private:
+ LDKSha256 self;
+public:
+ Sha256(const Sha256&) = delete;
+ Sha256(Sha256&& o) : self(o.self) { memset(&o, 0, sizeof(Sha256)); }
+ Sha256(LDKSha256&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSha256)); }
+ operator LDKSha256() && { LDKSha256 res = self; memset(&self, 0, sizeof(LDKSha256)); return res; }
+ ~Sha256() { Sha256_free(self); }
+ Sha256& operator=(Sha256&& o) { Sha256_free(self); self = o.self; memset(&o, 0, sizeof(Sha256)); return *this; }
+ LDKSha256* operator &() { return &self; }
+ LDKSha256* operator ->() { return &self; }
+ const LDKSha256* operator &() const { return &self; }
+ const LDKSha256* operator ->() const { return &self; }
+};
+class Description {
+private:
+ LDKDescription self;
+public:
+ Description(const Description&) = delete;