bool result_ok;
} LDKCResult_SpendableOutputDescriptorDecodeErrorZ;
-typedef union LDKCResult_ChanKeySignerDecodeErrorZPtr {
+typedef union LDKCResult_ChannelKeysDecodeErrorZPtr {
struct LDKChannelKeys *result;
struct LDKDecodeError *err;
-} LDKCResult_ChanKeySignerDecodeErrorZPtr;
+} LDKCResult_ChannelKeysDecodeErrorZPtr;
-typedef struct LDKCResult_ChanKeySignerDecodeErrorZ {
- union LDKCResult_ChanKeySignerDecodeErrorZPtr contents;
+typedef struct LDKCResult_ChannelKeysDecodeErrorZ {
+ union LDKCResult_ChannelKeysDecodeErrorZPtr contents;
bool result_ok;
-} LDKCResult_ChanKeySignerDecodeErrorZ;
+} LDKCResult_ChannelKeysDecodeErrorZ;
* 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.
*/
- struct LDKCResult_ChanKeySignerDecodeErrorZ (*read_chan_signer)(const void *this_arg, struct LDKu8slice reader);
+ struct LDKCResult_ChannelKeysDecodeErrorZ (*read_chan_signer)(const void *this_arg, struct LDKu8slice reader);
void (*free)(void *this_arg);
} LDKKeysInterface;
bool result_ok;
} LDKCResult_boolPeerHandleErrorZ;
-typedef union LDKCResult_SecretKeySecpErrorZPtr {
+typedef union LDKCResult_SecretKeyErrorZPtr {
struct LDKSecretKey *result;
enum LDKSecp256k1Error *err;
-} LDKCResult_SecretKeySecpErrorZPtr;
+} LDKCResult_SecretKeyErrorZPtr;
-typedef struct LDKCResult_SecretKeySecpErrorZ {
- union LDKCResult_SecretKeySecpErrorZPtr contents;
+typedef struct LDKCResult_SecretKeyErrorZ {
+ union LDKCResult_SecretKeyErrorZPtr contents;
bool result_ok;
-} LDKCResult_SecretKeySecpErrorZ;
+} LDKCResult_SecretKeyErrorZ;
-typedef union LDKCResult_PublicKeySecpErrorZPtr {
+typedef union LDKCResult_PublicKeyErrorZPtr {
struct LDKPublicKey *result;
enum LDKSecp256k1Error *err;
-} LDKCResult_PublicKeySecpErrorZPtr;
+} LDKCResult_PublicKeyErrorZPtr;
-typedef struct LDKCResult_PublicKeySecpErrorZ {
- union LDKCResult_PublicKeySecpErrorZPtr contents;
+typedef struct LDKCResult_PublicKeyErrorZ {
+ union LDKCResult_PublicKeyErrorZPtr contents;
bool result_ok;
-} LDKCResult_PublicKeySecpErrorZ;
+} LDKCResult_PublicKeyErrorZ;
bool is_owned;
} LDKTxCreationKeys;
-typedef union LDKCResult_TxCreationKeysSecpErrorZPtr {
+typedef union LDKCResult_TxCreationKeysErrorZPtr {
struct LDKTxCreationKeys *result;
enum LDKSecp256k1Error *err;
-} LDKCResult_TxCreationKeysSecpErrorZPtr;
+} LDKCResult_TxCreationKeysErrorZPtr;
-typedef struct LDKCResult_TxCreationKeysSecpErrorZ {
- union LDKCResult_TxCreationKeysSecpErrorZPtr contents;
+typedef struct LDKCResult_TxCreationKeysErrorZ {
+ union LDKCResult_TxCreationKeysErrorZPtr contents;
bool result_ok;
-} LDKCResult_TxCreationKeysSecpErrorZ;
+} LDKCResult_TxCreationKeysErrorZ;
struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
-struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_ok(struct LDKChannelKeys o);
+struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_ok(struct LDKChannelKeys o);
-struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
-void CResult_ChanKeySignerDecodeErrorZ_free(struct LDKCResult_ChanKeySignerDecodeErrorZ _res);
+void CResult_ChannelKeysDecodeErrorZ_free(struct LDKCResult_ChannelKeysDecodeErrorZ _res);
-struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_clone(const struct LDKCResult_ChanKeySignerDecodeErrorZ *NONNULL_PTR orig);
+struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelKeysDecodeErrorZ *NONNULL_PTR orig);
struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
-struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_ok(struct LDKSecretKey o);
+struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
-struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_err(enum LDKSecp256k1Error e);
+struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
-void CResult_SecretKeySecpErrorZ_free(struct LDKCResult_SecretKeySecpErrorZ _res);
+void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
-struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_ok(struct LDKPublicKey o);
+struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
-struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_err(enum LDKSecp256k1Error e);
+struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
-void CResult_PublicKeySecpErrorZ_free(struct LDKCResult_PublicKeySecpErrorZ _res);
+void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
-struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_ok(struct LDKTxCreationKeys o);
+struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
-struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_err(enum LDKSecp256k1Error e);
+struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
-void CResult_TxCreationKeysSecpErrorZ_free(struct LDKCResult_TxCreationKeysSecpErrorZ _res);
+void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
* Note that this is infallible iff we trust that at least one of the two input keys are randomly
* generated (ie our own).
*/
-struct LDKCResult_SecretKeySecpErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
+struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
/**
* Derives a per-commitment-transaction public key (eg an htlc key or a delayed_payment key)
* Note that this is infallible iff we trust that at least one of the two input keys are randomly
* generated (ie our own).
*/
-struct LDKCResult_PublicKeySecpErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
+struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
/**
* Derives a per-commitment-transaction revocation key from its constituent parts.
* Note that this is infallible iff we trust that at least one of the two input keys are randomly
* generated (ie our own).
*/
-struct LDKCResult_SecretKeySecpErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
+struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
/**
* Derives a per-commitment-transaction revocation public key from its constituent parts. This is
* Note that this is infallible iff we trust that at least one of the two input keys are randomly
* generated (ie our own).
*/
-struct LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
+struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
void TxCreationKeys_free(struct LDKTxCreationKeys this_ptr);
* Create per-state keys from channel base points and the per-commitment point.
* Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
*/
-MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
+MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
/**
* Generate per-state keys from channel static keys.
* Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
*/
-MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
+MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
/**
* A script either spendable by the revocation
const LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* operator &() const { return &self; }
const LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* operator ->() const { return &self; }
};
-class CResult_TxCreationKeysSecpErrorZ {
-private:
- LDKCResult_TxCreationKeysSecpErrorZ self;
-public:
- CResult_TxCreationKeysSecpErrorZ(const CResult_TxCreationKeysSecpErrorZ&) = delete;
- CResult_TxCreationKeysSecpErrorZ(CResult_TxCreationKeysSecpErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_TxCreationKeysSecpErrorZ)); }
- CResult_TxCreationKeysSecpErrorZ(LDKCResult_TxCreationKeysSecpErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_TxCreationKeysSecpErrorZ)); }
- operator LDKCResult_TxCreationKeysSecpErrorZ() && { LDKCResult_TxCreationKeysSecpErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_TxCreationKeysSecpErrorZ)); return res; }
- ~CResult_TxCreationKeysSecpErrorZ() { CResult_TxCreationKeysSecpErrorZ_free(self); }
- CResult_TxCreationKeysSecpErrorZ& operator=(CResult_TxCreationKeysSecpErrorZ&& o) { CResult_TxCreationKeysSecpErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_TxCreationKeysSecpErrorZ)); return *this; }
- LDKCResult_TxCreationKeysSecpErrorZ* operator &() { return &self; }
- LDKCResult_TxCreationKeysSecpErrorZ* operator ->() { return &self; }
- const LDKCResult_TxCreationKeysSecpErrorZ* operator &() const { return &self; }
- const LDKCResult_TxCreationKeysSecpErrorZ* operator ->() const { return &self; }
-};
class CVec_RouteHintZ {
private:
LDKCVec_RouteHintZ self;
const LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator &() const { return &self; }
const LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator ->() const { return &self; }
};
+class CResult_SecretKeyErrorZ {
+private:
+ LDKCResult_SecretKeyErrorZ self;
+public:
+ CResult_SecretKeyErrorZ(const CResult_SecretKeyErrorZ&) = delete;
+ CResult_SecretKeyErrorZ(CResult_SecretKeyErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_SecretKeyErrorZ)); }
+ CResult_SecretKeyErrorZ(LDKCResult_SecretKeyErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_SecretKeyErrorZ)); }
+ operator LDKCResult_SecretKeyErrorZ() && { LDKCResult_SecretKeyErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_SecretKeyErrorZ)); return res; }
+ ~CResult_SecretKeyErrorZ() { CResult_SecretKeyErrorZ_free(self); }
+ CResult_SecretKeyErrorZ& operator=(CResult_SecretKeyErrorZ&& o) { CResult_SecretKeyErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_SecretKeyErrorZ)); return *this; }
+ LDKCResult_SecretKeyErrorZ* operator &() { return &self; }
+ LDKCResult_SecretKeyErrorZ* operator ->() { return &self; }
+ const LDKCResult_SecretKeyErrorZ* operator &() const { return &self; }
+ const LDKCResult_SecretKeyErrorZ* operator ->() const { return &self; }
+};
class CResult_NoneAPIErrorZ {
private:
LDKCResult_NoneAPIErrorZ self;
const LDKC2Tuple_BlockHashChannelMonitorZ* operator &() const { return &self; }
const LDKC2Tuple_BlockHashChannelMonitorZ* operator ->() const { return &self; }
};
-class CResult_SecretKeySecpErrorZ {
+class CResult_TxCreationKeysErrorZ {
private:
- LDKCResult_SecretKeySecpErrorZ self;
+ LDKCResult_TxCreationKeysErrorZ self;
public:
- CResult_SecretKeySecpErrorZ(const CResult_SecretKeySecpErrorZ&) = delete;
- CResult_SecretKeySecpErrorZ(CResult_SecretKeySecpErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_SecretKeySecpErrorZ)); }
- CResult_SecretKeySecpErrorZ(LDKCResult_SecretKeySecpErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_SecretKeySecpErrorZ)); }
- operator LDKCResult_SecretKeySecpErrorZ() && { LDKCResult_SecretKeySecpErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_SecretKeySecpErrorZ)); return res; }
- ~CResult_SecretKeySecpErrorZ() { CResult_SecretKeySecpErrorZ_free(self); }
- CResult_SecretKeySecpErrorZ& operator=(CResult_SecretKeySecpErrorZ&& o) { CResult_SecretKeySecpErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_SecretKeySecpErrorZ)); return *this; }
- LDKCResult_SecretKeySecpErrorZ* operator &() { return &self; }
- LDKCResult_SecretKeySecpErrorZ* operator ->() { return &self; }
- const LDKCResult_SecretKeySecpErrorZ* operator &() const { return &self; }
- const LDKCResult_SecretKeySecpErrorZ* operator ->() const { return &self; }
+ CResult_TxCreationKeysErrorZ(const CResult_TxCreationKeysErrorZ&) = delete;
+ CResult_TxCreationKeysErrorZ(CResult_TxCreationKeysErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_TxCreationKeysErrorZ)); }
+ CResult_TxCreationKeysErrorZ(LDKCResult_TxCreationKeysErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_TxCreationKeysErrorZ)); }
+ operator LDKCResult_TxCreationKeysErrorZ() && { LDKCResult_TxCreationKeysErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_TxCreationKeysErrorZ)); return res; }
+ ~CResult_TxCreationKeysErrorZ() { CResult_TxCreationKeysErrorZ_free(self); }
+ CResult_TxCreationKeysErrorZ& operator=(CResult_TxCreationKeysErrorZ&& o) { CResult_TxCreationKeysErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_TxCreationKeysErrorZ)); return *this; }
+ LDKCResult_TxCreationKeysErrorZ* operator &() { return &self; }
+ LDKCResult_TxCreationKeysErrorZ* operator ->() { return &self; }
+ const LDKCResult_TxCreationKeysErrorZ* operator &() const { return &self; }
+ const LDKCResult_TxCreationKeysErrorZ* operator ->() const { return &self; }
};
class CResult_NodeAnnouncementInfoDecodeErrorZ {
private:
const LDKCVec_MonitorEventZ* operator &() const { return &self; }
const LDKCVec_MonitorEventZ* operator ->() const { return &self; }
};
-class CResult_ChanKeySignerDecodeErrorZ {
-private:
- LDKCResult_ChanKeySignerDecodeErrorZ self;
-public:
- CResult_ChanKeySignerDecodeErrorZ(const CResult_ChanKeySignerDecodeErrorZ&) = delete;
- CResult_ChanKeySignerDecodeErrorZ(CResult_ChanKeySignerDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChanKeySignerDecodeErrorZ)); }
- CResult_ChanKeySignerDecodeErrorZ(LDKCResult_ChanKeySignerDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChanKeySignerDecodeErrorZ)); }
- operator LDKCResult_ChanKeySignerDecodeErrorZ() && { LDKCResult_ChanKeySignerDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChanKeySignerDecodeErrorZ)); return res; }
- ~CResult_ChanKeySignerDecodeErrorZ() { CResult_ChanKeySignerDecodeErrorZ_free(self); }
- CResult_ChanKeySignerDecodeErrorZ& operator=(CResult_ChanKeySignerDecodeErrorZ&& o) { CResult_ChanKeySignerDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChanKeySignerDecodeErrorZ)); return *this; }
- LDKCResult_ChanKeySignerDecodeErrorZ* operator &() { return &self; }
- LDKCResult_ChanKeySignerDecodeErrorZ* operator ->() { return &self; }
- const LDKCResult_ChanKeySignerDecodeErrorZ* operator &() const { return &self; }
- const LDKCResult_ChanKeySignerDecodeErrorZ* operator ->() const { return &self; }
-};
class CVec_RouteHopZ {
private:
LDKCVec_RouteHopZ self;
const LDKCVec_u8Z* operator &() const { return &self; }
const LDKCVec_u8Z* operator ->() const { return &self; }
};
-class CResult_PublicKeySecpErrorZ {
+class CResult_PublicKeyErrorZ {
private:
- LDKCResult_PublicKeySecpErrorZ self;
+ LDKCResult_PublicKeyErrorZ self;
public:
- CResult_PublicKeySecpErrorZ(const CResult_PublicKeySecpErrorZ&) = delete;
- CResult_PublicKeySecpErrorZ(CResult_PublicKeySecpErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PublicKeySecpErrorZ)); }
- CResult_PublicKeySecpErrorZ(LDKCResult_PublicKeySecpErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PublicKeySecpErrorZ)); }
- operator LDKCResult_PublicKeySecpErrorZ() && { LDKCResult_PublicKeySecpErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_PublicKeySecpErrorZ)); return res; }
- ~CResult_PublicKeySecpErrorZ() { CResult_PublicKeySecpErrorZ_free(self); }
- CResult_PublicKeySecpErrorZ& operator=(CResult_PublicKeySecpErrorZ&& o) { CResult_PublicKeySecpErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_PublicKeySecpErrorZ)); return *this; }
- LDKCResult_PublicKeySecpErrorZ* operator &() { return &self; }
- LDKCResult_PublicKeySecpErrorZ* operator ->() { return &self; }
- const LDKCResult_PublicKeySecpErrorZ* operator &() const { return &self; }
- const LDKCResult_PublicKeySecpErrorZ* operator ->() const { return &self; }
+ CResult_PublicKeyErrorZ(const CResult_PublicKeyErrorZ&) = delete;
+ CResult_PublicKeyErrorZ(CResult_PublicKeyErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PublicKeyErrorZ)); }
+ CResult_PublicKeyErrorZ(LDKCResult_PublicKeyErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PublicKeyErrorZ)); }
+ operator LDKCResult_PublicKeyErrorZ() && { LDKCResult_PublicKeyErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_PublicKeyErrorZ)); return res; }
+ ~CResult_PublicKeyErrorZ() { CResult_PublicKeyErrorZ_free(self); }
+ CResult_PublicKeyErrorZ& operator=(CResult_PublicKeyErrorZ&& o) { CResult_PublicKeyErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_PublicKeyErrorZ)); return *this; }
+ LDKCResult_PublicKeyErrorZ* operator &() { return &self; }
+ LDKCResult_PublicKeyErrorZ* operator ->() { return &self; }
+ const LDKCResult_PublicKeyErrorZ* operator &() const { return &self; }
+ const LDKCResult_PublicKeyErrorZ* operator ->() const { return &self; }
};
class CResult_RouteLightningErrorZ {
private:
const LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator &() const { return &self; }
const LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator ->() const { return &self; }
};
+class CResult_ChannelKeysDecodeErrorZ {
+private:
+ LDKCResult_ChannelKeysDecodeErrorZ self;
+public:
+ CResult_ChannelKeysDecodeErrorZ(const CResult_ChannelKeysDecodeErrorZ&) = delete;
+ CResult_ChannelKeysDecodeErrorZ(CResult_ChannelKeysDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelKeysDecodeErrorZ)); }
+ CResult_ChannelKeysDecodeErrorZ(LDKCResult_ChannelKeysDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelKeysDecodeErrorZ)); }
+ operator LDKCResult_ChannelKeysDecodeErrorZ() && { LDKCResult_ChannelKeysDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelKeysDecodeErrorZ)); return res; }
+ ~CResult_ChannelKeysDecodeErrorZ() { CResult_ChannelKeysDecodeErrorZ_free(self); }
+ CResult_ChannelKeysDecodeErrorZ& operator=(CResult_ChannelKeysDecodeErrorZ&& o) { CResult_ChannelKeysDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelKeysDecodeErrorZ)); return *this; }
+ LDKCResult_ChannelKeysDecodeErrorZ* operator &() { return &self; }
+ LDKCResult_ChannelKeysDecodeErrorZ* operator ->() { return &self; }
+ const LDKCResult_ChannelKeysDecodeErrorZ* operator &() const { return &self; }
+ const LDKCResult_ChannelKeysDecodeErrorZ* operator ->() const { return &self; }
+};
class CResult_InitDecodeErrorZ {
private:
LDKCResult_InitDecodeErrorZ self;
const LDKC2Tuple_OutPointScriptZ* operator &() const { return &self; }
const LDKC2Tuple_OutPointScriptZ* operator ->() const { return &self; }
};
-class CResult_InMemoryChannelKeysDecodeErrorZ {
-private:
- LDKCResult_InMemoryChannelKeysDecodeErrorZ self;
-public:
- CResult_InMemoryChannelKeysDecodeErrorZ(const CResult_InMemoryChannelKeysDecodeErrorZ&) = delete;
- CResult_InMemoryChannelKeysDecodeErrorZ(CResult_InMemoryChannelKeysDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_InMemoryChannelKeysDecodeErrorZ)); }
- CResult_InMemoryChannelKeysDecodeErrorZ(LDKCResult_InMemoryChannelKeysDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ)); }
- operator LDKCResult_InMemoryChannelKeysDecodeErrorZ() && { LDKCResult_InMemoryChannelKeysDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ)); return res; }
- ~CResult_InMemoryChannelKeysDecodeErrorZ() { CResult_InMemoryChannelKeysDecodeErrorZ_free(self); }
- CResult_InMemoryChannelKeysDecodeErrorZ& operator=(CResult_InMemoryChannelKeysDecodeErrorZ&& o) { CResult_InMemoryChannelKeysDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_InMemoryChannelKeysDecodeErrorZ)); return *this; }
- LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator &() { return &self; }
- LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator ->() { return &self; }
- const LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator &() const { return &self; }
- const LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator ->() const { return &self; }
-};
class CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
private:
LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ self;
const LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator &() const { return &self; }
const LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator ->() const { return &self; }
};
+class CResult_InMemoryChannelKeysDecodeErrorZ {
+private:
+ LDKCResult_InMemoryChannelKeysDecodeErrorZ self;
+public:
+ CResult_InMemoryChannelKeysDecodeErrorZ(const CResult_InMemoryChannelKeysDecodeErrorZ&) = delete;
+ CResult_InMemoryChannelKeysDecodeErrorZ(CResult_InMemoryChannelKeysDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_InMemoryChannelKeysDecodeErrorZ)); }
+ CResult_InMemoryChannelKeysDecodeErrorZ(LDKCResult_InMemoryChannelKeysDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ)); }
+ operator LDKCResult_InMemoryChannelKeysDecodeErrorZ() && { LDKCResult_InMemoryChannelKeysDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ)); return res; }
+ ~CResult_InMemoryChannelKeysDecodeErrorZ() { CResult_InMemoryChannelKeysDecodeErrorZ_free(self); }
+ CResult_InMemoryChannelKeysDecodeErrorZ& operator=(CResult_InMemoryChannelKeysDecodeErrorZ&& o) { CResult_InMemoryChannelKeysDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_InMemoryChannelKeysDecodeErrorZ)); return *this; }
+ LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator &() { return &self; }
+ LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator ->() { return &self; }
+ const LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator &() const { return &self; }
+ const LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator ->() const { return &self; }
+};
class CResult_RouteDecodeErrorZ {
private:
LDKCResult_RouteDecodeErrorZ self;
#[no_mangle]
pub extern "C" fn CResult_SignatureNoneZ_clone(orig: &CResult_SignatureNoneZ) -> CResult_SignatureNoneZ { orig.clone() }
#[repr(C)]
-pub union CResult_ChanKeySignerDecodeErrorZPtr {
+pub union CResult_ChannelKeysDecodeErrorZPtr {
pub result: *mut crate::chain::keysinterface::ChannelKeys,
pub err: *mut crate::ln::msgs::DecodeError,
}
#[repr(C)]
-pub struct CResult_ChanKeySignerDecodeErrorZ {
- pub contents: CResult_ChanKeySignerDecodeErrorZPtr,
+pub struct CResult_ChannelKeysDecodeErrorZ {
+ pub contents: CResult_ChannelKeysDecodeErrorZPtr,
pub result_ok: bool,
}
#[no_mangle]
-pub extern "C" fn CResult_ChanKeySignerDecodeErrorZ_ok(o: crate::chain::keysinterface::ChannelKeys) -> CResult_ChanKeySignerDecodeErrorZ {
- CResult_ChanKeySignerDecodeErrorZ {
- contents: CResult_ChanKeySignerDecodeErrorZPtr {
+pub extern "C" fn CResult_ChannelKeysDecodeErrorZ_ok(o: crate::chain::keysinterface::ChannelKeys) -> CResult_ChannelKeysDecodeErrorZ {
+ CResult_ChannelKeysDecodeErrorZ {
+ contents: CResult_ChannelKeysDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-pub extern "C" fn CResult_ChanKeySignerDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_ChanKeySignerDecodeErrorZ {
- CResult_ChanKeySignerDecodeErrorZ {
- contents: CResult_ChanKeySignerDecodeErrorZPtr {
+pub extern "C" fn CResult_ChannelKeysDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_ChannelKeysDecodeErrorZ {
+ CResult_ChannelKeysDecodeErrorZ {
+ contents: CResult_ChannelKeysDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
}
#[no_mangle]
-pub extern "C" fn CResult_ChanKeySignerDecodeErrorZ_free(_res: CResult_ChanKeySignerDecodeErrorZ) { }
-impl Drop for CResult_ChanKeySignerDecodeErrorZ {
+pub extern "C" fn CResult_ChannelKeysDecodeErrorZ_free(_res: CResult_ChannelKeysDecodeErrorZ) { }
+impl Drop for CResult_ChannelKeysDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::chain::keysinterface::ChannelKeys, crate::ln::msgs::DecodeError>> for CResult_ChanKeySignerDecodeErrorZ {
+impl From<crate::c_types::CResultTempl<crate::chain::keysinterface::ChannelKeys, crate::ln::msgs::DecodeError>> for CResult_ChannelKeysDecodeErrorZ {
fn from(mut o: crate::c_types::CResultTempl<crate::chain::keysinterface::ChannelKeys, crate::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = std::ptr::null_mut() };
- CResult_ChanKeySignerDecodeErrorZPtr { result }
+ CResult_ChannelKeysDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = std::ptr::null_mut(); }
- CResult_ChanKeySignerDecodeErrorZPtr { err }
+ CResult_ChannelKeysDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ChanKeySignerDecodeErrorZ {
+impl Clone for CResult_ChannelKeysDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ChanKeySignerDecodeErrorZPtr {
+ Self { result_ok: true, contents: CResult_ChannelKeysDecodeErrorZPtr {
result: Box::into_raw(Box::new(<crate::chain::keysinterface::ChannelKeys>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ChanKeySignerDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ChannelKeysDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-pub extern "C" fn CResult_ChanKeySignerDecodeErrorZ_clone(orig: &CResult_ChanKeySignerDecodeErrorZ) -> CResult_ChanKeySignerDecodeErrorZ { orig.clone() }
+pub extern "C" fn CResult_ChannelKeysDecodeErrorZ_clone(orig: &CResult_ChannelKeysDecodeErrorZ) -> CResult_ChannelKeysDecodeErrorZ { orig.clone() }
#[repr(C)]
pub union CResult_InMemoryChannelKeysDecodeErrorZPtr {
pub result: *mut crate::chain::keysinterface::InMemoryChannelKeys,
#[no_mangle]
pub extern "C" fn CResult_boolPeerHandleErrorZ_clone(orig: &CResult_boolPeerHandleErrorZ) -> CResult_boolPeerHandleErrorZ { orig.clone() }
#[repr(C)]
-pub union CResult_SecretKeySecpErrorZPtr {
+pub union CResult_SecretKeyErrorZPtr {
pub result: *mut crate::c_types::SecretKey,
pub err: *mut crate::c_types::Secp256k1Error,
}
#[repr(C)]
-pub struct CResult_SecretKeySecpErrorZ {
- pub contents: CResult_SecretKeySecpErrorZPtr,
+pub struct CResult_SecretKeyErrorZ {
+ pub contents: CResult_SecretKeyErrorZPtr,
pub result_ok: bool,
}
#[no_mangle]
-pub extern "C" fn CResult_SecretKeySecpErrorZ_ok(o: crate::c_types::SecretKey) -> CResult_SecretKeySecpErrorZ {
- CResult_SecretKeySecpErrorZ {
- contents: CResult_SecretKeySecpErrorZPtr {
+pub extern "C" fn CResult_SecretKeyErrorZ_ok(o: crate::c_types::SecretKey) -> CResult_SecretKeyErrorZ {
+ CResult_SecretKeyErrorZ {
+ contents: CResult_SecretKeyErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-pub extern "C" fn CResult_SecretKeySecpErrorZ_err(e: crate::c_types::Secp256k1Error) -> CResult_SecretKeySecpErrorZ {
- CResult_SecretKeySecpErrorZ {
- contents: CResult_SecretKeySecpErrorZPtr {
+pub extern "C" fn CResult_SecretKeyErrorZ_err(e: crate::c_types::Secp256k1Error) -> CResult_SecretKeyErrorZ {
+ CResult_SecretKeyErrorZ {
+ contents: CResult_SecretKeyErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
}
#[no_mangle]
-pub extern "C" fn CResult_SecretKeySecpErrorZ_free(_res: CResult_SecretKeySecpErrorZ) { }
-impl Drop for CResult_SecretKeySecpErrorZ {
+pub extern "C" fn CResult_SecretKeyErrorZ_free(_res: CResult_SecretKeyErrorZ) { }
+impl Drop for CResult_SecretKeyErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::SecretKey, crate::c_types::Secp256k1Error>> for CResult_SecretKeySecpErrorZ {
+impl From<crate::c_types::CResultTempl<crate::c_types::SecretKey, crate::c_types::Secp256k1Error>> for CResult_SecretKeyErrorZ {
fn from(mut o: crate::c_types::CResultTempl<crate::c_types::SecretKey, crate::c_types::Secp256k1Error>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = std::ptr::null_mut() };
- CResult_SecretKeySecpErrorZPtr { result }
+ CResult_SecretKeyErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = std::ptr::null_mut(); }
- CResult_SecretKeySecpErrorZPtr { err }
+ CResult_SecretKeyErrorZPtr { err }
};
Self {
contents,
}
}
#[repr(C)]
-pub union CResult_PublicKeySecpErrorZPtr {
+pub union CResult_PublicKeyErrorZPtr {
pub result: *mut crate::c_types::PublicKey,
pub err: *mut crate::c_types::Secp256k1Error,
}
#[repr(C)]
-pub struct CResult_PublicKeySecpErrorZ {
- pub contents: CResult_PublicKeySecpErrorZPtr,
+pub struct CResult_PublicKeyErrorZ {
+ pub contents: CResult_PublicKeyErrorZPtr,
pub result_ok: bool,
}
#[no_mangle]
-pub extern "C" fn CResult_PublicKeySecpErrorZ_ok(o: crate::c_types::PublicKey) -> CResult_PublicKeySecpErrorZ {
- CResult_PublicKeySecpErrorZ {
- contents: CResult_PublicKeySecpErrorZPtr {
+pub extern "C" fn CResult_PublicKeyErrorZ_ok(o: crate::c_types::PublicKey) -> CResult_PublicKeyErrorZ {
+ CResult_PublicKeyErrorZ {
+ contents: CResult_PublicKeyErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-pub extern "C" fn CResult_PublicKeySecpErrorZ_err(e: crate::c_types::Secp256k1Error) -> CResult_PublicKeySecpErrorZ {
- CResult_PublicKeySecpErrorZ {
- contents: CResult_PublicKeySecpErrorZPtr {
+pub extern "C" fn CResult_PublicKeyErrorZ_err(e: crate::c_types::Secp256k1Error) -> CResult_PublicKeyErrorZ {
+ CResult_PublicKeyErrorZ {
+ contents: CResult_PublicKeyErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
}
#[no_mangle]
-pub extern "C" fn CResult_PublicKeySecpErrorZ_free(_res: CResult_PublicKeySecpErrorZ) { }
-impl Drop for CResult_PublicKeySecpErrorZ {
+pub extern "C" fn CResult_PublicKeyErrorZ_free(_res: CResult_PublicKeyErrorZ) { }
+impl Drop for CResult_PublicKeyErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::PublicKey, crate::c_types::Secp256k1Error>> for CResult_PublicKeySecpErrorZ {
+impl From<crate::c_types::CResultTempl<crate::c_types::PublicKey, crate::c_types::Secp256k1Error>> for CResult_PublicKeyErrorZ {
fn from(mut o: crate::c_types::CResultTempl<crate::c_types::PublicKey, crate::c_types::Secp256k1Error>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = std::ptr::null_mut() };
- CResult_PublicKeySecpErrorZPtr { result }
+ CResult_PublicKeyErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = std::ptr::null_mut(); }
- CResult_PublicKeySecpErrorZPtr { err }
+ CResult_PublicKeyErrorZPtr { err }
};
Self {
contents,
}
}
#[repr(C)]
-pub union CResult_TxCreationKeysSecpErrorZPtr {
+pub union CResult_TxCreationKeysErrorZPtr {
pub result: *mut crate::ln::chan_utils::TxCreationKeys,
pub err: *mut crate::c_types::Secp256k1Error,
}
#[repr(C)]
-pub struct CResult_TxCreationKeysSecpErrorZ {
- pub contents: CResult_TxCreationKeysSecpErrorZPtr,
+pub struct CResult_TxCreationKeysErrorZ {
+ pub contents: CResult_TxCreationKeysErrorZPtr,
pub result_ok: bool,
}
#[no_mangle]
-pub extern "C" fn CResult_TxCreationKeysSecpErrorZ_ok(o: crate::ln::chan_utils::TxCreationKeys) -> CResult_TxCreationKeysSecpErrorZ {
- CResult_TxCreationKeysSecpErrorZ {
- contents: CResult_TxCreationKeysSecpErrorZPtr {
+pub extern "C" fn CResult_TxCreationKeysErrorZ_ok(o: crate::ln::chan_utils::TxCreationKeys) -> CResult_TxCreationKeysErrorZ {
+ CResult_TxCreationKeysErrorZ {
+ contents: CResult_TxCreationKeysErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-pub extern "C" fn CResult_TxCreationKeysSecpErrorZ_err(e: crate::c_types::Secp256k1Error) -> CResult_TxCreationKeysSecpErrorZ {
- CResult_TxCreationKeysSecpErrorZ {
- contents: CResult_TxCreationKeysSecpErrorZPtr {
+pub extern "C" fn CResult_TxCreationKeysErrorZ_err(e: crate::c_types::Secp256k1Error) -> CResult_TxCreationKeysErrorZ {
+ CResult_TxCreationKeysErrorZ {
+ contents: CResult_TxCreationKeysErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
}
#[no_mangle]
-pub extern "C" fn CResult_TxCreationKeysSecpErrorZ_free(_res: CResult_TxCreationKeysSecpErrorZ) { }
-impl Drop for CResult_TxCreationKeysSecpErrorZ {
+pub extern "C" fn CResult_TxCreationKeysErrorZ_free(_res: CResult_TxCreationKeysErrorZ) { }
+impl Drop for CResult_TxCreationKeysErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::ln::chan_utils::TxCreationKeys, crate::c_types::Secp256k1Error>> for CResult_TxCreationKeysSecpErrorZ {
+impl From<crate::c_types::CResultTempl<crate::ln::chan_utils::TxCreationKeys, crate::c_types::Secp256k1Error>> for CResult_TxCreationKeysErrorZ {
fn from(mut o: crate::c_types::CResultTempl<crate::ln::chan_utils::TxCreationKeys, crate::c_types::Secp256k1Error>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = std::ptr::null_mut() };
- CResult_TxCreationKeysSecpErrorZPtr { result }
+ CResult_TxCreationKeysErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = std::ptr::null_mut(); }
- CResult_TxCreationKeysSecpErrorZPtr { err }
+ CResult_TxCreationKeysErrorZPtr { err }
};
Self {
contents,
/// 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.
#[must_use]
- pub read_chan_signer: extern "C" fn (this_arg: *const c_void, reader: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChanKeySignerDecodeErrorZ,
+ pub read_chan_signer: extern "C" fn (this_arg: *const c_void, reader: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChannelKeysDecodeErrorZ,
pub free: Option<extern "C" fn(this_arg: *mut c_void)>,
}
unsafe impl Send for KeysInterface {}
crate::c_types::ThirtyTwoBytes { data: ret }
}
#[must_use]
-extern "C" fn KeysManager_KeysInterface_read_chan_signer(this_arg: *const c_void, mut reader: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChanKeySignerDecodeErrorZ {
+extern "C" fn KeysManager_KeysInterface_read_chan_signer(this_arg: *const c_void, mut reader: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChannelKeysDecodeErrorZ {
let mut ret = unsafe { &mut *(this_arg as *mut nativeKeysManager) }.read_chan_signer(reader.to_slice());
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { o.into() }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }).into() };
local_ret
/// Note that this is infallible iff we trust that at least one of the two input keys are randomly
/// generated (ie our own).
#[no_mangle]
-pub extern "C" fn derive_private_key(mut per_commitment_point: crate::c_types::PublicKey, base_secret: *const [u8; 32]) -> crate::c_types::derived::CResult_SecretKeySecpErrorZ {
+pub extern "C" fn derive_private_key(mut per_commitment_point: crate::c_types::PublicKey, base_secret: *const [u8; 32]) -> crate::c_types::derived::CResult_SecretKeyErrorZ {
let mut ret = lightning::ln::chan_utils::derive_private_key(&bitcoin::secp256k1::Secp256k1::new(), &per_commitment_point.into_rust(), &::bitcoin::secp256k1::key::SecretKey::from_slice(&unsafe { *base_secret}[..]).unwrap());
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::c_types::SecretKey::from_rust(o) }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::Secp256k1Error::from_rust(e) }).into() };
local_ret
/// Note that this is infallible iff we trust that at least one of the two input keys are randomly
/// generated (ie our own).
#[no_mangle]
-pub extern "C" fn derive_public_key(mut per_commitment_point: crate::c_types::PublicKey, mut base_point: crate::c_types::PublicKey) -> crate::c_types::derived::CResult_PublicKeySecpErrorZ {
+pub extern "C" fn derive_public_key(mut per_commitment_point: crate::c_types::PublicKey, mut base_point: crate::c_types::PublicKey) -> crate::c_types::derived::CResult_PublicKeyErrorZ {
let mut ret = lightning::ln::chan_utils::derive_public_key(&bitcoin::secp256k1::Secp256k1::new(), &per_commitment_point.into_rust(), &base_point.into_rust());
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::c_types::PublicKey::from_rust(&o) }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::Secp256k1Error::from_rust(e) }).into() };
local_ret
/// Note that this is infallible iff we trust that at least one of the two input keys are randomly
/// generated (ie our own).
#[no_mangle]
-pub extern "C" fn derive_private_revocation_key(per_commitment_secret: *const [u8; 32], countersignatory_revocation_base_secret: *const [u8; 32]) -> crate::c_types::derived::CResult_SecretKeySecpErrorZ {
+pub extern "C" fn derive_private_revocation_key(per_commitment_secret: *const [u8; 32], countersignatory_revocation_base_secret: *const [u8; 32]) -> crate::c_types::derived::CResult_SecretKeyErrorZ {
let mut ret = lightning::ln::chan_utils::derive_private_revocation_key(&bitcoin::secp256k1::Secp256k1::new(), &::bitcoin::secp256k1::key::SecretKey::from_slice(&unsafe { *per_commitment_secret}[..]).unwrap(), &::bitcoin::secp256k1::key::SecretKey::from_slice(&unsafe { *countersignatory_revocation_base_secret}[..]).unwrap());
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::c_types::SecretKey::from_rust(o) }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::Secp256k1Error::from_rust(e) }).into() };
local_ret
/// Note that this is infallible iff we trust that at least one of the two input keys are randomly
/// generated (ie our own).
#[no_mangle]
-pub extern "C" fn derive_public_revocation_key(mut per_commitment_point: crate::c_types::PublicKey, mut countersignatory_revocation_base_point: crate::c_types::PublicKey) -> crate::c_types::derived::CResult_PublicKeySecpErrorZ {
+pub extern "C" fn derive_public_revocation_key(mut per_commitment_point: crate::c_types::PublicKey, mut countersignatory_revocation_base_point: crate::c_types::PublicKey) -> crate::c_types::derived::CResult_PublicKeyErrorZ {
let mut ret = lightning::ln::chan_utils::derive_public_revocation_key(&bitcoin::secp256k1::Secp256k1::new(), &per_commitment_point.into_rust(), &countersignatory_revocation_base_point.into_rust());
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::c_types::PublicKey::from_rust(&o) }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::Secp256k1Error::from_rust(e) }).into() };
local_ret
/// Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
#[must_use]
#[no_mangle]
-pub extern "C" fn TxCreationKeys_derive_new(mut per_commitment_point: crate::c_types::PublicKey, mut broadcaster_delayed_payment_base: crate::c_types::PublicKey, mut broadcaster_htlc_base: crate::c_types::PublicKey, mut countersignatory_revocation_base: crate::c_types::PublicKey, mut countersignatory_htlc_base: crate::c_types::PublicKey) -> crate::c_types::derived::CResult_TxCreationKeysSecpErrorZ {
+pub extern "C" fn TxCreationKeys_derive_new(mut per_commitment_point: crate::c_types::PublicKey, mut broadcaster_delayed_payment_base: crate::c_types::PublicKey, mut broadcaster_htlc_base: crate::c_types::PublicKey, mut countersignatory_revocation_base: crate::c_types::PublicKey, mut countersignatory_htlc_base: crate::c_types::PublicKey) -> crate::c_types::derived::CResult_TxCreationKeysErrorZ {
let mut ret = lightning::ln::chan_utils::TxCreationKeys::derive_new(&bitcoin::secp256k1::Secp256k1::new(), &per_commitment_point.into_rust(), &broadcaster_delayed_payment_base.into_rust(), &broadcaster_htlc_base.into_rust(), &countersignatory_revocation_base.into_rust(), &countersignatory_htlc_base.into_rust());
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::chan_utils::TxCreationKeys { inner: Box::into_raw(Box::new(o)), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::Secp256k1Error::from_rust(e) }).into() };
local_ret
/// Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
#[must_use]
#[no_mangle]
-pub extern "C" fn TxCreationKeys_from_channel_static_keys(mut per_commitment_point: crate::c_types::PublicKey, broadcaster_keys: &crate::ln::chan_utils::ChannelPublicKeys, countersignatory_keys: &crate::ln::chan_utils::ChannelPublicKeys) -> crate::c_types::derived::CResult_TxCreationKeysSecpErrorZ {
+pub extern "C" fn TxCreationKeys_from_channel_static_keys(mut per_commitment_point: crate::c_types::PublicKey, broadcaster_keys: &crate::ln::chan_utils::ChannelPublicKeys, countersignatory_keys: &crate::ln::chan_utils::ChannelPublicKeys) -> crate::c_types::derived::CResult_TxCreationKeysErrorZ {
let mut ret = lightning::ln::chan_utils::TxCreationKeys::from_channel_static_keys(&per_commitment_point.into_rust(), unsafe { &*broadcaster_keys.inner }, unsafe { &*countersignatory_keys.inner }, &bitcoin::secp256k1::Secp256k1::new());
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::chan_utils::TxCreationKeys { inner: Box::into_raw(Box::new(o)), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::Secp256k1Error::from_rust(e) }).into() };
local_ret