+ EcdsaChannelSigner(const EcdsaChannelSigner&) = delete;
+ EcdsaChannelSigner(EcdsaChannelSigner&& o) : self(o.self) { memset(&o, 0, sizeof(EcdsaChannelSigner)); }
+ EcdsaChannelSigner(LDKEcdsaChannelSigner&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKEcdsaChannelSigner)); }
+ operator LDKEcdsaChannelSigner() && { LDKEcdsaChannelSigner res = self; memset(&self, 0, sizeof(LDKEcdsaChannelSigner)); return res; }
+ ~EcdsaChannelSigner() { EcdsaChannelSigner_free(self); }
+ EcdsaChannelSigner& operator=(EcdsaChannelSigner&& o) { EcdsaChannelSigner_free(self); self = o.self; memset(&o, 0, sizeof(EcdsaChannelSigner)); return *this; }
+ LDKEcdsaChannelSigner* operator &() { return &self; }
+ LDKEcdsaChannelSigner* operator ->() { return &self; }
+ const LDKEcdsaChannelSigner* operator &() const { return &self; }
+ const LDKEcdsaChannelSigner* operator ->() const { return &self; }
+ /**
+ * 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_ECDSASignatureCVec_ECDSASignatureZZNoneZ sign_counterparty_commitment(const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx, struct LDKCVec_ThirtyTwoBytesZ 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.
+ *
+ * This will be called
+ * - with a non-revoked `commitment_tx`.
+ * - with the latest `commitment_tx` when we initiate a force-close.
+ *
+ * This may be called multiple times for the same transaction.
+ *
+ * An external signer implementation should check that the commitment has not been revoked.
+ */
+ inline LDK::CResult_ECDSASignatureNoneZ sign_holder_commitment(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_ECDSASignatureNoneZ 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_ECDSASignatureNoneZ 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);
+ /**
+ * Computes the signature for a commitment transaction's HTLC output used as an input within
+ * `htlc_tx`, which spends the commitment transaction at index `input`. The signature returned
+ * must be be computed using [`EcdsaSighashType::All`].
+ *
+ * Note that this may be called for HTLCs in the penultimate commitment transaction if a
+ * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas)
+ * broadcasts it before receiving the update for the latest commitment transaction.
+ *
+ * [`EcdsaSighashType::All`]: bitcoin::blockdata::transaction::EcdsaSighashType::All
+ * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+ */
+ inline LDK::CResult_ECDSASignatureNoneZ sign_holder_htlc_transaction(struct LDKTransaction htlc_tx, uintptr_t input, const struct LDKHTLCDescriptor *NONNULL_PTR htlc_descriptor);
+ /**
+ * 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_ECDSASignatureNoneZ 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_ECDSASignatureNoneZ 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_ECDSASignatureNoneZ sign_holder_anchor_input(struct LDKTransaction anchor_tx, uintptr_t input);
+ /**
+ * Signs a channel announcement message with our funding key proving it comes from one of the
+ * channel participants.
+ *
+ * Channel announcements also require a signature from each node's network key. Our node
+ * signature is computed through [`NodeSigner::sign_gossip_message`].
+ *
+ * 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_ECDSASignatureNoneZ sign_channel_announcement_with_funding_key(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg);
+};
+class WriteableEcdsaChannelSigner {
+private:
+ LDKWriteableEcdsaChannelSigner self;
+public:
+ WriteableEcdsaChannelSigner(const WriteableEcdsaChannelSigner&) = delete;
+ WriteableEcdsaChannelSigner(WriteableEcdsaChannelSigner&& o) : self(o.self) { memset(&o, 0, sizeof(WriteableEcdsaChannelSigner)); }
+ WriteableEcdsaChannelSigner(LDKWriteableEcdsaChannelSigner&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKWriteableEcdsaChannelSigner)); }
+ operator LDKWriteableEcdsaChannelSigner() && { LDKWriteableEcdsaChannelSigner res = self; memset(&self, 0, sizeof(LDKWriteableEcdsaChannelSigner)); return res; }
+ ~WriteableEcdsaChannelSigner() { WriteableEcdsaChannelSigner_free(self); }
+ WriteableEcdsaChannelSigner& operator=(WriteableEcdsaChannelSigner&& o) { WriteableEcdsaChannelSigner_free(self); self = o.self; memset(&o, 0, sizeof(WriteableEcdsaChannelSigner)); return *this; }
+ LDKWriteableEcdsaChannelSigner* operator &() { return &self; }
+ LDKWriteableEcdsaChannelSigner* operator ->() { return &self; }
+ const LDKWriteableEcdsaChannelSigner* operator &() const { return &self; }
+ const LDKWriteableEcdsaChannelSigner* 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 EntropySource {
+private:
+ LDKEntropySource self;
+public:
+ EntropySource(const EntropySource&) = delete;
+ EntropySource(EntropySource&& o) : self(o.self) { memset(&o, 0, sizeof(EntropySource)); }
+ EntropySource(LDKEntropySource&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKEntropySource)); }
+ operator LDKEntropySource() && { LDKEntropySource res = self; memset(&self, 0, sizeof(LDKEntropySource)); return res; }
+ ~EntropySource() { EntropySource_free(self); }
+ EntropySource& operator=(EntropySource&& o) { EntropySource_free(self); self = o.self; memset(&o, 0, sizeof(EntropySource)); return *this; }
+ LDKEntropySource* operator &() { return &self; }
+ LDKEntropySource* operator ->() { return &self; }
+ const LDKEntropySource* operator &() const { return &self; }
+ const LDKEntropySource* operator ->() const { return &self; }
+ /**
+ * Gets a unique, cryptographically-secure, random 32-byte value. This method must return a
+ * different value each time it is called.
+ */
+ inline LDKThirtyTwoBytes get_secure_random_bytes();
+};
+class NodeSigner {
+private:
+ LDKNodeSigner self;
+public:
+ NodeSigner(const NodeSigner&) = delete;
+ NodeSigner(NodeSigner&& o) : self(o.self) { memset(&o, 0, sizeof(NodeSigner)); }
+ NodeSigner(LDKNodeSigner&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKNodeSigner)); }
+ operator LDKNodeSigner() && { LDKNodeSigner res = self; memset(&self, 0, sizeof(LDKNodeSigner)); return res; }
+ ~NodeSigner() { NodeSigner_free(self); }
+ NodeSigner& operator=(NodeSigner&& o) { NodeSigner_free(self); self = o.self; memset(&o, 0, sizeof(NodeSigner)); return *this; }
+ LDKNodeSigner* operator &() { return &self; }
+ LDKNodeSigner* operator ->() { return &self; }
+ const LDKNodeSigner* operator &() const { return &self; }
+ const LDKNodeSigner* operator ->() const { return &self; }
+ /**
+ * 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();
+ /**
+ * Get node id based on the provided [`Recipient`].
+ *
+ * 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_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.
+ *
+ * Note that if this fails while attempting to forward an HTLC, LDK will panic. The error
+ * should be resolved to allow LDK to resume forwarding HTLCs.
+ *
+ * Errors if the [`Recipient`] variant is not supported by the implementation.
+ */
+ inline LDK::CResult_ThirtyTwoBytesNoneZ ecdh(enum LDKRecipient recipient, struct LDKPublicKey other_key, struct LDKCOption_BigEndianScalarZ tweak);
+ /**
+ * 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_bytes` are 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 recipient);
+ /**
+ * Signs the [`TaggedHash`] of a BOLT 12 invoice request.
+ *
+ * May be called by a function passed to [`UnsignedInvoiceRequest::sign`] where
+ * `invoice_request` is the callee.
+ *
+ * Implementors may check that the `invoice_request` is expected rather than blindly signing
+ * the tagged hash. An `Ok` result should sign `invoice_request.tagged_hash().as_digest()` with
+ * the node's signing key or an ephemeral key to preserve privacy, whichever is associated with
+ * [`UnsignedInvoiceRequest::payer_id`].
+ *
+ * [`TaggedHash`]: crate::offers::merkle::TaggedHash
+ */
+ inline LDK::CResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR invoice_request);
+ /**
+ * Signs the [`TaggedHash`] of a BOLT 12 invoice.
+ *
+ * May be called by a function passed to [`UnsignedBolt12Invoice::sign`] where `invoice` is the
+ * callee.
+ *
+ * Implementors may check that the `invoice` is expected rather than blindly signing the tagged
+ * hash. An `Ok` result should sign `invoice.tagged_hash().as_digest()` with the node's signing
+ * key or an ephemeral key to preserve privacy, whichever is associated with
+ * [`UnsignedBolt12Invoice::signing_pubkey`].
+ *
+ * [`TaggedHash`]: crate::offers::merkle::TaggedHash
+ */
+ inline LDK::CResult_SchnorrSignatureNoneZ sign_bolt12_invoice(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR invoice);
+ /**
+ * Sign a gossip message.
+ *
+ * Note that if this fails, LDK may panic and the message will not be broadcast to the network
+ * or a possible channel counterparty. If LDK panics, the error should be resolved to allow the
+ * message to be broadcast, as otherwise it may prevent one from receiving funds over the
+ * corresponding channel.
+ */
+ inline LDK::CResult_ECDSASignatureNoneZ sign_gossip_message(struct LDKUnsignedGossipMessage msg);
+};
+class SignerProvider {
+private:
+ LDKSignerProvider self;
+public:
+ SignerProvider(const SignerProvider&) = delete;
+ SignerProvider(SignerProvider&& o) : self(o.self) { memset(&o, 0, sizeof(SignerProvider)); }
+ SignerProvider(LDKSignerProvider&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSignerProvider)); }
+ operator LDKSignerProvider() && { LDKSignerProvider res = self; memset(&self, 0, sizeof(LDKSignerProvider)); return res; }
+ ~SignerProvider() { SignerProvider_free(self); }
+ SignerProvider& operator=(SignerProvider&& o) { SignerProvider_free(self); self = o.self; memset(&o, 0, sizeof(SignerProvider)); return *this; }
+ LDKSignerProvider* operator &() { return &self; }
+ LDKSignerProvider* operator ->() { return &self; }
+ const LDKSignerProvider* operator &() const { return &self; }
+ const LDKSignerProvider* operator ->() const { return &self; }
+ /**
+ * Generates a unique `channel_keys_id` that can be used to obtain a [`Self::Signer`] through
+ * [`SignerProvider::derive_channel_signer`]. The `user_channel_id` is provided to allow
+ * implementations of [`SignerProvider`] to maintain a mapping between itself and the generated
+ * `channel_keys_id`.
+ *
+ * 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
+ * [`SignerProvider::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
+ * [`ChannelSigner::channel_keys_id`].
+ */
+ inline LDK::WriteableEcdsaChannelSigner derive_channel_signer(uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id);
+ /**
+ * Reads a [`Signer`] for this [`SignerProvider`] from the given input stream.
+ * This is only called during deserialization of other objects which contain
+ * [`WriteableEcdsaChannelSigner`]-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_WriteableEcdsaChannelSignerDecodeErrorZ read_chan_signer(struct LDKu8slice reader);
+ /**
+ * Get a script pubkey which we send funds to when claiming on-chain contestable outputs.
+ *
+ * If this function returns an error, this will result in a channel failing to open.
+ *
+ * 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::CResult_CVec_u8ZNoneZ get_destination_script();
+ /**
+ * Get a script pubkey which we will send funds to when closing a channel.
+ *
+ * If this function returns an error, this will result in a channel failing to open or close.
+ * In the event of a failure when the counterparty is initiating a close, this can result in a
+ * channel force close.
+ *
+ * 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::CResult_ShutdownScriptNoneZ get_shutdown_scriptpubkey();
+};
+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 BackgroundProcessor {
+private:
+ LDKBackgroundProcessor self;
+public:
+ BackgroundProcessor(const BackgroundProcessor&) = delete;
+ BackgroundProcessor(BackgroundProcessor&& o) : self(o.self) { memset(&o, 0, sizeof(BackgroundProcessor)); }
+ BackgroundProcessor(LDKBackgroundProcessor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKBackgroundProcessor)); }
+ operator LDKBackgroundProcessor() && { LDKBackgroundProcessor res = self; memset(&self, 0, sizeof(LDKBackgroundProcessor)); return res; }
+ ~BackgroundProcessor() { BackgroundProcessor_free(self); }
+ BackgroundProcessor& operator=(BackgroundProcessor&& o) { BackgroundProcessor_free(self); self = o.self; memset(&o, 0, sizeof(BackgroundProcessor)); return *this; }
+ LDKBackgroundProcessor* operator &() { return &self; }
+ LDKBackgroundProcessor* operator ->() { return &self; }
+ const LDKBackgroundProcessor* operator &() const { return &self; }
+ const LDKBackgroundProcessor* operator ->() const { return &self; }
+};
+class GossipSync {
+private:
+ LDKGossipSync self;
+public:
+ GossipSync(const GossipSync&) = delete;
+ GossipSync(GossipSync&& o) : self(o.self) { memset(&o, 0, sizeof(GossipSync)); }
+ GossipSync(LDKGossipSync&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKGossipSync)); }
+ operator LDKGossipSync() && { LDKGossipSync res = self; memset(&self, 0, sizeof(LDKGossipSync)); return res; }
+ ~GossipSync() { GossipSync_free(self); }
+ GossipSync& operator=(GossipSync&& o) { GossipSync_free(self); self = o.self; memset(&o, 0, sizeof(GossipSync)); return *this; }
+ LDKGossipSync* operator &() { return &self; }
+ LDKGossipSync* operator ->() { return &self; }
+ const LDKGossipSync* operator &() const { return &self; }
+ const LDKGossipSync* operator ->() const { return &self; }
+};
+class DefaultRouter {
+private:
+ LDKDefaultRouter self;
+public:
+ DefaultRouter(const DefaultRouter&) = delete;
+ DefaultRouter(DefaultRouter&& o) : self(o.self) { memset(&o, 0, sizeof(DefaultRouter)); }
+ DefaultRouter(LDKDefaultRouter&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKDefaultRouter)); }
+ operator LDKDefaultRouter() && { LDKDefaultRouter res = self; memset(&self, 0, sizeof(LDKDefaultRouter)); return res; }
+ ~DefaultRouter() { DefaultRouter_free(self); }
+ DefaultRouter& operator=(DefaultRouter&& o) { DefaultRouter_free(self); self = o.self; memset(&o, 0, sizeof(DefaultRouter)); return *this; }
+ LDKDefaultRouter* operator &() { return &self; }
+ LDKDefaultRouter* operator ->() { return &self; }
+ const LDKDefaultRouter* operator &() const { return &self; }
+ const LDKDefaultRouter* operator ->() const { return &self; }
+};
+class Router {
+private:
+ LDKRouter self;
+public:
+ Router(const Router&) = delete;
+ Router(Router&& o) : self(o.self) { memset(&o, 0, sizeof(Router)); }
+ Router(LDKRouter&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRouter)); }
+ operator LDKRouter() && { LDKRouter res = self; memset(&self, 0, sizeof(LDKRouter)); return res; }
+ ~Router() { Router_free(self); }
+ Router& operator=(Router&& o) { Router_free(self); self = o.self; memset(&o, 0, sizeof(Router)); return *this; }
+ LDKRouter* operator &() { return &self; }
+ LDKRouter* operator ->() { return &self; }
+ const LDKRouter* operator &() const { return &self; }
+ const LDKRouter* operator ->() const { return &self; }
+ /**
+ * Finds a [`Route`] for a payment between the given `payer` and a payee.
+ *
+ * The `payee` and the payment's value are given in [`RouteParameters::payment_params`]
+ * and [`RouteParameters::final_value_msat`], respectively.
+ *
+ * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ inline LDK::CResult_RouteLightningErrorZ find_route(struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR route_params, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKInFlightHtlcs inflight_htlcs);
+ /**
+ * Finds a [`Route`] for a payment between the given `payer` and a payee.
+ *
+ * The `payee` and the payment's value are given in [`RouteParameters::payment_params`]
+ * and [`RouteParameters::final_value_msat`], respectively.
+ *
+ * Includes a [`PaymentHash`] and a [`PaymentId`] to be able to correlate the request with a specific
+ * payment.
+ *
+ * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ inline LDK::CResult_RouteLightningErrorZ find_route_with_id(struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR route_params, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKInFlightHtlcs inflight_htlcs, struct LDKThirtyTwoBytes _payment_hash, struct LDKThirtyTwoBytes _payment_id);
+};
+class ScorerAccountingForInFlightHtlcs {
+private:
+ LDKScorerAccountingForInFlightHtlcs self;
+public:
+ ScorerAccountingForInFlightHtlcs(const ScorerAccountingForInFlightHtlcs&) = delete;
+ ScorerAccountingForInFlightHtlcs(ScorerAccountingForInFlightHtlcs&& o) : self(o.self) { memset(&o, 0, sizeof(ScorerAccountingForInFlightHtlcs)); }
+ ScorerAccountingForInFlightHtlcs(LDKScorerAccountingForInFlightHtlcs&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKScorerAccountingForInFlightHtlcs)); }
+ operator LDKScorerAccountingForInFlightHtlcs() && { LDKScorerAccountingForInFlightHtlcs res = self; memset(&self, 0, sizeof(LDKScorerAccountingForInFlightHtlcs)); return res; }
+ ~ScorerAccountingForInFlightHtlcs() { ScorerAccountingForInFlightHtlcs_free(self); }
+ ScorerAccountingForInFlightHtlcs& operator=(ScorerAccountingForInFlightHtlcs&& o) { ScorerAccountingForInFlightHtlcs_free(self); self = o.self; memset(&o, 0, sizeof(ScorerAccountingForInFlightHtlcs)); return *this; }
+ LDKScorerAccountingForInFlightHtlcs* operator &() { return &self; }
+ LDKScorerAccountingForInFlightHtlcs* operator ->() { return &self; }
+ const LDKScorerAccountingForInFlightHtlcs* operator &() const { return &self; }
+ const LDKScorerAccountingForInFlightHtlcs* operator ->() const { return &self; }
+};
+class InFlightHtlcs {
+private:
+ LDKInFlightHtlcs self;
+public:
+ InFlightHtlcs(const InFlightHtlcs&) = delete;
+ InFlightHtlcs(InFlightHtlcs&& o) : self(o.self) { memset(&o, 0, sizeof(InFlightHtlcs)); }
+ InFlightHtlcs(LDKInFlightHtlcs&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInFlightHtlcs)); }
+ operator LDKInFlightHtlcs() && { LDKInFlightHtlcs res = self; memset(&self, 0, sizeof(LDKInFlightHtlcs)); return res; }
+ ~InFlightHtlcs() { InFlightHtlcs_free(self); }
+ InFlightHtlcs& operator=(InFlightHtlcs&& o) { InFlightHtlcs_free(self); self = o.self; memset(&o, 0, sizeof(InFlightHtlcs)); return *this; }
+ LDKInFlightHtlcs* operator &() { return &self; }
+ LDKInFlightHtlcs* operator ->() { return &self; }
+ const LDKInFlightHtlcs* operator &() const { return &self; }
+ const LDKInFlightHtlcs* operator ->() const { return &self; }