+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);
+};
+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 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 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 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 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);
+ /**
+ * 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 (aka node_id or network_key) based on the provided [`Recipient`].
+ *
+ * This method must return the same value each time it is called with a given `Recipient`
+ * parameter.
+ */
+ inline LDK::CResult_SecretKeyNoneZ get_node_secret(enum LDKRecipient recipient);
+ /**
+ * 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`].
+ */
+ inline LDK::CResult_RecoverableSignatureNoneZ sign_invoice(struct LDKu8slice hrp_bytes, struct LDKCVec_u5Z invoice_data, enum LDKRecipient receipient);
+ /**
+ * Get secret key material as bytes for use in encrypting and decrypting inbound payment data.
+ *
+ * If the implementor of this trait supports [phantom node payments], then every node that is
+ * intended to be included in the phantom invoice route hints must return the same value from
+ * this method.
+ *
+ * This method must return the same value each time it is called.
+ *
+ * [phantom node payments]: PhantomKeysManager
+ */
+ inline LDKThirtyTwoBytes get_inbound_payment_key_material();
+};
+class InMemorySigner {
+private:
+ LDKInMemorySigner self;
+public:
+ InMemorySigner(const InMemorySigner&) = delete;
+ InMemorySigner(InMemorySigner&& o) : self(o.self) { memset(&o, 0, sizeof(InMemorySigner)); }
+ InMemorySigner(LDKInMemorySigner&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKInMemorySigner)); }
+ operator LDKInMemorySigner() && { LDKInMemorySigner res = self; memset(&self, 0, sizeof(LDKInMemorySigner)); return res; }
+ ~InMemorySigner() { InMemorySigner_free(self); }
+ InMemorySigner& operator=(InMemorySigner&& o) { InMemorySigner_free(self); self = o.self; memset(&o, 0, sizeof(InMemorySigner)); return *this; }
+ LDKInMemorySigner* operator &() { return &self; }
+ LDKInMemorySigner* operator ->() { return &self; }
+ const LDKInMemorySigner* operator &() const { return &self; }
+ const LDKInMemorySigner* operator ->() const { return &self; }
+};
+class KeysManager {