+ 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 ChannelDerivationParameters {
+private:
+ LDKChannelDerivationParameters self;
+public:
+ ChannelDerivationParameters(const ChannelDerivationParameters&) = delete;
+ ChannelDerivationParameters(ChannelDerivationParameters&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelDerivationParameters)); }
+ ChannelDerivationParameters(LDKChannelDerivationParameters&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelDerivationParameters)); }
+ operator LDKChannelDerivationParameters() && { LDKChannelDerivationParameters res = self; memset(&self, 0, sizeof(LDKChannelDerivationParameters)); return res; }
+ ~ChannelDerivationParameters() { ChannelDerivationParameters_free(self); }
+ ChannelDerivationParameters& operator=(ChannelDerivationParameters&& o) { ChannelDerivationParameters_free(self); self = o.self; memset(&o, 0, sizeof(ChannelDerivationParameters)); return *this; }
+ LDKChannelDerivationParameters* operator &() { return &self; }
+ LDKChannelDerivationParameters* operator ->() { return &self; }
+ const LDKChannelDerivationParameters* operator &() const { return &self; }
+ const LDKChannelDerivationParameters* operator ->() const { return &self; }
+};
+class AnchorDescriptor {
+private:
+ LDKAnchorDescriptor self;
+public:
+ AnchorDescriptor(const AnchorDescriptor&) = delete;
+ AnchorDescriptor(AnchorDescriptor&& o) : self(o.self) { memset(&o, 0, sizeof(AnchorDescriptor)); }
+ AnchorDescriptor(LDKAnchorDescriptor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKAnchorDescriptor)); }
+ operator LDKAnchorDescriptor() && { LDKAnchorDescriptor res = self; memset(&self, 0, sizeof(LDKAnchorDescriptor)); return res; }
+ ~AnchorDescriptor() { AnchorDescriptor_free(self); }
+ AnchorDescriptor& operator=(AnchorDescriptor&& o) { AnchorDescriptor_free(self); self = o.self; memset(&o, 0, sizeof(AnchorDescriptor)); return *this; }
+ LDKAnchorDescriptor* operator &() { return &self; }
+ LDKAnchorDescriptor* operator ->() { return &self; }
+ const LDKAnchorDescriptor* operator &() const { return &self; }
+ const LDKAnchorDescriptor* operator ->() const { return &self; }
+};
+class HTLCDescriptor {
+private:
+ LDKHTLCDescriptor self;
+public:
+ HTLCDescriptor(const HTLCDescriptor&) = delete;
+ HTLCDescriptor(HTLCDescriptor&& o) : self(o.self) { memset(&o, 0, sizeof(HTLCDescriptor)); }
+ HTLCDescriptor(LDKHTLCDescriptor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKHTLCDescriptor)); }
+ operator LDKHTLCDescriptor() && { LDKHTLCDescriptor res = self; memset(&self, 0, sizeof(LDKHTLCDescriptor)); return res; }
+ ~HTLCDescriptor() { HTLCDescriptor_free(self); }
+ HTLCDescriptor& operator=(HTLCDescriptor&& o) { HTLCDescriptor_free(self); self = o.self; memset(&o, 0, sizeof(HTLCDescriptor)); return *this; }
+ LDKHTLCDescriptor* operator &() { return &self; }
+ LDKHTLCDescriptor* operator ->() { return &self; }
+ const LDKHTLCDescriptor* operator &() const { return &self; }
+ const LDKHTLCDescriptor* operator ->() const { return &self; }
+};
+class BumpTransactionEvent {
+private:
+ LDKBumpTransactionEvent self;
+public:
+ BumpTransactionEvent(const BumpTransactionEvent&) = delete;
+ BumpTransactionEvent(BumpTransactionEvent&& o) : self(o.self) { memset(&o, 0, sizeof(BumpTransactionEvent)); }
+ BumpTransactionEvent(LDKBumpTransactionEvent&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKBumpTransactionEvent)); }
+ operator LDKBumpTransactionEvent() && { LDKBumpTransactionEvent res = self; memset(&self, 0, sizeof(LDKBumpTransactionEvent)); return res; }
+ ~BumpTransactionEvent() { BumpTransactionEvent_free(self); }
+ BumpTransactionEvent& operator=(BumpTransactionEvent&& o) { BumpTransactionEvent_free(self); self = o.self; memset(&o, 0, sizeof(BumpTransactionEvent)); return *this; }
+ LDKBumpTransactionEvent* operator &() { return &self; }
+ LDKBumpTransactionEvent* operator ->() { return &self; }
+ const LDKBumpTransactionEvent* operator &() const { return &self; }
+ const LDKBumpTransactionEvent* operator ->() const { return &self; }
+};
+class Input {
+private:
+ LDKInput self;
+public:
+ Input(const Input&) = delete;
+ Input(Input&& o) : self(o.self) { memset(&o, 0, sizeof(Input)); }
+ Input(LDKInput&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInput)); }
+ operator LDKInput() && { LDKInput res = self; memset(&self, 0, sizeof(LDKInput)); return res; }
+ ~Input() { Input_free(self); }
+ Input& operator=(Input&& o) { Input_free(self); self = o.self; memset(&o, 0, sizeof(Input)); return *this; }
+ LDKInput* operator &() { return &self; }
+ LDKInput* operator ->() { return &self; }
+ const LDKInput* operator &() const { return &self; }
+ const LDKInput* operator ->() const { return &self; }
+};
+class Utxo {
+private:
+ LDKUtxo self;
+public:
+ Utxo(const Utxo&) = delete;
+ Utxo(Utxo&& o) : self(o.self) { memset(&o, 0, sizeof(Utxo)); }
+ Utxo(LDKUtxo&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKUtxo)); }
+ operator LDKUtxo() && { LDKUtxo res = self; memset(&self, 0, sizeof(LDKUtxo)); return res; }
+ ~Utxo() { Utxo_free(self); }
+ Utxo& operator=(Utxo&& o) { Utxo_free(self); self = o.self; memset(&o, 0, sizeof(Utxo)); return *this; }
+ LDKUtxo* operator &() { return &self; }
+ LDKUtxo* operator ->() { return &self; }
+ const LDKUtxo* operator &() const { return &self; }
+ const LDKUtxo* operator ->() const { return &self; }
+};
+class CoinSelection {
+private:
+ LDKCoinSelection self;
+public:
+ CoinSelection(const CoinSelection&) = delete;
+ CoinSelection(CoinSelection&& o) : self(o.self) { memset(&o, 0, sizeof(CoinSelection)); }
+ CoinSelection(LDKCoinSelection&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCoinSelection)); }
+ operator LDKCoinSelection() && { LDKCoinSelection res = self; memset(&self, 0, sizeof(LDKCoinSelection)); return res; }
+ ~CoinSelection() { CoinSelection_free(self); }
+ CoinSelection& operator=(CoinSelection&& o) { CoinSelection_free(self); self = o.self; memset(&o, 0, sizeof(CoinSelection)); return *this; }
+ LDKCoinSelection* operator &() { return &self; }
+ LDKCoinSelection* operator ->() { return &self; }
+ const LDKCoinSelection* operator &() const { return &self; }
+ const LDKCoinSelection* operator ->() const { return &self; }
+};
+class CoinSelectionSource {
+private:
+ LDKCoinSelectionSource self;
+public:
+ CoinSelectionSource(const CoinSelectionSource&) = delete;
+ CoinSelectionSource(CoinSelectionSource&& o) : self(o.self) { memset(&o, 0, sizeof(CoinSelectionSource)); }
+ CoinSelectionSource(LDKCoinSelectionSource&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCoinSelectionSource)); }
+ operator LDKCoinSelectionSource() && { LDKCoinSelectionSource res = self; memset(&self, 0, sizeof(LDKCoinSelectionSource)); return res; }
+ ~CoinSelectionSource() { CoinSelectionSource_free(self); }
+ CoinSelectionSource& operator=(CoinSelectionSource&& o) { CoinSelectionSource_free(self); self = o.self; memset(&o, 0, sizeof(CoinSelectionSource)); return *this; }
+ LDKCoinSelectionSource* operator &() { return &self; }
+ LDKCoinSelectionSource* operator ->() { return &self; }
+ const LDKCoinSelectionSource* operator &() const { return &self; }
+ const LDKCoinSelectionSource* operator ->() const { return &self; }
+ /**
+ * Performs coin selection of a set of UTXOs, with at least 1 confirmation each, that are
+ * available to spend. Implementations are free to pick their coin selection algorithm of
+ * choice, as long as the following requirements are met:
+ *
+ * 1. `must_spend` contains a set of [`Input`]s that must be included in the transaction
+ * throughout coin selection, but must not be returned as part of the result.
+ * 2. `must_pay_to` contains a set of [`TxOut`]s that must be included in the transaction
+ * throughout coin selection. In some cases, like when funding an anchor transaction, this
+ * set is empty. Implementations should ensure they handle this correctly on their end,
+ * e.g., Bitcoin Core's `fundrawtransaction` RPC requires at least one output to be
+ * provided, in which case a zero-value empty OP_RETURN output can be used instead.
+ * 3. Enough inputs must be selected/contributed for the resulting transaction (including the
+ * inputs and outputs noted above) to meet `target_feerate_sat_per_1000_weight`.
+ *
+ * Implementations must take note that [`Input::satisfaction_weight`] only tracks the weight of
+ * the input's `script_sig` and `witness`. Some wallets, like Bitcoin Core's, may require
+ * providing the full input weight. Failing to do so may lead to underestimating fee bumps and
+ * delaying block inclusion.
+ *
+ * The `claim_id` must map to the set of external UTXOs assigned to the claim, such that they
+ * can be re-used within new fee-bumped iterations of the original claiming transaction,
+ * ensuring that claims don't double spend each other. If a specific `claim_id` has never had a
+ * transaction associated with it, and all of the available UTXOs have already been assigned to
+ * other claims, implementations must be willing to double spend their UTXOs. The choice of
+ * which UTXOs to double spend is left to the implementation, but it must strive to keep the
+ * set of other claims being double spent to a minimum.
+ */
+ inline LDK::CResult_CoinSelectionNoneZ select_confirmed_utxos(struct LDKThirtyTwoBytes claim_id, struct LDKCVec_InputZ must_spend, struct LDKCVec_TxOutZ must_pay_to, uint32_t target_feerate_sat_per_1000_weight);
+ /**
+ * Signs and provides the full witness for all inputs within the transaction known to the
+ * trait (i.e., any provided via [`CoinSelectionSource::select_confirmed_utxos`]).
+ */
+ inline LDK::CResult_TransactionNoneZ sign_tx(struct LDKTransaction tx);
+};
+class WalletSource {
+private:
+ LDKWalletSource self;
+public:
+ WalletSource(const WalletSource&) = delete;
+ WalletSource(WalletSource&& o) : self(o.self) { memset(&o, 0, sizeof(WalletSource)); }
+ WalletSource(LDKWalletSource&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKWalletSource)); }
+ operator LDKWalletSource() && { LDKWalletSource res = self; memset(&self, 0, sizeof(LDKWalletSource)); return res; }
+ ~WalletSource() { WalletSource_free(self); }
+ WalletSource& operator=(WalletSource&& o) { WalletSource_free(self); self = o.self; memset(&o, 0, sizeof(WalletSource)); return *this; }
+ LDKWalletSource* operator &() { return &self; }
+ LDKWalletSource* operator ->() { return &self; }
+ const LDKWalletSource* operator &() const { return &self; }
+ const LDKWalletSource* operator ->() const { return &self; }
+ /**
+ * Returns all UTXOs, with at least 1 confirmation each, that are available to spend.
+ */
+ inline LDK::CResult_CVec_UtxoZNoneZ list_confirmed_utxos();
+ /**
+ * Returns a script to use for change above dust resulting from a successful coin selection
+ * attempt.
+ */
+ inline LDK::CResult_CVec_u8ZNoneZ get_change_script();
+ /**
+ * Signs and provides the full [`TxIn::script_sig`] and [`TxIn::witness`] for all inputs within
+ * the transaction known to the wallet (i.e., any provided via
+ * [`WalletSource::list_confirmed_utxos`]).
+ */
+ inline LDK::CResult_TransactionNoneZ sign_tx(struct LDKTransaction tx);
+};
+class Wallet {
+private:
+ LDKWallet self;
+public:
+ Wallet(const Wallet&) = delete;
+ Wallet(Wallet&& o) : self(o.self) { memset(&o, 0, sizeof(Wallet)); }
+ Wallet(LDKWallet&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKWallet)); }
+ operator LDKWallet() && { LDKWallet res = self; memset(&self, 0, sizeof(LDKWallet)); return res; }
+ ~Wallet() { Wallet_free(self); }
+ Wallet& operator=(Wallet&& o) { Wallet_free(self); self = o.self; memset(&o, 0, sizeof(Wallet)); return *this; }
+ LDKWallet* operator &() { return &self; }
+ LDKWallet* operator ->() { return &self; }
+ const LDKWallet* operator &() const { return &self; }
+ const LDKWallet* operator ->() const { return &self; }
+};
+class BumpTransactionEventHandler {
+private:
+ LDKBumpTransactionEventHandler self;
+public:
+ BumpTransactionEventHandler(const BumpTransactionEventHandler&) = delete;
+ BumpTransactionEventHandler(BumpTransactionEventHandler&& o) : self(o.self) { memset(&o, 0, sizeof(BumpTransactionEventHandler)); }
+ BumpTransactionEventHandler(LDKBumpTransactionEventHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKBumpTransactionEventHandler)); }
+ operator LDKBumpTransactionEventHandler() && { LDKBumpTransactionEventHandler res = self; memset(&self, 0, sizeof(LDKBumpTransactionEventHandler)); return res; }
+ ~BumpTransactionEventHandler() { BumpTransactionEventHandler_free(self); }
+ BumpTransactionEventHandler& operator=(BumpTransactionEventHandler&& o) { BumpTransactionEventHandler_free(self); self = o.self; memset(&o, 0, sizeof(BumpTransactionEventHandler)); return *this; }
+ LDKBumpTransactionEventHandler* operator &() { return &self; }
+ LDKBumpTransactionEventHandler* operator ->() { return &self; }
+ const LDKBumpTransactionEventHandler* operator &() const { return &self; }
+ const LDKBumpTransactionEventHandler* operator ->() const { return &self; }