+ ChannelHandshakeLimits(const ChannelHandshakeLimits&) = delete;
+ ChannelHandshakeLimits(ChannelHandshakeLimits&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelHandshakeLimits)); }
+ ChannelHandshakeLimits(LDKChannelHandshakeLimits&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelHandshakeLimits)); }
+ operator LDKChannelHandshakeLimits() && { LDKChannelHandshakeLimits res = self; memset(&self, 0, sizeof(LDKChannelHandshakeLimits)); return res; }
+ ~ChannelHandshakeLimits() { ChannelHandshakeLimits_free(self); }
+ ChannelHandshakeLimits& operator=(ChannelHandshakeLimits&& o) { ChannelHandshakeLimits_free(self); self = o.self; memset(&o, 0, sizeof(ChannelHandshakeLimits)); return *this; }
+ LDKChannelHandshakeLimits* operator &() { return &self; }
+ LDKChannelHandshakeLimits* operator ->() { return &self; }
+ const LDKChannelHandshakeLimits* operator &() const { return &self; }
+ const LDKChannelHandshakeLimits* operator ->() const { return &self; }
+};
+class ChannelConfig {
+private:
+ LDKChannelConfig self;
+public:
+ ChannelConfig(const ChannelConfig&) = delete;
+ ChannelConfig(ChannelConfig&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelConfig)); }
+ ChannelConfig(LDKChannelConfig&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelConfig)); }
+ operator LDKChannelConfig() && { LDKChannelConfig res = self; memset(&self, 0, sizeof(LDKChannelConfig)); return res; }
+ ~ChannelConfig() { ChannelConfig_free(self); }
+ ChannelConfig& operator=(ChannelConfig&& o) { ChannelConfig_free(self); self = o.self; memset(&o, 0, sizeof(ChannelConfig)); return *this; }
+ LDKChannelConfig* operator &() { return &self; }
+ LDKChannelConfig* operator ->() { return &self; }
+ const LDKChannelConfig* operator &() const { return &self; }
+ const LDKChannelConfig* operator ->() const { return &self; }
+};
+class UserConfig {
+private:
+ LDKUserConfig self;
+public:
+ UserConfig(const UserConfig&) = delete;
+ UserConfig(UserConfig&& o) : self(o.self) { memset(&o, 0, sizeof(UserConfig)); }
+ UserConfig(LDKUserConfig&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKUserConfig)); }
+ operator LDKUserConfig() && { LDKUserConfig res = self; memset(&self, 0, sizeof(LDKUserConfig)); return res; }
+ ~UserConfig() { UserConfig_free(self); }
+ UserConfig& operator=(UserConfig&& o) { UserConfig_free(self); self = o.self; memset(&o, 0, sizeof(UserConfig)); return *this; }
+ LDKUserConfig* operator &() { return &self; }
+ LDKUserConfig* operator ->() { return &self; }
+ const LDKUserConfig* operator &() const { return &self; }
+ const LDKUserConfig* operator ->() const { return &self; }
+};
+class APIError {
+private:
+ LDKAPIError self;
+public:
+ APIError(const APIError&) = delete;
+ APIError(APIError&& o) : self(o.self) { memset(&o, 0, sizeof(APIError)); }
+ APIError(LDKAPIError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKAPIError)); }
+ operator LDKAPIError() && { LDKAPIError res = self; memset(&self, 0, sizeof(LDKAPIError)); return res; }
+ ~APIError() { APIError_free(self); }
+ APIError& operator=(APIError&& o) { APIError_free(self); self = o.self; memset(&o, 0, sizeof(APIError)); return *this; }
+ LDKAPIError* operator &() { return &self; }
+ LDKAPIError* operator ->() { return &self; }
+ const LDKAPIError* operator &() const { return &self; }
+ const LDKAPIError* operator ->() const { return &self; }
+};
+class OutPoint {
+private:
+ LDKOutPoint self;
+public:
+ OutPoint(const OutPoint&) = delete;
+ OutPoint(OutPoint&& o) : self(o.self) { memset(&o, 0, sizeof(OutPoint)); }
+ OutPoint(LDKOutPoint&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKOutPoint)); }
+ operator LDKOutPoint() && { LDKOutPoint res = self; memset(&self, 0, sizeof(LDKOutPoint)); return res; }
+ ~OutPoint() { OutPoint_free(self); }
+ OutPoint& operator=(OutPoint&& o) { OutPoint_free(self); self = o.self; memset(&o, 0, sizeof(OutPoint)); return *this; }
+ LDKOutPoint* operator &() { return &self; }
+ LDKOutPoint* operator ->() { return &self; }
+ const LDKOutPoint* operator &() const { return &self; }
+ const LDKOutPoint* operator ->() const { return &self; }
+};
+class CustomMessageReader {
+private:
+ LDKCustomMessageReader self;
+public:
+ CustomMessageReader(const CustomMessageReader&) = delete;
+ CustomMessageReader(CustomMessageReader&& o) : self(o.self) { memset(&o, 0, sizeof(CustomMessageReader)); }
+ CustomMessageReader(LDKCustomMessageReader&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCustomMessageReader)); }
+ operator LDKCustomMessageReader() && { LDKCustomMessageReader res = self; memset(&self, 0, sizeof(LDKCustomMessageReader)); return res; }
+ ~CustomMessageReader() { CustomMessageReader_free(self); }
+ CustomMessageReader& operator=(CustomMessageReader&& o) { CustomMessageReader_free(self); self = o.self; memset(&o, 0, sizeof(CustomMessageReader)); return *this; }
+ LDKCustomMessageReader* operator &() { return &self; }
+ LDKCustomMessageReader* operator ->() { return &self; }
+ const LDKCustomMessageReader* operator &() const { return &self; }
+ const LDKCustomMessageReader* operator ->() const { return &self; }
+ /**
+ * Decodes a custom message to `CustomMessageType`. If the given message type is known to the
+ * implementation and the message could be decoded, must return `Ok(Some(message))`. If the
+ * message type is unknown to the implementation, must return `Ok(None)`. If a decoding error
+ * occur, must return `Err(DecodeError::X)` where `X` details the encountered error.
+ */
+ inline LDK::CResult_COption_TypeZDecodeErrorZ read(uint16_t message_type, struct LDKu8slice buffer);
+};
+class Type {
+private:
+ LDKType self;
+public:
+ Type(const Type&) = delete;
+ Type(Type&& o) : self(o.self) { memset(&o, 0, sizeof(Type)); }
+ Type(LDKType&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKType)); }
+ operator LDKType() && { LDKType res = self; memset(&self, 0, sizeof(LDKType)); return res; }
+ ~Type() { Type_free(self); }
+ Type& operator=(Type&& o) { Type_free(self); self = o.self; memset(&o, 0, sizeof(Type)); return *this; }
+ LDKType* operator &() { return &self; }
+ LDKType* operator ->() { return &self; }
+ const LDKType* operator &() const { return &self; }
+ const LDKType* operator ->() const { return &self; }
+ /**
+ * Returns the type identifying the message payload.
+ */
+ inline uint16_t type_id();
+ /**
+ * Return a human-readable "debug" string describing this object
+ */
+ inline LDK::Str debug_str();
+};
+class Invoice {
+private:
+ LDKInvoice self;
+public:
+ Invoice(const Invoice&) = delete;
+ Invoice(Invoice&& o) : self(o.self) { memset(&o, 0, sizeof(Invoice)); }
+ Invoice(LDKInvoice&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInvoice)); }
+ operator LDKInvoice() && { LDKInvoice res = self; memset(&self, 0, sizeof(LDKInvoice)); return res; }
+ ~Invoice() { Invoice_free(self); }
+ Invoice& operator=(Invoice&& o) { Invoice_free(self); self = o.self; memset(&o, 0, sizeof(Invoice)); return *this; }
+ LDKInvoice* operator &() { return &self; }
+ LDKInvoice* operator ->() { return &self; }
+ const LDKInvoice* operator &() const { return &self; }
+ const LDKInvoice* operator ->() const { return &self; }
+};
+class SignedRawInvoice {
+private:
+ LDKSignedRawInvoice self;
+public:
+ SignedRawInvoice(const SignedRawInvoice&) = delete;
+ SignedRawInvoice(SignedRawInvoice&& o) : self(o.self) { memset(&o, 0, sizeof(SignedRawInvoice)); }
+ SignedRawInvoice(LDKSignedRawInvoice&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSignedRawInvoice)); }
+ operator LDKSignedRawInvoice() && { LDKSignedRawInvoice res = self; memset(&self, 0, sizeof(LDKSignedRawInvoice)); return res; }
+ ~SignedRawInvoice() { SignedRawInvoice_free(self); }
+ SignedRawInvoice& operator=(SignedRawInvoice&& o) { SignedRawInvoice_free(self); self = o.self; memset(&o, 0, sizeof(SignedRawInvoice)); return *this; }
+ LDKSignedRawInvoice* operator &() { return &self; }
+ LDKSignedRawInvoice* operator ->() { return &self; }
+ const LDKSignedRawInvoice* operator &() const { return &self; }
+ const LDKSignedRawInvoice* operator ->() const { return &self; }
+};
+class RawInvoice {
+private:
+ LDKRawInvoice self;
+public:
+ RawInvoice(const RawInvoice&) = delete;
+ RawInvoice(RawInvoice&& o) : self(o.self) { memset(&o, 0, sizeof(RawInvoice)); }
+ RawInvoice(LDKRawInvoice&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRawInvoice)); }
+ operator LDKRawInvoice() && { LDKRawInvoice res = self; memset(&self, 0, sizeof(LDKRawInvoice)); return res; }
+ ~RawInvoice() { RawInvoice_free(self); }
+ RawInvoice& operator=(RawInvoice&& o) { RawInvoice_free(self); self = o.self; memset(&o, 0, sizeof(RawInvoice)); return *this; }
+ LDKRawInvoice* operator &() { return &self; }
+ LDKRawInvoice* operator ->() { return &self; }
+ const LDKRawInvoice* operator &() const { return &self; }
+ const LDKRawInvoice* operator ->() const { return &self; }
+};
+class RawDataPart {
+private:
+ LDKRawDataPart self;
+public:
+ RawDataPart(const RawDataPart&) = delete;
+ RawDataPart(RawDataPart&& o) : self(o.self) { memset(&o, 0, sizeof(RawDataPart)); }
+ RawDataPart(LDKRawDataPart&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRawDataPart)); }
+ operator LDKRawDataPart() && { LDKRawDataPart res = self; memset(&self, 0, sizeof(LDKRawDataPart)); return res; }
+ ~RawDataPart() { RawDataPart_free(self); }
+ RawDataPart& operator=(RawDataPart&& o) { RawDataPart_free(self); self = o.self; memset(&o, 0, sizeof(RawDataPart)); return *this; }
+ LDKRawDataPart* operator &() { return &self; }
+ LDKRawDataPart* operator ->() { return &self; }
+ const LDKRawDataPart* operator &() const { return &self; }
+ const LDKRawDataPart* operator ->() const { return &self; }
+};
+class PositiveTimestamp {
+private:
+ LDKPositiveTimestamp self;
+public:
+ PositiveTimestamp(const PositiveTimestamp&) = delete;
+ PositiveTimestamp(PositiveTimestamp&& o) : self(o.self) { memset(&o, 0, sizeof(PositiveTimestamp)); }
+ PositiveTimestamp(LDKPositiveTimestamp&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPositiveTimestamp)); }
+ operator LDKPositiveTimestamp() && { LDKPositiveTimestamp res = self; memset(&self, 0, sizeof(LDKPositiveTimestamp)); return res; }
+ ~PositiveTimestamp() { PositiveTimestamp_free(self); }
+ PositiveTimestamp& operator=(PositiveTimestamp&& o) { PositiveTimestamp_free(self); self = o.self; memset(&o, 0, sizeof(PositiveTimestamp)); return *this; }
+ LDKPositiveTimestamp* operator &() { return &self; }
+ LDKPositiveTimestamp* operator ->() { return &self; }
+ const LDKPositiveTimestamp* operator &() const { return &self; }
+ const LDKPositiveTimestamp* operator ->() const { return &self; }
+};
+class SiPrefix {
+private:
+ LDKSiPrefix self;
+public:
+ SiPrefix(const SiPrefix&) = delete;
+ SiPrefix(SiPrefix&& o) : self(o.self) { memset(&o, 0, sizeof(SiPrefix)); }
+ SiPrefix(LDKSiPrefix&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSiPrefix)); }
+ operator LDKSiPrefix() && { LDKSiPrefix res = self; memset(&self, 0, sizeof(LDKSiPrefix)); return res; }
+ SiPrefix& operator=(SiPrefix&& o) { self = o.self; memset(&o, 0, sizeof(SiPrefix)); return *this; }
+ LDKSiPrefix* operator &() { return &self; }
+ LDKSiPrefix* operator ->() { return &self; }
+ const LDKSiPrefix* operator &() const { return &self; }
+ const LDKSiPrefix* operator ->() const { return &self; }
+};
+class Currency {
+private:
+ LDKCurrency self;
+public:
+ Currency(const Currency&) = delete;
+ Currency(Currency&& o) : self(o.self) { memset(&o, 0, sizeof(Currency)); }
+ Currency(LDKCurrency&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCurrency)); }
+ operator LDKCurrency() && { LDKCurrency res = self; memset(&self, 0, sizeof(LDKCurrency)); return res; }
+ Currency& operator=(Currency&& o) { self = o.self; memset(&o, 0, sizeof(Currency)); return *this; }
+ LDKCurrency* operator &() { return &self; }
+ LDKCurrency* operator ->() { return &self; }
+ const LDKCurrency* operator &() const { return &self; }
+ const LDKCurrency* operator ->() const { return &self; }
+};
+class Sha256 {
+private:
+ LDKSha256 self;
+public:
+ Sha256(const Sha256&) = delete;
+ Sha256(Sha256&& o) : self(o.self) { memset(&o, 0, sizeof(Sha256)); }
+ Sha256(LDKSha256&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSha256)); }
+ operator LDKSha256() && { LDKSha256 res = self; memset(&self, 0, sizeof(LDKSha256)); return res; }
+ ~Sha256() { Sha256_free(self); }
+ Sha256& operator=(Sha256&& o) { Sha256_free(self); self = o.self; memset(&o, 0, sizeof(Sha256)); return *this; }
+ LDKSha256* operator &() { return &self; }
+ LDKSha256* operator ->() { return &self; }
+ const LDKSha256* operator &() const { return &self; }
+ const LDKSha256* operator ->() const { return &self; }
+};
+class Description {
+private:
+ LDKDescription self;
+public:
+ Description(const Description&) = delete;
+ Description(Description&& o) : self(o.self) { memset(&o, 0, sizeof(Description)); }
+ Description(LDKDescription&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKDescription)); }
+ operator LDKDescription() && { LDKDescription res = self; memset(&self, 0, sizeof(LDKDescription)); return res; }
+ ~Description() { Description_free(self); }
+ Description& operator=(Description&& o) { Description_free(self); self = o.self; memset(&o, 0, sizeof(Description)); return *this; }
+ LDKDescription* operator &() { return &self; }
+ LDKDescription* operator ->() { return &self; }
+ const LDKDescription* operator &() const { return &self; }
+ const LDKDescription* operator ->() const { return &self; }
+};
+class PayeePubKey {
+private:
+ LDKPayeePubKey self;
+public:
+ PayeePubKey(const PayeePubKey&) = delete;
+ PayeePubKey(PayeePubKey&& o) : self(o.self) { memset(&o, 0, sizeof(PayeePubKey)); }
+ PayeePubKey(LDKPayeePubKey&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPayeePubKey)); }
+ operator LDKPayeePubKey() && { LDKPayeePubKey res = self; memset(&self, 0, sizeof(LDKPayeePubKey)); return res; }
+ ~PayeePubKey() { PayeePubKey_free(self); }
+ PayeePubKey& operator=(PayeePubKey&& o) { PayeePubKey_free(self); self = o.self; memset(&o, 0, sizeof(PayeePubKey)); return *this; }
+ LDKPayeePubKey* operator &() { return &self; }
+ LDKPayeePubKey* operator ->() { return &self; }
+ const LDKPayeePubKey* operator &() const { return &self; }
+ const LDKPayeePubKey* operator ->() const { return &self; }
+};
+class ExpiryTime {
+private:
+ LDKExpiryTime self;
+public:
+ ExpiryTime(const ExpiryTime&) = delete;
+ ExpiryTime(ExpiryTime&& o) : self(o.self) { memset(&o, 0, sizeof(ExpiryTime)); }
+ ExpiryTime(LDKExpiryTime&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKExpiryTime)); }
+ operator LDKExpiryTime() && { LDKExpiryTime res = self; memset(&self, 0, sizeof(LDKExpiryTime)); return res; }
+ ~ExpiryTime() { ExpiryTime_free(self); }
+ ExpiryTime& operator=(ExpiryTime&& o) { ExpiryTime_free(self); self = o.self; memset(&o, 0, sizeof(ExpiryTime)); return *this; }
+ LDKExpiryTime* operator &() { return &self; }
+ LDKExpiryTime* operator ->() { return &self; }
+ const LDKExpiryTime* operator &() const { return &self; }
+ const LDKExpiryTime* operator ->() const { return &self; }
+};
+class MinFinalCltvExpiry {
+private:
+ LDKMinFinalCltvExpiry self;
+public:
+ MinFinalCltvExpiry(const MinFinalCltvExpiry&) = delete;
+ MinFinalCltvExpiry(MinFinalCltvExpiry&& o) : self(o.self) { memset(&o, 0, sizeof(MinFinalCltvExpiry)); }
+ MinFinalCltvExpiry(LDKMinFinalCltvExpiry&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMinFinalCltvExpiry)); }
+ operator LDKMinFinalCltvExpiry() && { LDKMinFinalCltvExpiry res = self; memset(&self, 0, sizeof(LDKMinFinalCltvExpiry)); return res; }
+ ~MinFinalCltvExpiry() { MinFinalCltvExpiry_free(self); }
+ MinFinalCltvExpiry& operator=(MinFinalCltvExpiry&& o) { MinFinalCltvExpiry_free(self); self = o.self; memset(&o, 0, sizeof(MinFinalCltvExpiry)); return *this; }
+ LDKMinFinalCltvExpiry* operator &() { return &self; }
+ LDKMinFinalCltvExpiry* operator ->() { return &self; }
+ const LDKMinFinalCltvExpiry* operator &() const { return &self; }
+ const LDKMinFinalCltvExpiry* operator ->() const { return &self; }
+};
+class Fallback {
+private:
+ LDKFallback self;
+public:
+ Fallback(const Fallback&) = delete;
+ Fallback(Fallback&& o) : self(o.self) { memset(&o, 0, sizeof(Fallback)); }
+ Fallback(LDKFallback&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKFallback)); }
+ operator LDKFallback() && { LDKFallback res = self; memset(&self, 0, sizeof(LDKFallback)); return res; }
+ ~Fallback() { Fallback_free(self); }
+ Fallback& operator=(Fallback&& o) { Fallback_free(self); self = o.self; memset(&o, 0, sizeof(Fallback)); return *this; }
+ LDKFallback* operator &() { return &self; }
+ LDKFallback* operator ->() { return &self; }
+ const LDKFallback* operator &() const { return &self; }
+ const LDKFallback* operator ->() const { return &self; }
+};
+class InvoiceSignature {
+private:
+ LDKInvoiceSignature self;
+public:
+ InvoiceSignature(const InvoiceSignature&) = delete;
+ InvoiceSignature(InvoiceSignature&& o) : self(o.self) { memset(&o, 0, sizeof(InvoiceSignature)); }
+ InvoiceSignature(LDKInvoiceSignature&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInvoiceSignature)); }
+ operator LDKInvoiceSignature() && { LDKInvoiceSignature res = self; memset(&self, 0, sizeof(LDKInvoiceSignature)); return res; }
+ ~InvoiceSignature() { InvoiceSignature_free(self); }
+ InvoiceSignature& operator=(InvoiceSignature&& o) { InvoiceSignature_free(self); self = o.self; memset(&o, 0, sizeof(InvoiceSignature)); return *this; }
+ LDKInvoiceSignature* operator &() { return &self; }
+ LDKInvoiceSignature* operator ->() { return &self; }
+ const LDKInvoiceSignature* operator &() const { return &self; }
+ const LDKInvoiceSignature* operator ->() const { return &self; }
+};
+class PrivateRoute {
+private:
+ LDKPrivateRoute self;
+public:
+ PrivateRoute(const PrivateRoute&) = delete;
+ PrivateRoute(PrivateRoute&& o) : self(o.self) { memset(&o, 0, sizeof(PrivateRoute)); }
+ PrivateRoute(LDKPrivateRoute&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPrivateRoute)); }
+ operator LDKPrivateRoute() && { LDKPrivateRoute res = self; memset(&self, 0, sizeof(LDKPrivateRoute)); return res; }
+ ~PrivateRoute() { PrivateRoute_free(self); }
+ PrivateRoute& operator=(PrivateRoute&& o) { PrivateRoute_free(self); self = o.self; memset(&o, 0, sizeof(PrivateRoute)); return *this; }
+ LDKPrivateRoute* operator &() { return &self; }
+ LDKPrivateRoute* operator ->() { return &self; }
+ const LDKPrivateRoute* operator &() const { return &self; }
+ const LDKPrivateRoute* operator ->() const { return &self; }
+};
+class CreationError {
+private:
+ LDKCreationError self;
+public:
+ CreationError(const CreationError&) = delete;
+ CreationError(CreationError&& o) : self(o.self) { memset(&o, 0, sizeof(CreationError)); }
+ CreationError(LDKCreationError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCreationError)); }
+ operator LDKCreationError() && { LDKCreationError res = self; memset(&self, 0, sizeof(LDKCreationError)); return res; }
+ CreationError& operator=(CreationError&& o) { self = o.self; memset(&o, 0, sizeof(CreationError)); return *this; }
+ LDKCreationError* operator &() { return &self; }
+ LDKCreationError* operator ->() { return &self; }
+ const LDKCreationError* operator &() const { return &self; }
+ const LDKCreationError* operator ->() const { return &self; }
+};
+class SemanticError {
+private:
+ LDKSemanticError self;
+public:
+ SemanticError(const SemanticError&) = delete;
+ SemanticError(SemanticError&& o) : self(o.self) { memset(&o, 0, sizeof(SemanticError)); }
+ SemanticError(LDKSemanticError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSemanticError)); }
+ operator LDKSemanticError() && { LDKSemanticError res = self; memset(&self, 0, sizeof(LDKSemanticError)); return res; }
+ SemanticError& operator=(SemanticError&& o) { self = o.self; memset(&o, 0, sizeof(SemanticError)); return *this; }
+ LDKSemanticError* operator &() { return &self; }
+ LDKSemanticError* operator ->() { return &self; }
+ const LDKSemanticError* operator &() const { return &self; }
+ const LDKSemanticError* operator ->() const { return &self; }
+};
+class SignOrCreationError {
+private:
+ LDKSignOrCreationError self;
+public:
+ SignOrCreationError(const SignOrCreationError&) = delete;
+ SignOrCreationError(SignOrCreationError&& o) : self(o.self) { memset(&o, 0, sizeof(SignOrCreationError)); }
+ SignOrCreationError(LDKSignOrCreationError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSignOrCreationError)); }
+ operator LDKSignOrCreationError() && { LDKSignOrCreationError res = self; memset(&self, 0, sizeof(LDKSignOrCreationError)); return res; }
+ ~SignOrCreationError() { SignOrCreationError_free(self); }
+ SignOrCreationError& operator=(SignOrCreationError&& o) { SignOrCreationError_free(self); self = o.self; memset(&o, 0, sizeof(SignOrCreationError)); return *this; }
+ LDKSignOrCreationError* operator &() { return &self; }
+ LDKSignOrCreationError* operator ->() { return &self; }
+ const LDKSignOrCreationError* operator &() const { return &self; }
+ const LDKSignOrCreationError* operator ->() const { return &self; }
+};
+class ChannelMonitorUpdate {
+private:
+ LDKChannelMonitorUpdate self;
+public:
+ ChannelMonitorUpdate(const ChannelMonitorUpdate&) = delete;
+ ChannelMonitorUpdate(ChannelMonitorUpdate&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelMonitorUpdate)); }
+ ChannelMonitorUpdate(LDKChannelMonitorUpdate&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelMonitorUpdate)); }
+ operator LDKChannelMonitorUpdate() && { LDKChannelMonitorUpdate res = self; memset(&self, 0, sizeof(LDKChannelMonitorUpdate)); return res; }
+ ~ChannelMonitorUpdate() { ChannelMonitorUpdate_free(self); }
+ ChannelMonitorUpdate& operator=(ChannelMonitorUpdate&& o) { ChannelMonitorUpdate_free(self); self = o.self; memset(&o, 0, sizeof(ChannelMonitorUpdate)); return *this; }
+ LDKChannelMonitorUpdate* operator &() { return &self; }
+ LDKChannelMonitorUpdate* operator ->() { return &self; }
+ const LDKChannelMonitorUpdate* operator &() const { return &self; }
+ const LDKChannelMonitorUpdate* operator ->() const { return &self; }
+};
+class MonitorUpdateError {
+private:
+ LDKMonitorUpdateError self;
+public:
+ MonitorUpdateError(const MonitorUpdateError&) = delete;
+ MonitorUpdateError(MonitorUpdateError&& o) : self(o.self) { memset(&o, 0, sizeof(MonitorUpdateError)); }
+ MonitorUpdateError(LDKMonitorUpdateError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMonitorUpdateError)); }
+ operator LDKMonitorUpdateError() && { LDKMonitorUpdateError res = self; memset(&self, 0, sizeof(LDKMonitorUpdateError)); return res; }
+ ~MonitorUpdateError() { MonitorUpdateError_free(self); }
+ MonitorUpdateError& operator=(MonitorUpdateError&& o) { MonitorUpdateError_free(self); self = o.self; memset(&o, 0, sizeof(MonitorUpdateError)); return *this; }
+ LDKMonitorUpdateError* operator &() { return &self; }
+ LDKMonitorUpdateError* operator ->() { return &self; }
+ const LDKMonitorUpdateError* operator &() const { return &self; }
+ const LDKMonitorUpdateError* operator ->() const { return &self; }
+};
+class MonitorEvent {
+private:
+ LDKMonitorEvent self;
+public:
+ MonitorEvent(const MonitorEvent&) = delete;
+ MonitorEvent(MonitorEvent&& o) : self(o.self) { memset(&o, 0, sizeof(MonitorEvent)); }
+ MonitorEvent(LDKMonitorEvent&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMonitorEvent)); }
+ operator LDKMonitorEvent() && { LDKMonitorEvent res = self; memset(&self, 0, sizeof(LDKMonitorEvent)); return res; }
+ ~MonitorEvent() { MonitorEvent_free(self); }
+ MonitorEvent& operator=(MonitorEvent&& o) { MonitorEvent_free(self); self = o.self; memset(&o, 0, sizeof(MonitorEvent)); return *this; }
+ LDKMonitorEvent* operator &() { return &self; }
+ LDKMonitorEvent* operator ->() { return &self; }
+ const LDKMonitorEvent* operator &() const { return &self; }
+ const LDKMonitorEvent* operator ->() const { return &self; }
+};
+class HTLCUpdate {
+private:
+ LDKHTLCUpdate self;
+public:
+ HTLCUpdate(const HTLCUpdate&) = delete;
+ HTLCUpdate(HTLCUpdate&& o) : self(o.self) { memset(&o, 0, sizeof(HTLCUpdate)); }
+ HTLCUpdate(LDKHTLCUpdate&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKHTLCUpdate)); }
+ operator LDKHTLCUpdate() && { LDKHTLCUpdate res = self; memset(&self, 0, sizeof(LDKHTLCUpdate)); return res; }
+ ~HTLCUpdate() { HTLCUpdate_free(self); }
+ HTLCUpdate& operator=(HTLCUpdate&& o) { HTLCUpdate_free(self); self = o.self; memset(&o, 0, sizeof(HTLCUpdate)); return *this; }
+ LDKHTLCUpdate* operator &() { return &self; }
+ LDKHTLCUpdate* operator ->() { return &self; }
+ const LDKHTLCUpdate* operator &() const { return &self; }
+ const LDKHTLCUpdate* operator ->() const { return &self; }
+};
+class Balance {
+private:
+ LDKBalance self;
+public:
+ Balance(const Balance&) = delete;
+ Balance(Balance&& o) : self(o.self) { memset(&o, 0, sizeof(Balance)); }
+ Balance(LDKBalance&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKBalance)); }
+ operator LDKBalance() && { LDKBalance res = self; memset(&self, 0, sizeof(LDKBalance)); return res; }
+ ~Balance() { Balance_free(self); }
+ Balance& operator=(Balance&& o) { Balance_free(self); self = o.self; memset(&o, 0, sizeof(Balance)); return *this; }
+ LDKBalance* operator &() { return &self; }
+ LDKBalance* operator ->() { return &self; }
+ const LDKBalance* operator &() const { return &self; }
+ const LDKBalance* operator ->() const { return &self; }
+};
+class ChannelMonitor {
+private:
+ LDKChannelMonitor self;
+public:
+ ChannelMonitor(const ChannelMonitor&) = delete;
+ ChannelMonitor(ChannelMonitor&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelMonitor)); }
+ ChannelMonitor(LDKChannelMonitor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelMonitor)); }
+ operator LDKChannelMonitor() && { LDKChannelMonitor res = self; memset(&self, 0, sizeof(LDKChannelMonitor)); return res; }
+ ~ChannelMonitor() { ChannelMonitor_free(self); }
+ ChannelMonitor& operator=(ChannelMonitor&& o) { ChannelMonitor_free(self); self = o.self; memset(&o, 0, sizeof(ChannelMonitor)); return *this; }
+ LDKChannelMonitor* operator &() { return &self; }
+ LDKChannelMonitor* operator ->() { return &self; }
+ const LDKChannelMonitor* operator &() const { return &self; }
+ const LDKChannelMonitor* operator ->() const { return &self; }
+};
+class CustomMessageHandler {
+private:
+ LDKCustomMessageHandler self;
+public:
+ CustomMessageHandler(const CustomMessageHandler&) = delete;
+ CustomMessageHandler(CustomMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(CustomMessageHandler)); }
+ CustomMessageHandler(LDKCustomMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCustomMessageHandler)); }
+ operator LDKCustomMessageHandler() && { LDKCustomMessageHandler res = self; memset(&self, 0, sizeof(LDKCustomMessageHandler)); return res; }
+ ~CustomMessageHandler() { CustomMessageHandler_free(self); }
+ CustomMessageHandler& operator=(CustomMessageHandler&& o) { CustomMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(CustomMessageHandler)); return *this; }
+ LDKCustomMessageHandler* operator &() { return &self; }
+ LDKCustomMessageHandler* operator ->() { return &self; }
+ const LDKCustomMessageHandler* operator &() const { return &self; }
+ const LDKCustomMessageHandler* operator ->() const { return &self; }
+ /**
+ * Called with the message type that was received and the buffer to be read.
+ * Can return a `MessageHandlingError` if the message could not be handled.
+ */
+ inline LDK::CResult_NoneLightningErrorZ handle_custom_message(struct LDKType msg, struct LDKPublicKey sender_node_id);
+ /**
+ * Gets the list of pending messages which were generated by the custom message
+ * handler, clearing the list in the process. The first tuple element must
+ * correspond to the intended recipients node ids. If no connection to one of the
+ * specified node does not exist, the message is simply not sent to it.
+ */
+ inline LDK::CVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg();
+};
+class IgnoringMessageHandler {
+private:
+ LDKIgnoringMessageHandler self;
+public:
+ IgnoringMessageHandler(const IgnoringMessageHandler&) = delete;
+ IgnoringMessageHandler(IgnoringMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(IgnoringMessageHandler)); }
+ IgnoringMessageHandler(LDKIgnoringMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKIgnoringMessageHandler)); }
+ operator LDKIgnoringMessageHandler() && { LDKIgnoringMessageHandler res = self; memset(&self, 0, sizeof(LDKIgnoringMessageHandler)); return res; }
+ ~IgnoringMessageHandler() { IgnoringMessageHandler_free(self); }
+ IgnoringMessageHandler& operator=(IgnoringMessageHandler&& o) { IgnoringMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(IgnoringMessageHandler)); return *this; }
+ LDKIgnoringMessageHandler* operator &() { return &self; }
+ LDKIgnoringMessageHandler* operator ->() { return &self; }
+ const LDKIgnoringMessageHandler* operator &() const { return &self; }
+ const LDKIgnoringMessageHandler* operator ->() const { return &self; }
+};
+class ErroringMessageHandler {
+private:
+ LDKErroringMessageHandler self;
+public:
+ ErroringMessageHandler(const ErroringMessageHandler&) = delete;
+ ErroringMessageHandler(ErroringMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(ErroringMessageHandler)); }
+ ErroringMessageHandler(LDKErroringMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKErroringMessageHandler)); }
+ operator LDKErroringMessageHandler() && { LDKErroringMessageHandler res = self; memset(&self, 0, sizeof(LDKErroringMessageHandler)); return res; }
+ ~ErroringMessageHandler() { ErroringMessageHandler_free(self); }
+ ErroringMessageHandler& operator=(ErroringMessageHandler&& o) { ErroringMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(ErroringMessageHandler)); return *this; }
+ LDKErroringMessageHandler* operator &() { return &self; }
+ LDKErroringMessageHandler* operator ->() { return &self; }
+ const LDKErroringMessageHandler* operator &() const { return &self; }
+ const LDKErroringMessageHandler* operator ->() const { return &self; }
+};
+class MessageHandler {
+private:
+ LDKMessageHandler self;
+public:
+ MessageHandler(const MessageHandler&) = delete;
+ MessageHandler(MessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(MessageHandler)); }
+ MessageHandler(LDKMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKMessageHandler)); }
+ operator LDKMessageHandler() && { LDKMessageHandler res = self; memset(&self, 0, sizeof(LDKMessageHandler)); return res; }
+ ~MessageHandler() { MessageHandler_free(self); }
+ MessageHandler& operator=(MessageHandler&& o) { MessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(MessageHandler)); return *this; }
+ LDKMessageHandler* operator &() { return &self; }
+ LDKMessageHandler* operator ->() { return &self; }
+ const LDKMessageHandler* operator &() const { return &self; }
+ const LDKMessageHandler* operator ->() const { return &self; }
+};
+class SocketDescriptor {
+private:
+ LDKSocketDescriptor self;
+public:
+ SocketDescriptor(const SocketDescriptor&) = delete;
+ SocketDescriptor(SocketDescriptor&& o) : self(o.self) { memset(&o, 0, sizeof(SocketDescriptor)); }
+ SocketDescriptor(LDKSocketDescriptor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKSocketDescriptor)); }
+ operator LDKSocketDescriptor() && { LDKSocketDescriptor res = self; memset(&self, 0, sizeof(LDKSocketDescriptor)); return res; }
+ ~SocketDescriptor() { SocketDescriptor_free(self); }
+ SocketDescriptor& operator=(SocketDescriptor&& o) { SocketDescriptor_free(self); self = o.self; memset(&o, 0, sizeof(SocketDescriptor)); return *this; }
+ LDKSocketDescriptor* operator &() { return &self; }
+ LDKSocketDescriptor* operator ->() { return &self; }
+ const LDKSocketDescriptor* operator &() const { return &self; }
+ const LDKSocketDescriptor* operator ->() const { return &self; }
+ /**
+ * Attempts to send some data from the given slice to the peer.
+ *
+ * Returns the amount of data which was sent, possibly 0 if the socket has since disconnected.
+ * Note that in the disconnected case, [`PeerManager::socket_disconnected`] must still be
+ * called and further write attempts may occur until that time.
+ *
+ * If the returned size is smaller than `data.len()`, a
+ * [`PeerManager::write_buffer_space_avail`] call must be made the next time more data can be
+ * written. Additionally, until a `send_data` event completes fully, no further
+ * [`PeerManager::read_event`] calls should be made for the same peer! Because this is to
+ * prevent denial-of-service issues, you should not read or buffer any data from the socket
+ * until then.
+ *
+ * If a [`PeerManager::read_event`] call on this descriptor had previously returned true
+ * (indicating that read events should be paused to prevent DoS in the send buffer),
+ * `resume_read` may be set indicating that read events on this descriptor should resume. A
+ * `resume_read` of false carries no meaning, and should not cause any action.
+ */
+ inline uintptr_t send_data(struct LDKu8slice data, bool resume_read);
+ /**
+ * Disconnect the socket pointed to by this SocketDescriptor.
+ *
+ * You do *not* need to call [`PeerManager::socket_disconnected`] with this socket after this
+ * call (doing so is a noop).
+ */
+ inline void disconnect_socket();
+ /** Checks if two objects are equal given this object's this_arg pointer and another object. */
+ inline bool eq(const struct LDKSocketDescriptor *NONNULL_PTR other_arg);
+ /**
+ * Calculate a succinct non-cryptographic hash for an object given its this_arg pointer.
+ * This is used, for example, for inclusion of this object in a hash map.
+ */
+ inline uint64_t hash();
+};
+class PeerHandleError {
+private:
+ LDKPeerHandleError self;
+public:
+ PeerHandleError(const PeerHandleError&) = delete;
+ PeerHandleError(PeerHandleError&& o) : self(o.self) { memset(&o, 0, sizeof(PeerHandleError)); }
+ PeerHandleError(LDKPeerHandleError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPeerHandleError)); }
+ operator LDKPeerHandleError() && { LDKPeerHandleError res = self; memset(&self, 0, sizeof(LDKPeerHandleError)); return res; }
+ ~PeerHandleError() { PeerHandleError_free(self); }
+ PeerHandleError& operator=(PeerHandleError&& o) { PeerHandleError_free(self); self = o.self; memset(&o, 0, sizeof(PeerHandleError)); return *this; }
+ LDKPeerHandleError* operator &() { return &self; }
+ LDKPeerHandleError* operator ->() { return &self; }
+ const LDKPeerHandleError* operator &() const { return &self; }
+ const LDKPeerHandleError* operator ->() const { return &self; }
+};
+class PeerManager {
+private:
+ LDKPeerManager self;
+public:
+ PeerManager(const PeerManager&) = delete;
+ PeerManager(PeerManager&& o) : self(o.self) { memset(&o, 0, sizeof(PeerManager)); }
+ PeerManager(LDKPeerManager&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKPeerManager)); }
+ operator LDKPeerManager() && { LDKPeerManager res = self; memset(&self, 0, sizeof(LDKPeerManager)); return res; }
+ ~PeerManager() { PeerManager_free(self); }
+ PeerManager& operator=(PeerManager&& o) { PeerManager_free(self); self = o.self; memset(&o, 0, sizeof(PeerManager)); return *this; }
+ LDKPeerManager* operator &() { return &self; }
+ LDKPeerManager* operator ->() { return &self; }
+ const LDKPeerManager* operator &() const { return &self; }
+ const LDKPeerManager* operator ->() const { return &self; }