+ 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(const struct LDKEvent *NONNULL_PTR 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; }
+ /**
+ * Processes transactions confirmed in a block with a given header and height.
+ *
+ * Should be called for any transactions registered by [`Filter::register_tx`] or any
+ * transactions spending an output registered by [`Filter::register_output`]. Such transactions
+ * appearing in the same block do not need to be included in the same call; instead, multiple
+ * calls with additional transactions may be made so long as they are made in [chain order].
+ *
+ * May be called before or after [`best_block_updated`] for the corresponding block. However,
+ * in the event of a chain reorganization, it must not be called with a `header` that is no
+ * longer in the chain as of the last call to [`best_block_updated`].
+ *
+ * [chain order]: Confirm#order
+ * [`best_block_updated`]: Self::best_block_updated
+ */
+ inline void transactions_confirmed(const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
+ /**
+ * Processes a transaction that is no longer confirmed as result of a chain reorganization.
+ *
+ * Should be called for any transaction returned by [`get_relevant_txids`] if it has been
+ * reorganized out of the best chain. Once called, the given transaction 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]);
+ /**
+ * Processes an update to the best header connected at the given height.
+ *
+ * Should be called when a new header is available but may be skipped for intermediary blocks
+ * if they become available at the same time.
+ */
+ inline void best_block_updated(const uint8_t (*header)[80], uint32_t height);
+ /**
+ * Returns transactions that should be monitored for reorganization out of the chain.
+ *
+ * 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.
+ *
+ * May be called to determine the subset of transactions that must still be monitored for
+ * reorganization. Will be idempotent between calls but may change as a result of calls to the
+ * other interface methods. Thus, this is useful to determine which transactions may need to be
+ * given to [`transaction_unconfirmed`].
+ *
+ * [`transactions_confirmed`]: Self::transactions_confirmed
+ * [`transaction_unconfirmed`]: Self::transaction_unconfirmed
+ */
+ inline LDK::CVec_TxidZ get_relevant_txids();
+};
+class 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 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 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: 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);
+ /**
+ * Gets an arbitrary identifier describing the set of keys which are provided back to you in
+ * some SpendableOutputDescriptor types. This should be sufficient to identify this
+ * Sign object uniquely and lookup or re-derive its keys.
+ */
+ inline LDKThirtyTwoBytes channel_keys_id();
+ /**
+ * Create a signature for a counterparty's commitment transaction and associated HTLC transactions.
+ *
+ * Note that if signing fails or is rejected, the channel will be force-closed.
+ *
+ * Policy checks should be implemented in this function, including checking the amount
+ * sent to us and checking the HTLCs.
+ *
+ * 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: 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]);
+ /**
+ * Create a signatures for a holder's commitment transaction and its claiming HTLC transactions.
+ * This will only ever be called with a non-revoked commitment_tx. This will be called with the
+ * latest commitment_tx when we initiate a force-close.
+ * This will be called with the previous latest, just to get claiming HTLC signatures, if we are
+ * reacting to a ChannelMonitor replica that decided to broadcast before it had been updated to
+ * the latest.
+ * This may be called multiple times for the same transaction.
+ *
+ * An external signer implementation should check that the commitment has not been revoked.
+ *
+ * May return Err if key derivation fails. Callers, such as ChannelMonitor, will panic in such a case.
+ */
+ inline LDK::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs(const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx);
+ /**
+ * Create a signature for the given input in a transaction spending an HTLC transaction output
+ * or a commitment transaction `to_local` output when our counterparty broadcasts an old state.
+ *
+ * A justice transaction may claim multiple outputs at the same time if timelocks are
+ * similar, but only a signature for the input at index `input` should be signed for here.
+ * It may be called multiple times for same output(s) if a fee-bump is needed with regards
+ * to an upcoming timelock expiration.
+ *
+ * Amount is value of the output spent by this input, committed to in the BIP 143 signature.
+ *
+ * per_commitment_key is revocation secret which was provided by our counterparty when they
+ * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does
+ * not allow the spending of any funds by itself (you need our holder revocation_secret to do
+ * so).
+ */
+ inline LDK::CResult_SignatureNoneZ sign_justice_revoked_output(struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]);
+ /**
+ * Create a signature for the given input in a transaction spending a commitment transaction
+ * HTLC output when our counterparty broadcasts an old state.
+ *
+ * A justice transaction may claim multiple outputs at the same time if timelocks are
+ * similar, but only a signature for the input at index `input` should be signed for here.
+ * It may be called multiple times for same output(s) if a fee-bump is needed with regards
+ * to an upcoming timelock expiration.
+ *
+ * Amount is value of the output spent by this input, committed to in the BIP 143 signature.
+ *
+ * per_commitment_key is revocation secret which was provided by our counterparty when they
+ * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does
+ * not allow the spending of any funds by itself (you need our holder revocation_secret to do
+ * so).
+ *
+ * htlc holds HTLC elements (hash, timelock), thus changing the format of the witness script
+ * (which is committed to in the BIP 143 signatures).
+ */
+ inline LDK::CResult_SignatureNoneZ sign_justice_revoked_htlc(struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc);
+ /**
+ * Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment
+ * transaction, either offered or received.
+ *
+ * Such a transaction may claim multiples offered outputs at same time if we know the
+ * preimage for each when we create it, but only the input at index `input` should be
+ * signed for here. It may be called multiple times for same output(s) if a fee-bump is
+ * needed with regards to an upcoming timelock expiration.
+ *
+ * Witness_script is either a offered or received script as defined in BOLT3 for HTLC
+ * outputs.
+ *
+ * Amount is value of the output spent by this input, committed to in the BIP 143 signature.
+ *
+ * Per_commitment_point is the dynamic point corresponding to the channel state
+ * detected onchain. It has been generated by our counterparty and is used to derive
+ * channel state keys, which are then included in the witness script and committed to in the
+ * BIP 143 signature.
+ */
+ inline LDK::CResult_SignatureNoneZ sign_counterparty_htlc_transaction(struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc);
+ /**
+ * Create a signature for a (proposed) closing transaction.
+ *
+ * Note that, due to rounding, there may be one "missing" satoshi, and either party may have
+ * chosen to forgo their output as dust.
+ */
+ inline LDK::CResult_SignatureNoneZ sign_closing_transaction(const struct LDKClosingTransaction *NONNULL_PTR closing_tx);
+ /**
+ * 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.
+ * This is done as soon as the funding outpoint is known. Since these are static channel data,
+ * they MUST NOT be allowed to change to different values once set.
+ *
+ * channel_parameters.is_populated() MUST be true.
+ *
+ * We bind holder_selected_contest_delay late here for API convenience.
+ *
+ * Will be called before any signatures are applied.
+ */
+ inline void ready_channel(const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters);
+};
+class Sign {
+private:
+ 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`]: KeysInterface::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 LDK::Sign get_channel_signer(bool inbound, uint64_t channel_value_satoshis);
+ /**
+ * Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting
+ * onion packets and for temporary channel IDs. There is no requirement that these be
+ * persisted anywhere, though they must be unique across restarts.
+ *
+ * This method must return a different value each time it is called.
+ */
+ inline LDKThirtyTwoBytes get_secure_random_bytes();
+ /**
+ * Reads a `Signer` for this `KeysInterface` from the given input stream.
+ * This is only called during deserialization of other objects which contain
+ * `Sign`-implementing objects (ie `ChannelMonitor`s and `ChannelManager`s).
+ * The bytes are exactly those which `<Self::Signer as Writeable>::write()` writes, and
+ * contain no versioning scheme. You may wish to include your own version prefix and ensure
+ * you've read all of the provided bytes to ensure no corruption occurred.
+ */
+ inline LDK::CResult_SignDecodeErrorZ read_chan_signer(struct LDKu8slice reader);
+ /**
+ * Sign an invoice.
+ * 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.
+ *
+ * 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();