* Blinded paths were expected but were missing.
*/
LDKBolt12SemanticError_MissingPaths,
+ /**
+ * Blinded paths were provided but were not expected.
+ */
+ LDKBolt12SemanticError_UnexpectedPaths,
/**
* The blinded payinfo given does not match the number of blinded path hops.
*/
* [`ChannelManager::close_channel_with_feerate_and_script`]: crate::ln::channelmanager::ChannelManager::close_channel_with_feerate_and_script
*/
LDKConfirmationTarget_ChannelCloseMinimum,
+ /**
+ * The feerate [`OutputSweeper`] will use on transactions spending
+ * [`SpendableOutputDescriptor`]s after a channel closure.
+ *
+ * Generally spending these outputs is safe as long as they eventually confirm, so a value
+ * (slightly above) the mempool minimum should suffice. However, as this value will influence
+ * how long funds will be unavailable after channel closure, [`FeeEstimator`] implementors
+ * might want to choose a higher feerate to regain control over funds faster.
+ *
+ * [`OutputSweeper`]: crate::util::sweep::OutputSweeper
+ * [`SpendableOutputDescriptor`]: crate::sign::SpendableOutputDescriptor
+ */
+ LDKConfirmationTarget_OutputSpendingFee,
; static native void init();
static { org.ldk.impl.bindings.run_statics(); init(); }
}
\ No newline at end of file
--- /dev/null
+package org.ldk.enums;
+
+/**
+ * The side of a channel that is the [`IntroductionNode`] in a [`BlindedPath`]. [BOLT 7] defines
+ * which nodes is which in the [`ChannelAnnouncement`] message.
+ *
+ * [BOLT 7]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message
+ * [`ChannelAnnouncement`]: crate::ln::msgs::ChannelAnnouncement
+ */
+public enum Direction {
+ /**
+ * The lesser node id when compared lexicographically in ascending order.
+ */
+ LDKDirection_NodeOne,
+ /**
+ * The greater node id when compared lexicographically in ascending order.
+ */
+ LDKDirection_NodeTwo,
+ ; static native void init();
+ static { org.ldk.impl.bindings.run_statics(); init(); }
+}
\ No newline at end of file
LDKPaymentFailureReason_PaymentExpired,
/**
* We failed to find a route while retrying the payment.
+ *
+ * Note that this generally indicates that we've exhausted the available set of possible
+ * routes - we tried the payment over a few routes but were not able to find any further
+ * candidate routes beyond those.
*/
LDKPaymentFailureReason_RouteNotFound,
/**
--- /dev/null
+package org.ldk.enums;
+
+/**
+ * A `short_channel_id` construction error
+ */
+public enum ShortChannelIdError {
+ /**
+ * Block height too high
+ */
+ LDKShortChannelIdError_BlockOverflow,
+ /**
+ * Tx index too high
+ */
+ LDKShortChannelIdError_TxIndexOverflow,
+ /**
+ * Vout index too high
+ */
+ LDKShortChannelIdError_VoutIndexOverflow,
+ ; static native void init();
+ static { org.ldk.impl.bindings.run_statics(); init(); }
+}
\ No newline at end of file
static { ConfirmationTarget.values(); /* Force enum statics to run */ }
static { CreationError.values(); /* Force enum statics to run */ }
static { Currency.values(); /* Force enum statics to run */ }
+ static { Direction.values(); /* Force enum statics to run */ }
static { HTLCClaim.values(); /* Force enum statics to run */ }
static { IOError.values(); /* Force enum statics to run */ }
static { Level.values(); /* Force enum statics to run */ }
static { Recipient.values(); /* Force enum statics to run */ }
static { RetryableSendFailure.values(); /* Force enum statics to run */ }
static { Secp256k1Error.values(); /* Force enum statics to run */ }
+ static { ShortChannelIdError.values(); /* Force enum statics to run */ }
static { SiPrefix.values(); /* Force enum statics to run */ }
static { SocketAddressParseError.values(); /* Force enum statics to run */ }
static { UtxoLookupError.values(); /* Force enum statics to run */ }
}
static { LDKBech32Error.init(); }
public static native LDKBech32Error LDKBech32Error_ref_from_ptr(long ptr);
+ // struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(long owner);
+ // struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_RefundBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(long owner);
public static class LDKCOption_u64Z {
private LDKCOption_u64Z() {}
public final static class Some extends LDKCOption_u64Z {
public final static class UnsupportedCompression extends LDKDecodeError {
UnsupportedCompression() { }
}
+ public final static class DangerousValue extends LDKDecodeError {
+ DangerousValue() { }
+ }
static native void init();
}
static { LDKDecodeError.init(); }
public static native long CResult_RecipientOnionFieldsNoneZ_get_ok(long owner);
// void CResult_RecipientOnionFieldsNoneZ_get_err(LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR owner);
public static native void CResult_RecipientOnionFieldsNoneZ_get_err(long owner);
+ // struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(long owner);
+ // struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(long owner);
+ // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner);
+ public static native byte[] CResult_SchnorrSignatureNoneZ_get_ok(long owner);
+ // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner);
+ public static native void CResult_SchnorrSignatureNoneZ_get_err(long owner);
public static class LDKCOption_CVec_ThirtyTwoBytesZZ {
private LDKCOption_CVec_ThirtyTwoBytesZZ() {}
public final static class Some extends LDKCOption_CVec_ThirtyTwoBytesZZ {
}
static { LDKCOption_CVec_ThirtyTwoBytesZZ.init(); }
public static native LDKCOption_CVec_ThirtyTwoBytesZZ LDKCOption_CVec_ThirtyTwoBytesZZ_ref_from_ptr(long ptr);
+ public static class LDKAmount {
+ private LDKAmount() {}
+ public final static class Bitcoin extends LDKAmount {
+ public long amount_msats;
+ Bitcoin(long amount_msats) { this.amount_msats = amount_msats; }
+ }
+ public final static class Currency extends LDKAmount {
+ public byte[] iso4217_code;
+ public long amount;
+ Currency(byte[] iso4217_code, long amount) { this.iso4217_code = iso4217_code; this.amount = amount; }
+ }
+ static native void init();
+ }
+ static { LDKAmount.init(); }
+ public static native LDKAmount LDKAmount_ref_from_ptr(long ptr);
+ public static class LDKCOption_AmountZ {
+ private LDKCOption_AmountZ() {}
+ public final static class Some extends LDKCOption_AmountZ {
+ public long some;
+ Some(long some) { this.some = some; }
+ }
+ public final static class None extends LDKCOption_AmountZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_AmountZ.init(); }
+ public static native LDKCOption_AmountZ LDKCOption_AmountZ_ref_from_ptr(long ptr);
+ public static class LDKQuantity {
+ private LDKQuantity() {}
+ public final static class Bounded extends LDKQuantity {
+ public long bounded;
+ Bounded(long bounded) { this.bounded = bounded; }
+ }
+ public final static class Unbounded extends LDKQuantity {
+ Unbounded() { }
+ }
+ public final static class One extends LDKQuantity {
+ One() { }
+ }
+ static native void init();
+ }
+ static { LDKQuantity.init(); }
+ public static native LDKQuantity LDKQuantity_ref_from_ptr(long ptr);
+ public static class LDKCOption_QuantityZ {
+ private LDKCOption_QuantityZ() {}
+ public final static class Some extends LDKCOption_QuantityZ {
+ public long some;
+ Some(long some) { this.some = some; }
+ }
+ public final static class None extends LDKCOption_QuantityZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_QuantityZ.init(); }
+ public static native LDKCOption_QuantityZ LDKCOption_QuantityZ_ref_from_ptr(long ptr);
// struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner);
public static native byte[] CResult_ThirtyTwoBytesNoneZ_get_ok(long owner);
// void CResult_ThirtyTwoBytesNoneZ_get_err(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner);
public static native byte[] CResult_RecoverableSignatureNoneZ_get_ok(long owner);
// void CResult_RecoverableSignatureNoneZ_get_err(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
public static native void CResult_RecoverableSignatureNoneZ_get_err(long owner);
- // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner);
- public static native byte[] CResult_SchnorrSignatureNoneZ_get_ok(long owner);
- // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner);
- public static native void CResult_SchnorrSignatureNoneZ_get_err(long owner);
// struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner);
public static native byte[] CResult_ECDSASignatureNoneZ_get_ok(long owner);
// void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner);
public static native void CResult_ECDSASignatureNoneZ_get_err(long owner);
+ // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
+ public static native byte[] CResult_TransactionNoneZ_get_ok(long owner);
+ // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
+ public static native void CResult_TransactionNoneZ_get_err(long owner);
// struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner);
public static native byte[] C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(long owner);
// struct LDKCVec_ECDSASignatureZ C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner);
public static native long CResult_InMemorySignerDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_InMemorySignerDecodeErrorZ_get_err(long owner);
- // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
- public static native byte[] CResult_TransactionNoneZ_get_ok(long owner);
- // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
- public static native void CResult_TransactionNoneZ_get_err(long owner);
public static class LDKCandidateRouteHop {
private LDKCandidateRouteHop() {}
public final static class FirstHop extends LDKCandidateRouteHop {
public static native long CResult_ProbabilisticScorerDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_ProbabilisticScorerDecodeErrorZ_get_err(long owner);
+ // struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_BestBlockDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_BestBlockDecodeErrorZ_get_err(long owner);
// uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
public static native long C2Tuple_usizeTransactionZ_get_a(long owner);
// struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
public static native ChannelMonitorUpdateStatus CResult_ChannelMonitorUpdateStatusNoneZ_get_ok(long owner);
// void CResult_ChannelMonitorUpdateStatusNoneZ_get_err(LDKCResult_ChannelMonitorUpdateStatusNoneZ *NONNULL_PTR owner);
public static native void CResult_ChannelMonitorUpdateStatusNoneZ_get_err(long owner);
+ public static class LDKClosureReason {
+ private LDKClosureReason() {}
+ public final static class CounterpartyForceClosed extends LDKClosureReason {
+ public long peer_msg;
+ CounterpartyForceClosed(long peer_msg) { this.peer_msg = peer_msg; }
+ }
+ public final static class HolderForceClosed extends LDKClosureReason {
+ HolderForceClosed() { }
+ }
+ public final static class LegacyCooperativeClosure extends LDKClosureReason {
+ LegacyCooperativeClosure() { }
+ }
+ public final static class CounterpartyInitiatedCooperativeClosure extends LDKClosureReason {
+ CounterpartyInitiatedCooperativeClosure() { }
+ }
+ public final static class LocallyInitiatedCooperativeClosure extends LDKClosureReason {
+ LocallyInitiatedCooperativeClosure() { }
+ }
+ public final static class CommitmentTxConfirmed extends LDKClosureReason {
+ CommitmentTxConfirmed() { }
+ }
+ public final static class FundingTimedOut extends LDKClosureReason {
+ FundingTimedOut() { }
+ }
+ public final static class ProcessingError extends LDKClosureReason {
+ public java.lang.String err;
+ ProcessingError(java.lang.String err) { this.err = err; }
+ }
+ public final static class DisconnectedPeer extends LDKClosureReason {
+ DisconnectedPeer() { }
+ }
+ public final static class OutdatedChannelManager extends LDKClosureReason {
+ OutdatedChannelManager() { }
+ }
+ public final static class CounterpartyCoopClosedUnfundedChannel extends LDKClosureReason {
+ CounterpartyCoopClosedUnfundedChannel() { }
+ }
+ public final static class FundingBatchClosure extends LDKClosureReason {
+ FundingBatchClosure() { }
+ }
+ public final static class HTLCsTimedOut extends LDKClosureReason {
+ HTLCsTimedOut() { }
+ }
+ static native void init();
+ }
+ static { LDKClosureReason.init(); }
+ public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
public static class LDKMonitorEvent {
private LDKMonitorEvent() {}
public final static class HTLCEvent extends LDKMonitorEvent {
public long htlc_event;
HTLCEvent(long htlc_event) { this.htlc_event = htlc_event; }
}
+ public final static class HolderForceClosedWithInfo extends LDKMonitorEvent {
+ public long reason;
+ public long outpoint;
+ public long channel_id;
+ HolderForceClosedWithInfo(long reason, long outpoint, long channel_id) { this.reason = reason; this.outpoint = outpoint; this.channel_id = channel_id; }
+ }
public final static class HolderForceClosed extends LDKMonitorEvent {
public long holder_force_closed;
HolderForceClosed(long holder_force_closed) { this.holder_force_closed = holder_force_closed; }
}
public final static class Completed extends LDKMonitorEvent {
public long funding_txo;
+ public long channel_id;
public long monitor_update_id;
- Completed(long funding_txo, long monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; }
+ Completed(long funding_txo, long channel_id, long monitor_update_id) { this.funding_txo = funding_txo; this.channel_id = channel_id; this.monitor_update_id = monitor_update_id; }
}
static native void init();
}
static { LDKMonitorEvent.init(); }
public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
- // struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
- public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(long owner);
- // struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
- public static native long[] C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(long owner);
- // struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
- public static native byte[] C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(long owner);
+ // struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
+ public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(long owner);
+ // struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
+ public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(long owner);
+ // struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
+ public static native long[] C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(long owner);
+ // struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
+ public static native byte[] C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(long owner);
// struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_InitFeaturesDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(long owner);
+ // struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_OfferIdDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_OfferIdDecodeErrorZ_get_err(long owner);
+ // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native void CResult_NoneBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(long owner);
+ // struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_OfferBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(long owner);
+ // struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(long owner);
+ // struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(long owner);
// struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner);
public static native long CResult_OfferBolt12ParseErrorZ_get_ok(long owner);
// struct LDKBolt12ParseError CResult_OfferBolt12ParseErrorZ_get_err(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner);
public static native long CResult_OfferBolt12ParseErrorZ_get_err(long owner);
- // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner);
- public static native byte[] CResult_PublicKeySecp256k1ErrorZ_get_ok(long owner);
- // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner);
- public static native Secp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(long owner);
// struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_NodeIdDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_NodeIdDecodeErrorZ_get_err(long owner);
+ // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner);
+ public static native byte[] CResult_PublicKeySecp256k1ErrorZ_get_ok(long owner);
+ // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner);
+ public static native Secp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(long owner);
public static class LDKNetworkUpdate {
private LDKNetworkUpdate() {}
public final static class ChannelUpdateMessage extends LDKNetworkUpdate {
}
static { LDKCOption_CVec_SocketAddressZZ.init(); }
public static native LDKCOption_CVec_SocketAddressZZ LDKCOption_CVec_SocketAddressZZ_ref_from_ptr(long ptr);
+ // uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner);
+ public static native long CResult_u64ShortChannelIdErrorZ_get_ok(long owner);
+ // enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner);
+ public static native ShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(long owner);
// struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner);
public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(long owner);
// struct LDKInboundHTLCErr CResult_PendingHTLCInfoInboundHTLCErrZ_get_err(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner);
public static native long[] CResult_CVec_UtxoZNoneZ_get_ok(long owner);
// void CResult_CVec_UtxoZNoneZ_get_err(LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR owner);
public static native void CResult_CVec_UtxoZNoneZ_get_err(long owner);
+ public static class LDKPaymentContext {
+ private LDKPaymentContext() {}
+ public final static class Unknown extends LDKPaymentContext {
+ public long unknown;
+ Unknown(long unknown) { this.unknown = unknown; }
+ }
+ public final static class Bolt12Offer extends LDKPaymentContext {
+ public long bolt12_offer;
+ Bolt12Offer(long bolt12_offer) { this.bolt12_offer = bolt12_offer; }
+ }
+ public final static class Bolt12Refund extends LDKPaymentContext {
+ public long bolt12_refund;
+ Bolt12Refund(long bolt12_refund) { this.bolt12_refund = bolt12_refund; }
+ }
+ static native void init();
+ }
+ static { LDKPaymentContext.init(); }
+ public static native LDKPaymentContext LDKPaymentContext_ref_from_ptr(long ptr);
+ public static class LDKCOption_PaymentContextZ {
+ private LDKCOption_PaymentContextZ() {}
+ public final static class Some extends LDKCOption_PaymentContextZ {
+ public long some;
+ Some(long some) { this.some = some; }
+ }
+ public final static class None extends LDKCOption_PaymentContextZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_PaymentContextZ.init(); }
+ public static native LDKCOption_PaymentContextZ LDKCOption_PaymentContextZ_ref_from_ptr(long ptr);
// uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner);
public static native long C2Tuple_u64u16Z_get_a(long owner);
// uint16_t C2Tuple_u64u16Z_get_b(LDKC2Tuple_u64u16Z *NONNULL_PTR owner);
}
static { LDKCOption_ChannelShutdownStateZ.init(); }
public static native LDKCOption_ChannelShutdownStateZ LDKCOption_ChannelShutdownStateZ_ref_from_ptr(long ptr);
- // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner);
- public static native byte[] CResult_ThirtyTwoBytesAPIErrorZ_get_ok(long owner);
- // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner);
- public static native long CResult_ThirtyTwoBytesAPIErrorZ_get_err(long owner);
+ // struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner);
+ public static native long CResult_ChannelIdAPIErrorZ_get_ok(long owner);
+ // struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner);
+ public static native long CResult_ChannelIdAPIErrorZ_get_err(long owner);
public static class LDKRecentPaymentDetails {
private LDKRecentPaymentDetails() {}
public final static class AwaitingInvoice extends LDKRecentPaymentDetails {
public static native long[] CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok(long owner);
// struct LDKProbeSendFailure CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR owner);
public static native long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(long owner);
- // struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner);
- public static native byte[] C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(long owner);
- // struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner);
- public static native byte[] C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(long owner);
+ // struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner);
+ public static native long C2Tuple_ChannelIdPublicKeyZ_get_a(long owner);
+ // struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner);
+ public static native byte[] C2Tuple_ChannelIdPublicKeyZ_get_b(long owner);
+ // struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(long owner);
public static class LDKCOption_StrZ {
private LDKCOption_StrZ() {}
public final static class Some extends LDKCOption_StrZ {
}
static { LDKCOption_StrZ.init(); }
public static native LDKCOption_StrZ LDKCOption_StrZ_ref_from_ptr(long ptr);
- // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner);
- public static native void CResult_NoneBolt12SemanticErrorZ_get_ok(long owner);
- // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner);
- public static native Bolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(long owner);
// struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner);
public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(long owner);
// void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner);
public static native void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(long owner);
+ // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner);
+ public static native byte[] CResult_ThirtyTwoBytesAPIErrorZ_get_ok(long owner);
+ // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner);
+ public static native long CResult_ThirtyTwoBytesAPIErrorZ_get_err(long owner);
public static class LDKOffersMessage {
private LDKOffersMessage() {}
public final static class InvoiceRequest extends LDKOffersMessage {
public final static class Receive extends LDKPendingHTLCRouting {
public long payment_data;
public long payment_metadata;
+ public long payment_context;
public int incoming_cltv_expiry;
public byte[] phantom_shared_secret;
public long[] custom_tlvs;
public boolean requires_blinded_error;
- Receive(long payment_data, long payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error) { this.payment_data = payment_data; this.payment_metadata = payment_metadata; this.incoming_cltv_expiry = incoming_cltv_expiry; this.phantom_shared_secret = phantom_shared_secret; this.custom_tlvs = custom_tlvs; this.requires_blinded_error = requires_blinded_error; }
+ Receive(long payment_data, long payment_metadata, long payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error) { this.payment_data = payment_data; this.payment_metadata = payment_metadata; this.payment_context = payment_context; this.incoming_cltv_expiry = incoming_cltv_expiry; this.phantom_shared_secret = phantom_shared_secret; this.custom_tlvs = custom_tlvs; this.requires_blinded_error = requires_blinded_error; }
}
public final static class ReceiveKeysend extends LDKPendingHTLCRouting {
public long payment_data;
public long payment_metadata;
public int incoming_cltv_expiry;
public long[] custom_tlvs;
- ReceiveKeysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs) { this.payment_data = payment_data; this.payment_preimage = payment_preimage; this.payment_metadata = payment_metadata; this.incoming_cltv_expiry = incoming_cltv_expiry; this.custom_tlvs = custom_tlvs; }
+ public boolean requires_blinded_error;
+ ReceiveKeysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs, boolean requires_blinded_error) { this.payment_data = payment_data; this.payment_preimage = payment_preimage; this.payment_metadata = payment_metadata; this.incoming_cltv_expiry = incoming_cltv_expiry; this.custom_tlvs = custom_tlvs; this.requires_blinded_error = requires_blinded_error; }
}
static native void init();
}
public static native long Watch_watch_channel(long this_arg, long funding_txo, long monitor);
// LDKChannelMonitorUpdateStatus Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, const struct LDKChannelMonitorUpdate *NONNULL_PTR update
public static native ChannelMonitorUpdateStatus Watch_update_channel(long this_arg, long funding_txo, long update);
- // LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
+ // LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
public static native long[] Watch_release_pending_monitor_events(long this_arg);
public interface LDKBroadcasterInterface {
void broadcast_transactions(byte[][] txs);
}
static { LDKCOption_SocketAddressZ.init(); }
public static native LDKCOption_SocketAddressZ LDKCOption_SocketAddressZ_ref_from_ptr(long ptr);
- // struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner);
- public static native byte[] C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(long owner);
- // struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner);
- public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(long owner);
// struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
public static native byte[] CResult_CVec_u8ZPeerHandleErrorZ_get_ok(long owner);
// struct LDKPeerHandleError CResult_CVec_u8ZPeerHandleErrorZ_get_err(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
public static native long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_ok(long owner);
// enum LDKIOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR owner);
public static native IOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(long owner);
+ // struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(long owner);
+ // struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(long owner);
public static class LDKCOption_SecretKeyZ {
private LDKCOption_SecretKeyZ() {}
public final static class Some extends LDKCOption_SecretKeyZ {
}
static { LDKCOption_SecretKeyZ.init(); }
public static native LDKCOption_SecretKeyZ LDKCOption_SecretKeyZ_ref_from_ptr(long ptr);
+ // struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long owner);
// struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner);
public static native long CResult_VerifiedInvoiceRequestNoneZ_get_ok(long owner);
// void CResult_VerifiedInvoiceRequestNoneZ_get_err(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner);
public static native void CResult_VerifiedInvoiceRequestNoneZ_get_err(long owner);
+ // struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long owner);
+ // enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ public static native Bolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long owner);
+ // struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(long owner);
+ public static class LDKCOption_ECDSASignatureZ {
+ private LDKCOption_ECDSASignatureZ() {}
+ public final static class Some extends LDKCOption_ECDSASignatureZ {
+ public byte[] some;
+ Some(byte[] some) { this.some = some; }
+ }
+ public final static class None extends LDKCOption_ECDSASignatureZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_ECDSASignatureZ.init(); }
+ public static native LDKCOption_ECDSASignatureZ LDKCOption_ECDSASignatureZ_ref_from_ptr(long ptr);
public static class LDKCOption_i64Z {
private LDKCOption_i64Z() {}
public final static class Some extends LDKCOption_i64Z {
public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long owner);
public static class LDKPaymentPurpose {
private LDKPaymentPurpose() {}
- public final static class InvoicePayment extends LDKPaymentPurpose {
+ public final static class Bolt11InvoicePayment extends LDKPaymentPurpose {
+ public long payment_preimage;
+ public byte[] payment_secret;
+ Bolt11InvoicePayment(long payment_preimage, byte[] payment_secret) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; }
+ }
+ public final static class Bolt12OfferPayment extends LDKPaymentPurpose {
public long payment_preimage;
public byte[] payment_secret;
- InvoicePayment(long payment_preimage, byte[] payment_secret) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; }
+ public long payment_context;
+ Bolt12OfferPayment(long payment_preimage, byte[] payment_secret, long payment_context) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.payment_context = payment_context; }
+ }
+ public final static class Bolt12RefundPayment extends LDKPaymentPurpose {
+ public long payment_preimage;
+ public byte[] payment_secret;
+ public long payment_context;
+ Bolt12RefundPayment(long payment_preimage, byte[] payment_secret, long payment_context) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.payment_context = payment_context; }
}
public final static class SpontaneousPayment extends LDKPaymentPurpose {
public byte[] spontaneous_payment;
public static native long CResult_COption_PathFailureZDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_COption_PathFailureZDecodeErrorZ_get_err(LDKCResult_COption_PathFailureZDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_COption_PathFailureZDecodeErrorZ_get_err(long owner);
- public static class LDKClosureReason {
- private LDKClosureReason() {}
- public final static class CounterpartyForceClosed extends LDKClosureReason {
- public long peer_msg;
- CounterpartyForceClosed(long peer_msg) { this.peer_msg = peer_msg; }
- }
- public final static class HolderForceClosed extends LDKClosureReason {
- HolderForceClosed() { }
- }
- public final static class CooperativeClosure extends LDKClosureReason {
- CooperativeClosure() { }
- }
- public final static class CommitmentTxConfirmed extends LDKClosureReason {
- CommitmentTxConfirmed() { }
- }
- public final static class FundingTimedOut extends LDKClosureReason {
- FundingTimedOut() { }
- }
- public final static class ProcessingError extends LDKClosureReason {
- public java.lang.String err;
- ProcessingError(java.lang.String err) { this.err = err; }
- }
- public final static class DisconnectedPeer extends LDKClosureReason {
- DisconnectedPeer() { }
- }
- public final static class OutdatedChannelManager extends LDKClosureReason {
- OutdatedChannelManager() { }
- }
- public final static class CounterpartyCoopClosedUnfundedChannel extends LDKClosureReason {
- CounterpartyCoopClosedUnfundedChannel() { }
- }
- public final static class FundingBatchClosure extends LDKClosureReason {
- FundingBatchClosure() { }
- }
- static native void init();
- }
- static { LDKClosureReason.init(); }
- public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
public static class LDKCOption_ClosureReasonZ {
private LDKCOption_ClosureReasonZ() {}
public final static class Some extends LDKCOption_ClosureReasonZ {
private LDKHTLCDestination() {}
public final static class NextHopChannel extends LDKHTLCDestination {
public byte[] node_id;
- public byte[] channel_id;
- NextHopChannel(byte[] node_id, byte[] channel_id) { this.node_id = node_id; this.channel_id = channel_id; }
+ public long channel_id;
+ NextHopChannel(byte[] node_id, long channel_id) { this.node_id = node_id; this.channel_id = channel_id; }
}
public final static class UnknownNextHop extends LDKHTLCDestination {
public long requested_forward_scid;
public long requested_forward_scid;
InvalidForward(long requested_forward_scid) { this.requested_forward_scid = requested_forward_scid; }
}
+ public final static class InvalidOnion extends LDKHTLCDestination {
+ InvalidOnion() { }
+ }
public final static class FailedPayment extends LDKHTLCDestination {
public byte[] payment_hash;
FailedPayment(byte[] payment_hash) { this.payment_hash = payment_hash; }
public static class LDKBumpTransactionEvent {
private LDKBumpTransactionEvent() {}
public final static class ChannelClose extends LDKBumpTransactionEvent {
+ public long channel_id;
+ public byte[] counterparty_node_id;
public byte[] claim_id;
public int package_target_feerate_sat_per_1000_weight;
public byte[] commitment_tx;
public long commitment_tx_fee_satoshis;
public long anchor_descriptor;
public long[] pending_htlcs;
- ChannelClose(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs) { this.claim_id = claim_id; this.package_target_feerate_sat_per_1000_weight = package_target_feerate_sat_per_1000_weight; this.commitment_tx = commitment_tx; this.commitment_tx_fee_satoshis = commitment_tx_fee_satoshis; this.anchor_descriptor = anchor_descriptor; this.pending_htlcs = pending_htlcs; }
+ ChannelClose(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs) { this.channel_id = channel_id; this.counterparty_node_id = counterparty_node_id; this.claim_id = claim_id; this.package_target_feerate_sat_per_1000_weight = package_target_feerate_sat_per_1000_weight; this.commitment_tx = commitment_tx; this.commitment_tx_fee_satoshis = commitment_tx_fee_satoshis; this.anchor_descriptor = anchor_descriptor; this.pending_htlcs = pending_htlcs; }
}
public final static class HTLCResolution extends LDKBumpTransactionEvent {
+ public long channel_id;
+ public byte[] counterparty_node_id;
public byte[] claim_id;
public int target_feerate_sat_per_1000_weight;
public long[] htlc_descriptors;
public int tx_lock_time;
- HTLCResolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time) { this.claim_id = claim_id; this.target_feerate_sat_per_1000_weight = target_feerate_sat_per_1000_weight; this.htlc_descriptors = htlc_descriptors; this.tx_lock_time = tx_lock_time; }
+ HTLCResolution(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time) { this.channel_id = channel_id; this.counterparty_node_id = counterparty_node_id; this.claim_id = claim_id; this.target_feerate_sat_per_1000_weight = target_feerate_sat_per_1000_weight; this.htlc_descriptors = htlc_descriptors; this.tx_lock_time = tx_lock_time; }
}
static native void init();
}
public static class LDKEvent {
private LDKEvent() {}
public final static class FundingGenerationReady extends LDKEvent {
- public byte[] temporary_channel_id;
+ public long temporary_channel_id;
public byte[] counterparty_node_id;
public long channel_value_satoshis;
public byte[] output_script;
public byte[] user_channel_id;
- FundingGenerationReady(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
+ FundingGenerationReady(long temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
}
public final static class PaymentClaimable extends LDKEvent {
public byte[] receiver_node_id;
public final static class PaymentForwarded extends LDKEvent {
public long prev_channel_id;
public long next_channel_id;
- public long fee_earned_msat;
+ public long prev_user_channel_id;
+ public long next_user_channel_id;
+ public long total_fee_earned_msat;
+ public long skimmed_fee_msat;
public boolean claim_from_onchain_tx;
public long outbound_amount_forwarded_msat;
- PaymentForwarded(long prev_channel_id, long next_channel_id, long fee_earned_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat) { this.prev_channel_id = prev_channel_id; this.next_channel_id = next_channel_id; this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; this.outbound_amount_forwarded_msat = outbound_amount_forwarded_msat; }
+ PaymentForwarded(long prev_channel_id, long next_channel_id, long prev_user_channel_id, long next_user_channel_id, long total_fee_earned_msat, long skimmed_fee_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat) { this.prev_channel_id = prev_channel_id; this.next_channel_id = next_channel_id; this.prev_user_channel_id = prev_user_channel_id; this.next_user_channel_id = next_user_channel_id; this.total_fee_earned_msat = total_fee_earned_msat; this.skimmed_fee_msat = skimmed_fee_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; this.outbound_amount_forwarded_msat = outbound_amount_forwarded_msat; }
}
public final static class ChannelPending extends LDKEvent {
- public byte[] channel_id;
+ public long channel_id;
public byte[] user_channel_id;
public long former_temporary_channel_id;
public byte[] counterparty_node_id;
public long funding_txo;
- ChannelPending(byte[] channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.former_temporary_channel_id = former_temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_txo = funding_txo; }
+ public long channel_type;
+ ChannelPending(long channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo, long channel_type) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.former_temporary_channel_id = former_temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_txo = funding_txo; this.channel_type = channel_type; }
}
public final static class ChannelReady extends LDKEvent {
- public byte[] channel_id;
+ public long channel_id;
public byte[] user_channel_id;
public byte[] counterparty_node_id;
public long channel_type;
- ChannelReady(byte[] channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_type = channel_type; }
+ ChannelReady(long channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_type = channel_type; }
}
public final static class ChannelClosed extends LDKEvent {
- public byte[] channel_id;
+ public long channel_id;
public byte[] user_channel_id;
public long reason;
public byte[] counterparty_node_id;
public long channel_capacity_sats;
public long channel_funding_txo;
- ChannelClosed(byte[] channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; this.counterparty_node_id = counterparty_node_id; this.channel_capacity_sats = channel_capacity_sats; this.channel_funding_txo = channel_funding_txo; }
+ ChannelClosed(long channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; this.counterparty_node_id = counterparty_node_id; this.channel_capacity_sats = channel_capacity_sats; this.channel_funding_txo = channel_funding_txo; }
}
public final static class DiscardFunding extends LDKEvent {
- public byte[] channel_id;
+ public long channel_id;
public byte[] transaction;
- DiscardFunding(byte[] channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; }
+ DiscardFunding(long channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; }
}
public final static class OpenChannelRequest extends LDKEvent {
- public byte[] temporary_channel_id;
+ public long temporary_channel_id;
public byte[] counterparty_node_id;
public long funding_satoshis;
public long push_msat;
public long channel_type;
- OpenChannelRequest(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_satoshis = funding_satoshis; this.push_msat = push_msat; this.channel_type = channel_type; }
+ OpenChannelRequest(long temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_satoshis = funding_satoshis; this.push_msat = push_msat; this.channel_type = channel_type; }
}
public final static class HTLCHandlingFailed extends LDKEvent {
- public byte[] prev_channel_id;
+ public long prev_channel_id;
public long failed_next_destination;
- HTLCHandlingFailed(byte[] prev_channel_id, long failed_next_destination) { this.prev_channel_id = prev_channel_id; this.failed_next_destination = failed_next_destination; }
+ HTLCHandlingFailed(long prev_channel_id, long failed_next_destination) { this.prev_channel_id = prev_channel_id; this.failed_next_destination = failed_next_destination; }
}
public final static class BumpTransaction extends LDKEvent {
public long bump_transaction;
public static native long CResult_UntrustedStringDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_UntrustedStringDecodeErrorZ_get_err(LDKCResult_UntrustedStringDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_UntrustedStringDecodeErrorZ_get_err(long owner);
+ // struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_ChannelIdDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_ChannelIdDecodeErrorZ_get_err(long owner);
// struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner);
public static native byte[] C2Tuple__u832u16Z_get_a(long owner);
// uint16_t C2Tuple__u832u16Z_get_b(LDKC2Tuple__u832u16Z *NONNULL_PTR owner);
public static native long CResult_PaymentConstraintsDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_PaymentConstraintsDecodeErrorZ_get_err(LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_PaymentConstraintsDecodeErrorZ_get_err(long owner);
+ // struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_PaymentContextDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_PaymentContextDecodeErrorZ_get_err(long owner);
+ // struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_UnknownPaymentContextDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_UnknownPaymentContextDecodeErrorZ_get_err(long owner);
+ // struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_Bolt12OfferContextDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_Bolt12OfferContextDecodeErrorZ_get_err(long owner);
+ // struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_Bolt12RefundContextDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_Bolt12RefundContextDecodeErrorZ_get_err(long owner);
+ // struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner);
+ public static native String CResult_StrSecp256k1ErrorZ_get_ok(long owner);
+ // enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner);
+ public static native Secp256k1Error CResult_StrSecp256k1ErrorZ_get_err(long owner);
// struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner);
public static native byte[] C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(long owner);
// struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner);
public static native long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(long owner);
// void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner);
public static native void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(long owner);
- // struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner);
- public static native String CResult_StrSecp256k1ErrorZ_get_ok(long owner);
- // enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner);
- public static native Secp256k1Error CResult_StrSecp256k1ErrorZ_get_err(long owner);
// struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner);
public static native byte[] C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(long owner);
// struct LDKOnionMessage C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_b(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner);
public final static class GetNodeIdFailed extends LDKSendError {
GetNodeIdFailed() { }
}
+ public final static class UnresolvedIntroductionNode extends LDKSendError {
+ UnresolvedIntroductionNode() { }
+ }
public final static class BlindedPathAdvanceFailed extends LDKSendError {
BlindedPathAdvanceFailed() { }
}
public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_ok(long owner);
// struct LDKSendError CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR owner);
public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(long owner);
+ public static class LDKNextMessageHop {
+ private LDKNextMessageHop() {}
+ public final static class NodeId extends LDKNextMessageHop {
+ public byte[] node_id;
+ NodeId(byte[] node_id) { this.node_id = node_id; }
+ }
+ public final static class ShortChannelId extends LDKNextMessageHop {
+ public long short_channel_id;
+ ShortChannelId(long short_channel_id) { this.short_channel_id = short_channel_id; }
+ }
+ static native void init();
+ }
+ static { LDKNextMessageHop.init(); }
+ public static native LDKNextMessageHop LDKNextMessageHop_ref_from_ptr(long ptr);
public static class LDKParsedOnionMessageContents {
private LDKParsedOnionMessageContents() {}
public final static class Offers extends LDKParsedOnionMessageContents {
public static class LDKPeeledOnion {
private LDKPeeledOnion() {}
public final static class Forward extends LDKPeeledOnion {
- public byte[] _0;
+ public long _0;
public long _1;
- Forward(byte[] _0, long _1) { this._0 = _0; this._1 = _1; }
+ Forward(long _0, long _1) { this._0 = _0; this._1 = _1; }
}
public final static class Receive extends LDKPeeledOnion {
public long _0;
public static native long CResult_InvoiceErrorDecodeErrorZ_get_ok(long owner);
// struct LDKDecodeError CResult_InvoiceErrorDecodeErrorZ_get_err(LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR owner);
public static native long CResult_InvoiceErrorDecodeErrorZ_get_err(long owner);
- // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(long owner);
- // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(long owner);
- // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(long owner);
- // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_err(long owner);
- // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_HtlcBasepointDecodeErrorZ_get_ok(long owner);
- // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_HtlcBasepointDecodeErrorZ_get_err(long owner);
- // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_HtlcKeyDecodeErrorZ_get_ok(long owner);
- // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_HtlcKeyDecodeErrorZ_get_err(long owner);
- // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_RevocationBasepointDecodeErrorZ_get_ok(long owner);
- // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_RevocationBasepointDecodeErrorZ_get_err(long owner);
- // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_RevocationKeyDecodeErrorZ_get_ok(long owner);
- // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner);
- public static native long CResult_RevocationKeyDecodeErrorZ_get_err(long owner);
+ // struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_TrackedSpendableOutputDecodeErrorZ_get_err(long owner);
+ public static class LDKOutputSpendStatus {
+ private LDKOutputSpendStatus() {}
+ public final static class PendingInitialBroadcast extends LDKOutputSpendStatus {
+ public long delayed_until_height;
+ PendingInitialBroadcast(long delayed_until_height) { this.delayed_until_height = delayed_until_height; }
+ }
+ public final static class PendingFirstConfirmation extends LDKOutputSpendStatus {
+ public byte[] first_broadcast_hash;
+ public int latest_broadcast_height;
+ public byte[] latest_spending_tx;
+ PendingFirstConfirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx) { this.first_broadcast_hash = first_broadcast_hash; this.latest_broadcast_height = latest_broadcast_height; this.latest_spending_tx = latest_spending_tx; }
+ }
+ public final static class PendingThresholdConfirmations extends LDKOutputSpendStatus {
+ public byte[] first_broadcast_hash;
+ public int latest_broadcast_height;
+ public byte[] latest_spending_tx;
+ public int confirmation_height;
+ public byte[] confirmation_hash;
+ PendingThresholdConfirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash) { this.first_broadcast_hash = first_broadcast_hash; this.latest_broadcast_height = latest_broadcast_height; this.latest_spending_tx = latest_spending_tx; this.confirmation_height = confirmation_height; this.confirmation_hash = confirmation_hash; }
+ }
+ static native void init();
+ }
+ static { LDKOutputSpendStatus.init(); }
+ public static native LDKOutputSpendStatus LDKOutputSpendStatus_ref_from_ptr(long ptr);
+ // struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_OutputSpendStatusDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_OutputSpendStatusDecodeErrorZ_get_err(long owner);
public interface LDKFilter {
void register_tx(byte[] txid, byte[] script_pubkey);
void register_output(long output);
}
static { LDKCOption_FilterZ.init(); }
public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
- // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
- public static native long CResult_LockedChannelMonitorNoneZ_get_ok(long owner);
- // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
- public static native void CResult_LockedChannelMonitorNoneZ_get_err(long owner);
- // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner);
- public static native long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(long owner);
- // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner);
- public static native long[] C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(long owner);
+ public interface LDKChangeDestinationSource {
+ long get_change_destination_script();
+ }
+ public static native long LDKChangeDestinationSource_new(LDKChangeDestinationSource impl);
+ // LDKCResult_CVec_u8ZNoneZ ChangeDestinationSource_get_change_destination_script LDKChangeDestinationSource *NONNULL_PTR this_arg
+ public static native long ChangeDestinationSource_get_change_destination_script(long this_arg);
public interface LDKKVStore {
long read(String primary_namespace, String secondary_namespace, String key);
long write(String primary_namespace, String secondary_namespace, String key, byte[] buf);
public static native long KVStore_remove(long this_arg, String primary_namespace, String secondary_namespace, String key, boolean lazy);
// LDKCResult_CVec_StrZIOErrorZ KVStore_list LDKKVStore *NONNULL_PTR this_arg, struct LDKStr primary_namespace, struct LDKStr secondary_namespace
public static native long KVStore_list(long this_arg, String primary_namespace, String secondary_namespace);
+ public interface LDKOutputSpender {
+ long spend_spendable_outputs(long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime);
+ }
+ public static native long LDKOutputSpender_new(LDKOutputSpender impl);
+ // LDKCResult_TransactionNoneZ OutputSpender_spend_spendable_outputs LDKOutputSpender *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime
+ public static native long OutputSpender_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime);
+ // struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_OutputSweeperDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_OutputSweeperDecodeErrorZ_get_err(long owner);
+ // struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner);
+ public static native long C2Tuple_BestBlockOutputSweeperZ_get_a(long owner);
+ // struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner);
+ public static native long C2Tuple_BestBlockOutputSweeperZ_get_b(long owner);
+ // struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(long owner);
+ // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(long owner);
+ // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_err(long owner);
+ // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_HtlcBasepointDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_HtlcBasepointDecodeErrorZ_get_err(long owner);
+ // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_HtlcKeyDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_HtlcKeyDecodeErrorZ_get_err(long owner);
+ // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_RevocationBasepointDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_RevocationBasepointDecodeErrorZ_get_err(long owner);
+ // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_RevocationKeyDecodeErrorZ_get_ok(long owner);
+ // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner);
+ public static native long CResult_RevocationKeyDecodeErrorZ_get_err(long owner);
+ // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
+ public static native long CResult_LockedChannelMonitorNoneZ_get_ok(long owner);
+ // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
+ public static native void CResult_LockedChannelMonitorNoneZ_get_err(long owner);
+ // struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner);
+ public static native long C2Tuple_OutPointChannelIdZ_get_a(long owner);
+ // struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner);
+ public static native long C2Tuple_OutPointChannelIdZ_get_b(long owner);
+ // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner);
+ public static native long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(long owner);
+ // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner);
+ public static native long[] C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(long owner);
public interface LDKPersister {
long persist_manager(long channel_manager);
long persist_graph(long network_graph);
// LDKCResult_NoneIOErrorZ Persister_persist_scorer LDKPersister *NONNULL_PTR this_arg, const struct LDKWriteableScore *NONNULL_PTR scorer
public static native long Persister_persist_scorer(long this_arg, long scorer);
public interface LDKPersist {
- ChannelMonitorUpdateStatus persist_new_channel(long channel_id, long data, long update_id);
- ChannelMonitorUpdateStatus update_persisted_channel(long channel_id, long update, long data, long update_id);
+ ChannelMonitorUpdateStatus persist_new_channel(long channel_funding_outpoint, long data, long update_id);
+ ChannelMonitorUpdateStatus update_persisted_channel(long channel_funding_outpoint, long update, long data, long update_id);
+ void archive_persisted_channel(long channel_funding_outpoint);
}
public static native long LDKPersist_new(LDKPersist impl);
- // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
- public static native ChannelMonitorUpdateStatus Persist_persist_new_channel(long this_arg, long channel_id, long data, long update_id);
- // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
- public static native ChannelMonitorUpdateStatus Persist_update_persisted_channel(long this_arg, long channel_id, long update, long data, long update_id);
- public interface LDKFutureCallback {
- void call();
- }
- public static native long LDKFutureCallback_new(LDKFutureCallback impl);
- // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg
- public static native void FutureCallback_call(long this_arg);
+ // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+ public static native ChannelMonitorUpdateStatus Persist_persist_new_channel(long this_arg, long channel_funding_outpoint, long data, long update_id);
+ // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+ public static native ChannelMonitorUpdateStatus Persist_update_persisted_channel(long this_arg, long channel_funding_outpoint, long update, long data, long update_id);
+ // void Persist_archive_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint
+ public static native void Persist_archive_persisted_channel(long this_arg, long channel_funding_outpoint);
public interface LDKListen {
void filtered_block_connected(byte[] header, long[] txdata, int height);
void block_connected(byte[] block, int height);
public static native void Confirm_best_block_updated(long this_arg, byte[] header, int height);
// LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
public static native long[] Confirm_get_relevant_txids(long this_arg);
+ public static class LDKSpendingDelay {
+ private LDKSpendingDelay() {}
+ public final static class Relative extends LDKSpendingDelay {
+ public int num_blocks;
+ Relative(int num_blocks) { this.num_blocks = num_blocks; }
+ }
+ public final static class Absolute extends LDKSpendingDelay {
+ public int height;
+ Absolute(int height) { this.height = height; }
+ }
+ static native void init();
+ }
+ static { LDKSpendingDelay.init(); }
+ public static native LDKSpendingDelay LDKSpendingDelay_ref_from_ptr(long ptr);
+ public interface LDKFutureCallback {
+ void call();
+ }
+ public static native long LDKFutureCallback_new(LDKFutureCallback impl);
+ // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg
+ public static native void FutureCallback_call(long this_arg);
public interface LDKEventHandler {
void handle_event(long event);
}
void handle_shutdown(byte[] their_node_id, long msg);
void handle_closing_signed(byte[] their_node_id, long msg);
void handle_stfu(byte[] their_node_id, long msg);
- void handle_splice(byte[] their_node_id, long msg);
- void handle_splice_ack(byte[] their_node_id, long msg);
- void handle_splice_locked(byte[] their_node_id, long msg);
void handle_tx_add_input(byte[] their_node_id, long msg);
void handle_tx_add_output(byte[] their_node_id, long msg);
void handle_tx_remove_input(byte[] their_node_id, long msg);
public static native void ChannelMessageHandler_handle_closing_signed(long this_arg, byte[] their_node_id, long msg);
// void ChannelMessageHandler_handle_stfu LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKStfu *NONNULL_PTR msg
public static native void ChannelMessageHandler_handle_stfu(long this_arg, byte[] their_node_id, long msg);
- // void ChannelMessageHandler_handle_splice LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSplice *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_splice(long this_arg, byte[] their_node_id, long msg);
- // void ChannelMessageHandler_handle_splice_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceAck *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_splice_ack(long this_arg, byte[] their_node_id, long msg);
- // void ChannelMessageHandler_handle_splice_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceLocked *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_splice_locked(long this_arg, byte[] their_node_id, long msg);
// void ChannelMessageHandler_handle_tx_add_input LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddInput *NONNULL_PTR msg
public static native void ChannelMessageHandler_handle_tx_add_input(long this_arg, byte[] their_node_id, long msg);
// void ChannelMessageHandler_handle_tx_add_output LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddOutput *NONNULL_PTR msg
public static native long OffersMessageHandler_handle_message(long this_arg, long message);
// LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ OffersMessageHandler_release_pending_messages LDKOffersMessageHandler *NONNULL_PTR this_arg
public static native long[] OffersMessageHandler_release_pending_messages(long this_arg);
+ public interface LDKNodeIdLookUp {
+ byte[] next_node_id(long short_channel_id);
+ }
+ public static native long LDKNodeIdLookUp_new(LDKNodeIdLookUp impl);
+ // LDKPublicKey NodeIdLookUp_next_node_id LDKNodeIdLookUp *NONNULL_PTR this_arg, uint64_t short_channel_id
+ public static native byte[] NodeIdLookUp_next_node_id(long this_arg, long short_channel_id);
public interface LDKRoutingMessageHandler {
long handle_node_announcement(long msg);
long handle_channel_announcement(long msg);
public static native void SocketDescriptor_disconnect_socket(long this_arg);
// uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
public static native long SocketDescriptor_hash(long this_arg);
+ public interface LDKSignBolt12InvoiceFn {
+ long sign_invoice(long message);
+ }
+ public static native long LDKSignBolt12InvoiceFn_new(LDKSignBolt12InvoiceFn impl);
+ // LDKCResult_SchnorrSignatureNoneZ SignBolt12InvoiceFn_sign_invoice LDKSignBolt12InvoiceFn *NONNULL_PTR this_arg, const struct LDKUnsignedBolt12Invoice *NONNULL_PTR message
+ public static native long SignBolt12InvoiceFn_sign_invoice(long this_arg, long message);
+ public interface LDKSignInvoiceRequestFn {
+ long sign_invoice_request(long message);
+ }
+ public static native long LDKSignInvoiceRequestFn_new(LDKSignInvoiceRequestFn impl);
+ // LDKCResult_SchnorrSignatureNoneZ SignInvoiceRequestFn_sign_invoice_request LDKSignInvoiceRequestFn *NONNULL_PTR this_arg, const struct LDKUnsignedInvoiceRequest *NONNULL_PTR message
+ public static native long SignInvoiceRequestFn_sign_invoice_request(long this_arg, long message);
+ public static class LDKSignError {
+ private LDKSignError() {}
+ public final static class Signing extends LDKSignError {
+ Signing() { }
+ }
+ public final static class Verification extends LDKSignError {
+ public org.ldk.enums.Secp256k1Error verification;
+ Verification(org.ldk.enums.Secp256k1Error verification) { this.verification = verification; }
+ }
+ static native void init();
+ }
+ static { LDKSignError.init(); }
+ public static native LDKSignError LDKSignError_ref_from_ptr(long ptr);
public static class LDKEffectiveCapacity {
private LDKEffectiveCapacity() {}
public final static class ExactLiquidity extends LDKEffectiveCapacity {
public static native long LDKScore_get_ScoreUpdate(long arg);
// LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
public static native byte[] Score_write(long this_arg);
+ public static class LDKIntroductionNode {
+ private LDKIntroductionNode() {}
+ public final static class NodeId extends LDKIntroductionNode {
+ public byte[] node_id;
+ NodeId(byte[] node_id) { this.node_id = node_id; }
+ }
+ public final static class DirectedShortChannelId extends LDKIntroductionNode {
+ public org.ldk.enums.Direction _0;
+ public long _1;
+ DirectedShortChannelId(org.ldk.enums.Direction _0, long _1) { this._0 = _0; this._1 = _1; }
+ }
+ static native void init();
+ }
+ static { LDKIntroductionNode.init(); }
+ public static native LDKIntroductionNode LDKIntroductionNode_ref_from_ptr(long ptr);
public interface LDKCoinSelectionSource {
long select_confirmed_utxos(byte[] claim_id, long[] must_spend, long[] must_pay_to, int target_feerate_sat_per_1000_weight);
long sign_psbt(byte[] psbt);
public static native void WitnessProgram_free(long o);
// struct LDKBigEndianScalar BigEndianScalar_new(struct LDKThirtyTwoBytes big_endian_bytes);
public static native long BigEndianScalar_new(byte[] big_endian_bytes);
+ // uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg);
+ public static native long BigEndianScalar_clone_ptr(long arg);
+ // struct LDKBigEndianScalar BigEndianScalar_clone(const struct LDKBigEndianScalar *NONNULL_PTR orig);
+ public static native long BigEndianScalar_clone(long orig);
// uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg);
public static native long Bech32Error_clone_ptr(long arg);
// struct LDKBech32Error Bech32Error_clone(const struct LDKBech32Error *NONNULL_PTR orig);
public static native long TxOut_clone(long orig);
// void Str_free(struct LDKStr _res);
public static native void Str_free(String _res);
+ // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+ public static native void CVec_u8Z_free(byte[] _res);
+ // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKRefundMaybeWithDerivedMetadataBuilder o);
+ public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res);
+ public static native void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(long _res);
+ // uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg);
+ public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig);
+ public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(long orig);
+ // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_ok(struct LDKRefund o);
+ public static native long CResult_RefundBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_RefundBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_RefundBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_RefundBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_RefundBolt12SemanticErrorZ_free(struct LDKCResult_RefundBolt12SemanticErrorZ _res);
+ public static native void CResult_RefundBolt12SemanticErrorZ_free(long _res);
+ // uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg);
+ public static native long CResult_RefundBolt12SemanticErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR orig);
+ public static native long CResult_RefundBolt12SemanticErrorZ_clone(long orig);
// struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
public static native long COption_u64Z_some(long o);
// struct LDKCOption_u64Z COption_u64Z_none(void);
public static native long COption_ThirtyTwoBytesZ_clone_ptr(long arg);
// struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_clone(const struct LDKCOption_ThirtyTwoBytesZ *NONNULL_PTR orig);
public static native long COption_ThirtyTwoBytesZ_clone(long orig);
- // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
- public static native void CVec_u8Z_free(byte[] _res);
// struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_some(struct LDKCVec_u8Z o);
public static native long COption_CVec_u8ZZ_some(byte[] o);
// struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_none(void);
public static native long CResult_RecipientOnionFieldsNoneZ_clone_ptr(long arg);
// struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_clone(const struct LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR orig);
public static native long CResult_RecipientOnionFieldsNoneZ_clone(long orig);
+ // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKUnsignedBolt12Invoice o);
+ public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res);
+ public static native void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(long _res);
+ // uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg);
+ public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig);
+ public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(long orig);
+ // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKBolt12Invoice o);
+ public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res);
+ public static native void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(long _res);
+ // uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg);
+ public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig);
+ public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(long orig);
+ // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o);
+ public static native long CResult_SchnorrSignatureNoneZ_ok(byte[] o);
+ // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void);
+ public static native long CResult_SchnorrSignatureNoneZ_err();
+ // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o);
+ public static native boolean CResult_SchnorrSignatureNoneZ_is_ok(long o);
+ // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res);
+ public static native void CResult_SchnorrSignatureNoneZ_free(long _res);
+ // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg);
+ public static native long CResult_SchnorrSignatureNoneZ_clone_ptr(long arg);
+ // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig);
+ public static native long CResult_SchnorrSignatureNoneZ_clone(long orig);
// void CVec_ThirtyTwoBytesZ_free(struct LDKCVec_ThirtyTwoBytesZ _res);
public static native void CVec_ThirtyTwoBytesZ_free(byte[][] _res);
// struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_some(struct LDKCVec_ThirtyTwoBytesZ o);
public static native long COption_CVec_ThirtyTwoBytesZZ_clone_ptr(long arg);
// struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_clone(const struct LDKCOption_CVec_ThirtyTwoBytesZZ *NONNULL_PTR orig);
public static native long COption_CVec_ThirtyTwoBytesZZ_clone(long orig);
+ // struct LDKCOption_AmountZ COption_AmountZ_some(struct LDKAmount o);
+ public static native long COption_AmountZ_some(long o);
+ // struct LDKCOption_AmountZ COption_AmountZ_none(void);
+ public static native long COption_AmountZ_none();
+ // void COption_AmountZ_free(struct LDKCOption_AmountZ _res);
+ public static native void COption_AmountZ_free(long _res);
+ // uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg);
+ public static native long COption_AmountZ_clone_ptr(long arg);
+ // struct LDKCOption_AmountZ COption_AmountZ_clone(const struct LDKCOption_AmountZ *NONNULL_PTR orig);
+ public static native long COption_AmountZ_clone(long orig);
+ // struct LDKCOption_QuantityZ COption_QuantityZ_some(struct LDKQuantity o);
+ public static native long COption_QuantityZ_some(long o);
+ // struct LDKCOption_QuantityZ COption_QuantityZ_none(void);
+ public static native long COption_QuantityZ_none();
+ // void COption_QuantityZ_free(struct LDKCOption_QuantityZ _res);
+ public static native void COption_QuantityZ_free(long _res);
+ // uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg);
+ public static native long COption_QuantityZ_clone_ptr(long arg);
+ // struct LDKCOption_QuantityZ COption_QuantityZ_clone(const struct LDKCOption_QuantityZ *NONNULL_PTR orig);
+ public static native long COption_QuantityZ_clone(long orig);
// struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_ok(struct LDKThirtyTwoBytes o);
public static native long CResult_ThirtyTwoBytesNoneZ_ok(byte[] o);
// struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_err(void);
public static native long CResult_RecoverableSignatureNoneZ_clone_ptr(long arg);
// struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
public static native long CResult_RecoverableSignatureNoneZ_clone(long orig);
- // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o);
- public static native long CResult_SchnorrSignatureNoneZ_ok(byte[] o);
- // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void);
- public static native long CResult_SchnorrSignatureNoneZ_err();
- // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o);
- public static native boolean CResult_SchnorrSignatureNoneZ_is_ok(long o);
- // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res);
- public static native void CResult_SchnorrSignatureNoneZ_free(long _res);
- // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg);
- public static native long CResult_SchnorrSignatureNoneZ_clone_ptr(long arg);
- // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig);
- public static native long CResult_SchnorrSignatureNoneZ_clone(long orig);
// struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_ok(struct LDKECDSASignature o);
public static native long CResult_ECDSASignatureNoneZ_ok(byte[] o);
// struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_err(void);
public static native long CResult_ECDSASignatureNoneZ_clone_ptr(long arg);
// struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_clone(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR orig);
public static native long CResult_ECDSASignatureNoneZ_clone(long orig);
+ // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
+ public static native long CResult_TransactionNoneZ_ok(byte[] o);
+ // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
+ public static native long CResult_TransactionNoneZ_err();
+ // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
+ public static native boolean CResult_TransactionNoneZ_is_ok(long o);
+ // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
+ public static native void CResult_TransactionNoneZ_free(long _res);
+ // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
+ public static native long CResult_TransactionNoneZ_clone_ptr(long arg);
+ // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
+ public static native long CResult_TransactionNoneZ_clone(long orig);
// struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(struct LDKWriteableEcdsaChannelSigner o);
public static native long CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(long o);
// struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_err(struct LDKDecodeError e);
public static native long CResult_InMemorySignerDecodeErrorZ_clone_ptr(long arg);
// struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
public static native long CResult_InMemorySignerDecodeErrorZ_clone(long orig);
- // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
- public static native long CResult_TransactionNoneZ_ok(byte[] o);
- // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
- public static native long CResult_TransactionNoneZ_err();
- // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
- public static native boolean CResult_TransactionNoneZ_is_ok(long o);
- // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
- public static native void CResult_TransactionNoneZ_free(long _res);
- // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
- public static native long CResult_TransactionNoneZ_clone_ptr(long arg);
- // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
- public static native long CResult_TransactionNoneZ_clone(long orig);
// struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_some(struct LDKWriteableScore o);
public static native long COption_WriteableScoreZ_some(long o);
// struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_none(void);
public static native boolean CResult_ProbabilisticScorerDecodeErrorZ_is_ok(long o);
// void CResult_ProbabilisticScorerDecodeErrorZ_free(struct LDKCResult_ProbabilisticScorerDecodeErrorZ _res);
public static native void CResult_ProbabilisticScorerDecodeErrorZ_free(long _res);
+ // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_ok(struct LDKBestBlock o);
+ public static native long CResult_BestBlockDecodeErrorZ_ok(long o);
+ // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_BestBlockDecodeErrorZ_err(long e);
+ // bool CResult_BestBlockDecodeErrorZ_is_ok(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_BestBlockDecodeErrorZ_is_ok(long o);
+ // void CResult_BestBlockDecodeErrorZ_free(struct LDKCResult_BestBlockDecodeErrorZ _res);
+ public static native void CResult_BestBlockDecodeErrorZ_free(long _res);
+ // uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_BestBlockDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_clone(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_BestBlockDecodeErrorZ_clone(long orig);
// uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
public static native long C2Tuple_usizeTransactionZ_clone_ptr(long arg);
// struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
public static native long CResult_ChannelMonitorUpdateStatusNoneZ_clone(long orig);
// void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
public static native void CVec_MonitorEventZ_free(long[] _res);
- // uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg);
- public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(long arg);
- // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig);
- public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(long orig);
- // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b, struct LDKPublicKey c);
- public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(long a, long[] b, byte[] c);
- // void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res);
- public static native void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(long _res);
- // void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res);
- public static native void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(long[] _res);
+ // uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg);
+ public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(long arg);
+ // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig);
+ public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(long orig);
+ // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKChannelId b, struct LDKCVec_MonitorEventZ c, struct LDKPublicKey d);
+ public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(long a, long b, long[] c, byte[] d);
+ // void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res);
+ public static native void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(long _res);
+ // void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res);
+ public static native void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(long[] _res);
// struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
public static native long CResult_InitFeaturesDecodeErrorZ_ok(long o);
// struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(long arg);
// struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_clone(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR orig);
public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_ok(struct LDKOfferId o);
+ public static native long CResult_OfferIdDecodeErrorZ_ok(long o);
+ // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_OfferIdDecodeErrorZ_err(long e);
+ // bool CResult_OfferIdDecodeErrorZ_is_ok(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_OfferIdDecodeErrorZ_is_ok(long o);
+ // void CResult_OfferIdDecodeErrorZ_free(struct LDKCResult_OfferIdDecodeErrorZ _res);
+ public static native void CResult_OfferIdDecodeErrorZ_free(long _res);
+ // uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_OfferIdDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_clone(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_OfferIdDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void);
+ public static native long CResult_NoneBolt12SemanticErrorZ_ok();
+ // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_NoneBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_NoneBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res);
+ public static native void CResult_NoneBolt12SemanticErrorZ_free(long _res);
+ // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg);
+ public static native long CResult_NoneBolt12SemanticErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig);
+ public static native long CResult_NoneBolt12SemanticErrorZ_clone(long orig);
+ // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_ok(struct LDKOffer o);
+ public static native long CResult_OfferBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_OfferBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_OfferBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_OfferBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_OfferBolt12SemanticErrorZ_free(struct LDKCResult_OfferBolt12SemanticErrorZ _res);
+ public static native void CResult_OfferBolt12SemanticErrorZ_free(long _res);
+ // uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg);
+ public static native long CResult_OfferBolt12SemanticErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR orig);
+ public static native long CResult_OfferBolt12SemanticErrorZ_clone(long orig);
+ // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithDerivedPayerIdBuilder o);
+ public static native long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res);
+ public static native void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(long _res);
+ // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithExplicitPayerIdBuilder o);
+ public static native long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res);
+ public static native void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(long _res);
// struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_ok(struct LDKOffer o);
public static native long CResult_OfferBolt12ParseErrorZ_ok(long o);
// struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_err(struct LDKBolt12ParseError e);
public static native long CResult_OfferBolt12ParseErrorZ_clone_ptr(long arg);
// struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_clone(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR orig);
public static native long CResult_OfferBolt12ParseErrorZ_clone(long orig);
- // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o);
- public static native long CResult_PublicKeySecp256k1ErrorZ_ok(byte[] o);
- // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
- public static native long CResult_PublicKeySecp256k1ErrorZ_err(Secp256k1Error e);
- // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o);
- public static native boolean CResult_PublicKeySecp256k1ErrorZ_is_ok(long o);
- // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res);
- public static native void CResult_PublicKeySecp256k1ErrorZ_free(long _res);
- // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg);
- public static native long CResult_PublicKeySecp256k1ErrorZ_clone_ptr(long arg);
- // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig);
- public static native long CResult_PublicKeySecp256k1ErrorZ_clone(long orig);
// struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
public static native long CResult_NodeIdDecodeErrorZ_ok(long o);
// struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
public static native long CResult_NodeIdDecodeErrorZ_clone_ptr(long arg);
// struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
public static native long CResult_NodeIdDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o);
+ public static native long CResult_PublicKeySecp256k1ErrorZ_ok(byte[] o);
+ // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
+ public static native long CResult_PublicKeySecp256k1ErrorZ_err(Secp256k1Error e);
+ // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_PublicKeySecp256k1ErrorZ_is_ok(long o);
+ // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res);
+ public static native void CResult_PublicKeySecp256k1ErrorZ_free(long _res);
+ // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg);
+ public static native long CResult_PublicKeySecp256k1ErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig);
+ public static native long CResult_PublicKeySecp256k1ErrorZ_clone(long orig);
// struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
public static native long COption_NetworkUpdateZ_some(long o);
// struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
public static native long COption_CVec_SocketAddressZZ_clone_ptr(long arg);
// struct LDKCOption_CVec_SocketAddressZZ COption_CVec_SocketAddressZZ_clone(const struct LDKCOption_CVec_SocketAddressZZ *NONNULL_PTR orig);
public static native long COption_CVec_SocketAddressZZ_clone(long orig);
+ // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_ok(uint64_t o);
+ public static native long CResult_u64ShortChannelIdErrorZ_ok(long o);
+ // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_err(enum LDKShortChannelIdError e);
+ public static native long CResult_u64ShortChannelIdErrorZ_err(ShortChannelIdError e);
+ // bool CResult_u64ShortChannelIdErrorZ_is_ok(const struct LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_u64ShortChannelIdErrorZ_is_ok(long o);
+ // void CResult_u64ShortChannelIdErrorZ_free(struct LDKCResult_u64ShortChannelIdErrorZ _res);
+ public static native void CResult_u64ShortChannelIdErrorZ_free(long _res);
// struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_ok(struct LDKPendingHTLCInfo o);
public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_ok(long o);
// struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_err(struct LDKInboundHTLCErr e);
public static native boolean CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(long o);
// void CResult_PendingHTLCInfoInboundHTLCErrZ_free(struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ _res);
public static native void CResult_PendingHTLCInfoInboundHTLCErrZ_free(long _res);
+ // uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg);
+ public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(long arg);
+ // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_clone(const struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR orig);
+ public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_clone(long orig);
// void CVec_HTLCOutputInCommitmentZ_free(struct LDKCVec_HTLCOutputInCommitmentZ _res);
public static native void CVec_HTLCOutputInCommitmentZ_free(long[] _res);
// void CVec_HTLCDescriptorZ_free(struct LDKCVec_HTLCDescriptorZ _res);
public static native long CResult_CVec_UtxoZNoneZ_clone_ptr(long arg);
// struct LDKCResult_CVec_UtxoZNoneZ CResult_CVec_UtxoZNoneZ_clone(const struct LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR orig);
public static native long CResult_CVec_UtxoZNoneZ_clone(long orig);
+ // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_some(struct LDKPaymentContext o);
+ public static native long COption_PaymentContextZ_some(long o);
+ // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_none(void);
+ public static native long COption_PaymentContextZ_none();
+ // void COption_PaymentContextZ_free(struct LDKCOption_PaymentContextZ _res);
+ public static native void COption_PaymentContextZ_free(long _res);
+ // uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg);
+ public static native long COption_PaymentContextZ_clone_ptr(long arg);
+ // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_clone(const struct LDKCOption_PaymentContextZ *NONNULL_PTR orig);
+ public static native long COption_PaymentContextZ_clone(long orig);
// uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg);
public static native long C2Tuple_u64u16Z_clone_ptr(long arg);
// struct LDKC2Tuple_u64u16Z C2Tuple_u64u16Z_clone(const struct LDKC2Tuple_u64u16Z *NONNULL_PTR orig);
public static native long COption_ChannelShutdownStateZ_clone_ptr(long arg);
// struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_clone(const struct LDKCOption_ChannelShutdownStateZ *NONNULL_PTR orig);
public static native long COption_ChannelShutdownStateZ_clone(long orig);
- // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
- public static native long CResult_ThirtyTwoBytesAPIErrorZ_ok(byte[] o);
- // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e);
- public static native long CResult_ThirtyTwoBytesAPIErrorZ_err(long e);
- // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o);
- public static native boolean CResult_ThirtyTwoBytesAPIErrorZ_is_ok(long o);
- // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res);
- public static native void CResult_ThirtyTwoBytesAPIErrorZ_free(long _res);
- // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg);
- public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(long arg);
- // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig);
- public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone(long orig);
+ // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_ok(struct LDKChannelId o);
+ public static native long CResult_ChannelIdAPIErrorZ_ok(long o);
+ // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_err(struct LDKAPIError e);
+ public static native long CResult_ChannelIdAPIErrorZ_err(long e);
+ // bool CResult_ChannelIdAPIErrorZ_is_ok(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_ChannelIdAPIErrorZ_is_ok(long o);
+ // void CResult_ChannelIdAPIErrorZ_free(struct LDKCResult_ChannelIdAPIErrorZ _res);
+ public static native void CResult_ChannelIdAPIErrorZ_free(long _res);
+ // uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg);
+ public static native long CResult_ChannelIdAPIErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_clone(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR orig);
+ public static native long CResult_ChannelIdAPIErrorZ_clone(long orig);
// void CVec_RecentPaymentDetailsZ_free(struct LDKCVec_RecentPaymentDetailsZ _res);
public static native void CVec_RecentPaymentDetailsZ_free(long[] _res);
// struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
public static native long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone_ptr(long arg);
// struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(const struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR orig);
public static native long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(long orig);
- // uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg);
- public static native long C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(long arg);
- // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(const struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR orig);
- public static native long C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(long orig);
- // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_new(struct LDKThirtyTwoBytes a, struct LDKPublicKey b);
- public static native long C2Tuple_ThirtyTwoBytesPublicKeyZ_new(byte[] a, byte[] b);
- // void C2Tuple_ThirtyTwoBytesPublicKeyZ_free(struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res);
- public static native void C2Tuple_ThirtyTwoBytesPublicKeyZ_free(long _res);
- // void CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res);
- public static native void CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(long[] _res);
+ // uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg);
+ public static native long C2Tuple_ChannelIdPublicKeyZ_clone_ptr(long arg);
+ // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_clone(const struct LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR orig);
+ public static native long C2Tuple_ChannelIdPublicKeyZ_clone(long orig);
+ // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_new(struct LDKChannelId a, struct LDKPublicKey b);
+ public static native long C2Tuple_ChannelIdPublicKeyZ_new(long a, byte[] b);
+ // void C2Tuple_ChannelIdPublicKeyZ_free(struct LDKC2Tuple_ChannelIdPublicKeyZ _res);
+ public static native void C2Tuple_ChannelIdPublicKeyZ_free(long _res);
+ // void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res);
+ public static native void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(long[] _res);
+ // void CVec_ChannelIdZ_free(struct LDKCVec_ChannelIdZ _res);
+ public static native void CVec_ChannelIdZ_free(long[] _res);
+ // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKOfferWithDerivedMetadataBuilder o);
+ public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res);
+ public static native void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(long _res);
+ // uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg);
+ public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig);
+ public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(long orig);
// struct LDKCOption_StrZ COption_StrZ_some(struct LDKStr o);
public static native long COption_StrZ_some(String o);
// struct LDKCOption_StrZ COption_StrZ_none(void);
public static native long COption_StrZ_clone_ptr(long arg);
// struct LDKCOption_StrZ COption_StrZ_clone(const struct LDKCOption_StrZ *NONNULL_PTR orig);
public static native long COption_StrZ_clone(long orig);
- // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void);
- public static native long CResult_NoneBolt12SemanticErrorZ_ok();
- // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
- public static native long CResult_NoneBolt12SemanticErrorZ_err(Bolt12SemanticError e);
- // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o);
- public static native boolean CResult_NoneBolt12SemanticErrorZ_is_ok(long o);
- // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res);
- public static native void CResult_NoneBolt12SemanticErrorZ_free(long _res);
- // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg);
- public static native long CResult_NoneBolt12SemanticErrorZ_clone_ptr(long arg);
- // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig);
- public static native long CResult_NoneBolt12SemanticErrorZ_clone(long orig);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o);
public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(long o);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err(void);
public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr(long arg);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR orig);
public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(long orig);
+ // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
+ public static native long CResult_ThirtyTwoBytesAPIErrorZ_ok(byte[] o);
+ // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e);
+ public static native long CResult_ThirtyTwoBytesAPIErrorZ_err(long e);
+ // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_ThirtyTwoBytesAPIErrorZ_is_ok(long o);
+ // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res);
+ public static native void CResult_ThirtyTwoBytesAPIErrorZ_free(long _res);
+ // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg);
+ public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig);
+ public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone(long orig);
// struct LDKCOption_OffersMessageZ COption_OffersMessageZ_some(struct LDKOffersMessage o);
public static native long COption_OffersMessageZ_some(long o);
// struct LDKCOption_OffersMessageZ COption_OffersMessageZ_none(void);
public static native void CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ_free(long[] _res);
// void CVec_CommitmentTransactionZ_free(struct LDKCVec_CommitmentTransactionZ _res);
public static native void CVec_CommitmentTransactionZ_free(long[] _res);
- // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
- public static native void CVec_TransactionZ_free(byte[][] _res);
// uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg);
public static native long C2Tuple_u32TxOutZ_clone_ptr(long arg);
// struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
public static native long COption_SocketAddressZ_clone_ptr(long arg);
// struct LDKCOption_SocketAddressZ COption_SocketAddressZ_clone(const struct LDKCOption_SocketAddressZ *NONNULL_PTR orig);
public static native long COption_SocketAddressZ_clone(long orig);
- // uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg);
- public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(long arg);
- // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(const struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR orig);
- public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(long orig);
- // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_new(struct LDKPublicKey a, struct LDKCOption_SocketAddressZ b);
- public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_new(byte[] a, long b);
- // void C2Tuple_PublicKeyCOption_SocketAddressZZ_free(struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res);
- public static native void C2Tuple_PublicKeyCOption_SocketAddressZZ_free(long _res);
- // void CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res);
- public static native void CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(long[] _res);
+ // void CVec_PeerDetailsZ_free(struct LDKCVec_PeerDetailsZ _res);
+ public static native void CVec_PeerDetailsZ_free(long[] _res);
// struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
public static native long CResult_CVec_u8ZPeerHandleErrorZ_ok(byte[] o);
// struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
public static native long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone_ptr(long arg);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR orig);
public static native long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(long orig);
+ // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(struct LDKUnsignedInvoiceRequest o);
+ public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res);
+ public static native void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(long _res);
+ // uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg);
+ public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig);
+ public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(long orig);
+ // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_ok(struct LDKInvoiceRequest o);
+ public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_InvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res);
+ public static native void CResult_InvoiceRequestBolt12SemanticErrorZ_free(long _res);
+ // uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg);
+ public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig);
+ public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_clone(long orig);
// struct LDKCOption_SecretKeyZ COption_SecretKeyZ_some(struct LDKSecretKey o);
public static native long COption_SecretKeyZ_some(byte[] o);
// struct LDKCOption_SecretKeyZ COption_SecretKeyZ_none(void);
public static native long COption_SecretKeyZ_clone_ptr(long arg);
// struct LDKCOption_SecretKeyZ COption_SecretKeyZ_clone(const struct LDKCOption_SecretKeyZ *NONNULL_PTR orig);
public static native long COption_SecretKeyZ_clone(long orig);
+ // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithExplicitSigningPubkeyBuilder o);
+ public static native long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res);
+ public static native void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(long _res);
// struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_ok(struct LDKVerifiedInvoiceRequest o);
public static native long CResult_VerifiedInvoiceRequestNoneZ_ok(long o);
// struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_err(void);
public static native long CResult_VerifiedInvoiceRequestNoneZ_clone_ptr(long arg);
// struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_clone(const struct LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR orig);
public static native long CResult_VerifiedInvoiceRequestNoneZ_clone(long orig);
+ // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithDerivedSigningPubkeyBuilder o);
+ public static native long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(long o);
+ // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ public static native long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+ // bool CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long o);
+ // void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res);
+ public static native void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(long _res);
+ // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_ok(struct LDKInvoiceRequestFields o);
+ public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_ok(long o);
+ // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_err(long e);
+ // bool CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(long o);
+ // void CResult_InvoiceRequestFieldsDecodeErrorZ_free(struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res);
+ public static native void CResult_InvoiceRequestFieldsDecodeErrorZ_free(long _res);
+ // uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_clone(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_clone(long orig);
// enum LDKCOption_NoneZ COption_NoneZ_some(void);
public static native COption_NoneZ COption_NoneZ_some();
// enum LDKCOption_NoneZ COption_NoneZ_none(void);
public static native void COption_NoneZ_free(COption_NoneZ _res);
// void CVec_WitnessZ_free(struct LDKCVec_WitnessZ _res);
public static native void CVec_WitnessZ_free(byte[][] _res);
+ // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_some(struct LDKECDSASignature o);
+ public static native long COption_ECDSASignatureZ_some(byte[] o);
+ // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_none(void);
+ public static native long COption_ECDSASignatureZ_none();
+ // void COption_ECDSASignatureZ_free(struct LDKCOption_ECDSASignatureZ _res);
+ public static native void COption_ECDSASignatureZ_free(long _res);
+ // uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg);
+ public static native long COption_ECDSASignatureZ_clone_ptr(long arg);
+ // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_clone(const struct LDKCOption_ECDSASignatureZ *NONNULL_PTR orig);
+ public static native long COption_ECDSASignatureZ_clone(long orig);
// struct LDKCOption_i64Z COption_i64Z_some(int64_t o);
public static native long COption_i64Z_some(long o);
// struct LDKCOption_i64Z COption_i64Z_none(void);
public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(long arg);
// struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_clone(long orig);
+ // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
+ public static native void CVec_TransactionZ_free(byte[][] _res);
// struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_ok(struct LDKPaymentPurpose o);
public static native long CResult_PaymentPurposeDecodeErrorZ_ok(long o);
// struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_err(struct LDKDecodeError e);
public static native long CResult_UntrustedStringDecodeErrorZ_clone_ptr(long arg);
// struct LDKCResult_UntrustedStringDecodeErrorZ CResult_UntrustedStringDecodeErrorZ_clone(const struct LDKCResult_UntrustedStringDecodeErrorZ *NONNULL_PTR orig);
public static native long CResult_UntrustedStringDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_ok(struct LDKChannelId o);
+ public static native long CResult_ChannelIdDecodeErrorZ_ok(long o);
+ // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_ChannelIdDecodeErrorZ_err(long e);
+ // bool CResult_ChannelIdDecodeErrorZ_is_ok(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_ChannelIdDecodeErrorZ_is_ok(long o);
+ // void CResult_ChannelIdDecodeErrorZ_free(struct LDKCResult_ChannelIdDecodeErrorZ _res);
+ public static native void CResult_ChannelIdDecodeErrorZ_free(long _res);
+ // uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_ChannelIdDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_clone(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_ChannelIdDecodeErrorZ_clone(long orig);
// uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg);
public static native long C2Tuple__u832u16Z_clone_ptr(long arg);
// struct LDKC2Tuple__u832u16Z C2Tuple__u832u16Z_clone(const struct LDKC2Tuple__u832u16Z *NONNULL_PTR orig);
public static native long CResult_PaymentConstraintsDecodeErrorZ_clone_ptr(long arg);
// struct LDKCResult_PaymentConstraintsDecodeErrorZ CResult_PaymentConstraintsDecodeErrorZ_clone(const struct LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR orig);
public static native long CResult_PaymentConstraintsDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_ok(struct LDKPaymentContext o);
+ public static native long CResult_PaymentContextDecodeErrorZ_ok(long o);
+ // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_PaymentContextDecodeErrorZ_err(long e);
+ // bool CResult_PaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_PaymentContextDecodeErrorZ_is_ok(long o);
+ // void CResult_PaymentContextDecodeErrorZ_free(struct LDKCResult_PaymentContextDecodeErrorZ _res);
+ public static native void CResult_PaymentContextDecodeErrorZ_free(long _res);
+ // uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_PaymentContextDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_clone(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_PaymentContextDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_ok(struct LDKUnknownPaymentContext o);
+ public static native long CResult_UnknownPaymentContextDecodeErrorZ_ok(long o);
+ // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_UnknownPaymentContextDecodeErrorZ_err(long e);
+ // bool CResult_UnknownPaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_UnknownPaymentContextDecodeErrorZ_is_ok(long o);
+ // void CResult_UnknownPaymentContextDecodeErrorZ_free(struct LDKCResult_UnknownPaymentContextDecodeErrorZ _res);
+ public static native void CResult_UnknownPaymentContextDecodeErrorZ_free(long _res);
+ // uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_clone(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_UnknownPaymentContextDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_ok(struct LDKBolt12OfferContext o);
+ public static native long CResult_Bolt12OfferContextDecodeErrorZ_ok(long o);
+ // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_Bolt12OfferContextDecodeErrorZ_err(long e);
+ // bool CResult_Bolt12OfferContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_Bolt12OfferContextDecodeErrorZ_is_ok(long o);
+ // void CResult_Bolt12OfferContextDecodeErrorZ_free(struct LDKCResult_Bolt12OfferContextDecodeErrorZ _res);
+ public static native void CResult_Bolt12OfferContextDecodeErrorZ_free(long _res);
+ // uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_Bolt12OfferContextDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_ok(struct LDKBolt12RefundContext o);
+ public static native long CResult_Bolt12RefundContextDecodeErrorZ_ok(long o);
+ // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_Bolt12RefundContextDecodeErrorZ_err(long e);
+ // bool CResult_Bolt12RefundContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_Bolt12RefundContextDecodeErrorZ_is_ok(long o);
+ // void CResult_Bolt12RefundContextDecodeErrorZ_free(struct LDKCResult_Bolt12RefundContextDecodeErrorZ _res);
+ public static native void CResult_Bolt12RefundContextDecodeErrorZ_free(long _res);
+ // uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_Bolt12RefundContextDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o);
+ public static native long CResult_StrSecp256k1ErrorZ_ok(String o);
+ // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
+ public static native long CResult_StrSecp256k1ErrorZ_err(Secp256k1Error e);
+ // bool CResult_StrSecp256k1ErrorZ_is_ok(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_StrSecp256k1ErrorZ_is_ok(long o);
+ // void CResult_StrSecp256k1ErrorZ_free(struct LDKCResult_StrSecp256k1ErrorZ _res);
+ public static native void CResult_StrSecp256k1ErrorZ_free(long _res);
+ // uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg);
+ public static native long CResult_StrSecp256k1ErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_clone(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR orig);
+ public static native long CResult_StrSecp256k1ErrorZ_clone(long orig);
// uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg);
public static native long C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(long arg);
// struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(const struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR orig);
public static native long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(long arg);
// struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR orig);
public static native long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(long orig);
- // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o);
- public static native long CResult_StrSecp256k1ErrorZ_ok(String o);
- // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
- public static native long CResult_StrSecp256k1ErrorZ_err(Secp256k1Error e);
- // bool CResult_StrSecp256k1ErrorZ_is_ok(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR o);
- public static native boolean CResult_StrSecp256k1ErrorZ_is_ok(long o);
- // void CResult_StrSecp256k1ErrorZ_free(struct LDKCResult_StrSecp256k1ErrorZ _res);
- public static native void CResult_StrSecp256k1ErrorZ_free(long _res);
- // uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg);
- public static native long CResult_StrSecp256k1ErrorZ_clone_ptr(long arg);
- // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_clone(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR orig);
- public static native long CResult_StrSecp256k1ErrorZ_clone(long orig);
// struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_ok(struct LDKTxOut o);
public static native long CResult_TxOutUtxoLookupErrorZ_ok(long o);
// struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_err(enum LDKUtxoLookupError e);
public static native boolean CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(long o);
// void CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ _res);
public static native void CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(long _res);
+ // uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg);
+ public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(const struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR orig);
+ public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(long orig);
// struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_ok(struct LDKPeeledOnion o);
public static native long CResult_PeeledOnionNoneZ_ok(long o);
// struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_err(void);
public static native boolean CResult_PeeledOnionNoneZ_is_ok(long o);
// void CResult_PeeledOnionNoneZ_free(struct LDKCResult_PeeledOnionNoneZ _res);
public static native void CResult_PeeledOnionNoneZ_free(long _res);
+ // uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg);
+ public static native long CResult_PeeledOnionNoneZ_clone_ptr(long arg);
+ // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_clone(const struct LDKCResult_PeeledOnionNoneZ *NONNULL_PTR orig);
+ public static native long CResult_PeeledOnionNoneZ_clone(long orig);
// struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_ok(struct LDKSendSuccess o);
public static native long CResult_SendSuccessSendErrorZ_ok(long o);
// struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_err(struct LDKSendError e);
public static native boolean CResult_SendSuccessSendErrorZ_is_ok(long o);
// void CResult_SendSuccessSendErrorZ_free(struct LDKCResult_SendSuccessSendErrorZ _res);
public static native void CResult_SendSuccessSendErrorZ_free(long _res);
+ // uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg);
+ public static native long CResult_SendSuccessSendErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_clone(const struct LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR orig);
+ public static native long CResult_SendSuccessSendErrorZ_clone(long orig);
// struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_ok(struct LDKBlindedPath o);
public static native long CResult_BlindedPathNoneZ_ok(long o);
// struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_err(void);
public static native long CResult_InvoiceErrorDecodeErrorZ_clone_ptr(long arg);
// struct LDKCResult_InvoiceErrorDecodeErrorZ CResult_InvoiceErrorDecodeErrorZ_clone(const struct LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR orig);
public static native long CResult_InvoiceErrorDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_ok(struct LDKTrackedSpendableOutput o);
+ public static native long CResult_TrackedSpendableOutputDecodeErrorZ_ok(long o);
+ // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_TrackedSpendableOutputDecodeErrorZ_err(long e);
+ // bool CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(long o);
+ // void CResult_TrackedSpendableOutputDecodeErrorZ_free(struct LDKCResult_TrackedSpendableOutputDecodeErrorZ _res);
+ public static native void CResult_TrackedSpendableOutputDecodeErrorZ_free(long _res);
+ // uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_clone(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_TrackedSpendableOutputDecodeErrorZ_clone(long orig);
+ // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_ok(struct LDKOutputSpendStatus o);
+ public static native long CResult_OutputSpendStatusDecodeErrorZ_ok(long o);
+ // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_OutputSpendStatusDecodeErrorZ_err(long e);
+ // bool CResult_OutputSpendStatusDecodeErrorZ_is_ok(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_OutputSpendStatusDecodeErrorZ_is_ok(long o);
+ // void CResult_OutputSpendStatusDecodeErrorZ_free(struct LDKCResult_OutputSpendStatusDecodeErrorZ _res);
+ public static native void CResult_OutputSpendStatusDecodeErrorZ_free(long _res);
+ // uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg);
+ public static native long CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(long arg);
+ // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_clone(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR orig);
+ public static native long CResult_OutputSpendStatusDecodeErrorZ_clone(long orig);
+ // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
+ public static native long COption_FilterZ_some(long o);
+ // struct LDKCOption_FilterZ COption_FilterZ_none(void);
+ public static native long COption_FilterZ_none();
+ // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
+ public static native void COption_FilterZ_free(long _res);
+ // void CVec_TrackedSpendableOutputZ_free(struct LDKCVec_TrackedSpendableOutputZ _res);
+ public static native void CVec_TrackedSpendableOutputZ_free(long[] _res);
+ // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_ok(struct LDKOutputSweeper o);
+ public static native long CResult_OutputSweeperDecodeErrorZ_ok(long o);
+ // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_OutputSweeperDecodeErrorZ_err(long e);
+ // bool CResult_OutputSweeperDecodeErrorZ_is_ok(const struct LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_OutputSweeperDecodeErrorZ_is_ok(long o);
+ // void CResult_OutputSweeperDecodeErrorZ_free(struct LDKCResult_OutputSweeperDecodeErrorZ _res);
+ public static native void CResult_OutputSweeperDecodeErrorZ_free(long _res);
+ // struct LDKC2Tuple_BestBlockOutputSweeperZ C2Tuple_BestBlockOutputSweeperZ_new(struct LDKBestBlock a, struct LDKOutputSweeper b);
+ public static native long C2Tuple_BestBlockOutputSweeperZ_new(long a, long b);
+ // void C2Tuple_BestBlockOutputSweeperZ_free(struct LDKC2Tuple_BestBlockOutputSweeperZ _res);
+ public static native void C2Tuple_BestBlockOutputSweeperZ_free(long _res);
+ // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(struct LDKC2Tuple_BestBlockOutputSweeperZ o);
+ public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(long o);
+ // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(struct LDKDecodeError e);
+ public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(long e);
+ // bool CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR o);
+ public static native boolean CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(long o);
+ // void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res);
+ public static native void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(long _res);
// struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_ok(struct LDKDelayedPaymentBasepoint o);
public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_ok(long o);
// struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_err(struct LDKDecodeError e);
public static native long CResult_RevocationKeyDecodeErrorZ_clone_ptr(long arg);
// struct LDKCResult_RevocationKeyDecodeErrorZ CResult_RevocationKeyDecodeErrorZ_clone(const struct LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR orig);
public static native long CResult_RevocationKeyDecodeErrorZ_clone(long orig);
- // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
- public static native long COption_FilterZ_some(long o);
- // struct LDKCOption_FilterZ COption_FilterZ_none(void);
- public static native long COption_FilterZ_none();
- // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
- public static native void COption_FilterZ_free(long _res);
// struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
public static native long CResult_LockedChannelMonitorNoneZ_ok(long o);
// struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
public static native boolean CResult_LockedChannelMonitorNoneZ_is_ok(long o);
// void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
public static native void CResult_LockedChannelMonitorNoneZ_free(long _res);
- // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
- public static native void CVec_OutPointZ_free(long[] _res);
+ // uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg);
+ public static native long C2Tuple_OutPointChannelIdZ_clone_ptr(long arg);
+ // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_clone(const struct LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR orig);
+ public static native long C2Tuple_OutPointChannelIdZ_clone(long orig);
+ // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_new(struct LDKOutPoint a, struct LDKChannelId b);
+ public static native long C2Tuple_OutPointChannelIdZ_new(long a, long b);
+ // void C2Tuple_OutPointChannelIdZ_free(struct LDKC2Tuple_OutPointChannelIdZ _res);
+ public static native void C2Tuple_OutPointChannelIdZ_free(long _res);
+ // void CVec_C2Tuple_OutPointChannelIdZZ_free(struct LDKCVec_C2Tuple_OutPointChannelIdZZ _res);
+ public static native void CVec_C2Tuple_OutPointChannelIdZZ_free(long[] _res);
// void CVec_MonitorUpdateIdZ_free(struct LDKCVec_MonitorUpdateIdZ _res);
public static native void CVec_MonitorUpdateIdZ_free(long[] _res);
// uint64_t C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone_ptr(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR arg);
public static native long TransactionU16LenLimited_new(byte[] transaction);
// MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_into_transaction(struct LDKTransactionU16LenLimited this_arg);
public static native byte[] TransactionU16LenLimited_into_transaction(long this_arg);
+ // MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_as_transaction(const struct LDKTransactionU16LenLimited *NONNULL_PTR this_arg);
+ public static native byte[] TransactionU16LenLimited_as_transaction(long this_arg);
// struct LDKCVec_u8Z TransactionU16LenLimited_write(const struct LDKTransactionU16LenLimited *NONNULL_PTR obj);
public static native byte[] TransactionU16LenLimited_write(long obj);
// struct LDKCResult_TransactionU16LenLimitedDecodeErrorZ TransactionU16LenLimited_read(struct LDKu8slice ser);
public static native long MonitorUpdatingPersister_cleanup_stale_updates(long this_arg, boolean lazy);
// struct LDKPersist MonitorUpdatingPersister_as_Persist(const struct LDKMonitorUpdatingPersister *NONNULL_PTR this_arg);
public static native long MonitorUpdatingPersister_as_Persist(long this_arg);
+ // enum LDKShortChannelIdError ShortChannelIdError_clone(const enum LDKShortChannelIdError *NONNULL_PTR orig);
+ public static native ShortChannelIdError ShortChannelIdError_clone(long orig);
+ // enum LDKShortChannelIdError ShortChannelIdError_block_overflow(void);
+ public static native ShortChannelIdError ShortChannelIdError_block_overflow();
+ // enum LDKShortChannelIdError ShortChannelIdError_tx_index_overflow(void);
+ public static native ShortChannelIdError ShortChannelIdError_tx_index_overflow();
+ // enum LDKShortChannelIdError ShortChannelIdError_vout_index_overflow(void);
+ public static native ShortChannelIdError ShortChannelIdError_vout_index_overflow();
+ // bool ShortChannelIdError_eq(const enum LDKShortChannelIdError *NONNULL_PTR a, const enum LDKShortChannelIdError *NONNULL_PTR b);
+ public static native boolean ShortChannelIdError_eq(long a, long b);
+ // uint32_t block_from_scid(uint64_t short_channel_id);
+ public static native int block_from_scid(long short_channel_id);
+ // uint32_t tx_index_from_scid(uint64_t short_channel_id);
+ public static native int tx_index_from_scid(long short_channel_id);
+ // uint16_t vout_from_scid(uint64_t short_channel_id);
+ public static native short vout_from_scid(long short_channel_id);
+ // struct LDKCResult_u64ShortChannelIdErrorZ scid_from_parts(uint64_t block, uint64_t tx_index, uint64_t vout_index);
+ public static native long scid_from_parts(long block, long tx_index, long vout_index);
// void UntrustedString_free(struct LDKUntrustedString this_obj);
public static native void UntrustedString_free(long this_obj);
// struct LDKStr UntrustedString_get_a(const struct LDKUntrustedString *NONNULL_PTR this_ptr);
public static native void PrintableString_set_a(long this_ptr, String val);
// MUST_USE_RES struct LDKPrintableString PrintableString_new(struct LDKStr a_arg);
public static native long PrintableString_new(String a_arg);
+ // void TrackedSpendableOutput_free(struct LDKTrackedSpendableOutput this_obj);
+ public static native void TrackedSpendableOutput_free(long this_obj);
+ // struct LDKSpendableOutputDescriptor TrackedSpendableOutput_get_descriptor(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr);
+ public static native long TrackedSpendableOutput_get_descriptor(long this_ptr);
+ // void TrackedSpendableOutput_set_descriptor(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKSpendableOutputDescriptor val);
+ public static native void TrackedSpendableOutput_set_descriptor(long this_ptr, long val);
+ // struct LDKChannelId TrackedSpendableOutput_get_channel_id(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr);
+ public static native long TrackedSpendableOutput_get_channel_id(long this_ptr);
+ // void TrackedSpendableOutput_set_channel_id(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TrackedSpendableOutput_set_channel_id(long this_ptr, long val);
+ // struct LDKOutputSpendStatus TrackedSpendableOutput_get_status(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr);
+ public static native long TrackedSpendableOutput_get_status(long this_ptr);
+ // void TrackedSpendableOutput_set_status(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKOutputSpendStatus val);
+ public static native void TrackedSpendableOutput_set_status(long this_ptr, long val);
+ // MUST_USE_RES struct LDKTrackedSpendableOutput TrackedSpendableOutput_new(struct LDKSpendableOutputDescriptor descriptor_arg, struct LDKChannelId channel_id_arg, struct LDKOutputSpendStatus status_arg);
+ public static native long TrackedSpendableOutput_new(long descriptor_arg, long channel_id_arg, long status_arg);
+ // uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg);
+ public static native long TrackedSpendableOutput_clone_ptr(long arg);
+ // struct LDKTrackedSpendableOutput TrackedSpendableOutput_clone(const struct LDKTrackedSpendableOutput *NONNULL_PTR orig);
+ public static native long TrackedSpendableOutput_clone(long orig);
+ // bool TrackedSpendableOutput_eq(const struct LDKTrackedSpendableOutput *NONNULL_PTR a, const struct LDKTrackedSpendableOutput *NONNULL_PTR b);
+ public static native boolean TrackedSpendableOutput_eq(long a, long b);
+ // MUST_USE_RES bool TrackedSpendableOutput_is_spent_in(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_arg, struct LDKTransaction tx);
+ public static native boolean TrackedSpendableOutput_is_spent_in(long this_arg, byte[] tx);
+ // struct LDKCVec_u8Z TrackedSpendableOutput_write(const struct LDKTrackedSpendableOutput *NONNULL_PTR obj);
+ public static native byte[] TrackedSpendableOutput_write(long obj);
+ // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ TrackedSpendableOutput_read(struct LDKu8slice ser);
+ public static native long TrackedSpendableOutput_read(byte[] ser);
+ // void OutputSpendStatus_free(struct LDKOutputSpendStatus this_ptr);
+ public static native void OutputSpendStatus_free(long this_ptr);
+ // uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg);
+ public static native long OutputSpendStatus_clone_ptr(long arg);
+ // struct LDKOutputSpendStatus OutputSpendStatus_clone(const struct LDKOutputSpendStatus *NONNULL_PTR orig);
+ public static native long OutputSpendStatus_clone(long orig);
+ // struct LDKOutputSpendStatus OutputSpendStatus_pending_initial_broadcast(struct LDKCOption_u32Z delayed_until_height);
+ public static native long OutputSpendStatus_pending_initial_broadcast(long delayed_until_height);
+ // struct LDKOutputSpendStatus OutputSpendStatus_pending_first_confirmation(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx);
+ public static native long OutputSpendStatus_pending_first_confirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx);
+ // struct LDKOutputSpendStatus OutputSpendStatus_pending_threshold_confirmations(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx, uint32_t confirmation_height, struct LDKThirtyTwoBytes confirmation_hash);
+ public static native long OutputSpendStatus_pending_threshold_confirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash);
+ // bool OutputSpendStatus_eq(const struct LDKOutputSpendStatus *NONNULL_PTR a, const struct LDKOutputSpendStatus *NONNULL_PTR b);
+ public static native boolean OutputSpendStatus_eq(long a, long b);
+ // struct LDKCVec_u8Z OutputSpendStatus_write(const struct LDKOutputSpendStatus *NONNULL_PTR obj);
+ public static native byte[] OutputSpendStatus_write(long obj);
+ // struct LDKCResult_OutputSpendStatusDecodeErrorZ OutputSpendStatus_read(struct LDKu8slice ser);
+ public static native long OutputSpendStatus_read(byte[] ser);
+ // void OutputSweeper_free(struct LDKOutputSweeper this_obj);
+ public static native void OutputSweeper_free(long this_obj);
+ // MUST_USE_RES struct LDKOutputSweeper OutputSweeper_new(struct LDKBestBlock best_block, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKCOption_FilterZ chain_data_source, struct LDKOutputSpender output_spender, struct LDKChangeDestinationSource change_destination_source, struct LDKKVStore kv_store, struct LDKLogger logger);
+ public static native long OutputSweeper_new(long best_block, long broadcaster, long fee_estimator, long chain_data_source, long output_spender, long change_destination_source, long kv_store, long logger);
+ // MUST_USE_RES struct LDKCResult_NoneNoneZ OutputSweeper_track_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ output_descriptors, struct LDKChannelId channel_id, bool exclude_static_outputs, struct LDKCOption_u32Z delay_until_height);
+ public static native long OutputSweeper_track_spendable_outputs(long this_arg, long[] output_descriptors, long channel_id, boolean exclude_static_outputs, long delay_until_height);
+ // MUST_USE_RES struct LDKCVec_TrackedSpendableOutputZ OutputSweeper_tracked_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+ public static native long[] OutputSweeper_tracked_spendable_outputs(long this_arg);
+ // MUST_USE_RES struct LDKBestBlock OutputSweeper_current_best_block(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+ public static native long OutputSweeper_current_best_block(long this_arg);
+ // struct LDKListen OutputSweeper_as_Listen(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+ public static native long OutputSweeper_as_Listen(long this_arg);
+ // struct LDKConfirm OutputSweeper_as_Confirm(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+ public static native long OutputSweeper_as_Confirm(long this_arg);
+ // void SpendingDelay_free(struct LDKSpendingDelay this_ptr);
+ public static native void SpendingDelay_free(long this_ptr);
+ // uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg);
+ public static native long SpendingDelay_clone_ptr(long arg);
+ // struct LDKSpendingDelay SpendingDelay_clone(const struct LDKSpendingDelay *NONNULL_PTR orig);
+ public static native long SpendingDelay_clone(long orig);
+ // struct LDKSpendingDelay SpendingDelay_relative(uint32_t num_blocks);
+ public static native long SpendingDelay_relative(int num_blocks);
+ // struct LDKSpendingDelay SpendingDelay_absolute(uint32_t height);
+ public static native long SpendingDelay_absolute(int height);
+ // struct LDKCResult_OutputSweeperDecodeErrorZ OutputSweeper_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g);
+ public static native long OutputSweeper_read(byte[] ser, long arg_a, long arg_b, long arg_c, long arg_d, long arg_e, long arg_f, long arg_g);
+ // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g);
+ public static native long C2Tuple_BestBlockOutputSweeperZ_read(byte[] ser, long arg_a, long arg_b, long arg_c, long arg_d, long arg_e, long arg_f, long arg_g);
// void FutureCallback_free(struct LDKFutureCallback this_ptr);
public static native void FutureCallback_free(long this_ptr);
// void Future_free(struct LDKFuture this_obj);
public static native void Future_free(long this_obj);
- // uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg);
- public static native long Future_clone_ptr(long arg);
- // struct LDKFuture Future_clone(const struct LDKFuture *NONNULL_PTR orig);
- public static native long Future_clone(long orig);
// void Future_register_callback_fn(const struct LDKFuture *NONNULL_PTR this_arg, struct LDKFutureCallback callback);
public static native void Future_register_callback_fn(long this_arg, long callback);
- // void Future_wait(struct LDKFuture this_arg);
+ // void Future_wait(const struct LDKFuture *NONNULL_PTR this_arg);
public static native void Future_wait(long this_arg);
- // MUST_USE_RES bool Future_wait_timeout(struct LDKFuture this_arg, uint64_t max_wait);
+ // MUST_USE_RES bool Future_wait_timeout(const struct LDKFuture *NONNULL_PTR this_arg, uint64_t max_wait);
public static native boolean Future_wait_timeout(long this_arg, long max_wait);
// void Sleeper_free(struct LDKSleeper this_obj);
public static native void Sleeper_free(long this_obj);
- // MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(struct LDKFuture future);
+ // MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(const struct LDKFuture *NONNULL_PTR future);
public static native long Sleeper_from_single_future(long future);
- // MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(struct LDKFuture fut_a, struct LDKFuture fut_b);
+ // MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(const struct LDKFuture *NONNULL_PTR fut_a, const struct LDKFuture *NONNULL_PTR fut_b);
public static native long Sleeper_from_two_futures(long fut_a, long fut_b);
// MUST_USE_RES struct LDKSleeper Sleeper_new(struct LDKCVec_FutureZ futures);
public static native long Sleeper_new(long[] futures);
public static native byte[] Record_get_peer_id(long this_ptr);
// void Record_set_peer_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native void Record_set_peer_id(long this_ptr, byte[] val);
- // struct LDKCOption_ThirtyTwoBytesZ Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr);
+ // struct LDKChannelId Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr);
public static native long Record_get_channel_id(long this_ptr);
- // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
+ // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKChannelId val);
public static native void Record_set_channel_id(long this_ptr, long val);
// struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr);
public static native String Record_get_args(long this_ptr);
public static native int Record_get_line(long this_ptr);
// void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
public static native void Record_set_line(long this_ptr, int val);
- // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKCOption_ThirtyTwoBytesZ channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg);
+ // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKChannelId channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg);
public static native long Record_new(Level level_arg, byte[] peer_id_arg, long channel_id_arg, String args_arg, String module_path_arg, String file_arg, int line_arg);
// uint64_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg);
public static native long Record_clone_ptr(long arg);
public static native long UserConfig_default();
// void BestBlock_free(struct LDKBestBlock this_obj);
public static native void BestBlock_free(long this_obj);
+ // const uint8_t (*BestBlock_get_block_hash(const struct LDKBestBlock *NONNULL_PTR this_ptr))[32];
+ public static native byte[] BestBlock_get_block_hash(long this_ptr);
+ // void BestBlock_set_block_hash(struct LDKBestBlock *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ public static native void BestBlock_set_block_hash(long this_ptr, byte[] val);
+ // uint32_t BestBlock_get_height(const struct LDKBestBlock *NONNULL_PTR this_ptr);
+ public static native int BestBlock_get_height(long this_ptr);
+ // void BestBlock_set_height(struct LDKBestBlock *NONNULL_PTR this_ptr, uint32_t val);
+ public static native void BestBlock_set_height(long this_ptr, int val);
+ // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash_arg, uint32_t height_arg);
+ public static native long BestBlock_new(byte[] block_hash_arg, int height_arg);
// uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg);
public static native long BestBlock_clone_ptr(long arg);
// struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
public static native long BestBlock_clone(long orig);
+ // uint64_t BestBlock_hash(const struct LDKBestBlock *NONNULL_PTR o);
+ public static native long BestBlock_hash(long o);
// bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBestBlock *NONNULL_PTR b);
public static native boolean BestBlock_eq(long a, long b);
// MUST_USE_RES struct LDKBestBlock BestBlock_from_network(enum LDKNetwork network);
public static native long BestBlock_from_network(Network network);
- // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
- public static native long BestBlock_new(byte[] block_hash, int height);
- // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
- public static native byte[] BestBlock_block_hash(long this_arg);
- // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
- public static native int BestBlock_height(long this_arg);
+ // struct LDKCVec_u8Z BestBlock_write(const struct LDKBestBlock *NONNULL_PTR obj);
+ public static native byte[] BestBlock_write(long obj);
+ // struct LDKCResult_BestBlockDecodeErrorZ BestBlock_read(struct LDKu8slice ser);
+ public static native long BestBlock_read(byte[] ser);
// void Listen_free(struct LDKListen this_ptr);
public static native void Listen_free(long this_ptr);
// void Confirm_free(struct LDKConfirm this_ptr);
public static native ConfirmationTarget ConfirmationTarget_non_anchor_channel_fee();
// enum LDKConfirmationTarget ConfirmationTarget_channel_close_minimum(void);
public static native ConfirmationTarget ConfirmationTarget_channel_close_minimum();
+ // enum LDKConfirmationTarget ConfirmationTarget_output_spending_fee(void);
+ public static native ConfirmationTarget ConfirmationTarget_output_spending_fee();
// uint64_t ConfirmationTarget_hash(const enum LDKConfirmationTarget *NONNULL_PTR o);
public static native long ConfirmationTarget_hash(long o);
// bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
public static native long[] ChainMonitor_get_claimable_balances(long this_arg, long[] ignored_channels);
// MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
public static native long ChainMonitor_get_monitor(long this_arg, long funding_txo);
- // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
+ // MUST_USE_RES struct LDKCVec_C2Tuple_OutPointChannelIdZZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
public static native long[] ChainMonitor_list_monitors(long this_arg);
// MUST_USE_RES struct LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ChainMonitor_list_pending_monitor_updates(const struct LDKChainMonitor *NONNULL_PTR this_arg);
public static native long[] ChainMonitor_list_pending_monitor_updates(long this_arg);
public static native long ChainMonitor_get_update_future(long this_arg);
// void ChainMonitor_rebroadcast_pending_claims(const struct LDKChainMonitor *NONNULL_PTR this_arg);
public static native void ChainMonitor_rebroadcast_pending_claims(long this_arg);
+ // void ChainMonitor_signer_unblocked(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint monitor_opt);
+ public static native void ChainMonitor_signer_unblocked(long this_arg, long monitor_opt);
+ // void ChainMonitor_archive_fully_resolved_channel_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
+ public static native void ChainMonitor_archive_fully_resolved_channel_monitors(long this_arg);
// struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
public static native long ChainMonitor_as_Listen(long this_arg);
// struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
public static native long ChannelMonitorUpdate_get_update_id(long this_ptr);
// void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
public static native void ChannelMonitorUpdate_set_update_id(long this_ptr, long val);
+ // struct LDKChannelId ChannelMonitorUpdate_get_channel_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
+ public static native long ChannelMonitorUpdate_get_channel_id(long this_ptr);
+ // void ChannelMonitorUpdate_set_channel_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void ChannelMonitorUpdate_set_channel_id(long this_ptr, long val);
// uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg);
public static native long ChannelMonitorUpdate_clone_ptr(long arg);
// struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
public static native long MonitorEvent_clone(long orig);
// struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
public static native long MonitorEvent_htlcevent(long a);
+ // struct LDKMonitorEvent MonitorEvent_holder_force_closed_with_info(struct LDKClosureReason reason, struct LDKOutPoint outpoint, struct LDKChannelId channel_id);
+ public static native long MonitorEvent_holder_force_closed_with_info(long reason, long outpoint, long channel_id);
// struct LDKMonitorEvent MonitorEvent_holder_force_closed(struct LDKOutPoint a);
public static native long MonitorEvent_holder_force_closed(long a);
- // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
- public static native long MonitorEvent_completed(long funding_txo, long monitor_update_id);
+ // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, struct LDKChannelId channel_id, uint64_t monitor_update_id);
+ public static native long MonitorEvent_completed(long funding_txo, long channel_id, long monitor_update_id);
// bool MonitorEvent_eq(const struct LDKMonitorEvent *NONNULL_PTR a, const struct LDKMonitorEvent *NONNULL_PTR b);
public static native boolean MonitorEvent_eq(long a, long b);
// struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
public static native long ChannelMonitor_get_latest_update_id(long this_arg);
// MUST_USE_RES struct LDKC2Tuple_OutPointCVec_u8ZZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
public static native long ChannelMonitor_get_funding_txo(long this_arg);
+ // MUST_USE_RES struct LDKChannelId ChannelMonitor_channel_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+ public static native long ChannelMonitor_channel_id(long this_arg);
// MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
public static native long[] ChannelMonitor_get_outputs_to_watch(long this_arg);
// void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter, const struct LDKLogger *NONNULL_PTR logger);
public static native long ChannelMonitor_sign_to_local_justice_tx(long this_arg, byte[] justice_tx, long input_idx, long value, long commitment_number);
// MUST_USE_RES struct LDKPublicKey ChannelMonitor_get_counterparty_node_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
public static native byte[] ChannelMonitor_get_counterparty_node_id(long this_arg);
- // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
- public static native byte[][] ChannelMonitor_get_latest_holder_commitment_txn(long this_arg, long logger);
+ // void ChannelMonitor_broadcast_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
+ public static native void ChannelMonitor_broadcast_latest_holder_commitment_txn(long this_arg, long broadcaster, long fee_estimator, long logger);
// MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
public static native long[] ChannelMonitor_block_connected(long this_arg, byte[] header, long[] txdata, int height, long broadcaster, long fee_estimator, long logger);
// void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
public static native long ChannelMonitor_current_best_block(long this_arg);
// void ChannelMonitor_rebroadcast_pending_claims(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
public static native void ChannelMonitor_rebroadcast_pending_claims(long this_arg, long broadcaster, long fee_estimator, long logger);
+ // void ChannelMonitor_signer_unblocked(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
+ public static native void ChannelMonitor_signer_unblocked(long this_arg, long broadcaster, long fee_estimator, long logger);
// MUST_USE_RES struct LDKCVec_SpendableOutputDescriptorZ ChannelMonitor_get_spendable_outputs(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKTransaction tx, uint32_t confirmation_height);
public static native long[] ChannelMonitor_get_spendable_outputs(long this_arg, byte[] tx, int confirmation_height);
+ // MUST_USE_RES bool ChannelMonitor_is_fully_resolved(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
+ public static native boolean ChannelMonitor_is_fully_resolved(long this_arg, long logger);
// MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
public static native long[] ChannelMonitor_get_claimable_balances(long this_arg);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKEntropySource *NONNULL_PTR arg_a, const struct LDKSignerProvider *NONNULL_PTR arg_b);
public static native boolean OutPoint_eq(long a, long b);
// uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
public static native long OutPoint_hash(long o);
- // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
- public static native byte[] OutPoint_to_channel_id(long this_arg);
// struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
public static native byte[] OutPoint_write(long obj);
// struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
public static native void InboundHTLCErr_set_msg(long this_ptr, String val);
// MUST_USE_RES struct LDKInboundHTLCErr InboundHTLCErr_new(uint16_t err_code_arg, struct LDKCVec_u8Z err_data_arg, struct LDKStr msg_arg);
public static native long InboundHTLCErr_new(short err_code_arg, byte[] err_data_arg, String msg_arg);
+ // uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg);
+ public static native long InboundHTLCErr_clone_ptr(long arg);
+ // struct LDKInboundHTLCErr InboundHTLCErr_clone(const struct LDKInboundHTLCErr *NONNULL_PTR orig);
+ public static native long InboundHTLCErr_clone(long orig);
+ // uint64_t InboundHTLCErr_hash(const struct LDKInboundHTLCErr *NONNULL_PTR o);
+ public static native long InboundHTLCErr_hash(long o);
+ // bool InboundHTLCErr_eq(const struct LDKInboundHTLCErr *NONNULL_PTR a, const struct LDKInboundHTLCErr *NONNULL_PTR b);
+ public static native boolean InboundHTLCErr_eq(long a, long b);
// struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(const struct LDKUpdateAddHTLC *NONNULL_PTR msg, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKLogger *NONNULL_PTR logger, uint32_t cur_height, bool accept_mpp_keysend, bool allow_skimmed_fees);
public static native long peel_payment_onion(long msg, long node_signer, long logger, int cur_height, boolean accept_mpp_keysend, boolean allow_skimmed_fees);
// void PendingHTLCRouting_free(struct LDKPendingHTLCRouting this_ptr);
public static native long PendingHTLCRouting_clone(long orig);
// struct LDKPendingHTLCRouting PendingHTLCRouting_forward(struct LDKOnionPacket onion_packet, uint64_t short_channel_id, struct LDKBlindedForward blinded);
public static native long PendingHTLCRouting_forward(long onion_packet, long short_channel_id, long blinded);
- // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error);
- public static native long PendingHTLCRouting_receive(long payment_data, long payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error);
- // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs);
- public static native long PendingHTLCRouting_receive_keysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs);
+ // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, struct LDKCOption_PaymentContextZ payment_context, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error);
+ public static native long PendingHTLCRouting_receive(long payment_data, long payment_metadata, long payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error);
+ // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error);
+ public static native long PendingHTLCRouting_receive_keysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs, boolean requires_blinded_error);
// void BlindedForward_free(struct LDKBlindedForward this_obj);
public static native void BlindedForward_free(long this_obj);
// struct LDKPublicKey BlindedForward_get_inbound_blinding_point(const struct LDKBlindedForward *NONNULL_PTR this_ptr);
public static native long ChannelCounterparty_clone(long orig);
// void ChannelDetails_free(struct LDKChannelDetails this_obj);
public static native void ChannelDetails_free(long this_obj);
- // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
- public static native byte[] ChannelDetails_get_channel_id(long this_ptr);
- // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void ChannelDetails_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+ public static native long ChannelDetails_get_channel_id(long this_ptr);
+ // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void ChannelDetails_set_channel_id(long this_ptr, long val);
// struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
public static native long ChannelDetails_get_counterparty(long this_ptr);
// void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
public static native long ChannelDetails_get_config(long this_ptr);
// void ChannelDetails_set_config(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
public static native void ChannelDetails_set_config(long this_ptr, long val);
- // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKChannelTypeFeatures channel_type_arg, struct LDKCOption_u64Z short_channel_id_arg, struct LDKCOption_u64Z outbound_scid_alias_arg, struct LDKCOption_u64Z inbound_scid_alias_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, struct LDKU128 user_channel_id_arg, struct LDKCOption_u32Z feerate_sat_per_1000_weight_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t next_outbound_htlc_limit_msat_arg, uint64_t next_outbound_htlc_minimum_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u32Z confirmations_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, struct LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_public_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg, struct LDKChannelConfig config_arg);
- public static native long ChannelDetails_new(byte[] channel_id_arg, long counterparty_arg, long funding_txo_arg, long channel_type_arg, long short_channel_id_arg, long outbound_scid_alias_arg, long inbound_scid_alias_arg, long channel_value_satoshis_arg, long unspendable_punishment_reserve_arg, byte[] user_channel_id_arg, long feerate_sat_per_1000_weight_arg, long balance_msat_arg, long outbound_capacity_msat_arg, long next_outbound_htlc_limit_msat_arg, long next_outbound_htlc_minimum_msat_arg, long inbound_capacity_msat_arg, long confirmations_required_arg, long confirmations_arg, long force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_channel_ready_arg, long channel_shutdown_state_arg, boolean is_usable_arg, boolean is_public_arg, long inbound_htlc_minimum_msat_arg, long inbound_htlc_maximum_msat_arg, long config_arg);
// uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
public static native long ChannelDetails_clone_ptr(long arg);
// struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
public static native long ChannelManager_new(long fee_est, long chain_monitor, long tx_broadcaster, long router, long logger, long entropy_source, long node_signer, long signer_provider, long config, long params, int current_timestamp);
// MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
public static native long ChannelManager_get_current_default_configuration(long this_arg);
- // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ temporary_channel_id, struct LDKUserConfig override_config);
+ // MUST_USE_RES struct LDKCResult_ChannelIdAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKChannelId temporary_channel_id, struct LDKUserConfig override_config);
public static native long ChannelManager_create_channel(long this_arg, byte[] their_network_key, long channel_value_satoshis, long push_msat, byte[] user_channel_id, long temporary_channel_id, long override_config);
// MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
public static native long[] ChannelManager_list_channels(long this_arg);
public static native long[] ChannelManager_list_channels_with_counterparty(long this_arg, byte[] counterparty_node_id);
// MUST_USE_RES struct LDKCVec_RecentPaymentDetailsZ ChannelManager_list_recent_payments(const struct LDKChannelManager *NONNULL_PTR this_arg);
public static native long[] ChannelManager_list_recent_payments(long this_arg);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
- public static native long ChannelManager_close_channel(long this_arg, byte[] channel_id, byte[] counterparty_node_id);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script);
- public static native long ChannelManager_close_channel_with_feerate_and_script(long this_arg, byte[] channel_id, byte[] counterparty_node_id, long target_feerate_sats_per_1000_weight, long shutdown_script);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
- public static native long ChannelManager_force_close_broadcasting_latest_txn(long this_arg, byte[] channel_id, byte[] counterparty_node_id);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
- public static native long ChannelManager_force_close_without_broadcasting_txn(long this_arg, byte[] channel_id, byte[] counterparty_node_id);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id);
+ public static native long ChannelManager_close_channel(long this_arg, long channel_id, byte[] counterparty_node_id);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script);
+ public static native long ChannelManager_close_channel_with_feerate_and_script(long this_arg, long channel_id, byte[] counterparty_node_id, long target_feerate_sats_per_1000_weight, long shutdown_script);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id);
+ public static native long ChannelManager_force_close_broadcasting_latest_txn(long this_arg, long channel_id, byte[] counterparty_node_id);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id);
+ public static native long ChannelManager_force_close_without_broadcasting_txn(long this_arg, long channel_id, byte[] counterparty_node_id);
// void ChannelManager_force_close_all_channels_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg);
public static native void ChannelManager_force_close_all_channels_broadcasting_latest_txn(long this_arg);
// void ChannelManager_force_close_all_channels_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg);
public static native long ChannelManager_send_spontaneous_preflight_probes(long this_arg, byte[] node_id, long amount_msat, int final_cltv_expiry_delta, long liquidity_limit_multiplier);
// MUST_USE_RES struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ChannelManager_send_preflight_probes(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKRouteParameters route_params, struct LDKCOption_u64Z liquidity_limit_multiplier);
public static native long ChannelManager_send_preflight_probes(long this_arg, long route_params, long liquidity_limit_multiplier);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction);
- public static native long ChannelManager_funding_transaction_generated(long this_arg, byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction);
+ public static native long ChannelManager_funding_transaction_generated(long this_arg, long temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction);
public static native long ChannelManager_batch_funding_transaction_generated(long this_arg, long[] temporary_channels, byte[] funding_transaction);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update);
- public static native long ChannelManager_update_partial_channel_config(long this_arg, byte[] counterparty_node_id, byte[][] channel_ids, long config_update);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config);
- public static native long ChannelManager_update_channel_config(long this_arg, byte[] counterparty_node_id, byte[][] channel_ids, long config);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const uint8_t (*next_hop_channel_id)[32], struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat);
- public static native long ChannelManager_forward_intercepted_htlc(long this_arg, byte[] intercept_id, byte[] next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update);
+ public static native long ChannelManager_update_partial_channel_config(long this_arg, byte[] counterparty_node_id, long[] channel_ids, long config_update);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config);
+ public static native long ChannelManager_update_channel_config(long this_arg, byte[] counterparty_node_id, long[] channel_ids, long config);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const struct LDKChannelId *NONNULL_PTR next_hop_channel_id, struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat);
+ public static native long ChannelManager_forward_intercepted_htlc(long this_arg, byte[] intercept_id, long next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat);
// MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_fail_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id);
public static native long ChannelManager_fail_intercepted_htlc(long this_arg, byte[] intercept_id);
// void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
public static native void ChannelManager_claim_funds_with_known_custom_tlvs(long this_arg, byte[] payment_preimage);
// MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
public static native byte[] ChannelManager_get_our_node_id(long this_arg);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
- public static native long ChannelManager_accept_inbound_channel(long this_arg, byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id);
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
- public static native long ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(long this_arg, byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
+ public static native long ChannelManager_accept_inbound_channel(long this_arg, long temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
+ public static native long ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(long this_arg, long temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id);
+ // MUST_USE_RES struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_offer_builder(const struct LDKChannelManager *NONNULL_PTR this_arg);
+ public static native long ChannelManager_create_offer_builder(long this_arg);
+ // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_refund_builder(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t amount_msats, uint64_t absolute_expiry, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat);
+ public static native long ChannelManager_create_refund_builder(long this_arg, long amount_msats, long absolute_expiry, byte[] payment_id, long retry_strategy, long max_total_routing_fee_msat);
// MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_pay_for_offer(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOffer *NONNULL_PTR offer, struct LDKCOption_u64Z quantity, struct LDKCOption_u64Z amount_msats, struct LDKCOption_StrZ payer_note, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat);
public static native long ChannelManager_pay_for_offer(long this_arg, long offer, long quantity, long amount_msats, long payer_note, byte[] payment_id, long retry_strategy, long max_total_routing_fee_msat);
- // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund);
+ // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund);
public static native long ChannelManager_request_refund_payment(long this_arg, long refund);
// MUST_USE_RES struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
public static native long ChannelManager_create_inbound_payment(long this_arg, long min_value_msat, int invoice_expiry_delta_secs, long min_final_cltv_expiry_delta);
public static native long ChannelManager_as_ChannelMessageHandler(long this_arg);
// struct LDKOffersMessageHandler ChannelManager_as_OffersMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
public static native long ChannelManager_as_OffersMessageHandler(long this_arg);
+ // struct LDKNodeIdLookUp ChannelManager_as_NodeIdLookUp(const struct LDKChannelManager *NONNULL_PTR this_arg);
+ public static native long ChannelManager_as_NodeIdLookUp(long this_arg);
// struct LDKInitFeatures provided_init_features(const struct LDKUserConfig *NONNULL_PTR config);
public static native long provided_init_features(long config);
// struct LDKCVec_u8Z CounterpartyForwardingInfo_write(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR obj);
public static native long DelayedPaymentBasepoint_hash(long o);
// MUST_USE_RES struct LDKPublicKey DelayedPaymentBasepoint_to_public_key(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg);
public static native byte[] DelayedPaymentBasepoint_to_public_key(long this_arg);
+ // MUST_USE_RES struct LDKThirtyTwoBytes DelayedPaymentBasepoint_derive_add_tweak(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point);
+ public static native byte[] DelayedPaymentBasepoint_derive_add_tweak(long this_arg, byte[] per_commitment_point);
// struct LDKCVec_u8Z DelayedPaymentBasepoint_write(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR obj);
public static native byte[] DelayedPaymentBasepoint_write(long obj);
// struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ DelayedPaymentBasepoint_read(struct LDKu8slice ser);
public static native long HtlcBasepoint_hash(long o);
// MUST_USE_RES struct LDKPublicKey HtlcBasepoint_to_public_key(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg);
public static native byte[] HtlcBasepoint_to_public_key(long this_arg);
+ // MUST_USE_RES struct LDKThirtyTwoBytes HtlcBasepoint_derive_add_tweak(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point);
+ public static native byte[] HtlcBasepoint_derive_add_tweak(long this_arg, byte[] per_commitment_point);
// struct LDKCVec_u8Z HtlcBasepoint_write(const struct LDKHtlcBasepoint *NONNULL_PTR obj);
public static native byte[] HtlcBasepoint_write(long obj);
// struct LDKCResult_HtlcBasepointDecodeErrorZ HtlcBasepoint_read(struct LDKu8slice ser);
public static native byte[] HtlcKey_write(long obj);
// struct LDKCResult_HtlcKeyDecodeErrorZ HtlcKey_read(struct LDKu8slice ser);
public static native long HtlcKey_read(byte[] ser);
+ // struct LDKPublicKey add_public_key_tweak(struct LDKPublicKey base_point, const uint8_t (*tweak)[32]);
+ public static native byte[] add_public_key_tweak(byte[] base_point, byte[] tweak);
// void RevocationBasepoint_free(struct LDKRevocationBasepoint this_obj);
public static native void RevocationBasepoint_free(long this_obj);
// struct LDKPublicKey RevocationBasepoint_get_a(const struct LDKRevocationBasepoint *NONNULL_PTR this_ptr);
public static native long DecodeError_io(IOError a);
// struct LDKDecodeError DecodeError_unsupported_compression(void);
public static native long DecodeError_unsupported_compression();
+ // struct LDKDecodeError DecodeError_dangerous_value(void);
+ public static native long DecodeError_dangerous_value();
// uint64_t DecodeError_hash(const struct LDKDecodeError *NONNULL_PTR o);
public static native long DecodeError_hash(long o);
// bool DecodeError_eq(const struct LDKDecodeError *NONNULL_PTR a, const struct LDKDecodeError *NONNULL_PTR b);
public static native boolean Init_eq(long a, long b);
// void ErrorMessage_free(struct LDKErrorMessage this_obj);
public static native void ErrorMessage_free(long this_obj);
- // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
- public static native byte[] ErrorMessage_get_channel_id(long this_ptr);
- // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void ErrorMessage_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
+ public static native long ErrorMessage_get_channel_id(long this_ptr);
+ // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void ErrorMessage_set_channel_id(long this_ptr, long val);
// struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
public static native String ErrorMessage_get_data(long this_ptr);
// void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
public static native void ErrorMessage_set_data(long this_ptr, String val);
- // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
- public static native long ErrorMessage_new(byte[] channel_id_arg, String data_arg);
+ // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg);
+ public static native long ErrorMessage_new(long channel_id_arg, String data_arg);
// uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg);
public static native long ErrorMessage_clone_ptr(long arg);
// struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
public static native boolean ErrorMessage_eq(long a, long b);
// void WarningMessage_free(struct LDKWarningMessage this_obj);
public static native void WarningMessage_free(long this_obj);
- // const uint8_t (*WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr))[32];
- public static native byte[] WarningMessage_get_channel_id(long this_ptr);
- // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void WarningMessage_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr);
+ public static native long WarningMessage_get_channel_id(long this_ptr);
+ // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void WarningMessage_set_channel_id(long this_ptr, long val);
// struct LDKStr WarningMessage_get_data(const struct LDKWarningMessage *NONNULL_PTR this_ptr);
public static native String WarningMessage_get_data(long this_ptr);
// void WarningMessage_set_data(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKStr val);
public static native void WarningMessage_set_data(long this_ptr, String val);
- // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
- public static native long WarningMessage_new(byte[] channel_id_arg, String data_arg);
+ // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg);
+ public static native long WarningMessage_new(long channel_id_arg, String data_arg);
// uint64_t WarningMessage_clone_ptr(LDKWarningMessage *NONNULL_PTR arg);
public static native long WarningMessage_clone_ptr(long arg);
// struct LDKWarningMessage WarningMessage_clone(const struct LDKWarningMessage *NONNULL_PTR orig);
public static native long Pong_hash(long o);
// bool Pong_eq(const struct LDKPong *NONNULL_PTR a, const struct LDKPong *NONNULL_PTR b);
public static native boolean Pong_eq(long a, long b);
+ // void CommonOpenChannelFields_free(struct LDKCommonOpenChannelFields this_obj);
+ public static native void CommonOpenChannelFields_free(long this_obj);
+ // const uint8_t (*CommonOpenChannelFields_get_chain_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr))[32];
+ public static native byte[] CommonOpenChannelFields_get_chain_hash(long this_ptr);
+ // void CommonOpenChannelFields_set_chain_hash(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ public static native void CommonOpenChannelFields_set_chain_hash(long this_ptr, byte[] val);
+ // struct LDKChannelId CommonOpenChannelFields_get_temporary_channel_id(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonOpenChannelFields_get_temporary_channel_id(long this_ptr);
+ // void CommonOpenChannelFields_set_temporary_channel_id(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void CommonOpenChannelFields_set_temporary_channel_id(long this_ptr, long val);
+ // uint64_t CommonOpenChannelFields_get_funding_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonOpenChannelFields_get_funding_satoshis(long this_ptr);
+ // void CommonOpenChannelFields_set_funding_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+ public static native void CommonOpenChannelFields_set_funding_satoshis(long this_ptr, long val);
+ // uint64_t CommonOpenChannelFields_get_dust_limit_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonOpenChannelFields_get_dust_limit_satoshis(long this_ptr);
+ // void CommonOpenChannelFields_set_dust_limit_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+ public static native void CommonOpenChannelFields_set_dust_limit_satoshis(long this_ptr, long val);
+ // uint64_t CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(long this_ptr);
+ // void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+ public static native void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
+ // uint64_t CommonOpenChannelFields_get_htlc_minimum_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonOpenChannelFields_get_htlc_minimum_msat(long this_ptr);
+ // void CommonOpenChannelFields_set_htlc_minimum_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+ public static native void CommonOpenChannelFields_set_htlc_minimum_msat(long this_ptr, long val);
+ // uint32_t CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native int CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(long this_ptr);
+ // void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint32_t val);
+ public static native void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(long this_ptr, int val);
+ // uint16_t CommonOpenChannelFields_get_to_self_delay(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native short CommonOpenChannelFields_get_to_self_delay(long this_ptr);
+ // void CommonOpenChannelFields_set_to_self_delay(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val);
+ public static native void CommonOpenChannelFields_set_to_self_delay(long this_ptr, short val);
+ // uint16_t CommonOpenChannelFields_get_max_accepted_htlcs(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native short CommonOpenChannelFields_get_max_accepted_htlcs(long this_ptr);
+ // void CommonOpenChannelFields_set_max_accepted_htlcs(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val);
+ public static native void CommonOpenChannelFields_set_max_accepted_htlcs(long this_ptr, short val);
+ // struct LDKPublicKey CommonOpenChannelFields_get_funding_pubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonOpenChannelFields_get_funding_pubkey(long this_ptr);
+ // void CommonOpenChannelFields_set_funding_pubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonOpenChannelFields_set_funding_pubkey(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonOpenChannelFields_get_revocation_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonOpenChannelFields_get_revocation_basepoint(long this_ptr);
+ // void CommonOpenChannelFields_set_revocation_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonOpenChannelFields_set_revocation_basepoint(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonOpenChannelFields_get_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonOpenChannelFields_get_payment_basepoint(long this_ptr);
+ // void CommonOpenChannelFields_set_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonOpenChannelFields_set_payment_basepoint(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonOpenChannelFields_get_delayed_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonOpenChannelFields_get_delayed_payment_basepoint(long this_ptr);
+ // void CommonOpenChannelFields_set_delayed_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonOpenChannelFields_set_delayed_payment_basepoint(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonOpenChannelFields_get_htlc_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonOpenChannelFields_get_htlc_basepoint(long this_ptr);
+ // void CommonOpenChannelFields_set_htlc_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonOpenChannelFields_set_htlc_basepoint(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonOpenChannelFields_get_first_per_commitment_point(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonOpenChannelFields_get_first_per_commitment_point(long this_ptr);
+ // void CommonOpenChannelFields_set_first_per_commitment_point(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonOpenChannelFields_set_first_per_commitment_point(long this_ptr, byte[] val);
+ // uint8_t CommonOpenChannelFields_get_channel_flags(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native byte CommonOpenChannelFields_get_channel_flags(long this_ptr);
+ // void CommonOpenChannelFields_set_channel_flags(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint8_t val);
+ public static native void CommonOpenChannelFields_set_channel_flags(long this_ptr, byte val);
+ // struct LDKCOption_CVec_u8ZZ CommonOpenChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonOpenChannelFields_get_shutdown_scriptpubkey(long this_ptr);
+ // void CommonOpenChannelFields_set_shutdown_scriptpubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
+ public static native void CommonOpenChannelFields_set_shutdown_scriptpubkey(long this_ptr, long val);
+ // struct LDKChannelTypeFeatures CommonOpenChannelFields_get_channel_type(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonOpenChannelFields_get_channel_type(long this_ptr);
+ // void CommonOpenChannelFields_set_channel_type(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
+ public static native void CommonOpenChannelFields_set_channel_type(long this_ptr, long val);
+ // MUST_USE_RES struct LDKCommonOpenChannelFields CommonOpenChannelFields_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKChannelId temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
+ public static native long CommonOpenChannelFields_new(byte[] chain_hash_arg, long temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int commitment_feerate_sat_per_1000_weight_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, long shutdown_scriptpubkey_arg, long channel_type_arg);
+ // uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg);
+ public static native long CommonOpenChannelFields_clone_ptr(long arg);
+ // struct LDKCommonOpenChannelFields CommonOpenChannelFields_clone(const struct LDKCommonOpenChannelFields *NONNULL_PTR orig);
+ public static native long CommonOpenChannelFields_clone(long orig);
+ // uint64_t CommonOpenChannelFields_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR o);
+ public static native long CommonOpenChannelFields_hash(long o);
+ // bool CommonOpenChannelFields_eq(const struct LDKCommonOpenChannelFields *NONNULL_PTR a, const struct LDKCommonOpenChannelFields *NONNULL_PTR b);
+ public static native boolean CommonOpenChannelFields_eq(long a, long b);
// void OpenChannel_free(struct LDKOpenChannel this_obj);
public static native void OpenChannel_free(long this_obj);
- // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
- public static native byte[] OpenChannel_get_chain_hash(long this_ptr);
- // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void OpenChannel_set_chain_hash(long this_ptr, byte[] val);
- // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
- public static native byte[] OpenChannel_get_temporary_channel_id(long this_ptr);
- // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void OpenChannel_set_temporary_channel_id(long this_ptr, byte[] val);
- // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native long OpenChannel_get_funding_satoshis(long this_ptr);
- // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
- public static native void OpenChannel_set_funding_satoshis(long this_ptr, long val);
+ // struct LDKCommonOpenChannelFields OpenChannel_get_common_fields(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+ public static native long OpenChannel_get_common_fields(long this_ptr);
+ // void OpenChannel_set_common_fields(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val);
+ public static native void OpenChannel_set_common_fields(long this_ptr, long val);
// uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
public static native long OpenChannel_get_push_msat(long this_ptr);
// void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
public static native void OpenChannel_set_push_msat(long this_ptr, long val);
- // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native long OpenChannel_get_dust_limit_satoshis(long this_ptr);
- // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
- public static native void OpenChannel_set_dust_limit_satoshis(long this_ptr, long val);
- // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native long OpenChannel_get_max_htlc_value_in_flight_msat(long this_ptr);
- // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
- public static native void OpenChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
// uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
public static native long OpenChannel_get_channel_reserve_satoshis(long this_ptr);
// void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
public static native void OpenChannel_set_channel_reserve_satoshis(long this_ptr, long val);
- // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native long OpenChannel_get_htlc_minimum_msat(long this_ptr);
- // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
- public static native void OpenChannel_set_htlc_minimum_msat(long this_ptr, long val);
- // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native int OpenChannel_get_feerate_per_kw(long this_ptr);
- // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
- public static native void OpenChannel_set_feerate_per_kw(long this_ptr, int val);
- // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native short OpenChannel_get_to_self_delay(long this_ptr);
- // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
- public static native void OpenChannel_set_to_self_delay(long this_ptr, short val);
- // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native short OpenChannel_get_max_accepted_htlcs(long this_ptr);
- // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
- public static native void OpenChannel_set_max_accepted_htlcs(long this_ptr, short val);
- // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannel_get_funding_pubkey(long this_ptr);
- // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannel_set_funding_pubkey(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannel_get_revocation_basepoint(long this_ptr);
- // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannel_set_revocation_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannel_get_payment_point(long this_ptr);
- // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannel_set_payment_point(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannel_get_delayed_payment_basepoint(long this_ptr);
- // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannel_get_htlc_basepoint(long this_ptr);
- // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannel_set_htlc_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannel_get_first_per_commitment_point(long this_ptr);
- // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
- // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native byte OpenChannel_get_channel_flags(long this_ptr);
- // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
- public static native void OpenChannel_set_channel_flags(long this_ptr, byte val);
- // struct LDKCOption_CVec_u8ZZ OpenChannel_get_shutdown_scriptpubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native long OpenChannel_get_shutdown_scriptpubkey(long this_ptr);
- // void OpenChannel_set_shutdown_scriptpubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
- public static native void OpenChannel_set_shutdown_scriptpubkey(long this_ptr, long val);
- // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
- public static native long OpenChannel_get_channel_type(long this_ptr);
- // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
- public static native void OpenChannel_set_channel_type(long this_ptr, long val);
- // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t push_msat_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t feerate_per_kw_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
- public static native long OpenChannel_new(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, long funding_satoshis_arg, long push_msat_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int feerate_per_kw_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, long shutdown_scriptpubkey_arg, long channel_type_arg);
+ // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKCommonOpenChannelFields common_fields_arg, uint64_t push_msat_arg, uint64_t channel_reserve_satoshis_arg);
+ public static native long OpenChannel_new(long common_fields_arg, long push_msat_arg, long channel_reserve_satoshis_arg);
// uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg);
public static native long OpenChannel_clone_ptr(long arg);
// struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
public static native boolean OpenChannel_eq(long a, long b);
// void OpenChannelV2_free(struct LDKOpenChannelV2 this_obj);
public static native void OpenChannelV2_free(long this_obj);
- // const uint8_t (*OpenChannelV2_get_chain_hash(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32];
- public static native byte[] OpenChannelV2_get_chain_hash(long this_ptr);
- // void OpenChannelV2_set_chain_hash(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void OpenChannelV2_set_chain_hash(long this_ptr, byte[] val);
- // const uint8_t (*OpenChannelV2_get_temporary_channel_id(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32];
- public static native byte[] OpenChannelV2_get_temporary_channel_id(long this_ptr);
- // void OpenChannelV2_set_temporary_channel_id(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void OpenChannelV2_set_temporary_channel_id(long this_ptr, byte[] val);
+ // struct LDKCommonOpenChannelFields OpenChannelV2_get_common_fields(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+ public static native long OpenChannelV2_get_common_fields(long this_ptr);
+ // void OpenChannelV2_set_common_fields(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val);
+ public static native void OpenChannelV2_set_common_fields(long this_ptr, long val);
// uint32_t OpenChannelV2_get_funding_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
public static native int OpenChannelV2_get_funding_feerate_sat_per_1000_weight(long this_ptr);
// void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
public static native void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(long this_ptr, int val);
- // uint32_t OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native int OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(long this_ptr);
- // void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
- public static native void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(long this_ptr, int val);
- // uint64_t OpenChannelV2_get_funding_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native long OpenChannelV2_get_funding_satoshis(long this_ptr);
- // void OpenChannelV2_set_funding_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
- public static native void OpenChannelV2_set_funding_satoshis(long this_ptr, long val);
- // uint64_t OpenChannelV2_get_dust_limit_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native long OpenChannelV2_get_dust_limit_satoshis(long this_ptr);
- // void OpenChannelV2_set_dust_limit_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
- public static native void OpenChannelV2_set_dust_limit_satoshis(long this_ptr, long val);
- // uint64_t OpenChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native long OpenChannelV2_get_max_htlc_value_in_flight_msat(long this_ptr);
- // void OpenChannelV2_set_max_htlc_value_in_flight_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
- public static native void OpenChannelV2_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
- // uint64_t OpenChannelV2_get_htlc_minimum_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native long OpenChannelV2_get_htlc_minimum_msat(long this_ptr);
- // void OpenChannelV2_set_htlc_minimum_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
- public static native void OpenChannelV2_set_htlc_minimum_msat(long this_ptr, long val);
- // uint16_t OpenChannelV2_get_to_self_delay(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native short OpenChannelV2_get_to_self_delay(long this_ptr);
- // void OpenChannelV2_set_to_self_delay(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
- public static native void OpenChannelV2_set_to_self_delay(long this_ptr, short val);
- // uint16_t OpenChannelV2_get_max_accepted_htlcs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native short OpenChannelV2_get_max_accepted_htlcs(long this_ptr);
- // void OpenChannelV2_set_max_accepted_htlcs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
- public static native void OpenChannelV2_set_max_accepted_htlcs(long this_ptr, short val);
// uint32_t OpenChannelV2_get_locktime(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
public static native int OpenChannelV2_get_locktime(long this_ptr);
// void OpenChannelV2_set_locktime(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
public static native void OpenChannelV2_set_locktime(long this_ptr, int val);
- // struct LDKPublicKey OpenChannelV2_get_funding_pubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannelV2_get_funding_pubkey(long this_ptr);
- // void OpenChannelV2_set_funding_pubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannelV2_set_funding_pubkey(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannelV2_get_revocation_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannelV2_get_revocation_basepoint(long this_ptr);
- // void OpenChannelV2_set_revocation_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannelV2_set_revocation_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannelV2_get_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannelV2_get_payment_basepoint(long this_ptr);
- // void OpenChannelV2_set_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannelV2_set_payment_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannelV2_get_delayed_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannelV2_get_delayed_payment_basepoint(long this_ptr);
- // void OpenChannelV2_set_delayed_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannelV2_set_delayed_payment_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannelV2_get_htlc_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannelV2_get_htlc_basepoint(long this_ptr);
- // void OpenChannelV2_set_htlc_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannelV2_set_htlc_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey OpenChannelV2_get_first_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] OpenChannelV2_get_first_per_commitment_point(long this_ptr);
- // void OpenChannelV2_set_first_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void OpenChannelV2_set_first_per_commitment_point(long this_ptr, byte[] val);
// struct LDKPublicKey OpenChannelV2_get_second_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
public static native byte[] OpenChannelV2_get_second_per_commitment_point(long this_ptr);
// void OpenChannelV2_set_second_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native void OpenChannelV2_set_second_per_commitment_point(long this_ptr, byte[] val);
- // uint8_t OpenChannelV2_get_channel_flags(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native byte OpenChannelV2_get_channel_flags(long this_ptr);
- // void OpenChannelV2_set_channel_flags(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint8_t val);
- public static native void OpenChannelV2_set_channel_flags(long this_ptr, byte val);
- // struct LDKCOption_CVec_u8ZZ OpenChannelV2_get_shutdown_scriptpubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native long OpenChannelV2_get_shutdown_scriptpubkey(long this_ptr);
- // void OpenChannelV2_set_shutdown_scriptpubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
- public static native void OpenChannelV2_set_shutdown_scriptpubkey(long this_ptr, long val);
- // struct LDKChannelTypeFeatures OpenChannelV2_get_channel_type(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
- public static native long OpenChannelV2_get_channel_type(long this_ptr);
- // void OpenChannelV2_set_channel_type(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
- public static native void OpenChannelV2_set_channel_type(long this_ptr, long val);
// enum LDKCOption_NoneZ OpenChannelV2_get_require_confirmed_inputs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
public static native COption_NoneZ OpenChannelV2_get_require_confirmed_inputs(long this_ptr);
// void OpenChannelV2_set_require_confirmed_inputs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
public static native void OpenChannelV2_set_require_confirmed_inputs(long this_ptr, COption_NoneZ val);
- // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
- public static native long OpenChannelV2_new(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, int funding_feerate_sat_per_1000_weight_arg, int commitment_feerate_sat_per_1000_weight_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, int locktime_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, byte channel_flags_arg, long shutdown_scriptpubkey_arg, long channel_type_arg, COption_NoneZ require_confirmed_inputs_arg);
+ // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKCommonOpenChannelFields common_fields_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t locktime_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
+ public static native long OpenChannelV2_new(long common_fields_arg, int funding_feerate_sat_per_1000_weight_arg, int locktime_arg, byte[] second_per_commitment_point_arg, COption_NoneZ require_confirmed_inputs_arg);
// uint64_t OpenChannelV2_clone_ptr(LDKOpenChannelV2 *NONNULL_PTR arg);
public static native long OpenChannelV2_clone_ptr(long arg);
// struct LDKOpenChannelV2 OpenChannelV2_clone(const struct LDKOpenChannelV2 *NONNULL_PTR orig);
public static native long OpenChannelV2_hash(long o);
// bool OpenChannelV2_eq(const struct LDKOpenChannelV2 *NONNULL_PTR a, const struct LDKOpenChannelV2 *NONNULL_PTR b);
public static native boolean OpenChannelV2_eq(long a, long b);
+ // void CommonAcceptChannelFields_free(struct LDKCommonAcceptChannelFields this_obj);
+ public static native void CommonAcceptChannelFields_free(long this_obj);
+ // struct LDKChannelId CommonAcceptChannelFields_get_temporary_channel_id(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonAcceptChannelFields_get_temporary_channel_id(long this_ptr);
+ // void CommonAcceptChannelFields_set_temporary_channel_id(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void CommonAcceptChannelFields_set_temporary_channel_id(long this_ptr, long val);
+ // uint64_t CommonAcceptChannelFields_get_dust_limit_satoshis(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonAcceptChannelFields_get_dust_limit_satoshis(long this_ptr);
+ // void CommonAcceptChannelFields_set_dust_limit_satoshis(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+ public static native void CommonAcceptChannelFields_set_dust_limit_satoshis(long this_ptr, long val);
+ // uint64_t CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(long this_ptr);
+ // void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+ public static native void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
+ // uint64_t CommonAcceptChannelFields_get_htlc_minimum_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonAcceptChannelFields_get_htlc_minimum_msat(long this_ptr);
+ // void CommonAcceptChannelFields_set_htlc_minimum_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+ public static native void CommonAcceptChannelFields_set_htlc_minimum_msat(long this_ptr, long val);
+ // uint32_t CommonAcceptChannelFields_get_minimum_depth(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native int CommonAcceptChannelFields_get_minimum_depth(long this_ptr);
+ // void CommonAcceptChannelFields_set_minimum_depth(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint32_t val);
+ public static native void CommonAcceptChannelFields_set_minimum_depth(long this_ptr, int val);
+ // uint16_t CommonAcceptChannelFields_get_to_self_delay(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native short CommonAcceptChannelFields_get_to_self_delay(long this_ptr);
+ // void CommonAcceptChannelFields_set_to_self_delay(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val);
+ public static native void CommonAcceptChannelFields_set_to_self_delay(long this_ptr, short val);
+ // uint16_t CommonAcceptChannelFields_get_max_accepted_htlcs(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native short CommonAcceptChannelFields_get_max_accepted_htlcs(long this_ptr);
+ // void CommonAcceptChannelFields_set_max_accepted_htlcs(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val);
+ public static native void CommonAcceptChannelFields_set_max_accepted_htlcs(long this_ptr, short val);
+ // struct LDKPublicKey CommonAcceptChannelFields_get_funding_pubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonAcceptChannelFields_get_funding_pubkey(long this_ptr);
+ // void CommonAcceptChannelFields_set_funding_pubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonAcceptChannelFields_set_funding_pubkey(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonAcceptChannelFields_get_revocation_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonAcceptChannelFields_get_revocation_basepoint(long this_ptr);
+ // void CommonAcceptChannelFields_set_revocation_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonAcceptChannelFields_set_revocation_basepoint(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonAcceptChannelFields_get_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonAcceptChannelFields_get_payment_basepoint(long this_ptr);
+ // void CommonAcceptChannelFields_set_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonAcceptChannelFields_set_payment_basepoint(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonAcceptChannelFields_get_delayed_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonAcceptChannelFields_get_delayed_payment_basepoint(long this_ptr);
+ // void CommonAcceptChannelFields_set_delayed_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonAcceptChannelFields_set_delayed_payment_basepoint(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonAcceptChannelFields_get_htlc_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonAcceptChannelFields_get_htlc_basepoint(long this_ptr);
+ // void CommonAcceptChannelFields_set_htlc_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonAcceptChannelFields_set_htlc_basepoint(long this_ptr, byte[] val);
+ // struct LDKPublicKey CommonAcceptChannelFields_get_first_per_commitment_point(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native byte[] CommonAcceptChannelFields_get_first_per_commitment_point(long this_ptr);
+ // void CommonAcceptChannelFields_set_first_per_commitment_point(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void CommonAcceptChannelFields_set_first_per_commitment_point(long this_ptr, byte[] val);
+ // struct LDKCOption_CVec_u8ZZ CommonAcceptChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonAcceptChannelFields_get_shutdown_scriptpubkey(long this_ptr);
+ // void CommonAcceptChannelFields_set_shutdown_scriptpubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
+ public static native void CommonAcceptChannelFields_set_shutdown_scriptpubkey(long this_ptr, long val);
+ // struct LDKChannelTypeFeatures CommonAcceptChannelFields_get_channel_type(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+ public static native long CommonAcceptChannelFields_get_channel_type(long this_ptr);
+ // void CommonAcceptChannelFields_set_channel_type(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
+ public static native void CommonAcceptChannelFields_set_channel_type(long this_ptr, long val);
+ // MUST_USE_RES struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_new(struct LDKChannelId temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
+ public static native long CommonAcceptChannelFields_new(long temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, long shutdown_scriptpubkey_arg, long channel_type_arg);
+ // uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg);
+ public static native long CommonAcceptChannelFields_clone_ptr(long arg);
+ // struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_clone(const struct LDKCommonAcceptChannelFields *NONNULL_PTR orig);
+ public static native long CommonAcceptChannelFields_clone(long orig);
+ // uint64_t CommonAcceptChannelFields_hash(const struct LDKCommonAcceptChannelFields *NONNULL_PTR o);
+ public static native long CommonAcceptChannelFields_hash(long o);
+ // bool CommonAcceptChannelFields_eq(const struct LDKCommonAcceptChannelFields *NONNULL_PTR a, const struct LDKCommonAcceptChannelFields *NONNULL_PTR b);
+ public static native boolean CommonAcceptChannelFields_eq(long a, long b);
// void AcceptChannel_free(struct LDKAcceptChannel this_obj);
public static native void AcceptChannel_free(long this_obj);
- // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
- public static native byte[] AcceptChannel_get_temporary_channel_id(long this_ptr);
- // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void AcceptChannel_set_temporary_channel_id(long this_ptr, byte[] val);
- // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native long AcceptChannel_get_dust_limit_satoshis(long this_ptr);
- // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
- public static native void AcceptChannel_set_dust_limit_satoshis(long this_ptr, long val);
- // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native long AcceptChannel_get_max_htlc_value_in_flight_msat(long this_ptr);
- // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
- public static native void AcceptChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
+ // struct LDKCommonAcceptChannelFields AcceptChannel_get_common_fields(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+ public static native long AcceptChannel_get_common_fields(long this_ptr);
+ // void AcceptChannel_set_common_fields(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val);
+ public static native void AcceptChannel_set_common_fields(long this_ptr, long val);
// uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
public static native long AcceptChannel_get_channel_reserve_satoshis(long this_ptr);
// void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
public static native void AcceptChannel_set_channel_reserve_satoshis(long this_ptr, long val);
- // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native long AcceptChannel_get_htlc_minimum_msat(long this_ptr);
- // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
- public static native void AcceptChannel_set_htlc_minimum_msat(long this_ptr, long val);
- // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native int AcceptChannel_get_minimum_depth(long this_ptr);
- // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
- public static native void AcceptChannel_set_minimum_depth(long this_ptr, int val);
- // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native short AcceptChannel_get_to_self_delay(long this_ptr);
- // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
- public static native void AcceptChannel_set_to_self_delay(long this_ptr, short val);
- // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native short AcceptChannel_get_max_accepted_htlcs(long this_ptr);
- // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
- public static native void AcceptChannel_set_max_accepted_htlcs(long this_ptr, short val);
- // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannel_get_funding_pubkey(long this_ptr);
- // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannel_set_funding_pubkey(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannel_get_revocation_basepoint(long this_ptr);
- // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannel_set_revocation_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannel_get_payment_point(long this_ptr);
- // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannel_set_payment_point(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannel_get_delayed_payment_basepoint(long this_ptr);
- // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannel_get_htlc_basepoint(long this_ptr);
- // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannel_set_htlc_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannel_get_first_per_commitment_point(long this_ptr);
- // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
- // struct LDKCOption_CVec_u8ZZ AcceptChannel_get_shutdown_scriptpubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native long AcceptChannel_get_shutdown_scriptpubkey(long this_ptr);
- // void AcceptChannel_set_shutdown_scriptpubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
- public static native void AcceptChannel_set_shutdown_scriptpubkey(long this_ptr, long val);
- // struct LDKChannelTypeFeatures AcceptChannel_get_channel_type(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
- public static native long AcceptChannel_get_channel_type(long this_ptr);
- // void AcceptChannel_set_channel_type(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
- public static native void AcceptChannel_set_channel_type(long this_ptr, long val);
- // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
- public static native long AcceptChannel_new(byte[] temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, long shutdown_scriptpubkey_arg, long channel_type_arg);
+ // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t channel_reserve_satoshis_arg);
+ public static native long AcceptChannel_new(long common_fields_arg, long channel_reserve_satoshis_arg);
// uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg);
public static native long AcceptChannel_clone_ptr(long arg);
// struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
public static native boolean AcceptChannel_eq(long a, long b);
// void AcceptChannelV2_free(struct LDKAcceptChannelV2 this_obj);
public static native void AcceptChannelV2_free(long this_obj);
- // const uint8_t (*AcceptChannelV2_get_temporary_channel_id(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr))[32];
- public static native byte[] AcceptChannelV2_get_temporary_channel_id(long this_ptr);
- // void AcceptChannelV2_set_temporary_channel_id(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void AcceptChannelV2_set_temporary_channel_id(long this_ptr, byte[] val);
+ // struct LDKCommonAcceptChannelFields AcceptChannelV2_get_common_fields(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+ public static native long AcceptChannelV2_get_common_fields(long this_ptr);
+ // void AcceptChannelV2_set_common_fields(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val);
+ public static native void AcceptChannelV2_set_common_fields(long this_ptr, long val);
// uint64_t AcceptChannelV2_get_funding_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
public static native long AcceptChannelV2_get_funding_satoshis(long this_ptr);
// void AcceptChannelV2_set_funding_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
public static native void AcceptChannelV2_set_funding_satoshis(long this_ptr, long val);
- // uint64_t AcceptChannelV2_get_dust_limit_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native long AcceptChannelV2_get_dust_limit_satoshis(long this_ptr);
- // void AcceptChannelV2_set_dust_limit_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
- public static native void AcceptChannelV2_set_dust_limit_satoshis(long this_ptr, long val);
- // uint64_t AcceptChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native long AcceptChannelV2_get_max_htlc_value_in_flight_msat(long this_ptr);
- // void AcceptChannelV2_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
- public static native void AcceptChannelV2_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
- // uint64_t AcceptChannelV2_get_htlc_minimum_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native long AcceptChannelV2_get_htlc_minimum_msat(long this_ptr);
- // void AcceptChannelV2_set_htlc_minimum_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
- public static native void AcceptChannelV2_set_htlc_minimum_msat(long this_ptr, long val);
- // uint32_t AcceptChannelV2_get_minimum_depth(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native int AcceptChannelV2_get_minimum_depth(long this_ptr);
- // void AcceptChannelV2_set_minimum_depth(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
- public static native void AcceptChannelV2_set_minimum_depth(long this_ptr, int val);
- // uint16_t AcceptChannelV2_get_to_self_delay(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native short AcceptChannelV2_get_to_self_delay(long this_ptr);
- // void AcceptChannelV2_set_to_self_delay(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
- public static native void AcceptChannelV2_set_to_self_delay(long this_ptr, short val);
- // uint16_t AcceptChannelV2_get_max_accepted_htlcs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native short AcceptChannelV2_get_max_accepted_htlcs(long this_ptr);
- // void AcceptChannelV2_set_max_accepted_htlcs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
- public static native void AcceptChannelV2_set_max_accepted_htlcs(long this_ptr, short val);
- // struct LDKPublicKey AcceptChannelV2_get_funding_pubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannelV2_get_funding_pubkey(long this_ptr);
- // void AcceptChannelV2_set_funding_pubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannelV2_set_funding_pubkey(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannelV2_get_revocation_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannelV2_get_revocation_basepoint(long this_ptr);
- // void AcceptChannelV2_set_revocation_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannelV2_set_revocation_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannelV2_get_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannelV2_get_payment_basepoint(long this_ptr);
- // void AcceptChannelV2_set_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannelV2_set_payment_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannelV2_get_delayed_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannelV2_get_delayed_payment_basepoint(long this_ptr);
- // void AcceptChannelV2_set_delayed_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannelV2_set_delayed_payment_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannelV2_get_htlc_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannelV2_get_htlc_basepoint(long this_ptr);
- // void AcceptChannelV2_set_htlc_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannelV2_set_htlc_basepoint(long this_ptr, byte[] val);
- // struct LDKPublicKey AcceptChannelV2_get_first_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native byte[] AcceptChannelV2_get_first_per_commitment_point(long this_ptr);
- // void AcceptChannelV2_set_first_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void AcceptChannelV2_set_first_per_commitment_point(long this_ptr, byte[] val);
// struct LDKPublicKey AcceptChannelV2_get_second_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
public static native byte[] AcceptChannelV2_get_second_per_commitment_point(long this_ptr);
// void AcceptChannelV2_set_second_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native void AcceptChannelV2_set_second_per_commitment_point(long this_ptr, byte[] val);
- // struct LDKCOption_CVec_u8ZZ AcceptChannelV2_get_shutdown_scriptpubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native long AcceptChannelV2_get_shutdown_scriptpubkey(long this_ptr);
- // void AcceptChannelV2_set_shutdown_scriptpubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
- public static native void AcceptChannelV2_set_shutdown_scriptpubkey(long this_ptr, long val);
- // struct LDKChannelTypeFeatures AcceptChannelV2_get_channel_type(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
- public static native long AcceptChannelV2_get_channel_type(long this_ptr);
- // void AcceptChannelV2_set_channel_type(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
- public static native void AcceptChannelV2_set_channel_type(long this_ptr, long val);
// enum LDKCOption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
public static native COption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(long this_ptr);
// void AcceptChannelV2_set_require_confirmed_inputs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
public static native void AcceptChannelV2_set_require_confirmed_inputs(long this_ptr, COption_NoneZ val);
- // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
- public static native long AcceptChannelV2_new(byte[] temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, long shutdown_scriptpubkey_arg, long channel_type_arg, COption_NoneZ require_confirmed_inputs_arg);
+ // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t funding_satoshis_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
+ public static native long AcceptChannelV2_new(long common_fields_arg, long funding_satoshis_arg, byte[] second_per_commitment_point_arg, COption_NoneZ require_confirmed_inputs_arg);
// uint64_t AcceptChannelV2_clone_ptr(LDKAcceptChannelV2 *NONNULL_PTR arg);
public static native long AcceptChannelV2_clone_ptr(long arg);
// struct LDKAcceptChannelV2 AcceptChannelV2_clone(const struct LDKAcceptChannelV2 *NONNULL_PTR orig);
public static native boolean AcceptChannelV2_eq(long a, long b);
// void FundingCreated_free(struct LDKFundingCreated this_obj);
public static native void FundingCreated_free(long this_obj);
- // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
- public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr);
- // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void FundingCreated_set_temporary_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
+ public static native long FundingCreated_get_temporary_channel_id(long this_ptr);
+ // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void FundingCreated_set_temporary_channel_id(long this_ptr, long val);
// const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
public static native byte[] FundingCreated_get_funding_txid(long this_ptr);
// void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
public static native byte[] FundingCreated_get_signature(long this_ptr);
// void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
public static native void FundingCreated_set_signature(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg);
- public static native long FundingCreated_new(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg);
+ // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKChannelId temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg);
+ public static native long FundingCreated_new(long temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg);
// uint64_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg);
public static native long FundingCreated_clone_ptr(long arg);
// struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
public static native boolean FundingCreated_eq(long a, long b);
// void FundingSigned_free(struct LDKFundingSigned this_obj);
public static native void FundingSigned_free(long this_obj);
- // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
- public static native byte[] FundingSigned_get_channel_id(long this_ptr);
- // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void FundingSigned_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
+ public static native long FundingSigned_get_channel_id(long this_ptr);
+ // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void FundingSigned_set_channel_id(long this_ptr, long val);
// struct LDKECDSASignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
public static native byte[] FundingSigned_get_signature(long this_ptr);
// void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
public static native void FundingSigned_set_signature(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg);
- public static native long FundingSigned_new(byte[] channel_id_arg, byte[] signature_arg);
+ // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg);
+ public static native long FundingSigned_new(long channel_id_arg, byte[] signature_arg);
// uint64_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg);
public static native long FundingSigned_clone_ptr(long arg);
// struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
public static native boolean FundingSigned_eq(long a, long b);
// void ChannelReady_free(struct LDKChannelReady this_obj);
public static native void ChannelReady_free(long this_obj);
- // const uint8_t (*ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr))[32];
- public static native byte[] ChannelReady_get_channel_id(long this_ptr);
- // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void ChannelReady_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr);
+ public static native long ChannelReady_get_channel_id(long this_ptr);
+ // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void ChannelReady_set_channel_id(long this_ptr, long val);
// struct LDKPublicKey ChannelReady_get_next_per_commitment_point(const struct LDKChannelReady *NONNULL_PTR this_ptr);
public static native byte[] ChannelReady_get_next_per_commitment_point(long this_ptr);
// void ChannelReady_set_next_per_commitment_point(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native long ChannelReady_get_short_channel_id_alias(long this_ptr);
// void ChannelReady_set_short_channel_id_alias(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
public static native void ChannelReady_set_short_channel_id_alias(long this_ptr, long val);
- // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg);
- public static native long ChannelReady_new(byte[] channel_id_arg, byte[] next_per_commitment_point_arg, long short_channel_id_alias_arg);
+ // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKChannelId channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg);
+ public static native long ChannelReady_new(long channel_id_arg, byte[] next_per_commitment_point_arg, long short_channel_id_alias_arg);
// uint64_t ChannelReady_clone_ptr(LDKChannelReady *NONNULL_PTR arg);
public static native long ChannelReady_clone_ptr(long arg);
// struct LDKChannelReady ChannelReady_clone(const struct LDKChannelReady *NONNULL_PTR orig);
public static native boolean ChannelReady_eq(long a, long b);
// void Stfu_free(struct LDKStfu this_obj);
public static native void Stfu_free(long this_obj);
- // const uint8_t (*Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr))[32];
- public static native byte[] Stfu_get_channel_id(long this_ptr);
- // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void Stfu_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr);
+ public static native long Stfu_get_channel_id(long this_ptr);
+ // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void Stfu_set_channel_id(long this_ptr, long val);
// uint8_t Stfu_get_initiator(const struct LDKStfu *NONNULL_PTR this_ptr);
public static native byte Stfu_get_initiator(long this_ptr);
// void Stfu_set_initiator(struct LDKStfu *NONNULL_PTR this_ptr, uint8_t val);
public static native void Stfu_set_initiator(long this_ptr, byte val);
- // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKThirtyTwoBytes channel_id_arg, uint8_t initiator_arg);
- public static native long Stfu_new(byte[] channel_id_arg, byte initiator_arg);
+ // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKChannelId channel_id_arg, uint8_t initiator_arg);
+ public static native long Stfu_new(long channel_id_arg, byte initiator_arg);
// uint64_t Stfu_clone_ptr(LDKStfu *NONNULL_PTR arg);
public static native long Stfu_clone_ptr(long arg);
// struct LDKStfu Stfu_clone(const struct LDKStfu *NONNULL_PTR orig);
public static native boolean Stfu_eq(long a, long b);
// void Splice_free(struct LDKSplice this_obj);
public static native void Splice_free(long this_obj);
- // const uint8_t (*Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr))[32];
- public static native byte[] Splice_get_channel_id(long this_ptr);
- // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void Splice_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr);
+ public static native long Splice_get_channel_id(long this_ptr);
+ // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void Splice_set_channel_id(long this_ptr, long val);
// const uint8_t (*Splice_get_chain_hash(const struct LDKSplice *NONNULL_PTR this_ptr))[32];
public static native byte[] Splice_get_chain_hash(long this_ptr);
// void Splice_set_chain_hash(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
public static native byte[] Splice_get_funding_pubkey(long this_ptr);
// void Splice_set_funding_pubkey(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native void Splice_set_funding_pubkey(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKSplice Splice_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg);
- public static native long Splice_new(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg);
+ // MUST_USE_RES struct LDKSplice Splice_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg);
+ public static native long Splice_new(long channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg);
// uint64_t Splice_clone_ptr(LDKSplice *NONNULL_PTR arg);
public static native long Splice_clone_ptr(long arg);
// struct LDKSplice Splice_clone(const struct LDKSplice *NONNULL_PTR orig);
public static native boolean Splice_eq(long a, long b);
// void SpliceAck_free(struct LDKSpliceAck this_obj);
public static native void SpliceAck_free(long this_obj);
- // const uint8_t (*SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32];
- public static native byte[] SpliceAck_get_channel_id(long this_ptr);
- // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void SpliceAck_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr);
+ public static native long SpliceAck_get_channel_id(long this_ptr);
+ // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void SpliceAck_set_channel_id(long this_ptr, long val);
// const uint8_t (*SpliceAck_get_chain_hash(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32];
public static native byte[] SpliceAck_get_chain_hash(long this_ptr);
// void SpliceAck_set_chain_hash(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
public static native byte[] SpliceAck_get_funding_pubkey(long this_ptr);
// void SpliceAck_set_funding_pubkey(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native void SpliceAck_set_funding_pubkey(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg);
- public static native long SpliceAck_new(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg);
+ // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg);
+ public static native long SpliceAck_new(long channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg);
// uint64_t SpliceAck_clone_ptr(LDKSpliceAck *NONNULL_PTR arg);
public static native long SpliceAck_clone_ptr(long arg);
// struct LDKSpliceAck SpliceAck_clone(const struct LDKSpliceAck *NONNULL_PTR orig);
public static native boolean SpliceAck_eq(long a, long b);
// void SpliceLocked_free(struct LDKSpliceLocked this_obj);
public static native void SpliceLocked_free(long this_obj);
- // const uint8_t (*SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr))[32];
- public static native byte[] SpliceLocked_get_channel_id(long this_ptr);
- // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void SpliceLocked_set_channel_id(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKThirtyTwoBytes channel_id_arg);
- public static native long SpliceLocked_new(byte[] channel_id_arg);
+ // struct LDKChannelId SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr);
+ public static native long SpliceLocked_get_channel_id(long this_ptr);
+ // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void SpliceLocked_set_channel_id(long this_ptr, long val);
+ // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKChannelId channel_id_arg);
+ public static native long SpliceLocked_new(long channel_id_arg);
// uint64_t SpliceLocked_clone_ptr(LDKSpliceLocked *NONNULL_PTR arg);
public static native long SpliceLocked_clone_ptr(long arg);
// struct LDKSpliceLocked SpliceLocked_clone(const struct LDKSpliceLocked *NONNULL_PTR orig);
public static native boolean SpliceLocked_eq(long a, long b);
// void TxAddInput_free(struct LDKTxAddInput this_obj);
public static native void TxAddInput_free(long this_obj);
- // const uint8_t (*TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr))[32];
- public static native byte[] TxAddInput_get_channel_id(long this_ptr);
- // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void TxAddInput_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr);
+ public static native long TxAddInput_get_channel_id(long this_ptr);
+ // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TxAddInput_set_channel_id(long this_ptr, long val);
// uint64_t TxAddInput_get_serial_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr);
public static native long TxAddInput_get_serial_id(long this_ptr);
// void TxAddInput_set_serial_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, uint64_t val);
public static native int TxAddInput_get_sequence(long this_ptr);
// void TxAddInput_set_sequence(struct LDKTxAddInput *NONNULL_PTR this_ptr, uint32_t val);
public static native void TxAddInput_set_sequence(long this_ptr, int val);
- // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg);
- public static native long TxAddInput_new(byte[] channel_id_arg, long serial_id_arg, long prevtx_arg, int prevtx_out_arg, int sequence_arg);
+ // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg);
+ public static native long TxAddInput_new(long channel_id_arg, long serial_id_arg, long prevtx_arg, int prevtx_out_arg, int sequence_arg);
// uint64_t TxAddInput_clone_ptr(LDKTxAddInput *NONNULL_PTR arg);
public static native long TxAddInput_clone_ptr(long arg);
// struct LDKTxAddInput TxAddInput_clone(const struct LDKTxAddInput *NONNULL_PTR orig);
public static native boolean TxAddInput_eq(long a, long b);
// void TxAddOutput_free(struct LDKTxAddOutput this_obj);
public static native void TxAddOutput_free(long this_obj);
- // const uint8_t (*TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr))[32];
- public static native byte[] TxAddOutput_get_channel_id(long this_ptr);
- // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void TxAddOutput_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr);
+ public static native long TxAddOutput_get_channel_id(long this_ptr);
+ // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TxAddOutput_set_channel_id(long this_ptr, long val);
// uint64_t TxAddOutput_get_serial_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr);
public static native long TxAddOutput_get_serial_id(long this_ptr);
// void TxAddOutput_set_serial_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, uint64_t val);
public static native byte[] TxAddOutput_get_script(long this_ptr);
// void TxAddOutput_set_script(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
public static native void TxAddOutput_set_script(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg);
- public static native long TxAddOutput_new(byte[] channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg);
+ // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg);
+ public static native long TxAddOutput_new(long channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg);
// uint64_t TxAddOutput_clone_ptr(LDKTxAddOutput *NONNULL_PTR arg);
public static native long TxAddOutput_clone_ptr(long arg);
// struct LDKTxAddOutput TxAddOutput_clone(const struct LDKTxAddOutput *NONNULL_PTR orig);
public static native boolean TxAddOutput_eq(long a, long b);
// void TxRemoveInput_free(struct LDKTxRemoveInput this_obj);
public static native void TxRemoveInput_free(long this_obj);
- // const uint8_t (*TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr))[32];
- public static native byte[] TxRemoveInput_get_channel_id(long this_ptr);
- // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void TxRemoveInput_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr);
+ public static native long TxRemoveInput_get_channel_id(long this_ptr);
+ // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TxRemoveInput_set_channel_id(long this_ptr, long val);
// uint64_t TxRemoveInput_get_serial_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr);
public static native long TxRemoveInput_get_serial_id(long this_ptr);
// void TxRemoveInput_set_serial_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, uint64_t val);
public static native void TxRemoveInput_set_serial_id(long this_ptr, long val);
- // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg);
- public static native long TxRemoveInput_new(byte[] channel_id_arg, long serial_id_arg);
+ // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg);
+ public static native long TxRemoveInput_new(long channel_id_arg, long serial_id_arg);
// uint64_t TxRemoveInput_clone_ptr(LDKTxRemoveInput *NONNULL_PTR arg);
public static native long TxRemoveInput_clone_ptr(long arg);
// struct LDKTxRemoveInput TxRemoveInput_clone(const struct LDKTxRemoveInput *NONNULL_PTR orig);
public static native boolean TxRemoveInput_eq(long a, long b);
// void TxRemoveOutput_free(struct LDKTxRemoveOutput this_obj);
public static native void TxRemoveOutput_free(long this_obj);
- // const uint8_t (*TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr))[32];
- public static native byte[] TxRemoveOutput_get_channel_id(long this_ptr);
- // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void TxRemoveOutput_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr);
+ public static native long TxRemoveOutput_get_channel_id(long this_ptr);
+ // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TxRemoveOutput_set_channel_id(long this_ptr, long val);
// uint64_t TxRemoveOutput_get_serial_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr);
public static native long TxRemoveOutput_get_serial_id(long this_ptr);
// void TxRemoveOutput_set_serial_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, uint64_t val);
public static native void TxRemoveOutput_set_serial_id(long this_ptr, long val);
- // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg);
- public static native long TxRemoveOutput_new(byte[] channel_id_arg, long serial_id_arg);
+ // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg);
+ public static native long TxRemoveOutput_new(long channel_id_arg, long serial_id_arg);
// uint64_t TxRemoveOutput_clone_ptr(LDKTxRemoveOutput *NONNULL_PTR arg);
public static native long TxRemoveOutput_clone_ptr(long arg);
// struct LDKTxRemoveOutput TxRemoveOutput_clone(const struct LDKTxRemoveOutput *NONNULL_PTR orig);
public static native boolean TxRemoveOutput_eq(long a, long b);
// void TxComplete_free(struct LDKTxComplete this_obj);
public static native void TxComplete_free(long this_obj);
- // const uint8_t (*TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr))[32];
- public static native byte[] TxComplete_get_channel_id(long this_ptr);
- // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void TxComplete_set_channel_id(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKThirtyTwoBytes channel_id_arg);
- public static native long TxComplete_new(byte[] channel_id_arg);
+ // struct LDKChannelId TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr);
+ public static native long TxComplete_get_channel_id(long this_ptr);
+ // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TxComplete_set_channel_id(long this_ptr, long val);
+ // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKChannelId channel_id_arg);
+ public static native long TxComplete_new(long channel_id_arg);
// uint64_t TxComplete_clone_ptr(LDKTxComplete *NONNULL_PTR arg);
public static native long TxComplete_clone_ptr(long arg);
// struct LDKTxComplete TxComplete_clone(const struct LDKTxComplete *NONNULL_PTR orig);
public static native boolean TxComplete_eq(long a, long b);
// void TxSignatures_free(struct LDKTxSignatures this_obj);
public static native void TxSignatures_free(long this_obj);
- // const uint8_t (*TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32];
- public static native byte[] TxSignatures_get_channel_id(long this_ptr);
- // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void TxSignatures_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr);
+ public static native long TxSignatures_get_channel_id(long this_ptr);
+ // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TxSignatures_set_channel_id(long this_ptr, long val);
// const uint8_t (*TxSignatures_get_tx_hash(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32];
public static native byte[] TxSignatures_get_tx_hash(long this_ptr);
// void TxSignatures_set_tx_hash(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
public static native byte[][] TxSignatures_get_witnesses(long this_ptr);
// void TxSignatures_set_witnesses(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCVec_WitnessZ val);
public static native void TxSignatures_set_witnesses(long this_ptr, byte[][] val);
- // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg);
- public static native long TxSignatures_new(byte[] channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg);
+ // struct LDKCOption_ECDSASignatureZ TxSignatures_get_funding_outpoint_sig(const struct LDKTxSignatures *NONNULL_PTR this_ptr);
+ public static native long TxSignatures_get_funding_outpoint_sig(long this_ptr);
+ // void TxSignatures_set_funding_outpoint_sig(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCOption_ECDSASignatureZ val);
+ public static native void TxSignatures_set_funding_outpoint_sig(long this_ptr, long val);
+ // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg, struct LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg);
+ public static native long TxSignatures_new(long channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg, long funding_outpoint_sig_arg);
// uint64_t TxSignatures_clone_ptr(LDKTxSignatures *NONNULL_PTR arg);
public static native long TxSignatures_clone_ptr(long arg);
// struct LDKTxSignatures TxSignatures_clone(const struct LDKTxSignatures *NONNULL_PTR orig);
public static native boolean TxSignatures_eq(long a, long b);
// void TxInitRbf_free(struct LDKTxInitRbf this_obj);
public static native void TxInitRbf_free(long this_obj);
- // const uint8_t (*TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr))[32];
- public static native byte[] TxInitRbf_get_channel_id(long this_ptr);
- // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void TxInitRbf_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr);
+ public static native long TxInitRbf_get_channel_id(long this_ptr);
+ // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TxInitRbf_set_channel_id(long this_ptr, long val);
// uint32_t TxInitRbf_get_locktime(const struct LDKTxInitRbf *NONNULL_PTR this_ptr);
public static native int TxInitRbf_get_locktime(long this_ptr);
// void TxInitRbf_set_locktime(struct LDKTxInitRbf *NONNULL_PTR this_ptr, uint32_t val);
public static native long TxInitRbf_get_funding_output_contribution(long this_ptr);
// void TxInitRbf_set_funding_output_contribution(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKCOption_i64Z val);
public static native void TxInitRbf_set_funding_output_contribution(long this_ptr, long val);
- // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
- public static native long TxInitRbf_new(byte[] channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, long funding_output_contribution_arg);
+ // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKChannelId channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
+ public static native long TxInitRbf_new(long channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, long funding_output_contribution_arg);
// uint64_t TxInitRbf_clone_ptr(LDKTxInitRbf *NONNULL_PTR arg);
public static native long TxInitRbf_clone_ptr(long arg);
// struct LDKTxInitRbf TxInitRbf_clone(const struct LDKTxInitRbf *NONNULL_PTR orig);
public static native boolean TxInitRbf_eq(long a, long b);
// void TxAckRbf_free(struct LDKTxAckRbf this_obj);
public static native void TxAckRbf_free(long this_obj);
- // const uint8_t (*TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr))[32];
- public static native byte[] TxAckRbf_get_channel_id(long this_ptr);
- // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void TxAckRbf_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr);
+ public static native long TxAckRbf_get_channel_id(long this_ptr);
+ // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TxAckRbf_set_channel_id(long this_ptr, long val);
// struct LDKCOption_i64Z TxAckRbf_get_funding_output_contribution(const struct LDKTxAckRbf *NONNULL_PTR this_ptr);
public static native long TxAckRbf_get_funding_output_contribution(long this_ptr);
// void TxAckRbf_set_funding_output_contribution(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKCOption_i64Z val);
public static native void TxAckRbf_set_funding_output_contribution(long this_ptr, long val);
- // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
- public static native long TxAckRbf_new(byte[] channel_id_arg, long funding_output_contribution_arg);
+ // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKChannelId channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
+ public static native long TxAckRbf_new(long channel_id_arg, long funding_output_contribution_arg);
// uint64_t TxAckRbf_clone_ptr(LDKTxAckRbf *NONNULL_PTR arg);
public static native long TxAckRbf_clone_ptr(long arg);
// struct LDKTxAckRbf TxAckRbf_clone(const struct LDKTxAckRbf *NONNULL_PTR orig);
public static native boolean TxAckRbf_eq(long a, long b);
// void TxAbort_free(struct LDKTxAbort this_obj);
public static native void TxAbort_free(long this_obj);
- // const uint8_t (*TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr))[32];
- public static native byte[] TxAbort_get_channel_id(long this_ptr);
- // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void TxAbort_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr);
+ public static native long TxAbort_get_channel_id(long this_ptr);
+ // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void TxAbort_set_channel_id(long this_ptr, long val);
// struct LDKCVec_u8Z TxAbort_get_data(const struct LDKTxAbort *NONNULL_PTR this_ptr);
public static native byte[] TxAbort_get_data(long this_ptr);
// void TxAbort_set_data(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
public static native void TxAbort_set_data(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
- public static native long TxAbort_new(byte[] channel_id_arg, byte[] data_arg);
+ // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z data_arg);
+ public static native long TxAbort_new(long channel_id_arg, byte[] data_arg);
// uint64_t TxAbort_clone_ptr(LDKTxAbort *NONNULL_PTR arg);
public static native long TxAbort_clone_ptr(long arg);
// struct LDKTxAbort TxAbort_clone(const struct LDKTxAbort *NONNULL_PTR orig);
public static native boolean TxAbort_eq(long a, long b);
// void Shutdown_free(struct LDKShutdown this_obj);
public static native void Shutdown_free(long this_obj);
- // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
- public static native byte[] Shutdown_get_channel_id(long this_ptr);
- // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void Shutdown_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr);
+ public static native long Shutdown_get_channel_id(long this_ptr);
+ // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void Shutdown_set_channel_id(long this_ptr, long val);
// struct LDKCVec_u8Z Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
public static native byte[] Shutdown_get_scriptpubkey(long this_ptr);
// void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
public static native void Shutdown_set_scriptpubkey(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
- public static native long Shutdown_new(byte[] channel_id_arg, byte[] scriptpubkey_arg);
+ // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
+ public static native long Shutdown_new(long channel_id_arg, byte[] scriptpubkey_arg);
// uint64_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg);
public static native long Shutdown_clone_ptr(long arg);
// struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
public static native boolean ClosingSignedFeeRange_eq(long a, long b);
// void ClosingSigned_free(struct LDKClosingSigned this_obj);
public static native void ClosingSigned_free(long this_obj);
- // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
- public static native byte[] ClosingSigned_get_channel_id(long this_ptr);
- // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void ClosingSigned_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
+ public static native long ClosingSigned_get_channel_id(long this_ptr);
+ // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void ClosingSigned_set_channel_id(long this_ptr, long val);
// uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
public static native long ClosingSigned_get_fee_satoshis(long this_ptr);
// void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
public static native long ClosingSigned_get_fee_range(long this_ptr);
// void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
public static native void ClosingSigned_set_fee_range(long this_ptr, long val);
- // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
- public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, long fee_range_arg);
+ // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKChannelId channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
+ public static native long ClosingSigned_new(long channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, long fee_range_arg);
// uint64_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg);
public static native long ClosingSigned_clone_ptr(long arg);
// struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
public static native boolean ClosingSigned_eq(long a, long b);
// void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
public static native void UpdateAddHTLC_free(long this_obj);
- // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
- public static native byte[] UpdateAddHTLC_get_channel_id(long this_ptr);
- // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void UpdateAddHTLC_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
+ public static native long UpdateAddHTLC_get_channel_id(long this_ptr);
+ // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void UpdateAddHTLC_set_channel_id(long this_ptr, long val);
// uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
public static native long UpdateAddHTLC_get_htlc_id(long this_ptr);
// void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
public static native byte[] UpdateAddHTLC_get_blinding_point(long this_ptr);
// void UpdateAddHTLC_set_blinding_point(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native void UpdateAddHTLC_set_blinding_point(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg);
- public static native long UpdateAddHTLC_new(byte[] channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, long skimmed_fee_msat_arg, long onion_routing_packet_arg, byte[] blinding_point_arg);
+ // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg);
+ public static native long UpdateAddHTLC_new(long channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, long skimmed_fee_msat_arg, long onion_routing_packet_arg, byte[] blinding_point_arg);
// uint64_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg);
public static native long UpdateAddHTLC_clone_ptr(long arg);
// struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
public static native boolean OnionMessage_eq(long a, long b);
// void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
public static native void UpdateFulfillHTLC_free(long this_obj);
- // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
- public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr);
- // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
+ public static native long UpdateFulfillHTLC_get_channel_id(long this_ptr);
+ // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, long val);
// uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
public static native long UpdateFulfillHTLC_get_htlc_id(long this_ptr);
// void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
public static native byte[] UpdateFulfillHTLC_get_payment_preimage(long this_ptr);
// void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
public static native void UpdateFulfillHTLC_set_payment_preimage(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
- public static native long UpdateFulfillHTLC_new(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg);
+ // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
+ public static native long UpdateFulfillHTLC_new(long channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg);
// uint64_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg);
public static native long UpdateFulfillHTLC_clone_ptr(long arg);
// struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
public static native boolean UpdateFulfillHTLC_eq(long a, long b);
// void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
public static native void UpdateFailHTLC_free(long this_obj);
- // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
- public static native byte[] UpdateFailHTLC_get_channel_id(long this_ptr);
- // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void UpdateFailHTLC_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
+ public static native long UpdateFailHTLC_get_channel_id(long this_ptr);
+ // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void UpdateFailHTLC_set_channel_id(long this_ptr, long val);
// uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
public static native long UpdateFailHTLC_get_htlc_id(long this_ptr);
// void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
public static native boolean UpdateFailHTLC_eq(long a, long b);
// void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
public static native void UpdateFailMalformedHTLC_free(long this_obj);
- // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
- public static native byte[] UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
- // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
+ public static native long UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
+ // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, long val);
// uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
public static native long UpdateFailMalformedHTLC_get_htlc_id(long this_ptr);
// void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
public static native boolean UpdateFailMalformedHTLC_eq(long a, long b);
// void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
public static native void CommitmentSigned_free(long this_obj);
- // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
- public static native byte[] CommitmentSigned_get_channel_id(long this_ptr);
- // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void CommitmentSigned_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
+ public static native long CommitmentSigned_get_channel_id(long this_ptr);
+ // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void CommitmentSigned_set_channel_id(long this_ptr, long val);
// struct LDKECDSASignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
public static native byte[] CommitmentSigned_get_signature(long this_ptr);
// void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
public static native byte[][] CommitmentSigned_get_htlc_signatures(long this_ptr);
// void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_ECDSASignatureZ val);
public static native void CommitmentSigned_set_htlc_signatures(long this_ptr, byte[][] val);
- // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg);
- public static native long CommitmentSigned_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg);
+ // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg);
+ public static native long CommitmentSigned_new(long channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg);
// uint64_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg);
public static native long CommitmentSigned_clone_ptr(long arg);
// struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
public static native boolean CommitmentSigned_eq(long a, long b);
// void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
public static native void RevokeAndACK_free(long this_obj);
- // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
- public static native byte[] RevokeAndACK_get_channel_id(long this_ptr);
- // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void RevokeAndACK_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
+ public static native long RevokeAndACK_get_channel_id(long this_ptr);
+ // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void RevokeAndACK_set_channel_id(long this_ptr, long val);
// const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
public static native byte[] RevokeAndACK_get_per_commitment_secret(long this_ptr);
// void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
public static native byte[] RevokeAndACK_get_next_per_commitment_point(long this_ptr);
// void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native void RevokeAndACK_set_next_per_commitment_point(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg);
- public static native long RevokeAndACK_new(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg);
+ // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg);
+ public static native long RevokeAndACK_new(long channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg);
// uint64_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg);
public static native long RevokeAndACK_clone_ptr(long arg);
// struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
public static native boolean RevokeAndACK_eq(long a, long b);
// void UpdateFee_free(struct LDKUpdateFee this_obj);
public static native void UpdateFee_free(long this_obj);
- // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
- public static native byte[] UpdateFee_get_channel_id(long this_ptr);
- // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void UpdateFee_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
+ public static native long UpdateFee_get_channel_id(long this_ptr);
+ // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void UpdateFee_set_channel_id(long this_ptr, long val);
// uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
public static native int UpdateFee_get_feerate_per_kw(long this_ptr);
// void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
public static native void UpdateFee_set_feerate_per_kw(long this_ptr, int val);
- // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
- public static native long UpdateFee_new(byte[] channel_id_arg, int feerate_per_kw_arg);
+ // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKChannelId channel_id_arg, uint32_t feerate_per_kw_arg);
+ public static native long UpdateFee_new(long channel_id_arg, int feerate_per_kw_arg);
// uint64_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg);
public static native long UpdateFee_clone_ptr(long arg);
// struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
public static native boolean UpdateFee_eq(long a, long b);
// void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
public static native void ChannelReestablish_free(long this_obj);
- // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
- public static native byte[] ChannelReestablish_get_channel_id(long this_ptr);
- // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void ChannelReestablish_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
+ public static native long ChannelReestablish_get_channel_id(long this_ptr);
+ // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void ChannelReestablish_set_channel_id(long this_ptr, long val);
// uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
public static native long ChannelReestablish_get_next_local_commitment_number(long this_ptr);
// void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
public static native long ChannelReestablish_get_next_funding_txid(long this_ptr);
// void ChannelReestablish_set_next_funding_txid(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
public static native void ChannelReestablish_set_next_funding_txid(long this_ptr, long val);
- // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg);
- public static native long ChannelReestablish_new(byte[] channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, long next_funding_txid_arg);
+ // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKChannelId channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg);
+ public static native long ChannelReestablish_new(long channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, long next_funding_txid_arg);
// uint64_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg);
public static native long ChannelReestablish_clone_ptr(long arg);
// struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
public static native boolean ChannelReestablish_eq(long a, long b);
// void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
public static native void AnnouncementSignatures_free(long this_obj);
- // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
- public static native byte[] AnnouncementSignatures_get_channel_id(long this_ptr);
- // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void AnnouncementSignatures_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
+ public static native long AnnouncementSignatures_get_channel_id(long this_ptr);
+ // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void AnnouncementSignatures_set_channel_id(long this_ptr, long val);
// uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
public static native long AnnouncementSignatures_get_short_channel_id(long this_ptr);
// void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
public static native byte[] AnnouncementSignatures_get_bitcoin_signature(long this_ptr);
// void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
public static native void AnnouncementSignatures_set_bitcoin_signature(long this_ptr, byte[] val);
- // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg);
- public static native long AnnouncementSignatures_new(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg);
+ // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKChannelId channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg);
+ public static native long AnnouncementSignatures_new(long channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg);
// uint64_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg);
public static native long AnnouncementSignatures_clone_ptr(long arg);
// struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
public static native long[] UnsignedNodeAnnouncement_get_addresses(long this_ptr);
// void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_SocketAddressZ val);
public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long[] val);
+ // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_address_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+ public static native byte[] UnsignedNodeAnnouncement_get_excess_address_data(long this_ptr);
+ // void UnsignedNodeAnnouncement_set_excess_address_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+ public static native void UnsignedNodeAnnouncement_set_excess_address_data(long this_ptr, byte[] val);
+ // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+ public static native byte[] UnsignedNodeAnnouncement_get_excess_data(long this_ptr);
+ // void UnsignedNodeAnnouncement_set_excess_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+ public static native void UnsignedNodeAnnouncement_set_excess_data(long this_ptr, byte[] val);
+ // MUST_USE_RES struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_new(struct LDKNodeFeatures features_arg, uint32_t timestamp_arg, struct LDKNodeId node_id_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKCVec_SocketAddressZ addresses_arg, struct LDKCVec_u8Z excess_address_data_arg, struct LDKCVec_u8Z excess_data_arg);
+ public static native long UnsignedNodeAnnouncement_new(long features_arg, int timestamp_arg, long node_id_arg, byte[] rgb_arg, long alias_arg, long[] addresses_arg, byte[] excess_address_data_arg, byte[] excess_data_arg);
// uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
public static native long UnsignedNodeAnnouncement_clone_ptr(long arg);
// struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
public static native long OnionPacket_hash(long o);
// bool OnionPacket_eq(const struct LDKOnionPacket *NONNULL_PTR a, const struct LDKOnionPacket *NONNULL_PTR b);
public static native boolean OnionPacket_eq(long a, long b);
+ // void TrampolineOnionPacket_free(struct LDKTrampolineOnionPacket this_obj);
+ public static native void TrampolineOnionPacket_free(long this_obj);
+ // uint8_t TrampolineOnionPacket_get_version(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr);
+ public static native byte TrampolineOnionPacket_get_version(long this_ptr);
+ // void TrampolineOnionPacket_set_version(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, uint8_t val);
+ public static native void TrampolineOnionPacket_set_version(long this_ptr, byte val);
+ // struct LDKPublicKey TrampolineOnionPacket_get_public_key(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr);
+ public static native byte[] TrampolineOnionPacket_get_public_key(long this_ptr);
+ // void TrampolineOnionPacket_set_public_key(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void TrampolineOnionPacket_set_public_key(long this_ptr, byte[] val);
+ // struct LDKCVec_u8Z TrampolineOnionPacket_get_hop_data(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr);
+ public static native byte[] TrampolineOnionPacket_get_hop_data(long this_ptr);
+ // void TrampolineOnionPacket_set_hop_data(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+ public static native void TrampolineOnionPacket_set_hop_data(long this_ptr, byte[] val);
+ // const uint8_t (*TrampolineOnionPacket_get_hmac(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr))[32];
+ public static native byte[] TrampolineOnionPacket_get_hmac(long this_ptr);
+ // void TrampolineOnionPacket_set_hmac(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ public static native void TrampolineOnionPacket_set_hmac(long this_ptr, byte[] val);
+ // MUST_USE_RES struct LDKTrampolineOnionPacket TrampolineOnionPacket_new(uint8_t version_arg, struct LDKPublicKey public_key_arg, struct LDKCVec_u8Z hop_data_arg, struct LDKThirtyTwoBytes hmac_arg);
+ public static native long TrampolineOnionPacket_new(byte version_arg, byte[] public_key_arg, byte[] hop_data_arg, byte[] hmac_arg);
+ // uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg);
+ public static native long TrampolineOnionPacket_clone_ptr(long arg);
+ // struct LDKTrampolineOnionPacket TrampolineOnionPacket_clone(const struct LDKTrampolineOnionPacket *NONNULL_PTR orig);
+ public static native long TrampolineOnionPacket_clone(long orig);
+ // uint64_t TrampolineOnionPacket_hash(const struct LDKTrampolineOnionPacket *NONNULL_PTR o);
+ public static native long TrampolineOnionPacket_hash(long o);
+ // bool TrampolineOnionPacket_eq(const struct LDKTrampolineOnionPacket *NONNULL_PTR a, const struct LDKTrampolineOnionPacket *NONNULL_PTR b);
+ public static native boolean TrampolineOnionPacket_eq(long a, long b);
+ // struct LDKCVec_u8Z TrampolineOnionPacket_write(const struct LDKTrampolineOnionPacket *NONNULL_PTR obj);
+ public static native byte[] TrampolineOnionPacket_write(long obj);
// struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
public static native byte[] AcceptChannel_write(long obj);
// struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
public static native long SocketDescriptor_clone(long orig);
// void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
public static native void SocketDescriptor_free(long this_ptr);
+ // void PeerDetails_free(struct LDKPeerDetails this_obj);
+ public static native void PeerDetails_free(long this_obj);
+ // struct LDKPublicKey PeerDetails_get_counterparty_node_id(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+ public static native byte[] PeerDetails_get_counterparty_node_id(long this_ptr);
+ // void PeerDetails_set_counterparty_node_id(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void PeerDetails_set_counterparty_node_id(long this_ptr, byte[] val);
+ // struct LDKCOption_SocketAddressZ PeerDetails_get_socket_address(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+ public static native long PeerDetails_get_socket_address(long this_ptr);
+ // void PeerDetails_set_socket_address(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKCOption_SocketAddressZ val);
+ public static native void PeerDetails_set_socket_address(long this_ptr, long val);
+ // struct LDKInitFeatures PeerDetails_get_init_features(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+ public static native long PeerDetails_get_init_features(long this_ptr);
+ // void PeerDetails_set_init_features(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
+ public static native void PeerDetails_set_init_features(long this_ptr, long val);
+ // bool PeerDetails_get_is_inbound_connection(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+ public static native boolean PeerDetails_get_is_inbound_connection(long this_ptr);
+ // void PeerDetails_set_is_inbound_connection(struct LDKPeerDetails *NONNULL_PTR this_ptr, bool val);
+ public static native void PeerDetails_set_is_inbound_connection(long this_ptr, boolean val);
+ // MUST_USE_RES struct LDKPeerDetails PeerDetails_new(struct LDKPublicKey counterparty_node_id_arg, struct LDKCOption_SocketAddressZ socket_address_arg, struct LDKInitFeatures init_features_arg, bool is_inbound_connection_arg);
+ public static native long PeerDetails_new(byte[] counterparty_node_id_arg, long socket_address_arg, long init_features_arg, boolean is_inbound_connection_arg);
// void PeerHandleError_free(struct LDKPeerHandleError this_obj);
public static native void PeerHandleError_free(long this_obj);
// MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(void);
public static native void PeerManager_free(long this_obj);
// MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, uint32_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKNodeSigner node_signer);
public static native long PeerManager_new(long message_handler, int current_time, byte[] ephemeral_random_data, long logger, long node_signer);
- // MUST_USE_RES struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
- public static native long[] PeerManager_get_peer_node_ids(long this_arg);
+ // MUST_USE_RES struct LDKCVec_PeerDetailsZ PeerManager_list_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
+ public static native long[] PeerManager_list_peers(long this_arg);
+ // MUST_USE_RES struct LDKPeerDetails PeerManager_peer_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id);
+ public static native long PeerManager_peer_by_node_id(long this_arg, byte[] their_node_id);
// MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address);
public static native long PeerManager_new_outbound_connection(long this_arg, byte[] their_node_id, long descriptor, long remote_network_address);
// MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address);
public static native boolean NodeFeatures_supports_keysend(long this_arg);
// MUST_USE_RES bool NodeFeatures_requires_keysend(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
public static native boolean NodeFeatures_requires_keysend(long this_arg);
+ // void InitFeatures_set_trampoline_routing_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+ public static native void InitFeatures_set_trampoline_routing_optional(long this_arg);
+ // void InitFeatures_set_trampoline_routing_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+ public static native void InitFeatures_set_trampoline_routing_required(long this_arg);
+ // MUST_USE_RES bool InitFeatures_supports_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+ public static native boolean InitFeatures_supports_trampoline_routing(long this_arg);
+ // void NodeFeatures_set_trampoline_routing_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ public static native void NodeFeatures_set_trampoline_routing_optional(long this_arg);
+ // void NodeFeatures_set_trampoline_routing_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ public static native void NodeFeatures_set_trampoline_routing_required(long this_arg);
+ // MUST_USE_RES bool NodeFeatures_supports_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ public static native boolean NodeFeatures_supports_trampoline_routing(long this_arg);
+ // void Bolt11InvoiceFeatures_set_trampoline_routing_optional(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+ public static native void Bolt11InvoiceFeatures_set_trampoline_routing_optional(long this_arg);
+ // void Bolt11InvoiceFeatures_set_trampoline_routing_required(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+ public static native void Bolt11InvoiceFeatures_set_trampoline_routing_required(long this_arg);
+ // MUST_USE_RES bool Bolt11InvoiceFeatures_supports_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+ public static native boolean Bolt11InvoiceFeatures_supports_trampoline_routing(long this_arg);
+ // MUST_USE_RES bool InitFeatures_requires_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+ public static native boolean InitFeatures_requires_trampoline_routing(long this_arg);
+ // MUST_USE_RES bool NodeFeatures_requires_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ public static native boolean NodeFeatures_requires_trampoline_routing(long this_arg);
+ // MUST_USE_RES bool Bolt11InvoiceFeatures_requires_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+ public static native boolean Bolt11InvoiceFeatures_requires_trampoline_routing(long this_arg);
// void ShutdownScript_free(struct LDKShutdownScript this_obj);
public static native void ShutdownScript_free(long this_obj);
// uint64_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
public static native byte[] ShutdownScript_as_legacy_pubkey(long this_arg);
// MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
public static native boolean ShutdownScript_is_compatible(long this_arg, long features);
+ // void ChannelId_free(struct LDKChannelId this_obj);
+ public static native void ChannelId_free(long this_obj);
+ // const uint8_t (*ChannelId_get_a(const struct LDKChannelId *NONNULL_PTR this_ptr))[32];
+ public static native byte[] ChannelId_get_a(long this_ptr);
+ // void ChannelId_set_a(struct LDKChannelId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ public static native void ChannelId_set_a(long this_ptr, byte[] val);
+ // MUST_USE_RES struct LDKChannelId ChannelId_new(struct LDKThirtyTwoBytes a_arg);
+ public static native long ChannelId_new(byte[] a_arg);
+ // uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg);
+ public static native long ChannelId_clone_ptr(long arg);
+ // struct LDKChannelId ChannelId_clone(const struct LDKChannelId *NONNULL_PTR orig);
+ public static native long ChannelId_clone(long orig);
+ // bool ChannelId_eq(const struct LDKChannelId *NONNULL_PTR a, const struct LDKChannelId *NONNULL_PTR b);
+ public static native boolean ChannelId_eq(long a, long b);
+ // uint64_t ChannelId_hash(const struct LDKChannelId *NONNULL_PTR o);
+ public static native long ChannelId_hash(long o);
+ // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_txid(const uint8_t (*txid)[32], uint16_t output_index);
+ public static native long ChannelId_v1_from_funding_txid(byte[] txid, short output_index);
+ // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_outpoint(struct LDKOutPoint outpoint);
+ public static native long ChannelId_v1_from_funding_outpoint(long outpoint);
+ // MUST_USE_RES struct LDKChannelId ChannelId_temporary_from_entropy_source(const struct LDKEntropySource *NONNULL_PTR entropy_source);
+ public static native long ChannelId_temporary_from_entropy_source(long entropy_source);
+ // MUST_USE_RES struct LDKChannelId ChannelId_from_bytes(struct LDKThirtyTwoBytes data);
+ public static native long ChannelId_from_bytes(byte[] data);
+ // MUST_USE_RES struct LDKChannelId ChannelId_new_zero(void);
+ public static native long ChannelId_new_zero();
+ // MUST_USE_RES bool ChannelId_is_zero(const struct LDKChannelId *NONNULL_PTR this_arg);
+ public static native boolean ChannelId_is_zero(long this_arg);
+ // MUST_USE_RES struct LDKChannelId ChannelId_v2_from_revocation_basepoints(const struct LDKRevocationBasepoint *NONNULL_PTR ours, const struct LDKRevocationBasepoint *NONNULL_PTR theirs);
+ public static native long ChannelId_v2_from_revocation_basepoints(long ours, long theirs);
+ // MUST_USE_RES struct LDKChannelId ChannelId_temporary_v2_from_revocation_basepoint(const struct LDKRevocationBasepoint *NONNULL_PTR our_revocation_basepoint);
+ public static native long ChannelId_temporary_v2_from_revocation_basepoint(long our_revocation_basepoint);
+ // struct LDKCVec_u8Z ChannelId_write(const struct LDKChannelId *NONNULL_PTR obj);
+ public static native byte[] ChannelId_write(long obj);
+ // struct LDKCResult_ChannelIdDecodeErrorZ ChannelId_read(struct LDKu8slice ser);
+ public static native long ChannelId_read(byte[] ser);
// void Retry_free(struct LDKRetry this_ptr);
public static native void Retry_free(long this_ptr);
// uint64_t Retry_clone_ptr(LDKRetry *NONNULL_PTR arg);
public static native long Type_clone(long orig);
// void Type_free(struct LDKType this_ptr);
public static native void Type_free(long this_ptr);
+ // void OfferId_free(struct LDKOfferId this_obj);
+ public static native void OfferId_free(long this_obj);
+ // const uint8_t (*OfferId_get_a(const struct LDKOfferId *NONNULL_PTR this_ptr))[32];
+ public static native byte[] OfferId_get_a(long this_ptr);
+ // void OfferId_set_a(struct LDKOfferId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ public static native void OfferId_set_a(long this_ptr, byte[] val);
+ // MUST_USE_RES struct LDKOfferId OfferId_new(struct LDKThirtyTwoBytes a_arg);
+ public static native long OfferId_new(byte[] a_arg);
+ // uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg);
+ public static native long OfferId_clone_ptr(long arg);
+ // struct LDKOfferId OfferId_clone(const struct LDKOfferId *NONNULL_PTR orig);
+ public static native long OfferId_clone(long orig);
+ // bool OfferId_eq(const struct LDKOfferId *NONNULL_PTR a, const struct LDKOfferId *NONNULL_PTR b);
+ public static native boolean OfferId_eq(long a, long b);
+ // struct LDKCVec_u8Z OfferId_write(const struct LDKOfferId *NONNULL_PTR obj);
+ public static native byte[] OfferId_write(long obj);
+ // struct LDKCResult_OfferIdDecodeErrorZ OfferId_read(struct LDKu8slice ser);
+ public static native long OfferId_read(byte[] ser);
+ // void OfferWithExplicitMetadataBuilder_free(struct LDKOfferWithExplicitMetadataBuilder this_obj);
+ public static native void OfferWithExplicitMetadataBuilder_free(long this_obj);
+ // uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg);
+ public static native long OfferWithExplicitMetadataBuilder_clone_ptr(long arg);
+ // struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_clone(const struct LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR orig);
+ public static native long OfferWithExplicitMetadataBuilder_clone(long orig);
+ // void OfferWithDerivedMetadataBuilder_free(struct LDKOfferWithDerivedMetadataBuilder this_obj);
+ public static native void OfferWithDerivedMetadataBuilder_free(long this_obj);
+ // uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg);
+ public static native long OfferWithDerivedMetadataBuilder_clone_ptr(long arg);
+ // struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_clone(const struct LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR orig);
+ public static native long OfferWithDerivedMetadataBuilder_clone(long orig);
+ // MUST_USE_RES struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_new(struct LDKPublicKey signing_pubkey);
+ public static native long OfferWithExplicitMetadataBuilder_new(byte[] signing_pubkey);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_metadata(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKCVec_u8Z metadata);
+ public static native long OfferWithExplicitMetadataBuilder_metadata(long this_arg, byte[] metadata);
+ // MUST_USE_RES void OfferWithExplicitMetadataBuilder_chain(struct LDKOfferWithExplicitMetadataBuilder this_arg, enum LDKNetwork network);
+ public static native void OfferWithExplicitMetadataBuilder_chain(long this_arg, Network network);
+ // MUST_USE_RES void OfferWithExplicitMetadataBuilder_amount_msats(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t amount_msats);
+ public static native void OfferWithExplicitMetadataBuilder_amount_msats(long this_arg, long amount_msats);
+ // MUST_USE_RES void OfferWithExplicitMetadataBuilder_absolute_expiry(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t absolute_expiry);
+ public static native void OfferWithExplicitMetadataBuilder_absolute_expiry(long this_arg, long absolute_expiry);
+ // MUST_USE_RES void OfferWithExplicitMetadataBuilder_description(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr description);
+ public static native void OfferWithExplicitMetadataBuilder_description(long this_arg, String description);
+ // MUST_USE_RES void OfferWithExplicitMetadataBuilder_issuer(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr issuer);
+ public static native void OfferWithExplicitMetadataBuilder_issuer(long this_arg, String issuer);
+ // MUST_USE_RES void OfferWithExplicitMetadataBuilder_path(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKBlindedPath path);
+ public static native void OfferWithExplicitMetadataBuilder_path(long this_arg, long path);
+ // MUST_USE_RES void OfferWithExplicitMetadataBuilder_supported_quantity(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKQuantity quantity);
+ public static native void OfferWithExplicitMetadataBuilder_supported_quantity(long this_arg, long quantity);
+ // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_build(struct LDKOfferWithExplicitMetadataBuilder this_arg);
+ public static native long OfferWithExplicitMetadataBuilder_build(long this_arg);
+ // MUST_USE_RES struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source);
+ public static native long OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(byte[] node_id, long expanded_key, long entropy_source);
+ // MUST_USE_RES void OfferWithDerivedMetadataBuilder_chain(struct LDKOfferWithDerivedMetadataBuilder this_arg, enum LDKNetwork network);
+ public static native void OfferWithDerivedMetadataBuilder_chain(long this_arg, Network network);
+ // MUST_USE_RES void OfferWithDerivedMetadataBuilder_amount_msats(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t amount_msats);
+ public static native void OfferWithDerivedMetadataBuilder_amount_msats(long this_arg, long amount_msats);
+ // MUST_USE_RES void OfferWithDerivedMetadataBuilder_absolute_expiry(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry);
+ public static native void OfferWithDerivedMetadataBuilder_absolute_expiry(long this_arg, long absolute_expiry);
+ // MUST_USE_RES void OfferWithDerivedMetadataBuilder_description(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr description);
+ public static native void OfferWithDerivedMetadataBuilder_description(long this_arg, String description);
+ // MUST_USE_RES void OfferWithDerivedMetadataBuilder_issuer(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr issuer);
+ public static native void OfferWithDerivedMetadataBuilder_issuer(long this_arg, String issuer);
+ // MUST_USE_RES void OfferWithDerivedMetadataBuilder_path(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path);
+ public static native void OfferWithDerivedMetadataBuilder_path(long this_arg, long path);
+ // MUST_USE_RES void OfferWithDerivedMetadataBuilder_supported_quantity(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKQuantity quantity);
+ public static native void OfferWithDerivedMetadataBuilder_supported_quantity(long this_arg, long quantity);
+ // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithDerivedMetadataBuilder_build(struct LDKOfferWithDerivedMetadataBuilder this_arg);
+ public static native long OfferWithDerivedMetadataBuilder_build(long this_arg);
// void Offer_free(struct LDKOffer this_obj);
public static native void Offer_free(long this_obj);
// uint64_t Offer_clone_ptr(LDKOffer *NONNULL_PTR arg);
public static native byte[][] Offer_chains(long this_arg);
// MUST_USE_RES struct LDKCOption_CVec_u8ZZ Offer_metadata(const struct LDKOffer *NONNULL_PTR this_arg);
public static native long Offer_metadata(long this_arg);
- // MUST_USE_RES struct LDKAmount Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg);
+ // MUST_USE_RES struct LDKCOption_AmountZ Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg);
public static native long Offer_amount(long this_arg);
// MUST_USE_RES struct LDKPrintableString Offer_description(const struct LDKOffer *NONNULL_PTR this_arg);
public static native long Offer_description(long this_arg);
public static native long Offer_supported_quantity(long this_arg);
// MUST_USE_RES struct LDKPublicKey Offer_signing_pubkey(const struct LDKOffer *NONNULL_PTR this_arg);
public static native byte[] Offer_signing_pubkey(long this_arg);
+ // MUST_USE_RES struct LDKOfferId Offer_id(const struct LDKOffer *NONNULL_PTR this_arg);
+ public static native long Offer_id(long this_arg);
// MUST_USE_RES bool Offer_supports_chain(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes chain);
public static native boolean Offer_supports_chain(long this_arg, byte[] chain);
// MUST_USE_RES bool Offer_is_expired(const struct LDKOffer *NONNULL_PTR this_arg);
public static native boolean Offer_is_valid_quantity(long this_arg, long quantity);
// MUST_USE_RES bool Offer_expects_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
public static native boolean Offer_expects_quantity(long this_arg);
+ // MUST_USE_RES struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_payer_id(const struct LDKOffer *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id);
+ public static native long Offer_request_invoice_deriving_payer_id(long this_arg, long expanded_key, long entropy_source, byte[] payment_id);
+ // MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_metadata(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKPublicKey payer_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id);
+ public static native long Offer_request_invoice_deriving_metadata(long this_arg, byte[] payer_id, long expanded_key, long entropy_source, byte[] payment_id);
+ // MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id);
+ public static native long Offer_request_invoice(long this_arg, byte[] metadata, byte[] payer_id);
+ // uint64_t Offer_hash(const struct LDKOffer *NONNULL_PTR o);
+ public static native long Offer_hash(long o);
// struct LDKCVec_u8Z Offer_write(const struct LDKOffer *NONNULL_PTR obj);
public static native byte[] Offer_write(long obj);
- // void Amount_free(struct LDKAmount this_obj);
- public static native void Amount_free(long this_obj);
+ // void Amount_free(struct LDKAmount this_ptr);
+ public static native void Amount_free(long this_ptr);
// uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg);
public static native long Amount_clone_ptr(long arg);
// struct LDKAmount Amount_clone(const struct LDKAmount *NONNULL_PTR orig);
public static native long Amount_clone(long orig);
- // void Quantity_free(struct LDKQuantity this_obj);
- public static native void Quantity_free(long this_obj);
+ // struct LDKAmount Amount_bitcoin(uint64_t amount_msats);
+ public static native long Amount_bitcoin(long amount_msats);
+ // struct LDKAmount Amount_currency(struct LDKThreeBytes iso4217_code, uint64_t amount);
+ public static native long Amount_currency(byte[] iso4217_code, long amount);
+ // void Quantity_free(struct LDKQuantity this_ptr);
+ public static native void Quantity_free(long this_ptr);
// uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg);
public static native long Quantity_clone_ptr(long arg);
// struct LDKQuantity Quantity_clone(const struct LDKQuantity *NONNULL_PTR orig);
public static native long Quantity_clone(long orig);
+ // struct LDKQuantity Quantity_bounded(uint64_t a);
+ public static native long Quantity_bounded(long a);
+ // struct LDKQuantity Quantity_unbounded(void);
+ public static native long Quantity_unbounded();
+ // struct LDKQuantity Quantity_one(void);
+ public static native long Quantity_one();
// struct LDKCResult_OfferBolt12ParseErrorZ Offer_from_str(struct LDKStr s);
public static native long Offer_from_str(String s);
+ // void InvoiceWithExplicitSigningPubkeyBuilder_free(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj);
+ public static native void InvoiceWithExplicitSigningPubkeyBuilder_free(long this_obj);
+ // void InvoiceWithDerivedSigningPubkeyBuilder_free(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj);
+ public static native void InvoiceWithDerivedSigningPubkeyBuilder_free(long this_obj);
+ // MUST_USE_RES struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ InvoiceWithExplicitSigningPubkeyBuilder_build(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg);
+ public static native long InvoiceWithExplicitSigningPubkeyBuilder_build(long this_arg);
+ // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs);
+ public static native void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(long this_arg, int relative_expiry_secs);
+ // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]);
+ public static native void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(long this_arg, byte[] script_hash);
+ // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]);
+ public static native void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(long this_arg, byte[] pubkey_hash);
+ // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key);
+ public static native void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(long this_arg, byte[] utput_key);
+ // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg);
+ public static native void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(long this_arg);
+ // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg);
+ public static native long InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(long this_arg);
+ // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs);
+ public static native void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(long this_arg, int relative_expiry_secs);
+ // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]);
+ public static native void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(long this_arg, byte[] script_hash);
+ // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]);
+ public static native void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(long this_arg, byte[] pubkey_hash);
+ // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key);
+ public static native void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(long this_arg, byte[] utput_key);
+ // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg);
+ public static native void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(long this_arg);
// void UnsignedBolt12Invoice_free(struct LDKUnsignedBolt12Invoice this_obj);
public static native void UnsignedBolt12Invoice_free(long this_obj);
+ // uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg);
+ public static native long UnsignedBolt12Invoice_clone_ptr(long arg);
+ // struct LDKUnsignedBolt12Invoice UnsignedBolt12Invoice_clone(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR orig);
+ public static native long UnsignedBolt12Invoice_clone(long orig);
+ // void SignBolt12InvoiceFn_free(struct LDKSignBolt12InvoiceFn this_ptr);
+ public static native void SignBolt12InvoiceFn_free(long this_ptr);
// MUST_USE_RES struct LDKTaggedHash UnsignedBolt12Invoice_tagged_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
public static native long UnsignedBolt12Invoice_tagged_hash(long this_arg);
// void Bolt12Invoice_free(struct LDKBolt12Invoice this_obj);
public static native byte[] UnsignedBolt12Invoice_chain(long this_arg);
// MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedBolt12Invoice_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
public static native long UnsignedBolt12Invoice_metadata(long this_arg);
- // MUST_USE_RES struct LDKAmount UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+ // MUST_USE_RES struct LDKCOption_AmountZ UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
public static native long UnsignedBolt12Invoice_amount(long this_arg);
// MUST_USE_RES struct LDKOfferFeatures UnsignedBolt12Invoice_offer_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
public static native long UnsignedBolt12Invoice_offer_features(long this_arg);
public static native long UnsignedBolt12Invoice_issuer(long this_arg);
// MUST_USE_RES struct LDKCVec_BlindedPathZ UnsignedBolt12Invoice_message_paths(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
public static native long[] UnsignedBolt12Invoice_message_paths(long this_arg);
- // MUST_USE_RES struct LDKQuantity UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+ // MUST_USE_RES struct LDKCOption_QuantityZ UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
public static native long UnsignedBolt12Invoice_supported_quantity(long this_arg);
// MUST_USE_RES struct LDKu8slice UnsignedBolt12Invoice_payer_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
public static native byte[] UnsignedBolt12Invoice_payer_metadata(long this_arg);
public static native byte[] Bolt12Invoice_chain(long this_arg);
// MUST_USE_RES struct LDKCOption_CVec_u8ZZ Bolt12Invoice_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
public static native long Bolt12Invoice_metadata(long this_arg);
- // MUST_USE_RES struct LDKAmount Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+ // MUST_USE_RES struct LDKCOption_AmountZ Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
public static native long Bolt12Invoice_amount(long this_arg);
// MUST_USE_RES struct LDKOfferFeatures Bolt12Invoice_offer_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
public static native long Bolt12Invoice_offer_features(long this_arg);
public static native long Bolt12Invoice_issuer(long this_arg);
// MUST_USE_RES struct LDKCVec_BlindedPathZ Bolt12Invoice_message_paths(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
public static native long[] Bolt12Invoice_message_paths(long this_arg);
- // MUST_USE_RES struct LDKQuantity Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+ // MUST_USE_RES struct LDKCOption_QuantityZ Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
public static native long Bolt12Invoice_supported_quantity(long this_arg);
// MUST_USE_RES struct LDKu8slice Bolt12Invoice_payer_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
public static native byte[] Bolt12Invoice_payer_metadata(long this_arg);
public static native byte[] Bolt12Invoice_signable_hash(long this_arg);
// MUST_USE_RES struct LDKCResult_ThirtyTwoBytesNoneZ Bolt12Invoice_verify(const struct LDKBolt12Invoice *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
public static native long Bolt12Invoice_verify(long this_arg, long key);
+ // uint64_t Bolt12Invoice_hash(const struct LDKBolt12Invoice *NONNULL_PTR o);
+ public static native long Bolt12Invoice_hash(long o);
// struct LDKCVec_u8Z UnsignedBolt12Invoice_write(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR obj);
public static native byte[] UnsignedBolt12Invoice_write(long obj);
// struct LDKCVec_u8Z Bolt12Invoice_write(const struct LDKBolt12Invoice *NONNULL_PTR obj);
public static native byte[] InvoiceError_write(long obj);
// struct LDKCResult_InvoiceErrorDecodeErrorZ InvoiceError_read(struct LDKu8slice ser);
public static native long InvoiceError_read(byte[] ser);
+ // void InvoiceRequestWithExplicitPayerIdBuilder_free(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj);
+ public static native void InvoiceRequestWithExplicitPayerIdBuilder_free(long this_obj);
+ // void InvoiceRequestWithDerivedPayerIdBuilder_free(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj);
+ public static native void InvoiceRequestWithDerivedPayerIdBuilder_free(long this_obj);
+ // MUST_USE_RES struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_build(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg);
+ public static native long InvoiceRequestWithExplicitPayerIdBuilder_build(long this_arg);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_chain(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, enum LDKNetwork network);
+ public static native long InvoiceRequestWithExplicitPayerIdBuilder_chain(long this_arg, Network network);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t amount_msats);
+ public static native long InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(long this_arg, long amount_msats);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_quantity(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t quantity);
+ public static native long InvoiceRequestWithExplicitPayerIdBuilder_quantity(long this_arg, long quantity);
+ // MUST_USE_RES void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, struct LDKStr payer_note);
+ public static native void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(long this_arg, String payer_note);
+ // MUST_USE_RES struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg);
+ public static native long InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(long this_arg);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_chain(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, enum LDKNetwork network);
+ public static native long InvoiceRequestWithDerivedPayerIdBuilder_chain(long this_arg, Network network);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t amount_msats);
+ public static native long InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(long this_arg, long amount_msats);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_quantity(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t quantity);
+ public static native long InvoiceRequestWithDerivedPayerIdBuilder_quantity(long this_arg, long quantity);
+ // MUST_USE_RES void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, struct LDKStr payer_note);
+ public static native void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(long this_arg, String payer_note);
// void UnsignedInvoiceRequest_free(struct LDKUnsignedInvoiceRequest this_obj);
public static native void UnsignedInvoiceRequest_free(long this_obj);
+ // uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg);
+ public static native long UnsignedInvoiceRequest_clone_ptr(long arg);
+ // struct LDKUnsignedInvoiceRequest UnsignedInvoiceRequest_clone(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR orig);
+ public static native long UnsignedInvoiceRequest_clone(long orig);
+ // void SignInvoiceRequestFn_free(struct LDKSignInvoiceRequestFn this_ptr);
+ public static native void SignInvoiceRequestFn_free(long this_ptr);
// MUST_USE_RES struct LDKTaggedHash UnsignedInvoiceRequest_tagged_hash(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
public static native long UnsignedInvoiceRequest_tagged_hash(long this_arg);
// void InvoiceRequest_free(struct LDKInvoiceRequest this_obj);
public static native long InvoiceRequest_clone(long orig);
// void VerifiedInvoiceRequest_free(struct LDKVerifiedInvoiceRequest this_obj);
public static native void VerifiedInvoiceRequest_free(long this_obj);
+ // struct LDKOfferId VerifiedInvoiceRequest_get_offer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr);
+ public static native long VerifiedInvoiceRequest_get_offer_id(long this_ptr);
+ // void VerifiedInvoiceRequest_set_offer_id(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKOfferId val);
+ public static native void VerifiedInvoiceRequest_set_offer_id(long this_ptr, long val);
// struct LDKCOption_SecretKeyZ VerifiedInvoiceRequest_get_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr);
public static native long VerifiedInvoiceRequest_get_keys(long this_ptr);
// void VerifiedInvoiceRequest_set_keys(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKCOption_SecretKeyZ val);
public static native byte[][] UnsignedInvoiceRequest_chains(long this_arg);
// MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedInvoiceRequest_metadata(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
public static native long UnsignedInvoiceRequest_metadata(long this_arg);
- // MUST_USE_RES struct LDKAmount UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+ // MUST_USE_RES struct LDKCOption_AmountZ UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
public static native long UnsignedInvoiceRequest_amount(long this_arg);
// MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_description(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
public static native long UnsignedInvoiceRequest_description(long this_arg);
public static native byte[][] InvoiceRequest_chains(long this_arg);
// MUST_USE_RES struct LDKCOption_CVec_u8ZZ InvoiceRequest_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
public static native long InvoiceRequest_metadata(long this_arg);
- // MUST_USE_RES struct LDKAmount InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+ // MUST_USE_RES struct LDKCOption_AmountZ InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
public static native long InvoiceRequest_amount(long this_arg);
// MUST_USE_RES struct LDKPrintableString InvoiceRequest_description(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
public static native long InvoiceRequest_description(long this_arg);
public static native byte[] InvoiceRequest_payer_id(long this_arg);
// MUST_USE_RES struct LDKPrintableString InvoiceRequest_payer_note(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
public static native long InvoiceRequest_payer_note(long this_arg);
- // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
- public static native byte[] InvoiceRequest_signature(long this_arg);
+ // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
+ public static native long InvoiceRequest_respond_with(long this_arg, long[] payment_paths, byte[] payment_hash);
+ // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with_no_std(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
+ public static native long InvoiceRequest_respond_with_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at);
// MUST_USE_RES struct LDKCResult_VerifiedInvoiceRequestNoneZ InvoiceRequest_verify(struct LDKInvoiceRequest this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
public static native long InvoiceRequest_verify(long this_arg, long key);
+ // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+ public static native byte[] InvoiceRequest_signature(long this_arg);
// MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ VerifiedInvoiceRequest_chains(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
public static native byte[][] VerifiedInvoiceRequest_chains(long this_arg);
// MUST_USE_RES struct LDKCOption_CVec_u8ZZ VerifiedInvoiceRequest_metadata(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
public static native long VerifiedInvoiceRequest_metadata(long this_arg);
- // MUST_USE_RES struct LDKAmount VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+ // MUST_USE_RES struct LDKCOption_AmountZ VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
public static native long VerifiedInvoiceRequest_amount(long this_arg);
// MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_description(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
public static native long VerifiedInvoiceRequest_description(long this_arg);
public static native byte[] VerifiedInvoiceRequest_payer_id(long this_arg);
// MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_payer_note(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
public static native long VerifiedInvoiceRequest_payer_note(long this_arg);
+ // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
+ public static native long VerifiedInvoiceRequest_respond_with(long this_arg, long[] payment_paths, byte[] payment_hash);
+ // MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
+ public static native long VerifiedInvoiceRequest_respond_with_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at);
+ // MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
+ public static native long VerifiedInvoiceRequest_respond_using_derived_keys(long this_arg, long[] payment_paths, byte[] payment_hash);
+ // MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
+ public static native long VerifiedInvoiceRequest_respond_using_derived_keys_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at);
// struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
public static native byte[] UnsignedInvoiceRequest_write(long obj);
// struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);
public static native byte[] InvoiceRequest_write(long obj);
+ // void InvoiceRequestFields_free(struct LDKInvoiceRequestFields this_obj);
+ public static native void InvoiceRequestFields_free(long this_obj);
+ // struct LDKPublicKey InvoiceRequestFields_get_payer_id(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+ public static native byte[] InvoiceRequestFields_get_payer_id(long this_ptr);
+ // void InvoiceRequestFields_set_payer_id(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ public static native void InvoiceRequestFields_set_payer_id(long this_ptr, byte[] val);
+ // struct LDKCOption_u64Z InvoiceRequestFields_get_quantity(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+ public static native long InvoiceRequestFields_get_quantity(long this_ptr);
+ // void InvoiceRequestFields_set_quantity(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ public static native void InvoiceRequestFields_set_quantity(long this_ptr, long val);
+ // struct LDKUntrustedString InvoiceRequestFields_get_payer_note_truncated(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+ public static native long InvoiceRequestFields_get_payer_note_truncated(long this_ptr);
+ // void InvoiceRequestFields_set_payer_note_truncated(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKUntrustedString val);
+ public static native void InvoiceRequestFields_set_payer_note_truncated(long this_ptr, long val);
+ // MUST_USE_RES struct LDKInvoiceRequestFields InvoiceRequestFields_new(struct LDKPublicKey payer_id_arg, struct LDKCOption_u64Z quantity_arg, struct LDKUntrustedString payer_note_truncated_arg);
+ public static native long InvoiceRequestFields_new(byte[] payer_id_arg, long quantity_arg, long payer_note_truncated_arg);
+ // uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg);
+ public static native long InvoiceRequestFields_clone_ptr(long arg);
+ // struct LDKInvoiceRequestFields InvoiceRequestFields_clone(const struct LDKInvoiceRequestFields *NONNULL_PTR orig);
+ public static native long InvoiceRequestFields_clone(long orig);
+ // bool InvoiceRequestFields_eq(const struct LDKInvoiceRequestFields *NONNULL_PTR a, const struct LDKInvoiceRequestFields *NONNULL_PTR b);
+ public static native boolean InvoiceRequestFields_eq(long a, long b);
+ // struct LDKCVec_u8Z InvoiceRequestFields_write(const struct LDKInvoiceRequestFields *NONNULL_PTR obj);
+ public static native byte[] InvoiceRequestFields_write(long obj);
+ // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ InvoiceRequestFields_read(struct LDKu8slice ser);
+ public static native long InvoiceRequestFields_read(byte[] ser);
// void TaggedHash_free(struct LDKTaggedHash this_obj);
public static native void TaggedHash_free(long this_obj);
// uint64_t TaggedHash_clone_ptr(LDKTaggedHash *NONNULL_PTR arg);
public static native String TaggedHash_tag(long this_arg);
// MUST_USE_RES struct LDKThirtyTwoBytes TaggedHash_merkle_root(const struct LDKTaggedHash *NONNULL_PTR this_arg);
public static native byte[] TaggedHash_merkle_root(long this_arg);
+ // void SignError_free(struct LDKSignError this_ptr);
+ public static native void SignError_free(long this_ptr);
+ // uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg);
+ public static native long SignError_clone_ptr(long arg);
+ // struct LDKSignError SignError_clone(const struct LDKSignError *NONNULL_PTR orig);
+ public static native long SignError_clone(long orig);
+ // struct LDKSignError SignError_signing(void);
+ public static native long SignError_signing();
+ // struct LDKSignError SignError_verification(enum LDKSecp256k1Error a);
+ public static native long SignError_verification(Secp256k1Error a);
// void Bolt12ParseError_free(struct LDKBolt12ParseError this_obj);
public static native void Bolt12ParseError_free(long this_obj);
// uint64_t Bolt12ParseError_clone_ptr(LDKBolt12ParseError *NONNULL_PTR arg);
public static native Bolt12SemanticError Bolt12SemanticError_duplicate_payment_id();
// enum LDKBolt12SemanticError Bolt12SemanticError_missing_paths(void);
public static native Bolt12SemanticError Bolt12SemanticError_missing_paths();
+ // enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_paths(void);
+ public static native Bolt12SemanticError Bolt12SemanticError_unexpected_paths();
// enum LDKBolt12SemanticError Bolt12SemanticError_invalid_pay_info(void);
public static native Bolt12SemanticError Bolt12SemanticError_invalid_pay_info();
// enum LDKBolt12SemanticError Bolt12SemanticError_missing_creation_time(void);
public static native Bolt12SemanticError Bolt12SemanticError_missing_payment_hash();
// enum LDKBolt12SemanticError Bolt12SemanticError_missing_signature(void);
public static native Bolt12SemanticError Bolt12SemanticError_missing_signature();
+ // void RefundMaybeWithDerivedMetadataBuilder_free(struct LDKRefundMaybeWithDerivedMetadataBuilder this_obj);
+ public static native void RefundMaybeWithDerivedMetadataBuilder_free(long this_obj);
+ // uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg);
+ public static native long RefundMaybeWithDerivedMetadataBuilder_clone_ptr(long arg);
+ // struct LDKRefundMaybeWithDerivedMetadataBuilder RefundMaybeWithDerivedMetadataBuilder_clone(const struct LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR orig);
+ public static native long RefundMaybeWithDerivedMetadataBuilder_clone(long orig);
+ // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_new(struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id, uint64_t amount_msats);
+ public static native long RefundMaybeWithDerivedMetadataBuilder_new(byte[] metadata, byte[] payer_id, long amount_msats);
+ // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id);
+ public static native long RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(byte[] node_id, long expanded_key, long entropy_source, long amount_msats, byte[] payment_id);
+ // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_description(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr description);
+ public static native void RefundMaybeWithDerivedMetadataBuilder_description(long this_arg, String description);
+ // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry);
+ public static native void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(long this_arg, long absolute_expiry);
+ // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_issuer(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr issuer);
+ public static native void RefundMaybeWithDerivedMetadataBuilder_issuer(long this_arg, String issuer);
+ // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_path(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path);
+ public static native void RefundMaybeWithDerivedMetadataBuilder_path(long this_arg, long path);
+ // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_chain(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, enum LDKNetwork network);
+ public static native void RefundMaybeWithDerivedMetadataBuilder_chain(long this_arg, Network network);
+ // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_quantity(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t quantity);
+ public static native void RefundMaybeWithDerivedMetadataBuilder_quantity(long this_arg, long quantity);
+ // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_payer_note(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr payer_note);
+ public static native void RefundMaybeWithDerivedMetadataBuilder_payer_note(long this_arg, String payer_note);
+ // MUST_USE_RES struct LDKCResult_RefundBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_build(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg);
+ public static native long RefundMaybeWithDerivedMetadataBuilder_build(long this_arg);
// void Refund_free(struct LDKRefund this_obj);
public static native void Refund_free(long this_obj);
// uint64_t Refund_clone_ptr(LDKRefund *NONNULL_PTR arg);
public static native byte[] Refund_payer_id(long this_arg);
// MUST_USE_RES struct LDKPrintableString Refund_payer_note(const struct LDKRefund *NONNULL_PTR this_arg);
public static native long Refund_payer_note(long this_arg);
+ // uint64_t Refund_hash(const struct LDKRefund *NONNULL_PTR o);
+ public static native long Refund_hash(long o);
// struct LDKCVec_u8Z Refund_write(const struct LDKRefund *NONNULL_PTR obj);
public static native byte[] Refund_write(long obj);
// struct LDKCResult_RefundBolt12ParseErrorZ Refund_from_str(struct LDKStr s);
public static native long NodeId_clone(long orig);
// MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
public static native long NodeId_from_pubkey(byte[] pubkey);
+ // MUST_USE_RES struct LDKCResult_NodeIdDecodeErrorZ NodeId_from_slice(struct LDKu8slice bytes);
+ public static native long NodeId_from_slice(byte[] bytes);
// MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
public static native byte[] NodeId_as_slice(long this_arg);
// MUST_USE_RES const uint8_t (*NodeId_as_array(const struct LDKNodeId *NONNULL_PTR this_arg))[33];
public static native long DirectedChannelInfo_channel(long this_arg);
// MUST_USE_RES struct LDKEffectiveCapacity DirectedChannelInfo_effective_capacity(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
public static native long DirectedChannelInfo_effective_capacity(long this_arg);
+ // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_source(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+ public static native long DirectedChannelInfo_source(long this_arg);
+ // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_target(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+ public static native long DirectedChannelInfo_target(long this_arg);
// void EffectiveCapacity_free(struct LDKEffectiveCapacity this_ptr);
public static native void EffectiveCapacity_free(long this_ptr);
// uint64_t EffectiveCapacity_clone_ptr(LDKEffectiveCapacity *NONNULL_PTR arg);
public static native long NodeInfo_clone(long orig);
// bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b);
public static native boolean NodeInfo_eq(long a, long b);
+ // MUST_USE_RES bool NodeInfo_is_tor_only(const struct LDKNodeInfo *NONNULL_PTR this_arg);
+ public static native boolean NodeInfo_is_tor_only(long this_arg);
// struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
public static native byte[] NodeInfo_write(long obj);
// struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
public static native long DelayedPaymentOutputDescriptor_get_channel_value_satoshis(long this_ptr);
// void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
public static native void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(long this_ptr, long val);
- // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
- public static native long DelayedPaymentOutputDescriptor_new(long outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, long output_arg, long revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg);
+ // struct LDKChannelTransactionParameters DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+ public static native long DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(long this_ptr);
+ // void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKChannelTransactionParameters val);
+ public static native void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(long this_ptr, long val);
+ // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg, struct LDKChannelTransactionParameters channel_transaction_parameters_arg);
+ public static native long DelayedPaymentOutputDescriptor_new(long outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, long output_arg, long revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, long channel_transaction_parameters_arg);
// uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg);
public static native long DelayedPaymentOutputDescriptor_clone_ptr(long arg);
// struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
public static native long HTLCDescriptor_get_channel_derivation_parameters(long this_ptr);
// void HTLCDescriptor_set_channel_derivation_parameters(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKChannelDerivationParameters val);
public static native void HTLCDescriptor_set_channel_derivation_parameters(long this_ptr, long val);
+ // const uint8_t (*HTLCDescriptor_get_commitment_txid(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr))[32];
+ public static native byte[] HTLCDescriptor_get_commitment_txid(long this_ptr);
+ // void HTLCDescriptor_set_commitment_txid(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ public static native void HTLCDescriptor_set_commitment_txid(long this_ptr, byte[] val);
// uint64_t HTLCDescriptor_get_per_commitment_number(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
public static native long HTLCDescriptor_get_per_commitment_number(long this_ptr);
// void HTLCDescriptor_set_per_commitment_number(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, uint64_t val);
public static native byte[] HTLCDescriptor_get_counterparty_sig(long this_ptr);
// void HTLCDescriptor_set_counterparty_sig(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
public static native void HTLCDescriptor_set_counterparty_sig(long this_ptr, byte[] val);
+ // MUST_USE_RES struct LDKHTLCDescriptor HTLCDescriptor_new(struct LDKChannelDerivationParameters channel_derivation_parameters_arg, struct LDKThirtyTwoBytes commitment_txid_arg, uint64_t per_commitment_number_arg, struct LDKPublicKey per_commitment_point_arg, uint32_t feerate_per_kw_arg, struct LDKHTLCOutputInCommitment htlc_arg, struct LDKCOption_ThirtyTwoBytesZ preimage_arg, struct LDKECDSASignature counterparty_sig_arg);
+ public static native long HTLCDescriptor_new(long channel_derivation_parameters_arg, byte[] commitment_txid_arg, long per_commitment_number_arg, byte[] per_commitment_point_arg, int feerate_per_kw_arg, long htlc_arg, long preimage_arg, byte[] counterparty_sig_arg);
// uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg);
public static native long HTLCDescriptor_clone_ptr(long arg);
// struct LDKHTLCDescriptor HTLCDescriptor_clone(const struct LDKHTLCDescriptor *NONNULL_PTR orig);
public static native void EntropySource_free(long this_ptr);
// void NodeSigner_free(struct LDKNodeSigner this_ptr);
public static native void NodeSigner_free(long this_ptr);
+ // void OutputSpender_free(struct LDKOutputSpender this_ptr);
+ public static native void OutputSpender_free(long this_ptr);
// void SignerProvider_free(struct LDKSignerProvider this_ptr);
public static native void SignerProvider_free(long this_ptr);
+ // void ChangeDestinationSource_free(struct LDKChangeDestinationSource this_ptr);
+ public static native void ChangeDestinationSource_free(long this_ptr);
// void InMemorySigner_free(struct LDKInMemorySigner this_obj);
public static native void InMemorySigner_free(long this_obj);
// const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
public static native long KeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, byte[] params);
// MUST_USE_RES struct LDKCResult_CVec_u8ZNoneZ KeysManager_sign_spendable_outputs_psbt(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_u8Z psbt);
public static native long KeysManager_sign_spendable_outputs_psbt(long this_arg, long[] descriptors, byte[] psbt);
- // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime);
- public static native long KeysManager_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime);
// struct LDKEntropySource KeysManager_as_EntropySource(const struct LDKKeysManager *NONNULL_PTR this_arg);
public static native long KeysManager_as_EntropySource(long this_arg);
// struct LDKNodeSigner KeysManager_as_NodeSigner(const struct LDKKeysManager *NONNULL_PTR this_arg);
public static native long KeysManager_as_NodeSigner(long this_arg);
+ // struct LDKOutputSpender KeysManager_as_OutputSpender(const struct LDKKeysManager *NONNULL_PTR this_arg);
+ public static native long KeysManager_as_OutputSpender(long this_arg);
// struct LDKSignerProvider KeysManager_as_SignerProvider(const struct LDKKeysManager *NONNULL_PTR this_arg);
public static native long KeysManager_as_SignerProvider(long this_arg);
// void PhantomKeysManager_free(struct LDKPhantomKeysManager this_obj);
public static native long PhantomKeysManager_as_EntropySource(long this_arg);
// struct LDKNodeSigner PhantomKeysManager_as_NodeSigner(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
public static native long PhantomKeysManager_as_NodeSigner(long this_arg);
+ // struct LDKOutputSpender PhantomKeysManager_as_OutputSpender(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+ public static native long PhantomKeysManager_as_OutputSpender(long this_arg);
// struct LDKSignerProvider PhantomKeysManager_as_SignerProvider(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
public static native long PhantomKeysManager_as_SignerProvider(long this_arg);
// MUST_USE_RES struct LDKPhantomKeysManager PhantomKeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos, const uint8_t (*cross_node_seed)[32]);
public static native long PhantomKeysManager_new(byte[] seed, long starting_time_secs, int starting_time_nanos, byte[] cross_node_seed);
- // MUST_USE_RES struct LDKCResult_TransactionNoneZ PhantomKeysManager_spend_spendable_outputs(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime);
- public static native long PhantomKeysManager_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime);
// MUST_USE_RES struct LDKInMemorySigner PhantomKeysManager_derive_channel_keys(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
public static native long PhantomKeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, byte[] params);
// MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
public static native byte[] PhantomKeysManager_get_node_secret_key(long this_arg);
// MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_phantom_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
public static native byte[] PhantomKeysManager_get_phantom_node_secret_key(long this_arg);
+ // void RandomBytes_free(struct LDKRandomBytes this_obj);
+ public static native void RandomBytes_free(long this_obj);
+ // MUST_USE_RES struct LDKRandomBytes RandomBytes_new(struct LDKThirtyTwoBytes seed);
+ public static native long RandomBytes_new(byte[] seed);
+ // struct LDKEntropySource RandomBytes_as_EntropySource(const struct LDKRandomBytes *NONNULL_PTR this_arg);
+ public static native long RandomBytes_as_EntropySource(long this_arg);
// void EcdsaChannelSigner_free(struct LDKEcdsaChannelSigner this_ptr);
public static native void EcdsaChannelSigner_free(long this_ptr);
// uint64_t WriteableEcdsaChannelSigner_clone_ptr(LDKWriteableEcdsaChannelSigner *NONNULL_PTR arg);
public static native long Destination_node(byte[] a);
// struct LDKDestination Destination_blinded_path(struct LDKBlindedPath a);
public static native long Destination_blinded_path(long a);
+ // uint64_t Destination_hash(const struct LDKDestination *NONNULL_PTR o);
+ public static native long Destination_hash(long o);
+ // bool Destination_eq(const struct LDKDestination *NONNULL_PTR a, const struct LDKDestination *NONNULL_PTR b);
+ public static native boolean Destination_eq(long a, long b);
+ // void Destination_resolve(struct LDKDestination *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph);
+ public static native void Destination_resolve(long this_arg, long network_graph);
// void SendSuccess_free(struct LDKSendSuccess this_ptr);
public static native void SendSuccess_free(long this_ptr);
// uint64_t SendSuccess_clone_ptr(LDKSendSuccess *NONNULL_PTR arg);
public static native long SendSuccess_buffered();
// struct LDKSendSuccess SendSuccess_buffered_awaiting_connection(struct LDKPublicKey a);
public static native long SendSuccess_buffered_awaiting_connection(byte[] a);
+ // uint64_t SendSuccess_hash(const struct LDKSendSuccess *NONNULL_PTR o);
+ public static native long SendSuccess_hash(long o);
// bool SendSuccess_eq(const struct LDKSendSuccess *NONNULL_PTR a, const struct LDKSendSuccess *NONNULL_PTR b);
public static native boolean SendSuccess_eq(long a, long b);
// void SendError_free(struct LDKSendError this_ptr);
public static native long SendError_buffer_full();
// struct LDKSendError SendError_get_node_id_failed(void);
public static native long SendError_get_node_id_failed();
+ // struct LDKSendError SendError_unresolved_introduction_node(void);
+ public static native long SendError_unresolved_introduction_node();
// struct LDKSendError SendError_blinded_path_advance_failed(void);
public static native long SendError_blinded_path_advance_failed();
+ // uint64_t SendError_hash(const struct LDKSendError *NONNULL_PTR o);
+ public static native long SendError_hash(long o);
// bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b);
public static native boolean SendError_eq(long a, long b);
// void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr);
public static native long PeeledOnion_clone_ptr(long arg);
// struct LDKPeeledOnion PeeledOnion_clone(const struct LDKPeeledOnion *NONNULL_PTR orig);
public static native long PeeledOnion_clone(long orig);
- // struct LDKPeeledOnion PeeledOnion_forward(struct LDKPublicKey a, struct LDKOnionMessage b);
- public static native long PeeledOnion_forward(byte[] a, long b);
+ // struct LDKPeeledOnion PeeledOnion_forward(struct LDKNextMessageHop a, struct LDKOnionMessage b);
+ public static native long PeeledOnion_forward(long a, long b);
// struct LDKPeeledOnion PeeledOnion_receive(struct LDKParsedOnionMessageContents a, struct LDKThirtyTwoBytes b, struct LDKBlindedPath c);
public static native long PeeledOnion_receive(long a, byte[] b, long c);
- // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path);
- public static native long create_onion_message(long entropy_source, long node_signer, long path, long contents, long reply_path);
+ // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path);
+ public static native long create_onion_message_resolving_destination(long entropy_source, long node_signer, long node_id_lookup, long network_graph, long path, long contents, long reply_path);
+ // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path);
+ public static native long create_onion_message(long entropy_source, long node_signer, long node_id_lookup, long path, long contents, long reply_path);
// struct LDKCResult_PeeledOnionNoneZ peel_onion_message(const struct LDKOnionMessage *NONNULL_PTR msg, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler);
public static native long peel_onion_message(long msg, long node_signer, long logger, long custom_handler);
- // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler);
- public static native long OnionMessenger_new(long entropy_source, long node_signer, long logger, long message_router, long offers_handler, long custom_handler);
+ // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKNodeIdLookUp node_id_lookup, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler);
+ public static native long OnionMessenger_new(long entropy_source, long node_signer, long logger, long node_id_lookup, long message_router, long offers_handler, long custom_handler);
// MUST_USE_RES struct LDKCResult_SendSuccessSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessageContents contents, struct LDKDestination destination, struct LDKBlindedPath reply_path);
public static native long OnionMessenger_send_onion_message(long this_arg, long contents, long destination, long reply_path);
// struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
public static native long OnionMessageContents_clone(long orig);
// void OnionMessageContents_free(struct LDKOnionMessageContents this_ptr);
public static native void OnionMessageContents_free(long this_ptr);
+ // void NextMessageHop_free(struct LDKNextMessageHop this_ptr);
+ public static native void NextMessageHop_free(long this_ptr);
+ // uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg);
+ public static native long NextMessageHop_clone_ptr(long arg);
+ // struct LDKNextMessageHop NextMessageHop_clone(const struct LDKNextMessageHop *NONNULL_PTR orig);
+ public static native long NextMessageHop_clone(long orig);
+ // struct LDKNextMessageHop NextMessageHop_node_id(struct LDKPublicKey a);
+ public static native long NextMessageHop_node_id(byte[] a);
+ // struct LDKNextMessageHop NextMessageHop_short_channel_id(uint64_t a);
+ public static native long NextMessageHop_short_channel_id(long a);
+ // uint64_t NextMessageHop_hash(const struct LDKNextMessageHop *NONNULL_PTR o);
+ public static native long NextMessageHop_hash(long o);
+ // bool NextMessageHop_eq(const struct LDKNextMessageHop *NONNULL_PTR a, const struct LDKNextMessageHop *NONNULL_PTR b);
+ public static native boolean NextMessageHop_eq(long a, long b);
// void BlindedPath_free(struct LDKBlindedPath this_obj);
public static native void BlindedPath_free(long this_obj);
- // struct LDKPublicKey BlindedPath_get_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
- public static native byte[] BlindedPath_get_introduction_node_id(long this_ptr);
- // void BlindedPath_set_introduction_node_id(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- public static native void BlindedPath_set_introduction_node_id(long this_ptr, byte[] val);
+ // struct LDKIntroductionNode BlindedPath_get_introduction_node(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
+ public static native long BlindedPath_get_introduction_node(long this_ptr);
+ // void BlindedPath_set_introduction_node(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKIntroductionNode val);
+ public static native void BlindedPath_set_introduction_node(long this_ptr, long val);
// struct LDKPublicKey BlindedPath_get_blinding_point(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
public static native byte[] BlindedPath_get_blinding_point(long this_ptr);
// void BlindedPath_set_blinding_point(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native long[] BlindedPath_get_blinded_hops(long this_ptr);
// void BlindedPath_set_blinded_hops(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKCVec_BlindedHopZ val);
public static native void BlindedPath_set_blinded_hops(long this_ptr, long[] val);
- // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKPublicKey introduction_node_id_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg);
- public static native long BlindedPath_new(byte[] introduction_node_id_arg, byte[] blinding_point_arg, long[] blinded_hops_arg);
+ // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKIntroductionNode introduction_node_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg);
+ public static native long BlindedPath_new(long introduction_node_arg, byte[] blinding_point_arg, long[] blinded_hops_arg);
// uint64_t BlindedPath_clone_ptr(LDKBlindedPath *NONNULL_PTR arg);
public static native long BlindedPath_clone_ptr(long arg);
// struct LDKBlindedPath BlindedPath_clone(const struct LDKBlindedPath *NONNULL_PTR orig);
public static native long BlindedPath_hash(long o);
// bool BlindedPath_eq(const struct LDKBlindedPath *NONNULL_PTR a, const struct LDKBlindedPath *NONNULL_PTR b);
public static native boolean BlindedPath_eq(long a, long b);
+ // void IntroductionNode_free(struct LDKIntroductionNode this_ptr);
+ public static native void IntroductionNode_free(long this_ptr);
+ // uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg);
+ public static native long IntroductionNode_clone_ptr(long arg);
+ // struct LDKIntroductionNode IntroductionNode_clone(const struct LDKIntroductionNode *NONNULL_PTR orig);
+ public static native long IntroductionNode_clone(long orig);
+ // struct LDKIntroductionNode IntroductionNode_node_id(struct LDKPublicKey a);
+ public static native long IntroductionNode_node_id(byte[] a);
+ // struct LDKIntroductionNode IntroductionNode_directed_short_channel_id(enum LDKDirection a, uint64_t b);
+ public static native long IntroductionNode_directed_short_channel_id(Direction a, long b);
+ // uint64_t IntroductionNode_hash(const struct LDKIntroductionNode *NONNULL_PTR o);
+ public static native long IntroductionNode_hash(long o);
+ // bool IntroductionNode_eq(const struct LDKIntroductionNode *NONNULL_PTR a, const struct LDKIntroductionNode *NONNULL_PTR b);
+ public static native boolean IntroductionNode_eq(long a, long b);
+ // enum LDKDirection Direction_clone(const enum LDKDirection *NONNULL_PTR orig);
+ public static native Direction Direction_clone(long orig);
+ // enum LDKDirection Direction_node_one(void);
+ public static native Direction Direction_node_one();
+ // enum LDKDirection Direction_node_two(void);
+ public static native Direction Direction_node_two();
+ // uint64_t Direction_hash(const enum LDKDirection *NONNULL_PTR o);
+ public static native long Direction_hash(long o);
+ // bool Direction_eq(const enum LDKDirection *NONNULL_PTR a, const enum LDKDirection *NONNULL_PTR b);
+ public static native boolean Direction_eq(long a, long b);
+ // void NodeIdLookUp_free(struct LDKNodeIdLookUp this_ptr);
+ public static native void NodeIdLookUp_free(long this_ptr);
+ // void EmptyNodeIdLookUp_free(struct LDKEmptyNodeIdLookUp this_obj);
+ public static native void EmptyNodeIdLookUp_free(long this_obj);
+ // MUST_USE_RES struct LDKEmptyNodeIdLookUp EmptyNodeIdLookUp_new(void);
+ public static native long EmptyNodeIdLookUp_new();
+ // struct LDKNodeIdLookUp EmptyNodeIdLookUp_as_NodeIdLookUp(const struct LDKEmptyNodeIdLookUp *NONNULL_PTR this_arg);
+ public static native long EmptyNodeIdLookUp_as_NodeIdLookUp(long this_arg);
// void BlindedHop_free(struct LDKBlindedHop this_obj);
public static native void BlindedHop_free(long this_obj);
// struct LDKPublicKey BlindedHop_get_blinded_node_id(const struct LDKBlindedHop *NONNULL_PTR this_ptr);
public static native long BlindedHop_hash(long o);
// bool BlindedHop_eq(const struct LDKBlindedHop *NONNULL_PTR a, const struct LDKBlindedHop *NONNULL_PTR b);
public static native boolean BlindedHop_eq(long a, long b);
- // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+ // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, struct LDKEntropySource entropy_source);
public static native long BlindedPath_one_hop_for_message(byte[] recipient_node_id, long entropy_source);
- // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+ // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, struct LDKEntropySource entropy_source);
public static native long BlindedPath_new_for_message(byte[][] node_pks, long entropy_source);
- // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, const struct LDKEntropySource *NONNULL_PTR entropy_source);
- public static native long BlindedPath_one_hop_for_payment(byte[] payee_node_id, long payee_tlvs, long entropy_source);
- // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, const struct LDKEntropySource *NONNULL_PTR entropy_source);
- public static native long BlindedPath_new_for_payment(long[] intermediate_nodes, byte[] payee_node_id, long payee_tlvs, long htlc_maximum_msat, long entropy_source);
+ // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source);
+ public static native long BlindedPath_one_hop_for_payment(byte[] payee_node_id, long payee_tlvs, short min_final_cltv_expiry_delta, long entropy_source);
+ // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source);
+ public static native long BlindedPath_new_for_payment(long[] intermediate_nodes, byte[] payee_node_id, long payee_tlvs, long htlc_maximum_msat, short min_final_cltv_expiry_delta, long entropy_source);
+ // MUST_USE_RES struct LDKNodeId BlindedPath_public_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph);
+ public static native long BlindedPath_public_introduction_node_id(long this_arg, long network_graph);
// struct LDKCVec_u8Z BlindedPath_write(const struct LDKBlindedPath *NONNULL_PTR obj);
public static native byte[] BlindedPath_write(long obj);
// struct LDKCResult_BlindedPathDecodeErrorZ BlindedPath_read(struct LDKu8slice ser);
public static native long ReceiveTlvs_get_payment_constraints(long this_ptr);
// void ReceiveTlvs_set_payment_constraints(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val);
public static native void ReceiveTlvs_set_payment_constraints(long this_ptr, long val);
- // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg);
- public static native long ReceiveTlvs_new(byte[] payment_secret_arg, long payment_constraints_arg);
+ // struct LDKPaymentContext ReceiveTlvs_get_payment_context(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr);
+ public static native long ReceiveTlvs_get_payment_context(long this_ptr);
+ // void ReceiveTlvs_set_payment_context(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentContext val);
+ public static native void ReceiveTlvs_set_payment_context(long this_ptr, long val);
+ // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg, struct LDKPaymentContext payment_context_arg);
+ public static native long ReceiveTlvs_new(byte[] payment_secret_arg, long payment_constraints_arg, long payment_context_arg);
// uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg);
public static native long ReceiveTlvs_clone_ptr(long arg);
// struct LDKReceiveTlvs ReceiveTlvs_clone(const struct LDKReceiveTlvs *NONNULL_PTR orig);
public static native long PaymentConstraints_clone_ptr(long arg);
// struct LDKPaymentConstraints PaymentConstraints_clone(const struct LDKPaymentConstraints *NONNULL_PTR orig);
public static native long PaymentConstraints_clone(long orig);
+ // void PaymentContext_free(struct LDKPaymentContext this_ptr);
+ public static native void PaymentContext_free(long this_ptr);
+ // uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg);
+ public static native long PaymentContext_clone_ptr(long arg);
+ // struct LDKPaymentContext PaymentContext_clone(const struct LDKPaymentContext *NONNULL_PTR orig);
+ public static native long PaymentContext_clone(long orig);
+ // struct LDKPaymentContext PaymentContext_unknown(struct LDKUnknownPaymentContext a);
+ public static native long PaymentContext_unknown(long a);
+ // struct LDKPaymentContext PaymentContext_bolt12_offer(struct LDKBolt12OfferContext a);
+ public static native long PaymentContext_bolt12_offer(long a);
+ // struct LDKPaymentContext PaymentContext_bolt12_refund(struct LDKBolt12RefundContext a);
+ public static native long PaymentContext_bolt12_refund(long a);
+ // bool PaymentContext_eq(const struct LDKPaymentContext *NONNULL_PTR a, const struct LDKPaymentContext *NONNULL_PTR b);
+ public static native boolean PaymentContext_eq(long a, long b);
+ // void UnknownPaymentContext_free(struct LDKUnknownPaymentContext this_obj);
+ public static native void UnknownPaymentContext_free(long this_obj);
+ // uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg);
+ public static native long UnknownPaymentContext_clone_ptr(long arg);
+ // struct LDKUnknownPaymentContext UnknownPaymentContext_clone(const struct LDKUnknownPaymentContext *NONNULL_PTR orig);
+ public static native long UnknownPaymentContext_clone(long orig);
+ // bool UnknownPaymentContext_eq(const struct LDKUnknownPaymentContext *NONNULL_PTR a, const struct LDKUnknownPaymentContext *NONNULL_PTR b);
+ public static native boolean UnknownPaymentContext_eq(long a, long b);
+ // void Bolt12OfferContext_free(struct LDKBolt12OfferContext this_obj);
+ public static native void Bolt12OfferContext_free(long this_obj);
+ // struct LDKOfferId Bolt12OfferContext_get_offer_id(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr);
+ public static native long Bolt12OfferContext_get_offer_id(long this_ptr);
+ // void Bolt12OfferContext_set_offer_id(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKOfferId val);
+ public static native void Bolt12OfferContext_set_offer_id(long this_ptr, long val);
+ // struct LDKInvoiceRequestFields Bolt12OfferContext_get_invoice_request(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr);
+ public static native long Bolt12OfferContext_get_invoice_request(long this_ptr);
+ // void Bolt12OfferContext_set_invoice_request(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKInvoiceRequestFields val);
+ public static native void Bolt12OfferContext_set_invoice_request(long this_ptr, long val);
+ // MUST_USE_RES struct LDKBolt12OfferContext Bolt12OfferContext_new(struct LDKOfferId offer_id_arg, struct LDKInvoiceRequestFields invoice_request_arg);
+ public static native long Bolt12OfferContext_new(long offer_id_arg, long invoice_request_arg);
+ // uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg);
+ public static native long Bolt12OfferContext_clone_ptr(long arg);
+ // struct LDKBolt12OfferContext Bolt12OfferContext_clone(const struct LDKBolt12OfferContext *NONNULL_PTR orig);
+ public static native long Bolt12OfferContext_clone(long orig);
+ // bool Bolt12OfferContext_eq(const struct LDKBolt12OfferContext *NONNULL_PTR a, const struct LDKBolt12OfferContext *NONNULL_PTR b);
+ public static native boolean Bolt12OfferContext_eq(long a, long b);
+ // void Bolt12RefundContext_free(struct LDKBolt12RefundContext this_obj);
+ public static native void Bolt12RefundContext_free(long this_obj);
+ // MUST_USE_RES struct LDKBolt12RefundContext Bolt12RefundContext_new(void);
+ public static native long Bolt12RefundContext_new();
+ // uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg);
+ public static native long Bolt12RefundContext_clone_ptr(long arg);
+ // struct LDKBolt12RefundContext Bolt12RefundContext_clone(const struct LDKBolt12RefundContext *NONNULL_PTR orig);
+ public static native long Bolt12RefundContext_clone(long orig);
+ // bool Bolt12RefundContext_eq(const struct LDKBolt12RefundContext *NONNULL_PTR a, const struct LDKBolt12RefundContext *NONNULL_PTR b);
+ public static native boolean Bolt12RefundContext_eq(long a, long b);
// struct LDKCVec_u8Z ForwardTlvs_write(const struct LDKForwardTlvs *NONNULL_PTR obj);
public static native byte[] ForwardTlvs_write(long obj);
// struct LDKCVec_u8Z ReceiveTlvs_write(const struct LDKReceiveTlvs *NONNULL_PTR obj);
public static native byte[] PaymentConstraints_write(long obj);
// struct LDKCResult_PaymentConstraintsDecodeErrorZ PaymentConstraints_read(struct LDKu8slice ser);
public static native long PaymentConstraints_read(byte[] ser);
+ // struct LDKCVec_u8Z PaymentContext_write(const struct LDKPaymentContext *NONNULL_PTR obj);
+ public static native byte[] PaymentContext_write(long obj);
+ // struct LDKCResult_PaymentContextDecodeErrorZ PaymentContext_read(struct LDKu8slice ser);
+ public static native long PaymentContext_read(byte[] ser);
+ // struct LDKCVec_u8Z UnknownPaymentContext_write(const struct LDKUnknownPaymentContext *NONNULL_PTR obj);
+ public static native byte[] UnknownPaymentContext_write(long obj);
+ // struct LDKCResult_UnknownPaymentContextDecodeErrorZ UnknownPaymentContext_read(struct LDKu8slice ser);
+ public static native long UnknownPaymentContext_read(byte[] ser);
+ // struct LDKCVec_u8Z Bolt12OfferContext_write(const struct LDKBolt12OfferContext *NONNULL_PTR obj);
+ public static native byte[] Bolt12OfferContext_write(long obj);
+ // struct LDKCResult_Bolt12OfferContextDecodeErrorZ Bolt12OfferContext_read(struct LDKu8slice ser);
+ public static native long Bolt12OfferContext_read(byte[] ser);
+ // struct LDKCVec_u8Z Bolt12RefundContext_write(const struct LDKBolt12RefundContext *NONNULL_PTR obj);
+ public static native byte[] Bolt12RefundContext_write(long obj);
+ // struct LDKCResult_Bolt12RefundContextDecodeErrorZ Bolt12RefundContext_read(struct LDKu8slice ser);
+ public static native long Bolt12RefundContext_read(byte[] ser);
// void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
public static native void PaymentPurpose_free(long this_ptr);
// uint64_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
public static native long PaymentPurpose_clone_ptr(long arg);
// struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
public static native long PaymentPurpose_clone(long orig);
- // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret);
- public static native long PaymentPurpose_invoice_payment(long payment_preimage, byte[] payment_secret);
+ // struct LDKPaymentPurpose PaymentPurpose_bolt11_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret);
+ public static native long PaymentPurpose_bolt11_invoice_payment(long payment_preimage, byte[] payment_secret);
+ // struct LDKPaymentPurpose PaymentPurpose_bolt12_offer_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12OfferContext payment_context);
+ public static native long PaymentPurpose_bolt12_offer_payment(long payment_preimage, byte[] payment_secret, long payment_context);
+ // struct LDKPaymentPurpose PaymentPurpose_bolt12_refund_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12RefundContext payment_context);
+ public static native long PaymentPurpose_bolt12_refund_payment(long payment_preimage, byte[] payment_secret, long payment_context);
// struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
public static native long PaymentPurpose_spontaneous_payment(byte[] a);
// bool PaymentPurpose_eq(const struct LDKPaymentPurpose *NONNULL_PTR a, const struct LDKPaymentPurpose *NONNULL_PTR b);
public static native long PaymentPurpose_read(byte[] ser);
// void ClaimedHTLC_free(struct LDKClaimedHTLC this_obj);
public static native void ClaimedHTLC_free(long this_obj);
- // const uint8_t (*ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr))[32];
- public static native byte[] ClaimedHTLC_get_channel_id(long this_ptr);
- // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- public static native void ClaimedHTLC_set_channel_id(long this_ptr, byte[] val);
+ // struct LDKChannelId ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
+ public static native long ClaimedHTLC_get_channel_id(long this_ptr);
+ // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+ public static native void ClaimedHTLC_set_channel_id(long this_ptr, long val);
// struct LDKU128 ClaimedHTLC_get_user_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
public static native byte[] ClaimedHTLC_get_user_channel_id(long this_ptr);
// void ClaimedHTLC_set_user_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKU128 val);
public static native long ClaimedHTLC_get_counterparty_skimmed_fee_msat(long this_ptr);
// void ClaimedHTLC_set_counterparty_skimmed_fee_msat(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint64_t val);
public static native void ClaimedHTLC_set_counterparty_skimmed_fee_msat(long this_ptr, long val);
- // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg);
- public static native long ClaimedHTLC_new(byte[] channel_id_arg, byte[] user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg);
+ // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKChannelId channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg);
+ public static native long ClaimedHTLC_new(long channel_id_arg, byte[] user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg);
// uint64_t ClaimedHTLC_clone_ptr(LDKClaimedHTLC *NONNULL_PTR arg);
public static native long ClaimedHTLC_clone_ptr(long arg);
// struct LDKClaimedHTLC ClaimedHTLC_clone(const struct LDKClaimedHTLC *NONNULL_PTR orig);
public static native long ClosureReason_counterparty_force_closed(long peer_msg);
// struct LDKClosureReason ClosureReason_holder_force_closed(void);
public static native long ClosureReason_holder_force_closed();
- // struct LDKClosureReason ClosureReason_cooperative_closure(void);
- public static native long ClosureReason_cooperative_closure();
+ // struct LDKClosureReason ClosureReason_legacy_cooperative_closure(void);
+ public static native long ClosureReason_legacy_cooperative_closure();
+ // struct LDKClosureReason ClosureReason_counterparty_initiated_cooperative_closure(void);
+ public static native long ClosureReason_counterparty_initiated_cooperative_closure();
+ // struct LDKClosureReason ClosureReason_locally_initiated_cooperative_closure(void);
+ public static native long ClosureReason_locally_initiated_cooperative_closure();
// struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
public static native long ClosureReason_commitment_tx_confirmed();
// struct LDKClosureReason ClosureReason_funding_timed_out(void);
public static native long ClosureReason_counterparty_coop_closed_unfunded_channel();
// struct LDKClosureReason ClosureReason_funding_batch_closure(void);
public static native long ClosureReason_funding_batch_closure();
+ // struct LDKClosureReason ClosureReason_htlcs_timed_out(void);
+ public static native long ClosureReason_htlcs_timed_out();
// bool ClosureReason_eq(const struct LDKClosureReason *NONNULL_PTR a, const struct LDKClosureReason *NONNULL_PTR b);
public static native boolean ClosureReason_eq(long a, long b);
// struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
public static native long HTLCDestination_clone_ptr(long arg);
// struct LDKHTLCDestination HTLCDestination_clone(const struct LDKHTLCDestination *NONNULL_PTR orig);
public static native long HTLCDestination_clone(long orig);
- // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKThirtyTwoBytes channel_id);
- public static native long HTLCDestination_next_hop_channel(byte[] node_id, byte[] channel_id);
+ // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKChannelId channel_id);
+ public static native long HTLCDestination_next_hop_channel(byte[] node_id, long channel_id);
// struct LDKHTLCDestination HTLCDestination_unknown_next_hop(uint64_t requested_forward_scid);
public static native long HTLCDestination_unknown_next_hop(long requested_forward_scid);
// struct LDKHTLCDestination HTLCDestination_invalid_forward(uint64_t requested_forward_scid);
public static native long HTLCDestination_invalid_forward(long requested_forward_scid);
+ // struct LDKHTLCDestination HTLCDestination_invalid_onion(void);
+ public static native long HTLCDestination_invalid_onion();
// struct LDKHTLCDestination HTLCDestination_failed_payment(struct LDKThirtyTwoBytes payment_hash);
public static native long HTLCDestination_failed_payment(byte[] payment_hash);
// bool HTLCDestination_eq(const struct LDKHTLCDestination *NONNULL_PTR a, const struct LDKHTLCDestination *NONNULL_PTR b);
public static native long Event_clone_ptr(long arg);
// struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
public static native long Event_clone(long orig);
- // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id);
- public static native long Event_funding_generation_ready(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id);
- // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKCOption_ThirtyTwoBytesZ via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline);
+ // struct LDKEvent Event_funding_generation_ready(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id);
+ public static native long Event_funding_generation_ready(long temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id);
+ // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKChannelId via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline);
public static native long Event_payment_claimable(byte[] receiver_node_id, byte[] payment_hash, long onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, long purpose, long via_channel_id, long via_user_channel_id, long claim_deadline);
// struct LDKEvent Event_payment_claimed(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, uint64_t amount_msat, struct LDKPaymentPurpose purpose, struct LDKCVec_ClaimedHTLCZ htlcs, struct LDKCOption_u64Z sender_intended_total_msat);
public static native long Event_payment_claimed(byte[] receiver_node_id, byte[] payment_hash, long amount_msat, long purpose, long[] htlcs, long sender_intended_total_msat);
public static native long Event_pending_htlcs_forwardable(long time_forwardable);
// struct LDKEvent Event_htlcintercepted(struct LDKThirtyTwoBytes intercept_id, uint64_t requested_next_hop_scid, struct LDKThirtyTwoBytes payment_hash, uint64_t inbound_amount_msat, uint64_t expected_outbound_amount_msat);
public static native long Event_htlcintercepted(byte[] intercept_id, long requested_next_hop_scid, byte[] payment_hash, long inbound_amount_msat, long expected_outbound_amount_msat);
- // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKCOption_ThirtyTwoBytesZ channel_id);
+ // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKChannelId channel_id);
public static native long Event_spendable_outputs(long[] outputs, long channel_id);
- // struct LDKEvent Event_payment_forwarded(struct LDKCOption_ThirtyTwoBytesZ prev_channel_id, struct LDKCOption_ThirtyTwoBytesZ next_channel_id, struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat);
- public static native long Event_payment_forwarded(long prev_channel_id, long next_channel_id, long fee_earned_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat);
- // struct LDKEvent Event_channel_pending(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo);
- public static native long Event_channel_pending(byte[] channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo);
- // struct LDKEvent Event_channel_ready(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type);
- public static native long Event_channel_ready(byte[] channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type);
- // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo);
- public static native long Event_channel_closed(byte[] channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo);
- // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
- public static native long Event_discard_funding(byte[] channel_id, byte[] transaction);
- // struct LDKEvent Event_open_channel_request(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type);
- public static native long Event_open_channel_request(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type);
- // struct LDKEvent Event_htlchandling_failed(struct LDKThirtyTwoBytes prev_channel_id, struct LDKHTLCDestination failed_next_destination);
- public static native long Event_htlchandling_failed(byte[] prev_channel_id, long failed_next_destination);
+ // struct LDKEvent Event_payment_forwarded(struct LDKChannelId prev_channel_id, struct LDKChannelId next_channel_id, struct LDKCOption_U128Z prev_user_channel_id, struct LDKCOption_U128Z next_user_channel_id, struct LDKCOption_u64Z total_fee_earned_msat, struct LDKCOption_u64Z skimmed_fee_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat);
+ public static native long Event_payment_forwarded(long prev_channel_id, long next_channel_id, long prev_user_channel_id, long next_user_channel_id, long total_fee_earned_msat, long skimmed_fee_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat);
+ // struct LDKEvent Event_channel_pending(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKChannelId former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo, struct LDKChannelTypeFeatures channel_type);
+ public static native long Event_channel_pending(long channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo, long channel_type);
+ // struct LDKEvent Event_channel_ready(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type);
+ public static native long Event_channel_ready(long channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type);
+ // struct LDKEvent Event_channel_closed(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo);
+ public static native long Event_channel_closed(long channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo);
+ // struct LDKEvent Event_discard_funding(struct LDKChannelId channel_id, struct LDKTransaction transaction);
+ public static native long Event_discard_funding(long channel_id, byte[] transaction);
+ // struct LDKEvent Event_open_channel_request(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type);
+ public static native long Event_open_channel_request(long temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type);
+ // struct LDKEvent Event_htlchandling_failed(struct LDKChannelId prev_channel_id, struct LDKHTLCDestination failed_next_destination);
+ public static native long Event_htlchandling_failed(long prev_channel_id, long failed_next_destination);
// struct LDKEvent Event_bump_transaction(struct LDKBumpTransactionEvent a);
public static native long Event_bump_transaction(long a);
// bool Event_eq(const struct LDKEvent *NONNULL_PTR a, const struct LDKEvent *NONNULL_PTR b);
public static native long BumpTransactionEvent_clone_ptr(long arg);
// struct LDKBumpTransactionEvent BumpTransactionEvent_clone(const struct LDKBumpTransactionEvent *NONNULL_PTR orig);
public static native long BumpTransactionEvent_clone(long orig);
- // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs);
- public static native long BumpTransactionEvent_channel_close(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs);
- // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time);
- public static native long BumpTransactionEvent_htlcresolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time);
+ // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs);
+ public static native long BumpTransactionEvent_channel_close(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs);
+ // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time);
+ public static native long BumpTransactionEvent_htlcresolution(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time);
// bool BumpTransactionEvent_eq(const struct LDKBumpTransactionEvent *NONNULL_PTR a, const struct LDKBumpTransactionEvent *NONNULL_PTR b);
public static native boolean BumpTransactionEvent_eq(long a, long b);
// void Input_free(struct LDKInput this_obj);
public static native long Bolt11Invoice_features(long this_arg);
// MUST_USE_RES struct LDKPublicKey Bolt11Invoice_recover_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
public static native byte[] Bolt11Invoice_recover_payee_pub_key(long this_arg);
+ // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_get_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+ public static native byte[] Bolt11Invoice_get_payee_pub_key(long this_arg);
// MUST_USE_RES struct LDKCOption_u64Z Bolt11Invoice_expires_at(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
public static native long Bolt11Invoice_expires_at(long this_arg);
// MUST_USE_RES uint64_t Bolt11Invoice_expiry_time(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
* Utility method to constructs a new IncompatibleShutdownScript-variant APIError
*/
public static APIError incompatible_shutdown_script(org.ldk.structs.ShutdownScript script) {
- long ret = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : script.ptr);
+ long ret = bindings.APIError_incompatible_shutdown_script(script.ptr);
Reference.reachabilityFence(script);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.APIError b) {
- boolean ret = bindings.APIError_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.APIError_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
}
/**
- * A temporary channel ID, until the funding outpoint is announced
+ * Common fields of `accept_channel(2)`-like messages
*/
- public byte[] get_temporary_channel_id() {
- byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
+ public CommonAcceptChannelFields get_common_fields() {
+ long ret = bindings.AcceptChannel_get_common_fields(this.ptr);
Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * A temporary channel ID, until the funding outpoint is announced
- */
- public void set_temporary_channel_id(byte[] val) {
- bindings.AcceptChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The threshold below which outputs on transactions broadcast by sender will be omitted
- */
- public long get_dust_limit_satoshis() {
- long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The threshold below which outputs on transactions broadcast by sender will be omitted
- */
- public void set_dust_limit_satoshis(long val) {
- bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
- */
- public long get_max_htlc_value_in_flight_msat() {
- long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
- * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+ * Common fields of `accept_channel(2)`-like messages
*/
- public void set_max_htlc_value_in_flight_msat(long val) {
- bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
+ public void set_common_fields(org.ldk.structs.CommonAcceptChannelFields val) {
+ bindings.AcceptChannel_set_common_fields(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
Reference.reachabilityFence(val);
}
- /**
- * The minimum HTLC size incoming to sender, in milli-satoshi
- */
- public long get_htlc_minimum_msat() {
- long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The minimum HTLC size incoming to sender, in milli-satoshi
- */
- public void set_htlc_minimum_msat(long val) {
- bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Minimum depth of the funding transaction before the channel is considered open
- */
- public int get_minimum_depth() {
- int ret = bindings.AcceptChannel_get_minimum_depth(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Minimum depth of the funding transaction before the channel is considered open
- */
- public void set_minimum_depth(int val) {
- bindings.AcceptChannel_set_minimum_depth(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
- */
- public short get_to_self_delay() {
- short ret = bindings.AcceptChannel_get_to_self_delay(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
- */
- public void set_to_self_delay(short val) {
- bindings.AcceptChannel_set_to_self_delay(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The maximum number of inbound HTLCs towards sender
- */
- public short get_max_accepted_htlcs() {
- short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The maximum number of inbound HTLCs towards sender
- */
- public void set_max_accepted_htlcs(short val) {
- bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The sender's key controlling the funding transaction
- */
- public byte[] get_funding_pubkey() {
- byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The sender's key controlling the funding transaction
- */
- public void set_funding_pubkey(byte[] val) {
- bindings.AcceptChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
- public byte[] get_revocation_basepoint() {
- byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
- public void set_revocation_basepoint(byte[] val) {
- bindings.AcceptChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * A payment key to sender for transactions broadcast by counterparty
- */
- public byte[] get_payment_point() {
- byte[] ret = bindings.AcceptChannel_get_payment_point(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * A payment key to sender for transactions broadcast by counterparty
- */
- public void set_payment_point(byte[] val) {
- bindings.AcceptChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive a payment key to sender for transactions broadcast by sender
- */
- public byte[] get_delayed_payment_basepoint() {
- byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive a payment key to sender for transactions broadcast by sender
- */
- public void set_delayed_payment_basepoint(byte[] val) {
- bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
- */
- public byte[] get_htlc_basepoint() {
- byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
- */
- public void set_htlc_basepoint(byte[] val) {
- bindings.AcceptChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The first to-be-broadcast-by-sender transaction's per commitment point
- */
- public byte[] get_first_per_commitment_point() {
- byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The first to-be-broadcast-by-sender transaction's per commitment point
- */
- public void set_first_per_commitment_point(byte[] val) {
- bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close
- */
- public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
- long ret = bindings.AcceptChannel_get_shutdown_scriptpubkey(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close
- */
- public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
- bindings.AcceptChannel_set_shutdown_scriptpubkey(this.ptr, val.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
- }
-
- /**
- * The channel type that this channel will represent.
- *
- * If this is `None`, we derive the channel type from the intersection of
- * our feature bits with our counterparty's feature bits from the [`Init`] message.
- * This is required to match the equivalent field in [`OpenChannel::channel_type`].
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- @Nullable
- public ChannelTypeFeatures get_channel_type() {
- long ret = bindings.AcceptChannel_get_channel_type(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * The channel type that this channel will represent.
- *
- * If this is `None`, we derive the channel type from the intersection of
- * our feature bits with our counterparty's feature bits from the [`Init`] message.
- * This is required to match the equivalent field in [`OpenChannel::channel_type`].
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
- bindings.AcceptChannel_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
- }
-
/**
* Constructs a new AcceptChannel given each field
- *
- * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static AcceptChannel of(byte[] temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) {
- long ret = bindings.AcceptChannel_new(InternalUtils.check_arr_len(temporary_channel_id_arg, 32), dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_point_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr);
- Reference.reachabilityFence(temporary_channel_id_arg);
- Reference.reachabilityFence(dust_limit_satoshis_arg);
- Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
+ public static AcceptChannel of(org.ldk.structs.CommonAcceptChannelFields common_fields_arg, long channel_reserve_satoshis_arg) {
+ long ret = bindings.AcceptChannel_new(common_fields_arg.ptr, channel_reserve_satoshis_arg);
+ Reference.reachabilityFence(common_fields_arg);
Reference.reachabilityFence(channel_reserve_satoshis_arg);
- Reference.reachabilityFence(htlc_minimum_msat_arg);
- Reference.reachabilityFence(minimum_depth_arg);
- Reference.reachabilityFence(to_self_delay_arg);
- Reference.reachabilityFence(max_accepted_htlcs_arg);
- Reference.reachabilityFence(funding_pubkey_arg);
- Reference.reachabilityFence(revocation_basepoint_arg);
- Reference.reachabilityFence(payment_point_arg);
- Reference.reachabilityFence(delayed_payment_basepoint_arg);
- Reference.reachabilityFence(htlc_basepoint_arg);
- Reference.reachabilityFence(first_per_commitment_point_arg);
- Reference.reachabilityFence(shutdown_scriptpubkey_arg);
- Reference.reachabilityFence(channel_type_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.AcceptChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AcceptChannel(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.AcceptChannel b) {
- boolean ret = bindings.AcceptChannel_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.AcceptChannel_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
}
/**
- * The same `temporary_channel_id` received from the initiator's `open_channel2` message.
+ * Common fields of `accept_channel(2)`-like messages
*/
- public byte[] get_temporary_channel_id() {
- byte[] ret = bindings.AcceptChannelV2_get_temporary_channel_id(this.ptr);
+ public CommonAcceptChannelFields get_common_fields() {
+ long ret = bindings.AcceptChannelV2_get_common_fields(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
- * The same `temporary_channel_id` received from the initiator's `open_channel2` message.
+ * Common fields of `accept_channel(2)`-like messages
*/
- public void set_temporary_channel_id(byte[] val) {
- bindings.AcceptChannelV2_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_common_fields(org.ldk.structs.CommonAcceptChannelFields val) {
+ bindings.AcceptChannelV2_set_common_fields(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
Reference.reachabilityFence(val);
}
- /**
- * The threshold below which outputs on transactions broadcast by the channel acceptor will be
- * omitted
- */
- public long get_dust_limit_satoshis() {
- long ret = bindings.AcceptChannelV2_get_dust_limit_satoshis(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The threshold below which outputs on transactions broadcast by the channel acceptor will be
- * omitted
- */
- public void set_dust_limit_satoshis(long val) {
- bindings.AcceptChannelV2_set_dust_limit_satoshis(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi
- */
- public long get_max_htlc_value_in_flight_msat() {
- long ret = bindings.AcceptChannelV2_get_max_htlc_value_in_flight_msat(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi
- */
- public void set_max_htlc_value_in_flight_msat(long val) {
- bindings.AcceptChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
- */
- public long get_htlc_minimum_msat() {
- long ret = bindings.AcceptChannelV2_get_htlc_minimum_msat(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
- */
- public void set_htlc_minimum_msat(long val) {
- bindings.AcceptChannelV2_set_htlc_minimum_msat(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Minimum depth of the funding transaction before the channel is considered open
- */
- public int get_minimum_depth() {
- int ret = bindings.AcceptChannelV2_get_minimum_depth(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Minimum depth of the funding transaction before the channel is considered open
- */
- public void set_minimum_depth(int val) {
- bindings.AcceptChannelV2_set_minimum_depth(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
- * broadcast a commitment transaction
- */
- public short get_to_self_delay() {
- short ret = bindings.AcceptChannelV2_get_to_self_delay(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
- * broadcast a commitment transaction
- */
- public void set_to_self_delay(short val) {
- bindings.AcceptChannelV2_set_to_self_delay(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The maximum number of inbound HTLCs towards channel acceptor
- */
- public short get_max_accepted_htlcs() {
- short ret = bindings.AcceptChannelV2_get_max_accepted_htlcs(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The maximum number of inbound HTLCs towards channel acceptor
- */
- public void set_max_accepted_htlcs(short val) {
- bindings.AcceptChannelV2_set_max_accepted_htlcs(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The channel acceptor's key controlling the funding transaction
- */
- public byte[] get_funding_pubkey() {
- byte[] ret = bindings.AcceptChannelV2_get_funding_pubkey(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The channel acceptor's key controlling the funding transaction
- */
- public void set_funding_pubkey(byte[] val) {
- bindings.AcceptChannelV2_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
- public byte[] get_revocation_basepoint() {
- byte[] ret = bindings.AcceptChannelV2_get_revocation_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
- public void set_revocation_basepoint(byte[] val) {
- bindings.AcceptChannelV2_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * A payment key to channel acceptor for transactions broadcast by counterparty
- */
- public byte[] get_payment_basepoint() {
- byte[] ret = bindings.AcceptChannelV2_get_payment_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * A payment key to channel acceptor for transactions broadcast by counterparty
- */
- public void set_payment_basepoint(byte[] val) {
- bindings.AcceptChannelV2_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive a payment key to channel acceptor for transactions broadcast by channel
- * acceptor
- */
- public byte[] get_delayed_payment_basepoint() {
- byte[] ret = bindings.AcceptChannelV2_get_delayed_payment_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive a payment key to channel acceptor for transactions broadcast by channel
- * acceptor
- */
- public void set_delayed_payment_basepoint(byte[] val) {
- bindings.AcceptChannelV2_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
- */
- public byte[] get_htlc_basepoint() {
- byte[] ret = bindings.AcceptChannelV2_get_htlc_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
- */
- public void set_htlc_basepoint(byte[] val) {
- bindings.AcceptChannelV2_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
- */
- public byte[] get_first_per_commitment_point() {
- byte[] ret = bindings.AcceptChannelV2_get_first_per_commitment_point(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
- */
- public void set_first_per_commitment_point(byte[] val) {
- bindings.AcceptChannelV2_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
/**
* The second to-be-broadcast-by-channel-acceptor transaction's per commitment point
*/
Reference.reachabilityFence(val);
}
- /**
- * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
- * collaboratively close
- */
- public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
- long ret = bindings.AcceptChannelV2_get_shutdown_scriptpubkey(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
- * collaboratively close
- */
- public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
- bindings.AcceptChannelV2_set_shutdown_scriptpubkey(this.ptr, val.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
- }
-
- /**
- * The channel type that this channel will represent. If none is set, we derive the channel
- * type from the intersection of our feature bits with our counterparty's feature bits from
- * the Init message.
- *
- * This is required to match the equivalent field in [`OpenChannelV2::channel_type`].
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- @Nullable
- public ChannelTypeFeatures get_channel_type() {
- long ret = bindings.AcceptChannelV2_get_channel_type(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * The channel type that this channel will represent. If none is set, we derive the channel
- * type from the intersection of our feature bits with our counterparty's feature bits from
- * the Init message.
- *
- * This is required to match the equivalent field in [`OpenChannelV2::channel_type`].
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
- bindings.AcceptChannelV2_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
- }
-
/**
* Optionally, a requirement that only confirmed inputs can be added
*/
/**
* Constructs a new AcceptChannelV2 given each field
- *
- * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static AcceptChannelV2 of(byte[] temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) {
- long ret = bindings.AcceptChannelV2_new(InternalUtils.check_arr_len(temporary_channel_id_arg, 32), funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, require_confirmed_inputs_arg);
- Reference.reachabilityFence(temporary_channel_id_arg);
+ public static AcceptChannelV2 of(org.ldk.structs.CommonAcceptChannelFields common_fields_arg, long funding_satoshis_arg, byte[] second_per_commitment_point_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) {
+ long ret = bindings.AcceptChannelV2_new(common_fields_arg.ptr, funding_satoshis_arg, InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), require_confirmed_inputs_arg);
+ Reference.reachabilityFence(common_fields_arg);
Reference.reachabilityFence(funding_satoshis_arg);
- Reference.reachabilityFence(dust_limit_satoshis_arg);
- Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
- Reference.reachabilityFence(htlc_minimum_msat_arg);
- Reference.reachabilityFence(minimum_depth_arg);
- Reference.reachabilityFence(to_self_delay_arg);
- Reference.reachabilityFence(max_accepted_htlcs_arg);
- Reference.reachabilityFence(funding_pubkey_arg);
- Reference.reachabilityFence(revocation_basepoint_arg);
- Reference.reachabilityFence(payment_basepoint_arg);
- Reference.reachabilityFence(delayed_payment_basepoint_arg);
- Reference.reachabilityFence(htlc_basepoint_arg);
- Reference.reachabilityFence(first_per_commitment_point_arg);
Reference.reachabilityFence(second_per_commitment_point_arg);
- Reference.reachabilityFence(shutdown_scriptpubkey_arg);
- Reference.reachabilityFence(channel_type_arg);
Reference.reachabilityFence(require_confirmed_inputs_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.AcceptChannelV2 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AcceptChannelV2(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.AcceptChannelV2 b) {
- boolean ret = bindings.AcceptChannelV2_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.AcceptChannelV2_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
*/
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
public class Amount extends CommonBase {
- Amount(Object _dummy, long ptr) { super(ptr); }
+ private Amount(Object _dummy, long ptr) { super(ptr); }
@Override @SuppressWarnings("deprecation")
protected void finalize() throws Throwable {
super.finalize();
if (ptr != 0) { bindings.Amount_free(ptr); }
}
+ static Amount constr_from_ptr(long ptr) {
+ bindings.LDKAmount raw_val = bindings.LDKAmount_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKAmount.Bitcoin.class) {
+ return new Bitcoin(ptr, (bindings.LDKAmount.Bitcoin)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKAmount.Currency.class) {
+ return new Currency(ptr, (bindings.LDKAmount.Currency)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+ /**
+ * An amount of bitcoin.
+ */
+ public final static class Bitcoin extends Amount {
+ /**
+ * The amount in millisatoshi.
+ */
+ public final long amount_msats;
+ private Bitcoin(long ptr, bindings.LDKAmount.Bitcoin obj) {
+ super(null, ptr);
+ this.amount_msats = obj.amount_msats;
+ }
+ }
+ /**
+ * An amount of currency specified using ISO 4712.
+ */
+ public final static class Currency extends Amount {
+ /**
+ * The currency that the amount is denominated in.
+ */
+ public final byte[] iso4217_code;
+ /**
+ * The amount in the currency unit adjusted by the ISO 4712 exponent (e.g., USD cents).
+ */
+ public final long amount;
+ private Currency(long ptr, bindings.LDKAmount.Currency obj) {
+ super(null, ptr);
+ this.iso4217_code = obj.iso4217_code;
+ this.amount = obj.amount;
+ }
+ }
long clone_ptr() {
long ret = bindings.Amount_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
long ret = bindings.Amount_clone(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+ org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new Bitcoin-variant Amount
+ */
+ public static Amount bitcoin(long amount_msats) {
+ long ret = bindings.Amount_bitcoin(amount_msats);
+ Reference.reachabilityFence(amount_msats);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Currency-variant Amount
+ */
+ public static Amount currency(byte[] iso4217_code, long amount) {
+ long ret = bindings.Amount_currency(InternalUtils.check_arr_len(iso4217_code, 3), amount);
+ Reference.reachabilityFence(iso4217_code);
+ Reference.reachabilityFence(amount);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
}
* The parameters required to derive the signer for the anchor input.
*/
public void set_channel_derivation_parameters(org.ldk.structs.ChannelDerivationParameters val) {
- bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0 : val.ptr);
+ bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* output.
*/
public void set_outpoint(org.ldk.structs.OutPoint val) {
- bindings.AnchorDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+ bindings.AnchorDescriptor_set_outpoint(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new AnchorDescriptor given each field
*/
public static AnchorDescriptor of(org.ldk.structs.ChannelDerivationParameters channel_derivation_parameters_arg, org.ldk.structs.OutPoint outpoint_arg) {
- long ret = bindings.AnchorDescriptor_new(channel_derivation_parameters_arg == null ? 0 : channel_derivation_parameters_arg.ptr, outpoint_arg == null ? 0 : outpoint_arg.ptr);
+ long ret = bindings.AnchorDescriptor_new(channel_derivation_parameters_arg.ptr, outpoint_arg.ptr);
Reference.reachabilityFence(channel_derivation_parameters_arg);
Reference.reachabilityFence(outpoint_arg);
if (ret >= 0 && ret <= 4096) { return null; }
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.AnchorDescriptor b) {
- boolean ret = bindings.AnchorDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.AnchorDescriptor_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.AnnouncementSignatures_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.AnnouncementSignatures_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new AnnouncementSignatures given each field
*/
- public static AnnouncementSignatures of(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) {
- long ret = bindings.AnnouncementSignatures_new(InternalUtils.check_arr_len(channel_id_arg, 32), short_channel_id_arg, InternalUtils.check_arr_len(node_signature_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_arg, 64));
+ public static AnnouncementSignatures of(org.ldk.structs.ChannelId channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) {
+ long ret = bindings.AnnouncementSignatures_new(channel_id_arg.ptr, short_channel_id_arg, InternalUtils.check_arr_len(node_signature_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_arg, 64));
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(short_channel_id_arg);
Reference.reachabilityFence(node_signature_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.AnnouncementSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AnnouncementSignatures(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.AnnouncementSignatures b) {
- boolean ret = bindings.AnnouncementSignatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.AnnouncementSignatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* However, as long as [`ChannelMonitor`] backups are sound, no funds besides those used for
* unilateral chain closure fees are at risk.
*
+ * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
+ * [`ChannelManager::timer_tick_occurred`]: lightning::ln::channelmanager::ChannelManager::timer_tick_occurred
* [`ChannelMonitor`]: lightning::chain::channelmonitor::ChannelMonitor
* [`Event`]: lightning::events::Event
* [`PeerManager::timer_tick_occurred`]: lightning::ln::peer_handler::PeerManager::timer_tick_occurred
* [`NetworkGraph::write`]: lightning::routing::gossip::NetworkGraph#impl-Writeable
*/
public static BackgroundProcessor start(org.ldk.structs.Persister persister, org.ldk.structs.EventHandler event_handler, org.ldk.structs.ChainMonitor chain_monitor, org.ldk.structs.ChannelManager channel_manager, org.ldk.structs.GossipSync gossip_sync, org.ldk.structs.PeerManager peer_manager, org.ldk.structs.Logger logger, org.ldk.structs.Option_WriteableScoreZ scorer) {
- long ret = bindings.BackgroundProcessor_start(persister.ptr, event_handler.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, channel_manager == null ? 0 : channel_manager.ptr, gossip_sync.ptr, peer_manager == null ? 0 : peer_manager.ptr, logger.ptr, scorer.ptr);
+ long ret = bindings.BackgroundProcessor_start(persister.ptr, event_handler.ptr, chain_monitor.ptr, channel_manager.ptr, gossip_sync.ptr, peer_manager.ptr, logger.ptr, scorer.ptr);
Reference.reachabilityFence(persister);
Reference.reachabilityFence(event_handler);
Reference.reachabilityFence(chain_monitor);
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.Balance b) {
- boolean ret = bindings.Balance_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Balance_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
if (ptr != 0) { bindings.BestBlock_free(ptr); }
}
+ /**
+ * The block's hash
+ */
+ public byte[] get_block_hash() {
+ byte[] ret = bindings.BestBlock_get_block_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The block's hash
+ */
+ public void set_block_hash(byte[] val) {
+ bindings.BestBlock_set_block_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The height at which the block was confirmed.
+ */
+ public int get_height() {
+ int ret = bindings.BestBlock_get_height(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The height at which the block was confirmed.
+ */
+ public void set_height(int val) {
+ bindings.BestBlock_set_height(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Constructs a new BestBlock given each field
+ */
+ public static BestBlock of(byte[] block_hash_arg, int height_arg) {
+ long ret = bindings.BestBlock_new(InternalUtils.check_arr_len(block_hash_arg, 32), height_arg);
+ Reference.reachabilityFence(block_hash_arg);
+ Reference.reachabilityFence(height_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
long clone_ptr() {
long ret = bindings.BestBlock_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
return ret_hu_conv;
}
+ /**
+ * Generates a non-cryptographic 64-bit hash of the BestBlock.
+ */
+ public long hash() {
+ long ret = bindings.BestBlock_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
/**
* Checks if two BestBlocks contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.BestBlock b) {
- boolean ret = bindings.BestBlock_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.BestBlock_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
}
/**
- * Returns a `BestBlock` as identified by the given block hash and height.
+ * Serialize the BestBlock object into a byte array which can be read by BestBlock_read
*/
- public static BestBlock of(byte[] block_hash, int height) {
- long ret = bindings.BestBlock_new(InternalUtils.check_arr_len(block_hash, 32), height);
- Reference.reachabilityFence(block_hash);
- Reference.reachabilityFence(height);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Returns the best block hash.
- */
- public byte[] block_hash() {
- byte[] ret = bindings.BestBlock_block_hash(this.ptr);
+ public byte[] write() {
+ byte[] ret = bindings.BestBlock_write(this.ptr);
Reference.reachabilityFence(this);
return ret;
}
/**
- * Returns the best block height.
+ * Read a BestBlock from a byte array, created by BestBlock_write
*/
- public int height() {
- int ret = bindings.BestBlock_height(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
+ public static Result_BestBlockDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.BestBlock_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
}
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.BigSize b) {
- boolean ret = bindings.BigSize_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.BigSize_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.BlindedForward b) {
- boolean ret = bindings.BlindedForward_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.BlindedForward_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.BlindedHop b) {
- boolean ret = bindings.BlindedHop_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.BlindedHop_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.BlindedHopFeatures b) {
- boolean ret = bindings.BlindedHopFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.BlindedHopFeatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns true if this `Features` object contains required features unknown by `other`.
*/
public boolean requires_unknown_bits_from(org.ldk.structs.BlindedHopFeatures other) {
- boolean ret = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+ boolean ret = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(other);
if (this != null) { this.ptrs_to.add(other); };
/**
* To send to a blinded path, the sender first finds a route to the unblinded
- * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion
+ * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion
* message or payment's next hop and forward it along.
*
* [`encrypted_payload`]: BlindedHop::encrypted_payload
*/
- public byte[] get_introduction_node_id() {
- byte[] ret = bindings.BlindedPath_get_introduction_node_id(this.ptr);
+ public IntroductionNode get_introduction_node() {
+ long ret = bindings.BlindedPath_get_introduction_node(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* To send to a blinded path, the sender first finds a route to the unblinded
- * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion
+ * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion
* message or payment's next hop and forward it along.
*
* [`encrypted_payload`]: BlindedHop::encrypted_payload
*/
- public void set_introduction_node_id(byte[] val) {
- bindings.BlindedPath_set_introduction_node_id(this.ptr, InternalUtils.check_arr_len(val, 33));
+ public void set_introduction_node(org.ldk.structs.IntroductionNode val) {
+ bindings.BlindedPath_set_introduction_node(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
* The hops composing the blinded path.
*/
public void set_blinded_hops(BlindedHop[] val) {
- bindings.BlindedPath_set_blinded_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12 == null ? 0 : val_conv_12.ptr).toArray() : null);
+ bindings.BlindedPath_set_blinded_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (BlindedHop val_conv_12: val) { if (this != null) { this.ptrs_to.add(val_conv_12); }; };
/**
* Constructs a new BlindedPath given each field
*/
- public static BlindedPath of(byte[] introduction_node_id_arg, byte[] blinding_point_arg, BlindedHop[] blinded_hops_arg) {
- long ret = bindings.BlindedPath_new(InternalUtils.check_arr_len(introduction_node_id_arg, 33), InternalUtils.check_arr_len(blinding_point_arg, 33), blinded_hops_arg != null ? Arrays.stream(blinded_hops_arg).mapToLong(blinded_hops_arg_conv_12 -> blinded_hops_arg_conv_12 == null ? 0 : blinded_hops_arg_conv_12.ptr).toArray() : null);
- Reference.reachabilityFence(introduction_node_id_arg);
+ public static BlindedPath of(org.ldk.structs.IntroductionNode introduction_node_arg, byte[] blinding_point_arg, BlindedHop[] blinded_hops_arg) {
+ long ret = bindings.BlindedPath_new(introduction_node_arg.ptr, InternalUtils.check_arr_len(blinding_point_arg, 33), blinded_hops_arg != null ? Arrays.stream(blinded_hops_arg).mapToLong(blinded_hops_arg_conv_12 -> blinded_hops_arg_conv_12.ptr).toArray() : null);
+ Reference.reachabilityFence(introduction_node_arg);
Reference.reachabilityFence(blinding_point_arg);
Reference.reachabilityFence(blinded_hops_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.BlindedPath ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BlindedPath(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(introduction_node_arg); };
for (BlindedHop blinded_hops_arg_conv_12: blinded_hops_arg) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(blinded_hops_arg_conv_12); }; };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.BlindedPath b) {
- boolean ret = bindings.BlindedPath_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.BlindedPath_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
return ret_hu_conv;
}
+ /**
+ * Returns the introduction [`NodeId`] of the blinded path, if it is publicly reachable (i.e.,
+ * it is found in the network graph).
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public NodeId public_introduction_node_id(org.ldk.structs.ReadOnlyNetworkGraph network_graph) {
+ long ret = bindings.BlindedPath_public_introduction_node_id(this.ptr, network_graph.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(network_graph);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ if (this != null) { this.ptrs_to.add(network_graph); };
+ return ret_hu_conv;
+ }
+
/**
* Serialize the BlindedPath object into a byte array which can be read by BlindedPath_read
*/
* onion payload.
*/
public void set_features(org.ldk.structs.BlindedHopFeatures val) {
- bindings.BlindedPayInfo_set_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.BlindedPayInfo_set_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new BlindedPayInfo given each field
*/
public static BlindedPayInfo of(int fee_base_msat_arg, int fee_proportional_millionths_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.BlindedHopFeatures features_arg) {
- long ret = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, features_arg == null ? 0 : features_arg.ptr);
+ long ret = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, features_arg.ptr);
Reference.reachabilityFence(fee_base_msat_arg);
Reference.reachabilityFence(fee_proportional_millionths_arg);
Reference.reachabilityFence(cltv_expiry_delta_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.BlindedPayInfo b) {
- boolean ret = bindings.BlindedPayInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.BlindedPayInfo_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* [`BlindedPath`]: crate::blinded_path::BlindedPath
*/
public void set_hops(BlindedHop[] val) {
- bindings.BlindedTail_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12 == null ? 0 : val_conv_12.ptr).toArray() : null);
+ bindings.BlindedTail_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (BlindedHop val_conv_12: val) { if (this != null) { this.ptrs_to.add(val_conv_12); }; };
* Constructs a new BlindedTail given each field
*/
public static BlindedTail of(BlindedHop[] hops_arg, byte[] blinding_point_arg, int excess_final_cltv_expiry_delta_arg, long final_value_msat_arg) {
- long ret = bindings.BlindedTail_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_12 -> hops_arg_conv_12 == null ? 0 : hops_arg_conv_12.ptr).toArray() : null, InternalUtils.check_arr_len(blinding_point_arg, 33), excess_final_cltv_expiry_delta_arg, final_value_msat_arg);
+ long ret = bindings.BlindedTail_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_12 -> hops_arg_conv_12.ptr).toArray() : null, InternalUtils.check_arr_len(blinding_point_arg, 33), excess_final_cltv_expiry_delta_arg, final_value_msat_arg);
Reference.reachabilityFence(hops_arg);
Reference.reachabilityFence(blinding_point_arg);
Reference.reachabilityFence(excess_final_cltv_expiry_delta_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.BlindedTail b) {
- boolean ret = bindings.BlindedTail_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.BlindedTail_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Bolt11Invoice b) {
- boolean ret = bindings.Bolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Bolt11Invoice_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* ```
*/
public static Result_Bolt11InvoiceBolt11SemanticErrorZ from_signed(org.ldk.structs.SignedRawBolt11Invoice signed_invoice) {
- long ret = bindings.Bolt11Invoice_from_signed(signed_invoice == null ? 0 : signed_invoice.ptr);
+ long ret = bindings.Bolt11Invoice_from_signed(signed_invoice.ptr);
Reference.reachabilityFence(signed_invoice);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt11InvoiceBolt11SemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret);
return ret;
}
+ /**
+ * Recover the payee's public key if one was included in the invoice, otherwise return the
+ * recovered public key from the signature
+ */
+ public byte[] get_payee_pub_key() {
+ byte[] ret = bindings.Bolt11Invoice_get_payee_pub_key(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Returns the Duration since the Unix epoch at which the invoice expires.
* Returning None if overflow occurred.
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Bolt11InvoiceFeatures b) {
- boolean ret = bindings.Bolt11InvoiceFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Bolt11InvoiceFeatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns true if this `Features` object contains required features unknown by `other`.
*/
public boolean requires_unknown_bits_from(org.ldk.structs.Bolt11InvoiceFeatures other) {
- boolean ret = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+ boolean ret = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(other);
if (this != null) { this.ptrs_to.add(other); };
return ret;
}
+ /**
+ * Set this feature as optional.
+ */
+ public void set_trampoline_routing_optional() {
+ bindings.Bolt11InvoiceFeatures_set_trampoline_routing_optional(this.ptr);
+ Reference.reachabilityFence(this);
+ }
+
+ /**
+ * Set this feature as required.
+ */
+ public void set_trampoline_routing_required() {
+ bindings.Bolt11InvoiceFeatures_set_trampoline_routing_required(this.ptr);
+ Reference.reachabilityFence(this);
+ }
+
+ /**
+ * Checks if this feature is supported.
+ */
+ public boolean supports_trampoline_routing() {
+ boolean ret = bindings.Bolt11InvoiceFeatures_supports_trampoline_routing(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Checks if this feature is required.
+ */
+ public boolean requires_trampoline_routing() {
+ boolean ret = bindings.Bolt11InvoiceFeatures_requires_trampoline_routing(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Bolt11InvoiceSignature b) {
- boolean ret = bindings.Bolt11InvoiceSignature_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Bolt11InvoiceSignature_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.Bolt11ParseError b) {
- boolean ret = bindings.Bolt11ParseError_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Bolt11ParseError_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
*
* [`Offer`]: crate::offers::offer::Offer
* [`Offer::amount`]: crate::offers::offer::Offer::amount
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- @Nullable
- public Amount amount() {
+ public Option_AmountZ amount() {
long ret = bindings.Bolt12Invoice_amount(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+ org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
* From [`Offer::description`] or [`Refund::description`].
*
* [`Offer::description`]: crate::offers::offer::Offer::description
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public PrintableString description() {
long ret = bindings.Bolt12Invoice_description(this.ptr);
Reference.reachabilityFence(this);
* [`Refund`].
*
* [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- @Nullable
- public Quantity supported_quantity() {
+ public Option_QuantityZ supported_quantity() {
long ret = bindings.Bolt12Invoice_supported_quantity(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+ org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
* the associated [`PaymentId`] to use when sending the payment.
*/
public Result_ThirtyTwoBytesNoneZ verify(org.ldk.structs.ExpandedKey key) {
- long ret = bindings.Bolt12Invoice_verify(this.ptr, key == null ? 0 : key.ptr);
+ long ret = bindings.Bolt12Invoice_verify(this.ptr, key.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(key);
if (ret >= 0 && ret <= 4096) { return null; }
return ret_hu_conv;
}
+ /**
+ * Generates a non-cryptographic 64-bit hash of the Bolt12Invoice.
+ */
+ public long hash() {
+ long ret = bindings.Bolt12Invoice_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
/**
* Serialize the Bolt12Invoice object into a byte array which can be read by Bolt12Invoice_read
*/
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Bolt12InvoiceFeatures b) {
- boolean ret = bindings.Bolt12InvoiceFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Bolt12InvoiceFeatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns true if this `Features` object contains required features unknown by `other`.
*/
public boolean requires_unknown_bits_from(org.ldk.structs.Bolt12InvoiceFeatures other) {
- boolean ret = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+ boolean ret = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(other);
if (this != null) { this.ptrs_to.add(other); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The context of a payment made for an invoice requested from a BOLT 12 [`Offer`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Bolt12OfferContext extends CommonBase {
+ Bolt12OfferContext(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.Bolt12OfferContext_free(ptr); }
+ }
+
+ /**
+ * The identifier of the [`Offer`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+ public OfferId get_offer_id() {
+ long ret = bindings.Bolt12OfferContext_get_offer_id(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The identifier of the [`Offer`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+ public void set_offer_id(org.ldk.structs.OfferId val) {
+ bindings.Bolt12OfferContext_set_offer_id(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`].
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+ public InvoiceRequestFields get_invoice_request() {
+ long ret = bindings.Bolt12OfferContext_get_invoice_request(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`].
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+ public void set_invoice_request(org.ldk.structs.InvoiceRequestFields val) {
+ bindings.Bolt12OfferContext_set_invoice_request(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * Constructs a new Bolt12OfferContext given each field
+ */
+ public static Bolt12OfferContext of(org.ldk.structs.OfferId offer_id_arg, org.ldk.structs.InvoiceRequestFields invoice_request_arg) {
+ long ret = bindings.Bolt12OfferContext_new(offer_id_arg.ptr, invoice_request_arg.ptr);
+ Reference.reachabilityFence(offer_id_arg);
+ Reference.reachabilityFence(invoice_request_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt12OfferContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(offer_id_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(invoice_request_arg); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.Bolt12OfferContext_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the Bolt12OfferContext
+ */
+ public Bolt12OfferContext clone() {
+ long ret = bindings.Bolt12OfferContext_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt12OfferContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two Bolt12OfferContexts contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.Bolt12OfferContext b) {
+ boolean ret = bindings.Bolt12OfferContext_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof Bolt12OfferContext)) return false;
+ return this.eq((Bolt12OfferContext)o);
+ }
+ /**
+ * Serialize the Bolt12OfferContext object into a byte array which can be read by Bolt12OfferContext_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.Bolt12OfferContext_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a Bolt12OfferContext from a byte array, created by Bolt12OfferContext_write
+ */
+ public static Result_Bolt12OfferContextDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.Bolt12OfferContext_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The context of a payment made for an invoice sent for a BOLT 12 [`Refund`].
+ *
+ * [`Refund`]: crate::offers::refund::Refund
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Bolt12RefundContext extends CommonBase {
+ Bolt12RefundContext(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.Bolt12RefundContext_free(ptr); }
+ }
+
+ /**
+ * Constructs a new Bolt12RefundContext given each field
+ */
+ public static Bolt12RefundContext of() {
+ long ret = bindings.Bolt12RefundContext_new();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt12RefundContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.Bolt12RefundContext_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the Bolt12RefundContext
+ */
+ public Bolt12RefundContext clone() {
+ long ret = bindings.Bolt12RefundContext_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt12RefundContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two Bolt12RefundContexts contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.Bolt12RefundContext b) {
+ boolean ret = bindings.Bolt12RefundContext_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof Bolt12RefundContext)) return false;
+ return this.eq((Bolt12RefundContext)o);
+ }
+ /**
+ * Serialize the Bolt12RefundContext object into a byte array which can be read by Bolt12RefundContext_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.Bolt12RefundContext_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a Bolt12RefundContext from a byte array, created by Bolt12RefundContext_write
+ */
+ public static Result_Bolt12RefundContextDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.Bolt12RefundContext_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
* [`build_anchor_input_witness`]: crate::ln::chan_utils::build_anchor_input_witness
*/
public final static class ChannelClose extends BumpTransactionEvent {
+ /**
+ * The `channel_id` of the channel which has been closed.
+ */
+ public final org.ldk.structs.ChannelId channel_id;
+ /**
+ * Counterparty in the closed channel.
+ */
+ public final byte[] counterparty_node_id;
/**
* The unique identifier for the claim of the anchor output in the commitment transaction.
*
public final HTLCOutputInCommitment[] pending_htlcs;
private ChannelClose(long ptr, bindings.LDKBumpTransactionEvent.ChannelClose obj) {
super(null, ptr);
+ long channel_id = obj.channel_id;
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+ if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ this.channel_id = channel_id_hu_conv;
+ this.counterparty_node_id = obj.counterparty_node_id;
this.claim_id = obj.claim_id;
this.package_target_feerate_sat_per_1000_weight = obj.package_target_feerate_sat_per_1000_weight;
this.commitment_tx = obj.commitment_tx;
* [`EcdsaChannelSigner::sign_holder_htlc_transaction`]: crate::sign::ecdsa::EcdsaChannelSigner::sign_holder_htlc_transaction
*/
public final static class HTLCResolution extends BumpTransactionEvent {
+ /**
+ * The `channel_id` of the channel which has been closed.
+ */
+ public final org.ldk.structs.ChannelId channel_id;
+ /**
+ * Counterparty in the closed channel.
+ */
+ public final byte[] counterparty_node_id;
/**
* The unique identifier for the claim of the HTLCs in the confirmed commitment
* transaction.
public final int tx_lock_time;
private HTLCResolution(long ptr, bindings.LDKBumpTransactionEvent.HTLCResolution obj) {
super(null, ptr);
+ long channel_id = obj.channel_id;
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+ if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ this.channel_id = channel_id_hu_conv;
+ this.counterparty_node_id = obj.counterparty_node_id;
this.claim_id = obj.claim_id;
this.target_feerate_sat_per_1000_weight = obj.target_feerate_sat_per_1000_weight;
long[] htlc_descriptors = obj.htlc_descriptors;
/**
* Utility method to constructs a new ChannelClose-variant BumpTransactionEvent
*/
- public static BumpTransactionEvent channel_close(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, org.ldk.structs.AnchorDescriptor anchor_descriptor, HTLCOutputInCommitment[] pending_htlcs) {
- long ret = bindings.BumpTransactionEvent_channel_close(InternalUtils.check_arr_len(claim_id, 32), package_target_feerate_sat_per_1000_weight, commitment_tx, commitment_tx_fee_satoshis, anchor_descriptor == null ? 0 : anchor_descriptor.ptr, pending_htlcs != null ? Arrays.stream(pending_htlcs).mapToLong(pending_htlcs_conv_24 -> pending_htlcs_conv_24 == null ? 0 : pending_htlcs_conv_24.ptr).toArray() : null);
+ public static BumpTransactionEvent channel_close(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, org.ldk.structs.AnchorDescriptor anchor_descriptor, HTLCOutputInCommitment[] pending_htlcs) {
+ long ret = bindings.BumpTransactionEvent_channel_close(channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), InternalUtils.check_arr_len(claim_id, 32), package_target_feerate_sat_per_1000_weight, commitment_tx, commitment_tx_fee_satoshis, anchor_descriptor.ptr, pending_htlcs != null ? Arrays.stream(pending_htlcs).mapToLong(pending_htlcs_conv_24 -> pending_htlcs_conv_24.ptr).toArray() : null);
+ Reference.reachabilityFence(channel_id);
+ Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(claim_id);
Reference.reachabilityFence(package_target_feerate_sat_per_1000_weight);
Reference.reachabilityFence(commitment_tx);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.BumpTransactionEvent ret_hu_conv = org.ldk.structs.BumpTransactionEvent.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(anchor_descriptor); };
for (HTLCOutputInCommitment pending_htlcs_conv_24: pending_htlcs) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(pending_htlcs_conv_24); }; };
return ret_hu_conv;
/**
* Utility method to constructs a new HTLCResolution-variant BumpTransactionEvent
*/
- public static BumpTransactionEvent htlcresolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, HTLCDescriptor[] htlc_descriptors, int tx_lock_time) {
- long ret = bindings.BumpTransactionEvent_htlcresolution(InternalUtils.check_arr_len(claim_id, 32), target_feerate_sat_per_1000_weight, htlc_descriptors != null ? Arrays.stream(htlc_descriptors).mapToLong(htlc_descriptors_conv_16 -> htlc_descriptors_conv_16 == null ? 0 : htlc_descriptors_conv_16.ptr).toArray() : null, tx_lock_time);
+ public static BumpTransactionEvent htlcresolution(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, HTLCDescriptor[] htlc_descriptors, int tx_lock_time) {
+ long ret = bindings.BumpTransactionEvent_htlcresolution(channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), InternalUtils.check_arr_len(claim_id, 32), target_feerate_sat_per_1000_weight, htlc_descriptors != null ? Arrays.stream(htlc_descriptors).mapToLong(htlc_descriptors_conv_16 -> htlc_descriptors_conv_16.ptr).toArray() : null, tx_lock_time);
+ Reference.reachabilityFence(channel_id);
+ Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(claim_id);
Reference.reachabilityFence(target_feerate_sat_per_1000_weight);
Reference.reachabilityFence(htlc_descriptors);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.BumpTransactionEvent ret_hu_conv = org.ldk.structs.BumpTransactionEvent.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
for (HTLCDescriptor htlc_descriptors_conv_16: htlc_descriptors) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(htlc_descriptors_conv_16); }; };
return ret_hu_conv;
}
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.BumpTransactionEvent b) {
- boolean ret = bindings.BumpTransactionEvent_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.BumpTransactionEvent_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Handles all variants of [`BumpTransactionEvent`].
*/
public void handle_event(org.ldk.structs.BumpTransactionEvent event) {
- bindings.BumpTransactionEventHandler_handle_event(this.ptr, event == null ? 0 : event.ptr);
+ bindings.BumpTransactionEventHandler_handle_event(this.ptr, event.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(event);
}
* Utility method to constructs a new FirstHop-variant CandidateRouteHop
*/
public static CandidateRouteHop first_hop(org.ldk.structs.FirstHopCandidate a) {
- long ret = bindings.CandidateRouteHop_first_hop(a == null ? 0 : a.ptr);
+ long ret = bindings.CandidateRouteHop_first_hop(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
* Utility method to constructs a new PublicHop-variant CandidateRouteHop
*/
public static CandidateRouteHop public_hop(org.ldk.structs.PublicHopCandidate a) {
- long ret = bindings.CandidateRouteHop_public_hop(a == null ? 0 : a.ptr);
+ long ret = bindings.CandidateRouteHop_public_hop(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
* Utility method to constructs a new PrivateHop-variant CandidateRouteHop
*/
public static CandidateRouteHop private_hop(org.ldk.structs.PrivateHopCandidate a) {
- long ret = bindings.CandidateRouteHop_private_hop(a == null ? 0 : a.ptr);
+ long ret = bindings.CandidateRouteHop_private_hop(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
* Utility method to constructs a new Blinded-variant CandidateRouteHop
*/
public static CandidateRouteHop blinded(org.ldk.structs.BlindedPathCandidate a) {
- long ret = bindings.CandidateRouteHop_blinded(a == null ? 0 : a.ptr);
+ long ret = bindings.CandidateRouteHop_blinded(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
* Utility method to constructs a new OneHopBlinded-variant CandidateRouteHop
*/
public static CandidateRouteHop one_hop_blinded(org.ldk.structs.OneHopBlindedPathCandidate a) {
- long ret = bindings.CandidateRouteHop_one_hop_blinded(a == null ? 0 : a.ptr);
+ long ret = bindings.CandidateRouteHop_one_hop_blinded(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
* inclusion in the return value.
*/
public Balance[] get_claimable_balances(ChannelDetails[] ignored_channels) {
- long[] ret = bindings.ChainMonitor_get_claimable_balances(this.ptr, ignored_channels != null ? Arrays.stream(ignored_channels).mapToLong(ignored_channels_conv_16 -> ignored_channels_conv_16 == null ? 0 : ignored_channels_conv_16.ptr).toArray() : null);
+ long[] ret = bindings.ChainMonitor_get_claimable_balances(this.ptr, ignored_channels != null ? Arrays.stream(ignored_channels).mapToLong(ignored_channels_conv_16 -> ignored_channels_conv_16.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(ignored_channels);
int ret_conv_9_len = ret.length;
* indefinitely.
*/
public Result_LockedChannelMonitorNoneZ get_monitor(org.ldk.structs.OutPoint funding_txo) {
- long ret = bindings.ChainMonitor_get_monitor(this.ptr, funding_txo == null ? 0 : funding_txo.ptr);
+ long ret = bindings.ChainMonitor_get_monitor(this.ptr, funding_txo.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(funding_txo);
if (ret >= 0 && ret <= 4096) { return null; }
}
/**
- * Lists the funding outpoint of each [`ChannelMonitor`] being monitored.
+ * Lists the funding outpoint and channel ID of each [`ChannelMonitor`] being monitored.
*
* Note that [`ChannelMonitor`]s are not removed when a channel is closed as they are always
* monitoring for on-chain state resolutions.
*/
- public OutPoint[] list_monitors() {
+ public TwoTuple_OutPointChannelIdZ[] list_monitors() {
long[] ret = bindings.ChainMonitor_list_monitors(this.ptr);
Reference.reachabilityFence(this);
- int ret_conv_10_len = ret.length;
- OutPoint[] ret_conv_10_arr = new OutPoint[ret_conv_10_len];
- for (int k = 0; k < ret_conv_10_len; k++) {
- long ret_conv_10 = ret[k];
- org.ldk.structs.OutPoint ret_conv_10_hu_conv = null; if (ret_conv_10 < 0 || ret_conv_10 > 4096) { ret_conv_10_hu_conv = new org.ldk.structs.OutPoint(null, ret_conv_10); }
- if (ret_conv_10_hu_conv != null) { ret_conv_10_hu_conv.ptrs_to.add(this); };
- ret_conv_10_arr[k] = ret_conv_10_hu_conv;
+ int ret_conv_29_len = ret.length;
+ TwoTuple_OutPointChannelIdZ[] ret_conv_29_arr = new TwoTuple_OutPointChannelIdZ[ret_conv_29_len];
+ for (int d = 0; d < ret_conv_29_len; d++) {
+ long ret_conv_29 = ret[d];
+ TwoTuple_OutPointChannelIdZ ret_conv_29_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret_conv_29);
+ if (ret_conv_29_hu_conv != null) { ret_conv_29_hu_conv.ptrs_to.add(this); };
+ ret_conv_29_arr[d] = ret_conv_29_hu_conv;
}
- return ret_conv_10_arr;
+ return ret_conv_29_arr;
}
/**
* registered [`ChannelMonitor`]s.
*/
public Result_NoneAPIErrorZ channel_monitor_updated(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.MonitorUpdateId completed_update_id) {
- long ret = bindings.ChainMonitor_channel_monitor_updated(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, completed_update_id == null ? 0 : completed_update_id.ptr);
+ long ret = bindings.ChainMonitor_channel_monitor_updated(this.ptr, funding_txo.ptr, completed_update_id.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(funding_txo);
Reference.reachabilityFence(completed_update_id);
Reference.reachabilityFence(this);
}
+ /**
+ * Triggers rebroadcasts of pending claims from force-closed channels after a transaction
+ * signature generation failure.
+ *
+ * `monitor_opt` can be used as a filter to only trigger them for a specific channel monitor.
+ *
+ * Note that monitor_opt (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void signer_unblocked(@Nullable org.ldk.structs.OutPoint monitor_opt) {
+ bindings.ChainMonitor_signer_unblocked(this.ptr, monitor_opt == null ? 0 : monitor_opt.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(monitor_opt);
+ if (this != null) { this.ptrs_to.add(monitor_opt); };
+ }
+
+ /**
+ * Archives fully resolved channel monitors by calling [`Persist::archive_persisted_channel`].
+ *
+ * This is useful for pruning fully resolved monitors from the monitor set and primary
+ * storage so they are not kept in memory and reloaded on restart.
+ *
+ * Should be called occasionally (once every handful of blocks or on startup).
+ *
+ * Depending on the implementation of [`Persist::archive_persisted_channel`] the monitor
+ * data could be moved to an archive location or removed entirely.
+ */
+ public void archive_fully_resolved_channel_monitors() {
+ bindings.ChainMonitor_archive_fully_resolved_channel_monitors(this.ptr);
+ Reference.reachabilityFence(this);
+ }
+
/**
* Constructs a new Listen which calls the relevant methods on this_arg.
* This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is
* Used to track on-chain channel funding outputs and send payments with reliable timelocks.
*/
public void set_best_block(org.ldk.structs.BestBlock val) {
- bindings.ChainParameters_set_best_block(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChainParameters_set_best_block(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new ChainParameters given each field
*/
public static ChainParameters of(org.ldk.enums.Network network_arg, org.ldk.structs.BestBlock best_block_arg) {
- long ret = bindings.ChainParameters_new(network_arg, best_block_arg == null ? 0 : best_block_arg.ptr);
+ long ret = bindings.ChainParameters_new(network_arg, best_block_arg.ptr);
Reference.reachabilityFence(network_arg);
Reference.reachabilityFence(best_block_arg);
if (ret >= 0 && ret <= 4096) { return null; }
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * A helper trait that describes an on-chain wallet capable of returning a (change) destination
+ * script.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ChangeDestinationSource extends CommonBase {
+ final bindings.LDKChangeDestinationSource bindings_instance;
+ ChangeDestinationSource(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+ private ChangeDestinationSource(bindings.LDKChangeDestinationSource arg) {
+ super(bindings.LDKChangeDestinationSource_new(arg));
+ this.ptrs_to.add(arg);
+ this.bindings_instance = arg;
+ }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.ChangeDestinationSource_free(ptr); } super.finalize();
+ }
+ /**
+ * Destroys the object, freeing associated resources. After this call, any access
+ * to this object may result in a SEGFAULT or worse.
+ *
+ * You should generally NEVER call this method. You should let the garbage collector
+ * do this for you when it finalizes objects. However, it may be useful for types
+ * which represent locks and should be closed immediately to avoid holding locks
+ * until the GC runs.
+ */
+ public void destroy() {
+ if (ptr != 0) { bindings.ChangeDestinationSource_free(ptr); }
+ ptr = 0;
+ }
+ public static interface ChangeDestinationSourceInterface {
+ /**
+ * Returns a script pubkey which can be used as a change destination for
+ * [`OutputSpender::spend_spendable_outputs`].
+ *
+ * This method should return a different value each time it is called, to avoid linking
+ * on-chain funds controlled to the same user.
+ */
+ Result_CVec_u8ZNoneZ get_change_destination_script();
+ }
+ private static class LDKChangeDestinationSourceHolder { ChangeDestinationSource held; }
+ public static ChangeDestinationSource new_impl(ChangeDestinationSourceInterface arg) {
+ final LDKChangeDestinationSourceHolder impl_holder = new LDKChangeDestinationSourceHolder();
+ impl_holder.held = new ChangeDestinationSource(new bindings.LDKChangeDestinationSource() {
+ @Override public long get_change_destination_script() {
+ Result_CVec_u8ZNoneZ ret = arg.get_change_destination_script();
+ Reference.reachabilityFence(arg);
+ long result = ret.clone_ptr();
+ return result;
+ }
+ });
+ return impl_holder.held;
+ }
+ /**
+ * Returns a script pubkey which can be used as a change destination for
+ * [`OutputSpender::spend_spendable_outputs`].
+ *
+ * This method should return a different value each time it is called, to avoid linking
+ * on-chain funds controlled to the same user.
+ */
+ public Result_CVec_u8ZNoneZ get_change_destination_script() {
+ long ret = bindings.ChangeDestinationSource_get_change_destination_script(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_CVec_u8ZNoneZ ret_hu_conv = Result_CVec_u8ZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
* The actual announcement
*/
public void set_contents(org.ldk.structs.UnsignedChannelAnnouncement val) {
- bindings.ChannelAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelAnnouncement_set_contents(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new ChannelAnnouncement given each field
*/
public static ChannelAnnouncement of(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, org.ldk.structs.UnsignedChannelAnnouncement contents_arg) {
- long ret = bindings.ChannelAnnouncement_new(InternalUtils.check_arr_len(node_signature_1_arg, 64), InternalUtils.check_arr_len(node_signature_2_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_1_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_2_arg, 64), contents_arg == null ? 0 : contents_arg.ptr);
+ long ret = bindings.ChannelAnnouncement_new(InternalUtils.check_arr_len(node_signature_1_arg, 64), InternalUtils.check_arr_len(node_signature_2_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_1_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_2_arg, 64), contents_arg.ptr);
Reference.reachabilityFence(node_signature_1_arg);
Reference.reachabilityFence(node_signature_2_arg);
Reference.reachabilityFence(bitcoin_signature_1_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelAnnouncement b) {
- boolean ret = bindings.ChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelAnnouncement_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
}
/**
- * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too
- * small to claim on-chain.
+ * Limit our total exposure to potential loss to on-chain fees on close, including in-flight
+ * HTLCs which are burned to fees as they are too small to claim on-chain and fees on
+ * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate.
+ *
+ * # HTLC-based Dust Exposure
*
* When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will
* not be claimable on-chain, instead being turned into additional miner fees if either
* party force-closes the channel. Because the threshold is per-HTLC, our total exposure
- * to such payments may be sustantial if there are many dust HTLCs present when the
+ * to such payments may be substantial if there are many dust HTLCs present when the
* channel is force-closed.
*
* The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
* The selected limit is applied for sent, forwarded, and received HTLCs and limits the total
* exposure across all three types per-channel.
*
- * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000.
+ * # Transaction Fee Dust Exposure
+ *
+ * Further, counterparties broadcasting a commitment transaction in a force-close may result
+ * in other balance being burned to fees, and thus all fees on commitment and HTLC
+ * transactions in excess of our local fee estimates are included in the dust calculation.
+ *
+ * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750
+ * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per
+ * non-dust HTLC we're allowed to have with our peers before risking a force-closure for
+ * inbound channels.
+ *
+ * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500
+ * sat/KW), we risk force-closure if we disagree with our peer by:
+ * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in
+ * both directions (the maximum),
+ * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both
+ * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+ * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs
+ * in both directions (the maximum),
+ * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs
+ * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+ *
+ * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement
+ * will scale linearly with increases (or decreases) in the our feerate estimates. Further,
+ * for anchor channels we expect our counterparty to use a relatively low feerate estimate
+ * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and
+ * feerate disagreement force-closures should only occur when theirs is higher than ours.
+ *
+ * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000.
+ *
+ * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep
*/
public MaxDustHTLCExposure get_max_dust_htlc_exposure() {
long ret = bindings.ChannelConfig_get_max_dust_htlc_exposure(this.ptr);
}
/**
- * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too
- * small to claim on-chain.
+ * Limit our total exposure to potential loss to on-chain fees on close, including in-flight
+ * HTLCs which are burned to fees as they are too small to claim on-chain and fees on
+ * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate.
+ *
+ * # HTLC-based Dust Exposure
*
* When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will
* not be claimable on-chain, instead being turned into additional miner fees if either
* party force-closes the channel. Because the threshold is per-HTLC, our total exposure
- * to such payments may be sustantial if there are many dust HTLCs present when the
+ * to such payments may be substantial if there are many dust HTLCs present when the
* channel is force-closed.
*
* The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
* The selected limit is applied for sent, forwarded, and received HTLCs and limits the total
* exposure across all three types per-channel.
*
- * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000.
+ * # Transaction Fee Dust Exposure
+ *
+ * Further, counterparties broadcasting a commitment transaction in a force-close may result
+ * in other balance being burned to fees, and thus all fees on commitment and HTLC
+ * transactions in excess of our local fee estimates are included in the dust calculation.
+ *
+ * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750
+ * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per
+ * non-dust HTLC we're allowed to have with our peers before risking a force-closure for
+ * inbound channels.
+ *
+ * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500
+ * sat/KW), we risk force-closure if we disagree with our peer by:
+ * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in
+ * both directions (the maximum),
+ * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both
+ * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+ * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs
+ * in both directions (the maximum),
+ * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs
+ * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+ *
+ * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement
+ * will scale linearly with increases (or decreases) in the our feerate estimates. Further,
+ * for anchor channels we expect our counterparty to use a relatively low feerate estimate
+ * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and
+ * feerate disagreement force-closures should only occur when theirs is higher than ours.
+ *
+ * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000.
+ *
+ * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep
*/
public void set_max_dust_htlc_exposure(org.ldk.structs.MaxDustHTLCExposure val) {
bindings.ChannelConfig_set_max_dust_htlc_exposure(this.ptr, val.ptr);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelConfig b) {
- boolean ret = bindings.ChannelConfig_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelConfig_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Applies the given [`ChannelConfigUpdate`] as a partial update to the [`ChannelConfig`].
*/
public void apply(org.ldk.structs.ChannelConfigUpdate update) {
- bindings.ChannelConfig_apply(this.ptr, update == null ? 0 : update.ptr);
+ bindings.ChannelConfig_apply(this.ptr, update.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(update);
if (this != null) { this.ptrs_to.add(update); };
* many routing-relevant features are present in the init context.
*/
public void set_features(org.ldk.structs.InitFeatures val) {
- bindings.ChannelCounterparty_set_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelCounterparty_set_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Note that forwarding_info_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static ChannelCounterparty of(byte[] node_id_arg, org.ldk.structs.InitFeatures features_arg, long unspendable_punishment_reserve_arg, @Nullable org.ldk.structs.CounterpartyForwardingInfo forwarding_info_arg, org.ldk.structs.Option_u64Z outbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z outbound_htlc_maximum_msat_arg) {
- long ret = bindings.ChannelCounterparty_new(InternalUtils.check_arr_len(node_id_arg, 33), features_arg == null ? 0 : features_arg.ptr, unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0 : forwarding_info_arg.ptr, outbound_htlc_minimum_msat_arg.ptr, outbound_htlc_maximum_msat_arg.ptr);
+ long ret = bindings.ChannelCounterparty_new(InternalUtils.check_arr_len(node_id_arg, 33), features_arg.ptr, unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0 : forwarding_info_arg.ptr, outbound_htlc_minimum_msat_arg.ptr, outbound_htlc_maximum_msat_arg.ptr);
Reference.reachabilityFence(node_id_arg);
Reference.reachabilityFence(features_arg);
Reference.reachabilityFence(unspendable_punishment_reserve_arg);
* [`ChannelSigner::provide_channel_parameters`].
*/
public void set_transaction_parameters(org.ldk.structs.ChannelTransactionParameters val) {
- bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new ChannelDerivationParameters given each field
*/
public static ChannelDerivationParameters of(long value_satoshis_arg, byte[] keys_id_arg, org.ldk.structs.ChannelTransactionParameters transaction_parameters_arg) {
- long ret = bindings.ChannelDerivationParameters_new(value_satoshis_arg, InternalUtils.check_arr_len(keys_id_arg, 32), transaction_parameters_arg == null ? 0 : transaction_parameters_arg.ptr);
+ long ret = bindings.ChannelDerivationParameters_new(value_satoshis_arg, InternalUtils.check_arr_len(keys_id_arg, 32), transaction_parameters_arg.ptr);
Reference.reachabilityFence(value_satoshis_arg);
Reference.reachabilityFence(keys_id_arg);
Reference.reachabilityFence(transaction_parameters_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelDerivationParameters b) {
- boolean ret = bindings.ChannelDerivationParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelDerivationParameters_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Note that this means this value is *not* persistent - it can change once during the
* lifetime of the channel.
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.ChannelDetails_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.ChannelDetails_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* Note that this means this value is *not* persistent - it can change once during the
* lifetime of the channel.
*/
- public void set_channel_id(byte[] val) {
- bindings.ChannelDetails_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.ChannelDetails_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
* Parameters which apply to our counterparty. See individual fields for more information.
*/
public void set_counterparty(org.ldk.structs.ChannelCounterparty val) {
- bindings.ChannelDetails_set_counterparty(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelDetails_set_counterparty(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* The Channel's funding transaction output, if we've negotiated the funding transaction with
* our counterparty already.
*
- * Note that, if this has been set, `channel_id` will be equivalent to
- * `funding_txo.unwrap().to_channel_id()`.
- *
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
@Nullable
* The Channel's funding transaction output, if we've negotiated the funding transaction with
* our counterparty already.
*
- * Note that, if this has been set, `channel_id` will be equivalent to
- * `funding_txo.unwrap().to_channel_id()`.
- *
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public void set_funding_txo(@Nullable org.ldk.structs.OutPoint val) {
if (this != null) { this.ptrs_to.add(val); };
}
- /**
- * Constructs a new ChannelDetails given each field
- *
- * Note that funding_txo_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
- * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
- * Note that config_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- public static ChannelDetails of(byte[] channel_id_arg, org.ldk.structs.ChannelCounterparty counterparty_arg, @Nullable org.ldk.structs.OutPoint funding_txo_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.structs.Option_u64Z short_channel_id_arg, org.ldk.structs.Option_u64Z outbound_scid_alias_arg, org.ldk.structs.Option_u64Z inbound_scid_alias_arg, long channel_value_satoshis_arg, org.ldk.structs.Option_u64Z unspendable_punishment_reserve_arg, org.ldk.util.UInt128 user_channel_id_arg, org.ldk.structs.Option_u32Z feerate_sat_per_1000_weight_arg, long balance_msat_arg, long outbound_capacity_msat_arg, long next_outbound_htlc_limit_msat_arg, long next_outbound_htlc_minimum_msat_arg, long inbound_capacity_msat_arg, org.ldk.structs.Option_u32Z confirmations_required_arg, org.ldk.structs.Option_u32Z confirmations_arg, org.ldk.structs.Option_u16Z force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_channel_ready_arg, org.ldk.structs.Option_ChannelShutdownStateZ channel_shutdown_state_arg, boolean is_usable_arg, boolean is_public_arg, org.ldk.structs.Option_u64Z inbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z inbound_htlc_maximum_msat_arg, @Nullable org.ldk.structs.ChannelConfig config_arg) {
- long ret = bindings.ChannelDetails_new(InternalUtils.check_arr_len(channel_id_arg, 32), counterparty_arg == null ? 0 : counterparty_arg.ptr, funding_txo_arg == null ? 0 : funding_txo_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, short_channel_id_arg.ptr, outbound_scid_alias_arg.ptr, inbound_scid_alias_arg.ptr, channel_value_satoshis_arg, unspendable_punishment_reserve_arg.ptr, user_channel_id_arg.getLEBytes(), feerate_sat_per_1000_weight_arg.ptr, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg.ptr, confirmations_arg.ptr, force_close_spend_delay_arg.ptr, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg.ptr, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg.ptr, inbound_htlc_maximum_msat_arg.ptr, config_arg == null ? 0 : config_arg.ptr);
- Reference.reachabilityFence(channel_id_arg);
- Reference.reachabilityFence(counterparty_arg);
- Reference.reachabilityFence(funding_txo_arg);
- Reference.reachabilityFence(channel_type_arg);
- Reference.reachabilityFence(short_channel_id_arg);
- Reference.reachabilityFence(outbound_scid_alias_arg);
- Reference.reachabilityFence(inbound_scid_alias_arg);
- Reference.reachabilityFence(channel_value_satoshis_arg);
- Reference.reachabilityFence(unspendable_punishment_reserve_arg);
- Reference.reachabilityFence(user_channel_id_arg);
- Reference.reachabilityFence(feerate_sat_per_1000_weight_arg);
- Reference.reachabilityFence(balance_msat_arg);
- Reference.reachabilityFence(outbound_capacity_msat_arg);
- Reference.reachabilityFence(next_outbound_htlc_limit_msat_arg);
- Reference.reachabilityFence(next_outbound_htlc_minimum_msat_arg);
- Reference.reachabilityFence(inbound_capacity_msat_arg);
- Reference.reachabilityFence(confirmations_required_arg);
- Reference.reachabilityFence(confirmations_arg);
- Reference.reachabilityFence(force_close_spend_delay_arg);
- Reference.reachabilityFence(is_outbound_arg);
- Reference.reachabilityFence(is_channel_ready_arg);
- Reference.reachabilityFence(channel_shutdown_state_arg);
- Reference.reachabilityFence(is_usable_arg);
- Reference.reachabilityFence(is_public_arg);
- Reference.reachabilityFence(inbound_htlc_minimum_msat_arg);
- Reference.reachabilityFence(inbound_htlc_maximum_msat_arg);
- Reference.reachabilityFence(config_arg);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.ChannelDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelDetails(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(counterparty_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_txo_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(short_channel_id_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outbound_scid_alias_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(inbound_scid_alias_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(unspendable_punishment_reserve_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(feerate_sat_per_1000_weight_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(confirmations_required_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(confirmations_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(force_close_spend_delay_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_shutdown_state_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(inbound_htlc_minimum_msat_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(inbound_htlc_maximum_msat_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(config_arg); };
- return ret_hu_conv;
- }
-
long clone_ptr() {
long ret = bindings.ChannelDetails_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelFeatures b) {
- boolean ret = bindings.ChannelFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelFeatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns true if this `Features` object contains required features unknown by `other`.
*/
public boolean requires_unknown_bits_from(org.ldk.structs.ChannelFeatures other) {
- boolean ret = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+ boolean ret = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(other);
if (this != null) { this.ptrs_to.add(other); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A unique 32-byte identifier for a channel.
+ * Depending on how the ID is generated, several varieties are distinguished
+ * (but all are stored as 32 bytes):
+ * _v1_ and _temporary_.
+ * A _v1_ channel ID is generated based on funding tx outpoint (txid & index).
+ * A _temporary_ ID is generated randomly.
+ * (Later revocation-point-based _v2_ is a possibility.)
+ * The variety (context) is not stored, it is relevant only at creation.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ChannelId extends CommonBase {
+ ChannelId(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.ChannelId_free(ptr); }
+ }
+
+ public byte[] get_a() {
+ byte[] ret = bindings.ChannelId_get_a(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ public void set_a(byte[] val) {
+ bindings.ChannelId_set_a(this.ptr, InternalUtils.check_arr_len(val, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Constructs a new ChannelId given each field
+ */
+ public static ChannelId of(byte[] a_arg) {
+ long ret = bindings.ChannelId_new(InternalUtils.check_arr_len(a_arg, 32));
+ Reference.reachabilityFence(a_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.ChannelId_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the ChannelId
+ */
+ public ChannelId clone() {
+ long ret = bindings.ChannelId_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two ChannelIds contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.ChannelId b) {
+ boolean ret = bindings.ChannelId_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof ChannelId)) return false;
+ return this.eq((ChannelId)o);
+ }
+ /**
+ * Generates a non-cryptographic 64-bit hash of the ChannelId.
+ */
+ public long hash() {
+ long ret = bindings.ChannelId_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Create _v1_ channel ID based on a funding TX ID and output index
+ */
+ public static ChannelId v1_from_funding_txid(byte[] txid, short output_index) {
+ long ret = bindings.ChannelId_v1_from_funding_txid(InternalUtils.check_arr_len(txid, 32), output_index);
+ Reference.reachabilityFence(txid);
+ Reference.reachabilityFence(output_index);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Create _v1_ channel ID from a funding tx outpoint
+ */
+ public static ChannelId v1_from_funding_outpoint(org.ldk.structs.OutPoint outpoint) {
+ long ret = bindings.ChannelId_v1_from_funding_outpoint(outpoint.ptr);
+ Reference.reachabilityFence(outpoint);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Create a _temporary_ channel ID randomly, based on an entropy source.
+ */
+ public static ChannelId temporary_from_entropy_source(org.ldk.structs.EntropySource entropy_source) {
+ long ret = bindings.ChannelId_temporary_from_entropy_source(entropy_source.ptr);
+ Reference.reachabilityFence(entropy_source);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generic constructor; create a new channel ID from the provided data.
+ * Use a more specific `*_from_*` constructor when possible.
+ */
+ public static ChannelId from_bytes(byte[] data) {
+ long ret = bindings.ChannelId_from_bytes(InternalUtils.check_arr_len(data, 32));
+ Reference.reachabilityFence(data);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Create a channel ID consisting of all-zeros data (e.g. when uninitialized or a placeholder).
+ */
+ public static ChannelId new_zero() {
+ long ret = bindings.ChannelId_new_zero();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Check whether ID is consisting of all zeros (uninitialized)
+ */
+ public boolean is_zero() {
+ boolean ret = bindings.ChannelId_is_zero(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Create _v2_ channel ID by concatenating the holder revocation basepoint with the counterparty
+ * revocation basepoint and hashing the result. The basepoints will be concatenated in increasing
+ * sorted order.
+ */
+ public static ChannelId v2_from_revocation_basepoints(org.ldk.structs.RevocationBasepoint ours, org.ldk.structs.RevocationBasepoint theirs) {
+ long ret = bindings.ChannelId_v2_from_revocation_basepoints(ours.ptr, theirs.ptr);
+ Reference.reachabilityFence(ours);
+ Reference.reachabilityFence(theirs);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ours); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(theirs); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Create temporary _v2_ channel ID by concatenating a zeroed out basepoint with the holder
+ * revocation basepoint and hashing the result.
+ */
+ public static ChannelId temporary_v2_from_revocation_basepoint(org.ldk.structs.RevocationBasepoint our_revocation_basepoint) {
+ long ret = bindings.ChannelId_temporary_v2_from_revocation_basepoint(our_revocation_basepoint.ptr);
+ Reference.reachabilityFence(our_revocation_basepoint);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(our_revocation_basepoint); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the ChannelId object into a byte array which can be read by ChannelId_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.ChannelId_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a ChannelId from a byte array, created by ChannelId_write
+ */
+ public static Result_ChannelIdDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.ChannelId_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
* Protocol features of a channel communicated during its announcement
*/
public void set_features(org.ldk.structs.ChannelFeatures val) {
- bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelInfo_set_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Source node of the first direction of a channel
*/
public void set_node_one(org.ldk.structs.NodeId val) {
- bindings.ChannelInfo_set_node_one(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelInfo_set_node_one(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Source node of the second direction of a channel
*/
public void set_node_two(org.ldk.structs.NodeId val) {
- bindings.ChannelInfo_set_node_two(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelInfo_set_node_two(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelInfo b) {
- boolean ret = bindings.ChannelInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelInfo_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
- * Manager which keeps track of a number of channels and sends messages to the appropriate
- * channel, also tracking HTLC preimages and forwarding onion packets appropriately.
+ * A lightning node's channel state machine and payment management logic, which facilitates
+ * sending, forwarding, and receiving payments through lightning channels.
*
- * Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through
- * to individual Channels.
+ * [`ChannelManager`] is parameterized by a number of components to achieve this.
+ * - [`chain::Watch`] (typically [`ChainMonitor`]) for on-chain monitoring and enforcement of each
+ * channel
+ * - [`BroadcasterInterface`] for broadcasting transactions related to opening, funding, and
+ * closing channels
+ * - [`EntropySource`] for providing random data needed for cryptographic operations
+ * - [`NodeSigner`] for cryptographic operations scoped to the node
+ * - [`SignerProvider`] for providing signers whose operations are scoped to individual channels
+ * - [`FeeEstimator`] to determine transaction fee rates needed to have a transaction mined in a
+ * timely manner
+ * - [`Router`] for finding payment paths when initiating and retrying payments
+ * - [`Logger`] for logging operational information of varying degrees
+ *
+ * Additionally, it implements the following traits:
+ * - [`ChannelMessageHandler`] to handle off-chain channel activity from peers
+ * - [`MessageSendEventsProvider`] to similarly send such messages to peers
+ * - [`OffersMessageHandler`] for BOLT 12 message handling and sending
+ * - [`EventsProvider`] to generate user-actionable [`Event`]s
+ * - [`chain::Listen`] and [`chain::Confirm`] for notification of on-chain activity
+ *
+ * Thus, [`ChannelManager`] is typically used to parameterize a [`MessageHandler`] and an
+ * [`OnionMessenger`]. The latter is required to support BOLT 12 functionality.
+ *
+ * # `ChannelManager` vs `ChannelMonitor`
+ *
+ * It's important to distinguish between the *off-chain* management and *on-chain* enforcement of
+ * lightning channels. [`ChannelManager`] exchanges messages with peers to manage the off-chain
+ * state of each channel. During this process, it generates a [`ChannelMonitor`] for each channel
+ * and a [`ChannelMonitorUpdate`] for each relevant change, notifying its parameterized
+ * [`chain::Watch`] of them.
+ *
+ * An implementation of [`chain::Watch`], such as [`ChainMonitor`], is responsible for aggregating
+ * these [`ChannelMonitor`]s and applying any [`ChannelMonitorUpdate`]s to them. It then monitors
+ * for any pertinent on-chain activity, enforcing claims as needed.
+ *
+ * This division of off-chain management and on-chain enforcement allows for interesting node
+ * setups. For instance, on-chain enforcement could be moved to a separate host or have added
+ * redundancy, possibly as a watchtower. See [`chain::Watch`] for the relevant interface.
+ *
+ * # Initialization
+ *
+ * Use [`ChannelManager::new`] with the most recent [`BlockHash`] when creating a fresh instance.
+ * Otherwise, if restarting, construct [`ChannelManagerReadArgs`] with the necessary parameters and
+ * references to any deserialized [`ChannelMonitor`]s that were previously persisted. Use this to
+ * deserialize the [`ChannelManager`] and feed it any new chain data since it was last online, as
+ * detailed in the [`ChannelManagerReadArgs`] documentation.
+ *
+ * ```
+ * use bitcoin::BlockHash;
+ * use bitcoin::network::constants::Network;
+ * use lightning::chain::BestBlock;
+ * # use lightning::chain::channelmonitor::ChannelMonitor;
+ * use lightning::ln::channelmanager::{ChainParameters, ChannelManager, ChannelManagerReadArgs};
+ * # use lightning::routing::gossip::NetworkGraph;
+ * use lightning::util::config::UserConfig;
+ * use lightning::util::ser::ReadableArgs;
+ *
+ * # fn read_channel_monitors() -> Vec<ChannelMonitor<lightning::sign::InMemorySigner>> { vec![] }
+ * # fn example<
+ * # 'a,
+ * # L: lightning::util::logger::Logger,
+ * # ES: lightning::sign::EntropySource,
+ * # S: for <'b> lightning::routing::scoring::LockableScore<'b, ScoreLookUp = SL>,
+ * # SL: lightning::routing::scoring::ScoreLookUp<ScoreParams = SP>,
+ * # SP: Sized,
+ * # R: lightning::io::Read,
+ * # >(
+ * # fee_estimator: &dyn lightning::chain::chaininterface::FeeEstimator,
+ * # chain_monitor: &dyn lightning::chain::Watch<lightning::sign::InMemorySigner>,
+ * # tx_broadcaster: &dyn lightning::chain::chaininterface::BroadcasterInterface,
+ * # router: &lightning::routing::router::DefaultRouter<&NetworkGraph<&'a L>, &'a L, &ES, &S, SP, SL>,
+ * # logger: &L,
+ * # entropy_source: &ES,
+ * # node_signer: &dyn lightning::sign::NodeSigner,
+ * # signer_provider: &lightning::sign::DynSignerProvider,
+ * # best_block: lightning::chain::BestBlock,
+ * # current_timestamp: u32,
+ * # mut reader: R,
+ * # ) -> Result<(), lightning::ln::msgs::DecodeError> {
+ * Fresh start with no channels
+ * let params = ChainParameters {
+ * network: Network::Bitcoin,
+ * best_block,
+ * };
+ * let default_config = UserConfig::default();
+ * let channel_manager = ChannelManager::new(
+ * fee_estimator, chain_monitor, tx_broadcaster, router, logger, entropy_source, node_signer,
+ * signer_provider, default_config, params, current_timestamp
+ * );
+ *
+ * Restart from deserialized data
+ * let mut channel_monitors = read_channel_monitors();
+ * let args = ChannelManagerReadArgs::new(
+ * entropy_source, node_signer, signer_provider, fee_estimator, chain_monitor, tx_broadcaster,
+ * router, logger, default_config, channel_monitors.iter_mut().collect()
+ * );
+ * let (block_hash, channel_manager) =
+ * <(BlockHash, ChannelManager<_, _, _, _, _, _, _, _>)>::read(&mut reader, args)?;
+ *
+ * Update the ChannelManager and ChannelMonitors with the latest chain data
+ * ...
+ *
+ * Move the monitors to the ChannelManager's chain::Watch parameter
+ * for monitor in channel_monitors {
+ * chain_monitor.watch_channel(monitor.get_funding_txo().0, monitor);
+ * }
+ * # Ok(())
+ * # }
+ * ```
+ *
+ * # Operation
+ *
+ * The following is required for [`ChannelManager`] to function properly:
+ * - Handle messages from peers using its [`ChannelMessageHandler`] implementation (typically
+ * called by [`PeerManager::read_event`] when processing network I/O)
+ * - Send messages to peers obtained via its [`MessageSendEventsProvider`] implementation
+ * (typically initiated when [`PeerManager::process_events`] is called)
+ * - Feed on-chain activity using either its [`chain::Listen`] or [`chain::Confirm`] implementation
+ * as documented by those traits
+ * - Perform any periodic channel and payment checks by calling [`timer_tick_occurred`] roughly
+ * every minute
+ * - Persist to disk whenever [`get_and_clear_needs_persistence`] returns `true` using a
+ * [`Persister`] such as a [`KVStore`] implementation
+ * - Handle [`Event`]s obtained via its [`EventsProvider`] implementation
+ *
+ * The [`Future`] returned by [`get_event_or_persistence_needed_future`] is useful in determining
+ * when the last two requirements need to be checked.
+ *
+ * The [`lightning-block-sync`] and [`lightning-transaction-sync`] crates provide utilities that
+ * simplify feeding in on-chain activity using the [`chain::Listen`] and [`chain::Confirm`] traits,
+ * respectively. The remaining requirements can be met using the [`lightning-background-processor`]
+ * crate. For languages other than Rust, the availability of similar utilities may vary.
+ *
+ * # Channels
+ *
+ * [`ChannelManager`]'s primary function involves managing a channel state. Without channels,
+ * payments can't be sent. Use [`list_channels`] or [`list_usable_channels`] for a snapshot of the
+ * currently open channels.
+ *
+ * ```
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let channels = channel_manager.list_usable_channels();
+ * for details in channels {
+ * println!(\"{:?}\", details);
+ * }
+ * # }
+ * ```
+ *
+ * Each channel is identified using a [`ChannelId`], which will change throughout the channel's
+ * life cycle. Additionally, channels are assigned a `user_channel_id`, which is given in
+ * [`Event`]s associated with the channel and serves as a fixed identifier but is otherwise unused
+ * by [`ChannelManager`].
+ *
+ * ## Opening Channels
+ *
+ * To an open a channel with a peer, call [`create_channel`]. This will initiate the process of
+ * opening an outbound channel, which requires self-funding when handling
+ * [`Event::FundingGenerationReady`].
+ *
+ * ```
+ * # use bitcoin::{ScriptBuf, Transaction};
+ * # use bitcoin::secp256k1::PublicKey;
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::events::{Event, EventsProvider};
+ * #
+ * # trait Wallet {
+ * # fn create_funding_transaction(
+ * # &self, _amount_sats: u64, _output_script: ScriptBuf
+ * # ) -> Transaction;
+ * # }
+ * #
+ * # fn example<T: AChannelManager, W: Wallet>(channel_manager: T, wallet: W, peer_id: PublicKey) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let value_sats = 1_000_000;
+ * let push_msats = 10_000_000;
+ * match channel_manager.create_channel(peer_id, value_sats, push_msats, 42, None, None) {
+ * Ok(channel_id) => println!(\"Opening channel {}\", channel_id),
+ * Err(e) => println!(\"Error opening channel: {:?}\", e),
+ * }
+ *
+ * On the event processing thread once the peer has responded
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::FundingGenerationReady {
+ * temporary_channel_id, counterparty_node_id, channel_value_satoshis, output_script,
+ * user_channel_id, ..
+ * } => {
+ * assert_eq!(user_channel_id, 42);
+ * let funding_transaction = wallet.create_funding_transaction(
+ * channel_value_satoshis, output_script
+ * );
+ * match channel_manager.funding_transaction_generated(
+ * &temporary_channel_id, &counterparty_node_id, funding_transaction
+ * ) {
+ * Ok(()) => println!(\"Funding channel {}\", temporary_channel_id),
+ * Err(e) => println!(\"Error funding channel {}: {:?}\", temporary_channel_id, e),
+ * }
+ * },
+ * Event::ChannelPending { channel_id, user_channel_id, former_temporary_channel_id, .. } => {
+ * assert_eq!(user_channel_id, 42);
+ * println!(
+ * \"Channel {} now {} pending (funding transaction has been broadcasted)\", channel_id,
+ * former_temporary_channel_id.unwrap()
+ * );
+ * },
+ * Event::ChannelReady { channel_id, user_channel_id, .. } => {
+ * assert_eq!(user_channel_id, 42);
+ * println!(\"Channel {} ready\", channel_id);
+ * },
+ * ...
+ * # _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * ## Accepting Channels
+ *
+ * Inbound channels are initiated by peers and are automatically accepted unless [`ChannelManager`]
+ * has [`UserConfig::manually_accept_inbound_channels`] set. In that case, the channel may be
+ * either accepted or rejected when handling [`Event::OpenChannelRequest`].
+ *
+ * ```
+ * # use bitcoin::secp256k1::PublicKey;
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::events::{Event, EventsProvider};
+ * #
+ * # fn is_trusted(counterparty_node_id: PublicKey) -> bool {
+ * # // ...
+ * # unimplemented!()
+ * # }
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) {
+ * # let channel_manager = channel_manager.get_cm();
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::OpenChannelRequest { temporary_channel_id, counterparty_node_id, .. } => {
+ * if !is_trusted(counterparty_node_id) {
+ * match channel_manager.force_close_without_broadcasting_txn(
+ * &temporary_channel_id, &counterparty_node_id
+ * ) {
+ * Ok(()) => println!(\"Rejecting channel {}\", temporary_channel_id),
+ * Err(e) => println!(\"Error rejecting channel {}: {:?}\", temporary_channel_id, e),
+ * }
+ * return;
+ * }
+ *
+ * let user_channel_id = 43;
+ * match channel_manager.accept_inbound_channel(
+ * &temporary_channel_id, &counterparty_node_id, user_channel_id
+ * ) {
+ * Ok(()) => println!(\"Accepting channel {}\", temporary_channel_id),
+ * Err(e) => println!(\"Error accepting channel {}: {:?}\", temporary_channel_id, e),
+ * }
+ * },
+ * ...
+ * # _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * ## Closing Channels
+ *
+ * There are two ways to close a channel: either cooperatively using [`close_channel`] or
+ * unilaterally using [`force_close_broadcasting_latest_txn`]. The former is ideal as it makes for
+ * lower fees and immediate access to funds. However, the latter may be necessary if the
+ * counterparty isn't behaving properly or has gone offline. [`Event::ChannelClosed`] is generated
+ * once the channel has been closed successfully.
+ *
+ * ```
+ * # use bitcoin::secp256k1::PublicKey;
+ * # use lightning::ln::types::ChannelId;
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::events::{Event, EventsProvider};
+ * #
+ * # fn example<T: AChannelManager>(
+ * # channel_manager: T, channel_id: ChannelId, counterparty_node_id: PublicKey
+ * # ) {
+ * # let channel_manager = channel_manager.get_cm();
+ * match channel_manager.close_channel(&channel_id, &counterparty_node_id) {
+ * Ok(()) => println!(\"Closing channel {}\", channel_id),
+ * Err(e) => println!(\"Error closing channel {}: {:?}\", channel_id, e),
+ * }
+ *
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::ChannelClosed { channel_id, user_channel_id, .. } => {
+ * assert_eq!(user_channel_id, 42);
+ * println!(\"Channel {} closed\", channel_id);
+ * },
+ * ...
+ * # _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * # Payments
+ *
+ * [`ChannelManager`] is responsible for sending, forwarding, and receiving payments through its
+ * channels. A payment is typically initiated from a [BOLT 11] invoice or a [BOLT 12] offer, though
+ * spontaneous (i.e., keysend) payments are also possible. Incoming payments don't require
+ * maintaining any additional state as [`ChannelManager`] can reconstruct the [`PaymentPreimage`]
+ * from the [`PaymentSecret`]. Sending payments, however, require tracking in order to retry failed
+ * HTLCs.
+ *
+ * After a payment is initiated, it will appear in [`list_recent_payments`] until a short time
+ * after either an [`Event::PaymentSent`] or [`Event::PaymentFailed`] is handled. Failed HTLCs
+ * for a payment will be retried according to the payment's [`Retry`] strategy or until
+ * [`abandon_payment`] is called.
+ *
+ * ## BOLT 11 Invoices
+ *
+ * The [`lightning-invoice`] crate is useful for creating BOLT 11 invoices. Specifically, use the
+ * functions in its `utils` module for constructing invoices that are compatible with
+ * [`ChannelManager`]. These functions serve as a convenience for building invoices with the
+ * [`PaymentHash`] and [`PaymentSecret`] returned from [`create_inbound_payment`]. To provide your
+ * own [`PaymentHash`], use [`create_inbound_payment_for_hash`] or the corresponding functions in
+ * the [`lightning-invoice`] `utils` module.
+ *
+ * [`ChannelManager`] generates an [`Event::PaymentClaimable`] once the full payment has been
+ * received. Call [`claim_funds`] to release the [`PaymentPreimage`], which in turn will result in
+ * an [`Event::PaymentClaimed`].
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider, PaymentPurpose};
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) {
+ * # let channel_manager = channel_manager.get_cm();
+ * Or use utils::create_invoice_from_channelmanager
+ * let known_payment_hash = match channel_manager.create_inbound_payment(
+ * Some(10_000_000), 3600, None
+ * ) {
+ * Ok((payment_hash, _payment_secret)) => {
+ * println!(\"Creating inbound payment {}\", payment_hash);
+ * payment_hash
+ * },
+ * Err(()) => panic!(\"Error creating inbound payment\"),
+ * };
+ *
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
+ * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: Some(payment_preimage), .. } => {
+ * assert_eq!(payment_hash, known_payment_hash);
+ * println!(\"Claiming payment {}\", payment_hash);
+ * channel_manager.claim_funds(payment_preimage);
+ * },
+ * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: None, .. } => {
+ * println!(\"Unknown payment hash: {}\", payment_hash);
+ * },
+ * PaymentPurpose::SpontaneousPayment(payment_preimage) => {
+ * assert_ne!(payment_hash, known_payment_hash);
+ * println!(\"Claiming spontaneous payment {}\", payment_hash);
+ * channel_manager.claim_funds(payment_preimage);
+ * },
+ * ...
+ * # _ => {},
+ * },
+ * Event::PaymentClaimed { payment_hash, amount_msat, .. } => {
+ * assert_eq!(payment_hash, known_payment_hash);
+ * println!(\"Claimed {} msats\", amount_msat);
+ * },
+ * ...
+ * # _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * For paying an invoice, [`lightning-invoice`] provides a `payment` module with convenience
+ * functions for use with [`send_payment`].
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider};
+ * # use lightning::ln::types::PaymentHash;
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, RecipientOnionFields, Retry};
+ * # use lightning::routing::router::RouteParameters;
+ * #
+ * # fn example<T: AChannelManager>(
+ * # channel_manager: T, payment_hash: PaymentHash, recipient_onion: RecipientOnionFields,
+ * # route_params: RouteParameters, retry: Retry
+ * # ) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let (payment_hash, recipient_onion, route_params) =
+ * payment::payment_parameters_from_invoice(&invoice);
+ * let payment_id = PaymentId([42; 32]);
+ * match channel_manager.send_payment(
+ * payment_hash, recipient_onion, payment_id, route_params, retry
+ * ) {
+ * Ok(()) => println!(\"Sending payment with hash {}\", payment_hash),
+ * Err(e) => println!(\"Failed sending payment with hash {}: {:?}\", payment_hash, e),
+ * }
+ *
+ * let expected_payment_id = payment_id;
+ * let expected_payment_hash = payment_hash;
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::Pending {
+ * payment_id: expected_payment_id,
+ * payment_hash: expected_payment_hash,
+ * ..
+ * }
+ * )).is_some()
+ * );
+ *
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentSent { payment_hash, .. } => println!(\"Paid {}\", payment_hash),
+ * Event::PaymentFailed { payment_hash, .. } => println!(\"Failed paying {}\", payment_hash),
+ * ...
+ * # _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * ## BOLT 12 Offers
+ *
+ * The [`offers`] module is useful for creating BOLT 12 offers. An [`Offer`] is a precursor to a
+ * [`Bolt12Invoice`], which must first be requested by the payer. The interchange of these messages
+ * as defined in the specification is handled by [`ChannelManager`] and its implementation of
+ * [`OffersMessageHandler`]. However, this only works with an [`Offer`] created using a builder
+ * returned by [`create_offer_builder`]. With this approach, BOLT 12 offers and invoices are
+ * stateless just as BOLT 11 invoices are.
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider, PaymentPurpose};
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::offers::parse::Bolt12SemanticError;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) -> Result<(), Bolt12SemanticError> {
+ * # let channel_manager = channel_manager.get_cm();
+ * let offer = channel_manager
+ * .create_offer_builder()?
+ * # ;
+ * # // Needed for compiling for c_bindings
+ * # let builder: lightning::offers::offer::OfferBuilder<_, _> = offer.into();
+ * # let offer = builder
+ * .description(\"coffee\".to_string())
+ * .amount_msats(10_000_000)
+ * .build()?;
+ * let bech32_offer = offer.to_string();
+ *
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
+ * PaymentPurpose::Bolt12OfferPayment { payment_preimage: Some(payment_preimage), .. } => {
+ * println!(\"Claiming payment {}\", payment_hash);
+ * channel_manager.claim_funds(payment_preimage);
+ * },
+ * PaymentPurpose::Bolt12OfferPayment { payment_preimage: None, .. } => {
+ * println!(\"Unknown payment hash: {}\", payment_hash);
+ * },
+ * ...
+ * # _ => {},
+ * },
+ * Event::PaymentClaimed { payment_hash, amount_msat, .. } => {
+ * println!(\"Claimed {} msats\", amount_msat);
+ * },
+ * ...
+ * # _ => {},
+ * });
+ * # Ok(())
+ * # }
+ * ```
+ *
+ * Use [`pay_for_offer`] to initiated payment, which sends an [`InvoiceRequest`] for an [`Offer`]
+ * and pays the [`Bolt12Invoice`] response. In addition to success and failure events,
+ * [`ChannelManager`] may also generate an [`Event::InvoiceRequestFailed`].
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider};
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry};
+ * # use lightning::offers::offer::Offer;
+ * #
+ * # fn example<T: AChannelManager>(
+ * # channel_manager: T, offer: &Offer, quantity: Option<u64>, amount_msats: Option<u64>,
+ * # payer_note: Option<String>, retry: Retry, max_total_routing_fee_msat: Option<u64>
+ * # ) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let payment_id = PaymentId([42; 32]);
+ * match channel_manager.pay_for_offer(
+ * offer, quantity, amount_msats, payer_note, payment_id, retry, max_total_routing_fee_msat
+ * ) {
+ * Ok(()) => println!(\"Requesting invoice for offer\"),
+ * Err(e) => println!(\"Unable to request invoice for offer: {:?}\", e),
+ * }
+ *
+ * First the payment will be waiting on an invoice
+ * let expected_payment_id = payment_id;
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id }
+ * )).is_some()
+ * );
+ *
+ * Once the invoice is received, a payment will be sent
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::Pending { payment_id: expected_payment_id, .. }
+ * )).is_some()
+ * );
+ *
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id),
+ * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id),
+ * Event::InvoiceRequestFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id),
+ * ...
+ * # _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * ## BOLT 12 Refunds
+ *
+ * A [`Refund`] is a request for an invoice to be paid. Like *paying* for an [`Offer`], *creating*
+ * a [`Refund`] involves maintaining state since it represents a future outbound payment.
+ * Therefore, use [`create_refund_builder`] when creating one, otherwise [`ChannelManager`] will
+ * refuse to pay any corresponding [`Bolt12Invoice`] that it receives.
+ *
+ * ```
+ * # use core::time::Duration;
+ * # use lightning::events::{Event, EventsProvider};
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry};
+ * # use lightning::offers::parse::Bolt12SemanticError;
+ * #
+ * # fn example<T: AChannelManager>(
+ * # channel_manager: T, amount_msats: u64, absolute_expiry: Duration, retry: Retry,
+ * # max_total_routing_fee_msat: Option<u64>
+ * # ) -> Result<(), Bolt12SemanticError> {
+ * # let channel_manager = channel_manager.get_cm();
+ * let payment_id = PaymentId([42; 32]);
+ * let refund = channel_manager
+ * .create_refund_builder(
+ * amount_msats, absolute_expiry, payment_id, retry, max_total_routing_fee_msat
+ * )?
+ * # ;
+ * # // Needed for compiling for c_bindings
+ * # let builder: lightning::offers::refund::RefundBuilder<_> = refund.into();
+ * # let refund = builder
+ * .description(\"coffee\".to_string())
+ * .payer_note(\"refund for order 1234\".to_string())
+ * .build()?;
+ * let bech32_refund = refund.to_string();
+ *
+ * First the payment will be waiting on an invoice
+ * let expected_payment_id = payment_id;
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id }
+ * )).is_some()
+ * );
+ *
+ * Once the invoice is received, a payment will be sent
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::Pending { payment_id: expected_payment_id, .. }
+ * )).is_some()
+ * );
+ *
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id),
+ * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id),
+ * ...
+ * # _ => {},
+ * });
+ * # Ok(())
+ * # }
+ * ```
+ *
+ * Use [`request_refund_payment`] to send a [`Bolt12Invoice`] for receiving the refund. Similar to
+ * creating* an [`Offer`], this is stateless as it represents an inbound payment.
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider, PaymentPurpose};
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::offers::refund::Refund;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T, refund: &Refund) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let known_payment_hash = match channel_manager.request_refund_payment(refund) {
+ * Ok(invoice) => {
+ * let payment_hash = invoice.payment_hash();
+ * println!(\"Requesting refund payment {}\", payment_hash);
+ * payment_hash
+ * },
+ * Err(e) => panic!(\"Unable to request payment for refund: {:?}\", e),
+ * };
+ *
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
+ * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: Some(payment_preimage), .. } => {
+ * assert_eq!(payment_hash, known_payment_hash);
+ * println!(\"Claiming payment {}\", payment_hash);
+ * channel_manager.claim_funds(payment_preimage);
+ * },
+ * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: None, .. } => {
+ * println!(\"Unknown payment hash: {}\", payment_hash);
+ * \t},
+ * ...
+ * # _ => {},
+ * },
+ * Event::PaymentClaimed { payment_hash, amount_msat, .. } => {
+ * assert_eq!(payment_hash, known_payment_hash);
+ * println!(\"Claimed {} msats\", amount_msat);
+ * },
+ * ...
+ * # _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * # Persistence
*
* Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for
* all peers during write/read (though does not modify this instance, only the instance being
* tells you the last block hash which was connected. You should get the best block tip before using the manager.
* See [`chain::Listen`] and [`chain::Confirm`] for more details.
*
+ * # `ChannelUpdate` Messages
+ *
* Note that `ChannelManager` is responsible for tracking liveness of its channels and generating
* [`ChannelUpdate`] messages informing peers that the channel is temporarily disabled. To avoid
* spam due to quick disconnection/reconnection, updates are not sent until the channel has been
* offline for a full minute. In order to track this, you must call
* [`timer_tick_occurred`] roughly once per minute, though it doesn't have to be perfect.
*
+ * # DoS Mitigation
+ *
* To avoid trivial DoS issues, `ChannelManager` limits the number of inbound connections and
* inbound channels without confirmed funding transactions. This may result in nodes which we do
* not have a channel with being unable to connect to us or open new channels with us if we have
* exempted from the count of unfunded channels. Similarly, outbound channels and connections are
* never limited. Please ensure you limit the count of such channels yourself.
*
+ * # Type Aliases
+ *
* Rather than using a plain `ChannelManager`, it is preferable to use either a [`SimpleArcChannelManager`]
* a [`SimpleRefChannelManager`], for conciseness. See their documentation for more details, but
* essentially you should default to using a [`SimpleRefChannelManager`], and use a
* [`SimpleArcChannelManager`] when you require a `ChannelManager` with a static lifetime, such as when
* you're using lightning-net-tokio.
*
+ * [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor
+ * [`MessageHandler`]: crate::ln::peer_handler::MessageHandler
+ * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
+ * [`PeerManager::read_event`]: crate::ln::peer_handler::PeerManager::read_event
+ * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
+ * [`timer_tick_occurred`]: Self::timer_tick_occurred
+ * [`get_and_clear_needs_persistence`]: Self::get_and_clear_needs_persistence
+ * [`Persister`]: crate::util::persist::Persister
+ * [`KVStore`]: crate::util::persist::KVStore
+ * [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future
+ * [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync
+ * [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync
+ * [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor
+ * [`list_channels`]: Self::list_channels
+ * [`list_usable_channels`]: Self::list_usable_channels
+ * [`create_channel`]: Self::create_channel
+ * [`close_channel`]: Self::force_close_broadcasting_latest_txn
+ * [`force_close_broadcasting_latest_txn`]: Self::force_close_broadcasting_latest_txn
+ * [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md
+ * [BOLT 12]: https://github.com/rustyrussell/lightning-rfc/blob/guilt/offers/12-offer-encoding.md
+ * [`list_recent_payments`]: Self::list_recent_payments
+ * [`abandon_payment`]: Self::abandon_payment
+ * [`lightning-invoice`]: https://docs.rs/lightning_invoice/latest/lightning_invoice
+ * [`create_inbound_payment`]: Self::create_inbound_payment
+ * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
+ * [`claim_funds`]: Self::claim_funds
+ * [`send_payment`]: Self::send_payment
+ * [`offers`]: crate::offers
+ * [`create_offer_builder`]: Self::create_offer_builder
+ * [`pay_for_offer`]: Self::pay_for_offer
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`create_refund_builder`]: Self::create_refund_builder
+ * [`request_refund_payment`]: Self::request_refund_payment
* [`peer_disconnected`]: msgs::ChannelMessageHandler::peer_disconnected
* [`funding_created`]: msgs::FundingCreated
* [`funding_transaction_generated`]: Self::funding_transaction_generated
* [`BlockHash`]: bitcoin::hash_types::BlockHash
* [`update_channel`]: chain::Watch::update_channel
* [`ChannelUpdate`]: msgs::ChannelUpdate
- * [`timer_tick_occurred`]: Self::timer_tick_occurred
* [`read`]: ReadableArgs::read
*/
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
* [`params.best_block.block_hash`]: chain::BestBlock::block_hash
*/
public static ChannelManager of(org.ldk.structs.FeeEstimator fee_est, org.ldk.structs.Watch chain_monitor, org.ldk.structs.BroadcasterInterface tx_broadcaster, org.ldk.structs.Router router, org.ldk.structs.Logger logger, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.SignerProvider signer_provider, org.ldk.structs.UserConfig config, org.ldk.structs.ChainParameters params, int current_timestamp) {
- long ret = bindings.ChannelManager_new(fee_est.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, entropy_source.ptr, node_signer.ptr, signer_provider.ptr, config == null ? 0 : config.ptr, params == null ? 0 : params.ptr, current_timestamp);
+ long ret = bindings.ChannelManager_new(fee_est.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, entropy_source.ptr, node_signer.ptr, signer_provider.ptr, config.ptr, params.ptr, current_timestamp);
Reference.reachabilityFence(fee_est);
Reference.reachabilityFence(chain_monitor);
Reference.reachabilityFence(tx_broadcaster);
* [`Event::FundingGenerationReady::temporary_channel_id`]: events::Event::FundingGenerationReady::temporary_channel_id
* [`Event::ChannelClosed::channel_id`]: events::Event::ChannelClosed::channel_id
*
+ * Note that temporary_channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None
* Note that override_config (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public Result_ThirtyTwoBytesAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ temporary_channel_id, @Nullable org.ldk.structs.UserConfig override_config) {
- long ret = bindings.ChannelManager_create_channel(this.ptr, InternalUtils.check_arr_len(their_network_key, 33), channel_value_satoshis, push_msat, user_channel_id.getLEBytes(), temporary_channel_id.ptr, override_config == null ? 0 : override_config.ptr);
+ public Result_ChannelIdAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, org.ldk.util.UInt128 user_channel_id, @Nullable org.ldk.structs.ChannelId temporary_channel_id, @Nullable org.ldk.structs.UserConfig override_config) {
+ long ret = bindings.ChannelManager_create_channel(this.ptr, InternalUtils.check_arr_len(their_network_key, 33), channel_value_satoshis, push_msat, user_channel_id.getLEBytes(), temporary_channel_id == null ? 0 : temporary_channel_id.ptr, override_config == null ? 0 : override_config.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_network_key);
Reference.reachabilityFence(channel_value_satoshis);
Reference.reachabilityFence(temporary_channel_id);
Reference.reachabilityFence(override_config);
if (ret >= 0 && ret <= 4096) { return null; }
- Result_ThirtyTwoBytesAPIErrorZ ret_hu_conv = Result_ThirtyTwoBytesAPIErrorZ.constr_from_ptr(ret);
+ Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret);
if (this != null) { this.ptrs_to.add(temporary_channel_id); };
if (this != null) { this.ptrs_to.add(override_config); };
return ret_hu_conv;
* [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
* [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
*/
- public Result_NoneAPIErrorZ close_channel(byte[] channel_id, byte[] counterparty_node_id) {
- long ret = bindings.ChannelManager_close_channel(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33));
+ public Result_NoneAPIErrorZ close_channel(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) {
+ long ret = bindings.ChannelManager_close_channel(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33));
Reference.reachabilityFence(this);
Reference.reachabilityFence(channel_id);
Reference.reachabilityFence(counterparty_node_id);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(channel_id); };
return ret_hu_conv;
}
*
* Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public Result_NoneAPIErrorZ close_channel_with_feerate_and_script(byte[] channel_id, byte[] counterparty_node_id, org.ldk.structs.Option_u32Z target_feerate_sats_per_1000_weight, @Nullable org.ldk.structs.ShutdownScript shutdown_script) {
- long ret = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), target_feerate_sats_per_1000_weight.ptr, shutdown_script == null ? 0 : shutdown_script.ptr);
+ public Result_NoneAPIErrorZ close_channel_with_feerate_and_script(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, org.ldk.structs.Option_u32Z target_feerate_sats_per_1000_weight, @Nullable org.ldk.structs.ShutdownScript shutdown_script) {
+ long ret = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), target_feerate_sats_per_1000_weight.ptr, shutdown_script == null ? 0 : shutdown_script.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(channel_id);
Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(shutdown_script);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(channel_id); };
if (this != null) { this.ptrs_to.add(target_feerate_sats_per_1000_weight); };
if (this != null) { this.ptrs_to.add(shutdown_script); };
return ret_hu_conv;
* the manager, or if the `counterparty_node_id` isn't the counterparty of the corresponding
* channel.
*/
- public Result_NoneAPIErrorZ force_close_broadcasting_latest_txn(byte[] channel_id, byte[] counterparty_node_id) {
- long ret = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33));
+ public Result_NoneAPIErrorZ force_close_broadcasting_latest_txn(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) {
+ long ret = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33));
Reference.reachabilityFence(this);
Reference.reachabilityFence(channel_id);
Reference.reachabilityFence(counterparty_node_id);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(channel_id); };
return ret_hu_conv;
}
* the latest local transaction(s). Fails if `channel_id` is unknown to the manager, or if the
* `counterparty_node_id` isn't the counterparty of the corresponding channel.
*
- * You can always get the latest local transaction(s) to broadcast from
- * [`ChannelMonitor::get_latest_holder_commitment_txn`].
+ * You can always broadcast the latest local transaction(s) via
+ * [`ChannelMonitor::broadcast_latest_holder_commitment_txn`].
*/
- public Result_NoneAPIErrorZ force_close_without_broadcasting_txn(byte[] channel_id, byte[] counterparty_node_id) {
- long ret = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33));
+ public Result_NoneAPIErrorZ force_close_without_broadcasting_txn(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) {
+ long ret = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33));
Reference.reachabilityFence(this);
Reference.reachabilityFence(channel_id);
Reference.reachabilityFence(counterparty_node_id);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(channel_id); };
return ret_hu_conv;
}
* [`ChannelMonitorUpdateStatus::InProgress`]: crate::chain::ChannelMonitorUpdateStatus::InProgress
*/
public Result_NonePaymentSendFailureZ send_payment_with_route(org.ldk.structs.Route route, byte[] payment_hash, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id) {
- long ret = bindings.ChannelManager_send_payment_with_route(this.ptr, route == null ? 0 : route.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32));
+ long ret = bindings.ChannelManager_send_payment_with_route(this.ptr, route.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32));
Reference.reachabilityFence(this);
Reference.reachabilityFence(route);
Reference.reachabilityFence(payment_hash);
* `route_params` and retry failed payment paths based on `retry_strategy`.
*/
public Result_NoneRetryableSendFailureZ send_payment(byte[] payment_hash, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id, org.ldk.structs.RouteParameters route_params, org.ldk.structs.Retry retry_strategy) {
- long ret = bindings.ChannelManager_send_payment(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params == null ? 0 : route_params.ptr, retry_strategy.ptr);
+ long ret = bindings.ChannelManager_send_payment(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params.ptr, retry_strategy.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(payment_hash);
Reference.reachabilityFence(recipient_onion);
* [`send_payment`]: Self::send_payment
*/
public Result_ThirtyTwoBytesPaymentSendFailureZ send_spontaneous_payment(org.ldk.structs.Route route, org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id) {
- long ret = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route == null ? 0 : route.ptr, payment_preimage.ptr, recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32));
+ long ret = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32));
Reference.reachabilityFence(this);
Reference.reachabilityFence(route);
Reference.reachabilityFence(payment_preimage);
* [`PaymentParameters::for_keysend`]: crate::routing::router::PaymentParameters::for_keysend
*/
public Result_ThirtyTwoBytesRetryableSendFailureZ send_spontaneous_payment_with_retry(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id, org.ldk.structs.RouteParameters route_params, org.ldk.structs.Retry retry_strategy) {
- long ret = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, payment_preimage.ptr, recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params == null ? 0 : route_params.ptr, retry_strategy.ptr);
+ long ret = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params.ptr, retry_strategy.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(payment_preimage);
Reference.reachabilityFence(recipient_onion);
* us to easily discern them from real payments.
*/
public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ send_probe(org.ldk.structs.Path path) {
- long ret = bindings.ChannelManager_send_probe(this.ptr, path == null ? 0 : path.ptr);
+ long ret = bindings.ChannelManager_send_probe(this.ptr, path.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(path);
if (ret >= 0 && ret <= 4096) { return null; }
* probes. If `None` is given as `liquidity_limit_multiplier`, it defaults to `3`.
*/
public Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ send_preflight_probes(org.ldk.structs.RouteParameters route_params, org.ldk.structs.Option_u64Z liquidity_limit_multiplier) {
- long ret = bindings.ChannelManager_send_preflight_probes(this.ptr, route_params == null ? 0 : route_params.ptr, liquidity_limit_multiplier.ptr);
+ long ret = bindings.ChannelManager_send_preflight_probes(this.ptr, route_params.ptr, liquidity_limit_multiplier.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(route_params);
Reference.reachabilityFence(liquidity_limit_multiplier);
* [`Event::FundingGenerationReady`]: crate::events::Event::FundingGenerationReady
* [`Event::ChannelClosed`]: crate::events::Event::ChannelClosed
*/
- public Result_NoneAPIErrorZ funding_transaction_generated(byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction) {
- long ret = bindings.ChannelManager_funding_transaction_generated(this.ptr, InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), funding_transaction);
+ public Result_NoneAPIErrorZ funding_transaction_generated(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction) {
+ long ret = bindings.ChannelManager_funding_transaction_generated(this.ptr, temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_transaction);
Reference.reachabilityFence(this);
Reference.reachabilityFence(temporary_channel_id);
Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(funding_transaction);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(temporary_channel_id); };
return ret_hu_conv;
}
*
* If there is an error, all channels in the batch are to be considered closed.
*/
- public Result_NoneAPIErrorZ batch_funding_transaction_generated(TwoTuple_ThirtyTwoBytesPublicKeyZ[] temporary_channels, byte[] funding_transaction) {
- long ret = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, temporary_channels != null ? Arrays.stream(temporary_channels).mapToLong(temporary_channels_conv_35 -> temporary_channels_conv_35 != null ? temporary_channels_conv_35.ptr : 0).toArray() : null, funding_transaction);
+ public Result_NoneAPIErrorZ batch_funding_transaction_generated(TwoTuple_ChannelIdPublicKeyZ[] temporary_channels, byte[] funding_transaction) {
+ long ret = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, temporary_channels != null ? Arrays.stream(temporary_channels).mapToLong(temporary_channels_conv_30 -> temporary_channels_conv_30.ptr).toArray() : null, funding_transaction);
Reference.reachabilityFence(this);
Reference.reachabilityFence(temporary_channels);
Reference.reachabilityFence(funding_transaction);
* [`ChannelUnavailable`]: APIError::ChannelUnavailable
* [`APIMisuseError`]: APIError::APIMisuseError
*/
- public Result_NoneAPIErrorZ update_partial_channel_config(byte[] counterparty_node_id, byte[][] channel_ids, org.ldk.structs.ChannelConfigUpdate config_update) {
- long ret = bindings.ChannelManager_update_partial_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).map(channel_ids_conv_8 -> InternalUtils.check_arr_len(channel_ids_conv_8, 32)).toArray(byte[][]::new) : null, config_update == null ? 0 : config_update.ptr);
+ public Result_NoneAPIErrorZ update_partial_channel_config(byte[] counterparty_node_id, ChannelId[] channel_ids, org.ldk.structs.ChannelConfigUpdate config_update) {
+ long ret = bindings.ChannelManager_update_partial_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).mapToLong(channel_ids_conv_11 -> channel_ids_conv_11.ptr).toArray() : null, config_update.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(channel_ids);
Reference.reachabilityFence(config_update);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ for (ChannelId channel_ids_conv_11: channel_ids) { if (this != null) { this.ptrs_to.add(channel_ids_conv_11); }; };
if (this != null) { this.ptrs_to.add(config_update); };
return ret_hu_conv;
}
* [`ChannelUnavailable`]: APIError::ChannelUnavailable
* [`APIMisuseError`]: APIError::APIMisuseError
*/
- public Result_NoneAPIErrorZ update_channel_config(byte[] counterparty_node_id, byte[][] channel_ids, org.ldk.structs.ChannelConfig config) {
- long ret = bindings.ChannelManager_update_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).map(channel_ids_conv_8 -> InternalUtils.check_arr_len(channel_ids_conv_8, 32)).toArray(byte[][]::new) : null, config == null ? 0 : config.ptr);
+ public Result_NoneAPIErrorZ update_channel_config(byte[] counterparty_node_id, ChannelId[] channel_ids, org.ldk.structs.ChannelConfig config) {
+ long ret = bindings.ChannelManager_update_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).mapToLong(channel_ids_conv_11 -> channel_ids_conv_11.ptr).toArray() : null, config.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(channel_ids);
Reference.reachabilityFence(config);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ for (ChannelId channel_ids_conv_11: channel_ids) { if (this != null) { this.ptrs_to.add(channel_ids_conv_11); }; };
if (this != null) { this.ptrs_to.add(config); };
return ret_hu_conv;
}
* [`HTLCIntercepted`]: events::Event::HTLCIntercepted
* [`HTLCIntercepted::expected_outbound_amount_msat`]: events::Event::HTLCIntercepted::expected_outbound_amount_msat
*/
- public Result_NoneAPIErrorZ forward_intercepted_htlc(byte[] intercept_id, byte[] next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat) {
- long ret = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, InternalUtils.check_arr_len(intercept_id, 32), InternalUtils.check_arr_len(next_hop_channel_id, 32), InternalUtils.check_arr_len(next_node_id, 33), amt_to_forward_msat);
+ public Result_NoneAPIErrorZ forward_intercepted_htlc(byte[] intercept_id, org.ldk.structs.ChannelId next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat) {
+ long ret = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, InternalUtils.check_arr_len(intercept_id, 32), next_hop_channel_id.ptr, InternalUtils.check_arr_len(next_node_id, 33), amt_to_forward_msat);
Reference.reachabilityFence(this);
Reference.reachabilityFence(intercept_id);
Reference.reachabilityFence(next_hop_channel_id);
Reference.reachabilityFence(amt_to_forward_msat);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(next_hop_channel_id); };
return ret_hu_conv;
}
* [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest
* [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id
*/
- public Result_NoneAPIErrorZ accept_inbound_channel(byte[] temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) {
- long ret = bindings.ChannelManager_accept_inbound_channel(this.ptr, InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes());
+ public Result_NoneAPIErrorZ accept_inbound_channel(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) {
+ long ret = bindings.ChannelManager_accept_inbound_channel(this.ptr, temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes());
Reference.reachabilityFence(this);
Reference.reachabilityFence(temporary_channel_id);
Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(user_channel_id);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(temporary_channel_id); };
return ret_hu_conv;
}
* [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest
* [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id
*/
- public Result_NoneAPIErrorZ accept_inbound_channel_from_trusted_peer_0conf(byte[] temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) {
- long ret = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes());
+ public Result_NoneAPIErrorZ accept_inbound_channel_from_trusted_peer_0conf(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) {
+ long ret = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes());
Reference.reachabilityFence(this);
Reference.reachabilityFence(temporary_channel_id);
Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(user_channel_id);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(temporary_channel_id); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates an [`OfferBuilder`] such that the [`Offer`] it builds is recognized by the
+ * [`ChannelManager`] when handling [`InvoiceRequest`] messages for the offer. The offer will
+ * not have an expiration unless otherwise set on the builder.
+ *
+ * # Privacy
+ *
+ * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the offer.
+ * However, if one is not found, uses a one-hop [`BlindedPath`] with
+ * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
+ * the node must be announced, otherwise, there is no way to find a path to the introduction in
+ * order to send the [`InvoiceRequest`].
+ *
+ * Also, uses a derived signing pubkey in the offer for recipient privacy.
+ *
+ * # Limitations
+ *
+ * Requires a direct connection to the introduction node in the responding [`InvoiceRequest`]'s
+ * reply path.
+ *
+ * # Errors
+ *
+ * Errors if the parameterized [`Router`] is unable to create a blinded path for the offer.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ */
+ public Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ create_offer_builder() {
+ long ret = bindings.ChannelManager_create_offer_builder(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a [`RefundBuilder`] such that the [`Refund`] it builds is recognized by the
+ * [`ChannelManager`] when handling [`Bolt12Invoice`] messages for the refund.
+ *
+ * # Payment
+ *
+ * The provided `payment_id` is used to ensure that only one invoice is paid for the refund.
+ * See [Avoiding Duplicate Payments] for other requirements once the payment has been sent.
+ *
+ * The builder will have the provided expiration set. Any changes to the expiration on the
+ * returned builder will not be honored by [`ChannelManager`]. For `no-std`, the highest seen
+ * block time minus two hours is used for the current time when determining if the refund has
+ * expired.
+ *
+ * To revoke the refund, use [`ChannelManager::abandon_payment`] prior to receiving the
+ * invoice. If abandoned, or an invoice isn't received before expiration, the payment will fail
+ * with an [`Event::InvoiceRequestFailed`].
+ *
+ * If `max_total_routing_fee_msat` is not specified, The default from
+ * [`RouteParameters::from_payment_params_and_value`] is applied.
+ *
+ * # Privacy
+ *
+ * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the refund.
+ * However, if one is not found, uses a one-hop [`BlindedPath`] with
+ * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
+ * the node must be announced, otherwise, there is no way to find a path to the introduction in
+ * order to send the [`Bolt12Invoice`].
+ *
+ * Also, uses a derived payer id in the refund for payer privacy.
+ *
+ * # Limitations
+ *
+ * Requires a direct connection to an introduction node in the responding
+ * [`Bolt12Invoice::payment_paths`].
+ *
+ * # Errors
+ *
+ * Errors if:
+ * - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
+ * - `amount_msats` is invalid, or
+ * - the parameterized [`Router`] is unable to create a blinded path for the refund.
+ *
+ * [`Refund`]: crate::offers::refund::Refund
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
+ * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
+ */
+ public Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ create_refund_builder(long amount_msats, long absolute_expiry, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat) {
+ long ret = bindings.ChannelManager_create_refund_builder(this.ptr, amount_msats, absolute_expiry, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(amount_msats);
+ Reference.reachabilityFence(absolute_expiry);
+ Reference.reachabilityFence(payment_id);
+ Reference.reachabilityFence(retry_strategy);
+ Reference.reachabilityFence(max_total_routing_fee_msat);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(retry_strategy); };
+ if (this != null) { this.ptrs_to.add(max_total_routing_fee_msat); };
return ret_hu_conv;
}
* Errors if:
* - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
* - the provided parameters are invalid for the offer,
+ * - the offer is for an unsupported chain, or
* - the parameterized [`Router`] is unable to create a blinded reply path for the invoice
* request.
*
* [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
*/
public Result_NoneBolt12SemanticErrorZ pay_for_offer(org.ldk.structs.Offer offer, org.ldk.structs.Option_u64Z quantity, org.ldk.structs.Option_u64Z amount_msats, org.ldk.structs.Option_StrZ payer_note, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat) {
- long ret = bindings.ChannelManager_pay_for_offer(this.ptr, offer == null ? 0 : offer.ptr, quantity.ptr, amount_msats.ptr, payer_note.ptr, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr);
+ long ret = bindings.ChannelManager_pay_for_offer(this.ptr, offer.ptr, quantity.ptr, amount_msats.ptr, payer_note.ptr, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(offer);
Reference.reachabilityFence(quantity);
*
* The resulting invoice uses a [`PaymentHash`] recognized by the [`ChannelManager`] and a
* [`BlindedPath`] containing the [`PaymentSecret`] needed to reconstruct the corresponding
- * [`PaymentPreimage`].
+ * [`PaymentPreimage`]. It is returned purely for informational purposes.
*
* # Limitations
*
*
* # Errors
*
- * Errors if the parameterized [`Router`] is unable to create a blinded payment path or reply
- * path for the invoice.
+ * Errors if:
+ * - the refund is for an unsupported chain, or
+ * - the parameterized [`Router`] is unable to create a blinded payment path or reply path for
+ * the invoice.
*
* [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
*/
- public Result_NoneBolt12SemanticErrorZ request_refund_payment(org.ldk.structs.Refund refund) {
- long ret = bindings.ChannelManager_request_refund_payment(this.ptr, refund == null ? 0 : refund.ptr);
+ public Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_payment(org.ldk.structs.Refund refund) {
+ long ret = bindings.ChannelManager_request_refund_payment(this.ptr, refund.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(refund);
if (ret >= 0 && ret <= 4096) { return null; }
- Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+ Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
if (this != null) { this.ptrs_to.add(refund); };
return ret_hu_conv;
}
* This differs from [`create_inbound_payment_for_hash`] only in that it generates the
* [`PaymentHash`] and [`PaymentPreimage`] for you.
*
- * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`], which
- * will have the [`PaymentClaimable::purpose`] be [`PaymentPurpose::InvoicePayment`] with
- * its [`PaymentPurpose::InvoicePayment::payment_preimage`] field filled in. That should then be
- * passed directly to [`claim_funds`].
+ * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`] event, which
+ * will have the [`PaymentClaimable::purpose`] return `Some` for [`PaymentPurpose::preimage`]. That
+ * should then be passed directly to [`claim_funds`].
*
* See [`create_inbound_payment_for_hash`] for detailed documentation on behavior and requirements.
*
* [`claim_funds`]: Self::claim_funds
* [`PaymentClaimable`]: events::Event::PaymentClaimable
* [`PaymentClaimable::purpose`]: events::Event::PaymentClaimable::purpose
- * [`PaymentPurpose::InvoicePayment`]: events::PaymentPurpose::InvoicePayment
- * [`PaymentPurpose::InvoicePayment::payment_preimage`]: events::PaymentPurpose::InvoicePayment::payment_preimage
+ * [`PaymentPurpose::preimage`]: events::PaymentPurpose::preimage
* [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
*/
public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create_inbound_payment(org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
/**
* Returns true if this [`ChannelManager`] needs to be persisted.
+ *
+ * See [`Self::get_event_or_persistence_needed_future`] for retrieving a [`Future`] that
+ * indicates this should be checked.
*/
public boolean get_and_clear_needs_persistence() {
boolean ret = bindings.ChannelManager_get_and_clear_needs_persistence(this.ptr);
return ret_hu_conv;
}
+ /**
+ * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is
+ */
+ public NodeIdLookUp as_NodeIdLookUp() {
+ long ret = bindings.ChannelManager_as_NodeIdLookUp(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ NodeIdLookUp ret_hu_conv = new NodeIdLookUp(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
/**
* Serialize the ChannelManager object into a byte array which can be read by ChannelManager_read
*/
* runtime settings which were stored when the ChannelManager was serialized.
*/
public void set_default_config(org.ldk.structs.UserConfig val) {
- bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* populate a HashMap directly from C.
*/
public static ChannelManagerReadArgs of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.SignerProvider signer_provider, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Watch chain_monitor, org.ldk.structs.BroadcasterInterface tx_broadcaster, org.ldk.structs.Router router, org.ldk.structs.Logger logger, org.ldk.structs.UserConfig default_config, ChannelMonitor[] channel_monitors) {
- long ret = bindings.ChannelManagerReadArgs_new(entropy_source.ptr, node_signer.ptr, signer_provider.ptr, fee_estimator.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, default_config == null ? 0 : default_config.ptr, channel_monitors != null ? Arrays.stream(channel_monitors).mapToLong(channel_monitors_conv_16 -> channel_monitors_conv_16 == null ? 0 : channel_monitors_conv_16.ptr).toArray() : null);
+ long ret = bindings.ChannelManagerReadArgs_new(entropy_source.ptr, node_signer.ptr, signer_provider.ptr, fee_estimator.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, default_config.ptr, channel_monitors != null ? Arrays.stream(channel_monitors).mapToLong(channel_monitors_conv_16 -> channel_monitors_conv_16.ptr).toArray() : null);
Reference.reachabilityFence(entropy_source);
Reference.reachabilityFence(node_signer);
Reference.reachabilityFence(signer_provider);
* Handle an incoming `stfu` message from the given peer.
*/
void handle_stfu(byte[] their_node_id, Stfu msg);
- /**
- * Handle an incoming `splice` message from the given peer.
- */
- void handle_splice(byte[] their_node_id, Splice msg);
- /**
- * Handle an incoming `splice_ack` message from the given peer.
- */
- void handle_splice_ack(byte[] their_node_id, SpliceAck msg);
- /**
- * Handle an incoming `splice_locked` message from the given peer.
- */
- void handle_splice_locked(byte[] their_node_id, SpliceLocked msg);
/**
* Handle an incoming `tx_add_input message` from the given peer.
*/
arg.handle_stfu(their_node_id, msg_hu_conv);
Reference.reachabilityFence(arg);
}
- @Override public void handle_splice(byte[] their_node_id, long msg) {
- org.ldk.structs.Splice msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Splice(null, msg); }
- arg.handle_splice(their_node_id, msg_hu_conv);
- Reference.reachabilityFence(arg);
- }
- @Override public void handle_splice_ack(byte[] their_node_id, long msg) {
- org.ldk.structs.SpliceAck msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceAck(null, msg); }
- arg.handle_splice_ack(their_node_id, msg_hu_conv);
- Reference.reachabilityFence(arg);
- }
- @Override public void handle_splice_locked(byte[] their_node_id, long msg) {
- org.ldk.structs.SpliceLocked msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceLocked(null, msg); }
- arg.handle_splice_locked(their_node_id, msg_hu_conv);
- Reference.reachabilityFence(arg);
- }
@Override public void handle_tx_add_input(byte[] their_node_id, long msg) {
org.ldk.structs.TxAddInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddInput(null, msg); }
arg.handle_tx_add_input(their_node_id, msg_hu_conv);
org.ldk.structs.Init msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Init(null, msg); }
Result_NoneNoneZ ret = arg.peer_connected(their_node_id, msg_hu_conv, inbound);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public void handle_channel_reestablish(byte[] their_node_id, long msg) {
@Override public long provided_node_features() {
NodeFeatures ret = arg.provided_node_features();
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long provided_init_features(byte[] their_node_id) {
InitFeatures ret = arg.provided_init_features(their_node_id);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long get_chain_hashes() {
Option_CVec_ThirtyTwoBytesZZ ret = arg.get_chain_hashes();
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
return result;
}
* Handle an incoming `open_channel` message from the given peer.
*/
public void handle_open_channel(byte[] their_node_id, org.ldk.structs.OpenChannel msg) {
- bindings.ChannelMessageHandler_handle_open_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_open_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `open_channel2` message from the given peer.
*/
public void handle_open_channel_v2(byte[] their_node_id, org.ldk.structs.OpenChannelV2 msg) {
- bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `accept_channel` message from the given peer.
*/
public void handle_accept_channel(byte[] their_node_id, org.ldk.structs.AcceptChannel msg) {
- bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `accept_channel2` message from the given peer.
*/
public void handle_accept_channel_v2(byte[] their_node_id, org.ldk.structs.AcceptChannelV2 msg) {
- bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `funding_created` message from the given peer.
*/
public void handle_funding_created(byte[] their_node_id, org.ldk.structs.FundingCreated msg) {
- bindings.ChannelMessageHandler_handle_funding_created(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_funding_created(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `funding_signed` message from the given peer.
*/
public void handle_funding_signed(byte[] their_node_id, org.ldk.structs.FundingSigned msg) {
- bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `channel_ready` message from the given peer.
*/
public void handle_channel_ready(byte[] their_node_id, org.ldk.structs.ChannelReady msg) {
- bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `shutdown` message from the given peer.
*/
public void handle_shutdown(byte[] their_node_id, org.ldk.structs.Shutdown msg) {
- bindings.ChannelMessageHandler_handle_shutdown(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_shutdown(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `closing_signed` message from the given peer.
*/
public void handle_closing_signed(byte[] their_node_id, org.ldk.structs.ClosingSigned msg) {
- bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `stfu` message from the given peer.
*/
public void handle_stfu(byte[] their_node_id, org.ldk.structs.Stfu msg) {
- bindings.ChannelMessageHandler_handle_stfu(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(their_node_id);
- Reference.reachabilityFence(msg);
- if (this != null) { this.ptrs_to.add(msg); };
- }
-
- /**
- * Handle an incoming `splice` message from the given peer.
- */
- public void handle_splice(byte[] their_node_id, org.ldk.structs.Splice msg) {
- bindings.ChannelMessageHandler_handle_splice(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(their_node_id);
- Reference.reachabilityFence(msg);
- if (this != null) { this.ptrs_to.add(msg); };
- }
-
- /**
- * Handle an incoming `splice_ack` message from the given peer.
- */
- public void handle_splice_ack(byte[] their_node_id, org.ldk.structs.SpliceAck msg) {
- bindings.ChannelMessageHandler_handle_splice_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(their_node_id);
- Reference.reachabilityFence(msg);
- if (this != null) { this.ptrs_to.add(msg); };
- }
-
- /**
- * Handle an incoming `splice_locked` message from the given peer.
- */
- public void handle_splice_locked(byte[] their_node_id, org.ldk.structs.SpliceLocked msg) {
- bindings.ChannelMessageHandler_handle_splice_locked(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_stfu(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `tx_add_input message` from the given peer.
*/
public void handle_tx_add_input(byte[] their_node_id, org.ldk.structs.TxAddInput msg) {
- bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `tx_add_output` message from the given peer.
*/
public void handle_tx_add_output(byte[] their_node_id, org.ldk.structs.TxAddOutput msg) {
- bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `tx_remove_input` message from the given peer.
*/
public void handle_tx_remove_input(byte[] their_node_id, org.ldk.structs.TxRemoveInput msg) {
- bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `tx_remove_output` message from the given peer.
*/
public void handle_tx_remove_output(byte[] their_node_id, org.ldk.structs.TxRemoveOutput msg) {
- bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `tx_complete message` from the given peer.
*/
public void handle_tx_complete(byte[] their_node_id, org.ldk.structs.TxComplete msg) {
- bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `tx_signatures` message from the given peer.
*/
public void handle_tx_signatures(byte[] their_node_id, org.ldk.structs.TxSignatures msg) {
- bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `tx_init_rbf` message from the given peer.
*/
public void handle_tx_init_rbf(byte[] their_node_id, org.ldk.structs.TxInitRbf msg) {
- bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `tx_ack_rbf` message from the given peer.
*/
public void handle_tx_ack_rbf(byte[] their_node_id, org.ldk.structs.TxAckRbf msg) {
- bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `tx_abort message` from the given peer.
*/
public void handle_tx_abort(byte[] their_node_id, org.ldk.structs.TxAbort msg) {
- bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `update_add_htlc` message from the given peer.
*/
public void handle_update_add_htlc(byte[] their_node_id, org.ldk.structs.UpdateAddHTLC msg) {
- bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `update_fulfill_htlc` message from the given peer.
*/
public void handle_update_fulfill_htlc(byte[] their_node_id, org.ldk.structs.UpdateFulfillHTLC msg) {
- bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `update_fail_htlc` message from the given peer.
*/
public void handle_update_fail_htlc(byte[] their_node_id, org.ldk.structs.UpdateFailHTLC msg) {
- bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `update_fail_malformed_htlc` message from the given peer.
*/
public void handle_update_fail_malformed_htlc(byte[] their_node_id, org.ldk.structs.UpdateFailMalformedHTLC msg) {
- bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `commitment_signed` message from the given peer.
*/
public void handle_commitment_signed(byte[] their_node_id, org.ldk.structs.CommitmentSigned msg) {
- bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `revoke_and_ack` message from the given peer.
*/
public void handle_revoke_and_ack(byte[] their_node_id, org.ldk.structs.RevokeAndACK msg) {
- bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `update_fee` message from the given peer.
*/
public void handle_update_fee(byte[] their_node_id, org.ldk.structs.UpdateFee msg) {
- bindings.ChannelMessageHandler_handle_update_fee(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_update_fee(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `announcement_signatures` message from the given peer.
*/
public void handle_announcement_signatures(byte[] their_node_id, org.ldk.structs.AnnouncementSignatures msg) {
- bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* message handlers may still wish to communicate with this peer.
*/
public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init msg, boolean inbound) {
- long ret = bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr, inbound);
+ long ret = bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr, inbound);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `channel_reestablish` message from the given peer.
*/
public void handle_channel_reestablish(byte[] their_node_id, org.ldk.structs.ChannelReestablish msg) {
- bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `channel_update` message from the given peer.
*/
public void handle_channel_update(byte[] their_node_id, org.ldk.structs.ChannelUpdate msg) {
- bindings.ChannelMessageHandler_handle_channel_update(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_channel_update(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Handle an incoming `error` message from the given peer.
*/
public void handle_error(byte[] their_node_id, org.ldk.structs.ErrorMessage msg) {
- bindings.ChannelMessageHandler_handle_error(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.ChannelMessageHandler_handle_error(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* panics if the given update is not the next update by update_id.
*/
public Result_NoneNoneZ update_monitor(org.ldk.structs.ChannelMonitorUpdate updates, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
- long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates == null ? 0 : updates.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
+ long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(updates);
Reference.reachabilityFence(broadcaster);
return ret_hu_conv;
}
+ /**
+ * Gets the channel_id of the channel this ChannelMonitor is monitoring for.
+ */
+ public ChannelId channel_id() {
+ long ret = bindings.ChannelMonitor_channel_id(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
/**
* Gets a list of txids, with their output scripts (in the order they appear in the
* transaction), which we must learn about spends of via block_connected().
* [`Persist::update_persisted_channel`]: crate::chain::chainmonitor::Persist::update_persisted_channel
*/
public CommitmentTransaction[] counterparty_commitment_txs_from_update(org.ldk.structs.ChannelMonitorUpdate update) {
- long[] ret = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, update == null ? 0 : update.ptr);
+ long[] ret = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, update.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(update);
int ret_conv_23_len = ret.length;
}
/**
- * Used by [`ChannelManager`] deserialization to broadcast the latest holder state if its copy
- * of the channel state was out-of-date.
- *
- * You may also use this to broadcast the latest local commitment transaction, either because
+ * You may use this to broadcast the latest local commitment transaction, either because
* a monitor update failed or because we've fallen behind (i.e. we've received proof that our
* counterparty side knows a revocation secret we gave them that they shouldn't know).
*
- * Broadcasting these transactions in the second case is UNSAFE, as they allow counterparty
+ * Broadcasting these transactions in this manner is UNSAFE, as they allow counterparty
* side to punish you. Nevertheless you may want to broadcast them if counterparty doesn't
* close channel with their commitment transaction after a substantial amount of time. Best
* may be to contact the other node operator out-of-band to coordinate other options available
* to you.
- *
- * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
*/
- public byte[][] get_latest_holder_commitment_txn(org.ldk.structs.Logger logger) {
- byte[][] ret = bindings.ChannelMonitor_get_latest_holder_commitment_txn(this.ptr, logger.ptr);
+ public void broadcast_latest_holder_commitment_txn(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
+ bindings.ChannelMonitor_broadcast_latest_holder_commitment_txn(this.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
Reference.reachabilityFence(this);
+ Reference.reachabilityFence(broadcaster);
+ Reference.reachabilityFence(fee_estimator);
Reference.reachabilityFence(logger);
+ if (this != null) { this.ptrs_to.add(broadcaster); };
+ if (this != null) { this.ptrs_to.add(fee_estimator); };
if (this != null) { this.ptrs_to.add(logger); };
- return ret;
}
/**
* [`get_outputs_to_watch`]: #method.get_outputs_to_watch
*/
public TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
- long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
+ long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(header);
Reference.reachabilityFence(txdata);
* [`block_connected`]: Self::block_connected
*/
public TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
- long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
+ long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(header);
Reference.reachabilityFence(txdata);
if (this != null) { this.ptrs_to.add(logger); };
}
+ /**
+ * Triggers rebroadcasts of pending claims from a force-closed channel after a transaction
+ * signature generation failure.
+ */
+ public void signer_unblocked(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
+ bindings.ChannelMonitor_signer_unblocked(this.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(broadcaster);
+ Reference.reachabilityFence(fee_estimator);
+ Reference.reachabilityFence(logger);
+ if (this != null) { this.ptrs_to.add(broadcaster); };
+ if (this != null) { this.ptrs_to.add(fee_estimator); };
+ if (this != null) { this.ptrs_to.add(logger); };
+ }
+
/**
* Returns the descriptors for relevant outputs (i.e., those that we can spend) within the
* transaction if they exist and the transaction has at least [`ANTI_REORG_DELAY`]
return ret_conv_27_arr;
}
+ /**
+ * Checks if the monitor is fully resolved. Resolved monitor is one that has claimed all of
+ * its outputs and balances (i.e. [`Self::get_claimable_balances`] returns an empty set).
+ *
+ * This function returns true only if [`Self::get_claimable_balances`] has been empty for at least
+ * 4032 blocks as an additional protection against any bugs resulting in spuriously empty balance sets.
+ */
+ public boolean is_fully_resolved(org.ldk.structs.Logger logger) {
+ boolean ret = bindings.ChannelMonitor_is_fully_resolved(this.ptr, logger.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(logger);
+ if (this != null) { this.ptrs_to.add(logger); };
+ return ret;
+ }
+
/**
* Gets the balances in this channel which are either claimable by us if we were to
* force-close the channel now or which are claimable on-chain (possibly awaiting
Reference.reachabilityFence(val);
}
+ /**
+ * The channel ID associated with these updates.
+ *
+ * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and
+ * always `Some` otherwise.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public ChannelId get_channel_id() {
+ long ret = bindings.ChannelMonitorUpdate_get_channel_id(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The channel ID associated with these updates.
+ *
+ * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and
+ * always `Some` otherwise.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void set_channel_id(@Nullable org.ldk.structs.ChannelId val) {
+ bindings.ChannelMonitorUpdate_set_channel_id(this.ptr, val == null ? 0 : val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
long clone_ptr() {
long ret = bindings.ChannelMonitorUpdate_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelMonitorUpdate b) {
- boolean ret = bindings.ChannelMonitorUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelMonitorUpdate_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* states.
*/
public void set_revocation_basepoint(org.ldk.structs.RevocationBasepoint val) {
- bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* after some delay (or can be claimed via the revocation path).
*/
public void set_delayed_payment_basepoint(org.ldk.structs.DelayedPaymentBasepoint val) {
- bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* which is used to encumber HTLC-in-flight outputs.
*/
public void set_htlc_basepoint(org.ldk.structs.HtlcBasepoint val) {
- bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new ChannelPublicKeys given each field
*/
public static ChannelPublicKeys of(byte[] funding_pubkey_arg, org.ldk.structs.RevocationBasepoint revocation_basepoint_arg, byte[] payment_point_arg, org.ldk.structs.DelayedPaymentBasepoint delayed_payment_basepoint_arg, org.ldk.structs.HtlcBasepoint htlc_basepoint_arg) {
- long ret = bindings.ChannelPublicKeys_new(InternalUtils.check_arr_len(funding_pubkey_arg, 33), revocation_basepoint_arg == null ? 0 : revocation_basepoint_arg.ptr, InternalUtils.check_arr_len(payment_point_arg, 33), delayed_payment_basepoint_arg == null ? 0 : delayed_payment_basepoint_arg.ptr, htlc_basepoint_arg == null ? 0 : htlc_basepoint_arg.ptr);
+ long ret = bindings.ChannelPublicKeys_new(InternalUtils.check_arr_len(funding_pubkey_arg, 33), revocation_basepoint_arg.ptr, InternalUtils.check_arr_len(payment_point_arg, 33), delayed_payment_basepoint_arg.ptr, htlc_basepoint_arg.ptr);
Reference.reachabilityFence(funding_pubkey_arg);
Reference.reachabilityFence(revocation_basepoint_arg);
Reference.reachabilityFence(payment_point_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelPublicKeys b) {
- boolean ret = bindings.ChannelPublicKeys_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelPublicKeys_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.ChannelReady_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.ChannelReady_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.ChannelReady_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.ChannelReady_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new ChannelReady given each field
*/
- public static ChannelReady of(byte[] channel_id_arg, byte[] next_per_commitment_point_arg, org.ldk.structs.Option_u64Z short_channel_id_alias_arg) {
- long ret = bindings.ChannelReady_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(next_per_commitment_point_arg, 33), short_channel_id_alias_arg.ptr);
+ public static ChannelReady of(org.ldk.structs.ChannelId channel_id_arg, byte[] next_per_commitment_point_arg, org.ldk.structs.Option_u64Z short_channel_id_alias_arg) {
+ long ret = bindings.ChannelReady_new(channel_id_arg.ptr, InternalUtils.check_arr_len(next_per_commitment_point_arg, 33), short_channel_id_alias_arg.ptr);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(next_per_commitment_point_arg);
Reference.reachabilityFence(short_channel_id_alias_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ChannelReady ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelReady(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(short_channel_id_alias_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelReady b) {
- boolean ret = bindings.ChannelReady_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelReady_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.ChannelReestablish_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.ChannelReestablish_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.ChannelReestablish_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.ChannelReestablish_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new ChannelReestablish given each field
*/
- public static ChannelReestablish of(byte[] channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, org.ldk.structs.Option_ThirtyTwoBytesZ next_funding_txid_arg) {
- long ret = bindings.ChannelReestablish_new(InternalUtils.check_arr_len(channel_id_arg, 32), next_local_commitment_number_arg, next_remote_commitment_number_arg, InternalUtils.check_arr_len(your_last_per_commitment_secret_arg, 32), InternalUtils.check_arr_len(my_current_per_commitment_point_arg, 33), next_funding_txid_arg.ptr);
+ public static ChannelReestablish of(org.ldk.structs.ChannelId channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, org.ldk.structs.Option_ThirtyTwoBytesZ next_funding_txid_arg) {
+ long ret = bindings.ChannelReestablish_new(channel_id_arg.ptr, next_local_commitment_number_arg, next_remote_commitment_number_arg, InternalUtils.check_arr_len(your_last_per_commitment_secret_arg, 32), InternalUtils.check_arr_len(my_current_per_commitment_point_arg, 33), next_funding_txid_arg.ptr);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(next_local_commitment_number_arg);
Reference.reachabilityFence(next_remote_commitment_number_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ChannelReestablish ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelReestablish(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(next_funding_txid_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelReestablish b) {
- boolean ret = bindings.ChannelReestablish_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelReestablish_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
final bindings.LDKChannelSigner bindings_instance;
ChannelSigner(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
private ChannelSigner(bindings.LDKChannelSigner arg, ChannelPublicKeys pubkeys) {
- super(bindings.LDKChannelSigner_new(arg, pubkeys == null ? 0 : pubkeys.clone_ptr()));
+ super(bindings.LDKChannelSigner_new(arg, pubkeys.clone_ptr()));
this.ptrs_to.add(arg);
this.bindings_instance = arg;
}
org.ldk.structs.HolderCommitmentTransaction holder_tx_hu_conv = null; if (holder_tx < 0 || holder_tx > 4096) { holder_tx_hu_conv = new org.ldk.structs.HolderCommitmentTransaction(null, holder_tx); }
Result_NoneNoneZ ret = arg.validate_holder_commitment(holder_tx_hu_conv, outbound_htlc_preimages);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long validate_counterparty_revocation(long idx, byte[] secret) {
Result_NoneNoneZ ret = arg.validate_counterparty_revocation(idx, secret);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public byte[] channel_keys_id() {
* irrelevant or duplicate preimages.
*/
public Result_NoneNoneZ validate_holder_commitment(org.ldk.structs.HolderCommitmentTransaction holder_tx, byte[][] outbound_htlc_preimages) {
- long ret = bindings.ChannelSigner_validate_holder_commitment(this.ptr, holder_tx == null ? 0 : holder_tx.ptr, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null);
+ long ret = bindings.ChannelSigner_validate_holder_commitment(this.ptr, holder_tx.ptr, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(holder_tx);
Reference.reachabilityFence(outbound_htlc_preimages);
* channel_parameters.is_populated() MUST be true.
*/
public void provide_channel_parameters(org.ldk.structs.ChannelTransactionParameters channel_parameters) {
- bindings.ChannelSigner_provide_channel_parameters(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr);
+ bindings.ChannelSigner_provide_channel_parameters(this.ptr, channel_parameters.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(channel_parameters);
if (this != null) { this.ptrs_to.add(channel_parameters); };
* Holder public keys
*/
public void set_holder_pubkeys(org.ldk.structs.ChannelPublicKeys val) {
- bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* wasn't serialized, it will default to static_remote_key at deserialization.
*/
public void set_channel_type_features(org.ldk.structs.ChannelTypeFeatures val) {
- bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Note that funding_outpoint_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static ChannelTransactionParameters of(org.ldk.structs.ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, @Nullable org.ldk.structs.CounterpartyChannelTransactionParameters counterparty_parameters_arg, @Nullable org.ldk.structs.OutPoint funding_outpoint_arg, org.ldk.structs.ChannelTypeFeatures channel_type_features_arg) {
- long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, channel_type_features_arg == null ? 0 : channel_type_features_arg.ptr);
+ long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, channel_type_features_arg.ptr);
Reference.reachabilityFence(holder_pubkeys_arg);
Reference.reachabilityFence(holder_selected_contest_delay_arg);
Reference.reachabilityFence(is_outbound_from_holder_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelTransactionParameters b) {
- boolean ret = bindings.ChannelTransactionParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelTransactionParameters_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelTypeFeatures b) {
- boolean ret = bindings.ChannelTypeFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelTypeFeatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns true if this `Features` object contains required features unknown by `other`.
*/
public boolean requires_unknown_bits_from(org.ldk.structs.ChannelTypeFeatures other) {
- boolean ret = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+ boolean ret = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(other);
if (this != null) { this.ptrs_to.add(other); };
* The actual channel update
*/
public void set_contents(org.ldk.structs.UnsignedChannelUpdate val) {
- bindings.ChannelUpdate_set_contents(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelUpdate_set_contents(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new ChannelUpdate given each field
*/
public static ChannelUpdate of(byte[] signature_arg, org.ldk.structs.UnsignedChannelUpdate contents_arg) {
- long ret = bindings.ChannelUpdate_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg == null ? 0 : contents_arg.ptr);
+ long ret = bindings.ChannelUpdate_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg.ptr);
Reference.reachabilityFence(signature_arg);
Reference.reachabilityFence(contents_arg);
if (ret >= 0 && ret <= 4096) { return null; }
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelUpdate b) {
- boolean ret = bindings.ChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelUpdate_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Fees charged when the channel is used for routing
*/
public void set_fees(org.ldk.structs.RoutingFees val) {
- bindings.ChannelUpdateInfo_set_fees(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ChannelUpdateInfo_set_fees(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Note that last_update_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static ChannelUpdateInfo of(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.RoutingFees fees_arg, @Nullable org.ldk.structs.ChannelUpdate last_update_message_arg) {
- long ret = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg == null ? 0 : fees_arg.ptr, last_update_message_arg == null ? 0 : last_update_message_arg.ptr);
+ long ret = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg.ptr, last_update_message_arg == null ? 0 : last_update_message_arg.ptr);
Reference.reachabilityFence(last_update_arg);
Reference.reachabilityFence(enabled_arg);
Reference.reachabilityFence(cltv_expiry_delta_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ChannelUpdateInfo b) {
- boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The `channel_id` of the channel over which the HTLC was received.
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.ClaimedHTLC_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.ClaimedHTLC_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The `channel_id` of the channel over which the HTLC was received.
*/
- public void set_channel_id(byte[] val) {
- bindings.ClaimedHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.ClaimedHTLC_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new ClaimedHTLC given each field
*/
- public static ClaimedHTLC of(byte[] channel_id_arg, org.ldk.util.UInt128 user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg) {
- long ret = bindings.ClaimedHTLC_new(InternalUtils.check_arr_len(channel_id_arg, 32), user_channel_id_arg.getLEBytes(), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
+ public static ClaimedHTLC of(org.ldk.structs.ChannelId channel_id_arg, org.ldk.util.UInt128 user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg) {
+ long ret = bindings.ClaimedHTLC_new(channel_id_arg.ptr, user_channel_id_arg.getLEBytes(), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(user_channel_id_arg);
Reference.reachabilityFence(cltv_expiry_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ClaimedHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClaimedHTLC(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ClaimedHTLC b) {
- boolean ret = bindings.ClaimedHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ClaimedHTLC_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.ClosingSigned_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.ClosingSigned_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.ClosingSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.ClosingSigned_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
*
* Note that fee_range_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, @Nullable org.ldk.structs.ClosingSignedFeeRange fee_range_arg) {
- long ret = bindings.ClosingSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), fee_satoshis_arg, InternalUtils.check_arr_len(signature_arg, 64), fee_range_arg == null ? 0 : fee_range_arg.ptr);
+ public static ClosingSigned of(org.ldk.structs.ChannelId channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, @Nullable org.ldk.structs.ClosingSignedFeeRange fee_range_arg) {
+ long ret = bindings.ClosingSigned_new(channel_id_arg.ptr, fee_satoshis_arg, InternalUtils.check_arr_len(signature_arg, 64), fee_range_arg == null ? 0 : fee_range_arg.ptr);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(fee_satoshis_arg);
Reference.reachabilityFence(signature_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSigned(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_range_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ClosingSigned b) {
- boolean ret = bindings.ClosingSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ClosingSigned_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ClosingSignedFeeRange b) {
- boolean ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ClosingTransaction b) {
- boolean ret = bindings.ClosingTransaction_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ClosingTransaction_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Construct an object of the class
*/
public static ClosingTransaction of(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, org.ldk.structs.OutPoint funding_outpoint) {
- long ret = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr);
+ long ret = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint.ptr);
Reference.reachabilityFence(to_holder_value_sat);
Reference.reachabilityFence(to_counterparty_value_sat);
Reference.reachabilityFence(to_holder_script);
* or using the built transaction.
*/
public Result_TrustedClosingTransactionNoneZ verify(org.ldk.structs.OutPoint funding_outpoint) {
- long ret = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint == null ? 0 : funding_outpoint.ptr);
+ long ret = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(funding_outpoint);
if (ret >= 0 && ret <= 4096) { return null; }
if (raw_val.getClass() == bindings.LDKClosureReason.HolderForceClosed.class) {
return new HolderForceClosed(ptr, (bindings.LDKClosureReason.HolderForceClosed)raw_val);
}
- if (raw_val.getClass() == bindings.LDKClosureReason.CooperativeClosure.class) {
- return new CooperativeClosure(ptr, (bindings.LDKClosureReason.CooperativeClosure)raw_val);
+ if (raw_val.getClass() == bindings.LDKClosureReason.LegacyCooperativeClosure.class) {
+ return new LegacyCooperativeClosure(ptr, (bindings.LDKClosureReason.LegacyCooperativeClosure)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKClosureReason.CounterpartyInitiatedCooperativeClosure.class) {
+ return new CounterpartyInitiatedCooperativeClosure(ptr, (bindings.LDKClosureReason.CounterpartyInitiatedCooperativeClosure)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKClosureReason.LocallyInitiatedCooperativeClosure.class) {
+ return new LocallyInitiatedCooperativeClosure(ptr, (bindings.LDKClosureReason.LocallyInitiatedCooperativeClosure)raw_val);
}
if (raw_val.getClass() == bindings.LDKClosureReason.CommitmentTxConfirmed.class) {
return new CommitmentTxConfirmed(ptr, (bindings.LDKClosureReason.CommitmentTxConfirmed)raw_val);
if (raw_val.getClass() == bindings.LDKClosureReason.FundingBatchClosure.class) {
return new FundingBatchClosure(ptr, (bindings.LDKClosureReason.FundingBatchClosure)raw_val);
}
+ if (raw_val.getClass() == bindings.LDKClosureReason.HTLCsTimedOut.class) {
+ return new HTLCsTimedOut(ptr, (bindings.LDKClosureReason.HTLCsTimedOut)raw_val);
+ }
assert false; return null; // Unreachable without extending the (internal) bindings interface
}
/**
* The channel was closed after negotiating a cooperative close and we've now broadcasted
* the cooperative close transaction. Note the shutdown may have been initiated by us.
+ *
+ * This was only set in versions of LDK prior to 0.0.122.
+ */
+ public final static class LegacyCooperativeClosure extends ClosureReason {
+ private LegacyCooperativeClosure(long ptr, bindings.LDKClosureReason.LegacyCooperativeClosure obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * The channel was closed after negotiating a cooperative close and we've now broadcasted
+ * the cooperative close transaction. This indicates that the shutdown was initiated by our
+ * counterparty.
+ *
+ * In rare cases where we initiated closure immediately prior to shutting down without
+ * persisting, this value may be provided for channels we initiated closure for.
*/
- public final static class CooperativeClosure extends ClosureReason {
- private CooperativeClosure(long ptr, bindings.LDKClosureReason.CooperativeClosure obj) {
+ public final static class CounterpartyInitiatedCooperativeClosure extends ClosureReason {
+ private CounterpartyInitiatedCooperativeClosure(long ptr, bindings.LDKClosureReason.CounterpartyInitiatedCooperativeClosure obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * The channel was closed after negotiating a cooperative close and we've now broadcasted
+ * the cooperative close transaction. This indicates that the shutdown was initiated by us.
+ */
+ public final static class LocallyInitiatedCooperativeClosure extends ClosureReason {
+ private LocallyInitiatedCooperativeClosure(long ptr, bindings.LDKClosureReason.LocallyInitiatedCooperativeClosure obj) {
super(null, ptr);
}
}
super(null, ptr);
}
}
+ /**
+ * One of our HTLCs timed out in a channel, causing us to force close the channel.
+ */
+ public final static class HTLCsTimedOut extends ClosureReason {
+ private HTLCsTimedOut(long ptr, bindings.LDKClosureReason.HTLCsTimedOut obj) {
+ super(null, ptr);
+ }
+ }
long clone_ptr() {
long ret = bindings.ClosureReason_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
* Utility method to constructs a new CounterpartyForceClosed-variant ClosureReason
*/
public static ClosureReason counterparty_force_closed(org.ldk.structs.UntrustedString peer_msg) {
- long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg == null ? 0 : peer_msg.ptr);
+ long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg.ptr);
Reference.reachabilityFence(peer_msg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
}
/**
- * Utility method to constructs a new CooperativeClosure-variant ClosureReason
+ * Utility method to constructs a new LegacyCooperativeClosure-variant ClosureReason
+ */
+ public static ClosureReason legacy_cooperative_closure() {
+ long ret = bindings.ClosureReason_legacy_cooperative_closure();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new CounterpartyInitiatedCooperativeClosure-variant ClosureReason
*/
- public static ClosureReason cooperative_closure() {
- long ret = bindings.ClosureReason_cooperative_closure();
+ public static ClosureReason counterparty_initiated_cooperative_closure() {
+ long ret = bindings.ClosureReason_counterparty_initiated_cooperative_closure();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new LocallyInitiatedCooperativeClosure-variant ClosureReason
+ */
+ public static ClosureReason locally_initiated_cooperative_closure() {
+ long ret = bindings.ClosureReason_locally_initiated_cooperative_closure();
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new HTLCsTimedOut-variant ClosureReason
+ */
+ public static ClosureReason htlcs_timed_out() {
+ long ret = bindings.ClosureReason_htlcs_timed_out();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
/**
* Checks if two ClosureReasons contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.ClosureReason b) {
- boolean ret = bindings.ClosureReason_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ClosureReason_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* requiring additional fees.
*/
public void set_confirmed_utxos(Utxo[] val) {
- bindings.CoinSelection_set_confirmed_utxos(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6 == null ? 0 : val_conv_6.ptr).toArray() : null);
+ bindings.CoinSelection_set_confirmed_utxos(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (Utxo val_conv_6: val) { if (this != null) { this.ptrs_to.add(val_conv_6); }; };
* Constructs a new CoinSelection given each field
*/
public static CoinSelection of(Utxo[] confirmed_utxos_arg, org.ldk.structs.Option_TxOutZ change_output_arg) {
- long ret = bindings.CoinSelection_new(confirmed_utxos_arg != null ? Arrays.stream(confirmed_utxos_arg).mapToLong(confirmed_utxos_arg_conv_6 -> confirmed_utxos_arg_conv_6 == null ? 0 : confirmed_utxos_arg_conv_6.ptr).toArray() : null, change_output_arg.ptr);
+ long ret = bindings.CoinSelection_new(confirmed_utxos_arg != null ? Arrays.stream(confirmed_utxos_arg).mapToLong(confirmed_utxos_arg_conv_6 -> confirmed_utxos_arg_conv_6.ptr).toArray() : null, change_output_arg.ptr);
Reference.reachabilityFence(confirmed_utxos_arg);
Reference.reachabilityFence(change_output_arg);
if (ret >= 0 && ret <= 4096) { return null; }
}
Result_CoinSelectionNoneZ ret = arg.select_confirmed_utxos(claim_id, must_spend_conv_7_arr, must_pay_to_conv_7_arr, target_feerate_sat_per_1000_weight);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_psbt(byte[] psbt) {
Result_TransactionNoneZ ret = arg.sign_psbt(psbt);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
});
* set of other claims being double spent to a minimum.
*/
public Result_CoinSelectionNoneZ select_confirmed_utxos(byte[] claim_id, Input[] must_spend, TxOut[] must_pay_to, int target_feerate_sat_per_1000_weight) {
- long ret = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, InternalUtils.check_arr_len(claim_id, 32), must_spend != null ? Arrays.stream(must_spend).mapToLong(must_spend_conv_7 -> must_spend_conv_7 == null ? 0 : must_spend_conv_7.ptr).toArray() : null, must_pay_to != null ? Arrays.stream(must_pay_to).mapToLong(must_pay_to_conv_7 -> must_pay_to_conv_7.ptr).toArray() : null, target_feerate_sat_per_1000_weight);
+ long ret = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, InternalUtils.check_arr_len(claim_id, 32), must_spend != null ? Arrays.stream(must_spend).mapToLong(must_spend_conv_7 -> must_spend_conv_7.ptr).toArray() : null, must_pay_to != null ? Arrays.stream(must_pay_to).mapToLong(must_pay_to_conv_7 -> must_pay_to_conv_7.ptr).toArray() : null, target_feerate_sat_per_1000_weight);
Reference.reachabilityFence(this);
Reference.reachabilityFence(claim_id);
Reference.reachabilityFence(must_spend);
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.CommitmentSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.CommitmentSigned_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new CommitmentSigned given each field
*/
- public static CommitmentSigned of(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) {
- long ret = bindings.CommitmentSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(signature_arg, 64), htlc_signatures_arg != null ? Arrays.stream(htlc_signatures_arg).map(htlc_signatures_arg_conv_8 -> InternalUtils.check_arr_len(htlc_signatures_arg_conv_8, 64)).toArray(byte[][]::new) : null);
+ public static CommitmentSigned of(org.ldk.structs.ChannelId channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) {
+ long ret = bindings.CommitmentSigned_new(channel_id_arg.ptr, InternalUtils.check_arr_len(signature_arg, 64), htlc_signatures_arg != null ? Arrays.stream(htlc_signatures_arg).map(htlc_signatures_arg_conv_8 -> InternalUtils.check_arr_len(htlc_signatures_arg_conv_8, 64)).toArray(byte[][]::new) : null);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(signature_arg);
Reference.reachabilityFence(htlc_signatures_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.CommitmentSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommitmentSigned(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.CommitmentSigned b) {
- boolean ret = bindings.CommitmentSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.CommitmentSigned_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* or using the built transaction.
*/
public Result_TrustedCommitmentTransactionNoneZ verify(org.ldk.structs.DirectedChannelTransactionParameters channel_parameters, org.ldk.structs.ChannelPublicKeys broadcaster_keys, org.ldk.structs.ChannelPublicKeys countersignatory_keys) {
- long ret = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr, broadcaster_keys == null ? 0 : broadcaster_keys.ptr, countersignatory_keys == null ? 0 : countersignatory_keys.ptr);
+ long ret = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters.ptr, broadcaster_keys.ptr, countersignatory_keys.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(channel_parameters);
Reference.reachabilityFence(broadcaster_keys);
* `update_add_htlc` messages which should be sent
*/
public void set_update_add_htlcs(UpdateAddHTLC[] val) {
- bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_15 -> val_conv_15 == null ? 0 : val_conv_15.ptr).toArray() : null);
+ bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_15 -> val_conv_15.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (UpdateAddHTLC val_conv_15: val) { if (this != null) { this.ptrs_to.add(val_conv_15); }; };
* `update_fulfill_htlc` messages which should be sent
*/
public void set_update_fulfill_htlcs(UpdateFulfillHTLC[] val) {
- bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_19 -> val_conv_19 == null ? 0 : val_conv_19.ptr).toArray() : null);
+ bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_19 -> val_conv_19.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (UpdateFulfillHTLC val_conv_19: val) { if (this != null) { this.ptrs_to.add(val_conv_19); }; };
* `update_fail_htlc` messages which should be sent
*/
public void set_update_fail_htlcs(UpdateFailHTLC[] val) {
- bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16 == null ? 0 : val_conv_16.ptr).toArray() : null);
+ bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (UpdateFailHTLC val_conv_16: val) { if (this != null) { this.ptrs_to.add(val_conv_16); }; };
* `update_fail_malformed_htlc` messages which should be sent
*/
public void set_update_fail_malformed_htlcs(UpdateFailMalformedHTLC[] val) {
- bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_25 -> val_conv_25 == null ? 0 : val_conv_25.ptr).toArray() : null);
+ bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_25 -> val_conv_25.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (UpdateFailMalformedHTLC val_conv_25: val) { if (this != null) { this.ptrs_to.add(val_conv_25); }; };
* A `commitment_signed` message which should be sent
*/
public void set_commitment_signed(org.ldk.structs.CommitmentSigned val) {
- bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val == null ? 0 : val.ptr);
+ bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Note that update_fee_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static CommitmentUpdate of(UpdateAddHTLC[] update_add_htlcs_arg, UpdateFulfillHTLC[] update_fulfill_htlcs_arg, UpdateFailHTLC[] update_fail_htlcs_arg, UpdateFailMalformedHTLC[] update_fail_malformed_htlcs_arg, @Nullable org.ldk.structs.UpdateFee update_fee_arg, org.ldk.structs.CommitmentSigned commitment_signed_arg) {
- long ret = bindings.CommitmentUpdate_new(update_add_htlcs_arg != null ? Arrays.stream(update_add_htlcs_arg).mapToLong(update_add_htlcs_arg_conv_15 -> update_add_htlcs_arg_conv_15 == null ? 0 : update_add_htlcs_arg_conv_15.ptr).toArray() : null, update_fulfill_htlcs_arg != null ? Arrays.stream(update_fulfill_htlcs_arg).mapToLong(update_fulfill_htlcs_arg_conv_19 -> update_fulfill_htlcs_arg_conv_19 == null ? 0 : update_fulfill_htlcs_arg_conv_19.ptr).toArray() : null, update_fail_htlcs_arg != null ? Arrays.stream(update_fail_htlcs_arg).mapToLong(update_fail_htlcs_arg_conv_16 -> update_fail_htlcs_arg_conv_16 == null ? 0 : update_fail_htlcs_arg_conv_16.ptr).toArray() : null, update_fail_malformed_htlcs_arg != null ? Arrays.stream(update_fail_malformed_htlcs_arg).mapToLong(update_fail_malformed_htlcs_arg_conv_25 -> update_fail_malformed_htlcs_arg_conv_25 == null ? 0 : update_fail_malformed_htlcs_arg_conv_25.ptr).toArray() : null, update_fee_arg == null ? 0 : update_fee_arg.ptr, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr);
+ long ret = bindings.CommitmentUpdate_new(update_add_htlcs_arg != null ? Arrays.stream(update_add_htlcs_arg).mapToLong(update_add_htlcs_arg_conv_15 -> update_add_htlcs_arg_conv_15.ptr).toArray() : null, update_fulfill_htlcs_arg != null ? Arrays.stream(update_fulfill_htlcs_arg).mapToLong(update_fulfill_htlcs_arg_conv_19 -> update_fulfill_htlcs_arg_conv_19.ptr).toArray() : null, update_fail_htlcs_arg != null ? Arrays.stream(update_fail_htlcs_arg).mapToLong(update_fail_htlcs_arg_conv_16 -> update_fail_htlcs_arg_conv_16.ptr).toArray() : null, update_fail_malformed_htlcs_arg != null ? Arrays.stream(update_fail_malformed_htlcs_arg).mapToLong(update_fail_malformed_htlcs_arg_conv_25 -> update_fail_malformed_htlcs_arg_conv_25.ptr).toArray() : null, update_fee_arg == null ? 0 : update_fee_arg.ptr, commitment_signed_arg.ptr);
Reference.reachabilityFence(update_add_htlcs_arg);
Reference.reachabilityFence(update_fulfill_htlcs_arg);
Reference.reachabilityFence(update_fail_htlcs_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.CommitmentUpdate b) {
- boolean ret = bindings.CommitmentUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.CommitmentUpdate_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Contains fields that are both common to [`accept_channel`] and `accept_channel2` messages.
+ *
+ * [`accept_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel-message
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class CommonAcceptChannelFields extends CommonBase {
+ CommonAcceptChannelFields(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.CommonAcceptChannelFields_free(ptr); }
+ }
+
+ /**
+ * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message.
+ */
+ public ChannelId get_temporary_channel_id() {
+ long ret = bindings.CommonAcceptChannelFields_get_temporary_channel_id(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message.
+ */
+ public void set_temporary_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.CommonAcceptChannelFields_set_temporary_channel_id(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * The threshold below which outputs on transactions broadcast by the channel acceptor will be
+ * omitted
+ */
+ public long get_dust_limit_satoshis() {
+ long ret = bindings.CommonAcceptChannelFields_get_dust_limit_satoshis(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The threshold below which outputs on transactions broadcast by the channel acceptor will be
+ * omitted
+ */
+ public void set_dust_limit_satoshis(long val) {
+ bindings.CommonAcceptChannelFields_set_dust_limit_satoshis(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+ */
+ public long get_max_htlc_value_in_flight_msat() {
+ long ret = bindings.CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+ */
+ public void set_max_htlc_value_in_flight_msat(long val) {
+ bindings.CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
+ */
+ public long get_htlc_minimum_msat() {
+ long ret = bindings.CommonAcceptChannelFields_get_htlc_minimum_msat(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
+ */
+ public void set_htlc_minimum_msat(long val) {
+ bindings.CommonAcceptChannelFields_set_htlc_minimum_msat(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Minimum depth of the funding transaction before the channel is considered open
+ */
+ public int get_minimum_depth() {
+ int ret = bindings.CommonAcceptChannelFields_get_minimum_depth(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Minimum depth of the funding transaction before the channel is considered open
+ */
+ public void set_minimum_depth(int val) {
+ bindings.CommonAcceptChannelFields_set_minimum_depth(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+ * broadcast a commitment transaction
+ */
+ public short get_to_self_delay() {
+ short ret = bindings.CommonAcceptChannelFields_get_to_self_delay(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+ * broadcast a commitment transaction
+ */
+ public void set_to_self_delay(short val) {
+ bindings.CommonAcceptChannelFields_set_to_self_delay(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The maximum number of inbound HTLCs towards channel acceptor
+ */
+ public short get_max_accepted_htlcs() {
+ short ret = bindings.CommonAcceptChannelFields_get_max_accepted_htlcs(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The maximum number of inbound HTLCs towards channel acceptor
+ */
+ public void set_max_accepted_htlcs(short val) {
+ bindings.CommonAcceptChannelFields_set_max_accepted_htlcs(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The channel acceptor's key controlling the funding transaction
+ */
+ public byte[] get_funding_pubkey() {
+ byte[] ret = bindings.CommonAcceptChannelFields_get_funding_pubkey(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The channel acceptor's key controlling the funding transaction
+ */
+ public void set_funding_pubkey(byte[] val) {
+ bindings.CommonAcceptChannelFields_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Used to derive a revocation key for transactions broadcast by counterparty
+ */
+ public byte[] get_revocation_basepoint() {
+ byte[] ret = bindings.CommonAcceptChannelFields_get_revocation_basepoint(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Used to derive a revocation key for transactions broadcast by counterparty
+ */
+ public void set_revocation_basepoint(byte[] val) {
+ bindings.CommonAcceptChannelFields_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * A payment key to channel acceptor for transactions broadcast by counterparty
+ */
+ public byte[] get_payment_basepoint() {
+ byte[] ret = bindings.CommonAcceptChannelFields_get_payment_basepoint(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * A payment key to channel acceptor for transactions broadcast by counterparty
+ */
+ public void set_payment_basepoint(byte[] val) {
+ bindings.CommonAcceptChannelFields_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Used to derive a payment key to channel acceptor for transactions broadcast by channel
+ * acceptor
+ */
+ public byte[] get_delayed_payment_basepoint() {
+ byte[] ret = bindings.CommonAcceptChannelFields_get_delayed_payment_basepoint(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Used to derive a payment key to channel acceptor for transactions broadcast by channel
+ * acceptor
+ */
+ public void set_delayed_payment_basepoint(byte[] val) {
+ bindings.CommonAcceptChannelFields_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
+ */
+ public byte[] get_htlc_basepoint() {
+ byte[] ret = bindings.CommonAcceptChannelFields_get_htlc_basepoint(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
+ */
+ public void set_htlc_basepoint(byte[] val) {
+ bindings.CommonAcceptChannelFields_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
+ */
+ public byte[] get_first_per_commitment_point() {
+ byte[] ret = bindings.CommonAcceptChannelFields_get_first_per_commitment_point(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
+ */
+ public void set_first_per_commitment_point(byte[] val) {
+ bindings.CommonAcceptChannelFields_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
+ * collaboratively close
+ */
+ public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
+ long ret = bindings.CommonAcceptChannelFields_get_shutdown_scriptpubkey(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
+ * collaboratively close
+ */
+ public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
+ bindings.CommonAcceptChannelFields_set_shutdown_scriptpubkey(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * The channel type that this channel will represent. If none is set, we derive the channel
+ * type from the intersection of our feature bits with our counterparty's feature bits from
+ * the Init message.
+ *
+ * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s
+ * [`CommonOpenChannelFields::channel_type`].
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public ChannelTypeFeatures get_channel_type() {
+ long ret = bindings.CommonAcceptChannelFields_get_channel_type(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The channel type that this channel will represent. If none is set, we derive the channel
+ * type from the intersection of our feature bits with our counterparty's feature bits from
+ * the Init message.
+ *
+ * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s
+ * [`CommonOpenChannelFields::channel_type`].
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
+ bindings.CommonAcceptChannelFields_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * Constructs a new CommonAcceptChannelFields given each field
+ *
+ * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public static CommonAcceptChannelFields of(org.ldk.structs.ChannelId temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) {
+ long ret = bindings.CommonAcceptChannelFields_new(temporary_channel_id_arg.ptr, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr);
+ Reference.reachabilityFence(temporary_channel_id_arg);
+ Reference.reachabilityFence(dust_limit_satoshis_arg);
+ Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
+ Reference.reachabilityFence(htlc_minimum_msat_arg);
+ Reference.reachabilityFence(minimum_depth_arg);
+ Reference.reachabilityFence(to_self_delay_arg);
+ Reference.reachabilityFence(max_accepted_htlcs_arg);
+ Reference.reachabilityFence(funding_pubkey_arg);
+ Reference.reachabilityFence(revocation_basepoint_arg);
+ Reference.reachabilityFence(payment_basepoint_arg);
+ Reference.reachabilityFence(delayed_payment_basepoint_arg);
+ Reference.reachabilityFence(htlc_basepoint_arg);
+ Reference.reachabilityFence(first_per_commitment_point_arg);
+ Reference.reachabilityFence(shutdown_scriptpubkey_arg);
+ Reference.reachabilityFence(channel_type_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CommonAcceptChannelFields_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the CommonAcceptChannelFields
+ */
+ public CommonAcceptChannelFields clone() {
+ long ret = bindings.CommonAcceptChannelFields_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the CommonAcceptChannelFields.
+ */
+ public long hash() {
+ long ret = bindings.CommonAcceptChannelFields_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two CommonAcceptChannelFieldss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.CommonAcceptChannelFields b) {
+ boolean ret = bindings.CommonAcceptChannelFields_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof CommonAcceptChannelFields)) return false;
+ return this.eq((CommonAcceptChannelFields)o);
+ }
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Contains fields that are both common to [`open_channel`] and `open_channel2` messages.
+ *
+ * [`open_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class CommonOpenChannelFields extends CommonBase {
+ CommonOpenChannelFields(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.CommonOpenChannelFields_free(ptr); }
+ }
+
+ /**
+ * The genesis hash of the blockchain where the channel is to be opened
+ */
+ public byte[] get_chain_hash() {
+ byte[] ret = bindings.CommonOpenChannelFields_get_chain_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The genesis hash of the blockchain where the channel is to be opened
+ */
+ public void set_chain_hash(byte[] val) {
+ bindings.CommonOpenChannelFields_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * A temporary channel ID
+ * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint
+ * For V1 channels: a temporary channel ID, until the funding outpoint is announced
+ */
+ public ChannelId get_temporary_channel_id() {
+ long ret = bindings.CommonOpenChannelFields_get_temporary_channel_id(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * A temporary channel ID
+ * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint
+ * For V1 channels: a temporary channel ID, until the funding outpoint is announced
+ */
+ public void set_temporary_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.CommonOpenChannelFields_set_temporary_channel_id(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * For V1 channels: The channel value
+ * For V2 channels: Part of the channel value contributed by the channel initiator
+ */
+ public long get_funding_satoshis() {
+ long ret = bindings.CommonOpenChannelFields_get_funding_satoshis(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * For V1 channels: The channel value
+ * For V2 channels: Part of the channel value contributed by the channel initiator
+ */
+ public void set_funding_satoshis(long val) {
+ bindings.CommonOpenChannelFields_set_funding_satoshis(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The threshold below which outputs on transactions broadcast by the channel initiator will be
+ * omitted
+ */
+ public long get_dust_limit_satoshis() {
+ long ret = bindings.CommonOpenChannelFields_get_dust_limit_satoshis(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The threshold below which outputs on transactions broadcast by the channel initiator will be
+ * omitted
+ */
+ public void set_dust_limit_satoshis(long val) {
+ bindings.CommonOpenChannelFields_set_dust_limit_satoshis(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
+ */
+ public long get_max_htlc_value_in_flight_msat() {
+ long ret = bindings.CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
+ */
+ public void set_max_htlc_value_in_flight_msat(long val) {
+ bindings.CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The minimum HTLC size incoming to channel initiator, in milli-satoshi
+ */
+ public long get_htlc_minimum_msat() {
+ long ret = bindings.CommonOpenChannelFields_get_htlc_minimum_msat(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The minimum HTLC size incoming to channel initiator, in milli-satoshi
+ */
+ public void set_htlc_minimum_msat(long val) {
+ bindings.CommonOpenChannelFields_set_htlc_minimum_msat(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The feerate for the commitment transaction set by the channel initiator until updated by
+ * [`UpdateFee`]
+ */
+ public int get_commitment_feerate_sat_per_1000_weight() {
+ int ret = bindings.CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The feerate for the commitment transaction set by the channel initiator until updated by
+ * [`UpdateFee`]
+ */
+ public void set_commitment_feerate_sat_per_1000_weight(int val) {
+ bindings.CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+ * broadcast a commitment transaction
+ */
+ public short get_to_self_delay() {
+ short ret = bindings.CommonOpenChannelFields_get_to_self_delay(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+ * broadcast a commitment transaction
+ */
+ public void set_to_self_delay(short val) {
+ bindings.CommonOpenChannelFields_set_to_self_delay(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The maximum number of inbound HTLCs towards channel initiator
+ */
+ public short get_max_accepted_htlcs() {
+ short ret = bindings.CommonOpenChannelFields_get_max_accepted_htlcs(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The maximum number of inbound HTLCs towards channel initiator
+ */
+ public void set_max_accepted_htlcs(short val) {
+ bindings.CommonOpenChannelFields_set_max_accepted_htlcs(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The channel initiator's key controlling the funding transaction
+ */
+ public byte[] get_funding_pubkey() {
+ byte[] ret = bindings.CommonOpenChannelFields_get_funding_pubkey(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The channel initiator's key controlling the funding transaction
+ */
+ public void set_funding_pubkey(byte[] val) {
+ bindings.CommonOpenChannelFields_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Used to derive a revocation key for transactions broadcast by counterparty
+ */
+ public byte[] get_revocation_basepoint() {
+ byte[] ret = bindings.CommonOpenChannelFields_get_revocation_basepoint(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Used to derive a revocation key for transactions broadcast by counterparty
+ */
+ public void set_revocation_basepoint(byte[] val) {
+ bindings.CommonOpenChannelFields_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * A payment key to channel initiator for transactions broadcast by counterparty
+ */
+ public byte[] get_payment_basepoint() {
+ byte[] ret = bindings.CommonOpenChannelFields_get_payment_basepoint(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * A payment key to channel initiator for transactions broadcast by counterparty
+ */
+ public void set_payment_basepoint(byte[] val) {
+ bindings.CommonOpenChannelFields_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Used to derive a payment key to channel initiator for transactions broadcast by channel
+ * initiator
+ */
+ public byte[] get_delayed_payment_basepoint() {
+ byte[] ret = bindings.CommonOpenChannelFields_get_delayed_payment_basepoint(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Used to derive a payment key to channel initiator for transactions broadcast by channel
+ * initiator
+ */
+ public void set_delayed_payment_basepoint(byte[] val) {
+ bindings.CommonOpenChannelFields_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Used to derive an HTLC payment key to channel initiator
+ */
+ public byte[] get_htlc_basepoint() {
+ byte[] ret = bindings.CommonOpenChannelFields_get_htlc_basepoint(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Used to derive an HTLC payment key to channel initiator
+ */
+ public void set_htlc_basepoint(byte[] val) {
+ bindings.CommonOpenChannelFields_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
+ */
+ public byte[] get_first_per_commitment_point() {
+ byte[] ret = bindings.CommonOpenChannelFields_get_first_per_commitment_point(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
+ */
+ public void set_first_per_commitment_point(byte[] val) {
+ bindings.CommonOpenChannelFields_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The channel flags to be used
+ */
+ public byte get_channel_flags() {
+ byte ret = bindings.CommonOpenChannelFields_get_channel_flags(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The channel flags to be used
+ */
+ public void set_channel_flags(byte val) {
+ bindings.CommonOpenChannelFields_set_channel_flags(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
+ * collaboratively close
+ */
+ public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
+ long ret = bindings.CommonOpenChannelFields_get_shutdown_scriptpubkey(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
+ * collaboratively close
+ */
+ public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
+ bindings.CommonOpenChannelFields_set_shutdown_scriptpubkey(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * The channel type that this channel will represent
+ *
+ * If this is `None`, we derive the channel type from the intersection of our
+ * feature bits with our counterparty's feature bits from the [`Init`] message.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public ChannelTypeFeatures get_channel_type() {
+ long ret = bindings.CommonOpenChannelFields_get_channel_type(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The channel type that this channel will represent
+ *
+ * If this is `None`, we derive the channel type from the intersection of our
+ * feature bits with our counterparty's feature bits from the [`Init`] message.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
+ bindings.CommonOpenChannelFields_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * Constructs a new CommonOpenChannelFields given each field
+ *
+ * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public static CommonOpenChannelFields of(byte[] chain_hash_arg, org.ldk.structs.ChannelId temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int commitment_feerate_sat_per_1000_weight_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) {
+ long ret = bindings.CommonOpenChannelFields_new(InternalUtils.check_arr_len(chain_hash_arg, 32), temporary_channel_id_arg.ptr, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr);
+ Reference.reachabilityFence(chain_hash_arg);
+ Reference.reachabilityFence(temporary_channel_id_arg);
+ Reference.reachabilityFence(funding_satoshis_arg);
+ Reference.reachabilityFence(dust_limit_satoshis_arg);
+ Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
+ Reference.reachabilityFence(htlc_minimum_msat_arg);
+ Reference.reachabilityFence(commitment_feerate_sat_per_1000_weight_arg);
+ Reference.reachabilityFence(to_self_delay_arg);
+ Reference.reachabilityFence(max_accepted_htlcs_arg);
+ Reference.reachabilityFence(funding_pubkey_arg);
+ Reference.reachabilityFence(revocation_basepoint_arg);
+ Reference.reachabilityFence(payment_basepoint_arg);
+ Reference.reachabilityFence(delayed_payment_basepoint_arg);
+ Reference.reachabilityFence(htlc_basepoint_arg);
+ Reference.reachabilityFence(first_per_commitment_point_arg);
+ Reference.reachabilityFence(channel_flags_arg);
+ Reference.reachabilityFence(shutdown_scriptpubkey_arg);
+ Reference.reachabilityFence(channel_type_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CommonOpenChannelFields_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the CommonOpenChannelFields
+ */
+ public CommonOpenChannelFields clone() {
+ long ret = bindings.CommonOpenChannelFields_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the CommonOpenChannelFields.
+ */
+ public long hash() {
+ long ret = bindings.CommonOpenChannelFields_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two CommonOpenChannelFieldss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.CommonOpenChannelFields b) {
+ boolean ret = bindings.CommonOpenChannelFields_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof CommonOpenChannelFields)) return false;
+ return this.eq((CommonOpenChannelFields)o);
+ }
+}
@Override public long[] get_relevant_txids() {
ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[] ret = arg.get_relevant_txids();
Reference.reachabilityFence(arg);
- long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_54 -> ret_conv_54 == null ? 0 : ret_conv_54.clone_ptr()).toArray() : null;
+ long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_54 -> ret_conv_54.clone_ptr()).toArray() : null;
return result;
}
});
* [`best_block_updated`]: Self::best_block_updated
*/
public void transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) {
- bindings.Confirm_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height);
+ bindings.Confirm_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height);
Reference.reachabilityFence(this);
Reference.reachabilityFence(header);
Reference.reachabilityFence(txdata);
* Counter-party public keys
*/
public void set_pubkeys(org.ldk.structs.ChannelPublicKeys val) {
- bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val == null ? 0 : val.ptr);
+ bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new CounterpartyChannelTransactionParameters given each field
*/
public static CounterpartyChannelTransactionParameters of(org.ldk.structs.ChannelPublicKeys pubkeys_arg, short selected_contest_delay_arg) {
- long ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg == null ? 0 : pubkeys_arg.ptr, selected_contest_delay_arg);
+ long ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg.ptr, selected_contest_delay_arg);
Reference.reachabilityFence(pubkeys_arg);
Reference.reachabilityFence(selected_contest_delay_arg);
if (ret >= 0 && ret <= 4096) { return null; }
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.CounterpartyChannelTransactionParameters b) {
- boolean ret = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
Result_NoneLightningErrorZ ret = arg.handle_custom_message(ret_hu_conv, sender_node_id);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long[] get_and_clear_pending_msg() {
TwoTuple_PublicKeyTypeZ[] ret = arg.get_and_clear_pending_msg();
Reference.reachabilityFence(arg);
- long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_25 -> ret_conv_25 == null ? 0 : ret_conv_25.clone_ptr()).toArray() : null;
+ long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_25 -> ret_conv_25.clone_ptr()).toArray() : null;
return result;
}
@Override public long provided_node_features() {
NodeFeatures ret = arg.provided_node_features();
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long provided_init_features(byte[] their_node_id) {
InitFeatures ret = arg.provided_init_features(their_node_id);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
}, CustomMessageReader.new_impl(CustomMessageReader_impl).bindings_instance);
@Override public long read(short message_type, byte[] buffer) {
Result_COption_TypeZDecodeErrorZ ret = arg.read(message_type, buffer);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
});
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
Option_OnionMessageContentsZ ret = arg.handle_custom_message(ret_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
return result;
}
@Override public long read_custom_message(long message_type, byte[] buffer) {
Result_COption_OnionMessageContentsZDecodeErrorZ ret = arg.read_custom_message(message_type, buffer);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long[] release_pending_custom_messages() {
ThreeTuple_OnionMessageContentsDestinationBlindedPathZ[] ret = arg.release_pending_custom_messages();
Reference.reachabilityFence(arg);
- long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_56 -> ret_conv_56 == null ? 0 : ret_conv_56.clone_ptr()).toArray() : null;
+ long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_56 -> ret_conv_56.clone_ptr()).toArray() : null;
return result;
}
});
if (raw_val.getClass() == bindings.LDKDecodeError.UnsupportedCompression.class) {
return new UnsupportedCompression(ptr, (bindings.LDKDecodeError.UnsupportedCompression)raw_val);
}
+ if (raw_val.getClass() == bindings.LDKDecodeError.DangerousValue.class) {
+ return new DangerousValue(ptr, (bindings.LDKDecodeError.DangerousValue)raw_val);
+ }
assert false; return null; // Unreachable without extending the (internal) bindings interface
}
super(null, ptr);
}
}
+ /**
+ * Value is validly encoded but is dangerous to use.
+ *
+ * This is used for things like [`ChannelManager`] deserialization where we want to ensure
+ * that we don't use a [`ChannelManager`] which is in out of sync with the [`ChannelMonitor`].
+ * This indicates that there is a critical implementation flaw in the storage implementation
+ * and it's unsafe to continue.
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+ * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+ */
+ public final static class DangerousValue extends DecodeError {
+ private DangerousValue(long ptr, bindings.LDKDecodeError.DangerousValue obj) {
+ super(null, ptr);
+ }
+ }
long clone_ptr() {
long ret = bindings.DecodeError_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new DangerousValue-variant DecodeError
+ */
+ public static DecodeError dangerous_value() {
+ long ret = bindings.DecodeError_dangerous_value();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
/**
* Generates a non-cryptographic 64-bit hash of the DecodeError.
*/
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.DecodeError b) {
- boolean ret = bindings.DecodeError_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.DecodeError_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Creates a [`DefaultMessageRouter`] using the given [`NetworkGraph`].
*/
public static DefaultMessageRouter of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.EntropySource entropy_source) {
- long ret = bindings.DefaultMessageRouter_new(network_graph == null ? 0 : network_graph.ptr, entropy_source.ptr);
+ long ret = bindings.DefaultMessageRouter_new(network_graph.ptr, entropy_source.ptr);
Reference.reachabilityFence(network_graph);
Reference.reachabilityFence(entropy_source);
if (ret >= 0 && ret <= 4096) { return null; }
* Creates a new router.
*/
public static DefaultRouter of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.LockableScore scorer, org.ldk.structs.ProbabilisticScoringFeeParameters score_params) {
- long ret = bindings.DefaultRouter_new(network_graph == null ? 0 : network_graph.ptr, logger.ptr, entropy_source.ptr, scorer.ptr, score_params == null ? 0 : score_params.ptr);
+ long ret = bindings.DefaultRouter_new(network_graph.ptr, logger.ptr, entropy_source.ptr, scorer.ptr, score_params.ptr);
Reference.reachabilityFence(network_graph);
Reference.reachabilityFence(logger);
Reference.reachabilityFence(entropy_source);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.DelayedPaymentBasepoint b) {
- boolean ret = bindings.DelayedPaymentBasepoint_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.DelayedPaymentBasepoint_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
return ret;
}
+ /**
+ * Derives the \"tweak\" used in calculate [`DelayedPaymentKey::from_basepoint`].\n\n[`DelayedPaymentKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party.
+ */
+ public byte[] derive_add_tweak(byte[] per_commitment_point) {
+ byte[] ret = bindings.DelayedPaymentBasepoint_derive_add_tweak(this.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(per_commitment_point);
+ return ret;
+ }
+
/**
* Serialize the DelayedPaymentBasepoint object into a byte array which can be read by DelayedPaymentBasepoint_read
*/
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.DelayedPaymentKey b) {
- boolean ret = bindings.DelayedPaymentKey_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.DelayedPaymentKey_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Derive a public delayedpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint`
*/
public static DelayedPaymentKey from_basepoint(org.ldk.structs.DelayedPaymentBasepoint countersignatory_basepoint, byte[] per_commitment_point) {
- long ret = bindings.DelayedPaymentKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+ long ret = bindings.DelayedPaymentKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
Reference.reachabilityFence(countersignatory_basepoint);
Reference.reachabilityFence(per_commitment_point);
if (ret >= 0 && ret <= 4096) { return null; }
* The outpoint which is spendable.
*/
public void set_outpoint(org.ldk.structs.OutPoint val) {
- bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+ bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* derive the witnessScript for this output.
*/
public void set_revocation_pubkey(org.ldk.structs.RevocationKey val) {
- bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val == null ? 0 : val.ptr);
+ bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
Reference.reachabilityFence(val);
}
+ /**
+ * The channel public keys and other parameters needed to generate a spending transaction or
+ * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`].
+ *
+ * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public ChannelTransactionParameters get_channel_transaction_parameters() {
+ long ret = bindings.DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelTransactionParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTransactionParameters(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The channel public keys and other parameters needed to generate a spending transaction or
+ * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`].
+ *
+ * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void set_channel_transaction_parameters(@Nullable org.ldk.structs.ChannelTransactionParameters val) {
+ bindings.DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(this.ptr, val == null ? 0 : val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
/**
* Constructs a new DelayedPaymentOutputDescriptor given each field
+ *
+ * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) {
- long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, InternalUtils.check_arr_len(per_commitment_point_arg, 33), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg == null ? 0 : revocation_pubkey_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg);
+ public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, @Nullable org.ldk.structs.ChannelTransactionParameters channel_transaction_parameters_arg) {
+ long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg.ptr, InternalUtils.check_arr_len(per_commitment_point_arg, 33), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr);
Reference.reachabilityFence(outpoint_arg);
Reference.reachabilityFence(per_commitment_point_arg);
Reference.reachabilityFence(to_self_delay_arg);
Reference.reachabilityFence(revocation_pubkey_arg);
Reference.reachabilityFence(channel_keys_id_arg);
Reference.reachabilityFence(channel_value_satoshis_arg);
+ Reference.reachabilityFence(channel_transaction_parameters_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.DelayedPaymentOutputDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DelayedPaymentOutputDescriptor(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint_arg); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(revocation_pubkey_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_transaction_parameters_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.DelayedPaymentOutputDescriptor b) {
- boolean ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Description b) {
- boolean ret = bindings.Description_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Description_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Utility method to constructs a new BlindedPath-variant Destination
*/
public static Destination blinded_path(org.ldk.structs.BlindedPath a) {
- long ret = bindings.Destination_blinded_path(a == null ? 0 : a.ptr);
+ long ret = bindings.Destination_blinded_path(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Destination ret_hu_conv = org.ldk.structs.Destination.constr_from_ptr(ret);
return ret_hu_conv;
}
+ /**
+ * Generates a non-cryptographic 64-bit hash of the Destination.
+ */
+ public long hash() {
+ long ret = bindings.Destination_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two Destinations contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public boolean eq(org.ldk.structs.Destination b) {
+ boolean ret = bindings.Destination_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof Destination)) return false;
+ return this.eq((Destination)o);
+ }
+ /**
+ * Attempts to resolve the [`IntroductionNode::DirectedShortChannelId`] of a
+ * [`Destination::BlindedPath`] to a [`IntroductionNode::NodeId`], if applicable, using the
+ * provided [`ReadOnlyNetworkGraph`].
+ */
+ public void resolve(org.ldk.structs.ReadOnlyNetworkGraph network_graph) {
+ bindings.Destination_resolve(this.ptr, network_graph.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(network_graph);
+ if (this != null) { this.ptrs_to.add(network_graph); };
+ }
+
}
return ret_hu_conv;
}
+ /**
+ * Returns the `node_id` of the source hop.
+ *
+ * Refers to the `node_id` forwarding the payment to the next hop.
+ */
+ public NodeId source() {
+ long ret = bindings.DirectedChannelInfo_source(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Returns the `node_id` of the target hop.
+ *
+ * Refers to the `node_id` receiving the payment from the previous hop.
+ */
+ public NodeId target() {
+ long ret = bindings.DirectedChannelInfo_target(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
}
final bindings.LDKEcdsaChannelSigner bindings_instance;
EcdsaChannelSigner(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
private EcdsaChannelSigner(bindings.LDKEcdsaChannelSigner arg, bindings.LDKChannelSigner ChannelSigner, ChannelPublicKeys pubkeys) {
- super(bindings.LDKEcdsaChannelSigner_new(arg, ChannelSigner, pubkeys == null ? 0 : pubkeys.clone_ptr()));
+ super(bindings.LDKEcdsaChannelSigner_new(arg, ChannelSigner, pubkeys.clone_ptr()));
this.ptrs_to.add(arg);
this.ptrs_to.add(ChannelSigner);
this.bindings_instance = arg;
* This may be called multiple times for the same transaction.
*
* An external signer implementation should check that the commitment has not been revoked.
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_holder_commitment(HolderCommitmentTransaction commitment_tx);
/**
* 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).
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key);
/**
*
* `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script
* (which is committed to in the BIP 143 signatures).
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc);
/**
* [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas)
* broadcasts it before receiving the update for the latest commitment transaction.
*
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
* [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All
* [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, HTLCDescriptor htlc_descriptor);
/**
* 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.
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc);
/**
/**
* Computes the signature for a commitment transaction's anchor output used as an
* input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input);
/**
org.ldk.structs.CommitmentTransaction commitment_tx_hu_conv = null; if (commitment_tx < 0 || commitment_tx > 4096) { commitment_tx_hu_conv = new org.ldk.structs.CommitmentTransaction(null, commitment_tx); }
Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret = arg.sign_counterparty_commitment(commitment_tx_hu_conv, inbound_htlc_preimages, outbound_htlc_preimages);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_holder_commitment(long commitment_tx) {
org.ldk.structs.HolderCommitmentTransaction commitment_tx_hu_conv = null; if (commitment_tx < 0 || commitment_tx > 4096) { commitment_tx_hu_conv = new org.ldk.structs.HolderCommitmentTransaction(null, commitment_tx); }
Result_ECDSASignatureNoneZ ret = arg.sign_holder_commitment(commitment_tx_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key) {
Result_ECDSASignatureNoneZ ret = arg.sign_justice_revoked_output(justice_tx, input, amount, per_commitment_key);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc) {
org.ldk.structs.HTLCOutputInCommitment htlc_hu_conv = null; if (htlc < 0 || htlc > 4096) { htlc_hu_conv = new org.ldk.structs.HTLCOutputInCommitment(null, htlc); }
Result_ECDSASignatureNoneZ ret = arg.sign_justice_revoked_htlc(justice_tx, input, amount, per_commitment_key, htlc_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_holder_htlc_transaction(byte[] htlc_tx, long input, long htlc_descriptor) {
org.ldk.structs.HTLCDescriptor htlc_descriptor_hu_conv = null; if (htlc_descriptor < 0 || htlc_descriptor > 4096) { htlc_descriptor_hu_conv = new org.ldk.structs.HTLCDescriptor(null, htlc_descriptor); }
Result_ECDSASignatureNoneZ ret = arg.sign_holder_htlc_transaction(htlc_tx, input, htlc_descriptor_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc) {
org.ldk.structs.HTLCOutputInCommitment htlc_hu_conv = null; if (htlc < 0 || htlc > 4096) { htlc_hu_conv = new org.ldk.structs.HTLCOutputInCommitment(null, htlc); }
Result_ECDSASignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(htlc_tx, input, amount, per_commitment_point, htlc_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_closing_transaction(long closing_tx) {
org.ldk.structs.ClosingTransaction closing_tx_hu_conv = null; if (closing_tx < 0 || closing_tx > 4096) { closing_tx_hu_conv = new org.ldk.structs.ClosingTransaction(null, closing_tx); }
Result_ECDSASignatureNoneZ ret = arg.sign_closing_transaction(closing_tx_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_holder_anchor_input(byte[] anchor_tx, long input) {
Result_ECDSASignatureNoneZ ret = arg.sign_holder_anchor_input(anchor_tx, input);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_channel_announcement_with_funding_key(long msg) {
org.ldk.structs.UnsignedChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.UnsignedChannelAnnouncement(null, msg); }
Result_ECDSASignatureNoneZ ret = arg.sign_channel_announcement_with_funding_key(msg_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
}, ChannelSigner.new_impl(ChannelSigner_impl, pubkeys).bindings_instance, pubkeys);
* irrelevant or duplicate preimages.
*/
public Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ sign_counterparty_commitment(org.ldk.structs.CommitmentTransaction commitment_tx, byte[][] inbound_htlc_preimages, byte[][] outbound_htlc_preimages) {
- long ret = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr, inbound_htlc_preimages != null ? Arrays.stream(inbound_htlc_preimages).map(inbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(inbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null);
+ long ret = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, commitment_tx.ptr, inbound_htlc_preimages != null ? Arrays.stream(inbound_htlc_preimages).map(inbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(inbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(commitment_tx);
Reference.reachabilityFence(inbound_htlc_preimages);
* This may be called multiple times for the same transaction.
*
* An external signer implementation should check that the commitment has not been revoked.
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
public Result_ECDSASignatureNoneZ sign_holder_commitment(org.ldk.structs.HolderCommitmentTransaction commitment_tx) {
- long ret = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr);
+ long ret = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, commitment_tx.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(commitment_tx);
if (ret >= 0 && ret <= 4096) { return null; }
* 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).
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
public Result_ECDSASignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key) {
long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_output(this.ptr, justice_tx, input, amount, InternalUtils.check_arr_len(per_commitment_key, 32));
*
* `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script
* (which is committed to in the BIP 143 signatures).
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
public Result_ECDSASignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, org.ldk.structs.HTLCOutputInCommitment htlc) {
- long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, justice_tx, input, amount, InternalUtils.check_arr_len(per_commitment_key, 32), htlc == null ? 0 : htlc.ptr);
+ long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, justice_tx, input, amount, InternalUtils.check_arr_len(per_commitment_key, 32), htlc.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(justice_tx);
Reference.reachabilityFence(input);
* [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas)
* broadcasts it before receiving the update for the latest commitment transaction.
*
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
* [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All
* [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
public Result_ECDSASignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, org.ldk.structs.HTLCDescriptor htlc_descriptor) {
- long ret = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, htlc_tx, input, htlc_descriptor == null ? 0 : htlc_descriptor.ptr);
+ long ret = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, htlc_tx, input, htlc_descriptor.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(htlc_tx);
Reference.reachabilityFence(input);
* 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.
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
public Result_ECDSASignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, org.ldk.structs.HTLCOutputInCommitment htlc) {
- long ret = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, InternalUtils.check_arr_len(per_commitment_point, 33), htlc == null ? 0 : htlc.ptr);
+ long ret = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, InternalUtils.check_arr_len(per_commitment_point, 33), htlc.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(htlc_tx);
Reference.reachabilityFence(input);
* chosen to forgo their output as dust.
*/
public Result_ECDSASignatureNoneZ sign_closing_transaction(org.ldk.structs.ClosingTransaction closing_tx) {
- long ret = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx == null ? 0 : closing_tx.ptr);
+ long ret = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(closing_tx);
if (ret >= 0 && ret <= 4096) { return null; }
/**
* Computes the signature for a commitment transaction's anchor output used as an
* input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+ *
+ * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+ * signature and should be retried later. Once the signer is ready to provide a signature after
+ * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+ * monitor.
+ *
+ * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
*/
public Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input) {
long ret = bindings.EcdsaChannelSigner_sign_holder_anchor_input(this.ptr, anchor_tx, input);
* [`NodeSigner::sign_gossip_message`]: crate::sign::NodeSigner::sign_gossip_message
*/
public Result_ECDSASignatureNoneZ sign_channel_announcement_with_funding_key(org.ldk.structs.UnsignedChannelAnnouncement msg) {
- long ret = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A [`NodeIdLookUp`] that always returns `None`.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class EmptyNodeIdLookUp extends CommonBase {
+ EmptyNodeIdLookUp(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.EmptyNodeIdLookUp_free(ptr); }
+ }
+
+ /**
+ * Constructs a new EmptyNodeIdLookUp given each field
+ */
+ public static EmptyNodeIdLookUp of() {
+ long ret = bindings.EmptyNodeIdLookUp_new();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.EmptyNodeIdLookUp ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.EmptyNodeIdLookUp(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is
+ */
+ public NodeIdLookUp as_NodeIdLookUp() {
+ long ret = bindings.EmptyNodeIdLookUp_as_NodeIdLookUp(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ NodeIdLookUp ret_hu_conv = new NodeIdLookUp(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+}
* Utility method to constructs a new DisconnectPeer-variant ErrorAction
*/
public static ErrorAction disconnect_peer(org.ldk.structs.ErrorMessage msg) {
- long ret = bindings.ErrorAction_disconnect_peer(msg == null ? 0 : msg.ptr);
+ long ret = bindings.ErrorAction_disconnect_peer(msg.ptr);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
* Utility method to constructs a new DisconnectPeerWithWarning-variant ErrorAction
*/
public static ErrorAction disconnect_peer_with_warning(org.ldk.structs.WarningMessage msg) {
- long ret = bindings.ErrorAction_disconnect_peer_with_warning(msg == null ? 0 : msg.ptr);
+ long ret = bindings.ErrorAction_disconnect_peer_with_warning(msg.ptr);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
* Utility method to constructs a new SendErrorMessage-variant ErrorAction
*/
public static ErrorAction send_error_message(org.ldk.structs.ErrorMessage msg) {
- long ret = bindings.ErrorAction_send_error_message(msg == null ? 0 : msg.ptr);
+ long ret = bindings.ErrorAction_send_error_message(msg.ptr);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
* Utility method to constructs a new SendWarningMessage-variant ErrorAction
*/
public static ErrorAction send_warning_message(org.ldk.structs.WarningMessage msg, org.ldk.enums.Level log_level) {
- long ret = bindings.ErrorAction_send_warning_message(msg == null ? 0 : msg.ptr, log_level);
+ long ret = bindings.ErrorAction_send_warning_message(msg.ptr, log_level);
Reference.reachabilityFence(msg);
Reference.reachabilityFence(log_level);
if (ret >= 0 && ret <= 4096) { return null; }
* All-0s indicates a general error unrelated to a specific channel, after which all channels
* with the sending peer should be closed.
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.ErrorMessage_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.ErrorMessage_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* All-0s indicates a general error unrelated to a specific channel, after which all channels
* with the sending peer should be closed.
*/
- public void set_channel_id(byte[] val) {
- bindings.ErrorMessage_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.ErrorMessage_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new ErrorMessage given each field
*/
- public static ErrorMessage of(byte[] channel_id_arg, java.lang.String data_arg) {
- long ret = bindings.ErrorMessage_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg);
+ public static ErrorMessage of(org.ldk.structs.ChannelId channel_id_arg, java.lang.String data_arg) {
+ long ret = bindings.ErrorMessage_new(channel_id_arg.ptr, data_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(data_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ErrorMessage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ErrorMessage(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ErrorMessage b) {
- boolean ret = bindings.ErrorMessage_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ErrorMessage_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
*
* [`ChannelManager::funding_transaction_generated`]: crate::ln::channelmanager::ChannelManager::funding_transaction_generated
*/
- public final byte[] temporary_channel_id;
+ public final org.ldk.structs.ChannelId temporary_channel_id;
/**
* The counterparty's node_id, which you'll need to pass back into
* [`ChannelManager::funding_transaction_generated`].
public final org.ldk.util.UInt128 user_channel_id;
private FundingGenerationReady(long ptr, bindings.LDKEvent.FundingGenerationReady obj) {
super(null, ptr);
- this.temporary_channel_id = obj.temporary_channel_id;
+ long temporary_channel_id = obj.temporary_channel_id;
+ org.ldk.structs.ChannelId temporary_channel_id_hu_conv = null; if (temporary_channel_id < 0 || temporary_channel_id > 4096) { temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, temporary_channel_id); }
+ if (temporary_channel_id_hu_conv != null) { temporary_channel_id_hu_conv.ptrs_to.add(this); };
+ this.temporary_channel_id = temporary_channel_id_hu_conv;
this.counterparty_node_id = obj.counterparty_node_id;
this.channel_value_satoshis = obj.channel_value_satoshis;
this.output_script = obj.output_script;
public final org.ldk.structs.PaymentPurpose purpose;
/**
* The `channel_id` indicating over which channel we received the payment.
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public final org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id;
+ @Nullable public final org.ldk.structs.ChannelId via_channel_id;
/**
* The `user_channel_id` indicating over which channel we received the payment.
*/
if (purpose_hu_conv != null) { purpose_hu_conv.ptrs_to.add(this); };
this.purpose = purpose_hu_conv;
long via_channel_id = obj.via_channel_id;
- org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(via_channel_id);
+ org.ldk.structs.ChannelId via_channel_id_hu_conv = null; if (via_channel_id < 0 || via_channel_id > 4096) { via_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, via_channel_id); }
if (via_channel_id_hu_conv != null) { via_channel_id_hu_conv.ptrs_to.add(this); };
this.via_channel_id = via_channel_id_hu_conv;
long via_user_channel_id = obj.via_user_channel_id;
/**
* Used to indicate that an output which you should know how to spend was confirmed on chain
* and is now spendable.
- * Such an output will *not* ever be spent by rust-lightning, and are not at risk of your
+ *
+ * Such an output will *never* be spent directly by LDK, and are not at risk of your
* counterparty spending them due to some kind of timeout. Thus, you need to store them
* somewhere and spend them when you create on-chain transactions.
+ *
+ * You may hand them to the [`OutputSweeper`] utility which will store and (re-)generate spending
+ * transactions for you.
+ *
+ * [`OutputSweeper`]: crate::util::sweep::OutputSweeper
*/
public final static class SpendableOutputs extends Event {
/**
* The `channel_id` indicating which channel the spendable outputs belong to.
*
* This will always be `Some` for events generated by LDK versions 0.0.117 and above.
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public final org.ldk.structs.Option_ThirtyTwoBytesZ channel_id;
+ @Nullable public final org.ldk.structs.ChannelId channel_id;
private SpendableOutputs(long ptr, bindings.LDKEvent.SpendableOutputs obj) {
super(null, ptr);
long[] outputs = obj.outputs;
}
this.outputs = outputs_conv_27_arr;
long channel_id = obj.channel_id;
- org.ldk.structs.Option_ThirtyTwoBytesZ channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(channel_id);
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
this.channel_id = channel_id_hu_conv;
}
*/
public final static class PaymentForwarded extends Event {
/**
- * The incoming channel between the previous node and us. This is only `None` for events
- * generated or serialized by versions prior to 0.0.107.
+ * The channel id of the incoming channel between the previous node and us.
+ *
+ * This is only `None` for events generated or serialized by versions prior to 0.0.107.
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable public final org.ldk.structs.ChannelId prev_channel_id;
+ /**
+ * The channel id of the outgoing channel between the next node and us.
+ *
+ * This is only `None` for events generated or serialized by versions prior to 0.0.107.
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable public final org.ldk.structs.ChannelId next_channel_id;
+ /**
+ * The `user_channel_id` of the incoming channel between the previous node and us.
+ *
+ * This is only `None` for events generated or serialized by versions prior to 0.0.122.
*/
- public final org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id;
+ public final org.ldk.structs.Option_U128Z prev_user_channel_id;
/**
- * The outgoing channel between the next node and us. This is only `None` for events
- * generated or serialized by versions prior to 0.0.107.
+ * The `user_channel_id` of the outgoing channel between the next node and us.
+ *
+ * This will be `None` if the payment was settled via an on-chain transaction. See the
+ * caveat described for the `total_fee_earned_msat` field. Moreover it will be `None` for
+ * events generated or serialized by versions prior to 0.0.122.
*/
- public final org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id;
+ public final org.ldk.structs.Option_U128Z next_user_channel_id;
/**
- * The fee, in milli-satoshis, which was earned as a result of the payment.
+ * The total fee, in milli-satoshis, which was earned as a result of the payment.
*
* Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC
* was pending, the amount the next hop claimed will have been rounded down to the nearest
* If the channel which sent us the payment has been force-closed, we will claim the funds
* via an on-chain transaction. In that case we do not yet know the on-chain transaction
* fees which we will spend and will instead set this to `None`. It is possible duplicate
- * `PaymentForwarded` events are generated for the same payment iff `fee_earned_msat` is
+ * `PaymentForwarded` events are generated for the same payment iff `total_fee_earned_msat` is
* `None`.
*/
- public final org.ldk.structs.Option_u64Z fee_earned_msat;
+ public final org.ldk.structs.Option_u64Z total_fee_earned_msat;
+ /**
+ * The share of the total fee, in milli-satoshis, which was withheld in addition to the
+ * forwarding fee.
+ *
+ * This will only be `Some` if we forwarded an intercepted HTLC with less than the
+ * expected amount. This means our counterparty accepted to receive less than the invoice
+ * amount, e.g., by claiming the payment featuring a corresponding
+ * [`PaymentClaimable::counterparty_skimmed_fee_msat`].
+ *
+ * Will also always be `None` for events serialized with LDK prior to version 0.0.122.
+ *
+ * The caveat described above the `total_fee_earned_msat` field applies here as well.
+ *
+ * [`PaymentClaimable::counterparty_skimmed_fee_msat`]: Self::PaymentClaimable::counterparty_skimmed_fee_msat
+ */
+ public final org.ldk.structs.Option_u64Z skimmed_fee_msat;
/**
* If this is `true`, the forwarded HTLC was claimed by our counterparty via an on-chain
* transaction.
/**
* The final amount forwarded, in milli-satoshis, after the fee is deducted.
*
- * The caveat described above the `fee_earned_msat` field applies here as well.
+ * The caveat described above the `total_fee_earned_msat` field applies here as well.
*/
public final org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat;
private PaymentForwarded(long ptr, bindings.LDKEvent.PaymentForwarded obj) {
super(null, ptr);
long prev_channel_id = obj.prev_channel_id;
- org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(prev_channel_id);
+ org.ldk.structs.ChannelId prev_channel_id_hu_conv = null; if (prev_channel_id < 0 || prev_channel_id > 4096) { prev_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, prev_channel_id); }
if (prev_channel_id_hu_conv != null) { prev_channel_id_hu_conv.ptrs_to.add(this); };
this.prev_channel_id = prev_channel_id_hu_conv;
long next_channel_id = obj.next_channel_id;
- org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(next_channel_id);
+ org.ldk.structs.ChannelId next_channel_id_hu_conv = null; if (next_channel_id < 0 || next_channel_id > 4096) { next_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, next_channel_id); }
if (next_channel_id_hu_conv != null) { next_channel_id_hu_conv.ptrs_to.add(this); };
this.next_channel_id = next_channel_id_hu_conv;
- long fee_earned_msat = obj.fee_earned_msat;
- org.ldk.structs.Option_u64Z fee_earned_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(fee_earned_msat);
- if (fee_earned_msat_hu_conv != null) { fee_earned_msat_hu_conv.ptrs_to.add(this); };
- this.fee_earned_msat = fee_earned_msat_hu_conv;
+ long prev_user_channel_id = obj.prev_user_channel_id;
+ org.ldk.structs.Option_U128Z prev_user_channel_id_hu_conv = org.ldk.structs.Option_U128Z.constr_from_ptr(prev_user_channel_id);
+ if (prev_user_channel_id_hu_conv != null) { prev_user_channel_id_hu_conv.ptrs_to.add(this); };
+ this.prev_user_channel_id = prev_user_channel_id_hu_conv;
+ long next_user_channel_id = obj.next_user_channel_id;
+ org.ldk.structs.Option_U128Z next_user_channel_id_hu_conv = org.ldk.structs.Option_U128Z.constr_from_ptr(next_user_channel_id);
+ if (next_user_channel_id_hu_conv != null) { next_user_channel_id_hu_conv.ptrs_to.add(this); };
+ this.next_user_channel_id = next_user_channel_id_hu_conv;
+ long total_fee_earned_msat = obj.total_fee_earned_msat;
+ org.ldk.structs.Option_u64Z total_fee_earned_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(total_fee_earned_msat);
+ if (total_fee_earned_msat_hu_conv != null) { total_fee_earned_msat_hu_conv.ptrs_to.add(this); };
+ this.total_fee_earned_msat = total_fee_earned_msat_hu_conv;
+ long skimmed_fee_msat = obj.skimmed_fee_msat;
+ org.ldk.structs.Option_u64Z skimmed_fee_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(skimmed_fee_msat);
+ if (skimmed_fee_msat_hu_conv != null) { skimmed_fee_msat_hu_conv.ptrs_to.add(this); };
+ this.skimmed_fee_msat = skimmed_fee_msat_hu_conv;
this.claim_from_onchain_tx = obj.claim_from_onchain_tx;
long outbound_amount_forwarded_msat = obj.outbound_amount_forwarded_msat;
org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(outbound_amount_forwarded_msat);
/**
* The `channel_id` of the channel that is pending confirmation.
*/
- public final byte[] channel_id;
+ public final org.ldk.structs.ChannelId channel_id;
/**
* The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
* channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
* The `temporary_channel_id` this channel used to be known by during channel establishment.
*
* Will be `None` for channels created prior to LDK version 0.0.115.
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public final org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id;
+ @Nullable public final org.ldk.structs.ChannelId former_temporary_channel_id;
/**
* The `node_id` of the channel counterparty.
*/
* The outpoint of the channel's funding transaction.
*/
public final org.ldk.structs.OutPoint funding_txo;
+ /**
+ * The features that this channel will operate with.
+ *
+ * Will be `None` for channels created prior to LDK version 0.0.122.
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable public final org.ldk.structs.ChannelTypeFeatures channel_type;
private ChannelPending(long ptr, bindings.LDKEvent.ChannelPending obj) {
super(null, ptr);
- this.channel_id = obj.channel_id;
+ long channel_id = obj.channel_id;
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+ if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ this.channel_id = channel_id_hu_conv;
byte[] user_channel_id = obj.user_channel_id;
org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
this.user_channel_id = user_channel_id_conv;
long former_temporary_channel_id = obj.former_temporary_channel_id;
- org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(former_temporary_channel_id);
+ org.ldk.structs.ChannelId former_temporary_channel_id_hu_conv = null; if (former_temporary_channel_id < 0 || former_temporary_channel_id > 4096) { former_temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, former_temporary_channel_id); }
if (former_temporary_channel_id_hu_conv != null) { former_temporary_channel_id_hu_conv.ptrs_to.add(this); };
this.former_temporary_channel_id = former_temporary_channel_id_hu_conv;
this.counterparty_node_id = obj.counterparty_node_id;
org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); };
this.funding_txo = funding_txo_hu_conv;
+ long channel_type = obj.channel_type;
+ org.ldk.structs.ChannelTypeFeatures channel_type_hu_conv = null; if (channel_type < 0 || channel_type > 4096) { channel_type_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, channel_type); }
+ if (channel_type_hu_conv != null) { channel_type_hu_conv.ptrs_to.add(this); };
+ this.channel_type = channel_type_hu_conv;
}
}
/**
/**
* The `channel_id` of the channel that is ready.
*/
- public final byte[] channel_id;
+ public final org.ldk.structs.ChannelId channel_id;
/**
* The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
* channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
public final org.ldk.structs.ChannelTypeFeatures channel_type;
private ChannelReady(long ptr, bindings.LDKEvent.ChannelReady obj) {
super(null, ptr);
- this.channel_id = obj.channel_id;
+ long channel_id = obj.channel_id;
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+ if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ this.channel_id = channel_id_hu_conv;
byte[] user_channel_id = obj.user_channel_id;
org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
this.user_channel_id = user_channel_id_conv;
}
}
/**
- * Used to indicate that a previously opened channel with the given `channel_id` is in the
- * process of closure.
+ * Used to indicate that a channel that got past the initial handshake with the given `channel_id` is in the
+ * process of closure. This includes previously opened channels, and channels that time out from not being funded.
*
* Note that this event is only triggered for accepted channels: if the
* [`UserConfig::manually_accept_inbound_channels`] config flag is set to true and the channel is
* The `channel_id` of the channel which has been closed. Note that on-chain transactions
* resolving the channel are likely still awaiting confirmation.
*/
- public final byte[] channel_id;
+ public final org.ldk.structs.ChannelId channel_id;
/**
* The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
* channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
@Nullable public final org.ldk.structs.OutPoint channel_funding_txo;
private ChannelClosed(long ptr, bindings.LDKEvent.ChannelClosed obj) {
super(null, ptr);
- this.channel_id = obj.channel_id;
+ long channel_id = obj.channel_id;
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+ if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ this.channel_id = channel_id_hu_conv;
byte[] user_channel_id = obj.user_channel_id;
org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
this.user_channel_id = user_channel_id_conv;
/**
* The channel_id of the channel which has been closed.
*/
- public final byte[] channel_id;
+ public final org.ldk.structs.ChannelId channel_id;
/**
* The full transaction received from the user
*/
public final byte[] transaction;
private DiscardFunding(long ptr, bindings.LDKEvent.DiscardFunding obj) {
super(null, ptr);
- this.channel_id = obj.channel_id;
+ long channel_id = obj.channel_id;
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+ if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ this.channel_id = channel_id_hu_conv;
this.transaction = obj.transaction;
}
}
* [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
* [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
*/
- public final byte[] temporary_channel_id;
+ public final org.ldk.structs.ChannelId temporary_channel_id;
/**
* The node_id of the counterparty requesting to open the channel.
*
public final org.ldk.structs.ChannelTypeFeatures channel_type;
private OpenChannelRequest(long ptr, bindings.LDKEvent.OpenChannelRequest obj) {
super(null, ptr);
- this.temporary_channel_id = obj.temporary_channel_id;
+ long temporary_channel_id = obj.temporary_channel_id;
+ org.ldk.structs.ChannelId temporary_channel_id_hu_conv = null; if (temporary_channel_id < 0 || temporary_channel_id > 4096) { temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, temporary_channel_id); }
+ if (temporary_channel_id_hu_conv != null) { temporary_channel_id_hu_conv.ptrs_to.add(this); };
+ this.temporary_channel_id = temporary_channel_id_hu_conv;
this.counterparty_node_id = obj.counterparty_node_id;
this.funding_satoshis = obj.funding_satoshis;
this.push_msat = obj.push_msat;
/**
* The channel over which the HTLC was received.
*/
- public final byte[] prev_channel_id;
+ public final org.ldk.structs.ChannelId prev_channel_id;
/**
* Destination of the HTLC that failed to be processed.
*/
public final org.ldk.structs.HTLCDestination failed_next_destination;
private HTLCHandlingFailed(long ptr, bindings.LDKEvent.HTLCHandlingFailed obj) {
super(null, ptr);
- this.prev_channel_id = obj.prev_channel_id;
+ long prev_channel_id = obj.prev_channel_id;
+ org.ldk.structs.ChannelId prev_channel_id_hu_conv = null; if (prev_channel_id < 0 || prev_channel_id > 4096) { prev_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, prev_channel_id); }
+ if (prev_channel_id_hu_conv != null) { prev_channel_id_hu_conv.ptrs_to.add(this); };
+ this.prev_channel_id = prev_channel_id_hu_conv;
long failed_next_destination = obj.failed_next_destination;
org.ldk.structs.HTLCDestination failed_next_destination_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(failed_next_destination);
if (failed_next_destination_hu_conv != null) { failed_next_destination_hu_conv.ptrs_to.add(this); };
/**
* Utility method to constructs a new FundingGenerationReady-variant Event
*/
- public static Event funding_generation_ready(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, org.ldk.util.UInt128 user_channel_id) {
- long ret = bindings.Event_funding_generation_ready(InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), channel_value_satoshis, output_script, user_channel_id.getLEBytes());
+ public static Event funding_generation_ready(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, org.ldk.util.UInt128 user_channel_id) {
+ long ret = bindings.Event_funding_generation_ready(temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_value_satoshis, output_script, user_channel_id.getLEBytes());
Reference.reachabilityFence(temporary_channel_id);
Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(channel_value_satoshis);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id); };
return ret_hu_conv;
}
/**
* Utility method to constructs a new PaymentClaimable-variant Event
*/
- public static Event payment_claimable(byte[] receiver_node_id, byte[] payment_hash, org.ldk.structs.RecipientOnionFields onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, org.ldk.structs.PaymentPurpose purpose, org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id, org.ldk.structs.Option_U128Z via_user_channel_id, org.ldk.structs.Option_u32Z claim_deadline) {
- long ret = bindings.Event_payment_claimable(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), onion_fields == null ? 0 : onion_fields.ptr, amount_msat, counterparty_skimmed_fee_msat, purpose.ptr, via_channel_id.ptr, via_user_channel_id.ptr, claim_deadline.ptr);
+ public static Event payment_claimable(byte[] receiver_node_id, byte[] payment_hash, org.ldk.structs.RecipientOnionFields onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, org.ldk.structs.PaymentPurpose purpose, org.ldk.structs.ChannelId via_channel_id, org.ldk.structs.Option_U128Z via_user_channel_id, org.ldk.structs.Option_u32Z claim_deadline) {
+ long ret = bindings.Event_payment_claimable(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), onion_fields.ptr, amount_msat, counterparty_skimmed_fee_msat, purpose.ptr, via_channel_id.ptr, via_user_channel_id.ptr, claim_deadline.ptr);
Reference.reachabilityFence(receiver_node_id);
Reference.reachabilityFence(payment_hash);
Reference.reachabilityFence(onion_fields);
* Utility method to constructs a new PaymentClaimed-variant Event
*/
public static Event payment_claimed(byte[] receiver_node_id, byte[] payment_hash, long amount_msat, org.ldk.structs.PaymentPurpose purpose, ClaimedHTLC[] htlcs, org.ldk.structs.Option_u64Z sender_intended_total_msat) {
- long ret = bindings.Event_payment_claimed(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), amount_msat, purpose.ptr, htlcs != null ? Arrays.stream(htlcs).mapToLong(htlcs_conv_13 -> htlcs_conv_13 == null ? 0 : htlcs_conv_13.ptr).toArray() : null, sender_intended_total_msat.ptr);
+ long ret = bindings.Event_payment_claimed(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), amount_msat, purpose.ptr, htlcs != null ? Arrays.stream(htlcs).mapToLong(htlcs_conv_13 -> htlcs_conv_13.ptr).toArray() : null, sender_intended_total_msat.ptr);
Reference.reachabilityFence(receiver_node_id);
Reference.reachabilityFence(payment_hash);
Reference.reachabilityFence(amount_msat);
* Utility method to constructs a new PaymentPathSuccessful-variant Event
*/
public static Event payment_path_successful(byte[] payment_id, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, org.ldk.structs.Path path) {
- long ret = bindings.Event_payment_path_successful(InternalUtils.check_arr_len(payment_id, 32), payment_hash.ptr, path == null ? 0 : path.ptr);
+ long ret = bindings.Event_payment_path_successful(InternalUtils.check_arr_len(payment_id, 32), payment_hash.ptr, path.ptr);
Reference.reachabilityFence(payment_id);
Reference.reachabilityFence(payment_hash);
Reference.reachabilityFence(path);
* Utility method to constructs a new PaymentPathFailed-variant Event
*/
public static Event payment_path_failed(org.ldk.structs.Option_ThirtyTwoBytesZ payment_id, byte[] payment_hash, boolean payment_failed_permanently, org.ldk.structs.PathFailure failure, org.ldk.structs.Path path, org.ldk.structs.Option_u64Z short_channel_id) {
- long ret = bindings.Event_payment_path_failed(payment_id.ptr, InternalUtils.check_arr_len(payment_hash, 32), payment_failed_permanently, failure.ptr, path == null ? 0 : path.ptr, short_channel_id.ptr);
+ long ret = bindings.Event_payment_path_failed(payment_id.ptr, InternalUtils.check_arr_len(payment_hash, 32), payment_failed_permanently, failure.ptr, path.ptr, short_channel_id.ptr);
Reference.reachabilityFence(payment_id);
Reference.reachabilityFence(payment_hash);
Reference.reachabilityFence(payment_failed_permanently);
* Utility method to constructs a new ProbeSuccessful-variant Event
*/
public static Event probe_successful(byte[] payment_id, byte[] payment_hash, org.ldk.structs.Path path) {
- long ret = bindings.Event_probe_successful(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path == null ? 0 : path.ptr);
+ long ret = bindings.Event_probe_successful(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path.ptr);
Reference.reachabilityFence(payment_id);
Reference.reachabilityFence(payment_hash);
Reference.reachabilityFence(path);
* Utility method to constructs a new ProbeFailed-variant Event
*/
public static Event probe_failed(byte[] payment_id, byte[] payment_hash, org.ldk.structs.Path path, org.ldk.structs.Option_u64Z short_channel_id) {
- long ret = bindings.Event_probe_failed(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path == null ? 0 : path.ptr, short_channel_id.ptr);
+ long ret = bindings.Event_probe_failed(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path.ptr, short_channel_id.ptr);
Reference.reachabilityFence(payment_id);
Reference.reachabilityFence(payment_hash);
Reference.reachabilityFence(path);
/**
* Utility method to constructs a new SpendableOutputs-variant Event
*/
- public static Event spendable_outputs(SpendableOutputDescriptor[] outputs, org.ldk.structs.Option_ThirtyTwoBytesZ channel_id) {
+ public static Event spendable_outputs(SpendableOutputDescriptor[] outputs, org.ldk.structs.ChannelId channel_id) {
long ret = bindings.Event_spendable_outputs(outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_27 -> outputs_conv_27.ptr).toArray() : null, channel_id.ptr);
Reference.reachabilityFence(outputs);
Reference.reachabilityFence(channel_id);
/**
* Utility method to constructs a new PaymentForwarded-variant Event
*/
- public static Event payment_forwarded(org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id, org.ldk.structs.Option_u64Z fee_earned_msat, boolean claim_from_onchain_tx, org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat) {
- long ret = bindings.Event_payment_forwarded(prev_channel_id.ptr, next_channel_id.ptr, fee_earned_msat.ptr, claim_from_onchain_tx, outbound_amount_forwarded_msat.ptr);
+ public static Event payment_forwarded(org.ldk.structs.ChannelId prev_channel_id, org.ldk.structs.ChannelId next_channel_id, org.ldk.structs.Option_U128Z prev_user_channel_id, org.ldk.structs.Option_U128Z next_user_channel_id, org.ldk.structs.Option_u64Z total_fee_earned_msat, org.ldk.structs.Option_u64Z skimmed_fee_msat, boolean claim_from_onchain_tx, org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat) {
+ long ret = bindings.Event_payment_forwarded(prev_channel_id.ptr, next_channel_id.ptr, prev_user_channel_id.ptr, next_user_channel_id.ptr, total_fee_earned_msat.ptr, skimmed_fee_msat.ptr, claim_from_onchain_tx, outbound_amount_forwarded_msat.ptr);
Reference.reachabilityFence(prev_channel_id);
Reference.reachabilityFence(next_channel_id);
- Reference.reachabilityFence(fee_earned_msat);
+ Reference.reachabilityFence(prev_user_channel_id);
+ Reference.reachabilityFence(next_user_channel_id);
+ Reference.reachabilityFence(total_fee_earned_msat);
+ Reference.reachabilityFence(skimmed_fee_msat);
Reference.reachabilityFence(claim_from_onchain_tx);
Reference.reachabilityFence(outbound_amount_forwarded_msat);
if (ret >= 0 && ret <= 4096) { return null; }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prev_channel_id); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(next_channel_id); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_earned_msat); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prev_user_channel_id); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(next_user_channel_id); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(total_fee_earned_msat); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(skimmed_fee_msat); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outbound_amount_forwarded_msat); };
return ret_hu_conv;
}
/**
* Utility method to constructs a new ChannelPending-variant Event
*/
- public static Event channel_pending(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id, byte[] counterparty_node_id, org.ldk.structs.OutPoint funding_txo) {
- long ret = bindings.Event_channel_pending(InternalUtils.check_arr_len(channel_id, 32), user_channel_id.getLEBytes(), former_temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_txo == null ? 0 : funding_txo.ptr);
+ public static Event channel_pending(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ChannelId former_temporary_channel_id, byte[] counterparty_node_id, org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelTypeFeatures channel_type) {
+ long ret = bindings.Event_channel_pending(channel_id.ptr, user_channel_id.getLEBytes(), former_temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_txo.ptr, channel_type.ptr);
Reference.reachabilityFence(channel_id);
Reference.reachabilityFence(user_channel_id);
Reference.reachabilityFence(former_temporary_channel_id);
Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(funding_txo);
+ Reference.reachabilityFence(channel_type);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(former_temporary_channel_id); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_txo); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type); };
return ret_hu_conv;
}
/**
* Utility method to constructs a new ChannelReady-variant Event
*/
- public static Event channel_ready(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, byte[] counterparty_node_id, org.ldk.structs.ChannelTypeFeatures channel_type) {
- long ret = bindings.Event_channel_ready(InternalUtils.check_arr_len(channel_id, 32), user_channel_id.getLEBytes(), InternalUtils.check_arr_len(counterparty_node_id, 33), channel_type == null ? 0 : channel_type.ptr);
+ public static Event channel_ready(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, byte[] counterparty_node_id, org.ldk.structs.ChannelTypeFeatures channel_type) {
+ long ret = bindings.Event_channel_ready(channel_id.ptr, user_channel_id.getLEBytes(), InternalUtils.check_arr_len(counterparty_node_id, 33), channel_type.ptr);
Reference.reachabilityFence(channel_id);
Reference.reachabilityFence(user_channel_id);
Reference.reachabilityFence(counterparty_node_id);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type); };
return ret_hu_conv;
}
/**
* Utility method to constructs a new ChannelClosed-variant Event
*/
- public static Event channel_closed(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ClosureReason reason, byte[] counterparty_node_id, org.ldk.structs.Option_u64Z channel_capacity_sats, org.ldk.structs.OutPoint channel_funding_txo) {
- long ret = bindings.Event_channel_closed(InternalUtils.check_arr_len(channel_id, 32), user_channel_id.getLEBytes(), reason.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_capacity_sats.ptr, channel_funding_txo == null ? 0 : channel_funding_txo.ptr);
+ public static Event channel_closed(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ClosureReason reason, byte[] counterparty_node_id, org.ldk.structs.Option_u64Z channel_capacity_sats, org.ldk.structs.OutPoint channel_funding_txo) {
+ long ret = bindings.Event_channel_closed(channel_id.ptr, user_channel_id.getLEBytes(), reason.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_capacity_sats.ptr, channel_funding_txo.ptr);
Reference.reachabilityFence(channel_id);
Reference.reachabilityFence(user_channel_id);
Reference.reachabilityFence(reason);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reason); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_capacity_sats); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_funding_txo); };
/**
* Utility method to constructs a new DiscardFunding-variant Event
*/
- public static Event discard_funding(byte[] channel_id, byte[] transaction) {
- long ret = bindings.Event_discard_funding(InternalUtils.check_arr_len(channel_id, 32), transaction);
+ public static Event discard_funding(org.ldk.structs.ChannelId channel_id, byte[] transaction) {
+ long ret = bindings.Event_discard_funding(channel_id.ptr, transaction);
Reference.reachabilityFence(channel_id);
Reference.reachabilityFence(transaction);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
return ret_hu_conv;
}
/**
* Utility method to constructs a new OpenChannelRequest-variant Event
*/
- public static Event open_channel_request(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, org.ldk.structs.ChannelTypeFeatures channel_type) {
- long ret = bindings.Event_open_channel_request(InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), funding_satoshis, push_msat, channel_type == null ? 0 : channel_type.ptr);
+ public static Event open_channel_request(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, org.ldk.structs.ChannelTypeFeatures channel_type) {
+ long ret = bindings.Event_open_channel_request(temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_satoshis, push_msat, channel_type.ptr);
Reference.reachabilityFence(temporary_channel_id);
Reference.reachabilityFence(counterparty_node_id);
Reference.reachabilityFence(funding_satoshis);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type); };
return ret_hu_conv;
}
/**
* Utility method to constructs a new HTLCHandlingFailed-variant Event
*/
- public static Event htlchandling_failed(byte[] prev_channel_id, org.ldk.structs.HTLCDestination failed_next_destination) {
- long ret = bindings.Event_htlchandling_failed(InternalUtils.check_arr_len(prev_channel_id, 32), failed_next_destination.ptr);
+ public static Event htlchandling_failed(org.ldk.structs.ChannelId prev_channel_id, org.ldk.structs.HTLCDestination failed_next_destination) {
+ long ret = bindings.Event_htlchandling_failed(prev_channel_id.ptr, failed_next_destination.ptr);
Reference.reachabilityFence(prev_channel_id);
Reference.reachabilityFence(failed_next_destination);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prev_channel_id); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(failed_next_destination); };
return ret_hu_conv;
}
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.Event b) {
- boolean ret = bindings.Event_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Event_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ExpiryTime b) {
- boolean ret = bindings.ExpiryTime_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ExpiryTime_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.Fallback b) {
- boolean ret = bindings.Fallback_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Fallback_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
*
* Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're
* called from inside the library in response to chain events, P2P events, or timer events).
+ *
+ * LDK may generate a substantial number of fee-estimation calls in some cases. You should
+ * pre-calculate and cache the fee estimate results to ensure you don't substantially slow HTLC
+ * handling.
*/
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
public class FeeEstimator extends CommonBase {
* registered mid-processing.
*/
public void register_output(org.ldk.structs.WatchedOutput output) {
- bindings.Filter_register_output(this.ptr, output == null ? 0 : output.ptr);
+ bindings.Filter_register_output(this.ptr, output.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(output);
if (this != null) { this.ptrs_to.add(output); };
* used for [`BlindedPayInfo`] construction.
*/
public void set_tlvs(org.ldk.structs.ForwardTlvs val) {
- bindings.ForwardNode_set_tlvs(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ForwardNode_set_tlvs(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new ForwardNode given each field
*/
public static ForwardNode of(org.ldk.structs.ForwardTlvs tlvs_arg, byte[] node_id_arg, long htlc_maximum_msat_arg) {
- long ret = bindings.ForwardNode_new(tlvs_arg == null ? 0 : tlvs_arg.ptr, InternalUtils.check_arr_len(node_id_arg, 33), htlc_maximum_msat_arg);
+ long ret = bindings.ForwardNode_new(tlvs_arg.ptr, InternalUtils.check_arr_len(node_id_arg, 33), htlc_maximum_msat_arg);
Reference.reachabilityFence(tlvs_arg);
Reference.reachabilityFence(node_id_arg);
Reference.reachabilityFence(htlc_maximum_msat_arg);
* Payment parameters for relaying over [`Self::short_channel_id`].
*/
public void set_payment_relay(org.ldk.structs.PaymentRelay val) {
- bindings.ForwardTlvs_set_payment_relay(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ForwardTlvs_set_payment_relay(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Payment constraints for relaying over [`Self::short_channel_id`].
*/
public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) {
- bindings.ForwardTlvs_set_payment_constraints(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ForwardTlvs_set_payment_constraints(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* [`BlindedHop::encrypted_payload`]: crate::blinded_path::BlindedHop::encrypted_payload
*/
public void set_features(org.ldk.structs.BlindedHopFeatures val) {
- bindings.ForwardTlvs_set_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ForwardTlvs_set_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new ForwardTlvs given each field
*/
public static ForwardTlvs of(long short_channel_id_arg, org.ldk.structs.PaymentRelay payment_relay_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.BlindedHopFeatures features_arg) {
- long ret = bindings.ForwardTlvs_new(short_channel_id_arg, payment_relay_arg == null ? 0 : payment_relay_arg.ptr, payment_constraints_arg == null ? 0 : payment_constraints_arg.ptr, features_arg == null ? 0 : features_arg.ptr);
+ long ret = bindings.ForwardTlvs_new(short_channel_id_arg, payment_relay_arg.ptr, payment_constraints_arg.ptr, features_arg.ptr);
Reference.reachabilityFence(short_channel_id_arg);
Reference.reachabilityFence(payment_relay_arg);
Reference.reachabilityFence(payment_constraints_arg);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ extends CommonBase {
+ FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public OutPoint get_a() {
+ long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public ChannelId get_b() {
+ long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public MonitorEvent[] get_c() {
+ long[] ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(this.ptr);
+ Reference.reachabilityFence(this);
+ int ret_conv_14_len = ret.length;
+ MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len];
+ for (int o = 0; o < ret_conv_14_len; o++) {
+ long ret_conv_14 = ret[o];
+ org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14);
+ if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.add(this); };
+ ret_conv_14_arr[o] = ret_conv_14_hu_conv;
+ }
+ return ret_conv_14_arr;
+ }
+
+ /**
+ *
+ */
+ public byte[] get_d() {
+ byte[] ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ clone() {
+ long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ from the contained elements.
+ */
+ public static FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b, MonitorEvent[] c, byte[] d) {
+ long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a.ptr, b.ptr, c != null ? Arrays.stream(c).mapToLong(c_conv_14 -> c_conv_14.ptr).toArray() : null, InternalUtils.check_arr_len(d, 33));
+ Reference.reachabilityFence(a);
+ Reference.reachabilityFence(b);
+ Reference.reachabilityFence(c);
+ Reference.reachabilityFence(d);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
+ for (MonitorEvent c_conv_14: c) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(c_conv_14); }; };
+ return ret_hu_conv;
+ }
+
+}
/**
* A temporary channel ID, until the funding is established
*/
- public byte[] get_temporary_channel_id() {
- byte[] ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr);
+ public ChannelId get_temporary_channel_id() {
+ long ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* A temporary channel ID, until the funding is established
*/
- public void set_temporary_channel_id(byte[] val) {
- bindings.FundingCreated_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_temporary_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.FundingCreated_set_temporary_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new FundingCreated given each field
*/
- public static FundingCreated of(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) {
- long ret = bindings.FundingCreated_new(InternalUtils.check_arr_len(temporary_channel_id_arg, 32), InternalUtils.check_arr_len(funding_txid_arg, 32), funding_output_index_arg, InternalUtils.check_arr_len(signature_arg, 64));
+ public static FundingCreated of(org.ldk.structs.ChannelId temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) {
+ long ret = bindings.FundingCreated_new(temporary_channel_id_arg.ptr, InternalUtils.check_arr_len(funding_txid_arg, 32), funding_output_index_arg, InternalUtils.check_arr_len(signature_arg, 64));
Reference.reachabilityFence(temporary_channel_id_arg);
Reference.reachabilityFence(funding_txid_arg);
Reference.reachabilityFence(funding_output_index_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.FundingCreated ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.FundingCreated(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.FundingCreated b) {
- boolean ret = bindings.FundingCreated_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.FundingCreated_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.FundingSigned_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.FundingSigned_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.FundingSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.FundingSigned_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new FundingSigned given each field
*/
- public static FundingSigned of(byte[] channel_id_arg, byte[] signature_arg) {
- long ret = bindings.FundingSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(signature_arg, 64));
+ public static FundingSigned of(org.ldk.structs.ChannelId channel_id_arg, byte[] signature_arg) {
+ long ret = bindings.FundingSigned_new(channel_id_arg.ptr, InternalUtils.check_arr_len(signature_arg, 64));
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(signature_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.FundingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.FundingSigned(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.FundingSigned b) {
- boolean ret = bindings.FundingSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.FundingSigned_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* A simple future which can complete once, and calls some callback(s) when it does so.
- *
- * Clones can be made and all futures cloned from the same source will complete at the same time.
*/
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
public class Future extends CommonBase {
if (ptr != 0) { bindings.Future_free(ptr); }
}
- long clone_ptr() {
- long ret = bindings.Future_clone_ptr(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Creates a copy of the Future
- */
- public Future clone() {
- long ret = bindings.Future_clone(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Future ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Future(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
/**
* Registers a callback to be called upon completion of this future. If the future has already
* completed, the callback will be called immediately.
public void wait_indefinite() {
bindings.Future_wait(this.ptr);
Reference.reachabilityFence(this);
- if (this != null) { this.ptrs_to.add(this); };
}
/**
boolean ret = bindings.Future_wait_timeout(this.ptr, max_wait);
Reference.reachabilityFence(this);
Reference.reachabilityFence(max_wait);
- if (this != null) { this.ptrs_to.add(this); };
return ret;
}
* Utility method to constructs a new P2P-variant GossipSync
*/
public static GossipSync p2_p(org.ldk.structs.P2PGossipSync a) {
- long ret = bindings.GossipSync_p2_p(a == null ? 0 : a.ptr);
+ long ret = bindings.GossipSync_p2_p(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.GossipSync ret_hu_conv = org.ldk.structs.GossipSync.constr_from_ptr(ret);
* Utility method to constructs a new Rapid-variant GossipSync
*/
public static GossipSync rapid(org.ldk.structs.RapidGossipSync a) {
- long ret = bindings.GossipSync_rapid(a == null ? 0 : a.ptr);
+ long ret = bindings.GossipSync_rapid(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.GossipSync ret_hu_conv = org.ldk.structs.GossipSync.constr_from_ptr(ret);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.GossipTimestampFilter b) {
- boolean ret = bindings.GossipTimestampFilter_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.GossipTimestampFilter_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Utility method to constructs a new LightningError-variant GraphSyncError
*/
public static GraphSyncError lightning_error(org.ldk.structs.LightningError a) {
- long ret = bindings.GraphSyncError_lightning_error(a == null ? 0 : a.ptr);
+ long ret = bindings.GraphSyncError_lightning_error(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.GraphSyncError ret_hu_conv = org.ldk.structs.GraphSyncError.constr_from_ptr(ret);
* The parameters required to derive the signer for the HTLC input.
*/
public void set_channel_derivation_parameters(org.ldk.structs.ChannelDerivationParameters val) {
- bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0 : val.ptr);
+ bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
}
+ /**
+ * The txid of the commitment transaction in which the HTLC output lives.
+ */
+ public byte[] get_commitment_txid() {
+ byte[] ret = bindings.HTLCDescriptor_get_commitment_txid(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The txid of the commitment transaction in which the HTLC output lives.
+ */
+ public void set_commitment_txid(byte[] val) {
+ bindings.HTLCDescriptor_set_commitment_txid(this.ptr, InternalUtils.check_arr_len(val, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
/**
* The number of the commitment transaction in which the HTLC output lives.
*/
* The details of the HTLC as it appears in the commitment transaction.
*/
public void set_htlc(org.ldk.structs.HTLCOutputInCommitment val) {
- bindings.HTLCDescriptor_set_htlc(this.ptr, val == null ? 0 : val.ptr);
+ bindings.HTLCDescriptor_set_htlc(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
Reference.reachabilityFence(val);
}
+ /**
+ * Constructs a new HTLCDescriptor given each field
+ */
+ public static HTLCDescriptor of(org.ldk.structs.ChannelDerivationParameters channel_derivation_parameters_arg, byte[] commitment_txid_arg, long per_commitment_number_arg, byte[] per_commitment_point_arg, int feerate_per_kw_arg, org.ldk.structs.HTLCOutputInCommitment htlc_arg, org.ldk.structs.Option_ThirtyTwoBytesZ preimage_arg, byte[] counterparty_sig_arg) {
+ long ret = bindings.HTLCDescriptor_new(channel_derivation_parameters_arg.ptr, InternalUtils.check_arr_len(commitment_txid_arg, 32), per_commitment_number_arg, InternalUtils.check_arr_len(per_commitment_point_arg, 33), feerate_per_kw_arg, htlc_arg.ptr, preimage_arg.ptr, InternalUtils.check_arr_len(counterparty_sig_arg, 64));
+ Reference.reachabilityFence(channel_derivation_parameters_arg);
+ Reference.reachabilityFence(commitment_txid_arg);
+ Reference.reachabilityFence(per_commitment_number_arg);
+ Reference.reachabilityFence(per_commitment_point_arg);
+ Reference.reachabilityFence(feerate_per_kw_arg);
+ Reference.reachabilityFence(htlc_arg);
+ Reference.reachabilityFence(preimage_arg);
+ Reference.reachabilityFence(counterparty_sig_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.HTLCDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HTLCDescriptor(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_derivation_parameters_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(htlc_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(preimage_arg); };
+ return ret_hu_conv;
+ }
+
long clone_ptr() {
long ret = bindings.HTLCDescriptor_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.HTLCDescriptor b) {
- boolean ret = bindings.HTLCDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.HTLCDescriptor_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
if (raw_val.getClass() == bindings.LDKHTLCDestination.InvalidForward.class) {
return new InvalidForward(ptr, (bindings.LDKHTLCDestination.InvalidForward)raw_val);
}
+ if (raw_val.getClass() == bindings.LDKHTLCDestination.InvalidOnion.class) {
+ return new InvalidOnion(ptr, (bindings.LDKHTLCDestination.InvalidOnion)raw_val);
+ }
if (raw_val.getClass() == bindings.LDKHTLCDestination.FailedPayment.class) {
return new FailedPayment(ptr, (bindings.LDKHTLCDestination.FailedPayment)raw_val);
}
/**
* The outgoing `channel_id` between us and the next node.
*/
- public final byte[] channel_id;
+ public final org.ldk.structs.ChannelId channel_id;
private NextHopChannel(long ptr, bindings.LDKHTLCDestination.NextHopChannel obj) {
super(null, ptr);
this.node_id = obj.node_id;
- this.channel_id = obj.channel_id;
+ long channel_id = obj.channel_id;
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+ if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ this.channel_id = channel_id_hu_conv;
}
}
/**
this.requested_forward_scid = obj.requested_forward_scid;
}
}
+ /**
+ * We couldn't decode the incoming onion to obtain the forwarding details.
+ */
+ public final static class InvalidOnion extends HTLCDestination {
+ private InvalidOnion(long ptr, bindings.LDKHTLCDestination.InvalidOnion obj) {
+ super(null, ptr);
+ }
+ }
/**
* Failure scenario where an HTLC may have been forwarded to be intended for us,
* but is invalid for some reason, so we reject it.
/**
* Utility method to constructs a new NextHopChannel-variant HTLCDestination
*/
- public static HTLCDestination next_hop_channel(byte[] node_id, byte[] channel_id) {
- long ret = bindings.HTLCDestination_next_hop_channel(InternalUtils.check_arr_len(node_id, 33), InternalUtils.check_arr_len(channel_id, 32));
+ public static HTLCDestination next_hop_channel(byte[] node_id, org.ldk.structs.ChannelId channel_id) {
+ long ret = bindings.HTLCDestination_next_hop_channel(InternalUtils.check_arr_len(node_id, 33), channel_id.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(channel_id);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.HTLCDestination ret_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
return ret_hu_conv;
}
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new InvalidOnion-variant HTLCDestination
+ */
+ public static HTLCDestination invalid_onion() {
+ long ret = bindings.HTLCDestination_invalid_onion();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.HTLCDestination ret_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
/**
* Utility method to constructs a new FailedPayment-variant HTLCDestination
*/
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.HTLCDestination b) {
- boolean ret = bindings.HTLCDestination_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.HTLCDestination_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.HTLCOutputInCommitment b) {
- boolean ret = bindings.HTLCOutputInCommitment_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.HTLCOutputInCommitment_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.HTLCUpdate b) {
- boolean ret = bindings.HTLCUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.HTLCUpdate_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* The funding keys are used to figure out which signature should go first when building the transaction for broadcast.
*/
public static HolderCommitmentTransaction of(org.ldk.structs.CommitmentTransaction commitment_tx, byte[] counterparty_sig, byte[][] counterparty_htlc_sigs, byte[] holder_funding_key, byte[] counterparty_funding_key) {
- long ret = bindings.HolderCommitmentTransaction_new(commitment_tx == null ? 0 : commitment_tx.ptr, InternalUtils.check_arr_len(counterparty_sig, 64), counterparty_htlc_sigs != null ? Arrays.stream(counterparty_htlc_sigs).map(counterparty_htlc_sigs_conv_8 -> InternalUtils.check_arr_len(counterparty_htlc_sigs_conv_8, 64)).toArray(byte[][]::new) : null, InternalUtils.check_arr_len(holder_funding_key, 33), InternalUtils.check_arr_len(counterparty_funding_key, 33));
+ long ret = bindings.HolderCommitmentTransaction_new(commitment_tx.ptr, InternalUtils.check_arr_len(counterparty_sig, 64), counterparty_htlc_sigs != null ? Arrays.stream(counterparty_htlc_sigs).map(counterparty_htlc_sigs_conv_8 -> InternalUtils.check_arr_len(counterparty_htlc_sigs_conv_8, 64)).toArray(byte[][]::new) : null, InternalUtils.check_arr_len(holder_funding_key, 33), InternalUtils.check_arr_len(counterparty_funding_key, 33));
Reference.reachabilityFence(commitment_tx);
Reference.reachabilityFence(counterparty_sig);
Reference.reachabilityFence(counterparty_htlc_sigs);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Hostname b) {
- boolean ret = bindings.Hostname_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Hostname_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.HtlcBasepoint b) {
- boolean ret = bindings.HtlcBasepoint_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.HtlcBasepoint_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
return ret;
}
+ /**
+ * Derives the \"tweak\" used in calculate [`HtlcKey::from_basepoint`].\n\n[`HtlcKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party.
+ */
+ public byte[] derive_add_tweak(byte[] per_commitment_point) {
+ byte[] ret = bindings.HtlcBasepoint_derive_add_tweak(this.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(per_commitment_point);
+ return ret;
+ }
+
/**
* Serialize the HtlcBasepoint object into a byte array which can be read by HtlcBasepoint_read
*/
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.HtlcKey b) {
- boolean ret = bindings.HtlcKey_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.HtlcKey_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Derive a public htlcpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint`
*/
public static HtlcKey from_basepoint(org.ldk.structs.HtlcBasepoint countersignatory_basepoint, byte[] per_commitment_point) {
- long ret = bindings.HtlcKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+ long ret = bindings.HtlcKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
Reference.reachabilityFence(countersignatory_basepoint);
Reference.reachabilityFence(per_commitment_point);
if (ret >= 0 && ret <= 4096) { return null; }
* Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`.
*/
public void process_path(org.ldk.structs.Path path, byte[] payer_node_id) {
- bindings.InFlightHtlcs_process_path(this.ptr, path == null ? 0 : path.ptr, InternalUtils.check_arr_len(payer_node_id, 33));
+ bindings.InFlightHtlcs_process_path(this.ptr, path.ptr, InternalUtils.check_arr_len(payer_node_id, 33));
Reference.reachabilityFence(this);
Reference.reachabilityFence(path);
Reference.reachabilityFence(payer_node_id);
* id.
*/
public void add_inflight_htlc(org.ldk.structs.NodeId source, org.ldk.structs.NodeId target, long channel_scid, long used_msat) {
- bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, source == null ? 0 : source.ptr, target == null ? 0 : target.ptr, channel_scid, used_msat);
+ bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, source.ptr, target.ptr, channel_scid, used_msat);
Reference.reachabilityFence(this);
Reference.reachabilityFence(source);
Reference.reachabilityFence(target);
* id.
*/
public Option_u64Z used_liquidity_msat(org.ldk.structs.NodeId source, org.ldk.structs.NodeId target, long channel_scid) {
- long ret = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, source == null ? 0 : source.ptr, target == null ? 0 : target.ptr, channel_scid);
+ long ret = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, source.ptr, target.ptr, channel_scid);
Reference.reachabilityFence(this);
Reference.reachabilityFence(source);
Reference.reachabilityFence(target);
* [`descriptor.outpoint`]: StaticPaymentOutputDescriptor::outpoint
*/
public Result_WitnessNoneZ sign_counterparty_payment_input(byte[] spend_tx, long input_idx, org.ldk.structs.StaticPaymentOutputDescriptor descriptor) {
- long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr);
+ long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(spend_tx);
Reference.reachabilityFence(input_idx);
* [`descriptor.to_self_delay`]: DelayedPaymentOutputDescriptor::to_self_delay
*/
public Result_WitnessNoneZ sign_dynamic_p2wsh_input(byte[] spend_tx, long input_idx, org.ldk.structs.DelayedPaymentOutputDescriptor descriptor) {
- long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr);
+ long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(spend_tx);
Reference.reachabilityFence(input_idx);
return ret_hu_conv;
}
+ long clone_ptr() {
+ long ret = bindings.InboundHTLCErr_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the InboundHTLCErr
+ */
+ public InboundHTLCErr clone() {
+ long ret = bindings.InboundHTLCErr_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.InboundHTLCErr ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InboundHTLCErr(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the InboundHTLCErr.
+ */
+ public long hash() {
+ long ret = bindings.InboundHTLCErr_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two InboundHTLCErrs contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.InboundHTLCErr b) {
+ boolean ret = bindings.InboundHTLCErr_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof InboundHTLCErr)) return false;
+ return this.eq((InboundHTLCErr)o);
+ }
}
* The relevant features which the sender supports.
*/
public void set_features(org.ldk.structs.InitFeatures val) {
- bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.Init_set_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new Init given each field
*/
public static Init of(org.ldk.structs.InitFeatures features_arg, org.ldk.structs.Option_CVec_ThirtyTwoBytesZZ networks_arg, org.ldk.structs.Option_SocketAddressZ remote_network_address_arg) {
- long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr, networks_arg.ptr, remote_network_address_arg.ptr);
+ long ret = bindings.Init_new(features_arg.ptr, networks_arg.ptr, remote_network_address_arg.ptr);
Reference.reachabilityFence(features_arg);
Reference.reachabilityFence(networks_arg);
Reference.reachabilityFence(remote_network_address_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Init b) {
- boolean ret = bindings.Init_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Init_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.InitFeatures b) {
- boolean ret = bindings.InitFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.InitFeatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns true if this `Features` object contains required features unknown by `other`.
*/
public boolean requires_unknown_bits_from(org.ldk.structs.InitFeatures other) {
- boolean ret = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+ boolean ret = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(other);
if (this != null) { this.ptrs_to.add(other); };
return ret;
}
+ /**
+ * Set this feature as optional.
+ */
+ public void set_trampoline_routing_optional() {
+ bindings.InitFeatures_set_trampoline_routing_optional(this.ptr);
+ Reference.reachabilityFence(this);
+ }
+
+ /**
+ * Set this feature as required.
+ */
+ public void set_trampoline_routing_required() {
+ bindings.InitFeatures_set_trampoline_routing_required(this.ptr);
+ Reference.reachabilityFence(this);
+ }
+
+ /**
+ * Checks if this feature is supported.
+ */
+ public boolean supports_trampoline_routing() {
+ boolean ret = bindings.InitFeatures_supports_trampoline_routing(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Checks if this feature is required.
+ */
+ public boolean requires_trampoline_routing() {
+ boolean ret = bindings.InitFeatures_requires_trampoline_routing(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
}
* The unique identifier of the input.
*/
public void set_outpoint(org.ldk.structs.OutPoint val) {
- bindings.Input_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+ bindings.Input_set_outpoint(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new Input given each field
*/
public static Input of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut previous_utxo_arg, long satisfaction_weight_arg) {
- long ret = bindings.Input_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, previous_utxo_arg.ptr, satisfaction_weight_arg);
+ long ret = bindings.Input_new(outpoint_arg.ptr, previous_utxo_arg.ptr, satisfaction_weight_arg);
Reference.reachabilityFence(outpoint_arg);
Reference.reachabilityFence(previous_utxo_arg);
Reference.reachabilityFence(satisfaction_weight_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Input b) {
- boolean ret = bindings.Input_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Input_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The unblinded node in a [`BlindedPath`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class IntroductionNode extends CommonBase {
+ private IntroductionNode(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.IntroductionNode_free(ptr); }
+ }
+ static IntroductionNode constr_from_ptr(long ptr) {
+ bindings.LDKIntroductionNode raw_val = bindings.LDKIntroductionNode_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKIntroductionNode.NodeId.class) {
+ return new NodeId(ptr, (bindings.LDKIntroductionNode.NodeId)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKIntroductionNode.DirectedShortChannelId.class) {
+ return new DirectedShortChannelId(ptr, (bindings.LDKIntroductionNode.DirectedShortChannelId)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * The node id of the introduction node.
+ */
+ public final static class NodeId extends IntroductionNode {
+ public final byte[] node_id;
+ private NodeId(long ptr, bindings.LDKIntroductionNode.NodeId obj) {
+ super(null, ptr);
+ this.node_id = obj.node_id;
+ }
+ }
+ /**
+ * The short channel id of the channel leading to the introduction node. The [`Direction`]
+ * identifies which side of the channel is the introduction node.
+ */
+ public final static class DirectedShortChannelId extends IntroductionNode {
+ public final org.ldk.enums.Direction _0;
+ public final long _1;
+ private DirectedShortChannelId(long ptr, bindings.LDKIntroductionNode.DirectedShortChannelId obj) {
+ super(null, ptr);
+ this._0 = obj._0;
+ this._1 = obj._1;
+ }
+ }
+ long clone_ptr() {
+ long ret = bindings.IntroductionNode_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the IntroductionNode
+ */
+ public IntroductionNode clone() {
+ long ret = bindings.IntroductionNode_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new NodeId-variant IntroductionNode
+ */
+ public static IntroductionNode node_id(byte[] a) {
+ long ret = bindings.IntroductionNode_node_id(InternalUtils.check_arr_len(a, 33));
+ Reference.reachabilityFence(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new DirectedShortChannelId-variant IntroductionNode
+ */
+ public static IntroductionNode directed_short_channel_id(org.ldk.enums.Direction a, long b) {
+ long ret = bindings.IntroductionNode_directed_short_channel_id(a, b);
+ Reference.reachabilityFence(a);
+ Reference.reachabilityFence(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the IntroductionNode.
+ */
+ public long hash() {
+ long ret = bindings.IntroductionNode_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two IntroductionNodes contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public boolean eq(org.ldk.structs.IntroductionNode b) {
+ boolean ret = bindings.IntroductionNode_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof IntroductionNode)) return false;
+ return this.eq((IntroductionNode)o);
+ }
+}
* An explanation of the error.
*/
public void set_message(org.ldk.structs.UntrustedString val) {
- bindings.InvoiceError_set_message(this.ptr, val == null ? 0 : val.ptr);
+ bindings.InvoiceError_set_message(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Note that erroneous_field_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static InvoiceError of(@Nullable org.ldk.structs.ErroneousField erroneous_field_arg, org.ldk.structs.UntrustedString message_arg) {
- long ret = bindings.InvoiceError_new(erroneous_field_arg == null ? 0 : erroneous_field_arg.ptr, message_arg == null ? 0 : message_arg.ptr);
+ long ret = bindings.InvoiceError_new(erroneous_field_arg == null ? 0 : erroneous_field_arg.ptr, message_arg.ptr);
Reference.reachabilityFence(erroneous_field_arg);
Reference.reachabilityFence(message_arg);
if (ret >= 0 && ret <= 4096) { return null; }
/**
* The minimum amount required for a successful payment of a single item.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- @Nullable
- public Amount amount() {
+ public Option_AmountZ amount() {
long ret = bindings.InvoiceRequest_amount(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+ org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
* A complete description of the purpose of the payment. Intended to be displayed to the user
* but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public PrintableString description() {
long ret = bindings.InvoiceRequest_description(this.ptr);
Reference.reachabilityFence(this);
long ret = bindings.InvoiceRequest_supported_quantity(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+ org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
* The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public byte[] signing_pubkey() {
byte[] ret = bindings.InvoiceRequest_signing_pubkey(this.ptr);
Reference.reachabilityFence(this);
}
/**
- * Signature of the invoice request using [`payer_id`].
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the
+ * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time.
*
- * [`payer_id`]: Self::payer_id
+ * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned
+ * creation time is used for the `created_at` parameter.
+ *
+ * [`Duration`]: core::time::Duration
*/
- public byte[] signature() {
- byte[] ret = bindings.InvoiceRequest_signature(this.ptr);
+ public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) {
+ long ret = bindings.InvoiceRequest_respond_with(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32));
Reference.reachabilityFence(this);
- return ret;
+ Reference.reachabilityFence(payment_paths);
+ Reference.reachabilityFence(payment_hash);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields.
+ *
+ * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after
+ * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds
+ * where [`std::time::SystemTime`] is not available.
+ *
+ * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment
+ * for the invoice.
+ *
+ * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
+ * must contain one or more elements ordered from most-preferred to least-preferred, if there's
+ * a preference. Note, however, that any privacy is lost if a public node id was used for
+ * [`Offer::signing_pubkey`].
+ *
+ * Errors if the request contains unknown required features.
+ *
+ * # Note
+ *
+ * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`],
+ * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead.
+ *
+ * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at
+ * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey
+ */
+ public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) {
+ long ret = bindings.InvoiceRequest_respond_with_no_std(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32), created_at);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payment_paths);
+ Reference.reachabilityFence(payment_hash);
+ Reference.reachabilityFence(created_at);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
}
/**
* [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
*/
public Result_VerifiedInvoiceRequestNoneZ verify(org.ldk.structs.ExpandedKey key) {
- long ret = bindings.InvoiceRequest_verify(this.ptr, key == null ? 0 : key.ptr);
+ long ret = bindings.InvoiceRequest_verify(this.ptr, key.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(key);
if (ret >= 0 && ret <= 4096) { return null; }
return ret_hu_conv;
}
+ /**
+ * Signature of the invoice request using [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
+ */
+ public byte[] signature() {
+ byte[] ret = bindings.InvoiceRequest_signature(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read
*/
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.InvoiceRequestFeatures b) {
- boolean ret = bindings.InvoiceRequestFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.InvoiceRequestFeatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns true if this `Features` object contains required features unknown by `other`.
*/
public boolean requires_unknown_bits_from(org.ldk.structs.InvoiceRequestFeatures other) {
- boolean ret = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+ boolean ret = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(other);
if (this != null) { this.ptrs_to.add(other); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Fields sent in an [`InvoiceRequest`] message to include in [`PaymentContext::Bolt12Offer`].
+ *
+ * [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceRequestFields extends CommonBase {
+ InvoiceRequestFields(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.InvoiceRequestFields_free(ptr); }
+ }
+
+ /**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+ public byte[] get_payer_id() {
+ byte[] ret = bindings.InvoiceRequestFields_get_payer_id(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+ public void set_payer_id(byte[] val) {
+ bindings.InvoiceRequestFields_set_payer_id(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+ public Option_u64Z get_quantity() {
+ long ret = bindings.InvoiceRequestFields_get_quantity(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+ public void set_quantity(org.ldk.structs.Option_u64Z val) {
+ bindings.InvoiceRequestFields_set_quantity(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response. Truncated to [`PAYER_NOTE_LIMIT`] characters.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public UntrustedString get_payer_note_truncated() {
+ long ret = bindings.InvoiceRequestFields_get_payer_note_truncated(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.UntrustedString ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UntrustedString(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response. Truncated to [`PAYER_NOTE_LIMIT`] characters.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void set_payer_note_truncated(@Nullable org.ldk.structs.UntrustedString val) {
+ bindings.InvoiceRequestFields_set_payer_note_truncated(this.ptr, val == null ? 0 : val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * Constructs a new InvoiceRequestFields given each field
+ *
+ * Note that payer_note_truncated_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public static InvoiceRequestFields of(byte[] payer_id_arg, org.ldk.structs.Option_u64Z quantity_arg, @Nullable org.ldk.structs.UntrustedString payer_note_truncated_arg) {
+ long ret = bindings.InvoiceRequestFields_new(InternalUtils.check_arr_len(payer_id_arg, 33), quantity_arg.ptr, payer_note_truncated_arg == null ? 0 : payer_note_truncated_arg.ptr);
+ Reference.reachabilityFence(payer_id_arg);
+ Reference.reachabilityFence(quantity_arg);
+ Reference.reachabilityFence(payer_note_truncated_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(quantity_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payer_note_truncated_arg); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.InvoiceRequestFields_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the InvoiceRequestFields
+ */
+ public InvoiceRequestFields clone() {
+ long ret = bindings.InvoiceRequestFields_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two InvoiceRequestFieldss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.InvoiceRequestFields b) {
+ boolean ret = bindings.InvoiceRequestFields_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof InvoiceRequestFields)) return false;
+ return this.eq((InvoiceRequestFields)o);
+ }
+ /**
+ * Serialize the InvoiceRequestFields object into a byte array which can be read by InvoiceRequestFields_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.InvoiceRequestFields_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a InvoiceRequestFields from a byte array, created by InvoiceRequestFields_write
+ */
+ public static Result_InvoiceRequestFieldsDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.InvoiceRequestFields_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceRequestWithDerivedPayerIdBuilder extends CommonBase {
+ InvoiceRequestWithDerivedPayerIdBuilder(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.InvoiceRequestWithDerivedPayerIdBuilder_free(ptr); }
+ }
+
+ /**
+ * Builds a signed [`InvoiceRequest`] after checking for valid semantics.
+ */
+ public Result_InvoiceRequestBolt12SemanticErrorZ build_and_sign() {
+ long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not
+ * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported
+ * by the offer.
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public Result_NoneBolt12SemanticErrorZ chain(org.ldk.enums.Network network) {
+ long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_chain(this.ptr, network);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(network);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is
+ * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]).
+ *
+ * Successive calls to this method will override the previous setting.
+ *
+ * [`quantity`]: Self::quantity
+ */
+ public Result_NoneBolt12SemanticErrorZ amount_msats(long amount_msats) {
+ long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this.ptr, amount_msats);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(amount_msats);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity`
+ * does not conform to [`Offer::is_valid_quantity`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public Result_NoneBolt12SemanticErrorZ quantity(long quantity) {
+ long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_quantity(this.ptr, quantity);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(quantity);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`InvoiceRequest::payer_note`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void payer_note(java.lang.String payer_note) {
+ bindings.InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this.ptr, payer_note);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payer_note);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceRequestWithExplicitPayerIdBuilder extends CommonBase {
+ InvoiceRequestWithExplicitPayerIdBuilder(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.InvoiceRequestWithExplicitPayerIdBuilder_free(ptr); }
+ }
+
+ /**
+ * Builds an unsigned [`InvoiceRequest`] after checking for valid semantics. It can be signed
+ * by [`UnsignedInvoiceRequest::sign`].
+ */
+ public Result_UnsignedInvoiceRequestBolt12SemanticErrorZ build() {
+ long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_build(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not
+ * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported
+ * by the offer.
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public Result_NoneBolt12SemanticErrorZ chain(org.ldk.enums.Network network) {
+ long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_chain(this.ptr, network);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(network);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is
+ * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]).
+ *
+ * Successive calls to this method will override the previous setting.
+ *
+ * [`quantity`]: Self::quantity
+ */
+ public Result_NoneBolt12SemanticErrorZ amount_msats(long amount_msats) {
+ long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this.ptr, amount_msats);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(amount_msats);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity`
+ * does not conform to [`Offer::is_valid_quantity`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public Result_NoneBolt12SemanticErrorZ quantity(long quantity) {
+ long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_quantity(this.ptr, quantity);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(quantity);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`InvoiceRequest::payer_note`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void payer_note(java.lang.String payer_note) {
+ bindings.InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this.ptr, payer_note);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payer_note);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds a [`Bolt12Invoice`] from either:
+ * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or
+ * - a [`Refund`] for the \"offer for money\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Refund`]: crate::offers::refund::Refund
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceWithDerivedSigningPubkeyBuilder extends CommonBase {
+ InvoiceWithDerivedSigningPubkeyBuilder(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.InvoiceWithDerivedSigningPubkeyBuilder_free(ptr); }
+ }
+
+ /**
+ * Builds a signed [`Bolt12Invoice`] after checking for valid semantics.
+ */
+ public Result_Bolt12InvoiceBolt12SemanticErrorZ build_and_sign() {
+ long ret = bindings.InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`].
+ * Any expiry that has already passed is valid and can be checked for using
+ * [`Bolt12Invoice::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void relative_expiry(int relative_expiry_secs) {
+ bindings.InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(relative_expiry_secs);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+ /**
+ * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses.
+ */
+ public void fallback_v0_p2wsh(byte[] script_hash) {
+ bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, InternalUtils.check_arr_len(script_hash, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(script_hash);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+ /**
+ * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses.
+ */
+ public void fallback_v0_p2wpkh(byte[] pubkey_hash) {
+ bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, InternalUtils.check_arr_len(pubkey_hash, 20));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(pubkey_hash);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+ /**
+ * Adds a P2TR address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2TR addresses.
+ */
+ public void fallback_v1_p2tr_tweaked(byte[] utput_key) {
+ bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, InternalUtils.check_arr_len(utput_key, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(utput_key);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+ /**
+ * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is
+ * disallowed.
+ */
+ public void allow_mpp() {
+ bindings.InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this.ptr);
+ Reference.reachabilityFence(this);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds a [`Bolt12Invoice`] from either:
+ * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or
+ * - a [`Refund`] for the \"offer for money\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Refund`]: crate::offers::refund::Refund
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceWithExplicitSigningPubkeyBuilder extends CommonBase {
+ InvoiceWithExplicitSigningPubkeyBuilder(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.InvoiceWithExplicitSigningPubkeyBuilder_free(ptr); }
+ }
+
+ /**
+ * Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics. It can be signed by
+ * [`UnsignedBolt12Invoice::sign`].
+ */
+ public Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ build() {
+ long ret = bindings.InvoiceWithExplicitSigningPubkeyBuilder_build(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`].
+ * Any expiry that has already passed is valid and can be checked for using
+ * [`Bolt12Invoice::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void relative_expiry(int relative_expiry_secs) {
+ bindings.InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(relative_expiry_secs);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+ /**
+ * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses.
+ */
+ public void fallback_v0_p2wsh(byte[] script_hash) {
+ bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, InternalUtils.check_arr_len(script_hash, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(script_hash);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+ /**
+ * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses.
+ */
+ public void fallback_v0_p2wpkh(byte[] pubkey_hash) {
+ bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, InternalUtils.check_arr_len(pubkey_hash, 20));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(pubkey_hash);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+ /**
+ * Adds a P2TR address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2TR addresses.
+ */
+ public void fallback_v1_p2tr_tweaked(byte[] utput_key) {
+ bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, InternalUtils.check_arr_len(utput_key, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(utput_key);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+ /**
+ * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is
+ * disallowed.
+ */
+ public void allow_mpp() {
+ bindings.InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this.ptr);
+ Reference.reachabilityFence(this);
+ if (this != null) { this.ptrs_to.add(this); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid this being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after this call, this is reset to null and is now a dummy object.
+ this.ptr = 0;;
+ }
+
+}
@Override public long read(String primary_namespace, String secondary_namespace, String key) {
Result_CVec_u8ZIOErrorZ ret = arg.read(primary_namespace, secondary_namespace, key);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long write(String primary_namespace, String secondary_namespace, String key, byte[] buf) {
Result_NoneIOErrorZ ret = arg.write(primary_namespace, secondary_namespace, key, buf);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long remove(String primary_namespace, String secondary_namespace, String key, boolean lazy) {
Result_NoneIOErrorZ ret = arg.remove(primary_namespace, secondary_namespace, key, lazy);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long list(String primary_namespace, String secondary_namespace) {
Result_CVec_StrZIOErrorZ ret = arg.list(primary_namespace, secondary_namespace);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
});
return ret_hu_conv;
}
- /**
- * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an
- * output to the given change destination (if sufficient change value remains). The
- * transaction will have a feerate, at least, of the given value.
- *
- * The `locktime` argument is used to set the transaction's locktime. If `None`, the
- * transaction will have a locktime of 0. It it recommended to set this to the current block
- * height to avoid fee sniping, unless you have some specific reason to use a different
- * locktime.
- *
- * Returns `Err(())` if the output value is greater than the input value minus required fee,
- * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
- * does not match the one we can spend.
- *
- * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
- *
- * May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used
- * this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`].
- */
- public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) {
- long ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(descriptors);
- Reference.reachabilityFence(outputs);
- Reference.reachabilityFence(change_destination_script);
- Reference.reachabilityFence(feerate_sat_per_1000_weight);
- Reference.reachabilityFence(locktime);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
- for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (this != null) { this.ptrs_to.add(descriptors_conv_27); }; };
- if (this != null) { this.ptrs_to.add(locktime); };
- return ret_hu_conv;
- }
-
/**
* Constructs a new EntropySource which calls the relevant methods on this_arg.
* This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
return ret_hu_conv;
}
+ /**
+ * Constructs a new OutputSpender which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is
+ */
+ public OutputSpender as_OutputSpender() {
+ long ret = bindings.KeysManager_as_OutputSpender(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ OutputSpender ret_hu_conv = new OutputSpender(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
/**
* Constructs a new SignerProvider which calls the relevant methods on this_arg.
* This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is
* possibly filtered.
*/
public void filtered_block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) {
- bindings.Listen_filtered_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height);
+ bindings.Listen_filtered_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height);
Reference.reachabilityFence(this);
Reference.reachabilityFence(header);
Reference.reachabilityFence(txdata);
/**
- * Options for how to set the max dust HTLC exposure allowed on a channel. See
+ * Options for how to set the max dust exposure allowed on a channel. See
* [`ChannelConfig::max_dust_htlc_exposure`] for details.
*/
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
}
}
/**
- * This sets a multiplier on the estimated high priority feerate (sats/KW, as obtained from
- * [`FeeEstimator`]) to determine the maximum allowed dust exposure. If this variant is used
- * then the maximum dust exposure in millisatoshis is calculated as:
- * `high_priority_feerate_per_kw * value`. For example, with our default value
- * `FeeRateMultiplier(5000)`:
+ * This sets a multiplier on the [`ConfirmationTarget::OnChainSweep`] feerate (in sats/KW) to
+ * determine the maximum allowed dust exposure. If this variant is used then the maximum dust
+ * exposure in millisatoshis is calculated as:
+ * `feerate_per_kw * value`. For example, with our default value
+ * `FeeRateMultiplier(10_000)`:
*
* - For the minimum fee rate of 1 sat/vByte (250 sat/KW, although the minimum
* defaults to 253 sats/KW for rounding, see [`FeeEstimator`]), the max dust exposure would
- * be 253 * 5000 = 1,265,000 msats.
+ * be 253 * 10_000 = 2,530,000 msats.
* - For a fee rate of 30 sat/vByte (7500 sat/KW), the max dust exposure would be
- * 7500 * 5000 = 37,500,000 msats.
- *
- * This allows the maximum dust exposure to automatically scale with fee rate changes.
+ * 7500 * 50_000 = 75,000,000 msats (0.00075 BTC).
*
* Note, if you're using a third-party fee estimator, this may leave you more exposed to a
* fee griefing attack, where your fee estimator may purposely overestimate the fee rate,
* by default this will be set to a [`Self::FixedLimitMsat`] of 5,000,000 msat.
*
* [`FeeEstimator`]: crate::chain::chaininterface::FeeEstimator
+ * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep
*/
public final static class FeeRateMultiplier extends MaxDustHTLCExposure {
public final long fee_rate_multiplier;
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.MaxDustHTLCExposure b) {
- boolean ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
if (destination_hu_conv != null) { destination_hu_conv.ptrs_to.add(this); };
Result_OnionMessagePathNoneZ ret = arg.find_path(sender, peers, destination_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long create_blinded_paths(byte[] recipient, byte[][] peers) {
Result_CVec_BlindedPathZNoneZ ret = arg.create_blinded_paths(recipient, peers);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
});
* Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent
*/
public static MessageSendEvent send_accept_channel(byte[] node_id, org.ldk.structs.AcceptChannel msg) {
- long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendAcceptChannelV2-variant MessageSendEvent
*/
public static MessageSendEvent send_accept_channel_v2(byte[] node_id, org.ldk.structs.AcceptChannelV2 msg) {
- long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendOpenChannel-variant MessageSendEvent
*/
public static MessageSendEvent send_open_channel(byte[] node_id, org.ldk.structs.OpenChannel msg) {
- long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendOpenChannelV2-variant MessageSendEvent
*/
public static MessageSendEvent send_open_channel_v2(byte[] node_id, org.ldk.structs.OpenChannelV2 msg) {
- long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendFundingCreated-variant MessageSendEvent
*/
public static MessageSendEvent send_funding_created(byte[] node_id, org.ldk.structs.FundingCreated msg) {
- long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendFundingSigned-variant MessageSendEvent
*/
public static MessageSendEvent send_funding_signed(byte[] node_id, org.ldk.structs.FundingSigned msg) {
- long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendStfu-variant MessageSendEvent
*/
public static MessageSendEvent send_stfu(byte[] node_id, org.ldk.structs.Stfu msg) {
- long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendSplice-variant MessageSendEvent
*/
public static MessageSendEvent send_splice(byte[] node_id, org.ldk.structs.Splice msg) {
- long ret = bindings.MessageSendEvent_send_splice(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_splice(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendSpliceAck-variant MessageSendEvent
*/
public static MessageSendEvent send_splice_ack(byte[] node_id, org.ldk.structs.SpliceAck msg) {
- long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendSpliceLocked-variant MessageSendEvent
*/
public static MessageSendEvent send_splice_locked(byte[] node_id, org.ldk.structs.SpliceLocked msg) {
- long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendTxAddInput-variant MessageSendEvent
*/
public static MessageSendEvent send_tx_add_input(byte[] node_id, org.ldk.structs.TxAddInput msg) {
- long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendTxAddOutput-variant MessageSendEvent
*/
public static MessageSendEvent send_tx_add_output(byte[] node_id, org.ldk.structs.TxAddOutput msg) {
- long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendTxRemoveInput-variant MessageSendEvent
*/
public static MessageSendEvent send_tx_remove_input(byte[] node_id, org.ldk.structs.TxRemoveInput msg) {
- long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendTxRemoveOutput-variant MessageSendEvent
*/
public static MessageSendEvent send_tx_remove_output(byte[] node_id, org.ldk.structs.TxRemoveOutput msg) {
- long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendTxComplete-variant MessageSendEvent
*/
public static MessageSendEvent send_tx_complete(byte[] node_id, org.ldk.structs.TxComplete msg) {
- long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendTxSignatures-variant MessageSendEvent
*/
public static MessageSendEvent send_tx_signatures(byte[] node_id, org.ldk.structs.TxSignatures msg) {
- long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendTxInitRbf-variant MessageSendEvent
*/
public static MessageSendEvent send_tx_init_rbf(byte[] node_id, org.ldk.structs.TxInitRbf msg) {
- long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendTxAckRbf-variant MessageSendEvent
*/
public static MessageSendEvent send_tx_ack_rbf(byte[] node_id, org.ldk.structs.TxAckRbf msg) {
- long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendTxAbort-variant MessageSendEvent
*/
public static MessageSendEvent send_tx_abort(byte[] node_id, org.ldk.structs.TxAbort msg) {
- long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendChannelReady-variant MessageSendEvent
*/
public static MessageSendEvent send_channel_ready(byte[] node_id, org.ldk.structs.ChannelReady msg) {
- long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent
*/
public static MessageSendEvent send_announcement_signatures(byte[] node_id, org.ldk.structs.AnnouncementSignatures msg) {
- long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent
*/
public static MessageSendEvent update_htlcs(byte[] node_id, org.ldk.structs.CommitmentUpdate updates) {
- long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.check_arr_len(node_id, 33), updates == null ? 0 : updates.ptr);
+ long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.check_arr_len(node_id, 33), updates.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(updates);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent
*/
public static MessageSendEvent send_revoke_and_ack(byte[] node_id, org.ldk.structs.RevokeAndACK msg) {
- long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendClosingSigned-variant MessageSendEvent
*/
public static MessageSendEvent send_closing_signed(byte[] node_id, org.ldk.structs.ClosingSigned msg) {
- long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendShutdown-variant MessageSendEvent
*/
public static MessageSendEvent send_shutdown(byte[] node_id, org.ldk.structs.Shutdown msg) {
- long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent
*/
public static MessageSendEvent send_channel_reestablish(byte[] node_id, org.ldk.structs.ChannelReestablish msg) {
- long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent
*/
public static MessageSendEvent send_channel_announcement(byte[] node_id, org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) {
- long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr);
+ long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.check_arr_len(node_id, 33), msg.ptr, update_msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
Reference.reachabilityFence(update_msg);
* Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent
*/
public static MessageSendEvent broadcast_channel_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) {
- long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr);
+ long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg.ptr, update_msg.ptr);
Reference.reachabilityFence(msg);
Reference.reachabilityFence(update_msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent
*/
public static MessageSendEvent broadcast_channel_update(org.ldk.structs.ChannelUpdate msg) {
- long ret = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_broadcast_channel_update(msg.ptr);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
* Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent
*/
public static MessageSendEvent broadcast_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
- long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg.ptr);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
* Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent
*/
public static MessageSendEvent send_channel_update(byte[] node_id, org.ldk.structs.ChannelUpdate msg) {
- long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent
*/
public static MessageSendEvent send_channel_range_query(byte[] node_id, org.ldk.structs.QueryChannelRange msg) {
- long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent
*/
public static MessageSendEvent send_short_ids_query(byte[] node_id, org.ldk.structs.QueryShortChannelIds msg) {
- long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent
*/
public static MessageSendEvent send_reply_channel_range(byte[] node_id, org.ldk.structs.ReplyChannelRange msg) {
- long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new SendGossipTimestampFilter-variant MessageSendEvent
*/
public static MessageSendEvent send_gossip_timestamp_filter(byte[] node_id, org.ldk.structs.GossipTimestampFilter msg) {
- long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
@Override public long[] get_and_clear_pending_msg_events() {
MessageSendEvent[] ret = arg.get_and_clear_pending_msg_events();
Reference.reachabilityFence(arg);
- long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_18 -> ret_conv_18 == null ? 0 : ret_conv_18.clone_ptr()).toArray() : null;
+ long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_18 -> ret_conv_18.clone_ptr()).toArray() : null;
for (MessageSendEvent ret_conv_18: ret) { if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret_conv_18); }; };
return result;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.MinFinalCltvExpiryDelta b) {
- boolean ret = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
if (raw_val.getClass() == bindings.LDKMonitorEvent.HTLCEvent.class) {
return new HTLCEvent(ptr, (bindings.LDKMonitorEvent.HTLCEvent)raw_val);
}
+ if (raw_val.getClass() == bindings.LDKMonitorEvent.HolderForceClosedWithInfo.class) {
+ return new HolderForceClosedWithInfo(ptr, (bindings.LDKMonitorEvent.HolderForceClosedWithInfo)raw_val);
+ }
if (raw_val.getClass() == bindings.LDKMonitorEvent.HolderForceClosed.class) {
return new HolderForceClosed(ptr, (bindings.LDKMonitorEvent.HolderForceClosed)raw_val);
}
this.htlc_event = htlc_event_hu_conv;
}
}
+ /**
+ * Indicates we broadcasted the channel's latest commitment transaction and thus closed the
+ * channel. Holds information about the channel and why it was closed.
+ */
+ public final static class HolderForceClosedWithInfo extends MonitorEvent {
+ /**
+ * The reason the channel was closed.
+ */
+ public final org.ldk.structs.ClosureReason reason;
+ /**
+ * The funding outpoint of the channel.
+ */
+ public final org.ldk.structs.OutPoint outpoint;
+ /**
+ * The channel ID of the channel.
+ */
+ public final org.ldk.structs.ChannelId channel_id;
+ private HolderForceClosedWithInfo(long ptr, bindings.LDKMonitorEvent.HolderForceClosedWithInfo obj) {
+ super(null, ptr);
+ long reason = obj.reason;
+ org.ldk.structs.ClosureReason reason_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(reason);
+ if (reason_hu_conv != null) { reason_hu_conv.ptrs_to.add(this); };
+ this.reason = reason_hu_conv;
+ long outpoint = obj.outpoint;
+ org.ldk.structs.OutPoint outpoint_hu_conv = null; if (outpoint < 0 || outpoint > 4096) { outpoint_hu_conv = new org.ldk.structs.OutPoint(null, outpoint); }
+ if (outpoint_hu_conv != null) { outpoint_hu_conv.ptrs_to.add(this); };
+ this.outpoint = outpoint_hu_conv;
+ long channel_id = obj.channel_id;
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+ if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ this.channel_id = channel_id_hu_conv;
+ }
+ }
/**
* Indicates we broadcasted the channel's latest commitment transaction and thus closed the
* channel.
* The funding outpoint of the [`ChannelMonitor`] that was updated
*/
public final org.ldk.structs.OutPoint funding_txo;
+ /**
+ * The channel ID of the channel associated with the [`ChannelMonitor`]
+ */
+ public final org.ldk.structs.ChannelId channel_id;
/**
* The Update ID from [`ChannelMonitorUpdate::update_id`] which was applied or
* [`ChannelMonitor::get_latest_update_id`].
org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); };
this.funding_txo = funding_txo_hu_conv;
+ long channel_id = obj.channel_id;
+ org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+ if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ this.channel_id = channel_id_hu_conv;
this.monitor_update_id = obj.monitor_update_id;
}
}
* Utility method to constructs a new HTLCEvent-variant MonitorEvent
*/
public static MonitorEvent htlcevent(org.ldk.structs.HTLCUpdate a) {
- long ret = bindings.MonitorEvent_htlcevent(a == null ? 0 : a.ptr);
+ long ret = bindings.MonitorEvent_htlcevent(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret);
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new HolderForceClosedWithInfo-variant MonitorEvent
+ */
+ public static MonitorEvent holder_force_closed_with_info(org.ldk.structs.ClosureReason reason, org.ldk.structs.OutPoint outpoint, org.ldk.structs.ChannelId channel_id) {
+ long ret = bindings.MonitorEvent_holder_force_closed_with_info(reason.ptr, outpoint.ptr, channel_id.ptr);
+ Reference.reachabilityFence(reason);
+ Reference.reachabilityFence(outpoint);
+ Reference.reachabilityFence(channel_id);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reason); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
+ return ret_hu_conv;
+ }
+
/**
* Utility method to constructs a new HolderForceClosed-variant MonitorEvent
*/
public static MonitorEvent holder_force_closed(org.ldk.structs.OutPoint a) {
- long ret = bindings.MonitorEvent_holder_force_closed(a == null ? 0 : a.ptr);
+ long ret = bindings.MonitorEvent_holder_force_closed(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret);
/**
* Utility method to constructs a new Completed-variant MonitorEvent
*/
- public static MonitorEvent completed(org.ldk.structs.OutPoint funding_txo, long monitor_update_id) {
- long ret = bindings.MonitorEvent_completed(funding_txo == null ? 0 : funding_txo.ptr, monitor_update_id);
+ public static MonitorEvent completed(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelId channel_id, long monitor_update_id) {
+ long ret = bindings.MonitorEvent_completed(funding_txo.ptr, channel_id.ptr, monitor_update_id);
Reference.reachabilityFence(funding_txo);
+ Reference.reachabilityFence(channel_id);
Reference.reachabilityFence(monitor_update_id);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_txo); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
return ret_hu_conv;
}
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.MonitorEvent b) {
- boolean ret = bindings.MonitorEvent_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.MonitorEvent_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.MonitorUpdateId b) {
- boolean ret = bindings.MonitorUpdateId_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.MonitorUpdateId_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* [`Event`]: crate::events::Event
*/
public void handle_network_update(org.ldk.structs.NetworkUpdate network_update) {
- bindings.NetworkGraph_handle_network_update(this.ptr, network_update == null ? 0 : network_update.ptr);
+ bindings.NetworkGraph_handle_network_update(this.ptr, network_update.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(network_update);
}
* routing messages from a source using a protocol other than the lightning P2P protocol.
*/
public Result_NoneLightningErrorZ update_node_from_announcement(org.ldk.structs.NodeAnnouncement msg) {
- long ret = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* peers.
*/
public Result_NoneLightningErrorZ update_node_from_unsigned_announcement(org.ldk.structs.UnsignedNodeAnnouncement msg) {
- long ret = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* the corresponding UTXO exists on chain and is correctly-formatted.
*/
public Result_NoneLightningErrorZ update_channel_from_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.Option_UtxoLookupZ utxo_lookup) {
- long ret = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg == null ? 0 : msg.ptr, utxo_lookup.ptr);
+ long ret = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg.ptr, utxo_lookup.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
Reference.reachabilityFence(utxo_lookup);
* This will skip verification of if the channel is actually on-chain.
*/
public Result_NoneLightningErrorZ update_channel_from_announcement_no_lookup(org.ldk.structs.ChannelAnnouncement msg) {
- long ret = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* the corresponding UTXO exists on chain and is correctly-formatted.
*/
public Result_NoneLightningErrorZ update_channel_from_unsigned_announcement(org.ldk.structs.UnsignedChannelAnnouncement msg, org.ldk.structs.Option_UtxoLookupZ utxo_lookup) {
- long ret = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr, utxo_lookup.ptr);
+ long ret = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg.ptr, utxo_lookup.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
Reference.reachabilityFence(utxo_lookup);
* All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields.
*/
public Result_NoneLightningErrorZ add_channel_from_partial_announcement(long short_channel_id, long timestamp, org.ldk.structs.ChannelFeatures features, byte[] node_id_1, byte[] node_id_2) {
- long ret = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features == null ? 0 : features.ptr, InternalUtils.check_arr_len(node_id_1, 33), InternalUtils.check_arr_len(node_id_2, 33));
+ long ret = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features.ptr, InternalUtils.check_arr_len(node_id_1, 33), InternalUtils.check_arr_len(node_id_2, 33));
Reference.reachabilityFence(this);
Reference.reachabilityFence(short_channel_id);
Reference.reachabilityFence(timestamp);
* materially in the future will be rejected.
*/
public Result_NoneLightningErrorZ update_channel(org.ldk.structs.ChannelUpdate msg) {
- long ret = bindings.NetworkGraph_update_channel(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.NetworkGraph_update_channel(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* materially in the future will be rejected.
*/
public Result_NoneLightningErrorZ update_channel_unsigned(org.ldk.structs.UnsignedChannelUpdate msg) {
- long ret = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* materially in the future will be rejected.
*/
public Result_NoneLightningErrorZ verify_channel_update(org.ldk.structs.ChannelUpdate msg) {
- long ret = bindings.NetworkGraph_verify_channel_update(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.NetworkGraph_verify_channel_update(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate
*/
public static NetworkUpdate channel_update_message(org.ldk.structs.ChannelUpdate msg) {
- long ret = bindings.NetworkUpdate_channel_update_message(msg == null ? 0 : msg.ptr);
+ long ret = bindings.NetworkUpdate_channel_update_message(msg.ptr);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.NetworkUpdate b) {
- boolean ret = bindings.NetworkUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.NetworkUpdate_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The next hop to forward an onion message along its path.
+ *
+ * Note that payment blinded paths always specify their next hop using an explicit node id.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class NextMessageHop extends CommonBase {
+ private NextMessageHop(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.NextMessageHop_free(ptr); }
+ }
+ static NextMessageHop constr_from_ptr(long ptr) {
+ bindings.LDKNextMessageHop raw_val = bindings.LDKNextMessageHop_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKNextMessageHop.NodeId.class) {
+ return new NodeId(ptr, (bindings.LDKNextMessageHop.NodeId)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKNextMessageHop.ShortChannelId.class) {
+ return new ShortChannelId(ptr, (bindings.LDKNextMessageHop.ShortChannelId)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * The node id of the next hop.
+ */
+ public final static class NodeId extends NextMessageHop {
+ public final byte[] node_id;
+ private NodeId(long ptr, bindings.LDKNextMessageHop.NodeId obj) {
+ super(null, ptr);
+ this.node_id = obj.node_id;
+ }
+ }
+ /**
+ * The short channel id leading to the next hop.
+ */
+ public final static class ShortChannelId extends NextMessageHop {
+ public final long short_channel_id;
+ private ShortChannelId(long ptr, bindings.LDKNextMessageHop.ShortChannelId obj) {
+ super(null, ptr);
+ this.short_channel_id = obj.short_channel_id;
+ }
+ }
+ long clone_ptr() {
+ long ret = bindings.NextMessageHop_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the NextMessageHop
+ */
+ public NextMessageHop clone() {
+ long ret = bindings.NextMessageHop_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new NodeId-variant NextMessageHop
+ */
+ public static NextMessageHop node_id(byte[] a) {
+ long ret = bindings.NextMessageHop_node_id(InternalUtils.check_arr_len(a, 33));
+ Reference.reachabilityFence(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new ShortChannelId-variant NextMessageHop
+ */
+ public static NextMessageHop short_channel_id(long a) {
+ long ret = bindings.NextMessageHop_short_channel_id(a);
+ Reference.reachabilityFence(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the NextMessageHop.
+ */
+ public long hash() {
+ long ret = bindings.NextMessageHop_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two NextMessageHops contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public boolean eq(org.ldk.structs.NextMessageHop b) {
+ boolean ret = bindings.NextMessageHop_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof NextMessageHop)) return false;
+ return this.eq((NextMessageHop)o);
+ }
+}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.NodeAlias b) {
- boolean ret = bindings.NodeAlias_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.NodeAlias_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* The actual content of the announcement
*/
public void set_contents(org.ldk.structs.UnsignedNodeAnnouncement val) {
- bindings.NodeAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr);
+ bindings.NodeAnnouncement_set_contents(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new NodeAnnouncement given each field
*/
public static NodeAnnouncement of(byte[] signature_arg, org.ldk.structs.UnsignedNodeAnnouncement contents_arg) {
- long ret = bindings.NodeAnnouncement_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg == null ? 0 : contents_arg.ptr);
+ long ret = bindings.NodeAnnouncement_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg.ptr);
Reference.reachabilityFence(signature_arg);
Reference.reachabilityFence(contents_arg);
if (ret >= 0 && ret <= 4096) { return null; }
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.NodeAnnouncement b) {
- boolean ret = bindings.NodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.NodeAnnouncement_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Protocol features the node announced support for
*/
public void set_features(org.ldk.structs.NodeFeatures val) {
- bindings.NodeAnnouncementInfo_set_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.NodeAnnouncementInfo_set_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* should not be exposed to the user.
*/
public void set_alias(org.ldk.structs.NodeAlias val) {
- bindings.NodeAnnouncementInfo_set_alias(this.ptr, val == null ? 0 : val.ptr);
+ bindings.NodeAnnouncementInfo_set_alias(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Note that announcement_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static NodeAnnouncementInfo of(org.ldk.structs.NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, org.ldk.structs.NodeAlias alias_arg, @Nullable org.ldk.structs.NodeAnnouncement announcement_message_arg) {
- long ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr, last_update_arg, InternalUtils.check_arr_len(rgb_arg, 3), alias_arg == null ? 0 : alias_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr);
+ long ret = bindings.NodeAnnouncementInfo_new(features_arg.ptr, last_update_arg, InternalUtils.check_arr_len(rgb_arg, 3), alias_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr);
Reference.reachabilityFence(features_arg);
Reference.reachabilityFence(last_update_arg);
Reference.reachabilityFence(rgb_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.NodeAnnouncementInfo b) {
- boolean ret = bindings.NodeAnnouncementInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.NodeAnnouncementInfo_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.NodeFeatures b) {
- boolean ret = bindings.NodeFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.NodeFeatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns true if this `Features` object contains required features unknown by `other`.
*/
public boolean requires_unknown_bits_from(org.ldk.structs.NodeFeatures other) {
- boolean ret = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+ boolean ret = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(other);
if (this != null) { this.ptrs_to.add(other); };
return ret;
}
+ /**
+ * Set this feature as optional.
+ */
+ public void set_trampoline_routing_optional() {
+ bindings.NodeFeatures_set_trampoline_routing_optional(this.ptr);
+ Reference.reachabilityFence(this);
+ }
+
+ /**
+ * Set this feature as required.
+ */
+ public void set_trampoline_routing_required() {
+ bindings.NodeFeatures_set_trampoline_routing_required(this.ptr);
+ Reference.reachabilityFence(this);
+ }
+
+ /**
+ * Checks if this feature is supported.
+ */
+ public boolean supports_trampoline_routing() {
+ boolean ret = bindings.NodeFeatures_supports_trampoline_routing(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Checks if this feature is required.
+ */
+ public boolean requires_trampoline_routing() {
+ boolean ret = bindings.NodeFeatures_requires_trampoline_routing(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
}
return ret_hu_conv;
}
+ /**
+ * Create a new NodeId from a slice of bytes
+ */
+ public static Result_NodeIdDecodeErrorZ from_slice(byte[] bytes) {
+ long ret = bindings.NodeId_from_slice(bytes);
+ Reference.reachabilityFence(bytes);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
/**
* Get the public key slice from this NodeId
*/
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * An interface for looking up the node id of a channel counterparty for the purpose of forwarding
+ * an [`OnionMessage`].
+ *
+ * [`OnionMessage`]: crate::ln::msgs::OnionMessage
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class NodeIdLookUp extends CommonBase {
+ final bindings.LDKNodeIdLookUp bindings_instance;
+ NodeIdLookUp(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+ private NodeIdLookUp(bindings.LDKNodeIdLookUp arg) {
+ super(bindings.LDKNodeIdLookUp_new(arg));
+ this.ptrs_to.add(arg);
+ this.bindings_instance = arg;
+ }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.NodeIdLookUp_free(ptr); } super.finalize();
+ }
+ /**
+ * Destroys the object, freeing associated resources. After this call, any access
+ * to this object may result in a SEGFAULT or worse.
+ *
+ * You should generally NEVER call this method. You should let the garbage collector
+ * do this for you when it finalizes objects. However, it may be useful for types
+ * which represent locks and should be closed immediately to avoid holding locks
+ * until the GC runs.
+ */
+ public void destroy() {
+ if (ptr != 0) { bindings.NodeIdLookUp_free(ptr); }
+ ptr = 0;
+ }
+ public static interface NodeIdLookUpInterface {
+ /**
+ * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`.
+ *
+ * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized
+ * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers.
+ *
+ * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ byte[] next_node_id(long short_channel_id);
+ }
+ private static class LDKNodeIdLookUpHolder { NodeIdLookUp held; }
+ public static NodeIdLookUp new_impl(NodeIdLookUpInterface arg) {
+ final LDKNodeIdLookUpHolder impl_holder = new LDKNodeIdLookUpHolder();
+ impl_holder.held = new NodeIdLookUp(new bindings.LDKNodeIdLookUp() {
+ @Override public byte[] next_node_id(long short_channel_id) {
+ byte[] ret = arg.next_node_id(short_channel_id);
+ Reference.reachabilityFence(arg);
+ byte[] result = InternalUtils.check_arr_len(ret, 33);
+ return result;
+ }
+ });
+ return impl_holder.held;
+ }
+ /**
+ * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`.
+ *
+ * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized
+ * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers.
+ *
+ * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public byte[] next_node_id(long short_channel_id) {
+ byte[] ret = bindings.NodeIdLookUp_next_node_id(this.ptr, short_channel_id);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(short_channel_id);
+ return ret;
+ }
+
+}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.NodeInfo b) {
- boolean ret = bindings.NodeInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.NodeInfo_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
if (!(o instanceof NodeInfo)) return false;
return this.eq((NodeInfo)o);
}
+ /**
+ * Returns whether the node has only announced Tor addresses.
+ */
+ public boolean is_tor_only() {
+ boolean ret = bindings.NodeInfo_is_tor_only(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read
*/
@Override public long get_node_id(Recipient recipient) {
Result_PublicKeyNoneZ ret = arg.get_node_id(recipient);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long ecdh(Recipient recipient, byte[] other_key, long tweak) {
if (tweak_hu_conv != null) { tweak_hu_conv.ptrs_to.add(this); };
Result_ThirtyTwoBytesNoneZ ret = arg.ecdh(recipient, other_key, tweak_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_invoice(byte[] hrp_bytes, byte[] invoice_data, Recipient recipient) {
}
Result_RecoverableSignatureNoneZ ret = arg.sign_invoice(hrp_bytes, invoice_data_conv_7_arr, recipient);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_bolt12_invoice_request(long invoice_request) {
org.ldk.structs.UnsignedInvoiceRequest invoice_request_hu_conv = null; if (invoice_request < 0 || invoice_request > 4096) { invoice_request_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, invoice_request); }
Result_SchnorrSignatureNoneZ ret = arg.sign_bolt12_invoice_request(invoice_request_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_bolt12_invoice(long invoice) {
org.ldk.structs.UnsignedBolt12Invoice invoice_hu_conv = null; if (invoice < 0 || invoice > 4096) { invoice_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, invoice); }
Result_SchnorrSignatureNoneZ ret = arg.sign_bolt12_invoice(invoice_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_gossip_message(long msg) {
if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
Result_ECDSASignatureNoneZ ret = arg.sign_gossip_message(msg_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
});
* [`TaggedHash`]: crate::offers::merkle::TaggedHash
*/
public Result_SchnorrSignatureNoneZ sign_bolt12_invoice_request(org.ldk.structs.UnsignedInvoiceRequest invoice_request) {
- long ret = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, invoice_request == null ? 0 : invoice_request.ptr);
+ long ret = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, invoice_request.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(invoice_request);
if (ret >= 0 && ret <= 4096) { return null; }
* [`TaggedHash`]: crate::offers::merkle::TaggedHash
*/
public Result_SchnorrSignatureNoneZ sign_bolt12_invoice(org.ldk.structs.UnsignedBolt12Invoice invoice) {
- long ret = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, invoice == null ? 0 : invoice.ptr);
+ long ret = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, invoice.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(invoice);
if (ret >= 0 && ret <= 4096) { return null; }
/**
* The minimum amount required for a successful payment of a single item.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- @Nullable
- public Amount amount() {
+ public Option_AmountZ amount() {
long ret = bindings.Offer_amount(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+ org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
* A complete description of the purpose of the payment. Intended to be displayed to the user
* but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public PrintableString description() {
long ret = bindings.Offer_description(this.ptr);
Reference.reachabilityFence(this);
long ret = bindings.Offer_supported_quantity(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+ org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
* The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public byte[] signing_pubkey() {
byte[] ret = bindings.Offer_signing_pubkey(this.ptr);
Reference.reachabilityFence(this);
return ret;
}
+ /**
+ * Returns the id of the offer.
+ */
+ public OfferId id() {
+ long ret = bindings.Offer_id(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
/**
* Returns whether the given chain is supported by the offer.
*/
return ret;
}
+ /**
+ * Similar to [`Offer::request_invoice`] except it:
+ * - derives the [`InvoiceRequest::payer_id`] such that a different key can be used for each
+ * request,
+ * - sets [`InvoiceRequest::payer_metadata`] when [`InvoiceRequestBuilder::build`] is called
+ * such that it can be used by [`Bolt12Invoice::verify`] to determine if the invoice was
+ * requested using a base [`ExpandedKey`] from which the payer id was derived, and
+ * - includes the [`PaymentId`] encrypted in [`InvoiceRequest::payer_metadata`] so that it can
+ * be used when sending the payment for the requested invoice.
+ *
+ * Useful to protect the sender's privacy.
+ *
+ * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id
+ * [`InvoiceRequest::payer_metadata`]: crate::offers::invoice_request::InvoiceRequest::payer_metadata
+ * [`Bolt12Invoice::verify`]: crate::offers::invoice::Bolt12Invoice::verify
+ * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
+ */
+ public Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ request_invoice_deriving_payer_id(org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, byte[] payment_id) {
+ long ret = bindings.Offer_request_invoice_deriving_payer_id(this.ptr, expanded_key.ptr, entropy_source.ptr, InternalUtils.check_arr_len(payment_id, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(expanded_key);
+ Reference.reachabilityFence(entropy_source);
+ Reference.reachabilityFence(payment_id);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(expanded_key); };
+ if (this != null) { this.ptrs_to.add(entropy_source); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Similar to [`Offer::request_invoice_deriving_payer_id`] except uses `payer_id` for the
+ * [`InvoiceRequest::payer_id`] instead of deriving a different key for each request.
+ *
+ * Useful for recurring payments using the same `payer_id` with different invoices.
+ *
+ * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id
+ */
+ public Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ request_invoice_deriving_metadata(byte[] payer_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, byte[] payment_id) {
+ long ret = bindings.Offer_request_invoice_deriving_metadata(this.ptr, InternalUtils.check_arr_len(payer_id, 33), expanded_key.ptr, entropy_source.ptr, InternalUtils.check_arr_len(payment_id, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payer_id);
+ Reference.reachabilityFence(expanded_key);
+ Reference.reachabilityFence(entropy_source);
+ Reference.reachabilityFence(payment_id);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(expanded_key); };
+ if (this != null) { this.ptrs_to.add(entropy_source); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates an [`InvoiceRequestBuilder`] for the offer with the given `metadata` and `payer_id`,
+ * which will be reflected in the `Bolt12Invoice` response.
+ *
+ * The `metadata` is useful for including information about the derivation of `payer_id` such
+ * that invoice response handling can be stateless. Also serves as payer-provided entropy while
+ * hashing in the signature calculation.
+ *
+ * This should not leak any information such as by using a simple BIP-32 derivation path.
+ * Otherwise, payments may be correlated.
+ *
+ * Errors if the offer contains unknown required features.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ */
+ public Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ request_invoice(byte[] metadata, byte[] payer_id) {
+ long ret = bindings.Offer_request_invoice(this.ptr, metadata, InternalUtils.check_arr_len(payer_id, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(metadata);
+ Reference.reachabilityFence(payer_id);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the Offer.
+ */
+ public long hash() {
+ long ret = bindings.Offer_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
/**
* Serialize the Offer object into a byte array which can be read by Offer_read
*/
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.OfferFeatures b) {
- boolean ret = bindings.OfferFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.OfferFeatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns true if this `Features` object contains required features unknown by `other`.
*/
public boolean requires_unknown_bits_from(org.ldk.structs.OfferFeatures other) {
- boolean ret = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+ boolean ret = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(other);
if (this != null) { this.ptrs_to.add(other); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An identifier for an [`Offer`] built using [`DerivedMetadata`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OfferId extends CommonBase {
+ OfferId(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.OfferId_free(ptr); }
+ }
+
+ public byte[] get_a() {
+ byte[] ret = bindings.OfferId_get_a(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ public void set_a(byte[] val) {
+ bindings.OfferId_set_a(this.ptr, InternalUtils.check_arr_len(val, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Constructs a new OfferId given each field
+ */
+ public static OfferId of(byte[] a_arg) {
+ long ret = bindings.OfferId_new(InternalUtils.check_arr_len(a_arg, 32));
+ Reference.reachabilityFence(a_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.OfferId_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the OfferId
+ */
+ public OfferId clone() {
+ long ret = bindings.OfferId_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two OfferIds contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.OfferId b) {
+ boolean ret = bindings.OfferId_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof OfferId)) return false;
+ return this.eq((OfferId)o);
+ }
+ /**
+ * Serialize the OfferId object into a byte array which can be read by OfferId_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.OfferId_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a OfferId from a byte array, created by OfferId_write
+ */
+ public static Result_OfferIdDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.OfferId_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds an [`Offer`] for the \"offer to be paid\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OfferWithDerivedMetadataBuilder extends CommonBase {
+ OfferWithDerivedMetadataBuilder(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.OfferWithDerivedMetadataBuilder_free(ptr); }
+ }
+
+ long clone_ptr() {
+ long ret = bindings.OfferWithDerivedMetadataBuilder_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the OfferWithDerivedMetadataBuilder
+ */
+ public OfferWithDerivedMetadataBuilder clone() {
+ long ret = bindings.OfferWithDerivedMetadataBuilder_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OfferWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Similar to [`OfferBuilder::new`] except, if [`OfferBuilder::path`] is called, the signing
+ * pubkey is derived from the given [`ExpandedKey`] and [`EntropySource`]. This provides
+ * recipient privacy by using a different signing pubkey for each offer. Otherwise, the
+ * provided `node_id` is used for the signing pubkey.
+ *
+ * Also, sets the metadata when [`OfferBuilder::build`] is called such that it can be used by
+ * [`InvoiceRequest::verify`] to determine if the request was produced for the offer given an
+ * [`ExpandedKey`].
+ *
+ * [`InvoiceRequest::verify`]: crate::offers::invoice_request::InvoiceRequest::verify
+ * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
+ */
+ public static OfferWithDerivedMetadataBuilder deriving_signing_pubkey(byte[] node_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source) {
+ long ret = bindings.OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(InternalUtils.check_arr_len(node_id, 33), expanded_key.ptr, entropy_source.ptr);
+ Reference.reachabilityFence(node_id);
+ Reference.reachabilityFence(expanded_key);
+ Reference.reachabilityFence(entropy_source);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OfferWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(expanded_key); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called,
+ * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported.
+ *
+ * See [`Offer::chains`] on how this relates to the payment currency.
+ *
+ * Successive calls to this method will add another chain hash.
+ */
+ public void chain(org.ldk.enums.Network network) {
+ bindings.OfferWithDerivedMetadataBuilder_chain(this.ptr, network);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(network);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void amount_msats(long amount_msats) {
+ bindings.OfferWithDerivedMetadataBuilder_amount_msats(this.ptr, amount_msats);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(amount_msats);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has
+ * already passed is valid and can be checked for using [`Offer::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void absolute_expiry(long absolute_expiry) {
+ bindings.OfferWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(absolute_expiry);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Offer::description`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void description(java.lang.String description) {
+ bindings.OfferWithDerivedMetadataBuilder_description(this.ptr, description);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(description);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Offer::issuer`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void issuer(java.lang.String issuer) {
+ bindings.OfferWithDerivedMetadataBuilder_issuer(this.ptr, issuer);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(issuer);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by
+ * private channels or if [`Offer::signing_pubkey`] is not a public node id.
+ *
+ * Successive calls to this method will add another blinded path. Caller is responsible for not
+ * adding duplicate paths.
+ */
+ public void path(org.ldk.structs.BlindedPath path) {
+ bindings.OfferWithDerivedMetadataBuilder_path(this.ptr, path.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(path);
+ if (this != null) { this.ptrs_to.add(path); };
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to
+ * [`Quantity::One`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void supported_quantity(org.ldk.structs.Quantity quantity) {
+ bindings.OfferWithDerivedMetadataBuilder_supported_quantity(this.ptr, quantity.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(quantity);
+ if (this != null) { this.ptrs_to.add(quantity); };
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Builds an [`Offer`] from the builder's settings.
+ */
+ public Result_OfferBolt12SemanticErrorZ build() {
+ long ret = bindings.OfferWithDerivedMetadataBuilder_build(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds an [`Offer`] for the \"offer to be paid\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OfferWithExplicitMetadataBuilder extends CommonBase {
+ OfferWithExplicitMetadataBuilder(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.OfferWithExplicitMetadataBuilder_free(ptr); }
+ }
+
+ long clone_ptr() {
+ long ret = bindings.OfferWithExplicitMetadataBuilder_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the OfferWithExplicitMetadataBuilder
+ */
+ public OfferWithExplicitMetadataBuilder clone() {
+ long ret = bindings.OfferWithExplicitMetadataBuilder_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OfferWithExplicitMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithExplicitMetadataBuilder(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new builder for an offer using the [`Offer::signing_pubkey`] for signing invoices.
+ * The associated secret key must be remembered while the offer is valid.
+ *
+ * Use a different pubkey per offer to avoid correlating offers.
+ *
+ * # Note
+ *
+ * If constructing an [`Offer`] for use with a [`ChannelManager`], use
+ * [`ChannelManager::create_offer_builder`] instead of [`OfferBuilder::new`].
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+ * [`ChannelManager::create_offer_builder`]: crate::ln::channelmanager::ChannelManager::create_offer_builder
+ */
+ public static OfferWithExplicitMetadataBuilder of(byte[] signing_pubkey) {
+ long ret = bindings.OfferWithExplicitMetadataBuilder_new(InternalUtils.check_arr_len(signing_pubkey, 33));
+ Reference.reachabilityFence(signing_pubkey);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OfferWithExplicitMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithExplicitMetadataBuilder(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`Offer::metadata`] to the given bytes.
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public Result_NoneBolt12SemanticErrorZ metadata(byte[] metadata) {
+ long ret = bindings.OfferWithExplicitMetadataBuilder_metadata(this.ptr, metadata);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(metadata);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called,
+ * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported.
+ *
+ * See [`Offer::chains`] on how this relates to the payment currency.
+ *
+ * Successive calls to this method will add another chain hash.
+ */
+ public void chain(org.ldk.enums.Network network) {
+ bindings.OfferWithExplicitMetadataBuilder_chain(this.ptr, network);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(network);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void amount_msats(long amount_msats) {
+ bindings.OfferWithExplicitMetadataBuilder_amount_msats(this.ptr, amount_msats);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(amount_msats);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has
+ * already passed is valid and can be checked for using [`Offer::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void absolute_expiry(long absolute_expiry) {
+ bindings.OfferWithExplicitMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(absolute_expiry);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Offer::description`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void description(java.lang.String description) {
+ bindings.OfferWithExplicitMetadataBuilder_description(this.ptr, description);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(description);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Offer::issuer`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void issuer(java.lang.String issuer) {
+ bindings.OfferWithExplicitMetadataBuilder_issuer(this.ptr, issuer);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(issuer);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by
+ * private channels or if [`Offer::signing_pubkey`] is not a public node id.
+ *
+ * Successive calls to this method will add another blinded path. Caller is responsible for not
+ * adding duplicate paths.
+ */
+ public void path(org.ldk.structs.BlindedPath path) {
+ bindings.OfferWithExplicitMetadataBuilder_path(this.ptr, path.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(path);
+ if (this != null) { this.ptrs_to.add(path); };
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to
+ * [`Quantity::One`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void supported_quantity(org.ldk.structs.Quantity quantity) {
+ bindings.OfferWithExplicitMetadataBuilder_supported_quantity(this.ptr, quantity.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(quantity);
+ if (this != null) { this.ptrs_to.add(quantity); };
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Builds an [`Offer`] from the builder's settings.
+ */
+ public Result_OfferBolt12SemanticErrorZ build() {
+ long ret = bindings.OfferWithExplicitMetadataBuilder_build(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+}
* Utility method to constructs a new InvoiceRequest-variant OffersMessage
*/
public static OffersMessage invoice_request(org.ldk.structs.InvoiceRequest a) {
- long ret = bindings.OffersMessage_invoice_request(a == null ? 0 : a.ptr);
+ long ret = bindings.OffersMessage_invoice_request(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret);
* Utility method to constructs a new Invoice-variant OffersMessage
*/
public static OffersMessage invoice(org.ldk.structs.Bolt12Invoice a) {
- long ret = bindings.OffersMessage_invoice(a == null ? 0 : a.ptr);
+ long ret = bindings.OffersMessage_invoice(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret);
* Utility method to constructs a new InvoiceError-variant OffersMessage
*/
public static OffersMessage invoice_error(org.ldk.structs.InvoiceError a) {
- long ret = bindings.OffersMessage_invoice_error(a == null ? 0 : a.ptr);
+ long ret = bindings.OffersMessage_invoice_error(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret);
if (message_hu_conv != null) { message_hu_conv.ptrs_to.add(this); };
Option_OffersMessageZ ret = arg.handle_message(message_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
return result;
}
@Override public long[] release_pending_messages() {
ThreeTuple_OffersMessageDestinationBlindedPathZ[] ret = arg.release_pending_messages();
Reference.reachabilityFence(arg);
- long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_49 -> ret_conv_49 == null ? 0 : ret_conv_49.clone_ptr()).toArray() : null;
+ long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_49 -> ret_conv_49.clone_ptr()).toArray() : null;
return result;
}
});
* The full onion packet including hop data, pubkey, and hmac
*/
public void set_onion_routing_packet(org.ldk.structs.Packet val) {
- bindings.OnionMessage_set_onion_routing_packet(this.ptr, val == null ? 0 : val.ptr);
+ bindings.OnionMessage_set_onion_routing_packet(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new OnionMessage given each field
*/
public static OnionMessage of(byte[] blinding_point_arg, org.ldk.structs.Packet onion_routing_packet_arg) {
- long ret = bindings.OnionMessage_new(InternalUtils.check_arr_len(blinding_point_arg, 33), onion_routing_packet_arg == null ? 0 : onion_routing_packet_arg.ptr);
+ long ret = bindings.OnionMessage_new(InternalUtils.check_arr_len(blinding_point_arg, 33), onion_routing_packet_arg.ptr);
Reference.reachabilityFence(blinding_point_arg);
Reference.reachabilityFence(onion_routing_packet_arg);
if (ret >= 0 && ret <= 4096) { return null; }
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.OnionMessage b) {
- boolean ret = bindings.OnionMessage_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.OnionMessage_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
@Override public long[] get_and_clear_connections_needed() {
TwoTuple_PublicKeyCVec_SocketAddressZZ[] ret = arg.get_and_clear_connections_needed();
Reference.reachabilityFence(arg);
- long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_40 -> ret_conv_40 == null ? 0 : ret_conv_40.clone_ptr()).toArray() : null;
+ long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_40 -> ret_conv_40.clone_ptr()).toArray() : null;
return result;
}
@Override public void handle_onion_message(byte[] peer_node_id, long msg) {
org.ldk.structs.Init init_hu_conv = null; if (init < 0 || init > 4096) { init_hu_conv = new org.ldk.structs.Init(null, init); }
Result_NoneNoneZ ret = arg.peer_connected(their_node_id, init_hu_conv, inbound);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public void peer_disconnected(byte[] their_node_id) {
@Override public long provided_node_features() {
NodeFeatures ret = arg.provided_node_features();
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long provided_init_features(byte[] their_node_id) {
InitFeatures ret = arg.provided_init_features(their_node_id);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
});
* Handle an incoming `onion_message` message from the given peer.
*/
public void handle_onion_message(byte[] peer_node_id, org.ldk.structs.OnionMessage msg) {
- bindings.OnionMessageHandler_handle_onion_message(this.ptr, InternalUtils.check_arr_len(peer_node_id, 33), msg == null ? 0 : msg.ptr);
+ bindings.OnionMessageHandler_handle_onion_message(this.ptr, InternalUtils.check_arr_len(peer_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(peer_node_id);
Reference.reachabilityFence(msg);
* message handlers may still wish to communicate with this peer.
*/
public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init init, boolean inbound) {
- long ret = bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr, inbound);
+ long ret = bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init.ptr, inbound);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(init);
/**
* Returns the first node in the path.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public byte[] first_node() {
byte[] ret = bindings.OnionMessagePath_first_node(this.ptr);
Reference.reachabilityFence(this);
* # use bitcoin::hashes::_export::_core::time::Duration;
* # use bitcoin::hashes::hex::FromHex;
* # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey, self};
- * # use lightning::blinded_path::BlindedPath;
+ * # use lightning::blinded_path::{BlindedPath, EmptyNodeIdLookUp};
* # use lightning::sign::{EntropySource, KeysManager};
* # use lightning::ln::peer_handler::IgnoringMessageHandler;
* # use lightning::onion_message::messenger::{Destination, MessageRouter, OnionMessagePath, OnionMessenger};
* # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret);
* # let (hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1);
* # let destination_node_id = hop_node_id1;
+ * # let node_id_lookup = EmptyNodeIdLookUp {};
* # let message_router = Arc::new(FakeMessageRouter {});
* # let custom_message_handler = IgnoringMessageHandler {};
* # let offers_message_handler = IgnoringMessageHandler {};
* Create the onion messenger. This must use the same `keys_manager` as is passed to your
* ChannelManager.
* let onion_messenger = OnionMessenger::new(
- * &keys_manager, &keys_manager, logger, message_router, &offers_message_handler,
- * &custom_message_handler
+ * &keys_manager, &keys_manager, logger, &node_id_lookup, message_router,
+ * &offers_message_handler, &custom_message_handler
* );
*
* # #[derive(Debug, Clone)]
* Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to
* their respective handlers.
*/
- public static OnionMessenger of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.MessageRouter message_router, org.ldk.structs.OffersMessageHandler offers_handler, org.ldk.structs.CustomOnionMessageHandler custom_handler) {
- long ret = bindings.OnionMessenger_new(entropy_source.ptr, node_signer.ptr, logger.ptr, message_router.ptr, offers_handler.ptr, custom_handler.ptr);
+ public static OnionMessenger of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.MessageRouter message_router, org.ldk.structs.OffersMessageHandler offers_handler, org.ldk.structs.CustomOnionMessageHandler custom_handler) {
+ long ret = bindings.OnionMessenger_new(entropy_source.ptr, node_signer.ptr, logger.ptr, node_id_lookup.ptr, message_router.ptr, offers_handler.ptr, custom_handler.ptr);
Reference.reachabilityFence(entropy_source);
Reference.reachabilityFence(node_signer);
Reference.reachabilityFence(logger);
+ Reference.reachabilityFence(node_id_lookup);
Reference.reachabilityFence(message_router);
Reference.reachabilityFence(offers_handler);
Reference.reachabilityFence(custom_handler);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(message_router); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(offers_handler); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(custom_handler); };
* like.
*/
public void set_public_key(org.ldk.structs.Result_PublicKeySecp256k1ErrorZ val) {
- bindings.OnionPacket_set_public_key(this.ptr, val != null ? val.ptr : 0);
+ bindings.OnionPacket_set_public_key(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.OnionPacket b) {
- boolean ret = bindings.OnionPacket_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.OnionPacket_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
}
/**
- * The genesis hash of the blockchain where the channel is to be opened
+ * Common fields of `open_channel(2)`-like messages
*/
- public byte[] get_chain_hash() {
- byte[] ret = bindings.OpenChannel_get_chain_hash(this.ptr);
+ public CommonOpenChannelFields get_common_fields() {
+ long ret = bindings.OpenChannel_get_common_fields(this.ptr);
Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The genesis hash of the blockchain where the channel is to be opened
- */
- public void set_chain_hash(byte[] val) {
- bindings.OpenChannel_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * A temporary channel ID, until the funding outpoint is announced
- */
- public byte[] get_temporary_channel_id() {
- byte[] ret = bindings.OpenChannel_get_temporary_channel_id(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * A temporary channel ID, until the funding outpoint is announced
- */
- public void set_temporary_channel_id(byte[] val) {
- bindings.OpenChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The channel value
- */
- public long get_funding_satoshis() {
- long ret = bindings.OpenChannel_get_funding_satoshis(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
- * The channel value
+ * Common fields of `open_channel(2)`-like messages
*/
- public void set_funding_satoshis(long val) {
- bindings.OpenChannel_set_funding_satoshis(this.ptr, val);
+ public void set_common_fields(org.ldk.structs.CommonOpenChannelFields val) {
+ bindings.OpenChannel_set_common_fields(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
Reference.reachabilityFence(val);
}
- /**
- * The threshold below which outputs on transactions broadcast by sender will be omitted
- */
- public long get_dust_limit_satoshis() {
- long ret = bindings.OpenChannel_get_dust_limit_satoshis(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The threshold below which outputs on transactions broadcast by sender will be omitted
- */
- public void set_dust_limit_satoshis(long val) {
- bindings.OpenChannel_set_dust_limit_satoshis(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
- */
- public long get_max_htlc_value_in_flight_msat() {
- long ret = bindings.OpenChannel_get_max_htlc_value_in_flight_msat(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
- */
- public void set_max_htlc_value_in_flight_msat(long val) {
- bindings.OpenChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
/**
* The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
*/
Reference.reachabilityFence(val);
}
- /**
- * The minimum HTLC size incoming to sender, in milli-satoshi
- */
- public long get_htlc_minimum_msat() {
- long ret = bindings.OpenChannel_get_htlc_minimum_msat(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The minimum HTLC size incoming to sender, in milli-satoshi
- */
- public void set_htlc_minimum_msat(long val) {
- bindings.OpenChannel_set_htlc_minimum_msat(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The feerate per 1000-weight of sender generated transactions, until updated by
- * [`UpdateFee`]
- */
- public int get_feerate_per_kw() {
- int ret = bindings.OpenChannel_get_feerate_per_kw(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The feerate per 1000-weight of sender generated transactions, until updated by
- * [`UpdateFee`]
- */
- public void set_feerate_per_kw(int val) {
- bindings.OpenChannel_set_feerate_per_kw(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if
- * they broadcast a commitment transaction
- */
- public short get_to_self_delay() {
- short ret = bindings.OpenChannel_get_to_self_delay(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if
- * they broadcast a commitment transaction
- */
- public void set_to_self_delay(short val) {
- bindings.OpenChannel_set_to_self_delay(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The maximum number of inbound HTLCs towards sender
- */
- public short get_max_accepted_htlcs() {
- short ret = bindings.OpenChannel_get_max_accepted_htlcs(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The maximum number of inbound HTLCs towards sender
- */
- public void set_max_accepted_htlcs(short val) {
- bindings.OpenChannel_set_max_accepted_htlcs(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The sender's key controlling the funding transaction
- */
- public byte[] get_funding_pubkey() {
- byte[] ret = bindings.OpenChannel_get_funding_pubkey(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The sender's key controlling the funding transaction
- */
- public void set_funding_pubkey(byte[] val) {
- bindings.OpenChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
- public byte[] get_revocation_basepoint() {
- byte[] ret = bindings.OpenChannel_get_revocation_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
- public void set_revocation_basepoint(byte[] val) {
- bindings.OpenChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * A payment key to sender for transactions broadcast by counterparty
- */
- public byte[] get_payment_point() {
- byte[] ret = bindings.OpenChannel_get_payment_point(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * A payment key to sender for transactions broadcast by counterparty
- */
- public void set_payment_point(byte[] val) {
- bindings.OpenChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive a payment key to sender for transactions broadcast by sender
- */
- public byte[] get_delayed_payment_basepoint() {
- byte[] ret = bindings.OpenChannel_get_delayed_payment_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive a payment key to sender for transactions broadcast by sender
- */
- public void set_delayed_payment_basepoint(byte[] val) {
- bindings.OpenChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive an HTLC payment key to sender
- */
- public byte[] get_htlc_basepoint() {
- byte[] ret = bindings.OpenChannel_get_htlc_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive an HTLC payment key to sender
- */
- public void set_htlc_basepoint(byte[] val) {
- bindings.OpenChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The first to-be-broadcast-by-sender transaction's per commitment point
- */
- public byte[] get_first_per_commitment_point() {
- byte[] ret = bindings.OpenChannel_get_first_per_commitment_point(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The first to-be-broadcast-by-sender transaction's per commitment point
- */
- public void set_first_per_commitment_point(byte[] val) {
- bindings.OpenChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The channel flags to be used
- */
- public byte get_channel_flags() {
- byte ret = bindings.OpenChannel_get_channel_flags(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The channel flags to be used
- */
- public void set_channel_flags(byte val) {
- bindings.OpenChannel_set_channel_flags(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close
- */
- public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
- long ret = bindings.OpenChannel_get_shutdown_scriptpubkey(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close
- */
- public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
- bindings.OpenChannel_set_shutdown_scriptpubkey(this.ptr, val.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
- }
-
- /**
- * The channel type that this channel will represent
- *
- * If this is `None`, we derive the channel type from the intersection of our
- * feature bits with our counterparty's feature bits from the [`Init`] message.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- @Nullable
- public ChannelTypeFeatures get_channel_type() {
- long ret = bindings.OpenChannel_get_channel_type(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * The channel type that this channel will represent
- *
- * If this is `None`, we derive the channel type from the intersection of our
- * feature bits with our counterparty's feature bits from the [`Init`] message.
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
- bindings.OpenChannel_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
- }
-
/**
* Constructs a new OpenChannel given each field
- *
- * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static OpenChannel of(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, long funding_satoshis_arg, long push_msat_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int feerate_per_kw_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) {
- long ret = bindings.OpenChannel_new(InternalUtils.check_arr_len(chain_hash_arg, 32), InternalUtils.check_arr_len(temporary_channel_id_arg, 32), funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_point_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr);
- Reference.reachabilityFence(chain_hash_arg);
- Reference.reachabilityFence(temporary_channel_id_arg);
- Reference.reachabilityFence(funding_satoshis_arg);
+ public static OpenChannel of(org.ldk.structs.CommonOpenChannelFields common_fields_arg, long push_msat_arg, long channel_reserve_satoshis_arg) {
+ long ret = bindings.OpenChannel_new(common_fields_arg.ptr, push_msat_arg, channel_reserve_satoshis_arg);
+ Reference.reachabilityFence(common_fields_arg);
Reference.reachabilityFence(push_msat_arg);
- Reference.reachabilityFence(dust_limit_satoshis_arg);
- Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
Reference.reachabilityFence(channel_reserve_satoshis_arg);
- Reference.reachabilityFence(htlc_minimum_msat_arg);
- Reference.reachabilityFence(feerate_per_kw_arg);
- Reference.reachabilityFence(to_self_delay_arg);
- Reference.reachabilityFence(max_accepted_htlcs_arg);
- Reference.reachabilityFence(funding_pubkey_arg);
- Reference.reachabilityFence(revocation_basepoint_arg);
- Reference.reachabilityFence(payment_point_arg);
- Reference.reachabilityFence(delayed_payment_basepoint_arg);
- Reference.reachabilityFence(htlc_basepoint_arg);
- Reference.reachabilityFence(first_per_commitment_point_arg);
- Reference.reachabilityFence(channel_flags_arg);
- Reference.reachabilityFence(shutdown_scriptpubkey_arg);
- Reference.reachabilityFence(channel_type_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.OpenChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OpenChannel(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.OpenChannel b) {
- boolean ret = bindings.OpenChannel_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.OpenChannel_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
}
/**
- * The genesis hash of the blockchain where the channel is to be opened
+ * Common fields of `open_channel(2)`-like messages
*/
- public byte[] get_chain_hash() {
- byte[] ret = bindings.OpenChannelV2_get_chain_hash(this.ptr);
+ public CommonOpenChannelFields get_common_fields() {
+ long ret = bindings.OpenChannelV2_get_common_fields(this.ptr);
Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The genesis hash of the blockchain where the channel is to be opened
- */
- public void set_chain_hash(byte[] val) {
- bindings.OpenChannelV2_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint
- */
- public byte[] get_temporary_channel_id() {
- byte[] ret = bindings.OpenChannelV2_get_temporary_channel_id(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
- * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint
+ * Common fields of `open_channel(2)`-like messages
*/
- public void set_temporary_channel_id(byte[] val) {
- bindings.OpenChannelV2_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_common_fields(org.ldk.structs.CommonOpenChannelFields val) {
+ bindings.OpenChannelV2_set_common_fields(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
Reference.reachabilityFence(val);
}
- /**
- * The feerate for the commitment transaction set by the channel initiator
- */
- public int get_commitment_feerate_sat_per_1000_weight() {
- int ret = bindings.OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The feerate for the commitment transaction set by the channel initiator
- */
- public void set_commitment_feerate_sat_per_1000_weight(int val) {
- bindings.OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Part of the channel value contributed by the channel initiator
- */
- public long get_funding_satoshis() {
- long ret = bindings.OpenChannelV2_get_funding_satoshis(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Part of the channel value contributed by the channel initiator
- */
- public void set_funding_satoshis(long val) {
- bindings.OpenChannelV2_set_funding_satoshis(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The threshold below which outputs on transactions broadcast by the channel initiator will be
- * omitted
- */
- public long get_dust_limit_satoshis() {
- long ret = bindings.OpenChannelV2_get_dust_limit_satoshis(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The threshold below which outputs on transactions broadcast by the channel initiator will be
- * omitted
- */
- public void set_dust_limit_satoshis(long val) {
- bindings.OpenChannelV2_set_dust_limit_satoshis(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
- */
- public long get_max_htlc_value_in_flight_msat() {
- long ret = bindings.OpenChannelV2_get_max_htlc_value_in_flight_msat(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
- */
- public void set_max_htlc_value_in_flight_msat(long val) {
- bindings.OpenChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The minimum HTLC size incoming to channel initiator, in milli-satoshi
- */
- public long get_htlc_minimum_msat() {
- long ret = bindings.OpenChannelV2_get_htlc_minimum_msat(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The minimum HTLC size incoming to channel initiator, in milli-satoshi
- */
- public void set_htlc_minimum_msat(long val) {
- bindings.OpenChannelV2_set_htlc_minimum_msat(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
- * broadcast a commitment transaction
- */
- public short get_to_self_delay() {
- short ret = bindings.OpenChannelV2_get_to_self_delay(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
- * broadcast a commitment transaction
- */
- public void set_to_self_delay(short val) {
- bindings.OpenChannelV2_set_to_self_delay(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The maximum number of inbound HTLCs towards channel initiator
- */
- public short get_max_accepted_htlcs() {
- short ret = bindings.OpenChannelV2_get_max_accepted_htlcs(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The maximum number of inbound HTLCs towards channel initiator
- */
- public void set_max_accepted_htlcs(short val) {
- bindings.OpenChannelV2_set_max_accepted_htlcs(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
/**
* The locktime for the funding transaction
*/
Reference.reachabilityFence(val);
}
- /**
- * The channel initiator's key controlling the funding transaction
- */
- public byte[] get_funding_pubkey() {
- byte[] ret = bindings.OpenChannelV2_get_funding_pubkey(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The channel initiator's key controlling the funding transaction
- */
- public void set_funding_pubkey(byte[] val) {
- bindings.OpenChannelV2_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
- public byte[] get_revocation_basepoint() {
- byte[] ret = bindings.OpenChannelV2_get_revocation_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
- public void set_revocation_basepoint(byte[] val) {
- bindings.OpenChannelV2_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * A payment key to channel initiator for transactions broadcast by counterparty
- */
- public byte[] get_payment_basepoint() {
- byte[] ret = bindings.OpenChannelV2_get_payment_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * A payment key to channel initiator for transactions broadcast by counterparty
- */
- public void set_payment_basepoint(byte[] val) {
- bindings.OpenChannelV2_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive a payment key to channel initiator for transactions broadcast by channel
- * initiator
- */
- public byte[] get_delayed_payment_basepoint() {
- byte[] ret = bindings.OpenChannelV2_get_delayed_payment_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive a payment key to channel initiator for transactions broadcast by channel
- * initiator
- */
- public void set_delayed_payment_basepoint(byte[] val) {
- bindings.OpenChannelV2_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Used to derive an HTLC payment key to channel initiator
- */
- public byte[] get_htlc_basepoint() {
- byte[] ret = bindings.OpenChannelV2_get_htlc_basepoint(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Used to derive an HTLC payment key to channel initiator
- */
- public void set_htlc_basepoint(byte[] val) {
- bindings.OpenChannelV2_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
- */
- public byte[] get_first_per_commitment_point() {
- byte[] ret = bindings.OpenChannelV2_get_first_per_commitment_point(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
- */
- public void set_first_per_commitment_point(byte[] val) {
- bindings.OpenChannelV2_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
/**
* The second to-be-broadcast-by-channel-initiator transaction's per commitment point
*/
Reference.reachabilityFence(val);
}
- /**
- * Channel flags
- */
- public byte get_channel_flags() {
- byte ret = bindings.OpenChannelV2_get_channel_flags(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Channel flags
- */
- public void set_channel_flags(byte val) {
- bindings.OpenChannelV2_set_channel_flags(this.ptr, val);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- }
-
- /**
- * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
- * collaboratively close
- */
- public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
- long ret = bindings.OpenChannelV2_get_shutdown_scriptpubkey(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
- * collaboratively close
- */
- public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
- bindings.OpenChannelV2_set_shutdown_scriptpubkey(this.ptr, val.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
- }
-
- /**
- * The channel type that this channel will represent. If none is set, we derive the channel
- * type from the intersection of our feature bits with our counterparty's feature bits from
- * the Init message.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- @Nullable
- public ChannelTypeFeatures get_channel_type() {
- long ret = bindings.OpenChannelV2_get_channel_type(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * The channel type that this channel will represent. If none is set, we derive the channel
- * type from the intersection of our feature bits with our counterparty's feature bits from
- * the Init message.
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
- bindings.OpenChannelV2_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(val);
- if (this != null) { this.ptrs_to.add(val); };
- }
-
/**
* Optionally, a requirement that only confirmed inputs can be added
*/
/**
* Constructs a new OpenChannelV2 given each field
- *
- * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static OpenChannelV2 of(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, int funding_feerate_sat_per_1000_weight_arg, int commitment_feerate_sat_per_1000_weight_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, int locktime_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) {
- long ret = bindings.OpenChannelV2_new(InternalUtils.check_arr_len(chain_hash_arg, 32), InternalUtils.check_arr_len(temporary_channel_id_arg, 32), funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, require_confirmed_inputs_arg);
- Reference.reachabilityFence(chain_hash_arg);
- Reference.reachabilityFence(temporary_channel_id_arg);
+ public static OpenChannelV2 of(org.ldk.structs.CommonOpenChannelFields common_fields_arg, int funding_feerate_sat_per_1000_weight_arg, int locktime_arg, byte[] second_per_commitment_point_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) {
+ long ret = bindings.OpenChannelV2_new(common_fields_arg.ptr, funding_feerate_sat_per_1000_weight_arg, locktime_arg, InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), require_confirmed_inputs_arg);
+ Reference.reachabilityFence(common_fields_arg);
Reference.reachabilityFence(funding_feerate_sat_per_1000_weight_arg);
- Reference.reachabilityFence(commitment_feerate_sat_per_1000_weight_arg);
- Reference.reachabilityFence(funding_satoshis_arg);
- Reference.reachabilityFence(dust_limit_satoshis_arg);
- Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
- Reference.reachabilityFence(htlc_minimum_msat_arg);
- Reference.reachabilityFence(to_self_delay_arg);
- Reference.reachabilityFence(max_accepted_htlcs_arg);
Reference.reachabilityFence(locktime_arg);
- Reference.reachabilityFence(funding_pubkey_arg);
- Reference.reachabilityFence(revocation_basepoint_arg);
- Reference.reachabilityFence(payment_basepoint_arg);
- Reference.reachabilityFence(delayed_payment_basepoint_arg);
- Reference.reachabilityFence(htlc_basepoint_arg);
- Reference.reachabilityFence(first_per_commitment_point_arg);
Reference.reachabilityFence(second_per_commitment_point_arg);
- Reference.reachabilityFence(channel_flags_arg);
- Reference.reachabilityFence(shutdown_scriptpubkey_arg);
- Reference.reachabilityFence(channel_type_arg);
Reference.reachabilityFence(require_confirmed_inputs_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.OpenChannelV2 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OpenChannelV2(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.OpenChannelV2 b) {
- boolean ret = bindings.OpenChannelV2_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.OpenChannelV2_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An enum which can either contain a crate::lightning::offers::offer::Amount or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_AmountZ extends CommonBase {
+ private Option_AmountZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.COption_AmountZ_free(ptr); }
+ }
+ static Option_AmountZ constr_from_ptr(long ptr) {
+ bindings.LDKCOption_AmountZ raw_val = bindings.LDKCOption_AmountZ_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKCOption_AmountZ.Some.class) {
+ return new Some(ptr, (bindings.LDKCOption_AmountZ.Some)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKCOption_AmountZ.None.class) {
+ return new None(ptr, (bindings.LDKCOption_AmountZ.None)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * When we're in this state, this COption_AmountZ contains a crate::lightning::offers::offer::Amount
+ */
+ public final static class Some extends Option_AmountZ {
+ public final org.ldk.structs.Amount some;
+ private Some(long ptr, bindings.LDKCOption_AmountZ.Some obj) {
+ super(null, ptr);
+ long some = obj.some;
+ org.ldk.structs.Amount some_hu_conv = org.ldk.structs.Amount.constr_from_ptr(some);
+ if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); };
+ this.some = some_hu_conv;
+ }
+ }
+ /**
+ * When we're in this state, this COption_AmountZ contains nothing
+ */
+ public final static class None extends Option_AmountZ {
+ private None(long ptr, bindings.LDKCOption_AmountZ.None obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * Constructs a new COption_AmountZ containing a crate::lightning::offers::offer::Amount
+ */
+ public static Option_AmountZ some(org.ldk.structs.Amount o) {
+ long ret = bindings.COption_AmountZ_some(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_AmountZ containing nothing
+ */
+ public static Option_AmountZ none() {
+ long ret = bindings.COption_AmountZ_none();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.COption_AmountZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new COption_AmountZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_AmountZ clone() {
+ long ret = bindings.COption_AmountZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+}
/**
* Constructs a new COption_BigEndianScalarZ containing a crate::c_types::BigEndianScalar
*/
- public static Option_BigEndianScalarZ some(byte[] o_big_endian_bytes) {
- long ret = bindings.COption_BigEndianScalarZ_some(bindings.BigEndianScalar_new(InternalUtils.check_arr_len(o_big_endian_bytes, 32)));
- Reference.reachabilityFence(o_big_endian_bytes);
+ public static Option_BigEndianScalarZ some(org.ldk.structs.BigEndianScalar o) {
+ long ret = bindings.COption_BigEndianScalarZ_some(o.ptr);
+ Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Option_BigEndianScalarZ ret_hu_conv = org.ldk.structs.Option_BigEndianScalarZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- ;
return ret_hu_conv;
}
* Constructs a new COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ containing a crate::c_types::derived::C2Tuple__u1632_u1632Z
*/
public static Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ some(org.ldk.structs.TwoTuple__u1632_u1632Z o) {
- long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o != null ? o.ptr : 0);
+ long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.constr_from_ptr(ret);
* Constructs a new COption_C2Tuple_u64u16ZZ containing a crate::c_types::derived::C2Tuple_u64u16Z
*/
public static Option_C2Tuple_u64u16ZZ some(org.ldk.structs.TwoTuple_u64u16Z o) {
- long ret = bindings.COption_C2Tuple_u64u16ZZ_some(o != null ? o.ptr : 0);
+ long ret = bindings.COption_C2Tuple_u64u16ZZ_some(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Option_C2Tuple_u64u16ZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_u64u16ZZ.constr_from_ptr(ret);
* Constructs a new COption_C2Tuple_u64u64ZZ containing a crate::c_types::derived::C2Tuple_u64u64Z
*/
public static Option_C2Tuple_u64u64ZZ some(org.ldk.structs.TwoTuple_u64u64Z o) {
- long ret = bindings.COption_C2Tuple_u64u64ZZ_some(o != null ? o.ptr : 0);
+ long ret = bindings.COption_C2Tuple_u64u64ZZ_some(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Option_C2Tuple_u64u64ZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_u64u64ZZ.constr_from_ptr(ret);
* Constructs a new COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ containing a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ
*/
public static Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ some(org.ldk.structs.ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ o) {
- long ret = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(o != null ? o.ptr : 0);
+ long ret = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_hu_conv = org.ldk.structs.Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An enum which can either contain a crate::c_types::ECDSASignature or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_ECDSASignatureZ extends CommonBase {
+ private Option_ECDSASignatureZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.COption_ECDSASignatureZ_free(ptr); }
+ }
+ static Option_ECDSASignatureZ constr_from_ptr(long ptr) {
+ bindings.LDKCOption_ECDSASignatureZ raw_val = bindings.LDKCOption_ECDSASignatureZ_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKCOption_ECDSASignatureZ.Some.class) {
+ return new Some(ptr, (bindings.LDKCOption_ECDSASignatureZ.Some)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKCOption_ECDSASignatureZ.None.class) {
+ return new None(ptr, (bindings.LDKCOption_ECDSASignatureZ.None)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * When we're in this state, this COption_ECDSASignatureZ contains a crate::c_types::ECDSASignature
+ */
+ public final static class Some extends Option_ECDSASignatureZ {
+ public final byte[] some;
+ private Some(long ptr, bindings.LDKCOption_ECDSASignatureZ.Some obj) {
+ super(null, ptr);
+ this.some = obj.some;
+ }
+ }
+ /**
+ * When we're in this state, this COption_ECDSASignatureZ contains nothing
+ */
+ public final static class None extends Option_ECDSASignatureZ {
+ private None(long ptr, bindings.LDKCOption_ECDSASignatureZ.None obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * Constructs a new COption_ECDSASignatureZ containing a crate::c_types::ECDSASignature
+ */
+ public static Option_ECDSASignatureZ some(byte[] o) {
+ long ret = bindings.COption_ECDSASignatureZ_some(InternalUtils.check_arr_len(o, 64));
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_ECDSASignatureZ containing nothing
+ */
+ public static Option_ECDSASignatureZ none() {
+ long ret = bindings.COption_ECDSASignatureZ_none();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.COption_ECDSASignatureZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new COption_ECDSASignatureZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_ECDSASignatureZ clone() {
+ long ret = bindings.COption_ECDSASignatureZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An enum which can either contain a crate::lightning::blinded_path::payment::PaymentContext or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_PaymentContextZ extends CommonBase {
+ private Option_PaymentContextZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.COption_PaymentContextZ_free(ptr); }
+ }
+ static Option_PaymentContextZ constr_from_ptr(long ptr) {
+ bindings.LDKCOption_PaymentContextZ raw_val = bindings.LDKCOption_PaymentContextZ_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKCOption_PaymentContextZ.Some.class) {
+ return new Some(ptr, (bindings.LDKCOption_PaymentContextZ.Some)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKCOption_PaymentContextZ.None.class) {
+ return new None(ptr, (bindings.LDKCOption_PaymentContextZ.None)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * When we're in this state, this COption_PaymentContextZ contains a crate::lightning::blinded_path::payment::PaymentContext
+ */
+ public final static class Some extends Option_PaymentContextZ {
+ public final org.ldk.structs.PaymentContext some;
+ private Some(long ptr, bindings.LDKCOption_PaymentContextZ.Some obj) {
+ super(null, ptr);
+ long some = obj.some;
+ org.ldk.structs.PaymentContext some_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(some);
+ if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); };
+ this.some = some_hu_conv;
+ }
+ }
+ /**
+ * When we're in this state, this COption_PaymentContextZ contains nothing
+ */
+ public final static class None extends Option_PaymentContextZ {
+ private None(long ptr, bindings.LDKCOption_PaymentContextZ.None obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * Constructs a new COption_PaymentContextZ containing a crate::lightning::blinded_path::payment::PaymentContext
+ */
+ public static Option_PaymentContextZ some(org.ldk.structs.PaymentContext o) {
+ long ret = bindings.COption_PaymentContextZ_some(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_PaymentContextZ containing nothing
+ */
+ public static Option_PaymentContextZ none() {
+ long ret = bindings.COption_PaymentContextZ_none();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.COption_PaymentContextZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new COption_PaymentContextZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_PaymentContextZ clone() {
+ long ret = bindings.COption_PaymentContextZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An enum which can either contain a crate::lightning::offers::offer::Quantity or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_QuantityZ extends CommonBase {
+ private Option_QuantityZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.COption_QuantityZ_free(ptr); }
+ }
+ static Option_QuantityZ constr_from_ptr(long ptr) {
+ bindings.LDKCOption_QuantityZ raw_val = bindings.LDKCOption_QuantityZ_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKCOption_QuantityZ.Some.class) {
+ return new Some(ptr, (bindings.LDKCOption_QuantityZ.Some)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKCOption_QuantityZ.None.class) {
+ return new None(ptr, (bindings.LDKCOption_QuantityZ.None)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * When we're in this state, this COption_QuantityZ contains a crate::lightning::offers::offer::Quantity
+ */
+ public final static class Some extends Option_QuantityZ {
+ public final org.ldk.structs.Quantity some;
+ private Some(long ptr, bindings.LDKCOption_QuantityZ.Some obj) {
+ super(null, ptr);
+ long some = obj.some;
+ org.ldk.structs.Quantity some_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(some);
+ if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); };
+ this.some = some_hu_conv;
+ }
+ }
+ /**
+ * When we're in this state, this COption_QuantityZ contains nothing
+ */
+ public final static class None extends Option_QuantityZ {
+ private None(long ptr, bindings.LDKCOption_QuantityZ.None obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * Constructs a new COption_QuantityZ containing a crate::lightning::offers::offer::Quantity
+ */
+ public static Option_QuantityZ some(org.ldk.structs.Quantity o) {
+ long ret = bindings.COption_QuantityZ_some(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_QuantityZ containing nothing
+ */
+ public static Option_QuantityZ none() {
+ long ret = bindings.COption_QuantityZ_none();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.COption_QuantityZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new COption_QuantityZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_QuantityZ clone() {
+ long ret = bindings.COption_QuantityZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.OutPoint b) {
- boolean ret = bindings.OutPoint_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.OutPoint_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
@Override public int hashCode() {
return (int)this.hash();
}
- /**
- * Convert an `OutPoint` to a lightning channel id.
- */
- public byte[] to_channel_id() {
- byte[] ret = bindings.OutPoint_to_channel_id(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
/**
* Serialize the OutPoint object into a byte array which can be read by OutPoint_read
*/
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The current status of the output spend.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OutputSpendStatus extends CommonBase {
+ private OutputSpendStatus(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.OutputSpendStatus_free(ptr); }
+ }
+ static OutputSpendStatus constr_from_ptr(long ptr) {
+ bindings.LDKOutputSpendStatus raw_val = bindings.LDKOutputSpendStatus_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKOutputSpendStatus.PendingInitialBroadcast.class) {
+ return new PendingInitialBroadcast(ptr, (bindings.LDKOutputSpendStatus.PendingInitialBroadcast)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKOutputSpendStatus.PendingFirstConfirmation.class) {
+ return new PendingFirstConfirmation(ptr, (bindings.LDKOutputSpendStatus.PendingFirstConfirmation)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKOutputSpendStatus.PendingThresholdConfirmations.class) {
+ return new PendingThresholdConfirmations(ptr, (bindings.LDKOutputSpendStatus.PendingThresholdConfirmations)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * The output is tracked but an initial spending transaction hasn't been generated and
+ * broadcasted yet.
+ */
+ public final static class PendingInitialBroadcast extends OutputSpendStatus {
+ /**
+ * The height at which we will first generate and broadcast a spending transaction.
+ */
+ public final org.ldk.structs.Option_u32Z delayed_until_height;
+ private PendingInitialBroadcast(long ptr, bindings.LDKOutputSpendStatus.PendingInitialBroadcast obj) {
+ super(null, ptr);
+ long delayed_until_height = obj.delayed_until_height;
+ org.ldk.structs.Option_u32Z delayed_until_height_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(delayed_until_height);
+ if (delayed_until_height_hu_conv != null) { delayed_until_height_hu_conv.ptrs_to.add(this); };
+ this.delayed_until_height = delayed_until_height_hu_conv;
+ }
+ }
+ /**
+ * A transaction spending the output has been broadcasted but is pending its first confirmation on-chain.
+ */
+ public final static class PendingFirstConfirmation extends OutputSpendStatus {
+ /**
+ * The hash of the chain tip when we first broadcast a transaction spending this output.
+ */
+ public final byte[] first_broadcast_hash;
+ /**
+ * The best height when we last broadcast a transaction spending this output.
+ */
+ public final int latest_broadcast_height;
+ /**
+ * The transaction spending this output we last broadcasted.
+ */
+ public final byte[] latest_spending_tx;
+ private PendingFirstConfirmation(long ptr, bindings.LDKOutputSpendStatus.PendingFirstConfirmation obj) {
+ super(null, ptr);
+ this.first_broadcast_hash = obj.first_broadcast_hash;
+ this.latest_broadcast_height = obj.latest_broadcast_height;
+ this.latest_spending_tx = obj.latest_spending_tx;
+ }
+ }
+ /**
+ * A transaction spending the output has been confirmed on-chain but will be tracked until it
+ * reaches [`ANTI_REORG_DELAY`] confirmations.
+ */
+ public final static class PendingThresholdConfirmations extends OutputSpendStatus {
+ /**
+ * The hash of the chain tip when we first broadcast a transaction spending this output.
+ */
+ public final byte[] first_broadcast_hash;
+ /**
+ * The best height when we last broadcast a transaction spending this output.
+ */
+ public final int latest_broadcast_height;
+ /**
+ * The transaction spending this output we saw confirmed on-chain.
+ */
+ public final byte[] latest_spending_tx;
+ /**
+ * The height at which the spending transaction was confirmed.
+ */
+ public final int confirmation_height;
+ /**
+ * The hash of the block in which the spending transaction was confirmed.
+ */
+ public final byte[] confirmation_hash;
+ private PendingThresholdConfirmations(long ptr, bindings.LDKOutputSpendStatus.PendingThresholdConfirmations obj) {
+ super(null, ptr);
+ this.first_broadcast_hash = obj.first_broadcast_hash;
+ this.latest_broadcast_height = obj.latest_broadcast_height;
+ this.latest_spending_tx = obj.latest_spending_tx;
+ this.confirmation_height = obj.confirmation_height;
+ this.confirmation_hash = obj.confirmation_hash;
+ }
+ }
+ long clone_ptr() {
+ long ret = bindings.OutputSpendStatus_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the OutputSpendStatus
+ */
+ public OutputSpendStatus clone() {
+ long ret = bindings.OutputSpendStatus_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new PendingInitialBroadcast-variant OutputSpendStatus
+ */
+ public static OutputSpendStatus pending_initial_broadcast(org.ldk.structs.Option_u32Z delayed_until_height) {
+ long ret = bindings.OutputSpendStatus_pending_initial_broadcast(delayed_until_height.ptr);
+ Reference.reachabilityFence(delayed_until_height);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(delayed_until_height); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new PendingFirstConfirmation-variant OutputSpendStatus
+ */
+ public static OutputSpendStatus pending_first_confirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx) {
+ long ret = bindings.OutputSpendStatus_pending_first_confirmation(InternalUtils.check_arr_len(first_broadcast_hash, 32), latest_broadcast_height, latest_spending_tx);
+ Reference.reachabilityFence(first_broadcast_hash);
+ Reference.reachabilityFence(latest_broadcast_height);
+ Reference.reachabilityFence(latest_spending_tx);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new PendingThresholdConfirmations-variant OutputSpendStatus
+ */
+ public static OutputSpendStatus pending_threshold_confirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash) {
+ long ret = bindings.OutputSpendStatus_pending_threshold_confirmations(InternalUtils.check_arr_len(first_broadcast_hash, 32), latest_broadcast_height, latest_spending_tx, confirmation_height, InternalUtils.check_arr_len(confirmation_hash, 32));
+ Reference.reachabilityFence(first_broadcast_hash);
+ Reference.reachabilityFence(latest_broadcast_height);
+ Reference.reachabilityFence(latest_spending_tx);
+ Reference.reachabilityFence(confirmation_height);
+ Reference.reachabilityFence(confirmation_hash);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two OutputSpendStatuss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public boolean eq(org.ldk.structs.OutputSpendStatus b) {
+ boolean ret = bindings.OutputSpendStatus_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof OutputSpendStatus)) return false;
+ return this.eq((OutputSpendStatus)o);
+ }
+ /**
+ * Serialize the OutputSpendStatus object into a byte array which can be read by OutputSpendStatus_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.OutputSpendStatus_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a OutputSpendStatus from a byte array, created by OutputSpendStatus_write
+ */
+ public static Result_OutputSpendStatusDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.OutputSpendStatus_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * A trait that describes a wallet capable of creating a spending [`Transaction`] from a set of
+ * [`SpendableOutputDescriptor`]s.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OutputSpender extends CommonBase {
+ final bindings.LDKOutputSpender bindings_instance;
+ OutputSpender(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+ private OutputSpender(bindings.LDKOutputSpender arg) {
+ super(bindings.LDKOutputSpender_new(arg));
+ this.ptrs_to.add(arg);
+ this.bindings_instance = arg;
+ }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.OutputSpender_free(ptr); } super.finalize();
+ }
+ /**
+ * Destroys the object, freeing associated resources. After this call, any access
+ * to this object may result in a SEGFAULT or worse.
+ *
+ * You should generally NEVER call this method. You should let the garbage collector
+ * do this for you when it finalizes objects. However, it may be useful for types
+ * which represent locks and should be closed immediately to avoid holding locks
+ * until the GC runs.
+ */
+ public void destroy() {
+ if (ptr != 0) { bindings.OutputSpender_free(ptr); }
+ ptr = 0;
+ }
+ public static interface OutputSpenderInterface {
+ /**
+ * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an
+ * output to the given change destination (if sufficient change value remains). The
+ * transaction will have a feerate, at least, of the given value.
+ *
+ * The `locktime` argument is used to set the transaction's locktime. If `None`, the
+ * transaction will have a locktime of 0. It it recommended to set this to the current block
+ * height to avoid fee sniping, unless you have some specific reason to use a different
+ * locktime.
+ *
+ * Returns `Err(())` if the output value is greater than the input value minus required fee,
+ * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
+ * does not match the one we can spend.
+ */
+ Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, Option_u32Z locktime);
+ }
+ private static class LDKOutputSpenderHolder { OutputSpender held; }
+ public static OutputSpender new_impl(OutputSpenderInterface arg) {
+ final LDKOutputSpenderHolder impl_holder = new LDKOutputSpenderHolder();
+ impl_holder.held = new OutputSpender(new bindings.LDKOutputSpender() {
+ @Override public long spend_spendable_outputs(long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime) {
+ int descriptors_conv_27_len = descriptors.length;
+ SpendableOutputDescriptor[] descriptors_conv_27_arr = new SpendableOutputDescriptor[descriptors_conv_27_len];
+ for (int b = 0; b < descriptors_conv_27_len; b++) {
+ long descriptors_conv_27 = descriptors[b];
+ org.ldk.structs.SpendableOutputDescriptor descriptors_conv_27_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(descriptors_conv_27);
+ if (descriptors_conv_27_hu_conv != null) { descriptors_conv_27_hu_conv.ptrs_to.add(this); };
+ descriptors_conv_27_arr[b] = descriptors_conv_27_hu_conv;
+ }
+ int outputs_conv_7_len = outputs.length;
+ TxOut[] outputs_conv_7_arr = new TxOut[outputs_conv_7_len];
+ for (int h = 0; h < outputs_conv_7_len; h++) {
+ long outputs_conv_7 = outputs[h];
+ TxOut outputs_conv_7_conv = new TxOut(null, outputs_conv_7);
+ outputs_conv_7_arr[h] = outputs_conv_7_conv;
+ }
+ org.ldk.structs.Option_u32Z locktime_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(locktime);
+ if (locktime_hu_conv != null) { locktime_hu_conv.ptrs_to.add(this); };
+ Result_TransactionNoneZ ret = arg.spend_spendable_outputs(descriptors_conv_27_arr, outputs_conv_7_arr, change_destination_script, feerate_sat_per_1000_weight, locktime_hu_conv);
+ Reference.reachabilityFence(arg);
+ long result = ret.clone_ptr();
+ return result;
+ }
+ });
+ return impl_holder.held;
+ }
+ /**
+ * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an
+ * output to the given change destination (if sufficient change value remains). The
+ * transaction will have a feerate, at least, of the given value.
+ *
+ * The `locktime` argument is used to set the transaction's locktime. If `None`, the
+ * transaction will have a locktime of 0. It it recommended to set this to the current block
+ * height to avoid fee sniping, unless you have some specific reason to use a different
+ * locktime.
+ *
+ * Returns `Err(())` if the output value is greater than the input value minus required fee,
+ * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
+ * does not match the one we can spend.
+ */
+ public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) {
+ long ret = bindings.OutputSpender_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(descriptors);
+ Reference.reachabilityFence(outputs);
+ Reference.reachabilityFence(change_destination_script);
+ Reference.reachabilityFence(feerate_sat_per_1000_weight);
+ Reference.reachabilityFence(locktime);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+ for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (this != null) { this.ptrs_to.add(descriptors_conv_27); }; };
+ if (this != null) { this.ptrs_to.add(locktime); };
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A utility that keeps track of [`SpendableOutputDescriptor`]s, persists them in a given
+ * [`KVStore`] and regularly retries sweeping them based on a callback given to the constructor
+ * methods.
+ *
+ * Users should call [`Self::track_spendable_outputs`] for any [`SpendableOutputDescriptor`]s received via [`Event::SpendableOutputs`].
+ *
+ * This needs to be notified of chain state changes either via its [`Listen`] or [`Confirm`]
+ * implementation and hence has to be connected with the utilized chain data sources.
+ *
+ * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users are
+ * required to give their chain data sources (i.e., [`Filter`] implementation) to the respective
+ * constructor.
+ *
+ * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OutputSweeper extends CommonBase {
+ OutputSweeper(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.OutputSweeper_free(ptr); }
+ }
+
+ /**
+ * Constructs a new [`OutputSweeper`].
+ *
+ * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users also
+ * need to register their [`Filter`] implementation via the given `chain_data_source`.
+ */
+ public static OutputSweeper of(org.ldk.structs.BestBlock best_block, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Option_FilterZ chain_data_source, org.ldk.structs.OutputSpender output_spender, org.ldk.structs.ChangeDestinationSource change_destination_source, org.ldk.structs.KVStore kv_store, org.ldk.structs.Logger logger) {
+ long ret = bindings.OutputSweeper_new(best_block.ptr, broadcaster.ptr, fee_estimator.ptr, chain_data_source.ptr, output_spender.ptr, change_destination_source.ptr, kv_store.ptr, logger.ptr);
+ Reference.reachabilityFence(best_block);
+ Reference.reachabilityFence(broadcaster);
+ Reference.reachabilityFence(fee_estimator);
+ Reference.reachabilityFence(chain_data_source);
+ Reference.reachabilityFence(output_spender);
+ Reference.reachabilityFence(change_destination_source);
+ Reference.reachabilityFence(kv_store);
+ Reference.reachabilityFence(logger);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OutputSweeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutputSweeper(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(best_block); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(broadcaster); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_estimator); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(chain_data_source); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(output_spender); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(change_destination_source); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(kv_store); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Tells the sweeper to track the given outputs descriptors.
+ *
+ * Usually, this should be called based on the values emitted by the
+ * [`Event::SpendableOutputs`].
+ *
+ * The given `exclude_static_outputs` flag controls whether the sweeper will filter out
+ * [`SpendableOutputDescriptor::StaticOutput`]s, which may be handled directly by the on-chain
+ * wallet implementation.
+ *
+ * If `delay_until_height` is set, we will delay the spending until the respective block
+ * height is reached. This can be used to batch spends, e.g., to reduce on-chain fees.
+ *
+ * Returns `Err` on persistence failure, in which case the call may be safely retried.
+ *
+ * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs
+ *
+ * Note that channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public Result_NoneNoneZ track_spendable_outputs(SpendableOutputDescriptor[] output_descriptors, @Nullable org.ldk.structs.ChannelId channel_id, boolean exclude_static_outputs, org.ldk.structs.Option_u32Z delay_until_height) {
+ long ret = bindings.OutputSweeper_track_spendable_outputs(this.ptr, output_descriptors != null ? Arrays.stream(output_descriptors).mapToLong(output_descriptors_conv_27 -> output_descriptors_conv_27.ptr).toArray() : null, channel_id == null ? 0 : channel_id.ptr, exclude_static_outputs, delay_until_height.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(output_descriptors);
+ Reference.reachabilityFence(channel_id);
+ Reference.reachabilityFence(exclude_static_outputs);
+ Reference.reachabilityFence(delay_until_height);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
+ for (SpendableOutputDescriptor output_descriptors_conv_27: output_descriptors) { if (this != null) { this.ptrs_to.add(output_descriptors_conv_27); }; };
+ if (this != null) { this.ptrs_to.add(channel_id); };
+ if (this != null) { this.ptrs_to.add(delay_until_height); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Returns a list of the currently tracked spendable outputs.
+ */
+ public TrackedSpendableOutput[] tracked_spendable_outputs() {
+ long[] ret = bindings.OutputSweeper_tracked_spendable_outputs(this.ptr);
+ Reference.reachabilityFence(this);
+ int ret_conv_24_len = ret.length;
+ TrackedSpendableOutput[] ret_conv_24_arr = new TrackedSpendableOutput[ret_conv_24_len];
+ for (int y = 0; y < ret_conv_24_len; y++) {
+ long ret_conv_24 = ret[y];
+ org.ldk.structs.TrackedSpendableOutput ret_conv_24_hu_conv = null; if (ret_conv_24 < 0 || ret_conv_24 > 4096) { ret_conv_24_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret_conv_24); }
+ if (ret_conv_24_hu_conv != null) { ret_conv_24_hu_conv.ptrs_to.add(this); };
+ ret_conv_24_arr[y] = ret_conv_24_hu_conv;
+ }
+ return ret_conv_24_arr;
+ }
+
+ /**
+ * Gets the latest best block which was connected either via the [`Listen`] or
+ * [`Confirm`] interfaces.
+ */
+ public BestBlock current_best_block() {
+ long ret = bindings.OutputSweeper_current_best_block(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new Listen which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is
+ */
+ public Listen as_Listen() {
+ long ret = bindings.OutputSweeper_as_Listen(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Listen ret_hu_conv = new Listen(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new Confirm which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Confirm must be freed before this_arg is
+ */
+ public Confirm as_Confirm() {
+ long ret = bindings.OutputSweeper_as_Confirm(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Confirm ret_hu_conv = new Confirm(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Read a OutputSweeper from a byte array, created by OutputSweeper_write
+ */
+ public static Result_OutputSweeperDecodeErrorZ read(byte[] ser, org.ldk.structs.BroadcasterInterface arg_a, org.ldk.structs.FeeEstimator arg_b, org.ldk.structs.Option_FilterZ arg_c, org.ldk.structs.OutputSpender arg_d, org.ldk.structs.ChangeDestinationSource arg_e, org.ldk.structs.KVStore arg_f, org.ldk.structs.Logger arg_g) {
+ long ret = bindings.OutputSweeper_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr, arg_d.ptr, arg_e.ptr, arg_f.ptr, arg_g.ptr);
+ Reference.reachabilityFence(ser);
+ Reference.reachabilityFence(arg_a);
+ Reference.reachabilityFence(arg_b);
+ Reference.reachabilityFence(arg_c);
+ Reference.reachabilityFence(arg_d);
+ Reference.reachabilityFence(arg_e);
+ Reference.reachabilityFence(arg_f);
+ Reference.reachabilityFence(arg_g);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_a); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_b); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_c); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_d); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_e); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_f); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_g); };
+ return ret_hu_conv;
+ }
+
+}
* correct, and the announcement is signed with channel owners' keys.
*/
public static P2PGossipSync of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Option_UtxoLookupZ utxo_lookup, org.ldk.structs.Logger logger) {
- long ret = bindings.P2PGossipSync_new(network_graph == null ? 0 : network_graph.ptr, utxo_lookup.ptr, logger.ptr);
+ long ret = bindings.P2PGossipSync_new(network_graph.ptr, utxo_lookup.ptr, logger.ptr);
Reference.reachabilityFence(network_graph);
Reference.reachabilityFence(utxo_lookup);
Reference.reachabilityFence(logger);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Packet b) {
- boolean ret = bindings.Packet_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Packet_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.ParseOrSemanticError b) {
- boolean ret = bindings.ParseOrSemanticError_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ParseOrSemanticError_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* The list of unblinded hops in this [`Path`]. Must be at least length one.
*/
public void set_hops(RouteHop[] val) {
- bindings.Path_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_10 -> val_conv_10 == null ? 0 : val_conv_10.ptr).toArray() : null);
+ bindings.Path_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_10 -> val_conv_10.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (RouteHop val_conv_10: val) { if (this != null) { this.ptrs_to.add(val_conv_10); }; };
* Note that blinded_tail_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static Path of(RouteHop[] hops_arg, @Nullable org.ldk.structs.BlindedTail blinded_tail_arg) {
- long ret = bindings.Path_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_10 -> hops_arg_conv_10 == null ? 0 : hops_arg_conv_10.ptr).toArray() : null, blinded_tail_arg == null ? 0 : blinded_tail_arg.ptr);
+ long ret = bindings.Path_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_10 -> hops_arg_conv_10.ptr).toArray() : null, blinded_tail_arg == null ? 0 : blinded_tail_arg.ptr);
Reference.reachabilityFence(hops_arg);
Reference.reachabilityFence(blinded_tail_arg);
if (ret >= 0 && ret <= 4096) { return null; }
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Path b) {
- boolean ret = bindings.Path_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Path_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.PathFailure b) {
- boolean ret = bindings.PathFailure_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.PathFailure_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Utility method to constructs a new Blinded-variant Payee
*/
public static Payee blinded(TwoTuple_BlindedPayInfoBlindedPathZ[] route_hints, org.ldk.structs.Bolt12InvoiceFeatures features) {
- long ret = bindings.Payee_blinded(route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_37 -> route_hints_conv_37 != null ? route_hints_conv_37.ptr : 0).toArray() : null, features == null ? 0 : features.ptr);
+ long ret = bindings.Payee_blinded(route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_37 -> route_hints_conv_37.ptr).toArray() : null, features.ptr);
Reference.reachabilityFence(route_hints);
Reference.reachabilityFence(features);
if (ret >= 0 && ret <= 4096) { return null; }
* Utility method to constructs a new Clear-variant Payee
*/
public static Payee clear(byte[] node_id, RouteHint[] route_hints, org.ldk.structs.Bolt11InvoiceFeatures features, int final_cltv_expiry_delta) {
- long ret = bindings.Payee_clear(InternalUtils.check_arr_len(node_id, 33), route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_11 -> route_hints_conv_11 == null ? 0 : route_hints_conv_11.ptr).toArray() : null, features == null ? 0 : features.ptr, final_cltv_expiry_delta);
+ long ret = bindings.Payee_clear(InternalUtils.check_arr_len(node_id, 33), route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_11 -> route_hints_conv_11.ptr).toArray() : null, features.ptr, final_cltv_expiry_delta);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(route_hints);
Reference.reachabilityFence(features);
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.Payee b) {
- boolean ret = bindings.Payee_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Payee_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.PayeePubKey b) {
- boolean ret = bindings.PayeePubKey_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.PayeePubKey_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The context of an inbound payment, which is included in a [`BlindedPath`] via [`ReceiveTlvs`]
+ * and surfaced in [`PaymentPurpose`].
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * [`PaymentPurpose`]: crate::events::PaymentPurpose
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class PaymentContext extends CommonBase {
+ private PaymentContext(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.PaymentContext_free(ptr); }
+ }
+ static PaymentContext constr_from_ptr(long ptr) {
+ bindings.LDKPaymentContext raw_val = bindings.LDKPaymentContext_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKPaymentContext.Unknown.class) {
+ return new Unknown(ptr, (bindings.LDKPaymentContext.Unknown)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKPaymentContext.Bolt12Offer.class) {
+ return new Bolt12Offer(ptr, (bindings.LDKPaymentContext.Bolt12Offer)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKPaymentContext.Bolt12Refund.class) {
+ return new Bolt12Refund(ptr, (bindings.LDKPaymentContext.Bolt12Refund)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * The payment context was unknown.
+ */
+ public final static class Unknown extends PaymentContext {
+ public final org.ldk.structs.UnknownPaymentContext unknown;
+ private Unknown(long ptr, bindings.LDKPaymentContext.Unknown obj) {
+ super(null, ptr);
+ long unknown = obj.unknown;
+ org.ldk.structs.UnknownPaymentContext unknown_hu_conv = null; if (unknown < 0 || unknown > 4096) { unknown_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, unknown); }
+ if (unknown_hu_conv != null) { unknown_hu_conv.ptrs_to.add(this); };
+ this.unknown = unknown_hu_conv;
+ }
+ }
+ /**
+ * The payment was made for an invoice requested from a BOLT 12 [`Offer`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+ public final static class Bolt12Offer extends PaymentContext {
+ public final org.ldk.structs.Bolt12OfferContext bolt12_offer;
+ private Bolt12Offer(long ptr, bindings.LDKPaymentContext.Bolt12Offer obj) {
+ super(null, ptr);
+ long bolt12_offer = obj.bolt12_offer;
+ org.ldk.structs.Bolt12OfferContext bolt12_offer_hu_conv = null; if (bolt12_offer < 0 || bolt12_offer > 4096) { bolt12_offer_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, bolt12_offer); }
+ if (bolt12_offer_hu_conv != null) { bolt12_offer_hu_conv.ptrs_to.add(this); };
+ this.bolt12_offer = bolt12_offer_hu_conv;
+ }
+ }
+ /**
+ * The payment was made for an invoice sent for a BOLT 12 [`Refund`].
+ *
+ * [`Refund`]: crate::offers::refund::Refund
+ */
+ public final static class Bolt12Refund extends PaymentContext {
+ public final org.ldk.structs.Bolt12RefundContext bolt12_refund;
+ private Bolt12Refund(long ptr, bindings.LDKPaymentContext.Bolt12Refund obj) {
+ super(null, ptr);
+ long bolt12_refund = obj.bolt12_refund;
+ org.ldk.structs.Bolt12RefundContext bolt12_refund_hu_conv = null; if (bolt12_refund < 0 || bolt12_refund > 4096) { bolt12_refund_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, bolt12_refund); }
+ if (bolt12_refund_hu_conv != null) { bolt12_refund_hu_conv.ptrs_to.add(this); };
+ this.bolt12_refund = bolt12_refund_hu_conv;
+ }
+ }
+ long clone_ptr() {
+ long ret = bindings.PaymentContext_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the PaymentContext
+ */
+ public PaymentContext clone() {
+ long ret = bindings.PaymentContext_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Unknown-variant PaymentContext
+ */
+ public static PaymentContext unknown(org.ldk.structs.UnknownPaymentContext a) {
+ long ret = bindings.PaymentContext_unknown(a.ptr);
+ Reference.reachabilityFence(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Bolt12Offer-variant PaymentContext
+ */
+ public static PaymentContext bolt12_offer(org.ldk.structs.Bolt12OfferContext a) {
+ long ret = bindings.PaymentContext_bolt12_offer(a.ptr);
+ Reference.reachabilityFence(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Bolt12Refund-variant PaymentContext
+ */
+ public static PaymentContext bolt12_refund(org.ldk.structs.Bolt12RefundContext a) {
+ long ret = bindings.PaymentContext_bolt12_refund(a.ptr);
+ Reference.reachabilityFence(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two PaymentContexts contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public boolean eq(org.ldk.structs.PaymentContext b) {
+ boolean ret = bindings.PaymentContext_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof PaymentContext)) return false;
+ return this.eq((PaymentContext)o);
+ }
+ /**
+ * Serialize the PaymentContext object into a byte array which can be read by PaymentContext_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.PaymentContext_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a PaymentContext from a byte array, created by PaymentContext_write
+ */
+ public static Result_PaymentContextDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.PaymentContext_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.PaymentParameters b) {
- boolean ret = bindings.PaymentParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.PaymentParameters_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* [`PaymentParameters::expiry_time`].
*/
public static PaymentParameters from_bolt12_invoice(org.ldk.structs.Bolt12Invoice invoice) {
- long ret = bindings.PaymentParameters_from_bolt12_invoice(invoice == null ? 0 : invoice.ptr);
+ long ret = bindings.PaymentParameters_from_bolt12_invoice(invoice.ptr);
Reference.reachabilityFence(invoice);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.PaymentParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentParameters(null, ret); }
* Creates parameters for paying to a blinded payee from the provided blinded route hints.
*/
public static PaymentParameters blinded(TwoTuple_BlindedPayInfoBlindedPathZ[] blinded_route_hints) {
- long ret = bindings.PaymentParameters_blinded(blinded_route_hints != null ? Arrays.stream(blinded_route_hints).mapToLong(blinded_route_hints_conv_37 -> blinded_route_hints_conv_37 != null ? blinded_route_hints_conv_37.ptr : 0).toArray() : null);
+ long ret = bindings.PaymentParameters_blinded(blinded_route_hints != null ? Arrays.stream(blinded_route_hints).mapToLong(blinded_route_hints_conv_37 -> blinded_route_hints_conv_37.ptr).toArray() : null);
Reference.reachabilityFence(blinded_route_hints);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.PaymentParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentParameters(null, ret); }
}
static PaymentPurpose constr_from_ptr(long ptr) {
bindings.LDKPaymentPurpose raw_val = bindings.LDKPaymentPurpose_ref_from_ptr(ptr);
- if (raw_val.getClass() == bindings.LDKPaymentPurpose.InvoicePayment.class) {
- return new InvoicePayment(ptr, (bindings.LDKPaymentPurpose.InvoicePayment)raw_val);
+ if (raw_val.getClass() == bindings.LDKPaymentPurpose.Bolt11InvoicePayment.class) {
+ return new Bolt11InvoicePayment(ptr, (bindings.LDKPaymentPurpose.Bolt11InvoicePayment)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKPaymentPurpose.Bolt12OfferPayment.class) {
+ return new Bolt12OfferPayment(ptr, (bindings.LDKPaymentPurpose.Bolt12OfferPayment)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKPaymentPurpose.Bolt12RefundPayment.class) {
+ return new Bolt12RefundPayment(ptr, (bindings.LDKPaymentPurpose.Bolt12RefundPayment)raw_val);
}
if (raw_val.getClass() == bindings.LDKPaymentPurpose.SpontaneousPayment.class) {
return new SpontaneousPayment(ptr, (bindings.LDKPaymentPurpose.SpontaneousPayment)raw_val);
}
/**
- * Information for receiving a payment that we generated an invoice for.
+ * A payment for a BOLT 11 invoice.
*/
- public final static class InvoicePayment extends PaymentPurpose {
+ public final static class Bolt11InvoicePayment extends PaymentPurpose {
/**
* The preimage to the payment_hash, if the payment hash (and secret) were fetched via
- * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to
- * [`ChannelManager::claim_funds`].
+ * [`ChannelManager::create_inbound_payment`]. When handling [`Event::PaymentClaimable`],
+ * this can be passed directly to [`ChannelManager::claim_funds`] to claim the payment. No
+ * action is needed when seen in [`Event::PaymentClaimed`].
*
* [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment
* [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
* [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
*/
public final byte[] payment_secret;
- private InvoicePayment(long ptr, bindings.LDKPaymentPurpose.InvoicePayment obj) {
+ private Bolt11InvoicePayment(long ptr, bindings.LDKPaymentPurpose.Bolt11InvoicePayment obj) {
+ super(null, ptr);
+ long payment_preimage = obj.payment_preimage;
+ org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage);
+ if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.add(this); };
+ this.payment_preimage = payment_preimage_hu_conv;
+ this.payment_secret = obj.payment_secret;
+ }
+ }
+ /**
+ * A payment for a BOLT 12 [`Offer`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+ public final static class Bolt12OfferPayment extends PaymentPurpose {
+ /**
+ * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be
+ * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed
+ * when seen in [`Event::PaymentClaimed`].
+ *
+ * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
+ */
+ public final org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage;
+ /**
+ * The secret used to authenticate the sender to the recipient, preventing a number of
+ * de-anonymization attacks while routing a payment.
+ *
+ * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details.
+ */
+ public final byte[] payment_secret;
+ /**
+ * The context of the payment such as information about the corresponding [`Offer`] and
+ * [`InvoiceRequest`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ */
+ public final org.ldk.structs.Bolt12OfferContext payment_context;
+ private Bolt12OfferPayment(long ptr, bindings.LDKPaymentPurpose.Bolt12OfferPayment obj) {
+ super(null, ptr);
+ long payment_preimage = obj.payment_preimage;
+ org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage);
+ if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.add(this); };
+ this.payment_preimage = payment_preimage_hu_conv;
+ this.payment_secret = obj.payment_secret;
+ long payment_context = obj.payment_context;
+ org.ldk.structs.Bolt12OfferContext payment_context_hu_conv = null; if (payment_context < 0 || payment_context > 4096) { payment_context_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, payment_context); }
+ if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.add(this); };
+ this.payment_context = payment_context_hu_conv;
+ }
+ }
+ /**
+ * A payment for a BOLT 12 [`Refund`].
+ *
+ * [`Refund`]: crate::offers::refund::Refund
+ */
+ public final static class Bolt12RefundPayment extends PaymentPurpose {
+ /**
+ * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be
+ * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed
+ * when seen in [`Event::PaymentClaimed`].
+ *
+ * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
+ */
+ public final org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage;
+ /**
+ * The secret used to authenticate the sender to the recipient, preventing a number of
+ * de-anonymization attacks while routing a payment.
+ *
+ * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details.
+ */
+ public final byte[] payment_secret;
+ /**
+ * The context of the payment such as information about the corresponding [`Refund`].
+ *
+ * [`Refund`]: crate::offers::refund::Refund
+ */
+ public final org.ldk.structs.Bolt12RefundContext payment_context;
+ private Bolt12RefundPayment(long ptr, bindings.LDKPaymentPurpose.Bolt12RefundPayment obj) {
super(null, ptr);
long payment_preimage = obj.payment_preimage;
org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage);
if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.add(this); };
this.payment_preimage = payment_preimage_hu_conv;
this.payment_secret = obj.payment_secret;
+ long payment_context = obj.payment_context;
+ org.ldk.structs.Bolt12RefundContext payment_context_hu_conv = null; if (payment_context < 0 || payment_context > 4096) { payment_context_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, payment_context); }
+ if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.add(this); };
+ this.payment_context = payment_context_hu_conv;
}
}
/**
}
/**
- * Utility method to constructs a new InvoicePayment-variant PaymentPurpose
+ * Utility method to constructs a new Bolt11InvoicePayment-variant PaymentPurpose
+ */
+ public static PaymentPurpose bolt11_invoice_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret) {
+ long ret = bindings.PaymentPurpose_bolt11_invoice_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32));
+ Reference.reachabilityFence(payment_preimage);
+ Reference.reachabilityFence(payment_secret);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_preimage); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Bolt12OfferPayment-variant PaymentPurpose
+ */
+ public static PaymentPurpose bolt12_offer_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret, org.ldk.structs.Bolt12OfferContext payment_context) {
+ long ret = bindings.PaymentPurpose_bolt12_offer_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32), payment_context.ptr);
+ Reference.reachabilityFence(payment_preimage);
+ Reference.reachabilityFence(payment_secret);
+ Reference.reachabilityFence(payment_context);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_preimage); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Bolt12RefundPayment-variant PaymentPurpose
*/
- public static PaymentPurpose invoice_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret) {
- long ret = bindings.PaymentPurpose_invoice_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32));
+ public static PaymentPurpose bolt12_refund_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret, org.ldk.structs.Bolt12RefundContext payment_context) {
+ long ret = bindings.PaymentPurpose_bolt12_refund_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32), payment_context.ptr);
Reference.reachabilityFence(payment_preimage);
Reference.reachabilityFence(payment_secret);
+ Reference.reachabilityFence(payment_context);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_preimage); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context); };
return ret_hu_conv;
}
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.PaymentPurpose b) {
- boolean ret = bindings.PaymentPurpose_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.PaymentPurpose_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Utility method to constructs a new PathParameterError-variant PaymentSendFailure
*/
public static PaymentSendFailure path_parameter_error(Result_NoneAPIErrorZ[] a) {
- long ret = bindings.PaymentSendFailure_path_parameter_error(a != null ? Arrays.stream(a).mapToLong(a_conv_22 -> a_conv_22 != null ? a_conv_22.ptr : 0).toArray() : null);
+ long ret = bindings.PaymentSendFailure_path_parameter_error(a != null ? Arrays.stream(a).mapToLong(a_conv_22 -> a_conv_22.ptr).toArray() : null);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret);
* Utility method to constructs a new PartialFailure-variant PaymentSendFailure
*/
public static PaymentSendFailure partial_failure(Result_NoneAPIErrorZ[] results, org.ldk.structs.RouteParameters failed_paths_retry, byte[] payment_id) {
- long ret = bindings.PaymentSendFailure_partial_failure(results != null ? Arrays.stream(results).mapToLong(results_conv_22 -> results_conv_22 != null ? results_conv_22.ptr : 0).toArray() : null, failed_paths_retry == null ? 0 : failed_paths_retry.ptr, InternalUtils.check_arr_len(payment_id, 32));
+ long ret = bindings.PaymentSendFailure_partial_failure(results != null ? Arrays.stream(results).mapToLong(results_conv_22 -> results_conv_22.ptr).toArray() : null, failed_paths_retry.ptr, InternalUtils.check_arr_len(payment_id, 32));
Reference.reachabilityFence(results);
Reference.reachabilityFence(failed_paths_retry);
Reference.reachabilityFence(payment_id);
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.PaymentSendFailure b) {
- boolean ret = bindings.PaymentSendFailure_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.PaymentSendFailure_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Forwarded onion, with the next node id and a new onion
*/
public final static class Forward extends PeeledOnion {
- public final byte[] _0;
+ public final org.ldk.structs.NextMessageHop _0;
public final org.ldk.structs.OnionMessage _1;
private Forward(long ptr, bindings.LDKPeeledOnion.Forward obj) {
super(null, ptr);
- this._0 = obj._0;
+ long _0 = obj._0;
+ org.ldk.structs.NextMessageHop _0_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(_0);
+ if (_0_hu_conv != null) { _0_hu_conv.ptrs_to.add(this); };
+ this._0 = _0_hu_conv;
long _1 = obj._1;
org.ldk.structs.OnionMessage _1_hu_conv = null; if (_1 < 0 || _1 > 4096) { _1_hu_conv = new org.ldk.structs.OnionMessage(null, _1); }
if (_1_hu_conv != null) { _1_hu_conv.ptrs_to.add(this); };
/**
* Utility method to constructs a new Forward-variant PeeledOnion
*/
- public static PeeledOnion forward(byte[] a, org.ldk.structs.OnionMessage b) {
- long ret = bindings.PeeledOnion_forward(InternalUtils.check_arr_len(a, 33), b == null ? 0 : b.ptr);
+ public static PeeledOnion forward(org.ldk.structs.NextMessageHop a, org.ldk.structs.OnionMessage b) {
+ long ret = bindings.PeeledOnion_forward(a.ptr, b.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.PeeledOnion ret_hu_conv = org.ldk.structs.PeeledOnion.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
return ret_hu_conv;
}
* Utility method to constructs a new Receive-variant PeeledOnion
*/
public static PeeledOnion receive(org.ldk.structs.ParsedOnionMessageContents a, byte[] b, org.ldk.structs.BlindedPath c) {
- long ret = bindings.PeeledOnion_receive(a.ptr, InternalUtils.check_arr_len(b, 32), c == null ? 0 : c.ptr);
+ long ret = bindings.PeeledOnion_receive(a.ptr, InternalUtils.check_arr_len(b, 32), c.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
Reference.reachabilityFence(c);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Details of a connected peer as returned by [`PeerManager::list_peers`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class PeerDetails extends CommonBase {
+ PeerDetails(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.PeerDetails_free(ptr); }
+ }
+
+ /**
+ * The node id of the peer.
+ *
+ * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter
+ * passed in to [`PeerManager::new_outbound_connection`].
+ */
+ public byte[] get_counterparty_node_id() {
+ byte[] ret = bindings.PeerDetails_get_counterparty_node_id(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * The node id of the peer.
+ *
+ * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter
+ * passed in to [`PeerManager::new_outbound_connection`].
+ */
+ public void set_counterparty_node_id(byte[] val) {
+ bindings.PeerDetails_set_counterparty_node_id(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * The socket address the peer provided in the initial handshake.
+ *
+ * Will only be `Some` if an address had been previously provided to
+ * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`].
+ *
+ * Returns a copy of the field.
+ */
+ public Option_SocketAddressZ get_socket_address() {
+ long ret = bindings.PeerDetails_get_socket_address(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_SocketAddressZ ret_hu_conv = org.ldk.structs.Option_SocketAddressZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The socket address the peer provided in the initial handshake.
+ *
+ * Will only be `Some` if an address had been previously provided to
+ * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`].
+ */
+ public void set_socket_address(org.ldk.structs.Option_SocketAddressZ val) {
+ bindings.PeerDetails_set_socket_address(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * The features the peer provided in the initial handshake.
+ */
+ public InitFeatures get_init_features() {
+ long ret = bindings.PeerDetails_get_init_features(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The features the peer provided in the initial handshake.
+ */
+ public void set_init_features(org.ldk.structs.InitFeatures val) {
+ bindings.PeerDetails_set_init_features(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * Indicates the direction of the peer connection.
+ *
+ * Will be `true` for inbound connections, and `false` for outbound connections.
+ */
+ public boolean get_is_inbound_connection() {
+ boolean ret = bindings.PeerDetails_get_is_inbound_connection(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Indicates the direction of the peer connection.
+ *
+ * Will be `true` for inbound connections, and `false` for outbound connections.
+ */
+ public void set_is_inbound_connection(boolean val) {
+ bindings.PeerDetails_set_is_inbound_connection(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Constructs a new PeerDetails given each field
+ */
+ public static PeerDetails of(byte[] counterparty_node_id_arg, org.ldk.structs.Option_SocketAddressZ socket_address_arg, org.ldk.structs.InitFeatures init_features_arg, boolean is_inbound_connection_arg) {
+ long ret = bindings.PeerDetails_new(InternalUtils.check_arr_len(counterparty_node_id_arg, 33), socket_address_arg.ptr, init_features_arg.ptr, is_inbound_connection_arg);
+ Reference.reachabilityFence(counterparty_node_id_arg);
+ Reference.reachabilityFence(socket_address_arg);
+ Reference.reachabilityFence(init_features_arg);
+ Reference.reachabilityFence(is_inbound_connection_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PeerDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerDetails(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(socket_address_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(init_features_arg); };
+ return ret_hu_conv;
+ }
+
+}
}
/**
- * Get a list of tuples mapping from node id to network addresses for peers which have
- * completed the initial handshake.
+ * Returns a list of [`PeerDetails`] for connected peers that have completed the initial
+ * handshake.
+ */
+ public PeerDetails[] list_peers() {
+ long[] ret = bindings.PeerManager_list_peers(this.ptr);
+ Reference.reachabilityFence(this);
+ int ret_conv_13_len = ret.length;
+ PeerDetails[] ret_conv_13_arr = new PeerDetails[ret_conv_13_len];
+ for (int n = 0; n < ret_conv_13_len; n++) {
+ long ret_conv_13 = ret[n];
+ org.ldk.structs.PeerDetails ret_conv_13_hu_conv = null; if (ret_conv_13 < 0 || ret_conv_13 > 4096) { ret_conv_13_hu_conv = new org.ldk.structs.PeerDetails(null, ret_conv_13); }
+ if (ret_conv_13_hu_conv != null) { ret_conv_13_hu_conv.ptrs_to.add(this); };
+ ret_conv_13_arr[n] = ret_conv_13_hu_conv;
+ }
+ return ret_conv_13_arr;
+ }
+
+ /**
+ * Returns the [`PeerDetails`] of a connected peer that has completed the initial handshake.
*
- * For outbound connections, the [`PublicKey`] will be the same as the `their_node_id` parameter
- * passed in to [`Self::new_outbound_connection`], however entries will only appear once the initial
- * handshake has completed and we are sure the remote peer has the private key for the given
- * [`PublicKey`].
+ * Will return `None` if the peer is unknown or it hasn't completed the initial handshake.
*
- * The returned `Option`s will only be `Some` if an address had been previously given via
- * [`Self::new_outbound_connection`] or [`Self::new_inbound_connection`].
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public TwoTuple_PublicKeyCOption_SocketAddressZZ[] get_peer_node_ids() {
- long[] ret = bindings.PeerManager_get_peer_node_ids(this.ptr);
+ @Nullable
+ public PeerDetails peer_by_node_id(byte[] their_node_id) {
+ long ret = bindings.PeerManager_peer_by_node_id(this.ptr, InternalUtils.check_arr_len(their_node_id, 33));
Reference.reachabilityFence(this);
- int ret_conv_43_len = ret.length;
- TwoTuple_PublicKeyCOption_SocketAddressZZ[] ret_conv_43_arr = new TwoTuple_PublicKeyCOption_SocketAddressZZ[ret_conv_43_len];
- for (int r = 0; r < ret_conv_43_len; r++) {
- long ret_conv_43 = ret[r];
- TwoTuple_PublicKeyCOption_SocketAddressZZ ret_conv_43_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret_conv_43);
- if (ret_conv_43_hu_conv != null) { ret_conv_43_hu_conv.ptrs_to.add(this); };
- ret_conv_43_arr[r] = ret_conv_43_hu_conv;
- }
- return ret_conv_43_arr;
+ Reference.reachabilityFence(their_node_id);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PeerDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerDetails(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* [`RecipientOnionFields::payment_metadata`].
*/
public final org.ldk.structs.Option_CVec_u8ZZ payment_metadata;
+ /**
+ * The context of the payment included by the recipient in a blinded path, or `None` if a
+ * blinded path was not used.
+ *
+ * Used in part to determine the [`events::PaymentPurpose`].
+ */
+ public final org.ldk.structs.Option_PaymentContextZ payment_context;
/**
* CLTV expiry of the received HTLC.
*
org.ldk.structs.Option_CVec_u8ZZ payment_metadata_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(payment_metadata);
if (payment_metadata_hu_conv != null) { payment_metadata_hu_conv.ptrs_to.add(this); };
this.payment_metadata = payment_metadata_hu_conv;
+ long payment_context = obj.payment_context;
+ org.ldk.structs.Option_PaymentContextZ payment_context_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(payment_context);
+ if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.add(this); };
+ this.payment_context = payment_context_hu_conv;
this.incoming_cltv_expiry = obj.incoming_cltv_expiry;
this.phantom_shared_secret = obj.phantom_shared_secret;
long[] custom_tlvs = obj.custom_tlvs;
* [`RecipientOnionFields::custom_tlvs`].
*/
public final TwoTuple_u64CVec_u8ZZ[] custom_tlvs;
+ /**
+ * Set if this HTLC is the final hop in a multi-hop blinded path.
+ */
+ public final boolean requires_blinded_error;
private ReceiveKeysend(long ptr, bindings.LDKPendingHTLCRouting.ReceiveKeysend obj) {
super(null, ptr);
long payment_data = obj.payment_data;
custom_tlvs_conv_23_arr[x] = custom_tlvs_conv_23_hu_conv;
}
this.custom_tlvs = custom_tlvs_conv_23_arr;
+ this.requires_blinded_error = obj.requires_blinded_error;
}
}
long clone_ptr() {
* Utility method to constructs a new Forward-variant PendingHTLCRouting
*/
public static PendingHTLCRouting forward(org.ldk.structs.OnionPacket onion_packet, long short_channel_id, org.ldk.structs.BlindedForward blinded) {
- long ret = bindings.PendingHTLCRouting_forward(onion_packet == null ? 0 : onion_packet.ptr, short_channel_id, blinded == null ? 0 : blinded.ptr);
+ long ret = bindings.PendingHTLCRouting_forward(onion_packet.ptr, short_channel_id, blinded.ptr);
Reference.reachabilityFence(onion_packet);
Reference.reachabilityFence(short_channel_id);
Reference.reachabilityFence(blinded);
/**
* Utility method to constructs a new Receive-variant PendingHTLCRouting
*/
- public static PendingHTLCRouting receive(org.ldk.structs.FinalOnionHopData payment_data, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, boolean requires_blinded_error) {
- long ret = bindings.PendingHTLCRouting_receive(payment_data == null ? 0 : payment_data.ptr, payment_metadata.ptr, incoming_cltv_expiry, InternalUtils.check_arr_len(phantom_shared_secret, 32), custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0).toArray() : null, requires_blinded_error);
+ public static PendingHTLCRouting receive(org.ldk.structs.FinalOnionHopData payment_data, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, org.ldk.structs.Option_PaymentContextZ payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, boolean requires_blinded_error) {
+ long ret = bindings.PendingHTLCRouting_receive(payment_data.ptr, payment_metadata.ptr, payment_context.ptr, incoming_cltv_expiry, InternalUtils.check_arr_len(phantom_shared_secret, 32), custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23.ptr).toArray() : null, requires_blinded_error);
Reference.reachabilityFence(payment_data);
Reference.reachabilityFence(payment_metadata);
+ Reference.reachabilityFence(payment_context);
Reference.reachabilityFence(incoming_cltv_expiry);
Reference.reachabilityFence(phantom_shared_secret);
Reference.reachabilityFence(custom_tlvs);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_data); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_metadata); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context); };
return ret_hu_conv;
}
/**
* Utility method to constructs a new ReceiveKeysend-variant PendingHTLCRouting
*/
- public static PendingHTLCRouting receive_keysend(org.ldk.structs.FinalOnionHopData payment_data, byte[] payment_preimage, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, TwoTuple_u64CVec_u8ZZ[] custom_tlvs) {
- long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data == null ? 0 : payment_data.ptr, InternalUtils.check_arr_len(payment_preimage, 32), payment_metadata.ptr, incoming_cltv_expiry, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0).toArray() : null);
+ public static PendingHTLCRouting receive_keysend(org.ldk.structs.FinalOnionHopData payment_data, byte[] payment_preimage, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, boolean requires_blinded_error) {
+ long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data.ptr, InternalUtils.check_arr_len(payment_preimage, 32), payment_metadata.ptr, incoming_cltv_expiry, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23.ptr).toArray() : null, requires_blinded_error);
Reference.reachabilityFence(payment_data);
Reference.reachabilityFence(payment_preimage);
Reference.reachabilityFence(payment_metadata);
Reference.reachabilityFence(incoming_cltv_expiry);
Reference.reachabilityFence(custom_tlvs);
+ Reference.reachabilityFence(requires_blinded_error);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.PendingHTLCRouting ret_hu_conv = org.ldk.structs.PendingHTLCRouting.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
* [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
* [`Writeable::write`]: crate::util::ser::Writeable::write
*/
- ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_id, ChannelMonitor data, MonitorUpdateId update_id);
+ ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_funding_outpoint, ChannelMonitor data, MonitorUpdateId update_id);
/**
* Update one channel's data. The provided [`ChannelMonitor`] has already applied the given
* update.
*
* Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id);
+ ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_funding_outpoint, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id);
+ /**
+ * Prevents the channel monitor from being loaded on startup.
+ *
+ * Archiving the data in a backup location (rather than deleting it fully) is useful for
+ * hedging against data loss in case of unexpected failure.
+ */
+ void archive_persisted_channel(OutPoint channel_funding_outpoint);
}
private static class LDKPersistHolder { Persist held; }
public static Persist new_impl(PersistInterface arg) {
final LDKPersistHolder impl_holder = new LDKPersistHolder();
impl_holder.held = new Persist(new bindings.LDKPersist() {
- @Override public ChannelMonitorUpdateStatus persist_new_channel(long channel_id, long data, long update_id) {
- org.ldk.structs.OutPoint channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.OutPoint(null, channel_id); }
- if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ @Override public ChannelMonitorUpdateStatus persist_new_channel(long channel_funding_outpoint, long data, long update_id) {
+ org.ldk.structs.OutPoint channel_funding_outpoint_hu_conv = null; if (channel_funding_outpoint < 0 || channel_funding_outpoint > 4096) { channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_outpoint); }
+ if (channel_funding_outpoint_hu_conv != null) { channel_funding_outpoint_hu_conv.ptrs_to.add(this); };
org.ldk.structs.ChannelMonitor data_hu_conv = null; if (data < 0 || data > 4096) { data_hu_conv = new org.ldk.structs.ChannelMonitor(null, data); }
org.ldk.structs.MonitorUpdateId update_id_hu_conv = null; if (update_id < 0 || update_id > 4096) { update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, update_id); }
if (update_id_hu_conv != null) { update_id_hu_conv.ptrs_to.add(this); };
- ChannelMonitorUpdateStatus ret = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv);
+ ChannelMonitorUpdateStatus ret = arg.persist_new_channel(channel_funding_outpoint_hu_conv, data_hu_conv, update_id_hu_conv);
Reference.reachabilityFence(arg);
return ret;
}
- @Override public ChannelMonitorUpdateStatus update_persisted_channel(long channel_id, long update, long data, long update_id) {
- org.ldk.structs.OutPoint channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.OutPoint(null, channel_id); }
- if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+ @Override public ChannelMonitorUpdateStatus update_persisted_channel(long channel_funding_outpoint, long update, long data, long update_id) {
+ org.ldk.structs.OutPoint channel_funding_outpoint_hu_conv = null; if (channel_funding_outpoint < 0 || channel_funding_outpoint > 4096) { channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_outpoint); }
+ if (channel_funding_outpoint_hu_conv != null) { channel_funding_outpoint_hu_conv.ptrs_to.add(this); };
org.ldk.structs.ChannelMonitorUpdate update_hu_conv = null; if (update < 0 || update > 4096) { update_hu_conv = new org.ldk.structs.ChannelMonitorUpdate(null, update); }
if (update_hu_conv != null) { update_hu_conv.ptrs_to.add(this); };
org.ldk.structs.ChannelMonitor data_hu_conv = null; if (data < 0 || data > 4096) { data_hu_conv = new org.ldk.structs.ChannelMonitor(null, data); }
org.ldk.structs.MonitorUpdateId update_id_hu_conv = null; if (update_id < 0 || update_id > 4096) { update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, update_id); }
if (update_id_hu_conv != null) { update_id_hu_conv.ptrs_to.add(this); };
- ChannelMonitorUpdateStatus ret = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
+ ChannelMonitorUpdateStatus ret = arg.update_persisted_channel(channel_funding_outpoint_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
Reference.reachabilityFence(arg);
return ret;
}
+ @Override public void archive_persisted_channel(long channel_funding_outpoint) {
+ org.ldk.structs.OutPoint channel_funding_outpoint_hu_conv = null; if (channel_funding_outpoint < 0 || channel_funding_outpoint > 4096) { channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_outpoint); }
+ if (channel_funding_outpoint_hu_conv != null) { channel_funding_outpoint_hu_conv.ptrs_to.add(this); };
+ arg.archive_persisted_channel(channel_funding_outpoint_hu_conv);
+ Reference.reachabilityFence(arg);
+ }
});
return impl_holder.held;
}
* [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
* [`Writeable::write`]: crate::util::ser::Writeable::write
*/
- public ChannelMonitorUpdateStatus persist_new_channel(org.ldk.structs.OutPoint channel_id, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) {
- ChannelMonitorUpdateStatus ret = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr);
+ public ChannelMonitorUpdateStatus persist_new_channel(org.ldk.structs.OutPoint channel_funding_outpoint, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) {
+ ChannelMonitorUpdateStatus ret = bindings.Persist_persist_new_channel(this.ptr, channel_funding_outpoint.ptr, data.ptr, update_id.ptr);
Reference.reachabilityFence(this);
- Reference.reachabilityFence(channel_id);
+ Reference.reachabilityFence(channel_funding_outpoint);
Reference.reachabilityFence(data);
Reference.reachabilityFence(update_id);
- if (this != null) { this.ptrs_to.add(channel_id); };
+ if (this != null) { this.ptrs_to.add(channel_funding_outpoint); };
if (this != null) { this.ptrs_to.add(data); };
if (this != null) { this.ptrs_to.add(update_id); };
return ret;
*
* Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public ChannelMonitorUpdateStatus update_persisted_channel(org.ldk.structs.OutPoint channel_id, @Nullable org.ldk.structs.ChannelMonitorUpdate update, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) {
- ChannelMonitorUpdateStatus ret = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, update == null ? 0 : update.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr);
+ public ChannelMonitorUpdateStatus update_persisted_channel(org.ldk.structs.OutPoint channel_funding_outpoint, @Nullable org.ldk.structs.ChannelMonitorUpdate update, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) {
+ ChannelMonitorUpdateStatus ret = bindings.Persist_update_persisted_channel(this.ptr, channel_funding_outpoint.ptr, update == null ? 0 : update.ptr, data.ptr, update_id.ptr);
Reference.reachabilityFence(this);
- Reference.reachabilityFence(channel_id);
+ Reference.reachabilityFence(channel_funding_outpoint);
Reference.reachabilityFence(update);
Reference.reachabilityFence(data);
Reference.reachabilityFence(update_id);
- if (this != null) { this.ptrs_to.add(channel_id); };
+ if (this != null) { this.ptrs_to.add(channel_funding_outpoint); };
if (this != null) { this.ptrs_to.add(update); };
if (this != null) { this.ptrs_to.add(data); };
if (this != null) { this.ptrs_to.add(update_id); };
return ret;
}
+ /**
+ * Prevents the channel monitor from being loaded on startup.
+ *
+ * Archiving the data in a backup location (rather than deleting it fully) is useful for
+ * hedging against data loss in case of unexpected failure.
+ */
+ public void archive_persisted_channel(org.ldk.structs.OutPoint channel_funding_outpoint) {
+ bindings.Persist_archive_persisted_channel(this.ptr, channel_funding_outpoint.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(channel_funding_outpoint);
+ if (this != null) { this.ptrs_to.add(channel_funding_outpoint); };
+ }
+
}
/**
* Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk.
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
*/
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
public class Persister extends CommonBase {
public static interface PersisterInterface {
/**
* Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
*/
Result_NoneIOErrorZ persist_manager(ChannelManager channel_manager);
/**
org.ldk.structs.ChannelManager channel_manager_hu_conv = null; if (channel_manager < 0 || channel_manager > 4096) { channel_manager_hu_conv = new org.ldk.structs.ChannelManager(null, channel_manager); }
Result_NoneIOErrorZ ret = arg.persist_manager(channel_manager_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long persist_graph(long network_graph) {
org.ldk.structs.NetworkGraph network_graph_hu_conv = null; if (network_graph < 0 || network_graph > 4096) { network_graph_hu_conv = new org.ldk.structs.NetworkGraph(null, network_graph); }
Result_NoneIOErrorZ ret = arg.persist_graph(network_graph_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long persist_scorer(long scorer) {
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
Result_NoneIOErrorZ ret = arg.persist_scorer(ret_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
});
}
/**
* Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
*/
public Result_NoneIOErrorZ persist_manager(org.ldk.structs.ChannelManager channel_manager) {
- long ret = bindings.Persister_persist_manager(this.ptr, channel_manager == null ? 0 : channel_manager.ptr);
+ long ret = bindings.Persister_persist_manager(this.ptr, channel_manager.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(channel_manager);
if (ret >= 0 && ret <= 4096) { return null; }
* Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed.
*/
public Result_NoneIOErrorZ persist_graph(org.ldk.structs.NetworkGraph network_graph) {
- long ret = bindings.Persister_persist_graph(this.ptr, network_graph == null ? 0 : network_graph.ptr);
+ long ret = bindings.Persister_persist_graph(this.ptr, network_graph.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(network_graph);
if (ret >= 0 && ret <= 4096) { return null; }
return ret_hu_conv;
}
+ /**
+ * Constructs a new OutputSpender which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is
+ */
+ public OutputSpender as_OutputSpender() {
+ long ret = bindings.PhantomKeysManager_as_OutputSpender(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ OutputSpender ret_hu_conv = new OutputSpender(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
/**
* Constructs a new SignerProvider which calls the relevant methods on this_arg.
* This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is
return ret_hu_conv;
}
- /**
- * See [`KeysManager::spend_spendable_outputs`] for documentation on this method.
- */
- public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) {
- long ret = bindings.PhantomKeysManager_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr);
- Reference.reachabilityFence(this);
- Reference.reachabilityFence(descriptors);
- Reference.reachabilityFence(outputs);
- Reference.reachabilityFence(change_destination_script);
- Reference.reachabilityFence(feerate_sat_per_1000_weight);
- Reference.reachabilityFence(locktime);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
- for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (this != null) { this.ptrs_to.add(descriptors_conv_27); }; };
- if (this != null) { this.ptrs_to.add(locktime); };
- return ret_hu_conv;
- }
-
/**
* See [`KeysManager::derive_channel_keys`] for documentation on this method.
*/
* The list of channels to be included in the invoice route hints.
*/
public void set_channels(ChannelDetails[] val) {
- bindings.PhantomRouteHints_set_channels(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16 == null ? 0 : val_conv_16.ptr).toArray() : null);
+ bindings.PhantomRouteHints_set_channels(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (ChannelDetails val_conv_16: val) { if (this != null) { this.ptrs_to.add(val_conv_16); }; };
* Constructs a new PhantomRouteHints given each field
*/
public static PhantomRouteHints of(ChannelDetails[] channels_arg, long phantom_scid_arg, byte[] real_node_pubkey_arg) {
- long ret = bindings.PhantomRouteHints_new(channels_arg != null ? Arrays.stream(channels_arg).mapToLong(channels_arg_conv_16 -> channels_arg_conv_16 == null ? 0 : channels_arg_conv_16.ptr).toArray() : null, phantom_scid_arg, InternalUtils.check_arr_len(real_node_pubkey_arg, 33));
+ long ret = bindings.PhantomRouteHints_new(channels_arg != null ? Arrays.stream(channels_arg).mapToLong(channels_arg_conv_16 -> channels_arg_conv_16.ptr).toArray() : null, phantom_scid_arg, InternalUtils.check_arr_len(real_node_pubkey_arg, 33));
Reference.reachabilityFence(channels_arg);
Reference.reachabilityFence(phantom_scid_arg);
Reference.reachabilityFence(real_node_pubkey_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Ping b) {
- boolean ret = bindings.Ping_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Ping_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Pong b) {
- boolean ret = bindings.Pong_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Pong_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.PositiveTimestamp b) {
- boolean ret = bindings.PositiveTimestamp_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.PositiveTimestamp_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.PrivateRoute b) {
- boolean ret = bindings.PrivateRoute_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.PrivateRoute_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Creates a new (partial) route from a list of hops
*/
public static Result_PrivateRouteCreationErrorZ of(org.ldk.structs.RouteHint hops) {
- long ret = bindings.PrivateRoute_new(hops == null ? 0 : hops.ptr);
+ long ret = bindings.PrivateRoute_new(hops.ptr);
Reference.reachabilityFence(hops);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
* through a network graph.
*/
public static ProbabilisticScorer of(org.ldk.structs.ProbabilisticScoringDecayParameters decay_params, org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger) {
- long ret = bindings.ProbabilisticScorer_new(decay_params == null ? 0 : decay_params.ptr, network_graph == null ? 0 : network_graph.ptr, logger.ptr);
+ long ret = bindings.ProbabilisticScorer_new(decay_params.ptr, network_graph.ptr, logger.ptr);
Reference.reachabilityFence(decay_params);
Reference.reachabilityFence(network_graph);
Reference.reachabilityFence(logger);
* channel with `scid` towards the given `target` node.
*/
public Option_C2Tuple_u64u64ZZ estimated_channel_liquidity_range(long scid, org.ldk.structs.NodeId target) {
- long ret = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target == null ? 0 : target.ptr);
+ long ret = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(scid);
Reference.reachabilityFence(target);
* the scoring model, see [`Self::historical_estimated_payment_success_probability`].
*/
public Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ historical_estimated_channel_liquidity_probabilities(long scid, org.ldk.structs.NodeId target) {
- long ret = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, target == null ? 0 : target.ptr);
+ long ret = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, target.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(scid);
Reference.reachabilityFence(target);
* [`Self::estimated_channel_liquidity_range`]).
*/
public Option_f64Z historical_estimated_payment_success_probability(long scid, org.ldk.structs.NodeId target, long amount_msat, org.ldk.structs.ProbabilisticScoringFeeParameters params) {
- long ret = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target == null ? 0 : target.ptr, amount_msat, params == null ? 0 : params.ptr);
+ long ret = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target.ptr, amount_msat, params.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(scid);
Reference.reachabilityFence(target);
* Read a ProbabilisticScorer from a byte array, created by ProbabilisticScorer_write
*/
public static Result_ProbabilisticScorerDecodeErrorZ read(byte[] ser, org.ldk.structs.ProbabilisticScoringDecayParameters arg_a, org.ldk.structs.NetworkGraph arg_b, org.ldk.structs.Logger arg_c) {
- long ret = bindings.ProbabilisticScorer_read(ser, arg_a == null ? 0 : arg_a.ptr, arg_b == null ? 0 : arg_b.ptr, arg_c.ptr);
+ long ret = bindings.ProbabilisticScorer_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr);
Reference.reachabilityFence(ser);
Reference.reachabilityFence(arg_a);
Reference.reachabilityFence(arg_b);
* i.e it will be avoided during path finding.
*/
public void add_banned(org.ldk.structs.NodeId node_id) {
- bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, node_id == null ? 0 : node_id.ptr);
+ bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, node_id.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(node_id);
if (this != null) { this.ptrs_to.add(node_id); };
* they will be avoided during path finding.
*/
public void add_banned_from_list(NodeId[] node_ids) {
- bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, node_ids != null ? Arrays.stream(node_ids).mapToLong(node_ids_conv_8 -> node_ids_conv_8 == null ? 0 : node_ids_conv_8.ptr).toArray() : null);
+ bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, node_ids != null ? Arrays.stream(node_ids).mapToLong(node_ids_conv_8 -> node_ids_conv_8.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(node_ids);
for (NodeId node_ids_conv_8: node_ids) { if (this != null) { this.ptrs_to.add(node_ids_conv_8); }; };
* Removes the node with the given `node_id` from the list of nodes to avoid.
*/
public void remove_banned(org.ldk.structs.NodeId node_id) {
- bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, node_id == null ? 0 : node_id.ptr);
+ bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, node_id.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(node_id);
if (this != null) { this.ptrs_to.add(node_id); };
* Sets a manual penalty for the given node.
*/
public void set_manual_penalty(org.ldk.structs.NodeId node_id, long penalty) {
- bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, node_id == null ? 0 : node_id.ptr, penalty);
+ bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, node_id.ptr, penalty);
Reference.reachabilityFence(this);
Reference.reachabilityFence(node_id);
Reference.reachabilityFence(penalty);
* Removes the node with the given `node_id` from the list of manual penalties.
*/
public void remove_manual_penalty(org.ldk.structs.NodeId node_id) {
- bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, node_id == null ? 0 : node_id.ptr);
+ bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, node_id.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(node_id);
if (this != null) { this.ptrs_to.add(node_id); };
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.ProbeSendFailure b) {
- boolean ret = bindings.ProbeSendFailure_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ProbeSendFailure_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
*/
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
public class Quantity extends CommonBase {
- Quantity(Object _dummy, long ptr) { super(ptr); }
+ private Quantity(Object _dummy, long ptr) { super(ptr); }
@Override @SuppressWarnings("deprecation")
protected void finalize() throws Throwable {
super.finalize();
if (ptr != 0) { bindings.Quantity_free(ptr); }
}
+ static Quantity constr_from_ptr(long ptr) {
+ bindings.LDKQuantity raw_val = bindings.LDKQuantity_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKQuantity.Bounded.class) {
+ return new Bounded(ptr, (bindings.LDKQuantity.Bounded)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKQuantity.Unbounded.class) {
+ return new Unbounded(ptr, (bindings.LDKQuantity.Unbounded)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKQuantity.One.class) {
+ return new One(ptr, (bindings.LDKQuantity.One)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+ /**
+ * Up to a specific number of items (inclusive). Use when more than one item can be requested
+ * but is limited (e.g., because of per customer or inventory limits).
+ *
+ * May be used with `NonZeroU64::new(1)` but prefer to use [`Quantity::One`] if only one item
+ * is supported.
+ */
+ public final static class Bounded extends Quantity {
+ public final long bounded;
+ private Bounded(long ptr, bindings.LDKQuantity.Bounded obj) {
+ super(null, ptr);
+ this.bounded = obj.bounded;
+ }
+ }
+ /**
+ * One or more items. Use when more than one item can be requested without any limit.
+ */
+ public final static class Unbounded extends Quantity {
+ private Unbounded(long ptr, bindings.LDKQuantity.Unbounded obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * Only one item. Use when only a single item can be requested.
+ */
+ public final static class One extends Quantity {
+ private One(long ptr, bindings.LDKQuantity.One obj) {
+ super(null, ptr);
+ }
+ }
long clone_ptr() {
long ret = bindings.Quantity_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
long ret = bindings.Quantity_clone(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+ org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new Bounded-variant Quantity
+ */
+ public static Quantity bounded(long a) {
+ long ret = bindings.Quantity_bounded(a);
+ Reference.reachabilityFence(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Unbounded-variant Quantity
+ */
+ public static Quantity unbounded() {
+ long ret = bindings.Quantity_unbounded();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new One-variant Quantity
+ */
+ public static Quantity one() {
+ long ret = bindings.Quantity_one();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.QueryChannelRange b) {
- boolean ret = bindings.QueryChannelRange_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.QueryChannelRange_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.QueryShortChannelIds b) {
- boolean ret = bindings.QueryShortChannelIds_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.QueryShortChannelIds_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An implementation of [`EntropySource`] using ChaCha20.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class RandomBytes extends CommonBase {
+ RandomBytes(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.RandomBytes_free(ptr); }
+ }
+
+ /**
+ * Creates a new instance using the given seed.
+ */
+ public static RandomBytes of(byte[] seed) {
+ long ret = bindings.RandomBytes_new(InternalUtils.check_arr_len(seed, 32));
+ Reference.reachabilityFence(seed);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.RandomBytes ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RandomBytes(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new EntropySource which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
+ */
+ public EntropySource as_EntropySource() {
+ long ret = bindings.RandomBytes_as_EntropySource(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ EntropySource ret_hu_conv = new EntropySource(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+}
* Instantiate a new [`RapidGossipSync`] instance.
*/
public static RapidGossipSync of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger) {
- long ret = bindings.RapidGossipSync_new(network_graph == null ? 0 : network_graph.ptr, logger.ptr);
+ long ret = bindings.RapidGossipSync_new(network_graph.ptr, logger.ptr);
Reference.reachabilityFence(network_graph);
Reference.reachabilityFence(logger);
if (ret >= 0 && ret <= 4096) { return null; }
* data part
*/
public void set_data(org.ldk.structs.RawDataPart val) {
- bindings.RawBolt11Invoice_set_data(this.ptr, val == null ? 0 : val.ptr);
+ bindings.RawBolt11Invoice_set_data(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RawBolt11Invoice b) {
- boolean ret = bindings.RawBolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RawBolt11Invoice_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
return ret_conv_14_arr;
}
+ /**
+ * Returns `None` if no amount is set or on overflow.
+ */
public Option_u64Z amount_pico_btc() {
long ret = bindings.RawBolt11Invoice_amount_pico_btc(this.ptr);
Reference.reachabilityFence(this);
* generation time of the invoice
*/
public void set_timestamp(org.ldk.structs.PositiveTimestamp val) {
- bindings.RawDataPart_set_timestamp(this.ptr, val == null ? 0 : val.ptr);
+ bindings.RawDataPart_set_timestamp(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RawDataPart b) {
- boolean ret = bindings.RawDataPart_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RawDataPart_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
*/
@Nullable
public NodeInfo node(org.ldk.structs.NodeId node_id) {
- long ret = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id == null ? 0 : node_id.ptr);
+ long ret = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(node_id);
if (ret >= 0 && ret <= 4096) { return null; }
* Constraints for the receiver of this payment.
*/
public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) {
- bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val == null ? 0 : val.ptr);
+ bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * Context for the receiver of this payment.
+ */
+ public PaymentContext get_payment_context() {
+ long ret = bindings.ReceiveTlvs_get_payment_context(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Context for the receiver of this payment.
+ */
+ public void set_payment_context(org.ldk.structs.PaymentContext val) {
+ bindings.ReceiveTlvs_set_payment_context(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
/**
* Constructs a new ReceiveTlvs given each field
*/
- public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg) {
- long ret = bindings.ReceiveTlvs_new(InternalUtils.check_arr_len(payment_secret_arg, 32), payment_constraints_arg == null ? 0 : payment_constraints_arg.ptr);
+ public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.PaymentContext payment_context_arg) {
+ long ret = bindings.ReceiveTlvs_new(InternalUtils.check_arr_len(payment_secret_arg, 32), payment_constraints_arg.ptr, payment_context_arg.ptr);
Reference.reachabilityFence(payment_secret_arg);
Reference.reachabilityFence(payment_constraints_arg);
+ Reference.reachabilityFence(payment_context_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ReceiveTlvs ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReceiveTlvs(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_constraints_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RecipientOnionFields b) {
- boolean ret = bindings.RecipientOnionFields_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RecipientOnionFields_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* See [`Self::custom_tlvs`] for more info.
*/
public Result_RecipientOnionFieldsNoneZ with_custom_tlvs(TwoTuple_u64CVec_u8ZZ[] custom_tlvs) {
- long ret = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0).toArray() : null);
+ long ret = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(custom_tlvs);
if (ret >= 0 && ret <= 4096) { return null; }
/**
* The channel id of the channel pertaining to the logged record. May be a temporary id before
* the channel has been funded.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public Option_ThirtyTwoBytesZ get_channel_id() {
+ @Nullable
+ public ChannelId get_channel_id() {
long ret = bindings.Record_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Option_ThirtyTwoBytesZ ret_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(ret);
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
* The channel id of the channel pertaining to the logged record. May be a temporary id before
* the channel has been funded.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public void set_channel_id(org.ldk.structs.Option_ThirtyTwoBytesZ val) {
- bindings.Record_set_channel_id(this.ptr, val.ptr);
+ public void set_channel_id(@Nullable org.ldk.structs.ChannelId val) {
+ bindings.Record_set_channel_id(this.ptr, val == null ? 0 : val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new Record given each field
*
* Note that peer_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static Record of(org.ldk.enums.Level level_arg, @Nullable byte[] peer_id_arg, org.ldk.structs.Option_ThirtyTwoBytesZ channel_id_arg, java.lang.String args_arg, java.lang.String module_path_arg, java.lang.String file_arg, int line_arg) {
- long ret = bindings.Record_new(level_arg, InternalUtils.check_arr_len(peer_id_arg, 33), channel_id_arg.ptr, args_arg, module_path_arg, file_arg, line_arg);
+ public static Record of(org.ldk.enums.Level level_arg, @Nullable byte[] peer_id_arg, @Nullable org.ldk.structs.ChannelId channel_id_arg, java.lang.String args_arg, java.lang.String module_path_arg, java.lang.String file_arg, int line_arg) {
+ long ret = bindings.Record_new(level_arg, InternalUtils.check_arr_len(peer_id_arg, 33), channel_id_arg == null ? 0 : channel_id_arg.ptr, args_arg, module_path_arg, file_arg, line_arg);
Reference.reachabilityFence(level_arg);
Reference.reachabilityFence(peer_id_arg);
Reference.reachabilityFence(channel_id_arg);
return ret_hu_conv;
}
+ /**
+ * Generates a non-cryptographic 64-bit hash of the Refund.
+ */
+ public long hash() {
+ long ret = bindings.Refund_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
/**
* Serialize the Refund object into a byte array which can be read by Refund_read
*/
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds a [`Refund`] for the \"offer for money\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class RefundMaybeWithDerivedMetadataBuilder extends CommonBase {
+ RefundMaybeWithDerivedMetadataBuilder(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.RefundMaybeWithDerivedMetadataBuilder_free(ptr); }
+ }
+
+ long clone_ptr() {
+ long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the RefundMaybeWithDerivedMetadataBuilder
+ */
+ public RefundMaybeWithDerivedMetadataBuilder clone() {
+ long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new builder for a refund using the [`Refund::payer_id`] for the public node id to
+ * send to if no [`Refund::paths`] are set. Otherwise, it may be a transient pubkey.
+ *
+ * Additionally, sets the required (empty) [`Refund::description`], [`Refund::payer_metadata`],
+ * and [`Refund::amount_msats`].
+ *
+ * # Note
+ *
+ * If constructing a [`Refund`] for use with a [`ChannelManager`], use
+ * [`ChannelManager::create_refund_builder`] instead of [`RefundBuilder::new`].
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+ * [`ChannelManager::create_refund_builder`]: crate::ln::channelmanager::ChannelManager::create_refund_builder
+ */
+ public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ of(byte[] metadata, byte[] payer_id, long amount_msats) {
+ long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_new(metadata, InternalUtils.check_arr_len(payer_id, 33), amount_msats);
+ Reference.reachabilityFence(metadata);
+ Reference.reachabilityFence(payer_id);
+ Reference.reachabilityFence(amount_msats);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Similar to [`RefundBuilder::new`] except, if [`RefundBuilder::path`] is called, the payer id
+ * is derived from the given [`ExpandedKey`] and nonce. This provides sender privacy by using a
+ * different payer id for each refund, assuming a different nonce is used. Otherwise, the
+ * provided `node_id` is used for the payer id.
+ *
+ * Also, sets the metadata when [`RefundBuilder::build`] is called such that it can be used to
+ * verify that an [`InvoiceRequest`] was produced for the refund given an [`ExpandedKey`].
+ *
+ * The `payment_id` is encrypted in the metadata and should be unique. This ensures that only
+ * one invoice will be paid for the refund and that payments can be uniquely identified.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
+ */
+ public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ deriving_payer_id(byte[] node_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, long amount_msats, byte[] payment_id) {
+ long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(InternalUtils.check_arr_len(node_id, 33), expanded_key.ptr, entropy_source.ptr, amount_msats, InternalUtils.check_arr_len(payment_id, 32));
+ Reference.reachabilityFence(node_id);
+ Reference.reachabilityFence(expanded_key);
+ Reference.reachabilityFence(entropy_source);
+ Reference.reachabilityFence(amount_msats);
+ Reference.reachabilityFence(payment_id);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(expanded_key); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Sets the [`Refund::description`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void description(java.lang.String description) {
+ bindings.RefundMaybeWithDerivedMetadataBuilder_description(this.ptr, description);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(description);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Refund::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has
+ * already passed is valid and can be checked for using [`Refund::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void absolute_expiry(long absolute_expiry) {
+ bindings.RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(absolute_expiry);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Refund::issuer`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void issuer(java.lang.String issuer) {
+ bindings.RefundMaybeWithDerivedMetadataBuilder_issuer(this.ptr, issuer);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(issuer);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Adds a blinded path to [`Refund::paths`]. Must include at least one path if only connected
+ * by private channels or if [`Refund::payer_id`] is not a public node id.
+ *
+ * Successive calls to this method will add another blinded path. Caller is responsible for not
+ * adding duplicate paths.
+ */
+ public void path(org.ldk.structs.BlindedPath path) {
+ bindings.RefundMaybeWithDerivedMetadataBuilder_path(this.ptr, path.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(path);
+ if (this != null) { this.ptrs_to.add(path); };
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Refund::chain`] of the given [`Network`] for paying an invoice. If not
+ * called, [`Network::Bitcoin`] is assumed.
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void chain(org.ldk.enums.Network network) {
+ bindings.RefundMaybeWithDerivedMetadataBuilder_chain(this.ptr, network);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(network);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets [`Refund::quantity`] of items. This is purely for informational purposes. It is useful
+ * when the refund pertains to a [`Bolt12Invoice`] that paid for more than one item from an
+ * [`Offer`] as specified by [`InvoiceRequest::quantity`].
+ *
+ * Successive calls to this method will override the previous setting.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+ public void quantity(long quantity) {
+ bindings.RefundMaybeWithDerivedMetadataBuilder_quantity(this.ptr, quantity);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(quantity);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Sets the [`Refund::payer_note`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void payer_note(java.lang.String payer_note) {
+ bindings.RefundMaybeWithDerivedMetadataBuilder_payer_note(this.ptr, payer_note);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payer_note);
+ if (this != null) { this.ptrs_to.add(this); };
+ }
+
+ /**
+ * Builds a [`Refund`] after checking for valid semantics.
+ */
+ public Result_RefundBolt12SemanticErrorZ build() {
+ long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_build(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ReplyChannelRange b) {
- boolean ret = bindings.ReplyChannelRange_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ReplyChannelRange_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ReplyShortChannelIdsEnd b) {
- boolean ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
if (ptr != 0) { bindings.CResult_AcceptChannelDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_AcceptChannelDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_AcceptChannelDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_AcceptChannelDecodeErrorZ_is_ok(ptr)) {
return new Result_AcceptChannelDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_AcceptChannelDecodeErrorZ in the success state.
*/
public static Result_AcceptChannelDecodeErrorZ ok(org.ldk.structs.AcceptChannel o) {
- long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_AcceptChannelV2DecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_AcceptChannelV2DecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_AcceptChannelV2DecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_AcceptChannelV2DecodeErrorZ_is_ok(ptr)) {
return new Result_AcceptChannelV2DecodeErrorZ_OK(null, ptr);
* Creates a new CResult_AcceptChannelV2DecodeErrorZ in the success state.
*/
public static Result_AcceptChannelV2DecodeErrorZ ok(org.ldk.structs.AcceptChannelV2 o) {
- long ret = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_AcceptChannelV2DecodeErrorZ ret_hu_conv = Result_AcceptChannelV2DecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_AnnouncementSignaturesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(ptr)) {
return new Result_AnnouncementSignaturesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state.
*/
public static Result_AnnouncementSignaturesDecodeErrorZ ok(org.ldk.structs.AnnouncementSignatures o) {
- long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_BestBlockDecodeErrorZ extends CommonBase {
+ private Result_BestBlockDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_BestBlockDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BestBlockDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_BestBlockDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_BestBlockDecodeErrorZ_is_ok(ptr)) {
+ return new Result_BestBlockDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_BestBlockDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_BestBlockDecodeErrorZ_OK extends Result_BestBlockDecodeErrorZ {
+ public final BestBlock res;
+ private Result_BestBlockDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_BestBlockDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.BestBlock res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.BestBlock(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_BestBlockDecodeErrorZ_Err extends Result_BestBlockDecodeErrorZ {
+ public final DecodeError err;
+ private Result_BestBlockDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_BestBlockDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_BestBlockDecodeErrorZ in the success state.
+ */
+ public static Result_BestBlockDecodeErrorZ ok(org.ldk.structs.BestBlock o) {
+ long ret = bindings.CResult_BestBlockDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_BestBlockDecodeErrorZ in the error state.
+ */
+ public static Result_BestBlockDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_BestBlockDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_BestBlockDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_BestBlockDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_BestBlockDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_BestBlockDecodeErrorZ clone() {
+ long ret = bindings.CResult_BestBlockDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_BigSizeDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BigSizeDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_BigSizeDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_BigSizeDecodeErrorZ_is_ok(ptr)) {
return new Result_BigSizeDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_BigSizeDecodeErrorZ in the success state.
*/
public static Result_BigSizeDecodeErrorZ ok(org.ldk.structs.BigSize o) {
- long ret = bindings.CResult_BigSizeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_BigSizeDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_BigSizeDecodeErrorZ ret_hu_conv = Result_BigSizeDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_BlindedFailureDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BlindedFailureDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_BlindedFailureDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_BlindedFailureDecodeErrorZ_is_ok(ptr)) {
return new Result_BlindedFailureDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_BlindedForwardDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BlindedForwardDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_BlindedForwardDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_BlindedForwardDecodeErrorZ_is_ok(ptr)) {
return new Result_BlindedForwardDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_BlindedForwardDecodeErrorZ in the success state.
*/
public static Result_BlindedForwardDecodeErrorZ ok(org.ldk.structs.BlindedForward o) {
- long ret = bindings.CResult_BlindedForwardDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_BlindedForwardDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_BlindedForwardDecodeErrorZ ret_hu_conv = Result_BlindedForwardDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_BlindedHopDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BlindedHopDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_BlindedHopDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_BlindedHopDecodeErrorZ_is_ok(ptr)) {
return new Result_BlindedHopDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_BlindedHopDecodeErrorZ in the success state.
*/
public static Result_BlindedHopDecodeErrorZ ok(org.ldk.structs.BlindedHop o) {
- long ret = bindings.CResult_BlindedHopDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_BlindedHopDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_BlindedHopDecodeErrorZ ret_hu_conv = Result_BlindedHopDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_BlindedHopFeaturesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BlindedHopFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_BlindedHopFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(ptr)) {
return new Result_BlindedHopFeaturesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_BlindedHopFeaturesDecodeErrorZ in the success state.
*/
public static Result_BlindedHopFeaturesDecodeErrorZ ok(org.ldk.structs.BlindedHopFeatures o) {
- long ret = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_BlindedHopFeaturesDecodeErrorZ ret_hu_conv = Result_BlindedHopFeaturesDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_BlindedPathDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BlindedPathDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_BlindedPathDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_BlindedPathDecodeErrorZ_is_ok(ptr)) {
return new Result_BlindedPathDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_BlindedPathDecodeErrorZ in the success state.
*/
public static Result_BlindedPathDecodeErrorZ ok(org.ldk.structs.BlindedPath o) {
- long ret = bindings.CResult_BlindedPathDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_BlindedPathDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_BlindedPathDecodeErrorZ ret_hu_conv = Result_BlindedPathDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_BlindedPathNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BlindedPathNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_BlindedPathNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_BlindedPathNoneZ_is_ok(ptr)) {
return new Result_BlindedPathNoneZ_OK(null, ptr);
* Creates a new CResult_BlindedPathNoneZ in the success state.
*/
public static Result_BlindedPathNoneZ ok(org.ldk.structs.BlindedPath o) {
- long ret = bindings.CResult_BlindedPathNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_BlindedPathNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_BlindedPathNoneZ ret_hu_conv = Result_BlindedPathNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_BlindedPayInfoDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BlindedPayInfoDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_BlindedPayInfoDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_BlindedPayInfoDecodeErrorZ_is_ok(ptr)) {
return new Result_BlindedPayInfoDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_BlindedPayInfoDecodeErrorZ in the success state.
*/
public static Result_BlindedPayInfoDecodeErrorZ ok(org.ldk.structs.BlindedPayInfo o) {
- long ret = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_BlindedPayInfoDecodeErrorZ ret_hu_conv = Result_BlindedPayInfoDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_BlindedTailDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BlindedTailDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_BlindedTailDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_BlindedTailDecodeErrorZ_is_ok(ptr)) {
return new Result_BlindedTailDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_BlindedTailDecodeErrorZ in the success state.
*/
public static Result_BlindedTailDecodeErrorZ ok(org.ldk.structs.BlindedTail o) {
- long ret = bindings.CResult_BlindedTailDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_BlindedTailDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_BlindedTailDecodeErrorZ ret_hu_conv = Result_BlindedTailDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_Bolt11InvoiceBolt11SemanticErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_is_ok(ptr)) {
return new Result_Bolt11InvoiceBolt11SemanticErrorZ_OK(null, ptr);
* Creates a new CResult_Bolt11InvoiceBolt11SemanticErrorZ in the success state.
*/
public static Result_Bolt11InvoiceBolt11SemanticErrorZ ok(org.ldk.structs.Bolt11Invoice o) {
- long ret = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt11InvoiceBolt11SemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_Bolt11InvoiceFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(ptr)) {
return new Result_Bolt11InvoiceFeaturesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_Bolt11InvoiceFeaturesDecodeErrorZ in the success state.
*/
public static Result_Bolt11InvoiceFeaturesDecodeErrorZ ok(org.ldk.structs.Bolt11InvoiceFeatures o) {
- long ret = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt11InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_Bolt11InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_Bolt11InvoiceParseOrSemanticErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_is_ok(ptr)) {
return new Result_Bolt11InvoiceParseOrSemanticErrorZ_OK(null, ptr);
* Creates a new CResult_Bolt11InvoiceParseOrSemanticErrorZ in the success state.
*/
public static Result_Bolt11InvoiceParseOrSemanticErrorZ ok(org.ldk.structs.Bolt11Invoice o) {
- long ret = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt11InvoiceParseOrSemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceParseOrSemanticErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_Bolt11InvoiceSignOrCreationErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(ptr)) {
return new Result_Bolt11InvoiceSignOrCreationErrorZ_OK(null, ptr);
* Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ in the success state.
*/
public static Result_Bolt11InvoiceSignOrCreationErrorZ ok(org.ldk.structs.Bolt11Invoice o) {
- long ret = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_Bolt12InvoiceBolt12SemanticErrorZ extends CommonBase {
+ private Result_Bolt12InvoiceBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_Bolt12InvoiceBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_Bolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_Bolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_Bolt12InvoiceBolt12SemanticErrorZ_OK extends Result_Bolt12InvoiceBolt12SemanticErrorZ {
+ public final Bolt12Invoice res;
+ private Result_Bolt12InvoiceBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.Bolt12Invoice res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12Invoice(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_Bolt12InvoiceBolt12SemanticErrorZ_Err extends Result_Bolt12InvoiceBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_Bolt12InvoiceBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_Bolt12InvoiceBolt12SemanticErrorZ ok(org.ldk.structs.Bolt12Invoice o) {
+ long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_Bolt12InvoiceBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_Bolt12InvoiceBolt12SemanticErrorZ clone() {
+ long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_Bolt12InvoiceFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(ptr)) {
return new Result_Bolt12InvoiceFeaturesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_Bolt12InvoiceFeaturesDecodeErrorZ in the success state.
*/
public static Result_Bolt12InvoiceFeaturesDecodeErrorZ ok(org.ldk.structs.Bolt12InvoiceFeatures o) {
- long ret = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt12InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_Bolt12InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_Bolt12OfferContextDecodeErrorZ extends CommonBase {
+ private Result_Bolt12OfferContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_Bolt12OfferContextDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_Bolt12OfferContextDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_Bolt12OfferContextDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(ptr)) {
+ return new Result_Bolt12OfferContextDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_Bolt12OfferContextDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_Bolt12OfferContextDecodeErrorZ_OK extends Result_Bolt12OfferContextDecodeErrorZ {
+ public final Bolt12OfferContext res;
+ private Result_Bolt12OfferContextDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.Bolt12OfferContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_Bolt12OfferContextDecodeErrorZ_Err extends Result_Bolt12OfferContextDecodeErrorZ {
+ public final DecodeError err;
+ private Result_Bolt12OfferContextDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the success state.
+ */
+ public static Result_Bolt12OfferContextDecodeErrorZ ok(org.ldk.structs.Bolt12OfferContext o) {
+ long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the error state.
+ */
+ public static Result_Bolt12OfferContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_Bolt12OfferContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_Bolt12OfferContextDecodeErrorZ clone() {
+ long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_Bolt12RefundContextDecodeErrorZ extends CommonBase {
+ private Result_Bolt12RefundContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_Bolt12RefundContextDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_Bolt12RefundContextDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_Bolt12RefundContextDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(ptr)) {
+ return new Result_Bolt12RefundContextDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_Bolt12RefundContextDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_Bolt12RefundContextDecodeErrorZ_OK extends Result_Bolt12RefundContextDecodeErrorZ {
+ public final Bolt12RefundContext res;
+ private Result_Bolt12RefundContextDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.Bolt12RefundContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_Bolt12RefundContextDecodeErrorZ_Err extends Result_Bolt12RefundContextDecodeErrorZ {
+ public final DecodeError err;
+ private Result_Bolt12RefundContextDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the success state.
+ */
+ public static Result_Bolt12RefundContextDecodeErrorZ ok(org.ldk.structs.Bolt12RefundContext o) {
+ long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the error state.
+ */
+ public static Result_Bolt12RefundContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_Bolt12RefundContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_Bolt12RefundContextDecodeErrorZ clone() {
+ long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_BuiltCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(ptr)) {
return new Result_BuiltCommitmentTransactionDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the success state.
*/
public static Result_BuiltCommitmentTransactionDecodeErrorZ ok(org.ldk.structs.BuiltCommitmentTransaction o) {
- long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ extends CommonBase {
+ private Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(ptr)) {
+ return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK extends Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ {
+ public final TwoTuple_BestBlockOutputSweeperZ res;
+ private Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(ptr);
+ TwoTuple_BestBlockOutputSweeperZ res_hu_conv = new TwoTuple_BestBlockOutputSweeperZ(null, res);
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err extends Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ {
+ public final DecodeError err;
+ private Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the success state.
+ */
+ public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ok(org.ldk.structs.TwoTuple_BestBlockOutputSweeperZ o) {
+ long ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the error state.
+ */
+ public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+}
if (ptr != 0) { bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_is_ok(ptr)) {
return new Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_OK(null, ptr);
* Creates a new CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ in the success state.
*/
public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ok(org.ldk.structs.TwoTuple_BlindedPayInfoBlindedPathZ o) {
- long ret = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_C2Tuple_CVec_u8Zu64ZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_is_ok(ptr)) {
return new Result_C2Tuple_CVec_u8Zu64ZNoneZ_OK(null, ptr);
* Creates a new CResult_C2Tuple_CVec_u8Zu64ZNoneZ in the success state.
*/
public static Result_C2Tuple_CVec_u8Zu64ZNoneZ ok(org.ldk.structs.TwoTuple_CVec_u8Zu64Z o) {
- long ret = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_CVec_u8Zu64ZNoneZ ret_hu_conv = Result_C2Tuple_CVec_u8Zu64ZNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok(ptr)) {
return new Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_OK(null, ptr);
* Creates a new CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ in the success state.
*/
public static Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ok(org.ldk.structs.TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ o) {
- long ret = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret_hu_conv = Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_is_ok(ptr)) {
return new Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the success state.
*/
public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelManagerZ o) {
- long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_is_ok(ptr)) {
return new Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the success state.
*/
public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelMonitorZ o) {
- long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_is_ok(ptr)) {
return new Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_OK(null, ptr);
* Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the success state.
*/
public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelMonitorZ o) {
- long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok(ptr)) {
return new Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_OK(null, ptr);
* Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ in the success state.
*/
public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ o) {
- long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(ptr); ptr = 0; }
+ }
+
static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ constr_from_ptr(long ptr) {
if (bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(ptr)) {
return new Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_OK(null, ptr);
* Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ in the success state.
*/
public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ o) {
- long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(ptr)) {
return new Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_OK(null, ptr);
* Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ in the success state.
*/
public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ok(org.ldk.structs.ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ o) {
- long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
return ret;
}
+ long clone_ptr() {
+ long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ clone() {
+ long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
if (ptr != 0) { bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(ptr)) {
return new Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_OK(null, ptr);
* Creates a new CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ in the success state.
*/
public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ok(org.ldk.structs.ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o) {
- long ret = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o != null ? o.ptr : 0);
+ long ret = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_COption_APIErrorZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_COption_APIErrorZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_COption_APIErrorZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_COption_APIErrorZDecodeErrorZ_is_ok(ptr)) {
return new Result_COption_APIErrorZDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_COption_ClosureReasonZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_COption_ClosureReasonZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_COption_ClosureReasonZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(ptr)) {
return new Result_COption_ClosureReasonZDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_COption_EventZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_COption_EventZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_COption_EventZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_COption_EventZDecodeErrorZ_is_ok(ptr)) {
return new Result_COption_EventZDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_COption_HTLCDestinationZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_is_ok(ptr)) {
return new Result_COption_HTLCDestinationZDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_COption_MonitorEventZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_COption_MonitorEventZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_COption_MonitorEventZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_COption_MonitorEventZDecodeErrorZ_is_ok(ptr)) {
return new Result_COption_MonitorEventZDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_COption_NetworkUpdateZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(ptr)) {
return new Result_COption_NetworkUpdateZDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_COption_OnionMessageContentsZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_COption_OnionMessageContentsZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_COption_OnionMessageContentsZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_COption_OnionMessageContentsZDecodeErrorZ_is_ok(ptr)) {
return new Result_COption_OnionMessageContentsZDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_COption_PathFailureZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_COption_PathFailureZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_COption_PathFailureZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_COption_PathFailureZDecodeErrorZ_is_ok(ptr)) {
return new Result_COption_PathFailureZDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_COption_TypeZDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_COption_TypeZDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_COption_TypeZDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_COption_TypeZDecodeErrorZ_is_ok(ptr)) {
return new Result_COption_TypeZDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_CVec_BlindedPathZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_BlindedPathZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_BlindedPathZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_BlindedPathZNoneZ_is_ok(ptr)) {
return new Result_CVec_BlindedPathZNoneZ_OK(null, ptr);
* Creates a new CResult_CVec_BlindedPathZNoneZ in the success state.
*/
public static Result_CVec_BlindedPathZNoneZ ok(BlindedPath[] o) {
- long ret = bindings.CResult_CVec_BlindedPathZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_13 -> o_conv_13 == null ? 0 : o_conv_13.ptr).toArray() : null);
+ long ret = bindings.CResult_CVec_BlindedPathZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_13 -> o_conv_13.ptr).toArray() : null);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CVec_BlindedPathZNoneZ ret_hu_conv = Result_CVec_BlindedPathZNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_is_ok(ptr)) {
return new Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_OK(null, ptr);
* Creates a new CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ in the success state.
*/
public static Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ok(TwoTuple_BlindedPayInfoBlindedPathZ[] o) {
- long ret = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_37 -> o_conv_37 != null ? o_conv_37.ptr : 0).toArray() : null);
+ long ret = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_37 -> o_conv_37.ptr).toArray() : null);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ret_hu_conv = Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_is_ok(ptr)) {
return new Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_OK(null, ptr);
* Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the success state.
*/
public static Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ ok(TwoTuple_ThirtyTwoBytesChannelMonitorZ[] o) {
- long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40 != null ? o_conv_40.ptr : 0).toArray() : null);
+ long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40.ptr).toArray() : null);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ ret_hu_conv = Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_is_ok(ptr)) {
return new Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_OK(null, ptr);
* Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ in the success state.
*/
public static Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ok(TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ[] o) {
- long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40 != null ? o_conv_40.ptr : 0).toArray() : null);
+ long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40.ptr).toArray() : null);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ret_hu_conv = Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CVec_ECDSASignatureZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_ECDSASignatureZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_ECDSASignatureZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_ECDSASignatureZNoneZ_is_ok(ptr)) {
return new Result_CVec_ECDSASignatureZNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_CVec_StrZIOErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_StrZIOErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_StrZIOErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_StrZIOErrorZ_is_ok(ptr)) {
return new Result_CVec_StrZIOErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_CVec_UtxoZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_UtxoZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_UtxoZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_UtxoZNoneZ_is_ok(ptr)) {
return new Result_CVec_UtxoZNoneZ_OK(null, ptr);
* Creates a new CResult_CVec_UtxoZNoneZ in the success state.
*/
public static Result_CVec_UtxoZNoneZ ok(Utxo[] o) {
- long ret = bindings.CResult_CVec_UtxoZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_6 -> o_conv_6 == null ? 0 : o_conv_6.ptr).toArray() : null);
+ long ret = bindings.CResult_CVec_UtxoZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_6 -> o_conv_6.ptr).toArray() : null);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CVec_UtxoZNoneZ ret_hu_conv = Result_CVec_UtxoZNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CVec_u8ZIOErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_u8ZIOErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_u8ZIOErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_u8ZIOErrorZ_is_ok(ptr)) {
return new Result_CVec_u8ZIOErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_CVec_u8ZNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_u8ZNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_u8ZNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_u8ZNoneZ_is_ok(ptr)) {
return new Result_CVec_u8ZNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_CVec_u8ZPeerHandleErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CVec_u8ZPeerHandleErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_CVec_u8ZPeerHandleErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_CVec_u8ZPeerHandleErrorZ_is_ok(ptr)) {
return new Result_CVec_u8ZPeerHandleErrorZ_OK(null, ptr);
* Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state.
*/
public static Result_CVec_u8ZPeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) {
- long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : e.ptr);
+ long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e.ptr);
Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelAnnouncementDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelAnnouncementDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelAnnouncementDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state.
*/
public static Result_ChannelAnnouncementDecodeErrorZ ok(org.ldk.structs.ChannelAnnouncement o) {
- long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelConfigDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelConfigDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelConfigDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelConfigDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelConfigDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelConfigDecodeErrorZ in the success state.
*/
public static Result_ChannelConfigDecodeErrorZ ok(org.ldk.structs.ChannelConfig o) {
- long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelCounterpartyDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelCounterpartyDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelCounterpartyDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelCounterpartyDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelCounterpartyDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the success state.
*/
public static Result_ChannelCounterpartyDecodeErrorZ ok(org.ldk.structs.ChannelCounterparty o) {
- long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelCounterpartyDecodeErrorZ ret_hu_conv = Result_ChannelCounterpartyDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelDerivationParametersDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelDerivationParametersDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelDerivationParametersDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelDerivationParametersDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelDerivationParametersDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelDerivationParametersDecodeErrorZ in the success state.
*/
public static Result_ChannelDerivationParametersDecodeErrorZ ok(org.ldk.structs.ChannelDerivationParameters o) {
- long ret = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelDerivationParametersDecodeErrorZ ret_hu_conv = Result_ChannelDerivationParametersDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelDetailsDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelDetailsDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelDetailsDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelDetailsDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelDetailsDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelDetailsDecodeErrorZ in the success state.
*/
public static Result_ChannelDetailsDecodeErrorZ ok(org.ldk.structs.ChannelDetails o) {
- long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelDetailsDecodeErrorZ ret_hu_conv = Result_ChannelDetailsDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelFeaturesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelFeaturesDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelFeaturesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state.
*/
public static Result_ChannelFeaturesDecodeErrorZ ok(org.ldk.structs.ChannelFeatures o) {
- long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_ChannelIdAPIErrorZ extends CommonBase {
+ private Result_ChannelIdAPIErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_ChannelIdAPIErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelIdAPIErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_ChannelIdAPIErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_ChannelIdAPIErrorZ_is_ok(ptr)) {
+ return new Result_ChannelIdAPIErrorZ_OK(null, ptr);
+ } else {
+ return new Result_ChannelIdAPIErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_ChannelIdAPIErrorZ_OK extends Result_ChannelIdAPIErrorZ {
+ public final ChannelId res;
+ private Result_ChannelIdAPIErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_ChannelIdAPIErrorZ_get_ok(ptr);
+ org.ldk.structs.ChannelId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.ChannelId(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_ChannelIdAPIErrorZ_Err extends Result_ChannelIdAPIErrorZ {
+ public final APIError err;
+ private Result_ChannelIdAPIErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_ChannelIdAPIErrorZ_get_err(ptr);
+ org.ldk.structs.APIError err_hu_conv = org.ldk.structs.APIError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_ChannelIdAPIErrorZ in the success state.
+ */
+ public static Result_ChannelIdAPIErrorZ ok(org.ldk.structs.ChannelId o) {
+ long ret = bindings.CResult_ChannelIdAPIErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelIdAPIErrorZ in the error state.
+ */
+ public static Result_ChannelIdAPIErrorZ err(org.ldk.structs.APIError e) {
+ long ret = bindings.CResult_ChannelIdAPIErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_ChannelIdAPIErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_ChannelIdAPIErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_ChannelIdAPIErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelIdAPIErrorZ clone() {
+ long ret = bindings.CResult_ChannelIdAPIErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_ChannelIdDecodeErrorZ extends CommonBase {
+ private Result_ChannelIdDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_ChannelIdDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelIdDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_ChannelIdDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_ChannelIdDecodeErrorZ_is_ok(ptr)) {
+ return new Result_ChannelIdDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_ChannelIdDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_ChannelIdDecodeErrorZ_OK extends Result_ChannelIdDecodeErrorZ {
+ public final ChannelId res;
+ private Result_ChannelIdDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_ChannelIdDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.ChannelId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.ChannelId(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_ChannelIdDecodeErrorZ_Err extends Result_ChannelIdDecodeErrorZ {
+ public final DecodeError err;
+ private Result_ChannelIdDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_ChannelIdDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_ChannelIdDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelIdDecodeErrorZ ok(org.ldk.structs.ChannelId o) {
+ long ret = bindings.CResult_ChannelIdDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelIdDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelIdDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_ChannelIdDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_ChannelIdDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_ChannelIdDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_ChannelIdDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelIdDecodeErrorZ clone() {
+ long ret = bindings.CResult_ChannelIdDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_ChannelInfoDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelInfoDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelInfoDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelInfoDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelInfoDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelInfoDecodeErrorZ in the success state.
*/
public static Result_ChannelInfoDecodeErrorZ ok(org.ldk.structs.ChannelInfo o) {
- long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelMonitorUpdateDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelMonitorUpdateDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state.
*/
public static Result_ChannelMonitorUpdateDecodeErrorZ ok(org.ldk.structs.ChannelMonitorUpdate o) {
- long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateStatusNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateStatusNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelMonitorUpdateStatusNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelMonitorUpdateStatusNoneZ_is_ok(ptr)) {
return new Result_ChannelMonitorUpdateStatusNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_ChannelPublicKeysDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelPublicKeysDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelPublicKeysDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelPublicKeysDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelPublicKeysDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the success state.
*/
public static Result_ChannelPublicKeysDecodeErrorZ ok(org.ldk.structs.ChannelPublicKeys o) {
- long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelReadyDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelReadyDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelReadyDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelReadyDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelReadyDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelReadyDecodeErrorZ in the success state.
*/
public static Result_ChannelReadyDecodeErrorZ ok(org.ldk.structs.ChannelReady o) {
- long ret = bindings.CResult_ChannelReadyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelReadyDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelReadyDecodeErrorZ ret_hu_conv = Result_ChannelReadyDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelReestablishDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelReestablishDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelReestablishDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelReestablishDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelReestablishDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state.
*/
public static Result_ChannelReestablishDecodeErrorZ ok(org.ldk.structs.ChannelReestablish o) {
- long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelShutdownStateDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelShutdownStateDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelShutdownStateDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelShutdownStateDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelShutdownStateDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelTransactionParametersDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the success state.
*/
public static Result_ChannelTransactionParametersDecodeErrorZ ok(org.ldk.structs.ChannelTransactionParameters o) {
- long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelTypeFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelTypeFeaturesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelTypeFeaturesDecodeErrorZ in the success state.
*/
public static Result_ChannelTypeFeaturesDecodeErrorZ ok(org.ldk.structs.ChannelTypeFeatures o) {
- long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelTypeFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelTypeFeaturesDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelUpdateDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelUpdateDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelUpdateDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelUpdateDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelUpdateDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state.
*/
public static Result_ChannelUpdateDecodeErrorZ ok(org.ldk.structs.ChannelUpdate o) {
- long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ChannelUpdateInfoDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ChannelUpdateInfoDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ChannelUpdateInfoDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ChannelUpdateInfoDecodeErrorZ_is_ok(ptr)) {
return new Result_ChannelUpdateInfoDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ChannelUpdateInfoDecodeErrorZ in the success state.
*/
public static Result_ChannelUpdateInfoDecodeErrorZ ok(org.ldk.structs.ChannelUpdateInfo o) {
- long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ChannelUpdateInfoDecodeErrorZ ret_hu_conv = Result_ChannelUpdateInfoDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ClaimedHTLCDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ClaimedHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ClaimedHTLCDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ClaimedHTLCDecodeErrorZ_is_ok(ptr)) {
return new Result_ClaimedHTLCDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ClaimedHTLCDecodeErrorZ in the success state.
*/
public static Result_ClaimedHTLCDecodeErrorZ ok(org.ldk.structs.ClaimedHTLC o) {
- long ret = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ClaimedHTLCDecodeErrorZ ret_hu_conv = Result_ClaimedHTLCDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ClosingSignedDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ClosingSignedDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ClosingSignedDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ClosingSignedDecodeErrorZ_is_ok(ptr)) {
return new Result_ClosingSignedDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ClosingSignedDecodeErrorZ in the success state.
*/
public static Result_ClosingSignedDecodeErrorZ ok(org.ldk.structs.ClosingSigned o) {
- long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ClosingSignedFeeRangeDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(ptr)) {
return new Result_ClosingSignedFeeRangeDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the success state.
*/
public static Result_ClosingSignedFeeRangeDecodeErrorZ ok(org.ldk.structs.ClosingSignedFeeRange o) {
- long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CoinSelectionNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CoinSelectionNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_CoinSelectionNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_CoinSelectionNoneZ_is_ok(ptr)) {
return new Result_CoinSelectionNoneZ_OK(null, ptr);
* Creates a new CResult_CoinSelectionNoneZ in the success state.
*/
public static Result_CoinSelectionNoneZ ok(org.ldk.structs.CoinSelection o) {
- long ret = bindings.CResult_CoinSelectionNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_CoinSelectionNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CoinSelectionNoneZ ret_hu_conv = Result_CoinSelectionNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CommitmentSignedDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CommitmentSignedDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_CommitmentSignedDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_CommitmentSignedDecodeErrorZ_is_ok(ptr)) {
return new Result_CommitmentSignedDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state.
*/
public static Result_CommitmentSignedDecodeErrorZ ok(org.ldk.structs.CommitmentSigned o) {
- long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CommitmentTransactionDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_CommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_CommitmentTransactionDecodeErrorZ_is_ok(ptr)) {
return new Result_CommitmentTransactionDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_CommitmentTransactionDecodeErrorZ in the success state.
*/
public static Result_CommitmentTransactionDecodeErrorZ ok(org.ldk.structs.CommitmentTransaction o) {
- long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(ptr)) {
return new Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the success state.
*/
public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ ok(org.ldk.structs.CounterpartyChannelTransactionParameters o) {
- long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_CounterpartyCommitmentSecretsDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_is_ok(ptr)) {
return new Result_CounterpartyCommitmentSecretsDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_CounterpartyCommitmentSecretsDecodeErrorZ in the success state.
*/
public static Result_CounterpartyCommitmentSecretsDecodeErrorZ ok(org.ldk.structs.CounterpartyCommitmentSecrets o) {
- long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CounterpartyCommitmentSecretsDecodeErrorZ ret_hu_conv = Result_CounterpartyCommitmentSecretsDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_CounterpartyForwardingInfoDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_is_ok(ptr)) {
return new Result_CounterpartyForwardingInfoDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the success state.
*/
public static Result_CounterpartyForwardingInfoDecodeErrorZ ok(org.ldk.structs.CounterpartyForwardingInfo o) {
- long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CounterpartyForwardingInfoDecodeErrorZ ret_hu_conv = Result_CounterpartyForwardingInfoDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_DelayedPaymentBasepointDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_is_ok(ptr)) {
return new Result_DelayedPaymentBasepointDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_DelayedPaymentBasepointDecodeErrorZ in the success state.
*/
public static Result_DelayedPaymentBasepointDecodeErrorZ ok(org.ldk.structs.DelayedPaymentBasepoint o) {
- long ret = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_DelayedPaymentBasepointDecodeErrorZ ret_hu_conv = Result_DelayedPaymentBasepointDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_DelayedPaymentKeyDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_DelayedPaymentKeyDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_DelayedPaymentKeyDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_DelayedPaymentKeyDecodeErrorZ_is_ok(ptr)) {
return new Result_DelayedPaymentKeyDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_DelayedPaymentKeyDecodeErrorZ in the success state.
*/
public static Result_DelayedPaymentKeyDecodeErrorZ ok(org.ldk.structs.DelayedPaymentKey o) {
- long ret = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_DelayedPaymentKeyDecodeErrorZ ret_hu_conv = Result_DelayedPaymentKeyDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(ptr)) {
return new Result_DelayedPaymentOutputDescriptorDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the success state.
*/
public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ ok(org.ldk.structs.DelayedPaymentOutputDescriptor o) {
- long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_DescriptionCreationErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_DescriptionCreationErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_DescriptionCreationErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_DescriptionCreationErrorZ_is_ok(ptr)) {
return new Result_DescriptionCreationErrorZ_OK(null, ptr);
* Creates a new CResult_DescriptionCreationErrorZ in the success state.
*/
public static Result_DescriptionCreationErrorZ ok(org.ldk.structs.Description o) {
- long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ECDSASignatureNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ECDSASignatureNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_ECDSASignatureNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_ECDSASignatureNoneZ_is_ok(ptr)) {
return new Result_ECDSASignatureNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_ErrorMessageDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ErrorMessageDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ErrorMessageDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ErrorMessageDecodeErrorZ_is_ok(ptr)) {
return new Result_ErrorMessageDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ErrorMessageDecodeErrorZ in the success state.
*/
public static Result_ErrorMessageDecodeErrorZ ok(org.ldk.structs.ErrorMessage o) {
- long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_FinalOnionHopDataDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_FinalOnionHopDataDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_FinalOnionHopDataDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_FinalOnionHopDataDecodeErrorZ_is_ok(ptr)) {
return new Result_FinalOnionHopDataDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the success state.
*/
public static Result_FinalOnionHopDataDecodeErrorZ ok(org.ldk.structs.FinalOnionHopData o) {
- long ret = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_FinalOnionHopDataDecodeErrorZ ret_hu_conv = Result_FinalOnionHopDataDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_FixedPenaltyScorerDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_FixedPenaltyScorerDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_FixedPenaltyScorerDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_FixedPenaltyScorerDecodeErrorZ_is_ok(ptr)) {
return new Result_FixedPenaltyScorerDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the success state.
*/
public static Result_FixedPenaltyScorerDecodeErrorZ ok(org.ldk.structs.FixedPenaltyScorer o) {
- long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_FixedPenaltyScorerDecodeErrorZ ret_hu_conv = Result_FixedPenaltyScorerDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_FundingCreatedDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_FundingCreatedDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_FundingCreatedDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_FundingCreatedDecodeErrorZ_is_ok(ptr)) {
return new Result_FundingCreatedDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_FundingCreatedDecodeErrorZ in the success state.
*/
public static Result_FundingCreatedDecodeErrorZ ok(org.ldk.structs.FundingCreated o) {
- long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_FundingSignedDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_FundingSignedDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_FundingSignedDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_FundingSignedDecodeErrorZ_is_ok(ptr)) {
return new Result_FundingSignedDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_FundingSignedDecodeErrorZ in the success state.
*/
public static Result_FundingSignedDecodeErrorZ ok(org.ldk.structs.FundingSigned o) {
- long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_GossipTimestampFilterDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_GossipTimestampFilterDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_GossipTimestampFilterDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_GossipTimestampFilterDecodeErrorZ_is_ok(ptr)) {
return new Result_GossipTimestampFilterDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state.
*/
public static Result_GossipTimestampFilterDecodeErrorZ ok(org.ldk.structs.GossipTimestampFilter o) {
- long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_HTLCDescriptorDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_HTLCDescriptorDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_HTLCDescriptorDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_HTLCDescriptorDecodeErrorZ_is_ok(ptr)) {
return new Result_HTLCDescriptorDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_HTLCDescriptorDecodeErrorZ in the success state.
*/
public static Result_HTLCDescriptorDecodeErrorZ ok(org.ldk.structs.HTLCDescriptor o) {
- long ret = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_HTLCDescriptorDecodeErrorZ ret_hu_conv = Result_HTLCDescriptorDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_HTLCOutputInCommitmentDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(ptr)) {
return new Result_HTLCOutputInCommitmentDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the success state.
*/
public static Result_HTLCOutputInCommitmentDecodeErrorZ ok(org.ldk.structs.HTLCOutputInCommitment o) {
- long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_HTLCUpdateDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_HTLCUpdateDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_HTLCUpdateDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_HTLCUpdateDecodeErrorZ_is_ok(ptr)) {
return new Result_HTLCUpdateDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state.
*/
public static Result_HTLCUpdateDecodeErrorZ ok(org.ldk.structs.HTLCUpdate o) {
- long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_HolderCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(ptr)) {
return new Result_HolderCommitmentTransactionDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the success state.
*/
public static Result_HolderCommitmentTransactionDecodeErrorZ ok(org.ldk.structs.HolderCommitmentTransaction o) {
- long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_HostnameDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_HostnameDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_HostnameDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_HostnameDecodeErrorZ_is_ok(ptr)) {
return new Result_HostnameDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_HostnameDecodeErrorZ in the success state.
*/
public static Result_HostnameDecodeErrorZ ok(org.ldk.structs.Hostname o) {
- long ret = bindings.CResult_HostnameDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_HostnameDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_HostnameDecodeErrorZ ret_hu_conv = Result_HostnameDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_HtlcBasepointDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_HtlcBasepointDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_HtlcBasepointDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_HtlcBasepointDecodeErrorZ_is_ok(ptr)) {
return new Result_HtlcBasepointDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_HtlcBasepointDecodeErrorZ in the success state.
*/
public static Result_HtlcBasepointDecodeErrorZ ok(org.ldk.structs.HtlcBasepoint o) {
- long ret = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_HtlcBasepointDecodeErrorZ ret_hu_conv = Result_HtlcBasepointDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_HtlcKeyDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_HtlcKeyDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_HtlcKeyDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_HtlcKeyDecodeErrorZ_is_ok(ptr)) {
return new Result_HtlcKeyDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_HtlcKeyDecodeErrorZ in the success state.
*/
public static Result_HtlcKeyDecodeErrorZ ok(org.ldk.structs.HtlcKey o) {
- long ret = bindings.CResult_HtlcKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_HtlcKeyDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_HtlcKeyDecodeErrorZ ret_hu_conv = Result_HtlcKeyDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_InFlightHtlcsDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InFlightHtlcsDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_InFlightHtlcsDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_InFlightHtlcsDecodeErrorZ_is_ok(ptr)) {
return new Result_InFlightHtlcsDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_InFlightHtlcsDecodeErrorZ in the success state.
*/
public static Result_InFlightHtlcsDecodeErrorZ ok(org.ldk.structs.InFlightHtlcs o) {
- long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_InFlightHtlcsDecodeErrorZ ret_hu_conv = Result_InFlightHtlcsDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_InMemorySignerDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InMemorySignerDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_InMemorySignerDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_InMemorySignerDecodeErrorZ_is_ok(ptr)) {
return new Result_InMemorySignerDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_InMemorySignerDecodeErrorZ in the success state.
*/
public static Result_InMemorySignerDecodeErrorZ ok(org.ldk.structs.InMemorySigner o) {
- long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_InitDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InitDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_InitDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_InitDecodeErrorZ_is_ok(ptr)) {
return new Result_InitDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_InitDecodeErrorZ in the success state.
*/
public static Result_InitDecodeErrorZ ok(org.ldk.structs.Init o) {
- long ret = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_InitDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_InitFeaturesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InitFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_InitFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_InitFeaturesDecodeErrorZ_is_ok(ptr)) {
return new Result_InitFeaturesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_InitFeaturesDecodeErrorZ in the success state.
*/
public static Result_InitFeaturesDecodeErrorZ ok(org.ldk.structs.InitFeatures o) {
- long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_InvoiceErrorDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InvoiceErrorDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_InvoiceErrorDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_InvoiceErrorDecodeErrorZ_is_ok(ptr)) {
return new Result_InvoiceErrorDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_InvoiceErrorDecodeErrorZ in the success state.
*/
public static Result_InvoiceErrorDecodeErrorZ ok(org.ldk.structs.InvoiceError o) {
- long ret = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_InvoiceErrorDecodeErrorZ ret_hu_conv = Result_InvoiceErrorDecodeErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceRequestBolt12SemanticErrorZ extends CommonBase {
+ private Result_InvoiceRequestBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_InvoiceRequestBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_InvoiceRequestBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_InvoiceRequestBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_InvoiceRequestBolt12SemanticErrorZ_OK extends Result_InvoiceRequestBolt12SemanticErrorZ {
+ public final InvoiceRequest res;
+ private Result_InvoiceRequestBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.InvoiceRequest res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequest(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_InvoiceRequestBolt12SemanticErrorZ_Err extends Result_InvoiceRequestBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_InvoiceRequestBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_InvoiceRequestBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequest o) {
+ long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_InvoiceRequestBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_InvoiceRequestBolt12SemanticErrorZ clone() {
+ long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceRequestFieldsDecodeErrorZ extends CommonBase {
+ private Result_InvoiceRequestFieldsDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_InvoiceRequestFieldsDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(ptr)) {
+ return new Result_InvoiceRequestFieldsDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_InvoiceRequestFieldsDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_InvoiceRequestFieldsDecodeErrorZ_OK extends Result_InvoiceRequestFieldsDecodeErrorZ {
+ public final InvoiceRequestFields res;
+ private Result_InvoiceRequestFieldsDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.InvoiceRequestFields res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_InvoiceRequestFieldsDecodeErrorZ_Err extends Result_InvoiceRequestFieldsDecodeErrorZ {
+ public final DecodeError err;
+ private Result_InvoiceRequestFieldsDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the success state.
+ */
+ public static Result_InvoiceRequestFieldsDecodeErrorZ ok(org.ldk.structs.InvoiceRequestFields o) {
+ long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the error state.
+ */
+ public static Result_InvoiceRequestFieldsDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_InvoiceRequestFieldsDecodeErrorZ clone() {
+ long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ extends CommonBase {
+ private Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ {
+ public final InvoiceRequestWithDerivedPayerIdBuilder res;
+ private Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder o) {
+ long ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object.
+ o.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ extends CommonBase {
+ private Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ {
+ public final InvoiceRequestWithExplicitPayerIdBuilder res;
+ private Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder o) {
+ long ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object.
+ o.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ extends CommonBase {
+ private Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+ public final InvoiceWithDerivedSigningPubkeyBuilder res;
+ private Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder o) {
+ long ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object.
+ o.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ extends CommonBase {
+ private Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+ public final InvoiceWithExplicitSigningPubkeyBuilder res;
+ private Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder o) {
+ long ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object.
+ o.ptr = 0;;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+}
if (ptr != 0) { bindings.CResult_LockedChannelMonitorNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_LockedChannelMonitorNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_LockedChannelMonitorNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_LockedChannelMonitorNoneZ_is_ok(ptr)) {
return new Result_LockedChannelMonitorNoneZ_OK(null, ptr);
* Creates a new CResult_LockedChannelMonitorNoneZ in the success state.
*/
public static Result_LockedChannelMonitorNoneZ ok(org.ldk.structs.LockedChannelMonitor o) {
- long ret = bindings.CResult_LockedChannelMonitorNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_LockedChannelMonitorNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_LockedChannelMonitorNoneZ ret_hu_conv = Result_LockedChannelMonitorNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_MaxDustHTLCExposureDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_MaxDustHTLCExposureDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_MaxDustHTLCExposureDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_MaxDustHTLCExposureDecodeErrorZ_is_ok(ptr)) {
return new Result_MaxDustHTLCExposureDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_NetworkGraphDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NetworkGraphDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NetworkGraphDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NetworkGraphDecodeErrorZ_is_ok(ptr)) {
return new Result_NetworkGraphDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_NodeAliasDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NodeAliasDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NodeAliasDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NodeAliasDecodeErrorZ_is_ok(ptr)) {
return new Result_NodeAliasDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_NodeAliasDecodeErrorZ in the success state.
*/
public static Result_NodeAliasDecodeErrorZ ok(org.ldk.structs.NodeAlias o) {
- long ret = bindings.CResult_NodeAliasDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_NodeAliasDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NodeAliasDecodeErrorZ ret_hu_conv = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_NodeAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NodeAnnouncementDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NodeAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NodeAnnouncementDecodeErrorZ_is_ok(ptr)) {
return new Result_NodeAnnouncementDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state.
*/
public static Result_NodeAnnouncementDecodeErrorZ ok(org.ldk.structs.NodeAnnouncement o) {
- long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NodeAnnouncementInfoDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(ptr)) {
return new Result_NodeAnnouncementInfoDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state.
*/
public static Result_NodeAnnouncementInfoDecodeErrorZ ok(org.ldk.structs.NodeAnnouncementInfo o) {
- long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_NodeFeaturesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NodeFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NodeFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NodeFeaturesDecodeErrorZ_is_ok(ptr)) {
return new Result_NodeFeaturesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state.
*/
public static Result_NodeFeaturesDecodeErrorZ ok(org.ldk.structs.NodeFeatures o) {
- long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_NodeIdDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NodeIdDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NodeIdDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NodeIdDecodeErrorZ_is_ok(ptr)) {
return new Result_NodeIdDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_NodeIdDecodeErrorZ in the success state.
*/
public static Result_NodeIdDecodeErrorZ ok(org.ldk.structs.NodeId o) {
- long ret = bindings.CResult_NodeIdDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_NodeIdDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_NodeInfoDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NodeInfoDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NodeInfoDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NodeInfoDecodeErrorZ_is_ok(ptr)) {
return new Result_NodeInfoDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_NodeInfoDecodeErrorZ in the success state.
*/
public static Result_NodeInfoDecodeErrorZ ok(org.ldk.structs.NodeInfo o) {
- long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_NoneAPIErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NoneAPIErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NoneAPIErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NoneAPIErrorZ_is_ok(ptr)) {
return new Result_NoneAPIErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_NoneBolt11SemanticErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NoneBolt11SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NoneBolt11SemanticErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NoneBolt11SemanticErrorZ_is_ok(ptr)) {
return new Result_NoneBolt11SemanticErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_NoneBolt12SemanticErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NoneBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NoneBolt12SemanticErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NoneBolt12SemanticErrorZ_is_ok(ptr)) {
return new Result_NoneBolt12SemanticErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_NoneIOErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NoneIOErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NoneIOErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NoneIOErrorZ_is_ok(ptr)) {
return new Result_NoneIOErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_NoneLightningErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NoneLightningErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NoneLightningErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NoneLightningErrorZ_is_ok(ptr)) {
return new Result_NoneLightningErrorZ_OK(null, ptr);
* Creates a new CResult_NoneLightningErrorZ in the error state.
*/
public static Result_NoneLightningErrorZ err(org.ldk.structs.LightningError e) {
- long ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr);
+ long ret = bindings.CResult_NoneLightningErrorZ_err(e.ptr);
Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_NoneNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NoneNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_NoneNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_NoneNoneZ_is_ok(ptr)) {
return new Result_NoneNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_NonePaymentSendFailureZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NonePaymentSendFailureZ_free(ptr); ptr = 0; }
+ }
+
static Result_NonePaymentSendFailureZ constr_from_ptr(long ptr) {
if (bindings.CResult_NonePaymentSendFailureZ_is_ok(ptr)) {
return new Result_NonePaymentSendFailureZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_NonePeerHandleErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NonePeerHandleErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_NonePeerHandleErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_NonePeerHandleErrorZ_is_ok(ptr)) {
return new Result_NonePeerHandleErrorZ_OK(null, ptr);
* Creates a new CResult_NonePeerHandleErrorZ in the error state.
*/
public static Result_NonePeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) {
- long ret = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0 : e.ptr);
+ long ret = bindings.CResult_NonePeerHandleErrorZ_err(e.ptr);
Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_NoneRetryableSendFailureZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_NoneRetryableSendFailureZ_free(ptr); ptr = 0; }
+ }
+
static Result_NoneRetryableSendFailureZ constr_from_ptr(long ptr) {
if (bindings.CResult_NoneRetryableSendFailureZ_is_ok(ptr)) {
return new Result_NoneRetryableSendFailureZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_OfferBolt12ParseErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OfferBolt12ParseErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_OfferBolt12ParseErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_OfferBolt12ParseErrorZ_is_ok(ptr)) {
return new Result_OfferBolt12ParseErrorZ_OK(null, ptr);
* Creates a new CResult_OfferBolt12ParseErrorZ in the success state.
*/
public static Result_OfferBolt12ParseErrorZ ok(org.ldk.structs.Offer o) {
- long ret = bindings.CResult_OfferBolt12ParseErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_OfferBolt12ParseErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_OfferBolt12ParseErrorZ ret_hu_conv = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret);
* Creates a new CResult_OfferBolt12ParseErrorZ in the error state.
*/
public static Result_OfferBolt12ParseErrorZ err(org.ldk.structs.Bolt12ParseError e) {
- long ret = bindings.CResult_OfferBolt12ParseErrorZ_err(e == null ? 0 : e.ptr);
+ long ret = bindings.CResult_OfferBolt12ParseErrorZ_err(e.ptr);
Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_OfferBolt12ParseErrorZ ret_hu_conv = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OfferBolt12SemanticErrorZ extends CommonBase {
+ private Result_OfferBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_OfferBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OfferBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_OfferBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_OfferBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_OfferBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_OfferBolt12SemanticErrorZ_OK extends Result_OfferBolt12SemanticErrorZ {
+ public final Offer res;
+ private Result_OfferBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_OfferBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.Offer res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Offer(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_OfferBolt12SemanticErrorZ_Err extends Result_OfferBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_OfferBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_OfferBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_OfferBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_OfferBolt12SemanticErrorZ ok(org.ldk.structs.Offer o) {
+ long ret = bindings.CResult_OfferBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_OfferBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_OfferBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_OfferBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_OfferBolt12SemanticErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_OfferBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_OfferBolt12SemanticErrorZ clone() {
+ long ret = bindings.CResult_OfferBolt12SemanticErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OfferIdDecodeErrorZ extends CommonBase {
+ private Result_OfferIdDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_OfferIdDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OfferIdDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_OfferIdDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_OfferIdDecodeErrorZ_is_ok(ptr)) {
+ return new Result_OfferIdDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_OfferIdDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_OfferIdDecodeErrorZ_OK extends Result_OfferIdDecodeErrorZ {
+ public final OfferId res;
+ private Result_OfferIdDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_OfferIdDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.OfferId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OfferId(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_OfferIdDecodeErrorZ_Err extends Result_OfferIdDecodeErrorZ {
+ public final DecodeError err;
+ private Result_OfferIdDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_OfferIdDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_OfferIdDecodeErrorZ in the success state.
+ */
+ public static Result_OfferIdDecodeErrorZ ok(org.ldk.structs.OfferId o) {
+ long ret = bindings.CResult_OfferIdDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_OfferIdDecodeErrorZ in the error state.
+ */
+ public static Result_OfferIdDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_OfferIdDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_OfferIdDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_OfferIdDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_OfferIdDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_OfferIdDecodeErrorZ clone() {
+ long ret = bindings.CResult_OfferIdDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ extends CommonBase {
+ private Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK extends Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ {
+ public final OfferWithDerivedMetadataBuilder res;
+ private Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.OfferWithDerivedMetadataBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err extends Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ok(org.ldk.structs.OfferWithDerivedMetadataBuilder o) {
+ long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ clone() {
+ long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_OffersMessageDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OffersMessageDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_OffersMessageDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_OffersMessageDecodeErrorZ_is_ok(ptr)) {
return new Result_OffersMessageDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_OnionMessageDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OnionMessageDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_OnionMessageDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_OnionMessageDecodeErrorZ_is_ok(ptr)) {
return new Result_OnionMessageDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_OnionMessageDecodeErrorZ in the success state.
*/
public static Result_OnionMessageDecodeErrorZ ok(org.ldk.structs.OnionMessage o) {
- long ret = bindings.CResult_OnionMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_OnionMessageDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_OnionMessageDecodeErrorZ ret_hu_conv = Result_OnionMessageDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_OnionMessagePathNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OnionMessagePathNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_OnionMessagePathNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_OnionMessagePathNoneZ_is_ok(ptr)) {
return new Result_OnionMessagePathNoneZ_OK(null, ptr);
* Creates a new CResult_OnionMessagePathNoneZ in the success state.
*/
public static Result_OnionMessagePathNoneZ ok(org.ldk.structs.OnionMessagePath o) {
- long ret = bindings.CResult_OnionMessagePathNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_OnionMessagePathNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_OnionMessagePathNoneZ ret_hu_conv = Result_OnionMessagePathNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_OnionPacketDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OnionPacketDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_OnionPacketDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_OnionPacketDecodeErrorZ_is_ok(ptr)) {
return new Result_OnionPacketDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_OnionPacketDecodeErrorZ in the success state.
*/
public static Result_OnionPacketDecodeErrorZ ok(org.ldk.structs.OnionPacket o) {
- long ret = bindings.CResult_OnionPacketDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_OnionPacketDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_OnionPacketDecodeErrorZ ret_hu_conv = Result_OnionPacketDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_OpenChannelDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OpenChannelDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_OpenChannelDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_OpenChannelDecodeErrorZ_is_ok(ptr)) {
return new Result_OpenChannelDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_OpenChannelDecodeErrorZ in the success state.
*/
public static Result_OpenChannelDecodeErrorZ ok(org.ldk.structs.OpenChannel o) {
- long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_OpenChannelV2DecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OpenChannelV2DecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_OpenChannelV2DecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_OpenChannelV2DecodeErrorZ_is_ok(ptr)) {
return new Result_OpenChannelV2DecodeErrorZ_OK(null, ptr);
* Creates a new CResult_OpenChannelV2DecodeErrorZ in the success state.
*/
public static Result_OpenChannelV2DecodeErrorZ ok(org.ldk.structs.OpenChannelV2 o) {
- long ret = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_OpenChannelV2DecodeErrorZ ret_hu_conv = Result_OpenChannelV2DecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_OutPointDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OutPointDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_OutPointDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_OutPointDecodeErrorZ_is_ok(ptr)) {
return new Result_OutPointDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_OutPointDecodeErrorZ in the success state.
*/
public static Result_OutPointDecodeErrorZ ok(org.ldk.structs.OutPoint o) {
- long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OutputSpendStatusDecodeErrorZ extends CommonBase {
+ private Result_OutputSpendStatusDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_OutputSpendStatusDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OutputSpendStatusDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_OutputSpendStatusDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(ptr)) {
+ return new Result_OutputSpendStatusDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_OutputSpendStatusDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_OutputSpendStatusDecodeErrorZ_OK extends Result_OutputSpendStatusDecodeErrorZ {
+ public final OutputSpendStatus res;
+ private Result_OutputSpendStatusDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.OutputSpendStatus res_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(res);
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_OutputSpendStatusDecodeErrorZ_Err extends Result_OutputSpendStatusDecodeErrorZ {
+ public final DecodeError err;
+ private Result_OutputSpendStatusDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the success state.
+ */
+ public static Result_OutputSpendStatusDecodeErrorZ ok(org.ldk.structs.OutputSpendStatus o) {
+ long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the error state.
+ */
+ public static Result_OutputSpendStatusDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_OutputSpendStatusDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_OutputSpendStatusDecodeErrorZ clone() {
+ long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OutputSweeperDecodeErrorZ extends CommonBase {
+ private Result_OutputSweeperDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_OutputSweeperDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_OutputSweeperDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_OutputSweeperDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(ptr)) {
+ return new Result_OutputSweeperDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_OutputSweeperDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_OutputSweeperDecodeErrorZ_OK extends Result_OutputSweeperDecodeErrorZ {
+ public final OutputSweeper res;
+ private Result_OutputSweeperDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_OutputSweeperDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.OutputSweeper res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OutputSweeper(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_OutputSweeperDecodeErrorZ_Err extends Result_OutputSweeperDecodeErrorZ {
+ public final DecodeError err;
+ private Result_OutputSweeperDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_OutputSweeperDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_OutputSweeperDecodeErrorZ in the success state.
+ */
+ public static Result_OutputSweeperDecodeErrorZ ok(BestBlock o_best_block, BroadcasterInterface o_broadcaster, FeeEstimator o_fee_estimator, Option_FilterZ o_chain_data_source, OutputSpender o_output_spender, ChangeDestinationSource o_change_destination_source, KVStore o_kv_store, Logger o_logger) {
+ long ret = bindings.CResult_OutputSweeperDecodeErrorZ_ok(bindings.OutputSweeper_new(o_best_block.ptr, o_broadcaster.ptr, o_fee_estimator.ptr, o_chain_data_source.ptr, o_output_spender.ptr, o_change_destination_source.ptr, o_kv_store.ptr, o_logger.ptr));
+ Reference.reachabilityFence(o_best_block);
+ Reference.reachabilityFence(o_broadcaster);
+ Reference.reachabilityFence(o_fee_estimator);
+ Reference.reachabilityFence(o_chain_data_source);
+ Reference.reachabilityFence(o_output_spender);
+ Reference.reachabilityFence(o_change_destination_source);
+ Reference.reachabilityFence(o_kv_store);
+ Reference.reachabilityFence(o_logger);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_best_block); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_broadcaster); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_fee_estimator); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_chain_data_source); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_output_spender); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_change_destination_source); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_kv_store); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_logger); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_OutputSweeperDecodeErrorZ in the error state.
+ */
+ public static Result_OutputSweeperDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_OutputSweeperDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+}
if (ptr != 0) { bindings.CResult_PayeePubKeySecp256k1ErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PayeePubKeySecp256k1ErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PayeePubKeySecp256k1ErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PayeePubKeySecp256k1ErrorZ_is_ok(ptr)) {
return new Result_PayeePubKeySecp256k1ErrorZ_OK(null, ptr);
* Creates a new CResult_PayeePubKeySecp256k1ErrorZ in the success state.
*/
public static Result_PayeePubKeySecp256k1ErrorZ ok(org.ldk.structs.PayeePubKey o) {
- long ret = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PayeePubKeySecp256k1ErrorZ ret_hu_conv = Result_PayeePubKeySecp256k1ErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_PaymentConstraintsDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PaymentConstraintsDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PaymentConstraintsDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PaymentConstraintsDecodeErrorZ_is_ok(ptr)) {
return new Result_PaymentConstraintsDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_PaymentConstraintsDecodeErrorZ in the success state.
*/
public static Result_PaymentConstraintsDecodeErrorZ ok(org.ldk.structs.PaymentConstraints o) {
- long ret = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PaymentConstraintsDecodeErrorZ ret_hu_conv = Result_PaymentConstraintsDecodeErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_PaymentContextDecodeErrorZ extends CommonBase {
+ private Result_PaymentContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_PaymentContextDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PaymentContextDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_PaymentContextDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_PaymentContextDecodeErrorZ_is_ok(ptr)) {
+ return new Result_PaymentContextDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_PaymentContextDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_PaymentContextDecodeErrorZ_OK extends Result_PaymentContextDecodeErrorZ {
+ public final PaymentContext res;
+ private Result_PaymentContextDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_PaymentContextDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.PaymentContext res_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(res);
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_PaymentContextDecodeErrorZ_Err extends Result_PaymentContextDecodeErrorZ {
+ public final DecodeError err;
+ private Result_PaymentContextDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_PaymentContextDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_PaymentContextDecodeErrorZ in the success state.
+ */
+ public static Result_PaymentContextDecodeErrorZ ok(org.ldk.structs.PaymentContext o) {
+ long ret = bindings.CResult_PaymentContextDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_PaymentContextDecodeErrorZ in the error state.
+ */
+ public static Result_PaymentContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_PaymentContextDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_PaymentContextDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_PaymentContextDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_PaymentContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_PaymentContextDecodeErrorZ clone() {
+ long ret = bindings.CResult_PaymentContextDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_PaymentFailureReasonDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PaymentFailureReasonDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PaymentFailureReasonDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PaymentFailureReasonDecodeErrorZ_is_ok(ptr)) {
return new Result_PaymentFailureReasonDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_PaymentParametersDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PaymentParametersDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PaymentParametersDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PaymentParametersDecodeErrorZ_is_ok(ptr)) {
return new Result_PaymentParametersDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_PaymentParametersDecodeErrorZ in the success state.
*/
public static Result_PaymentParametersDecodeErrorZ ok(org.ldk.structs.PaymentParameters o) {
- long ret = bindings.CResult_PaymentParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PaymentParametersDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PaymentParametersDecodeErrorZ ret_hu_conv = Result_PaymentParametersDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_PaymentPurposeDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PaymentPurposeDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PaymentPurposeDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PaymentPurposeDecodeErrorZ_is_ok(ptr)) {
return new Result_PaymentPurposeDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_PaymentRelayDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PaymentRelayDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PaymentRelayDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PaymentRelayDecodeErrorZ_is_ok(ptr)) {
return new Result_PaymentRelayDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_PaymentRelayDecodeErrorZ in the success state.
*/
public static Result_PaymentRelayDecodeErrorZ ok(org.ldk.structs.PaymentRelay o) {
- long ret = bindings.CResult_PaymentRelayDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PaymentRelayDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PaymentRelayDecodeErrorZ ret_hu_conv = Result_PaymentRelayDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_PeeledOnionNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PeeledOnionNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_PeeledOnionNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_PeeledOnionNoneZ_is_ok(ptr)) {
return new Result_PeeledOnionNoneZ_OK(null, ptr);
return ret;
}
+ long clone_ptr() {
+ long ret = bindings.CResult_PeeledOnionNoneZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_PeeledOnionNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_PeeledOnionNoneZ clone() {
+ long ret = bindings.CResult_PeeledOnionNoneZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_PeeledOnionNoneZ ret_hu_conv = Result_PeeledOnionNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
if (ptr != 0) { bindings.CResult_PendingHTLCInfoDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PendingHTLCInfoDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PendingHTLCInfoDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PendingHTLCInfoDecodeErrorZ_is_ok(ptr)) {
return new Result_PendingHTLCInfoDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the success state.
*/
public static Result_PendingHTLCInfoDecodeErrorZ ok(org.ldk.structs.PendingHTLCInfo o) {
- long ret = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PendingHTLCInfoDecodeErrorZ ret_hu_conv = Result_PendingHTLCInfoDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_free(ptr); ptr = 0; }
+ }
+
static Result_PendingHTLCInfoInboundHTLCErrZ constr_from_ptr(long ptr) {
if (bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(ptr)) {
return new Result_PendingHTLCInfoInboundHTLCErrZ_OK(null, ptr);
* Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the success state.
*/
public static Result_PendingHTLCInfoInboundHTLCErrZ ok(org.ldk.structs.PendingHTLCInfo o) {
- long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
/**
* Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the error state.
*/
- public static Result_PendingHTLCInfoInboundHTLCErrZ err(short e_err_code_arg, byte[] e_err_data_arg, String e_msg_arg) {
- long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(bindings.InboundHTLCErr_new(e_err_code_arg, e_err_data_arg, e_msg_arg));
- Reference.reachabilityFence(e_err_code_arg);
- Reference.reachabilityFence(e_err_data_arg);
- Reference.reachabilityFence(e_msg_arg);
+ public static Result_PendingHTLCInfoInboundHTLCErrZ err(org.ldk.structs.InboundHTLCErr e) {
+ long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(e.ptr);
+ Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
return ret_hu_conv;
}
return ret;
}
+ long clone_ptr() {
+ long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_PendingHTLCInfoInboundHTLCErrZ clone() {
+ long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
if (ptr != 0) { bindings.CResult_PendingHTLCRoutingDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PendingHTLCRoutingDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PendingHTLCRoutingDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PendingHTLCRoutingDecodeErrorZ_is_ok(ptr)) {
return new Result_PendingHTLCRoutingDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_PhantomRouteHintsDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PhantomRouteHintsDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PhantomRouteHintsDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PhantomRouteHintsDecodeErrorZ_is_ok(ptr)) {
return new Result_PhantomRouteHintsDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the success state.
*/
public static Result_PhantomRouteHintsDecodeErrorZ ok(org.ldk.structs.PhantomRouteHints o) {
- long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PhantomRouteHintsDecodeErrorZ ret_hu_conv = Result_PhantomRouteHintsDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_PingDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PingDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PingDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PingDecodeErrorZ_is_ok(ptr)) {
return new Result_PingDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_PingDecodeErrorZ in the success state.
*/
public static Result_PingDecodeErrorZ ok(org.ldk.structs.Ping o) {
- long ret = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PingDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_PongDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PongDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PongDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PongDecodeErrorZ_is_ok(ptr)) {
return new Result_PongDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_PongDecodeErrorZ in the success state.
*/
public static Result_PongDecodeErrorZ ok(org.ldk.structs.Pong o) {
- long ret = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PongDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_PositiveTimestampCreationErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PositiveTimestampCreationErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PositiveTimestampCreationErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PositiveTimestampCreationErrorZ_is_ok(ptr)) {
return new Result_PositiveTimestampCreationErrorZ_OK(null, ptr);
* Creates a new CResult_PositiveTimestampCreationErrorZ in the success state.
*/
public static Result_PositiveTimestampCreationErrorZ ok(org.ldk.structs.PositiveTimestamp o) {
- long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_PrivateRouteCreationErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PrivateRouteCreationErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PrivateRouteCreationErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PrivateRouteCreationErrorZ_is_ok(ptr)) {
return new Result_PrivateRouteCreationErrorZ_OK(null, ptr);
* Creates a new CResult_PrivateRouteCreationErrorZ in the success state.
*/
public static Result_PrivateRouteCreationErrorZ ok(org.ldk.structs.PrivateRoute o) {
- long ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ProbabilisticScorerDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ProbabilisticScorerDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ProbabilisticScorerDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ProbabilisticScorerDecodeErrorZ_is_ok(ptr)) {
return new Result_ProbabilisticScorerDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the success state.
*/
public static Result_ProbabilisticScorerDecodeErrorZ ok(ProbabilisticScoringDecayParameters o_decay_params, NetworkGraph o_network_graph, Logger o_logger) {
- long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_decay_params == null ? 0 : o_decay_params.ptr, o_network_graph == null ? 0 : o_network_graph.ptr, o_logger.ptr));
+ long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_decay_params.ptr, o_network_graph.ptr, o_logger.ptr));
Reference.reachabilityFence(o_decay_params);
Reference.reachabilityFence(o_network_graph);
Reference.reachabilityFence(o_logger);
if (ptr != 0) { bindings.CResult_PublicKeyNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PublicKeyNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_PublicKeyNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_PublicKeyNoneZ_is_ok(ptr)) {
return new Result_PublicKeyNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_PublicKeySecp256k1ErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_PublicKeySecp256k1ErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_PublicKeySecp256k1ErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_PublicKeySecp256k1ErrorZ_is_ok(ptr)) {
return new Result_PublicKeySecp256k1ErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_QueryChannelRangeDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_QueryChannelRangeDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_QueryChannelRangeDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_QueryChannelRangeDecodeErrorZ_is_ok(ptr)) {
return new Result_QueryChannelRangeDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state.
*/
public static Result_QueryChannelRangeDecodeErrorZ ok(org.ldk.structs.QueryChannelRange o) {
- long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_QueryShortChannelIdsDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_QueryShortChannelIdsDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_QueryShortChannelIdsDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(ptr)) {
return new Result_QueryShortChannelIdsDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state.
*/
public static Result_QueryShortChannelIdsDecodeErrorZ ok(org.ldk.structs.QueryShortChannelIds o) {
- long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RecipientOnionFieldsDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RecipientOnionFieldsDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RecipientOnionFieldsDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RecipientOnionFieldsDecodeErrorZ_is_ok(ptr)) {
return new Result_RecipientOnionFieldsDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RecipientOnionFieldsDecodeErrorZ in the success state.
*/
public static Result_RecipientOnionFieldsDecodeErrorZ ok(org.ldk.structs.RecipientOnionFields o) {
- long ret = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RecipientOnionFieldsDecodeErrorZ ret_hu_conv = Result_RecipientOnionFieldsDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RecipientOnionFieldsNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RecipientOnionFieldsNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_RecipientOnionFieldsNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_RecipientOnionFieldsNoneZ_is_ok(ptr)) {
return new Result_RecipientOnionFieldsNoneZ_OK(null, ptr);
* Creates a new CResult_RecipientOnionFieldsNoneZ in the success state.
*/
public static Result_RecipientOnionFieldsNoneZ ok(org.ldk.structs.RecipientOnionFields o) {
- long ret = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RecipientOnionFieldsNoneZ ret_hu_conv = Result_RecipientOnionFieldsNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RecoverableSignatureNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RecoverableSignatureNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_RecoverableSignatureNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_RecoverableSignatureNoneZ_is_ok(ptr)) {
return new Result_RecoverableSignatureNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_RefundBolt12ParseErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RefundBolt12ParseErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RefundBolt12ParseErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RefundBolt12ParseErrorZ_is_ok(ptr)) {
return new Result_RefundBolt12ParseErrorZ_OK(null, ptr);
* Creates a new CResult_RefundBolt12ParseErrorZ in the success state.
*/
public static Result_RefundBolt12ParseErrorZ ok(org.ldk.structs.Refund o) {
- long ret = bindings.CResult_RefundBolt12ParseErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RefundBolt12ParseErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RefundBolt12ParseErrorZ ret_hu_conv = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret);
* Creates a new CResult_RefundBolt12ParseErrorZ in the error state.
*/
public static Result_RefundBolt12ParseErrorZ err(org.ldk.structs.Bolt12ParseError e) {
- long ret = bindings.CResult_RefundBolt12ParseErrorZ_err(e == null ? 0 : e.ptr);
+ long ret = bindings.CResult_RefundBolt12ParseErrorZ_err(e.ptr);
Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RefundBolt12ParseErrorZ ret_hu_conv = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_RefundBolt12SemanticErrorZ extends CommonBase {
+ private Result_RefundBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_RefundBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RefundBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_RefundBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_RefundBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_RefundBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_RefundBolt12SemanticErrorZ_OK extends Result_RefundBolt12SemanticErrorZ {
+ public final Refund res;
+ private Result_RefundBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_RefundBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.Refund res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Refund(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_RefundBolt12SemanticErrorZ_Err extends Result_RefundBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_RefundBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_RefundBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_RefundBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_RefundBolt12SemanticErrorZ ok(org.ldk.structs.Refund o) {
+ long ret = bindings.CResult_RefundBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RefundBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_RefundBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_RefundBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_RefundBolt12SemanticErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_RefundBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_RefundBolt12SemanticErrorZ clone() {
+ long ret = bindings.CResult_RefundBolt12SemanticErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ extends CommonBase {
+ private Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK extends Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ {
+ public final RefundMaybeWithDerivedMetadataBuilder res;
+ private Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err extends Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ok(org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder o) {
+ long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ clone() {
+ long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_ReplyChannelRangeDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ReplyChannelRangeDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ReplyChannelRangeDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ReplyChannelRangeDecodeErrorZ_is_ok(ptr)) {
return new Result_ReplyChannelRangeDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state.
*/
public static Result_ReplyChannelRangeDecodeErrorZ ok(org.ldk.structs.ReplyChannelRange o) {
- long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ReplyShortChannelIdsEndDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(ptr)) {
return new Result_ReplyShortChannelIdsEndDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state.
*/
public static Result_ReplyShortChannelIdsEndDecodeErrorZ ok(org.ldk.structs.ReplyShortChannelIdsEnd o) {
- long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RetryDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RetryDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RetryDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RetryDecodeErrorZ_is_ok(ptr)) {
return new Result_RetryDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_RevocationBasepointDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RevocationBasepointDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RevocationBasepointDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RevocationBasepointDecodeErrorZ_is_ok(ptr)) {
return new Result_RevocationBasepointDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RevocationBasepointDecodeErrorZ in the success state.
*/
public static Result_RevocationBasepointDecodeErrorZ ok(org.ldk.structs.RevocationBasepoint o) {
- long ret = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RevocationBasepointDecodeErrorZ ret_hu_conv = Result_RevocationBasepointDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RevocationKeyDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RevocationKeyDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RevocationKeyDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RevocationKeyDecodeErrorZ_is_ok(ptr)) {
return new Result_RevocationKeyDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RevocationKeyDecodeErrorZ in the success state.
*/
public static Result_RevocationKeyDecodeErrorZ ok(org.ldk.structs.RevocationKey o) {
- long ret = bindings.CResult_RevocationKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RevocationKeyDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RevocationKeyDecodeErrorZ ret_hu_conv = Result_RevocationKeyDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RevokeAndACKDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RevokeAndACKDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RevokeAndACKDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RevokeAndACKDecodeErrorZ_is_ok(ptr)) {
return new Result_RevokeAndACKDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state.
*/
public static Result_RevokeAndACKDecodeErrorZ ok(org.ldk.structs.RevokeAndACK o) {
- long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RouteDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RouteDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RouteDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RouteDecodeErrorZ_is_ok(ptr)) {
return new Result_RouteDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RouteDecodeErrorZ in the success state.
*/
public static Result_RouteDecodeErrorZ ok(org.ldk.structs.Route o) {
- long ret = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RouteDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RouteHintDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RouteHintDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RouteHintDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RouteHintDecodeErrorZ_is_ok(ptr)) {
return new Result_RouteHintDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RouteHintDecodeErrorZ in the success state.
*/
public static Result_RouteHintDecodeErrorZ ok(org.ldk.structs.RouteHint o) {
- long ret = bindings.CResult_RouteHintDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RouteHintDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RouteHintDecodeErrorZ ret_hu_conv = Result_RouteHintDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RouteHintHopDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RouteHintHopDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RouteHintHopDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RouteHintHopDecodeErrorZ_is_ok(ptr)) {
return new Result_RouteHintHopDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RouteHintHopDecodeErrorZ in the success state.
*/
public static Result_RouteHintHopDecodeErrorZ ok(org.ldk.structs.RouteHintHop o) {
- long ret = bindings.CResult_RouteHintHopDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RouteHintHopDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RouteHintHopDecodeErrorZ ret_hu_conv = Result_RouteHintHopDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RouteHopDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RouteHopDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RouteHopDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RouteHopDecodeErrorZ_is_ok(ptr)) {
return new Result_RouteHopDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RouteHopDecodeErrorZ in the success state.
*/
public static Result_RouteHopDecodeErrorZ ok(org.ldk.structs.RouteHop o) {
- long ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RouteLightningErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RouteLightningErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RouteLightningErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RouteLightningErrorZ_is_ok(ptr)) {
return new Result_RouteLightningErrorZ_OK(null, ptr);
* Creates a new CResult_RouteLightningErrorZ in the success state.
*/
public static Result_RouteLightningErrorZ ok(org.ldk.structs.Route o) {
- long ret = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RouteLightningErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
* Creates a new CResult_RouteLightningErrorZ in the error state.
*/
public static Result_RouteLightningErrorZ err(org.ldk.structs.LightningError e) {
- long ret = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0 : e.ptr);
+ long ret = bindings.CResult_RouteLightningErrorZ_err(e.ptr);
Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RouteParametersDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RouteParametersDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RouteParametersDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RouteParametersDecodeErrorZ_is_ok(ptr)) {
return new Result_RouteParametersDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RouteParametersDecodeErrorZ in the success state.
*/
public static Result_RouteParametersDecodeErrorZ ok(org.ldk.structs.RouteParameters o) {
- long ret = bindings.CResult_RouteParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RouteParametersDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RouteParametersDecodeErrorZ ret_hu_conv = Result_RouteParametersDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_RoutingFeesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_RoutingFeesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_RoutingFeesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_RoutingFeesDecodeErrorZ_is_ok(ptr)) {
return new Result_RoutingFeesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_RoutingFeesDecodeErrorZ in the success state.
*/
public static Result_RoutingFeesDecodeErrorZ ok(org.ldk.structs.RoutingFees o) {
- long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_SchnorrSignatureNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SchnorrSignatureNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_SchnorrSignatureNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_SchnorrSignatureNoneZ_is_ok(ptr)) {
return new Result_SchnorrSignatureNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_SendSuccessSendErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SendSuccessSendErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_SendSuccessSendErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_SendSuccessSendErrorZ_is_ok(ptr)) {
return new Result_SendSuccessSendErrorZ_OK(null, ptr);
return ret;
}
+ long clone_ptr() {
+ long ret = bindings.CResult_SendSuccessSendErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_SendSuccessSendErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_SendSuccessSendErrorZ clone() {
+ long ret = bindings.CResult_SendSuccessSendErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_SendSuccessSendErrorZ ret_hu_conv = Result_SendSuccessSendErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
if (ptr != 0) { bindings.CResult_ShutdownDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ShutdownDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ShutdownDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ShutdownDecodeErrorZ_is_ok(ptr)) {
return new Result_ShutdownDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ShutdownDecodeErrorZ in the success state.
*/
public static Result_ShutdownDecodeErrorZ ok(org.ldk.structs.Shutdown o) {
- long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ShutdownScriptDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ShutdownScriptDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ShutdownScriptDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ShutdownScriptDecodeErrorZ_is_ok(ptr)) {
return new Result_ShutdownScriptDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_ShutdownScriptDecodeErrorZ in the success state.
*/
public static Result_ShutdownScriptDecodeErrorZ ok(org.ldk.structs.ShutdownScript o) {
- long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_free(ptr); ptr = 0; }
+ }
+
static Result_ShutdownScriptInvalidShutdownScriptZ constr_from_ptr(long ptr) {
if (bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(ptr)) {
return new Result_ShutdownScriptInvalidShutdownScriptZ_OK(null, ptr);
* Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the success state.
*/
public static Result_ShutdownScriptInvalidShutdownScriptZ ok(org.ldk.structs.ShutdownScript o) {
- long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret);
* Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the error state.
*/
public static Result_ShutdownScriptInvalidShutdownScriptZ err(org.ldk.structs.InvalidShutdownScript e) {
- long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e == null ? 0 : e.ptr);
+ long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e.ptr);
Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_ShutdownScriptNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ShutdownScriptNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_ShutdownScriptNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_ShutdownScriptNoneZ_is_ok(ptr)) {
return new Result_ShutdownScriptNoneZ_OK(null, ptr);
* Creates a new CResult_ShutdownScriptNoneZ in the success state.
*/
public static Result_ShutdownScriptNoneZ ok(org.ldk.structs.ShutdownScript o) {
- long ret = bindings.CResult_ShutdownScriptNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_ShutdownScriptNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_ShutdownScriptNoneZ ret_hu_conv = Result_ShutdownScriptNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_SiPrefixBolt11ParseErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SiPrefixBolt11ParseErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_SiPrefixBolt11ParseErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_SiPrefixBolt11ParseErrorZ_is_ok(ptr)) {
return new Result_SiPrefixBolt11ParseErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_SignedRawBolt11InvoiceBolt11ParseErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_is_ok(ptr)) {
return new Result_SignedRawBolt11InvoiceBolt11ParseErrorZ_OK(null, ptr);
* Creates a new CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ in the success state.
*/
public static Result_SignedRawBolt11InvoiceBolt11ParseErrorZ ok(org.ldk.structs.SignedRawBolt11Invoice o) {
- long ret = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_SignedRawBolt11InvoiceBolt11ParseErrorZ ret_hu_conv = Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_SocketAddressDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SocketAddressDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_SocketAddressDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_SocketAddressDecodeErrorZ_is_ok(ptr)) {
return new Result_SocketAddressDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_SocketAddressSocketAddressParseErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SocketAddressSocketAddressParseErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_SocketAddressSocketAddressParseErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_SocketAddressSocketAddressParseErrorZ_is_ok(ptr)) {
return new Result_SocketAddressSocketAddressParseErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_SpendableOutputDescriptorDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(ptr)) {
return new Result_SpendableOutputDescriptorDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_SpliceAckDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SpliceAckDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_SpliceAckDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_SpliceAckDecodeErrorZ_is_ok(ptr)) {
return new Result_SpliceAckDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_SpliceAckDecodeErrorZ in the success state.
*/
public static Result_SpliceAckDecodeErrorZ ok(org.ldk.structs.SpliceAck o) {
- long ret = bindings.CResult_SpliceAckDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_SpliceAckDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_SpliceAckDecodeErrorZ ret_hu_conv = Result_SpliceAckDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_SpliceDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SpliceDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_SpliceDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_SpliceDecodeErrorZ_is_ok(ptr)) {
return new Result_SpliceDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_SpliceDecodeErrorZ in the success state.
*/
public static Result_SpliceDecodeErrorZ ok(org.ldk.structs.Splice o) {
- long ret = bindings.CResult_SpliceDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_SpliceDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_SpliceDecodeErrorZ ret_hu_conv = Result_SpliceDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_SpliceLockedDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_SpliceLockedDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_SpliceLockedDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_SpliceLockedDecodeErrorZ_is_ok(ptr)) {
return new Result_SpliceLockedDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_SpliceLockedDecodeErrorZ in the success state.
*/
public static Result_SpliceLockedDecodeErrorZ ok(org.ldk.structs.SpliceLocked o) {
- long ret = bindings.CResult_SpliceLockedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_SpliceLockedDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_SpliceLockedDecodeErrorZ ret_hu_conv = Result_SpliceLockedDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_StaticPaymentOutputDescriptorDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(ptr)) {
return new Result_StaticPaymentOutputDescriptorDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the success state.
*/
public static Result_StaticPaymentOutputDescriptorDecodeErrorZ ok(org.ldk.structs.StaticPaymentOutputDescriptor o) {
- long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_StfuDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_StfuDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_StfuDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_StfuDecodeErrorZ_is_ok(ptr)) {
return new Result_StfuDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_StfuDecodeErrorZ in the success state.
*/
public static Result_StfuDecodeErrorZ ok(org.ldk.structs.Stfu o) {
- long ret = bindings.CResult_StfuDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_StfuDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_StfuDecodeErrorZ ret_hu_conv = Result_StfuDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_StrSecp256k1ErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_StrSecp256k1ErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_StrSecp256k1ErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_StrSecp256k1ErrorZ_is_ok(ptr)) {
return new Result_StrSecp256k1ErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_ThirtyTwoBytesAPIErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ThirtyTwoBytesAPIErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_ThirtyTwoBytesAPIErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_ThirtyTwoBytesAPIErrorZ_is_ok(ptr)) {
return new Result_ThirtyTwoBytesAPIErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_ThirtyTwoBytesNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ThirtyTwoBytesNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_ThirtyTwoBytesNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_ThirtyTwoBytesNoneZ_is_ok(ptr)) {
return new Result_ThirtyTwoBytesNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_free(ptr); ptr = 0; }
+ }
+
static Result_ThirtyTwoBytesPaymentSendFailureZ constr_from_ptr(long ptr) {
if (bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(ptr)) {
return new Result_ThirtyTwoBytesPaymentSendFailureZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_free(ptr); ptr = 0; }
+ }
+
static Result_ThirtyTwoBytesRetryableSendFailureZ constr_from_ptr(long ptr) {
if (bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_is_ok(ptr)) {
return new Result_ThirtyTwoBytesRetryableSendFailureZ_OK(null, ptr);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_TrackedSpendableOutputDecodeErrorZ extends CommonBase {
+ private Result_TrackedSpendableOutputDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_TrackedSpendableOutputDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TrackedSpendableOutputDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_TrackedSpendableOutputDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(ptr)) {
+ return new Result_TrackedSpendableOutputDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_TrackedSpendableOutputDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_TrackedSpendableOutputDecodeErrorZ_OK extends Result_TrackedSpendableOutputDecodeErrorZ {
+ public final TrackedSpendableOutput res;
+ private Result_TrackedSpendableOutputDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.TrackedSpendableOutput res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_TrackedSpendableOutputDecodeErrorZ_Err extends Result_TrackedSpendableOutputDecodeErrorZ {
+ public final DecodeError err;
+ private Result_TrackedSpendableOutputDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the success state.
+ */
+ public static Result_TrackedSpendableOutputDecodeErrorZ ok(org.ldk.structs.TrackedSpendableOutput o) {
+ long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the error state.
+ */
+ public static Result_TrackedSpendableOutputDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_TrackedSpendableOutputDecodeErrorZ clone() {
+ long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_TransactionNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_TransactionNoneZ_is_ok(ptr)) {
return new Result_TransactionNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TransactionU16LenLimitedDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_is_ok(ptr)) {
return new Result_TransactionU16LenLimitedDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TransactionU16LenLimitedDecodeErrorZ in the success state.
*/
public static Result_TransactionU16LenLimitedDecodeErrorZ ok(org.ldk.structs.TransactionU16LenLimited o) {
- long ret = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TransactionU16LenLimitedDecodeErrorZ ret_hu_conv = Result_TransactionU16LenLimitedDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_TransactionU16LenLimitedNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_TransactionU16LenLimitedNoneZ_is_ok(ptr)) {
return new Result_TransactionU16LenLimitedNoneZ_OK(null, ptr);
* Creates a new CResult_TransactionU16LenLimitedNoneZ in the success state.
*/
public static Result_TransactionU16LenLimitedNoneZ ok(org.ldk.structs.TransactionU16LenLimited o) {
- long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TransactionU16LenLimitedNoneZ ret_hu_conv = Result_TransactionU16LenLimitedNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TrustedClosingTransactionNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TrustedClosingTransactionNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_TrustedClosingTransactionNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_TrustedClosingTransactionNoneZ_is_ok(ptr)) {
return new Result_TrustedClosingTransactionNoneZ_OK(null, ptr);
* Creates a new CResult_TrustedClosingTransactionNoneZ in the success state.
*/
public static Result_TrustedClosingTransactionNoneZ ok(org.ldk.structs.TrustedClosingTransaction o) {
- long ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TrustedCommitmentTransactionNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TrustedCommitmentTransactionNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_TrustedCommitmentTransactionNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_TrustedCommitmentTransactionNoneZ_is_ok(ptr)) {
return new Result_TrustedCommitmentTransactionNoneZ_OK(null, ptr);
* Creates a new CResult_TrustedCommitmentTransactionNoneZ in the success state.
*/
public static Result_TrustedCommitmentTransactionNoneZ ok(org.ldk.structs.TrustedCommitmentTransaction o) {
- long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxAbortDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxAbortDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxAbortDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxAbortDecodeErrorZ_is_ok(ptr)) {
return new Result_TxAbortDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxAbortDecodeErrorZ in the success state.
*/
public static Result_TxAbortDecodeErrorZ ok(org.ldk.structs.TxAbort o) {
- long ret = bindings.CResult_TxAbortDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxAbortDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxAbortDecodeErrorZ ret_hu_conv = Result_TxAbortDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxAckRbfDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxAckRbfDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxAckRbfDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxAckRbfDecodeErrorZ_is_ok(ptr)) {
return new Result_TxAckRbfDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxAckRbfDecodeErrorZ in the success state.
*/
public static Result_TxAckRbfDecodeErrorZ ok(org.ldk.structs.TxAckRbf o) {
- long ret = bindings.CResult_TxAckRbfDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxAckRbfDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxAckRbfDecodeErrorZ ret_hu_conv = Result_TxAckRbfDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxAddInputDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxAddInputDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxAddInputDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxAddInputDecodeErrorZ_is_ok(ptr)) {
return new Result_TxAddInputDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxAddInputDecodeErrorZ in the success state.
*/
public static Result_TxAddInputDecodeErrorZ ok(org.ldk.structs.TxAddInput o) {
- long ret = bindings.CResult_TxAddInputDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxAddInputDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxAddInputDecodeErrorZ ret_hu_conv = Result_TxAddInputDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxAddOutputDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxAddOutputDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxAddOutputDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxAddOutputDecodeErrorZ_is_ok(ptr)) {
return new Result_TxAddOutputDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxAddOutputDecodeErrorZ in the success state.
*/
public static Result_TxAddOutputDecodeErrorZ ok(org.ldk.structs.TxAddOutput o) {
- long ret = bindings.CResult_TxAddOutputDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxAddOutputDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxAddOutputDecodeErrorZ ret_hu_conv = Result_TxAddOutputDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxCompleteDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxCompleteDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxCompleteDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxCompleteDecodeErrorZ_is_ok(ptr)) {
return new Result_TxCompleteDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxCompleteDecodeErrorZ in the success state.
*/
public static Result_TxCompleteDecodeErrorZ ok(org.ldk.structs.TxComplete o) {
- long ret = bindings.CResult_TxCompleteDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxCompleteDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxCompleteDecodeErrorZ ret_hu_conv = Result_TxCompleteDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxCreationKeysDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxCreationKeysDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxCreationKeysDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxCreationKeysDecodeErrorZ_is_ok(ptr)) {
return new Result_TxCreationKeysDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxCreationKeysDecodeErrorZ in the success state.
*/
public static Result_TxCreationKeysDecodeErrorZ ok(org.ldk.structs.TxCreationKeys o) {
- long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxInitRbfDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxInitRbfDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxInitRbfDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxInitRbfDecodeErrorZ_is_ok(ptr)) {
return new Result_TxInitRbfDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxInitRbfDecodeErrorZ in the success state.
*/
public static Result_TxInitRbfDecodeErrorZ ok(org.ldk.structs.TxInitRbf o) {
- long ret = bindings.CResult_TxInitRbfDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxInitRbfDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxInitRbfDecodeErrorZ ret_hu_conv = Result_TxInitRbfDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxOutUtxoLookupErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxOutUtxoLookupErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxOutUtxoLookupErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxOutUtxoLookupErrorZ_is_ok(ptr)) {
return new Result_TxOutUtxoLookupErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_TxRemoveInputDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxRemoveInputDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxRemoveInputDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxRemoveInputDecodeErrorZ_is_ok(ptr)) {
return new Result_TxRemoveInputDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxRemoveInputDecodeErrorZ in the success state.
*/
public static Result_TxRemoveInputDecodeErrorZ ok(org.ldk.structs.TxRemoveInput o) {
- long ret = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxRemoveInputDecodeErrorZ ret_hu_conv = Result_TxRemoveInputDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxRemoveOutputDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxRemoveOutputDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxRemoveOutputDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxRemoveOutputDecodeErrorZ_is_ok(ptr)) {
return new Result_TxRemoveOutputDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxRemoveOutputDecodeErrorZ in the success state.
*/
public static Result_TxRemoveOutputDecodeErrorZ ok(org.ldk.structs.TxRemoveOutput o) {
- long ret = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxRemoveOutputDecodeErrorZ ret_hu_conv = Result_TxRemoveOutputDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_TxSignaturesDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_TxSignaturesDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_TxSignaturesDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_TxSignaturesDecodeErrorZ_is_ok(ptr)) {
return new Result_TxSignaturesDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_TxSignaturesDecodeErrorZ in the success state.
*/
public static Result_TxSignaturesDecodeErrorZ ok(org.ldk.structs.TxSignatures o) {
- long ret = bindings.CResult_TxSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_TxSignaturesDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_TxSignaturesDecodeErrorZ ret_hu_conv = Result_TxSignaturesDecodeErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_UnknownPaymentContextDecodeErrorZ extends CommonBase {
+ private Result_UnknownPaymentContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_UnknownPaymentContextDecodeErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UnknownPaymentContextDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_UnknownPaymentContextDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(ptr)) {
+ return new Result_UnknownPaymentContextDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_UnknownPaymentContextDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_UnknownPaymentContextDecodeErrorZ_OK extends Result_UnknownPaymentContextDecodeErrorZ {
+ public final UnknownPaymentContext res;
+ private Result_UnknownPaymentContextDecodeErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.UnknownPaymentContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_UnknownPaymentContextDecodeErrorZ_Err extends Result_UnknownPaymentContextDecodeErrorZ {
+ public final DecodeError err;
+ private Result_UnknownPaymentContextDecodeErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long err = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_err(ptr);
+ org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the success state.
+ */
+ public static Result_UnknownPaymentContextDecodeErrorZ ok(org.ldk.structs.UnknownPaymentContext o) {
+ long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the error state.
+ */
+ public static Result_UnknownPaymentContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_err(e.ptr);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_UnknownPaymentContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UnknownPaymentContextDecodeErrorZ clone() {
+ long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ extends CommonBase {
+ private Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK extends Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ {
+ public final UnsignedBolt12Invoice res;
+ private Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.UnsignedBolt12Invoice res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err extends Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ok(org.ldk.structs.UnsignedBolt12Invoice o) {
+ long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ clone() {
+ long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_UnsignedChannelAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(ptr)) {
return new Result_UnsignedChannelAnnouncementDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state.
*/
public static Result_UnsignedChannelAnnouncementDecodeErrorZ ok(org.ldk.structs.UnsignedChannelAnnouncement o) {
- long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_UnsignedChannelUpdateDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(ptr)) {
return new Result_UnsignedChannelUpdateDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state.
*/
public static Result_UnsignedChannelUpdateDecodeErrorZ ok(org.ldk.structs.UnsignedChannelUpdate o) {
- long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ extends CommonBase {
+ private Result_UnsignedInvoiceRequestBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK extends Result_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+ public final UnsignedInvoiceRequest res;
+ private Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ long res = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.UnsignedInvoiceRequest res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public static final class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err extends Result_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+ public final Bolt12SemanticError err;
+ private Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ok(org.ldk.structs.UnsignedInvoiceRequest o) {
+ long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o.ptr);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+ long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UnsignedInvoiceRequestBolt12SemanticErrorZ clone() {
+ long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_UnsignedNodeAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(ptr)) {
return new Result_UnsignedNodeAnnouncementDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state.
*/
public static Result_UnsignedNodeAnnouncementDecodeErrorZ ok(org.ldk.structs.UnsignedNodeAnnouncement o) {
- long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_UntrustedStringDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UntrustedStringDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_UntrustedStringDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_UntrustedStringDecodeErrorZ_is_ok(ptr)) {
return new Result_UntrustedStringDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_UntrustedStringDecodeErrorZ in the success state.
*/
public static Result_UntrustedStringDecodeErrorZ ok(org.ldk.structs.UntrustedString o) {
- long ret = bindings.CResult_UntrustedStringDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_UntrustedStringDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_UntrustedStringDecodeErrorZ ret_hu_conv = Result_UntrustedStringDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_UpdateAddHTLCDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UpdateAddHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_UpdateAddHTLCDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_UpdateAddHTLCDecodeErrorZ_is_ok(ptr)) {
return new Result_UpdateAddHTLCDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state.
*/
public static Result_UpdateAddHTLCDecodeErrorZ ok(org.ldk.structs.UpdateAddHTLC o) {
- long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_UpdateFailHTLCDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UpdateFailHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_UpdateFailHTLCDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_UpdateFailHTLCDecodeErrorZ_is_ok(ptr)) {
return new Result_UpdateFailHTLCDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state.
*/
public static Result_UpdateFailHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFailHTLC o) {
- long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_UpdateFailMalformedHTLCDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(ptr)) {
return new Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state.
*/
public static Result_UpdateFailMalformedHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFailMalformedHTLC o) {
- long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_UpdateFeeDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UpdateFeeDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_UpdateFeeDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_UpdateFeeDecodeErrorZ_is_ok(ptr)) {
return new Result_UpdateFeeDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_UpdateFeeDecodeErrorZ in the success state.
*/
public static Result_UpdateFeeDecodeErrorZ ok(org.ldk.structs.UpdateFee o) {
- long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_UpdateFulfillHTLCDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(ptr)) {
return new Result_UpdateFulfillHTLCDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state.
*/
public static Result_UpdateFulfillHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFulfillHTLC o) {
- long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_VerifiedInvoiceRequestNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_VerifiedInvoiceRequestNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_VerifiedInvoiceRequestNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_VerifiedInvoiceRequestNoneZ_is_ok(ptr)) {
return new Result_VerifiedInvoiceRequestNoneZ_OK(null, ptr);
* Creates a new CResult_VerifiedInvoiceRequestNoneZ in the success state.
*/
public static Result_VerifiedInvoiceRequestNoneZ ok(org.ldk.structs.VerifiedInvoiceRequest o) {
- long ret = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_VerifiedInvoiceRequestNoneZ ret_hu_conv = Result_VerifiedInvoiceRequestNoneZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_WarningMessageDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_WarningMessageDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_WarningMessageDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_WarningMessageDecodeErrorZ_is_ok(ptr)) {
return new Result_WarningMessageDecodeErrorZ_OK(null, ptr);
* Creates a new CResult_WarningMessageDecodeErrorZ in the success state.
*/
public static Result_WarningMessageDecodeErrorZ ok(org.ldk.structs.WarningMessage o) {
- long ret = bindings.CResult_WarningMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ long ret = bindings.CResult_WarningMessageDecodeErrorZ_ok(o.ptr);
Reference.reachabilityFence(o);
if (ret >= 0 && ret <= 4096) { return null; }
Result_WarningMessageDecodeErrorZ ret_hu_conv = Result_WarningMessageDecodeErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_WitnessNoneZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_WitnessNoneZ_free(ptr); ptr = 0; }
+ }
+
static Result_WitnessNoneZ constr_from_ptr(long ptr) {
if (bindings.CResult_WitnessNoneZ_is_ok(ptr)) {
return new Result_WitnessNoneZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_WriteableEcdsaChannelSignerDecodeErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_WriteableEcdsaChannelSignerDecodeErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_WriteableEcdsaChannelSignerDecodeErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_WriteableEcdsaChannelSignerDecodeErrorZ_is_ok(ptr)) {
return new Result_WriteableEcdsaChannelSignerDecodeErrorZ_OK(null, ptr);
if (ptr != 0) { bindings.CResult_boolLightningErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_boolLightningErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_boolLightningErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_boolLightningErrorZ_is_ok(ptr)) {
return new Result_boolLightningErrorZ_OK(null, ptr);
* Creates a new CResult_boolLightningErrorZ in the error state.
*/
public static Result_boolLightningErrorZ err(org.ldk.structs.LightningError e) {
- long ret = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : e.ptr);
+ long ret = bindings.CResult_boolLightningErrorZ_err(e.ptr);
Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_boolPeerHandleErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_boolPeerHandleErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_boolPeerHandleErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_boolPeerHandleErrorZ_is_ok(ptr)) {
return new Result_boolPeerHandleErrorZ_OK(null, ptr);
* Creates a new CResult_boolPeerHandleErrorZ in the error state.
*/
public static Result_boolPeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) {
- long ret = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0 : e.ptr);
+ long ret = bindings.CResult_boolPeerHandleErrorZ_err(e.ptr);
Reference.reachabilityFence(e);
if (ret >= 0 && ret <= 4096) { return null; }
Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
if (ptr != 0) { bindings.CResult_u32GraphSyncErrorZ_free(ptr); } super.finalize();
}
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_u32GraphSyncErrorZ_free(ptr); ptr = 0; }
+ }
+
static Result_u32GraphSyncErrorZ constr_from_ptr(long ptr) {
if (bindings.CResult_u32GraphSyncErrorZ_is_ok(ptr)) {
return new Result_u32GraphSyncErrorZ_OK(null, ptr);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_u64ShortChannelIdErrorZ extends CommonBase {
+ private Result_u64ShortChannelIdErrorZ(Object _dummy, long ptr) { super(ptr); }
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.CResult_u64ShortChannelIdErrorZ_free(ptr); } super.finalize();
+ }
+
+ protected void force_free() {
+ if (ptr != 0) { bindings.CResult_u64ShortChannelIdErrorZ_free(ptr); ptr = 0; }
+ }
+
+ static Result_u64ShortChannelIdErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_u64ShortChannelIdErrorZ_is_ok(ptr)) {
+ return new Result_u64ShortChannelIdErrorZ_OK(null, ptr);
+ } else {
+ return new Result_u64ShortChannelIdErrorZ_Err(null, ptr);
+ }
+ }
+ public static final class Result_u64ShortChannelIdErrorZ_OK extends Result_u64ShortChannelIdErrorZ {
+ public final long res;
+ private Result_u64ShortChannelIdErrorZ_OK(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.res = bindings.CResult_u64ShortChannelIdErrorZ_get_ok(ptr);
+ }
+ }
+
+ public static final class Result_u64ShortChannelIdErrorZ_Err extends Result_u64ShortChannelIdErrorZ {
+ public final ShortChannelIdError err;
+ private Result_u64ShortChannelIdErrorZ_Err(Object _dummy, long ptr) {
+ super(_dummy, ptr);
+ this.err = bindings.CResult_u64ShortChannelIdErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_u64ShortChannelIdErrorZ in the success state.
+ */
+ public static Result_u64ShortChannelIdErrorZ ok(long o) {
+ long ret = bindings.CResult_u64ShortChannelIdErrorZ_ok(o);
+ Reference.reachabilityFence(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_u64ShortChannelIdErrorZ in the error state.
+ */
+ public static Result_u64ShortChannelIdErrorZ err(org.ldk.enums.ShortChannelIdError e) {
+ long ret = bindings.CResult_u64ShortChannelIdErrorZ_err(e);
+ Reference.reachabilityFence(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public boolean is_ok() {
+ boolean ret = bindings.CResult_u64ShortChannelIdErrorZ_is_ok(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+}
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.Retry b) {
- boolean ret = bindings.Retry_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Retry_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RevocationBasepoint b) {
- boolean ret = bindings.RevocationBasepoint_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RevocationBasepoint_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RevocationKey b) {
- boolean ret = bindings.RevocationKey_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RevocationKey_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* [`chan_utils::derive_private_revocation_key`]: crate::ln::chan_utils::derive_private_revocation_key
*/
public static RevocationKey from_basepoint(org.ldk.structs.RevocationBasepoint countersignatory_basepoint, byte[] per_commitment_point) {
- long ret = bindings.RevocationKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+ long ret = bindings.RevocationKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
Reference.reachabilityFence(countersignatory_basepoint);
Reference.reachabilityFence(per_commitment_point);
if (ret >= 0 && ret <= 4096) { return null; }
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.RevokeAndACK_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.RevokeAndACK_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.RevokeAndACK_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.RevokeAndACK_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new RevokeAndACK given each field
*/
- public static RevokeAndACK of(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg) {
- long ret = bindings.RevokeAndACK_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(per_commitment_secret_arg, 32), InternalUtils.check_arr_len(next_per_commitment_point_arg, 33));
+ public static RevokeAndACK of(org.ldk.structs.ChannelId channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg) {
+ long ret = bindings.RevokeAndACK_new(channel_id_arg.ptr, InternalUtils.check_arr_len(per_commitment_secret_arg, 32), InternalUtils.check_arr_len(next_per_commitment_point_arg, 33));
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(per_commitment_secret_arg);
Reference.reachabilityFence(next_per_commitment_point_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.RevokeAndACK ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RevokeAndACK(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RevokeAndACK b) {
- boolean ret = bindings.RevokeAndACK_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RevokeAndACK_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* the same.
*/
public void set_paths(Path[] val) {
- bindings.Route_set_paths(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6 == null ? 0 : val_conv_6.ptr).toArray() : null);
+ bindings.Route_set_paths(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (Path val_conv_6: val) { if (this != null) { this.ptrs_to.add(val_conv_6); }; };
* Note that route_params_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static Route of(Path[] paths_arg, @Nullable org.ldk.structs.RouteParameters route_params_arg) {
- long ret = bindings.Route_new(paths_arg != null ? Arrays.stream(paths_arg).mapToLong(paths_arg_conv_6 -> paths_arg_conv_6 == null ? 0 : paths_arg_conv_6.ptr).toArray() : null, route_params_arg == null ? 0 : route_params_arg.ptr);
+ long ret = bindings.Route_new(paths_arg != null ? Arrays.stream(paths_arg).mapToLong(paths_arg_conv_6 -> paths_arg_conv_6.ptr).toArray() : null, route_params_arg == null ? 0 : route_params_arg.ptr);
Reference.reachabilityFence(paths_arg);
Reference.reachabilityFence(route_params_arg);
if (ret >= 0 && ret <= 4096) { return null; }
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Route b) {
- boolean ret = bindings.Route_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Route_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
}
public void set_a(RouteHintHop[] val) {
- bindings.RouteHint_set_a(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_14 -> val_conv_14 == null ? 0 : val_conv_14.ptr).toArray() : null);
+ bindings.RouteHint_set_a(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_14 -> val_conv_14.ptr).toArray() : null);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
for (RouteHintHop val_conv_14: val) { if (this != null) { this.ptrs_to.add(val_conv_14); }; };
* Constructs a new RouteHint given each field
*/
public static RouteHint of(RouteHintHop[] a_arg) {
- long ret = bindings.RouteHint_new(a_arg != null ? Arrays.stream(a_arg).mapToLong(a_arg_conv_14 -> a_arg_conv_14 == null ? 0 : a_arg_conv_14.ptr).toArray() : null);
+ long ret = bindings.RouteHint_new(a_arg != null ? Arrays.stream(a_arg).mapToLong(a_arg_conv_14 -> a_arg_conv_14.ptr).toArray() : null);
Reference.reachabilityFence(a_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.RouteHint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RouteHint(null, ret); }
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RouteHint b) {
- boolean ret = bindings.RouteHint_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RouteHint_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* The fees which must be paid to use this channel
*/
public void set_fees(org.ldk.structs.RoutingFees val) {
- bindings.RouteHintHop_set_fees(this.ptr, val == null ? 0 : val.ptr);
+ bindings.RouteHintHop_set_fees(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new RouteHintHop given each field
*/
public static RouteHintHop of(byte[] src_node_id_arg, long short_channel_id_arg, org.ldk.structs.RoutingFees fees_arg, short cltv_expiry_delta_arg, org.ldk.structs.Option_u64Z htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z htlc_maximum_msat_arg) {
- long ret = bindings.RouteHintHop_new(InternalUtils.check_arr_len(src_node_id_arg, 33), short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr);
+ long ret = bindings.RouteHintHop_new(InternalUtils.check_arr_len(src_node_id_arg, 33), short_channel_id_arg, fees_arg.ptr, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr);
Reference.reachabilityFence(src_node_id_arg);
Reference.reachabilityFence(short_channel_id_arg);
Reference.reachabilityFence(fees_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RouteHintHop b) {
- boolean ret = bindings.RouteHintHop_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RouteHintHop_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* amended to match the features present in the invoice this node generated.
*/
public void set_node_features(org.ldk.structs.NodeFeatures val) {
- bindings.RouteHop_set_node_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.RouteHop_set_node_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* to reach this node.
*/
public void set_channel_features(org.ldk.structs.ChannelFeatures val) {
- bindings.RouteHop_set_channel_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.RouteHop_set_channel_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new RouteHop given each field
*/
public static RouteHop of(byte[] pubkey_arg, org.ldk.structs.NodeFeatures node_features_arg, long short_channel_id_arg, org.ldk.structs.ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg, boolean maybe_announced_channel_arg) {
- long ret = bindings.RouteHop_new(InternalUtils.check_arr_len(pubkey_arg, 33), node_features_arg == null ? 0 : node_features_arg.ptr, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr, fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg);
+ long ret = bindings.RouteHop_new(InternalUtils.check_arr_len(pubkey_arg, 33), node_features_arg.ptr, short_channel_id_arg, channel_features_arg.ptr, fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg);
Reference.reachabilityFence(pubkey_arg);
Reference.reachabilityFence(node_features_arg);
Reference.reachabilityFence(short_channel_id_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RouteHop b) {
- boolean ret = bindings.RouteHop_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RouteHop_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* The parameters of the failed payment path.
*/
public void set_payment_params(org.ldk.structs.PaymentParameters val) {
- bindings.RouteParameters_set_payment_params(this.ptr, val == null ? 0 : val.ptr);
+ bindings.RouteParameters_set_payment_params(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new RouteParameters given each field
*/
public static RouteParameters of(org.ldk.structs.PaymentParameters payment_params_arg, long final_value_msat_arg, org.ldk.structs.Option_u64Z max_total_routing_fee_msat_arg) {
- long ret = bindings.RouteParameters_new(payment_params_arg == null ? 0 : payment_params_arg.ptr, final_value_msat_arg, max_total_routing_fee_msat_arg.ptr);
+ long ret = bindings.RouteParameters_new(payment_params_arg.ptr, final_value_msat_arg, max_total_routing_fee_msat_arg.ptr);
Reference.reachabilityFence(payment_params_arg);
Reference.reachabilityFence(final_value_msat_arg);
Reference.reachabilityFence(max_total_routing_fee_msat_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RouteParameters b) {
- boolean ret = bindings.RouteParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RouteParameters_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* [`Self::max_total_routing_fee_msat`] defaults to 1% of the payment amount + 50 sats
*/
public static RouteParameters from_payment_params_and_value(org.ldk.structs.PaymentParameters payment_params, long final_value_msat) {
- long ret = bindings.RouteParameters_from_payment_params_and_value(payment_params == null ? 0 : payment_params.ptr, final_value_msat);
+ long ret = bindings.RouteParameters_from_payment_params_and_value(payment_params.ptr, final_value_msat);
Reference.reachabilityFence(payment_params);
Reference.reachabilityFence(final_value_msat);
if (ret >= 0 && ret <= 4096) { return null; }
if (inflight_htlcs_hu_conv != null) { inflight_htlcs_hu_conv.ptrs_to.add(this); };
Result_RouteLightningErrorZ ret = arg.find_route(payer, route_params_hu_conv, first_hops_conv_16_arr, inflight_htlcs_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long find_route_with_id(byte[] payer, long route_params, long[] first_hops, long inflight_htlcs, byte[] _payment_hash, byte[] _payment_id) {
if (inflight_htlcs_hu_conv != null) { inflight_htlcs_hu_conv.ptrs_to.add(this); };
Result_RouteLightningErrorZ ret = arg.find_route_with_id(payer, route_params_hu_conv, first_hops_conv_16_arr, inflight_htlcs_hu_conv, _payment_hash, _payment_id);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long create_blinded_payment_paths(byte[] recipient, long[] first_hops, long tlvs, long amount_msats) {
if (tlvs_hu_conv != null) { tlvs_hu_conv.ptrs_to.add(this); };
Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ret = arg.create_blinded_payment_paths(recipient, first_hops_conv_16_arr, tlvs_hu_conv, amount_msats);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
}, MessageRouter.new_impl(MessageRouter_impl).bindings_instance);
* Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public Result_RouteLightningErrorZ find_route(byte[] payer, org.ldk.structs.RouteParameters route_params, @Nullable ChannelDetails[] first_hops, org.ldk.structs.InFlightHtlcs inflight_htlcs) {
- long ret = bindings.Router_find_route(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params == null ? 0 : route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, inflight_htlcs == null ? 0 : inflight_htlcs.ptr);
+ long ret = bindings.Router_find_route(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, inflight_htlcs.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(payer);
Reference.reachabilityFence(route_params);
* Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public Result_RouteLightningErrorZ find_route_with_id(byte[] payer, org.ldk.structs.RouteParameters route_params, @Nullable ChannelDetails[] first_hops, org.ldk.structs.InFlightHtlcs inflight_htlcs, byte[] _payment_hash, byte[] _payment_id) {
- long ret = bindings.Router_find_route_with_id(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params == null ? 0 : route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, inflight_htlcs == null ? 0 : inflight_htlcs.ptr, InternalUtils.check_arr_len(_payment_hash, 32), InternalUtils.check_arr_len(_payment_id, 32));
+ long ret = bindings.Router_find_route_with_id(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, inflight_htlcs.ptr, InternalUtils.check_arr_len(_payment_hash, 32), InternalUtils.check_arr_len(_payment_id, 32));
Reference.reachabilityFence(this);
Reference.reachabilityFence(payer);
Reference.reachabilityFence(route_params);
* given in `tlvs`.
*/
public Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ create_blinded_payment_paths(byte[] recipient, ChannelDetails[] first_hops, org.ldk.structs.ReceiveTlvs tlvs, long amount_msats) {
- long ret = bindings.Router_create_blinded_payment_paths(this.ptr, InternalUtils.check_arr_len(recipient, 33), first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, tlvs == null ? 0 : tlvs.ptr, amount_msats);
+ long ret = bindings.Router_create_blinded_payment_paths(this.ptr, InternalUtils.check_arr_len(recipient, 33), first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, tlvs.ptr, amount_msats);
Reference.reachabilityFence(this);
Reference.reachabilityFence(recipient);
Reference.reachabilityFence(first_hops);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.RoutingFees b) {
- boolean ret = bindings.RoutingFees_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.RoutingFees_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
org.ldk.structs.NodeAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.NodeAnnouncement(null, msg); }
Result_boolLightningErrorZ ret = arg.handle_node_announcement(msg_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long handle_channel_announcement(long msg) {
org.ldk.structs.ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, msg); }
Result_boolLightningErrorZ ret = arg.handle_channel_announcement(msg_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long handle_channel_update(long msg) {
org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); }
Result_boolLightningErrorZ ret = arg.handle_channel_update(msg_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long get_next_channel_announcement(long starting_point) {
Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret = arg.get_next_channel_announcement(starting_point);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
return result;
}
org.ldk.structs.Init init_hu_conv = null; if (init < 0 || init > 4096) { init_hu_conv = new org.ldk.structs.Init(null, init); }
Result_NoneNoneZ ret = arg.peer_connected(their_node_id, init_hu_conv, inbound);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long handle_reply_channel_range(byte[] their_node_id, long msg) {
if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
Result_NoneLightningErrorZ ret = arg.handle_reply_channel_range(their_node_id, msg_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long handle_reply_short_channel_ids_end(byte[] their_node_id, long msg) {
if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
Result_NoneLightningErrorZ ret = arg.handle_reply_short_channel_ids_end(their_node_id, msg_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long handle_query_channel_range(byte[] their_node_id, long msg) {
if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
Result_NoneLightningErrorZ ret = arg.handle_query_channel_range(their_node_id, msg_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long handle_query_short_channel_ids(byte[] their_node_id, long msg) {
if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
Result_NoneLightningErrorZ ret = arg.handle_query_short_channel_ids(their_node_id, msg_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public boolean processing_queue_high() {
@Override public long provided_node_features() {
NodeFeatures ret = arg.provided_node_features();
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long provided_init_features(byte[] their_node_id) {
InitFeatures ret = arg.provided_init_features(their_node_id);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
}, MessageSendEventsProvider.new_impl(MessageSendEventsProvider_impl).bindings_instance);
* `false` or returning an `Err` otherwise.
*/
public Result_boolLightningErrorZ handle_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
- long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* or returning an `Err` otherwise.
*/
public Result_boolLightningErrorZ handle_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) {
- long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* `false` or returning an `Err` otherwise.
*/
public Result_boolLightningErrorZ handle_channel_update(org.ldk.structs.ChannelUpdate msg) {
- long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg == null ? 0 : msg.ptr);
+ long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
* message handlers may still wish to communicate with this peer.
*/
public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init init, boolean inbound) {
- long ret = bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr, inbound);
+ long ret = bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init.ptr, inbound);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(init);
* replies to a single query.
*/
public Result_NoneLightningErrorZ handle_reply_channel_range(byte[] their_node_id, org.ldk.structs.ReplyChannelRange msg) {
- long ret = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* gossip messages.
*/
public Result_NoneLightningErrorZ handle_reply_short_channel_ids_end(byte[] their_node_id, org.ldk.structs.ReplyShortChannelIdsEnd msg) {
- long ret = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* for the requested range of blocks.
*/
public Result_NoneLightningErrorZ handle_query_channel_range(byte[] their_node_id, org.ldk.structs.QueryChannelRange msg) {
- long ret = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* list of `short_channel_id`s.
*/
public Result_NoneLightningErrorZ handle_query_short_channel_ids(byte[] their_node_id, org.ldk.structs.QueryShortChannelIds msg) {
- long ret = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+ long ret = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(their_node_id);
Reference.reachabilityFence(msg);
* Thus, implementations should be overflow-safe.
*/
public long channel_penalty_msat(org.ldk.structs.CandidateRouteHop candidate, org.ldk.structs.ChannelUsage usage, org.ldk.structs.ProbabilisticScoringFeeParameters score_params) {
- long ret = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, candidate == null ? 0 : candidate.ptr, usage == null ? 0 : usage.ptr, score_params == null ? 0 : score_params.ptr);
+ long ret = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, candidate.ptr, usage.ptr, score_params.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(candidate);
Reference.reachabilityFence(usage);
* Handles updating channel penalties after failing to route through a channel.
*/
public void payment_path_failed(org.ldk.structs.Path path, long short_channel_id, long duration_since_epoch) {
- bindings.ScoreUpdate_payment_path_failed(this.ptr, path == null ? 0 : path.ptr, short_channel_id, duration_since_epoch);
+ bindings.ScoreUpdate_payment_path_failed(this.ptr, path.ptr, short_channel_id, duration_since_epoch);
Reference.reachabilityFence(this);
Reference.reachabilityFence(path);
Reference.reachabilityFence(short_channel_id);
* Handles updating channel penalties after successfully routing along a path.
*/
public void payment_path_successful(org.ldk.structs.Path path, long duration_since_epoch) {
- bindings.ScoreUpdate_payment_path_successful(this.ptr, path == null ? 0 : path.ptr, duration_since_epoch);
+ bindings.ScoreUpdate_payment_path_successful(this.ptr, path.ptr, duration_since_epoch);
Reference.reachabilityFence(this);
Reference.reachabilityFence(path);
Reference.reachabilityFence(duration_since_epoch);
* Handles updating channel penalties after a probe over the given path failed.
*/
public void probe_failed(org.ldk.structs.Path path, long short_channel_id, long duration_since_epoch) {
- bindings.ScoreUpdate_probe_failed(this.ptr, path == null ? 0 : path.ptr, short_channel_id, duration_since_epoch);
+ bindings.ScoreUpdate_probe_failed(this.ptr, path.ptr, short_channel_id, duration_since_epoch);
Reference.reachabilityFence(this);
Reference.reachabilityFence(path);
Reference.reachabilityFence(short_channel_id);
* Handles updating channel penalties after a probe over the given path succeeded.
*/
public void probe_successful(org.ldk.structs.Path path, long duration_since_epoch) {
- bindings.ScoreUpdate_probe_successful(this.ptr, path == null ? 0 : path.ptr, duration_since_epoch);
+ bindings.ScoreUpdate_probe_successful(this.ptr, path.ptr, duration_since_epoch);
Reference.reachabilityFence(this);
Reference.reachabilityFence(path);
Reference.reachabilityFence(duration_since_epoch);
* Initialize a new `ScorerAccountingForInFlightHtlcs`.
*/
public static ScorerAccountingForInFlightHtlcs of(org.ldk.structs.ScoreLookUp scorer, org.ldk.structs.InFlightHtlcs inflight_htlcs) {
- long ret = bindings.ScorerAccountingForInFlightHtlcs_new(scorer.ptr, inflight_htlcs == null ? 0 : inflight_htlcs.ptr);
+ long ret = bindings.ScorerAccountingForInFlightHtlcs_new(scorer.ptr, inflight_htlcs.ptr);
Reference.reachabilityFence(scorer);
Reference.reachabilityFence(inflight_htlcs);
if (ret >= 0 && ret <= 4096) { return null; }
if (raw_val.getClass() == bindings.LDKSendError.GetNodeIdFailed.class) {
return new GetNodeIdFailed(ptr, (bindings.LDKSendError.GetNodeIdFailed)raw_val);
}
+ if (raw_val.getClass() == bindings.LDKSendError.UnresolvedIntroductionNode.class) {
+ return new UnresolvedIntroductionNode(ptr, (bindings.LDKSendError.UnresolvedIntroductionNode)raw_val);
+ }
if (raw_val.getClass() == bindings.LDKSendError.BlindedPathAdvanceFailed.class) {
return new BlindedPathAdvanceFailed(ptr, (bindings.LDKSendError.BlindedPathAdvanceFailed)raw_val);
}
super(null, ptr);
}
}
+ /**
+ * The provided [`Destination`] has a blinded path with an unresolved introduction node. An
+ * attempt to resolve it in the [`MessageRouter`] when finding an [`OnionMessagePath`] likely
+ * failed.
+ */
+ public final static class UnresolvedIntroductionNode extends SendError {
+ private UnresolvedIntroductionNode(long ptr, bindings.LDKSendError.UnresolvedIntroductionNode obj) {
+ super(null, ptr);
+ }
+ }
/**
* We attempted to send to a blinded path where we are the introduction node, and failed to
* advance the blinded path to make the second hop the new introduction node. Either
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new UnresolvedIntroductionNode-variant SendError
+ */
+ public static SendError unresolved_introduction_node() {
+ long ret = bindings.SendError_unresolved_introduction_node();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.SendError ret_hu_conv = org.ldk.structs.SendError.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
/**
* Utility method to constructs a new BlindedPathAdvanceFailed-variant SendError
*/
return ret_hu_conv;
}
+ /**
+ * Generates a non-cryptographic 64-bit hash of the SendError.
+ */
+ public long hash() {
+ long ret = bindings.SendError_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
/**
* Checks if two SendErrors contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.SendError b) {
- boolean ret = bindings.SendError_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.SendError_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
return ret_hu_conv;
}
+ /**
+ * Generates a non-cryptographic 64-bit hash of the SendSuccess.
+ */
+ public long hash() {
+ long ret = bindings.SendSuccess_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
/**
* Checks if two SendSuccesss contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.SendSuccess b) {
- boolean ret = bindings.SendSuccess_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.SendSuccess_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Sha256 b) {
- boolean ret = bindings.Sha256_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Sha256_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.Shutdown_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.Shutdown_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.Shutdown_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.Shutdown_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new Shutdown given each field
*/
- public static Shutdown of(byte[] channel_id_arg, byte[] scriptpubkey_arg) {
- long ret = bindings.Shutdown_new(InternalUtils.check_arr_len(channel_id_arg, 32), scriptpubkey_arg);
+ public static Shutdown of(org.ldk.structs.ChannelId channel_id_arg, byte[] scriptpubkey_arg) {
+ long ret = bindings.Shutdown_new(channel_id_arg.ptr, scriptpubkey_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(scriptpubkey_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Shutdown ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Shutdown(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Shutdown b) {
- boolean ret = bindings.Shutdown_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Shutdown_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.ShutdownScript b) {
- boolean ret = bindings.ShutdownScript_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.ShutdownScript_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Specifically, checks for compliance with feature `option_shutdown_anysegwit`.
*/
public boolean is_compatible(org.ldk.structs.InitFeatures features) {
- boolean ret = bindings.ShutdownScript_is_compatible(this.ptr, features == null ? 0 : features.ptr);
+ boolean ret = bindings.ShutdownScript_is_compatible(this.ptr, features.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(features);
if (this != null) { this.ptrs_to.add(features); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * A function for signing an [`UnsignedBolt12Invoice`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class SignBolt12InvoiceFn extends CommonBase {
+ final bindings.LDKSignBolt12InvoiceFn bindings_instance;
+ SignBolt12InvoiceFn(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+ private SignBolt12InvoiceFn(bindings.LDKSignBolt12InvoiceFn arg) {
+ super(bindings.LDKSignBolt12InvoiceFn_new(arg));
+ this.ptrs_to.add(arg);
+ this.bindings_instance = arg;
+ }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.SignBolt12InvoiceFn_free(ptr); } super.finalize();
+ }
+ /**
+ * Destroys the object, freeing associated resources. After this call, any access
+ * to this object may result in a SEGFAULT or worse.
+ *
+ * You should generally NEVER call this method. You should let the garbage collector
+ * do this for you when it finalizes objects. However, it may be useful for types
+ * which represent locks and should be closed immediately to avoid holding locks
+ * until the GC runs.
+ */
+ public void destroy() {
+ if (ptr != 0) { bindings.SignBolt12InvoiceFn_free(ptr); }
+ ptr = 0;
+ }
+ public static interface SignBolt12InvoiceFnInterface {
+ /**
+ * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
+ */
+ Result_SchnorrSignatureNoneZ sign_invoice(UnsignedBolt12Invoice message);
+ }
+ private static class LDKSignBolt12InvoiceFnHolder { SignBolt12InvoiceFn held; }
+ public static SignBolt12InvoiceFn new_impl(SignBolt12InvoiceFnInterface arg) {
+ final LDKSignBolt12InvoiceFnHolder impl_holder = new LDKSignBolt12InvoiceFnHolder();
+ impl_holder.held = new SignBolt12InvoiceFn(new bindings.LDKSignBolt12InvoiceFn() {
+ @Override public long sign_invoice(long message) {
+ org.ldk.structs.UnsignedBolt12Invoice message_hu_conv = null; if (message < 0 || message > 4096) { message_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, message); }
+ Result_SchnorrSignatureNoneZ ret = arg.sign_invoice(message_hu_conv);
+ Reference.reachabilityFence(arg);
+ long result = ret.clone_ptr();
+ return result;
+ }
+ });
+ return impl_holder.held;
+ }
+ /**
+ * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
+ */
+ public Result_SchnorrSignatureNoneZ sign_invoice(org.ldk.structs.UnsignedBolt12Invoice message) {
+ long ret = bindings.SignBolt12InvoiceFn_sign_invoice(this.ptr, message.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(message);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_SchnorrSignatureNoneZ ret_hu_conv = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(message); };
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Error when signing messages.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class SignError extends CommonBase {
+ private SignError(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.SignError_free(ptr); }
+ }
+ static SignError constr_from_ptr(long ptr) {
+ bindings.LDKSignError raw_val = bindings.LDKSignError_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKSignError.Signing.class) {
+ return new Signing(ptr, (bindings.LDKSignError.Signing)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKSignError.Verification.class) {
+ return new Verification(ptr, (bindings.LDKSignError.Verification)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * User-defined error when signing the message.
+ */
+ public final static class Signing extends SignError {
+ private Signing(long ptr, bindings.LDKSignError.Signing obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * Error when verifying the produced signature using the given pubkey.
+ */
+ public final static class Verification extends SignError {
+ public final org.ldk.enums.Secp256k1Error verification;
+ private Verification(long ptr, bindings.LDKSignError.Verification obj) {
+ super(null, ptr);
+ this.verification = obj.verification;
+ }
+ }
+ long clone_ptr() {
+ long ret = bindings.SignError_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the SignError
+ */
+ public SignError clone() {
+ long ret = bindings.SignError_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Signing-variant SignError
+ */
+ public static SignError signing() {
+ long ret = bindings.SignError_signing();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Verification-variant SignError
+ */
+ public static SignError verification(org.ldk.enums.Secp256k1Error a) {
+ long ret = bindings.SignError_verification(a);
+ Reference.reachabilityFence(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * A function for signing an [`UnsignedInvoiceRequest`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class SignInvoiceRequestFn extends CommonBase {
+ final bindings.LDKSignInvoiceRequestFn bindings_instance;
+ SignInvoiceRequestFn(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+ private SignInvoiceRequestFn(bindings.LDKSignInvoiceRequestFn arg) {
+ super(bindings.LDKSignInvoiceRequestFn_new(arg));
+ this.ptrs_to.add(arg);
+ this.bindings_instance = arg;
+ }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ if (ptr != 0) { bindings.SignInvoiceRequestFn_free(ptr); } super.finalize();
+ }
+ /**
+ * Destroys the object, freeing associated resources. After this call, any access
+ * to this object may result in a SEGFAULT or worse.
+ *
+ * You should generally NEVER call this method. You should let the garbage collector
+ * do this for you when it finalizes objects. However, it may be useful for types
+ * which represent locks and should be closed immediately to avoid holding locks
+ * until the GC runs.
+ */
+ public void destroy() {
+ if (ptr != 0) { bindings.SignInvoiceRequestFn_free(ptr); }
+ ptr = 0;
+ }
+ public static interface SignInvoiceRequestFnInterface {
+ /**
+ * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
+ */
+ Result_SchnorrSignatureNoneZ sign_invoice_request(UnsignedInvoiceRequest message);
+ }
+ private static class LDKSignInvoiceRequestFnHolder { SignInvoiceRequestFn held; }
+ public static SignInvoiceRequestFn new_impl(SignInvoiceRequestFnInterface arg) {
+ final LDKSignInvoiceRequestFnHolder impl_holder = new LDKSignInvoiceRequestFnHolder();
+ impl_holder.held = new SignInvoiceRequestFn(new bindings.LDKSignInvoiceRequestFn() {
+ @Override public long sign_invoice_request(long message) {
+ org.ldk.structs.UnsignedInvoiceRequest message_hu_conv = null; if (message < 0 || message > 4096) { message_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, message); }
+ Result_SchnorrSignatureNoneZ ret = arg.sign_invoice_request(message_hu_conv);
+ Reference.reachabilityFence(arg);
+ long result = ret.clone_ptr();
+ return result;
+ }
+ });
+ return impl_holder.held;
+ }
+ /**
+ * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
+ */
+ public Result_SchnorrSignatureNoneZ sign_invoice_request(org.ldk.structs.UnsignedInvoiceRequest message) {
+ long ret = bindings.SignInvoiceRequestFn_sign_invoice_request(this.ptr, message.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(message);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_SchnorrSignatureNoneZ ret_hu_conv = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.add(message); };
+ return ret_hu_conv;
+ }
+
+}
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.SignOrCreationError b) {
- boolean ret = bindings.SignOrCreationError_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.SignOrCreationError_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.SignedRawBolt11Invoice b) {
- boolean ret = bindings.SignedRawBolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.SignedRawBolt11Invoice_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
@Override public long read_chan_signer(byte[] reader) {
Result_WriteableEcdsaChannelSignerDecodeErrorZ ret = arg.read_chan_signer(reader);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long get_destination_script(byte[] channel_keys_id) {
Result_CVec_u8ZNoneZ ret = arg.get_destination_script(channel_keys_id);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long get_shutdown_scriptpubkey() {
Result_ShutdownScriptNoneZ ret = arg.get_shutdown_scriptpubkey();
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
});
* Constructs a new sleeper from one future, allowing blocking on it.
*/
public static Sleeper from_single_future(org.ldk.structs.Future future) {
- long ret = bindings.Sleeper_from_single_future(future == null ? 0 : future.ptr);
+ long ret = bindings.Sleeper_from_single_future(future.ptr);
Reference.reachabilityFence(future);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Sleeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Sleeper(null, ret); }
* Constructs a new sleeper from two futures, allowing blocking on both at once.
*/
public static Sleeper from_two_futures(org.ldk.structs.Future fut_a, org.ldk.structs.Future fut_b) {
- long ret = bindings.Sleeper_from_two_futures(fut_a == null ? 0 : fut_a.ptr, fut_b == null ? 0 : fut_b.ptr);
+ long ret = bindings.Sleeper_from_two_futures(fut_a.ptr, fut_b.ptr);
Reference.reachabilityFence(fut_a);
Reference.reachabilityFence(fut_b);
if (ret >= 0 && ret <= 4096) { return null; }
* Constructs a new sleeper on many futures, allowing blocking on all at once.
*/
public static Sleeper of(Future[] futures) {
- long ret = bindings.Sleeper_new(futures != null ? Arrays.stream(futures).mapToLong(futures_conv_8 -> futures_conv_8 == null ? 0 : futures_conv_8.ptr).toArray() : null);
+ long ret = bindings.Sleeper_new(futures != null ? Arrays.stream(futures).mapToLong(futures_conv_8 -> futures_conv_8.ptr).toArray() : null);
Reference.reachabilityFence(futures);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Sleeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Sleeper(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- for (Future futures_conv_8: futures) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(futures_conv_8); }; };
+ for (Future futures_conv_8: futures) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(futures_conv_8); };
+ // Due to rust's strict-ownership memory model, in some cases we need to "move"
+ // an object to pass exclusive ownership to the function being called.
+ // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+ // at the FFI layer, creating a new object which Rust can claim ownership of
+ // However, in some cases (eg here), there is no way to clone an object, and thus
+ // we actually have to pass full ownership to Rust.
+ // Thus, after ret_hu_conv call, futures_conv_8 is reset to null and is now a dummy object.
+ futures_conv_8.ptr = 0;; };
return ret_hu_conv;
}
* Utility method to constructs a new Hostname-variant SocketAddress
*/
public static SocketAddress hostname(org.ldk.structs.Hostname hostname, short port) {
- long ret = bindings.SocketAddress_hostname(hostname == null ? 0 : hostname.ptr, port);
+ long ret = bindings.SocketAddress_hostname(hostname.ptr, port);
Reference.reachabilityFence(hostname);
Reference.reachabilityFence(port);
if (ret >= 0 && ret <= 4096) { return null; }
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.SocketAddress b) {
- boolean ret = bindings.SocketAddress_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.SocketAddress_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
* Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptor
*/
public static SpendableOutputDescriptor static_output(org.ldk.structs.OutPoint outpoint, org.ldk.structs.TxOut output, byte[] channel_keys_id) {
- long ret = bindings.SpendableOutputDescriptor_static_output(outpoint == null ? 0 : outpoint.ptr, output.ptr, InternalUtils.check_arr_len(channel_keys_id, 32));
+ long ret = bindings.SpendableOutputDescriptor_static_output(outpoint.ptr, output.ptr, InternalUtils.check_arr_len(channel_keys_id, 32));
Reference.reachabilityFence(outpoint);
Reference.reachabilityFence(output);
Reference.reachabilityFence(channel_keys_id);
* Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptor
*/
public static SpendableOutputDescriptor delayed_payment_output(org.ldk.structs.DelayedPaymentOutputDescriptor a) {
- long ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a == null ? 0 : a.ptr);
+ long ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret);
* Utility method to constructs a new StaticPaymentOutput-variant SpendableOutputDescriptor
*/
public static SpendableOutputDescriptor static_payment_output(org.ldk.structs.StaticPaymentOutputDescriptor a) {
- long ret = bindings.SpendableOutputDescriptor_static_payment_output(a == null ? 0 : a.ptr);
+ long ret = bindings.SpendableOutputDescriptor_static_payment_output(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret);
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(org.ldk.structs.SpendableOutputDescriptor b) {
- boolean ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret;
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A `enum` signalling to the [`OutputSweeper`] that it should delay spending an output until a
+ * future block height is reached.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class SpendingDelay extends CommonBase {
+ private SpendingDelay(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.SpendingDelay_free(ptr); }
+ }
+ static SpendingDelay constr_from_ptr(long ptr) {
+ bindings.LDKSpendingDelay raw_val = bindings.LDKSpendingDelay_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKSpendingDelay.Relative.class) {
+ return new Relative(ptr, (bindings.LDKSpendingDelay.Relative)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKSpendingDelay.Absolute.class) {
+ return new Absolute(ptr, (bindings.LDKSpendingDelay.Absolute)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ /**
+ * A relative delay indicating we shouldn't spend the output before `cur_height + num_blocks`
+ * is reached.
+ */
+ public final static class Relative extends SpendingDelay {
+ /**
+ * The number of blocks until we'll generate and broadcast the spending transaction.
+ */
+ public final int num_blocks;
+ private Relative(long ptr, bindings.LDKSpendingDelay.Relative obj) {
+ super(null, ptr);
+ this.num_blocks = obj.num_blocks;
+ }
+ }
+ /**
+ * An absolute delay indicating we shouldn't spend the output before `height` is reached.
+ */
+ public final static class Absolute extends SpendingDelay {
+ /**
+ * The height at which we'll generate and broadcast the spending transaction.
+ */
+ public final int height;
+ private Absolute(long ptr, bindings.LDKSpendingDelay.Absolute obj) {
+ super(null, ptr);
+ this.height = obj.height;
+ }
+ }
+ long clone_ptr() {
+ long ret = bindings.SpendingDelay_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the SpendingDelay
+ */
+ public SpendingDelay clone() {
+ long ret = bindings.SpendingDelay_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Relative-variant SpendingDelay
+ */
+ public static SpendingDelay relative(int num_blocks) {
+ long ret = bindings.SpendingDelay_relative(num_blocks);
+ Reference.reachabilityFence(num_blocks);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Absolute-variant SpendingDelay
+ */
+ public static SpendingDelay absolute(int height) {
+ long ret = bindings.SpendingDelay_absolute(height);
+ Reference.reachabilityFence(height);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
/**
* The channel ID where splicing is intended
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.Splice_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.Splice_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID where splicing is intended
*/
- public void set_channel_id(byte[] val) {
- bindings.Splice_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.Splice_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new Splice given each field
*/
- public static Splice of(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg) {
- long ret = bindings.Splice_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33));
+ public static Splice of(org.ldk.structs.ChannelId channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg) {
+ long ret = bindings.Splice_new(channel_id_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33));
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(chain_hash_arg);
Reference.reachabilityFence(relative_satoshis_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Splice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Splice(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Splice b) {
- boolean ret = bindings.Splice_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Splice_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID where splicing is intended
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.SpliceAck_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.SpliceAck_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID where splicing is intended
*/
- public void set_channel_id(byte[] val) {
- bindings.SpliceAck_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.SpliceAck_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new SpliceAck given each field
*/
- public static SpliceAck of(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg) {
- long ret = bindings.SpliceAck_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33));
+ public static SpliceAck of(org.ldk.structs.ChannelId channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg) {
+ long ret = bindings.SpliceAck_new(channel_id_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33));
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(chain_hash_arg);
Reference.reachabilityFence(relative_satoshis_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.SpliceAck ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SpliceAck(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.SpliceAck b) {
- boolean ret = bindings.SpliceAck_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.SpliceAck_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.SpliceLocked_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.SpliceLocked_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.SpliceLocked_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.SpliceLocked_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
* Constructs a new SpliceLocked given each field
*/
- public static SpliceLocked of(byte[] channel_id_arg) {
- long ret = bindings.SpliceLocked_new(InternalUtils.check_arr_len(channel_id_arg, 32));
+ public static SpliceLocked of(org.ldk.structs.ChannelId channel_id_arg) {
+ long ret = bindings.SpliceLocked_new(channel_id_arg.ptr);
Reference.reachabilityFence(channel_id_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.SpliceLocked ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SpliceLocked(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.SpliceLocked b) {
- boolean ret = bindings.SpliceLocked_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.SpliceLocked_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* The outpoint which is spendable.
*/
public void set_outpoint(org.ldk.structs.OutPoint val) {
- bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+ bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static StaticPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, @Nullable org.ldk.structs.ChannelTransactionParameters channel_transaction_parameters_arg) {
- long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, output_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr);
+ long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg.ptr, output_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr);
Reference.reachabilityFence(outpoint_arg);
Reference.reachabilityFence(output_arg);
Reference.reachabilityFence(channel_keys_id_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.StaticPaymentOutputDescriptor b) {
- boolean ret = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID where quiescence is intended
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.Stfu_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.Stfu_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID where quiescence is intended
*/
- public void set_channel_id(byte[] val) {
- bindings.Stfu_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.Stfu_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new Stfu given each field
*/
- public static Stfu of(byte[] channel_id_arg, byte initiator_arg) {
- long ret = bindings.Stfu_new(InternalUtils.check_arr_len(channel_id_arg, 32), initiator_arg);
+ public static Stfu of(org.ldk.structs.ChannelId channel_id_arg, byte initiator_arg) {
+ long ret = bindings.Stfu_new(channel_id_arg.ptr, initiator_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(initiator_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.Stfu ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Stfu(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Stfu b) {
- boolean ret = bindings.Stfu_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Stfu_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Creates a new C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ from the contained elements.
*/
public static ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ of(org.ldk.structs.ChannelAnnouncement a, org.ldk.structs.ChannelUpdate b, org.ldk.structs.ChannelUpdate c) {
- long ret = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a == null ? 0 : a.ptr, b == null ? 0 : b.ptr, c == null ? 0 : c.ptr);
+ long ret = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a.ptr, b.ptr, c.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
Reference.reachabilityFence(c);
* Creates a new C3Tuple_OffersMessageDestinationBlindedPathZ from the contained elements.
*/
public static ThreeTuple_OffersMessageDestinationBlindedPathZ of(org.ldk.structs.OffersMessage a, org.ldk.structs.Destination b, org.ldk.structs.BlindedPath c) {
- long ret = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(a.ptr, b.ptr, c == null ? 0 : c.ptr);
+ long ret = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(a.ptr, b.ptr, c.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
Reference.reachabilityFence(c);
* Creates a new C3Tuple_OnionMessageContentsDestinationBlindedPathZ from the contained elements.
*/
public static ThreeTuple_OnionMessageContentsDestinationBlindedPathZ of(org.ldk.structs.OnionMessageContents a, org.ldk.structs.Destination b, org.ldk.structs.BlindedPath c) {
- long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a.ptr, b.ptr, c == null ? 0 : c.ptr);
+ long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a.ptr, b.ptr, c.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
Reference.reachabilityFence(c);
+++ /dev/null
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-import java.lang.ref.Reference;
-import javax.annotation.Nullable;
-
-
-/**
- * A Tuple
- */
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ extends CommonBase {
- ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(Object _dummy, long ptr) { super(ptr); }
- @Override @SuppressWarnings("deprecation")
- protected void finalize() throws Throwable {
- super.finalize();
- if (ptr != 0) { bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(ptr); }
- }
-
- /**
- *
- */
- public OutPoint get_a() {
- long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- *
- */
- public MonitorEvent[] get_b() {
- long[] ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(this.ptr);
- Reference.reachabilityFence(this);
- int ret_conv_14_len = ret.length;
- MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len];
- for (int o = 0; o < ret_conv_14_len; o++) {
- long ret_conv_14 = ret[o];
- org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14);
- if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.add(this); };
- ret_conv_14_arr[o] = ret_conv_14_hu_conv;
- }
- return ret_conv_14_arr;
- }
-
- /**
- *
- */
- public byte[] get_c() {
- byte[] ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- long clone_ptr() {
- long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Creates a new tuple which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
- public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ clone() {
- long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * Creates a new C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ from the contained elements.
- */
- public static ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, MonitorEvent[] b, byte[] c) {
- long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a == null ? 0 : a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_14 -> b_conv_14.ptr).toArray() : null, InternalUtils.check_arr_len(c, 33));
- Reference.reachabilityFence(a);
- Reference.reachabilityFence(b);
- Reference.reachabilityFence(c);
- if (ret >= 0 && ret <= 4096) { return null; }
- ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
- for (MonitorEvent b_conv_14: b) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_conv_14); }; };
- return ret_hu_conv;
- }
-
-}
* Creates a new C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ from the contained elements.
*/
public static ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ of(byte[] a, org.ldk.structs.OnionMessage b, org.ldk.structs.Option_CVec_SocketAddressZZ c) {
- long ret = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(InternalUtils.check_arr_len(a, 33), b == null ? 0 : b.ptr, c.ptr);
+ long ret = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(InternalUtils.check_arr_len(a, 33), b.ptr, c.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
Reference.reachabilityFence(c);
* Creates a new C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ from the contained elements.
*/
public static ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ of(org.ldk.structs.RawBolt11Invoice a, byte[] b, org.ldk.structs.Bolt11InvoiceSignature c) {
- long ret = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(a == null ? 0 : a.ptr, InternalUtils.check_arr_len(b, 32), c == null ? 0 : c.ptr);
+ long ret = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(a.ptr, InternalUtils.check_arr_len(b, 32), c.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
Reference.reachabilityFence(c);
* Creates a new C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ from the contained elements.
*/
public static ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ of(byte[] a, org.ldk.structs.RecipientOnionFields b, org.ldk.structs.RouteParameters c) {
- long ret = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(InternalUtils.check_arr_len(a, 32), b == null ? 0 : b.ptr, c == null ? 0 : c.ptr);
+ long ret = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(InternalUtils.check_arr_len(a, 32), b.ptr, c.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
Reference.reachabilityFence(c);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The state of a spendable output currently tracked by an [`OutputSweeper`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TrackedSpendableOutput extends CommonBase {
+ TrackedSpendableOutput(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.TrackedSpendableOutput_free(ptr); }
+ }
+
+ /**
+ * The tracked output descriptor.
+ */
+ public SpendableOutputDescriptor get_descriptor() {
+ long ret = bindings.TrackedSpendableOutput_get_descriptor(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The tracked output descriptor.
+ */
+ public void set_descriptor(org.ldk.structs.SpendableOutputDescriptor val) {
+ bindings.TrackedSpendableOutput_set_descriptor(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * The channel this output belongs to.
+ *
+ * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`]
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ @Nullable
+ public ChannelId get_channel_id() {
+ long ret = bindings.TrackedSpendableOutput_get_channel_id(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The channel this output belongs to.
+ *
+ * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`]
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void set_channel_id(@Nullable org.ldk.structs.ChannelId val) {
+ bindings.TrackedSpendableOutput_set_channel_id(this.ptr, val == null ? 0 : val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * The current status of the output spend.
+ */
+ public OutputSpendStatus get_status() {
+ long ret = bindings.TrackedSpendableOutput_get_status(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The current status of the output spend.
+ */
+ public void set_status(org.ldk.structs.OutputSpendStatus val) {
+ bindings.TrackedSpendableOutput_set_status(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
+ /**
+ * Constructs a new TrackedSpendableOutput given each field
+ *
+ * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public static TrackedSpendableOutput of(org.ldk.structs.SpendableOutputDescriptor descriptor_arg, @Nullable org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.OutputSpendStatus status_arg) {
+ long ret = bindings.TrackedSpendableOutput_new(descriptor_arg.ptr, channel_id_arg == null ? 0 : channel_id_arg.ptr, status_arg.ptr);
+ Reference.reachabilityFence(descriptor_arg);
+ Reference.reachabilityFence(channel_id_arg);
+ Reference.reachabilityFence(status_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.TrackedSpendableOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(descriptor_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(status_arg); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.TrackedSpendableOutput_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the TrackedSpendableOutput
+ */
+ public TrackedSpendableOutput clone() {
+ long ret = bindings.TrackedSpendableOutput_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.TrackedSpendableOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two TrackedSpendableOutputs contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.TrackedSpendableOutput b) {
+ boolean ret = bindings.TrackedSpendableOutput_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof TrackedSpendableOutput)) return false;
+ return this.eq((TrackedSpendableOutput)o);
+ }
+ /**
+ * Returns whether the output is spent in the given transaction.
+ */
+ public boolean is_spent_in(byte[] tx) {
+ boolean ret = bindings.TrackedSpendableOutput_is_spent_in(this.ptr, tx);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(tx);
+ return ret;
+ }
+
+ /**
+ * Serialize the TrackedSpendableOutput object into a byte array which can be read by TrackedSpendableOutput_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.TrackedSpendableOutput_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a TrackedSpendableOutput from a byte array, created by TrackedSpendableOutput_write
+ */
+ public static Result_TrackedSpendableOutputDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.TrackedSpendableOutput_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * BOLT 4 onion packet including hop data for the next peer.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TrampolineOnionPacket extends CommonBase {
+ TrampolineOnionPacket(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.TrampolineOnionPacket_free(ptr); }
+ }
+
+ /**
+ * Bolt 04 version number
+ */
+ public byte get_version() {
+ byte ret = bindings.TrampolineOnionPacket_get_version(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Bolt 04 version number
+ */
+ public void set_version(byte val) {
+ bindings.TrampolineOnionPacket_set_version(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data
+ */
+ public byte[] get_public_key() {
+ byte[] ret = bindings.TrampolineOnionPacket_get_public_key(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data
+ */
+ public void set_public_key(byte[] val) {
+ bindings.TrampolineOnionPacket_set_public_key(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Encrypted payload for the next hop
+ *
+ * Returns a copy of the field.
+ */
+ public byte[] get_hop_data() {
+ byte[] ret = bindings.TrampolineOnionPacket_get_hop_data(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Encrypted payload for the next hop
+ */
+ public void set_hop_data(byte[] val) {
+ bindings.TrampolineOnionPacket_set_hop_data(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * HMAC to verify the integrity of hop_data
+ */
+ public byte[] get_hmac() {
+ byte[] ret = bindings.TrampolineOnionPacket_get_hmac(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * HMAC to verify the integrity of hop_data
+ */
+ public void set_hmac(byte[] val) {
+ bindings.TrampolineOnionPacket_set_hmac(this.ptr, InternalUtils.check_arr_len(val, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Constructs a new TrampolineOnionPacket given each field
+ */
+ public static TrampolineOnionPacket of(byte version_arg, byte[] public_key_arg, byte[] hop_data_arg, byte[] hmac_arg) {
+ long ret = bindings.TrampolineOnionPacket_new(version_arg, InternalUtils.check_arr_len(public_key_arg, 33), hop_data_arg, InternalUtils.check_arr_len(hmac_arg, 32));
+ Reference.reachabilityFence(version_arg);
+ Reference.reachabilityFence(public_key_arg);
+ Reference.reachabilityFence(hop_data_arg);
+ Reference.reachabilityFence(hmac_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.TrampolineOnionPacket ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrampolineOnionPacket(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.TrampolineOnionPacket_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the TrampolineOnionPacket
+ */
+ public TrampolineOnionPacket clone() {
+ long ret = bindings.TrampolineOnionPacket_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.TrampolineOnionPacket ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrampolineOnionPacket(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the TrampolineOnionPacket.
+ */
+ public long hash() {
+ long ret = bindings.TrampolineOnionPacket_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two TrampolineOnionPackets contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.TrampolineOnionPacket b) {
+ boolean ret = bindings.TrampolineOnionPacket_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof TrampolineOnionPacket)) return false;
+ return this.eq((TrampolineOnionPacket)o);
+ }
+ /**
+ * Serialize the TrampolineOnionPacket object into a byte array which can be read by TrampolineOnionPacket_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.TrampolineOnionPacket_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TransactionU16LenLimited b) {
- boolean ret = bindings.TransactionU16LenLimited_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TransactionU16LenLimited_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
return ret;
}
+ /**
+ * Returns a reference to the contained `Transaction`
+ */
+ public byte[] as_transaction() {
+ byte[] ret = bindings.TransactionU16LenLimited_as_transaction(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Serialize the TransactionU16LenLimited object into a byte array which can be read by TransactionU16LenLimited_read
*/
* This function is only valid in the holder commitment context, it always uses EcdsaSighashType::All.
*/
public Result_CVec_ECDSASignatureZNoneZ get_htlc_sigs(byte[] htlc_base_key, org.ldk.structs.DirectedChannelTransactionParameters channel_parameters, org.ldk.structs.EntropySource entropy_source) {
- long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.check_arr_len(htlc_base_key, 32), channel_parameters == null ? 0 : channel_parameters.ptr, entropy_source.ptr);
+ long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.check_arr_len(htlc_base_key, 32), channel_parameters.ptr, entropy_source.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(htlc_base_key);
Reference.reachabilityFence(channel_parameters);
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_BestBlockOutputSweeperZ extends CommonBase {
+ TwoTuple_BestBlockOutputSweeperZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_BestBlockOutputSweeperZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public BestBlock get_a() {
+ long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_a(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public OutputSweeper get_b() {
+ long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_b(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OutputSweeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutputSweeper(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_BestBlockOutputSweeperZ from the contained elements.
+ */
+ public static TwoTuple_BestBlockOutputSweeperZ of(org.ldk.structs.BestBlock a, BestBlock b_best_block, BroadcasterInterface b_broadcaster, FeeEstimator b_fee_estimator, Option_FilterZ b_chain_data_source, OutputSpender b_output_spender, ChangeDestinationSource b_change_destination_source, KVStore b_kv_store, Logger b_logger) {
+ long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_new(a.ptr, bindings.OutputSweeper_new(b_best_block.ptr, b_broadcaster.ptr, b_fee_estimator.ptr, b_chain_data_source.ptr, b_output_spender.ptr, b_change_destination_source.ptr, b_kv_store.ptr, b_logger.ptr));
+ Reference.reachabilityFence(a);
+ Reference.reachabilityFence(b_best_block);
+ Reference.reachabilityFence(b_broadcaster);
+ Reference.reachabilityFence(b_fee_estimator);
+ Reference.reachabilityFence(b_chain_data_source);
+ Reference.reachabilityFence(b_output_spender);
+ Reference.reachabilityFence(b_change_destination_source);
+ Reference.reachabilityFence(b_kv_store);
+ Reference.reachabilityFence(b_logger);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_BestBlockOutputSweeperZ ret_hu_conv = new TwoTuple_BestBlockOutputSweeperZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_best_block); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_broadcaster); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_fee_estimator); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_chain_data_source); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_output_spender); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_change_destination_source); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_kv_store); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_logger); };
+ return ret_hu_conv;
+ }
+
+}
* Creates a new C2Tuple_BlindedPayInfoBlindedPathZ from the contained elements.
*/
public static TwoTuple_BlindedPayInfoBlindedPathZ of(org.ldk.structs.BlindedPayInfo a, org.ldk.structs.BlindedPath b) {
- long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a == null ? 0 : a.ptr, b == null ? 0 : b.ptr);
+ long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a.ptr, b.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
if (ret >= 0 && ret <= 4096) { return null; }
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_ChannelIdPublicKeyZ extends CommonBase {
+ TwoTuple_ChannelIdPublicKeyZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_ChannelIdPublicKeyZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public ChannelId get_a() {
+ long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_get_a(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public byte[] get_b() {
+ byte[] ret = bindings.C2Tuple_ChannelIdPublicKeyZ_get_b(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_ChannelIdPublicKeyZ clone() {
+ long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_ChannelIdPublicKeyZ ret_hu_conv = new TwoTuple_ChannelIdPublicKeyZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_ChannelIdPublicKeyZ from the contained elements.
+ */
+ public static TwoTuple_ChannelIdPublicKeyZ of(org.ldk.structs.ChannelId a, byte[] b) {
+ long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_new(a.ptr, InternalUtils.check_arr_len(b, 33));
+ Reference.reachabilityFence(a);
+ Reference.reachabilityFence(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_ChannelIdPublicKeyZ ret_hu_conv = new TwoTuple_ChannelIdPublicKeyZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+ return ret_hu_conv;
+ }
+
+}
* Creates a new C2Tuple_OutPointCVec_MonitorUpdateIdZZ from the contained elements.
*/
public static TwoTuple_OutPointCVec_MonitorUpdateIdZZ of(org.ldk.structs.OutPoint a, MonitorUpdateId[] b) {
- long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a == null ? 0 : a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_17 -> b_conv_17 == null ? 0 : b_conv_17.ptr).toArray() : null);
+ long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_17 -> b_conv_17.ptr).toArray() : null);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
if (ret >= 0 && ret <= 4096) { return null; }
* Creates a new C2Tuple_OutPointCVec_u8ZZ from the contained elements.
*/
public static TwoTuple_OutPointCVec_u8ZZ of(org.ldk.structs.OutPoint a, byte[] b) {
- long ret = bindings.C2Tuple_OutPointCVec_u8ZZ_new(a == null ? 0 : a.ptr, b);
+ long ret = bindings.C2Tuple_OutPointCVec_u8ZZ_new(a.ptr, b);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
if (ret >= 0 && ret <= 4096) { return null; }
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_OutPointChannelIdZ extends CommonBase {
+ TwoTuple_OutPointChannelIdZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.C2Tuple_OutPointChannelIdZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public OutPoint get_a() {
+ long ret = bindings.C2Tuple_OutPointChannelIdZ_get_a(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public ChannelId get_b() {
+ long ret = bindings.C2Tuple_OutPointChannelIdZ_get_b(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.C2Tuple_OutPointChannelIdZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public TwoTuple_OutPointChannelIdZ clone() {
+ long ret = bindings.C2Tuple_OutPointChannelIdZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_OutPointChannelIdZ from the contained elements.
+ */
+ public static TwoTuple_OutPointChannelIdZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b) {
+ long ret = bindings.C2Tuple_OutPointChannelIdZ_new(a.ptr, b.ptr);
+ Reference.reachabilityFence(a);
+ Reference.reachabilityFence(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
+ return ret_hu_conv;
+ }
+
+}
+++ /dev/null
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-import java.lang.ref.Reference;
-import javax.annotation.Nullable;
-
-
-/**
- * A Tuple
- */
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class TwoTuple_PublicKeyCOption_SocketAddressZZ extends CommonBase {
- TwoTuple_PublicKeyCOption_SocketAddressZZ(Object _dummy, long ptr) { super(ptr); }
- @Override @SuppressWarnings("deprecation")
- protected void finalize() throws Throwable {
- super.finalize();
- if (ptr != 0) { bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_free(ptr); }
- }
-
- /**
- *
- */
- public byte[] get_a() {
- byte[] ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- *
- */
- public Option_SocketAddressZ get_b() {
- long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Option_SocketAddressZ ret_hu_conv = org.ldk.structs.Option_SocketAddressZ.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- long clone_ptr() {
- long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Creates a new tuple which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
- public TwoTuple_PublicKeyCOption_SocketAddressZZ clone() {
- long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- TwoTuple_PublicKeyCOption_SocketAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * Creates a new C2Tuple_PublicKeyCOption_SocketAddressZZ from the contained elements.
- */
- public static TwoTuple_PublicKeyCOption_SocketAddressZZ of(byte[] a, org.ldk.structs.Option_SocketAddressZ b) {
- long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_new(InternalUtils.check_arr_len(a, 33), b.ptr);
- Reference.reachabilityFence(a);
- Reference.reachabilityFence(b);
- if (ret >= 0 && ret <= 4096) { return null; }
- TwoTuple_PublicKeyCOption_SocketAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
- return ret_hu_conv;
- }
-
-}
* Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ from the contained elements.
*/
public static TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ of(byte[] a, TwoTuple_u32CVec_u8ZZ[] b) {
- long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_23 -> b_conv_23 != null ? b_conv_23.ptr : 0).toArray() : null);
+ long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_23 -> b_conv_23.ptr).toArray() : null);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
if (ret >= 0 && ret <= 4096) { return null; }
* Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ from the contained elements.
*/
public static TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ of(byte[] a, TwoTuple_u32TxOutZ[] b) {
- long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_20 -> b_conv_20 != null ? b_conv_20.ptr : 0).toArray() : null);
+ long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_20 -> b_conv_20.ptr).toArray() : null);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
if (ret >= 0 && ret <= 4096) { return null; }
* Creates a new C2Tuple_ThirtyTwoBytesChannelManagerZ from the contained elements.
*/
public static TwoTuple_ThirtyTwoBytesChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Router b_router, Logger b_logger, EntropySource b_entropy_source, NodeSigner b_node_signer, SignerProvider b_signer_provider, UserConfig b_config, ChainParameters b_params, int b_current_timestamp) {
- long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(InternalUtils.check_arr_len(a, 32), bindings.ChannelManager_new(b_fee_est.ptr, b_chain_monitor.ptr, b_tx_broadcaster.ptr, b_router.ptr, b_logger.ptr, b_entropy_source.ptr, b_node_signer.ptr, b_signer_provider.ptr, b_config == null ? 0 : b_config.ptr, b_params == null ? 0 : b_params.ptr, b_current_timestamp));
+ long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(InternalUtils.check_arr_len(a, 32), bindings.ChannelManager_new(b_fee_est.ptr, b_chain_monitor.ptr, b_tx_broadcaster.ptr, b_router.ptr, b_logger.ptr, b_entropy_source.ptr, b_node_signer.ptr, b_signer_provider.ptr, b_config.ptr, b_params.ptr, b_current_timestamp));
Reference.reachabilityFence(a);
Reference.reachabilityFence(b_fee_est);
Reference.reachabilityFence(b_chain_monitor);
* Creates a new C2Tuple_ThirtyTwoBytesChannelMonitorZ from the contained elements.
*/
public static TwoTuple_ThirtyTwoBytesChannelMonitorZ of(byte[] a, org.ldk.structs.ChannelMonitor b) {
- long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(InternalUtils.check_arr_len(a, 32), b == null ? 0 : b.ptr);
+ long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(InternalUtils.check_arr_len(a, 32), b.ptr);
Reference.reachabilityFence(a);
Reference.reachabilityFence(b);
if (ret >= 0 && ret <= 4096) { return null; }
+++ /dev/null
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-import java.lang.ref.Reference;
-import javax.annotation.Nullable;
-
-
-/**
- * A Tuple
- */
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class TwoTuple_ThirtyTwoBytesPublicKeyZ extends CommonBase {
- TwoTuple_ThirtyTwoBytesPublicKeyZ(Object _dummy, long ptr) { super(ptr); }
- @Override @SuppressWarnings("deprecation")
- protected void finalize() throws Throwable {
- super.finalize();
- if (ptr != 0) { bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_free(ptr); }
- }
-
- /**
- *
- */
- public byte[] get_a() {
- byte[] ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- *
- */
- public byte[] get_b() {
- byte[] ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- long clone_ptr() {
- long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(this.ptr);
- Reference.reachabilityFence(this);
- return ret;
- }
-
- /**
- * Creates a new tuple which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
- public TwoTuple_ThirtyTwoBytesPublicKeyZ clone() {
- long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(this.ptr);
- Reference.reachabilityFence(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
- return ret_hu_conv;
- }
-
- /**
- * Creates a new C2Tuple_ThirtyTwoBytesPublicKeyZ from the contained elements.
- */
- public static TwoTuple_ThirtyTwoBytesPublicKeyZ of(byte[] a, byte[] b) {
- long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_new(InternalUtils.check_arr_len(a, 32), InternalUtils.check_arr_len(b, 33));
- Reference.reachabilityFence(a);
- Reference.reachabilityFence(b);
- if (ret >= 0 && ret <= 4096) { return null; }
- TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
- return ret_hu_conv;
- }
-
-}
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.TxAbort_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.TxAbort_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.TxAbort_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.TxAbort_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new TxAbort given each field
*/
- public static TxAbort of(byte[] channel_id_arg, byte[] data_arg) {
- long ret = bindings.TxAbort_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg);
+ public static TxAbort of(org.ldk.structs.ChannelId channel_id_arg, byte[] data_arg) {
+ long ret = bindings.TxAbort_new(channel_id_arg.ptr, data_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(data_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.TxAbort ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAbort(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxAbort b) {
- boolean ret = bindings.TxAbort_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxAbort_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.TxAckRbf_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.TxAckRbf_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.TxAckRbf_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.TxAckRbf_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new TxAckRbf given each field
*/
- public static TxAckRbf of(byte[] channel_id_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
- long ret = bindings.TxAckRbf_new(InternalUtils.check_arr_len(channel_id_arg, 32), funding_output_contribution_arg.ptr);
+ public static TxAckRbf of(org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
+ long ret = bindings.TxAckRbf_new(channel_id_arg.ptr, funding_output_contribution_arg.ptr);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(funding_output_contribution_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.TxAckRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAckRbf(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_output_contribution_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxAckRbf b) {
- boolean ret = bindings.TxAckRbf_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxAckRbf_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.TxAddInput_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.TxAddInput_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.TxAddInput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.TxAddInput_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
* malleable.
*/
public void set_prevtx(org.ldk.structs.TransactionU16LenLimited val) {
- bindings.TxAddInput_set_prevtx(this.ptr, val == null ? 0 : val.ptr);
+ bindings.TxAddInput_set_prevtx(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
/**
* Constructs a new TxAddInput given each field
*/
- public static TxAddInput of(byte[] channel_id_arg, long serial_id_arg, org.ldk.structs.TransactionU16LenLimited prevtx_arg, int prevtx_out_arg, int sequence_arg) {
- long ret = bindings.TxAddInput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg, prevtx_arg == null ? 0 : prevtx_arg.ptr, prevtx_out_arg, sequence_arg);
+ public static TxAddInput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg, org.ldk.structs.TransactionU16LenLimited prevtx_arg, int prevtx_out_arg, int sequence_arg) {
+ long ret = bindings.TxAddInput_new(channel_id_arg.ptr, serial_id_arg, prevtx_arg.ptr, prevtx_out_arg, sequence_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(serial_id_arg);
Reference.reachabilityFence(prevtx_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.TxAddInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAddInput(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prevtx_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxAddInput b) {
- boolean ret = bindings.TxAddInput_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxAddInput_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.TxAddOutput_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.TxAddOutput_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.TxAddOutput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.TxAddOutput_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new TxAddOutput given each field
*/
- public static TxAddOutput of(byte[] channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg) {
- long ret = bindings.TxAddOutput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg, sats_arg, script_arg);
+ public static TxAddOutput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg) {
+ long ret = bindings.TxAddOutput_new(channel_id_arg.ptr, serial_id_arg, sats_arg, script_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(serial_id_arg);
Reference.reachabilityFence(sats_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.TxAddOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAddOutput(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxAddOutput b) {
- boolean ret = bindings.TxAddOutput_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxAddOutput_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.TxComplete_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.TxComplete_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.TxComplete_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.TxComplete_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
* Constructs a new TxComplete given each field
*/
- public static TxComplete of(byte[] channel_id_arg) {
- long ret = bindings.TxComplete_new(InternalUtils.check_arr_len(channel_id_arg, 32));
+ public static TxComplete of(org.ldk.structs.ChannelId channel_id_arg) {
+ long ret = bindings.TxComplete_new(channel_id_arg.ptr);
Reference.reachabilityFence(channel_id_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.TxComplete ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxComplete(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxComplete b) {
- boolean ret = bindings.TxComplete_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxComplete_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* an old state.
*/
public void set_revocation_key(org.ldk.structs.RevocationKey val) {
- bindings.TxCreationKeys_set_revocation_key(this.ptr, val == null ? 0 : val.ptr);
+ bindings.TxCreationKeys_set_revocation_key(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Broadcaster's HTLC Key
*/
public void set_broadcaster_htlc_key(org.ldk.structs.HtlcKey val) {
- bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val == null ? 0 : val.ptr);
+ bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Countersignatory's HTLC Key
*/
public void set_countersignatory_htlc_key(org.ldk.structs.HtlcKey val) {
- bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val == null ? 0 : val.ptr);
+ bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Broadcaster's Payment Key (which isn't allowed to be spent from for some delay)
*/
public void set_broadcaster_delayed_payment_key(org.ldk.structs.DelayedPaymentKey val) {
- bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val == null ? 0 : val.ptr);
+ bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new TxCreationKeys given each field
*/
public static TxCreationKeys of(byte[] per_commitment_point_arg, org.ldk.structs.RevocationKey revocation_key_arg, org.ldk.structs.HtlcKey broadcaster_htlc_key_arg, org.ldk.structs.HtlcKey countersignatory_htlc_key_arg, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key_arg) {
- long ret = bindings.TxCreationKeys_new(InternalUtils.check_arr_len(per_commitment_point_arg, 33), revocation_key_arg == null ? 0 : revocation_key_arg.ptr, broadcaster_htlc_key_arg == null ? 0 : broadcaster_htlc_key_arg.ptr, countersignatory_htlc_key_arg == null ? 0 : countersignatory_htlc_key_arg.ptr, broadcaster_delayed_payment_key_arg == null ? 0 : broadcaster_delayed_payment_key_arg.ptr);
+ long ret = bindings.TxCreationKeys_new(InternalUtils.check_arr_len(per_commitment_point_arg, 33), revocation_key_arg.ptr, broadcaster_htlc_key_arg.ptr, countersignatory_htlc_key_arg.ptr, broadcaster_delayed_payment_key_arg.ptr);
Reference.reachabilityFence(per_commitment_point_arg);
Reference.reachabilityFence(revocation_key_arg);
Reference.reachabilityFence(broadcaster_htlc_key_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxCreationKeys b) {
- boolean ret = bindings.TxCreationKeys_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxCreationKeys_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
*/
public static TxCreationKeys derive_new(byte[] per_commitment_point, org.ldk.structs.DelayedPaymentBasepoint broadcaster_delayed_payment_base, org.ldk.structs.HtlcBasepoint broadcaster_htlc_base, org.ldk.structs.RevocationBasepoint countersignatory_revocation_base, org.ldk.structs.HtlcBasepoint countersignatory_htlc_base) {
- long ret = bindings.TxCreationKeys_derive_new(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_delayed_payment_base == null ? 0 : broadcaster_delayed_payment_base.ptr, broadcaster_htlc_base == null ? 0 : broadcaster_htlc_base.ptr, countersignatory_revocation_base == null ? 0 : countersignatory_revocation_base.ptr, countersignatory_htlc_base == null ? 0 : countersignatory_htlc_base.ptr);
+ long ret = bindings.TxCreationKeys_derive_new(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_delayed_payment_base.ptr, broadcaster_htlc_base.ptr, countersignatory_revocation_base.ptr, countersignatory_htlc_base.ptr);
Reference.reachabilityFence(per_commitment_point);
Reference.reachabilityFence(broadcaster_delayed_payment_base);
Reference.reachabilityFence(broadcaster_htlc_base);
* Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
*/
public static TxCreationKeys from_channel_static_keys(byte[] per_commitment_point, org.ldk.structs.ChannelPublicKeys broadcaster_keys, org.ldk.structs.ChannelPublicKeys countersignatory_keys) {
- long ret = bindings.TxCreationKeys_from_channel_static_keys(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_keys == null ? 0 : broadcaster_keys.ptr, countersignatory_keys == null ? 0 : countersignatory_keys.ptr);
+ long ret = bindings.TxCreationKeys_from_channel_static_keys(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_keys.ptr, countersignatory_keys.ptr);
Reference.reachabilityFence(per_commitment_point);
Reference.reachabilityFence(broadcaster_keys);
Reference.reachabilityFence(countersignatory_keys);
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.TxInitRbf_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.TxInitRbf_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.TxInitRbf_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.TxInitRbf_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new TxInitRbf given each field
*/
- public static TxInitRbf of(byte[] channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
- long ret = bindings.TxInitRbf_new(InternalUtils.check_arr_len(channel_id_arg, 32), locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr);
+ public static TxInitRbf of(org.ldk.structs.ChannelId channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
+ long ret = bindings.TxInitRbf_new(channel_id_arg.ptr, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(locktime_arg);
Reference.reachabilityFence(feerate_sat_per_1000_weight_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.TxInitRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxInitRbf(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_output_contribution_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxInitRbf b) {
- boolean ret = bindings.TxInitRbf_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxInitRbf_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.TxRemoveInput_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.TxRemoveInput_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.TxRemoveInput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.TxRemoveInput_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new TxRemoveInput given each field
*/
- public static TxRemoveInput of(byte[] channel_id_arg, long serial_id_arg) {
- long ret = bindings.TxRemoveInput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg);
+ public static TxRemoveInput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg) {
+ long ret = bindings.TxRemoveInput_new(channel_id_arg.ptr, serial_id_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(serial_id_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.TxRemoveInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveInput(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxRemoveInput b) {
- boolean ret = bindings.TxRemoveInput_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxRemoveInput_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.TxRemoveOutput_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.TxRemoveOutput_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.TxRemoveOutput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.TxRemoveOutput_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new TxRemoveOutput given each field
*/
- public static TxRemoveOutput of(byte[] channel_id_arg, long serial_id_arg) {
- long ret = bindings.TxRemoveOutput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg);
+ public static TxRemoveOutput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg) {
+ long ret = bindings.TxRemoveOutput_new(channel_id_arg.ptr, serial_id_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(serial_id_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.TxRemoveOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveOutput(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxRemoveOutput b) {
- boolean ret = bindings.TxRemoveOutput_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxRemoveOutput_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.TxSignatures_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.TxSignatures_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.TxSignatures_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.TxSignatures_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
Reference.reachabilityFence(val);
}
+ /**
+ * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers
+ */
+ public Option_ECDSASignatureZ get_funding_outpoint_sig() {
+ long ret = bindings.TxSignatures_get_funding_outpoint_sig(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers
+ */
+ public void set_funding_outpoint_sig(org.ldk.structs.Option_ECDSASignatureZ val) {
+ bindings.TxSignatures_set_funding_outpoint_sig(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
/**
* Constructs a new TxSignatures given each field
*/
- public static TxSignatures of(byte[] channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg) {
- long ret = bindings.TxSignatures_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(tx_hash_arg, 32), witnesses_arg);
+ public static TxSignatures of(org.ldk.structs.ChannelId channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg, org.ldk.structs.Option_ECDSASignatureZ funding_outpoint_sig_arg) {
+ long ret = bindings.TxSignatures_new(channel_id_arg.ptr, InternalUtils.check_arr_len(tx_hash_arg, 32), witnesses_arg, funding_outpoint_sig_arg.ptr);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(tx_hash_arg);
Reference.reachabilityFence(witnesses_arg);
+ Reference.reachabilityFence(funding_outpoint_sig_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.TxSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxSignatures(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_outpoint_sig_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.TxSignatures b) {
- boolean ret = bindings.TxSignatures_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.TxSignatures_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
--- /dev/null
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An unknown payment context.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class UnknownPaymentContext extends CommonBase {
+ UnknownPaymentContext(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.UnknownPaymentContext_free(ptr); }
+ }
+
+ long clone_ptr() {
+ long ret = bindings.UnknownPaymentContext_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the UnknownPaymentContext
+ */
+ public UnknownPaymentContext clone() {
+ long ret = bindings.UnknownPaymentContext_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.UnknownPaymentContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two UnknownPaymentContexts contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+ public boolean eq(org.ldk.structs.UnknownPaymentContext b) {
+ boolean ret = bindings.UnknownPaymentContext_eq(this.ptr, b.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(b);
+ if (this != null) { this.ptrs_to.add(b); };
+ return ret;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (!(o instanceof UnknownPaymentContext)) return false;
+ return this.eq((UnknownPaymentContext)o);
+ }
+ /**
+ * Serialize the UnknownPaymentContext object into a byte array which can be read by UnknownPaymentContext_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.UnknownPaymentContext_write(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Read a UnknownPaymentContext from a byte array, created by UnknownPaymentContext_write
+ */
+ public static Result_UnknownPaymentContextDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.UnknownPaymentContext_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
if (ptr != 0) { bindings.UnsignedBolt12Invoice_free(ptr); }
}
+ long clone_ptr() {
+ long ret = bindings.UnsignedBolt12Invoice_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the UnsignedBolt12Invoice
+ */
+ public UnsignedBolt12Invoice clone() {
+ long ret = bindings.UnsignedBolt12Invoice_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.UnsignedBolt12Invoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
/**
* Returns the [`TaggedHash`] of the invoice to sign.
*/
*
* [`Offer`]: crate::offers::offer::Offer
* [`Offer::amount`]: crate::offers::offer::Offer::amount
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- @Nullable
- public Amount amount() {
+ public Option_AmountZ amount() {
long ret = bindings.UnsignedBolt12Invoice_amount(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+ org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
* From [`Offer::description`] or [`Refund::description`].
*
* [`Offer::description`]: crate::offers::offer::Offer::description
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public PrintableString description() {
long ret = bindings.UnsignedBolt12Invoice_description(this.ptr);
Reference.reachabilityFence(this);
* [`Refund`].
*
* [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- @Nullable
- public Quantity supported_quantity() {
+ public Option_QuantityZ supported_quantity() {
long ret = bindings.UnsignedBolt12Invoice_supported_quantity(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+ org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
* The advertised channel features
*/
public void set_features(org.ldk.structs.ChannelFeatures val) {
- bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* One of the two `node_id`s which are endpoints of this channel
*/
public void set_node_id_1(org.ldk.structs.NodeId val) {
- bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* The other of the two `node_id`s which are endpoints of this channel
*/
public void set_node_id_2(org.ldk.structs.NodeId val) {
- bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* The funding key for the first node
*/
public void set_bitcoin_key_1(org.ldk.structs.NodeId val) {
- bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* The funding key for the second node
*/
public void set_bitcoin_key_2(org.ldk.structs.NodeId val) {
- bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new UnsignedChannelAnnouncement given each field
*/
public static UnsignedChannelAnnouncement of(org.ldk.structs.ChannelFeatures features_arg, byte[] chain_hash_arg, long short_channel_id_arg, org.ldk.structs.NodeId node_id_1_arg, org.ldk.structs.NodeId node_id_2_arg, org.ldk.structs.NodeId bitcoin_key_1_arg, org.ldk.structs.NodeId bitcoin_key_2_arg, byte[] excess_data_arg) {
- long ret = bindings.UnsignedChannelAnnouncement_new(features_arg == null ? 0 : features_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), short_channel_id_arg, node_id_1_arg == null ? 0 : node_id_1_arg.ptr, node_id_2_arg == null ? 0 : node_id_2_arg.ptr, bitcoin_key_1_arg == null ? 0 : bitcoin_key_1_arg.ptr, bitcoin_key_2_arg == null ? 0 : bitcoin_key_2_arg.ptr, excess_data_arg);
+ long ret = bindings.UnsignedChannelAnnouncement_new(features_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), short_channel_id_arg, node_id_1_arg.ptr, node_id_2_arg.ptr, bitcoin_key_1_arg.ptr, bitcoin_key_2_arg.ptr, excess_data_arg);
Reference.reachabilityFence(features_arg);
Reference.reachabilityFence(chain_hash_arg);
Reference.reachabilityFence(short_channel_id_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.UnsignedChannelAnnouncement b) {
- boolean ret = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.UnsignedChannelUpdate b) {
- boolean ret = bindings.UnsignedChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.UnsignedChannelUpdate_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Utility method to constructs a new ChannelAnnouncement-variant UnsignedGossipMessage
*/
public static UnsignedGossipMessage channel_announcement(org.ldk.structs.UnsignedChannelAnnouncement a) {
- long ret = bindings.UnsignedGossipMessage_channel_announcement(a == null ? 0 : a.ptr);
+ long ret = bindings.UnsignedGossipMessage_channel_announcement(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret);
* Utility method to constructs a new ChannelUpdate-variant UnsignedGossipMessage
*/
public static UnsignedGossipMessage channel_update(org.ldk.structs.UnsignedChannelUpdate a) {
- long ret = bindings.UnsignedGossipMessage_channel_update(a == null ? 0 : a.ptr);
+ long ret = bindings.UnsignedGossipMessage_channel_update(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret);
* Utility method to constructs a new NodeAnnouncement-variant UnsignedGossipMessage
*/
public static UnsignedGossipMessage node_announcement(org.ldk.structs.UnsignedNodeAnnouncement a) {
- long ret = bindings.UnsignedGossipMessage_node_announcement(a == null ? 0 : a.ptr);
+ long ret = bindings.UnsignedGossipMessage_node_announcement(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret);
if (ptr != 0) { bindings.UnsignedInvoiceRequest_free(ptr); }
}
+ long clone_ptr() {
+ long ret = bindings.UnsignedInvoiceRequest_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the UnsignedInvoiceRequest
+ */
+ public UnsignedInvoiceRequest clone() {
+ long ret = bindings.UnsignedInvoiceRequest_clone(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.UnsignedInvoiceRequest ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
/**
* Returns the [`TaggedHash`] of the invoice to sign.
*/
/**
* The minimum amount required for a successful payment of a single item.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- @Nullable
- public Amount amount() {
+ public Option_AmountZ amount() {
long ret = bindings.UnsignedInvoiceRequest_amount(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+ org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
* A complete description of the purpose of the payment. Intended to be displayed to the user
* but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public PrintableString description() {
long ret = bindings.UnsignedInvoiceRequest_description(this.ptr);
Reference.reachabilityFence(this);
long ret = bindings.UnsignedInvoiceRequest_supported_quantity(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+ org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
* The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public byte[] signing_pubkey() {
byte[] ret = bindings.UnsignedInvoiceRequest_signing_pubkey(this.ptr);
Reference.reachabilityFence(this);
* The advertised features
*/
public void set_features(org.ldk.structs.NodeFeatures val) {
- bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* to this node).
*/
public void set_node_id(org.ldk.structs.NodeId val) {
- bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* This should be sanitized before use. There is no guarantee of uniqueness.
*/
public void set_alias(org.ldk.structs.NodeAlias val) {
- bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
for (SocketAddress val_conv_15: val) { if (this != null) { this.ptrs_to.add(val_conv_15); }; };
}
+ /**
+ * Excess address data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol.
+ *
+ * Returns a copy of the field.
+ */
+ public byte[] get_excess_address_data() {
+ byte[] ret = bindings.UnsignedNodeAnnouncement_get_excess_address_data(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Excess address data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol.
+ */
+ public void set_excess_address_data(byte[] val) {
+ bindings.UnsignedNodeAnnouncement_set_excess_address_data(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Excess data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol.
+ *
+ * Returns a copy of the field.
+ */
+ public byte[] get_excess_data() {
+ byte[] ret = bindings.UnsignedNodeAnnouncement_get_excess_data(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Excess data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol.
+ */
+ public void set_excess_data(byte[] val) {
+ bindings.UnsignedNodeAnnouncement_set_excess_data(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ /**
+ * Constructs a new UnsignedNodeAnnouncement given each field
+ */
+ public static UnsignedNodeAnnouncement of(org.ldk.structs.NodeFeatures features_arg, int timestamp_arg, org.ldk.structs.NodeId node_id_arg, byte[] rgb_arg, org.ldk.structs.NodeAlias alias_arg, SocketAddress[] addresses_arg, byte[] excess_address_data_arg, byte[] excess_data_arg) {
+ long ret = bindings.UnsignedNodeAnnouncement_new(features_arg.ptr, timestamp_arg, node_id_arg.ptr, InternalUtils.check_arr_len(rgb_arg, 3), alias_arg.ptr, addresses_arg != null ? Arrays.stream(addresses_arg).mapToLong(addresses_arg_conv_15 -> addresses_arg_conv_15.ptr).toArray() : null, excess_address_data_arg, excess_data_arg);
+ Reference.reachabilityFence(features_arg);
+ Reference.reachabilityFence(timestamp_arg);
+ Reference.reachabilityFence(node_id_arg);
+ Reference.reachabilityFence(rgb_arg);
+ Reference.reachabilityFence(alias_arg);
+ Reference.reachabilityFence(addresses_arg);
+ Reference.reachabilityFence(excess_address_data_arg);
+ Reference.reachabilityFence(excess_data_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.UnsignedNodeAnnouncement ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedNodeAnnouncement(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(features_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_arg); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(alias_arg); };
+ for (SocketAddress addresses_arg_conv_15: addresses_arg) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(addresses_arg_conv_15); }; };
+ return ret_hu_conv;
+ }
+
long clone_ptr() {
long ret = bindings.UnsignedNodeAnnouncement_clone_ptr(this.ptr);
Reference.reachabilityFence(this);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.UnsignedNodeAnnouncement b) {
- boolean ret = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.UntrustedString b) {
- boolean ret = bindings.UntrustedString_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.UntrustedString_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.UpdateAddHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.UpdateAddHTLC_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
* The onion routing packet with encrypted data for the next hop.
*/
public void set_onion_routing_packet(org.ldk.structs.OnionPacket val) {
- bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
*
* Note that blinding_point_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static UpdateAddHTLC of(byte[] channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, org.ldk.structs.Option_u64Z skimmed_fee_msat_arg, org.ldk.structs.OnionPacket onion_routing_packet_arg, @Nullable byte[] blinding_point_arg) {
- long ret = bindings.UpdateAddHTLC_new(InternalUtils.check_arr_len(channel_id_arg, 32), htlc_id_arg, amount_msat_arg, InternalUtils.check_arr_len(payment_hash_arg, 32), cltv_expiry_arg, skimmed_fee_msat_arg.ptr, onion_routing_packet_arg == null ? 0 : onion_routing_packet_arg.ptr, InternalUtils.check_arr_len(blinding_point_arg, 33));
+ public static UpdateAddHTLC of(org.ldk.structs.ChannelId channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, org.ldk.structs.Option_u64Z skimmed_fee_msat_arg, org.ldk.structs.OnionPacket onion_routing_packet_arg, @Nullable byte[] blinding_point_arg) {
+ long ret = bindings.UpdateAddHTLC_new(channel_id_arg.ptr, htlc_id_arg, amount_msat_arg, InternalUtils.check_arr_len(payment_hash_arg, 32), cltv_expiry_arg, skimmed_fee_msat_arg.ptr, onion_routing_packet_arg.ptr, InternalUtils.check_arr_len(blinding_point_arg, 33));
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(htlc_id_arg);
Reference.reachabilityFence(amount_msat_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.UpdateAddHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateAddHTLC(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(skimmed_fee_msat_arg); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(onion_routing_packet_arg); };
return ret_hu_conv;
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.UpdateAddHTLC b) {
- boolean ret = bindings.UpdateAddHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.UpdateAddHTLC_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.UpdateFailHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.UpdateFailHTLC_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.UpdateFailHTLC b) {
- boolean ret = bindings.UpdateFailHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.UpdateFailHTLC_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.UpdateFailMalformedHTLC b) {
- boolean ret = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.UpdateFee_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.UpdateFee_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.UpdateFee_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.UpdateFee_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new UpdateFee given each field
*/
- public static UpdateFee of(byte[] channel_id_arg, int feerate_per_kw_arg) {
- long ret = bindings.UpdateFee_new(InternalUtils.check_arr_len(channel_id_arg, 32), feerate_per_kw_arg);
+ public static UpdateFee of(org.ldk.structs.ChannelId channel_id_arg, int feerate_per_kw_arg) {
+ long ret = bindings.UpdateFee_new(channel_id_arg.ptr, feerate_per_kw_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(feerate_per_kw_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.UpdateFee ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateFee(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.UpdateFee b) {
- boolean ret = bindings.UpdateFee_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.UpdateFee_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
/**
* The channel ID
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
* The channel ID
*/
- public void set_channel_id(byte[] val) {
- bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new UpdateFulfillHTLC given each field
*/
- public static UpdateFulfillHTLC of(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) {
- long ret = bindings.UpdateFulfillHTLC_new(InternalUtils.check_arr_len(channel_id_arg, 32), htlc_id_arg, InternalUtils.check_arr_len(payment_preimage_arg, 32));
+ public static UpdateFulfillHTLC of(org.ldk.structs.ChannelId channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) {
+ long ret = bindings.UpdateFulfillHTLC_new(channel_id_arg.ptr, htlc_id_arg, InternalUtils.check_arr_len(payment_preimage_arg, 32));
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(htlc_id_arg);
Reference.reachabilityFence(payment_preimage_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.UpdateFulfillHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateFulfillHTLC(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.UpdateFulfillHTLC b) {
- boolean ret = bindings.UpdateFulfillHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.UpdateFulfillHTLC_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Channel handshake config that we propose to our counterparty.
*/
public void set_channel_handshake_config(org.ldk.structs.ChannelHandshakeConfig val) {
- bindings.UserConfig_set_channel_handshake_config(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UserConfig_set_channel_handshake_config(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Limits applied to our counterparty's proposed channel handshake config settings.
*/
public void set_channel_handshake_limits(org.ldk.structs.ChannelHandshakeLimits val) {
- bindings.UserConfig_set_channel_handshake_limits(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UserConfig_set_channel_handshake_limits(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Channel config which affects behavior during channel lifetime.
*/
public void set_channel_config(org.ldk.structs.ChannelConfig val) {
- bindings.UserConfig_set_channel_config(this.ptr, val == null ? 0 : val.ptr);
+ bindings.UserConfig_set_channel_config(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new UserConfig given each field
*/
public static UserConfig of(org.ldk.structs.ChannelHandshakeConfig channel_handshake_config_arg, org.ldk.structs.ChannelHandshakeLimits channel_handshake_limits_arg, org.ldk.structs.ChannelConfig channel_config_arg, boolean accept_forwards_to_priv_channels_arg, boolean accept_inbound_channels_arg, boolean manually_accept_inbound_channels_arg, boolean accept_intercept_htlcs_arg, boolean accept_mpp_keysend_arg) {
- long ret = bindings.UserConfig_new(channel_handshake_config_arg == null ? 0 : channel_handshake_config_arg.ptr, channel_handshake_limits_arg == null ? 0 : channel_handshake_limits_arg.ptr, channel_config_arg == null ? 0 : channel_config_arg.ptr, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg);
+ long ret = bindings.UserConfig_new(channel_handshake_config_arg.ptr, channel_handshake_limits_arg.ptr, channel_config_arg.ptr, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg);
Reference.reachabilityFence(channel_handshake_config_arg);
Reference.reachabilityFence(channel_handshake_limits_arg);
Reference.reachabilityFence(channel_config_arg);
return ret_hu_conv;
}
+ /**
+ * Extracts the block height (most significant 3-bytes) from the `short_channel_id`
+ */
+ public static int block_from_scid(long short_channel_id) {
+ int ret = bindings.block_from_scid(short_channel_id);
+ Reference.reachabilityFence(short_channel_id);
+ return ret;
+ }
+
+ /**
+ * Extracts the tx index (bytes [2..4]) from the `short_channel_id`
+ */
+ public static int tx_index_from_scid(long short_channel_id) {
+ int ret = bindings.tx_index_from_scid(short_channel_id);
+ Reference.reachabilityFence(short_channel_id);
+ return ret;
+ }
+
+ /**
+ * Extracts the vout (bytes [0..2]) from the `short_channel_id`
+ */
+ public static short vout_from_scid(long short_channel_id) {
+ short ret = bindings.vout_from_scid(short_channel_id);
+ Reference.reachabilityFence(short_channel_id);
+ return ret;
+ }
+
+ /**
+ * Constructs a `short_channel_id` using the components pieces. Results in an error
+ * if the block height, tx index, or vout index overflow the maximum sizes.
+ */
+ public static Result_u64ShortChannelIdErrorZ scid_from_parts(long block, long tx_index, long vout_index) {
+ long ret = bindings.scid_from_parts(block, tx_index, vout_index);
+ Reference.reachabilityFence(block);
+ Reference.reachabilityFence(tx_index);
+ Reference.reachabilityFence(vout_index);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Read a C2Tuple_BestBlockOutputSweeperZ from a byte array, created by C2Tuple_BestBlockOutputSweeperZ_write
+ */
+ public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(byte[] ser, org.ldk.structs.BroadcasterInterface arg_a, org.ldk.structs.FeeEstimator arg_b, org.ldk.structs.Option_FilterZ arg_c, org.ldk.structs.OutputSpender arg_d, org.ldk.structs.ChangeDestinationSource arg_e, org.ldk.structs.KVStore arg_f, org.ldk.structs.Logger arg_g) {
+ long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr, arg_d.ptr, arg_e.ptr, arg_f.ptr, arg_g.ptr);
+ Reference.reachabilityFence(ser);
+ Reference.reachabilityFence(arg_a);
+ Reference.reachabilityFence(arg_b);
+ Reference.reachabilityFence(arg_c);
+ Reference.reachabilityFence(arg_d);
+ Reference.reachabilityFence(arg_e);
+ Reference.reachabilityFence(arg_f);
+ Reference.reachabilityFence(arg_g);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_a); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_b); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_c); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_d); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_e); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_f); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_g); };
+ return ret_hu_conv;
+ }
+
/**
* Read a MonitorEvent from a byte array, created by MonitorEvent_write
*/
* [`Event::PaymentClaimable`]: crate::events::Event::PaymentClaimable
*/
public static Result_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(org.ldk.structs.UpdateAddHTLC msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, int cur_height, boolean accept_mpp_keysend, boolean allow_skimmed_fees) {
- long ret = bindings.peel_payment_onion(msg == null ? 0 : msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees);
+ long ret = bindings.peel_payment_onion(msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees);
Reference.reachabilityFence(msg);
Reference.reachabilityFence(node_signer);
Reference.reachabilityFence(logger);
* [`ChannelManager`].
*/
public static InitFeatures provided_init_features(org.ldk.structs.UserConfig config) {
- long ret = bindings.provided_init_features(config == null ? 0 : config.ptr);
+ long ret = bindings.provided_init_features(config.ptr);
Reference.reachabilityFence(config);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
* Read a C2Tuple_ThirtyTwoBytesChannelManagerZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelManagerZ_write
*/
public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelManagerZ_read(byte[] ser, EntropySource arg_entropy_source, NodeSigner arg_node_signer, SignerProvider arg_signer_provider, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Router arg_router, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
- long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr).toArray() : null));
+ long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config.ptr, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16.ptr).toArray() : null));
Reference.reachabilityFence(ser);
Reference.reachabilityFence(arg_entropy_source);
Reference.reachabilityFence(arg_node_signer);
return ret_hu_conv;
}
+ /**
+ * Adds a tweak to a public key to derive a new public key.
+ *
+ * May panic if `tweak` is not the output of a SHA-256 hash.
+ */
+ public static byte[] add_public_key_tweak(byte[] base_point, byte[] tweak) {
+ byte[] ret = bindings.add_public_key_tweak(InternalUtils.check_arr_len(base_point, 33), InternalUtils.check_arr_len(tweak, 32));
+ Reference.reachabilityFence(base_point);
+ Reference.reachabilityFence(tweak);
+ return ret;
+ }
+
/**
* Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment`], but no
* `ChannelManager` is required. Useful for generating invoices for [phantom node payments] without
* [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material
*/
public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.EntropySource entropy_source, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
- long ret = bindings.create(keys == null ? 0 : keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr);
+ long ret = bindings.create(keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr);
Reference.reachabilityFence(keys);
Reference.reachabilityFence(min_value_msat);
Reference.reachabilityFence(invoice_expiry_delta_secs);
* [phantom node payments]: crate::sign::PhantomKeysManager
*/
public static Result_ThirtyTwoBytesNoneZ create_from_hash(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, byte[] payment_hash, int invoice_expiry_delta_secs, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
- long ret = bindings.create_from_hash(keys == null ? 0 : keys.ptr, min_value_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr);
+ long ret = bindings.create_from_hash(keys.ptr, min_value_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr);
Reference.reachabilityFence(keys);
Reference.reachabilityFence(min_value_msat);
Reference.reachabilityFence(payment_hash);
* Gets the weight for an HTLC-Success transaction.
*/
public static long htlc_success_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) {
- long ret = bindings.htlc_success_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr);
+ long ret = bindings.htlc_success_tx_weight(channel_type_features.ptr);
Reference.reachabilityFence(channel_type_features);
return ret;
}
* Gets the weight for an HTLC-Timeout transaction.
*/
public static long htlc_timeout_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) {
- long ret = bindings.htlc_timeout_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr);
+ long ret = bindings.htlc_timeout_tx_weight(channel_type_features.ptr);
Reference.reachabilityFence(channel_type_features);
return ret;
}
* Build a closing transaction
*/
public static byte[] build_closing_transaction(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, org.ldk.structs.OutPoint funding_outpoint) {
- byte[] ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr);
+ byte[] ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint.ptr);
Reference.reachabilityFence(to_holder_value_sat);
Reference.reachabilityFence(to_counterparty_value_sat);
Reference.reachabilityFence(to_holder_script);
* Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions.
*/
public static byte[] get_revokeable_redeemscript(org.ldk.structs.RevocationKey revocation_key, short contest_delay, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key) {
- byte[] ret = bindings.get_revokeable_redeemscript(revocation_key == null ? 0 : revocation_key.ptr, contest_delay, broadcaster_delayed_payment_key == null ? 0 : broadcaster_delayed_payment_key.ptr);
+ byte[] ret = bindings.get_revokeable_redeemscript(revocation_key.ptr, contest_delay, broadcaster_delayed_payment_key.ptr);
Reference.reachabilityFence(revocation_key);
Reference.reachabilityFence(contest_delay);
Reference.reachabilityFence(broadcaster_delayed_payment_key);
* the channel type.
*/
public static byte[] get_counterparty_payment_script(org.ldk.structs.ChannelTypeFeatures channel_type_features, byte[] payment_key) {
- byte[] ret = bindings.get_counterparty_payment_script(channel_type_features == null ? 0 : channel_type_features.ptr, InternalUtils.check_arr_len(payment_key, 33));
+ byte[] ret = bindings.get_counterparty_payment_script(channel_type_features.ptr, InternalUtils.check_arr_len(payment_key, 33));
Reference.reachabilityFence(channel_type_features);
Reference.reachabilityFence(payment_key);
return ret;
* does not need to have its previous_output_index filled.
*/
public static byte[] get_htlc_redeemscript(org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.TxCreationKeys keys) {
- byte[] ret = bindings.get_htlc_redeemscript(htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, keys == null ? 0 : keys.ptr);
+ byte[] ret = bindings.get_htlc_redeemscript(htlc.ptr, channel_type_features.ptr, keys.ptr);
Reference.reachabilityFence(htlc);
Reference.reachabilityFence(channel_type_features);
Reference.reachabilityFence(keys);
* commitment transaction).
*/
public static byte[] build_htlc_transaction(byte[] commitment_txid, int feerate_per_kw, short contest_delay, org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key, org.ldk.structs.RevocationKey revocation_key) {
- byte[] ret = bindings.build_htlc_transaction(InternalUtils.check_arr_len(commitment_txid, 32), feerate_per_kw, contest_delay, htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, broadcaster_delayed_payment_key == null ? 0 : broadcaster_delayed_payment_key.ptr, revocation_key == null ? 0 : revocation_key.ptr);
+ byte[] ret = bindings.build_htlc_transaction(InternalUtils.check_arr_len(commitment_txid, 32), feerate_per_kw, contest_delay, htlc.ptr, channel_type_features.ptr, broadcaster_delayed_payment_key.ptr, revocation_key.ptr);
Reference.reachabilityFence(commitment_txid);
Reference.reachabilityFence(feerate_per_kw);
Reference.reachabilityFence(contest_delay);
* Returns the witness required to satisfy and spend a HTLC input.
*/
public static byte[] build_htlc_input_witness(byte[] local_sig, byte[] remote_sig, org.ldk.structs.Option_ThirtyTwoBytesZ preimage, byte[] redeem_script, org.ldk.structs.ChannelTypeFeatures channel_type_features) {
- byte[] ret = bindings.build_htlc_input_witness(InternalUtils.check_arr_len(local_sig, 64), InternalUtils.check_arr_len(remote_sig, 64), preimage.ptr, redeem_script, channel_type_features == null ? 0 : channel_type_features.ptr);
+ byte[] ret = bindings.build_htlc_input_witness(InternalUtils.check_arr_len(local_sig, 64), InternalUtils.check_arr_len(remote_sig, 64), preimage.ptr, redeem_script, channel_type_features.ptr);
Reference.reachabilityFence(local_sig);
Reference.reachabilityFence(remote_sig);
Reference.reachabilityFence(preimage);
* Returns an error if it is invalid.
*/
public static Result_NoneLightningErrorZ verify_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
- long ret = bindings.verify_node_announcement(msg == null ? 0 : msg.ptr);
+ long ret = bindings.verify_node_announcement(msg.ptr);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
* Returns an error if one of the signatures is invalid.
*/
public static Result_NoneLightningErrorZ verify_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) {
- long ret = bindings.verify_channel_announcement(msg == null ? 0 : msg.ptr);
+ long ret = bindings.verify_channel_announcement(msg.ptr);
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
* Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public static Result_RouteLightningErrorZ find_route(byte[] our_node_pubkey, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, @Nullable ChannelDetails[] first_hops, org.ldk.structs.Logger logger, org.ldk.structs.ScoreLookUp scorer, org.ldk.structs.ProbabilisticScoringFeeParameters score_params, byte[] random_seed_bytes) {
- long ret = bindings.find_route(InternalUtils.check_arr_len(our_node_pubkey, 33), route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, logger.ptr, scorer.ptr, score_params == null ? 0 : score_params.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
+ long ret = bindings.find_route(InternalUtils.check_arr_len(our_node_pubkey, 33), route_params.ptr, network_graph.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, logger.ptr, scorer.ptr, score_params.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
Reference.reachabilityFence(our_node_pubkey);
Reference.reachabilityFence(route_params);
Reference.reachabilityFence(network_graph);
* Re-uses logic from `find_route`, so the restrictions described there also apply here.
*/
public static Result_RouteLightningErrorZ build_route_from_hops(byte[] our_node_pubkey, byte[][] hops, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger, byte[] random_seed_bytes) {
- long ret = bindings.build_route_from_hops(InternalUtils.check_arr_len(our_node_pubkey, 33), hops != null ? Arrays.stream(hops).map(hops_conv_8 -> InternalUtils.check_arr_len(hops_conv_8, 33)).toArray(byte[][]::new) : null, route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, logger.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
+ long ret = bindings.build_route_from_hops(InternalUtils.check_arr_len(our_node_pubkey, 33), hops != null ? Arrays.stream(hops).map(hops_conv_8 -> InternalUtils.check_arr_len(hops_conv_8, 33)).toArray(byte[][]::new) : null, route_params.ptr, network_graph.ptr, logger.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
Reference.reachabilityFence(our_node_pubkey);
Reference.reachabilityFence(hops);
Reference.reachabilityFence(route_params);
return ret_hu_conv;
}
+ /**
+ * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
+ * `path`, first calling [`Destination::resolve`] on `path.destination` with the given
+ * [`ReadOnlyNetworkGraph`].
+ *
+ * Returns the node id of the peer to send the message to, the message itself, and any addresses
+ * needed to connect to the first node.
+ *
+ * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.ReadOnlyNetworkGraph network_graph, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) {
+ long ret = bindings.create_onion_message_resolving_destination(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, network_graph.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr);
+ Reference.reachabilityFence(entropy_source);
+ Reference.reachabilityFence(node_signer);
+ Reference.reachabilityFence(node_id_lookup);
+ Reference.reachabilityFence(network_graph);
+ Reference.reachabilityFence(path);
+ Reference.reachabilityFence(contents);
+ Reference.reachabilityFence(reply_path);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(network_graph); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(path); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(contents); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reply_path); };
+ return ret_hu_conv;
+ }
+
/**
* Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
* `path`.
*
* Returns the node id of the peer to send the message to, the message itself, and any addresses
- * need to connect to the first node.
+ * needed to connect to the first node.
+ *
+ * Returns [`SendError::UnresolvedIntroductionNode`] if:
+ * - `destination` contains a blinded path with an [`IntroductionNode::DirectedShortChannelId`],
+ * - unless it can be resolved by [`NodeIdLookUp::next_node_id`].
+ * Use [`create_onion_message_resolving_destination`] instead to resolve the introduction node
+ * first with a [`ReadOnlyNetworkGraph`].
*
* Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) {
- long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, path == null ? 0 : path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr);
+ public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) {
+ long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr);
Reference.reachabilityFence(entropy_source);
Reference.reachabilityFence(node_signer);
+ Reference.reachabilityFence(node_id_lookup);
Reference.reachabilityFence(path);
Reference.reachabilityFence(contents);
Reference.reachabilityFence(reply_path);
Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(path); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(contents); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reply_path); };
* receiver.
*/
public static Result_PeeledOnionNoneZ peel_onion_message(org.ldk.structs.OnionMessage msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.CustomOnionMessageHandler custom_handler) {
- long ret = bindings.peel_onion_message(msg == null ? 0 : msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr);
+ long ret = bindings.peel_onion_message(msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr);
Reference.reachabilityFence(msg);
Reference.reachabilityFence(node_signer);
Reference.reachabilityFence(logger);
/**
* Create a one-hop blinded path for a payment.
*/
- public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, org.ldk.structs.EntropySource entropy_source) {
- long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs == null ? 0 : payee_tlvs.ptr, entropy_source.ptr);
+ public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) {
+ long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs.ptr, min_final_cltv_expiry_delta, entropy_source.ptr);
Reference.reachabilityFence(payee_node_id);
Reference.reachabilityFence(payee_tlvs);
+ Reference.reachabilityFence(min_final_cltv_expiry_delta);
Reference.reachabilityFence(entropy_source);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
*
* [`ForwardTlvs`]: crate::blinded_path::payment::ForwardTlvs
*/
- public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(ForwardNode[] intermediate_nodes, byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, long htlc_maximum_msat, org.ldk.structs.EntropySource entropy_source) {
- long ret = bindings.BlindedPath_new_for_payment(intermediate_nodes != null ? Arrays.stream(intermediate_nodes).mapToLong(intermediate_nodes_conv_13 -> intermediate_nodes_conv_13 == null ? 0 : intermediate_nodes_conv_13.ptr).toArray() : null, InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs == null ? 0 : payee_tlvs.ptr, htlc_maximum_msat, entropy_source.ptr);
+ public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(ForwardNode[] intermediate_nodes, byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, long htlc_maximum_msat, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) {
+ long ret = bindings.BlindedPath_new_for_payment(intermediate_nodes != null ? Arrays.stream(intermediate_nodes).mapToLong(intermediate_nodes_conv_13 -> intermediate_nodes_conv_13.ptr).toArray() : null, InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs.ptr, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source.ptr);
Reference.reachabilityFence(intermediate_nodes);
Reference.reachabilityFence(payee_node_id);
Reference.reachabilityFence(payee_tlvs);
Reference.reachabilityFence(htlc_maximum_msat);
+ Reference.reachabilityFence(min_final_cltv_expiry_delta);
Reference.reachabilityFence(entropy_source);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
* [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
*/
public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_zero_amount_invoice(org.ldk.structs.Bolt11Invoice invoice, long amount_msat) {
- long ret = bindings.payment_parameters_from_zero_amount_invoice(invoice == null ? 0 : invoice.ptr, amount_msat);
+ long ret = bindings.payment_parameters_from_zero_amount_invoice(invoice.ptr, amount_msat);
Reference.reachabilityFence(invoice);
Reference.reachabilityFence(amount_msat);
if (ret >= 0 && ret <= 4096) { return null; }
* [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
*/
public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_invoice(org.ldk.structs.Bolt11Invoice invoice) {
- long ret = bindings.payment_parameters_from_invoice(invoice == null ? 0 : invoice.ptr);
+ long ret = bindings.payment_parameters_from_invoice(invoice.ptr);
Reference.reachabilityFence(invoice);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret);
* available and the current time is supplied by the caller.
*/
public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, java.lang.String description, int invoice_expiry_delta_secs, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) {
- long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
+ long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
Reference.reachabilityFence(amt_msat);
Reference.reachabilityFence(payment_hash);
Reference.reachabilityFence(description);
* available and the current time is supplied by the caller.
*/
public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, int invoice_expiry_delta_secs, org.ldk.structs.Sha256 description_hash, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) {
- long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash == null ? 0 : description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
+ long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
Reference.reachabilityFence(amt_msat);
Reference.reachabilityFence(payment_hash);
Reference.reachabilityFence(invoice_expiry_delta_secs);
* [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
*/
public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
- long ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+ long ret = bindings.create_invoice_from_channelmanager(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
Reference.reachabilityFence(channelmanager);
Reference.reachabilityFence(node_signer);
Reference.reachabilityFence(logger);
* [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
*/
public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
- long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+ long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
Reference.reachabilityFence(channelmanager);
Reference.reachabilityFence(node_signer);
Reference.reachabilityFence(logger);
* available and the current time is supplied by the caller.
*/
public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
- long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+ long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
Reference.reachabilityFence(channelmanager);
Reference.reachabilityFence(node_signer);
Reference.reachabilityFence(logger);
* available and the current time is supplied by the caller.
*/
public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
- long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+ long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
Reference.reachabilityFence(channelmanager);
Reference.reachabilityFence(node_signer);
Reference.reachabilityFence(logger);
* the payment hash is also involved outside the scope of lightning.
*/
public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs, byte[] payment_hash, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
- long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.check_arr_len(payment_hash, 32), min_final_cltv_expiry_delta.ptr);
+ long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.check_arr_len(payment_hash, 32), min_final_cltv_expiry_delta.ptr);
Reference.reachabilityFence(channelmanager);
Reference.reachabilityFence(node_signer);
Reference.reachabilityFence(logger);
* The unique identifier of the output.
*/
public void set_outpoint(org.ldk.structs.OutPoint val) {
- bindings.Utxo_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+ bindings.Utxo_set_outpoint(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new Utxo given each field
*/
public static Utxo of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut output_arg, long satisfaction_weight_arg) {
- long ret = bindings.Utxo_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, output_arg.ptr, satisfaction_weight_arg);
+ long ret = bindings.Utxo_new(outpoint_arg.ptr, output_arg.ptr, satisfaction_weight_arg);
Reference.reachabilityFence(outpoint_arg);
Reference.reachabilityFence(output_arg);
Reference.reachabilityFence(satisfaction_weight_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.Utxo b) {
- boolean ret = bindings.Utxo_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.Utxo_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* Returns a `Utxo` with the `satisfaction_weight` estimate for a legacy P2PKH output.
*/
public static Utxo new_p2pkh(org.ldk.structs.OutPoint outpoint, long value, byte[] pubkey_hash) {
- long ret = bindings.Utxo_new_p2pkh(outpoint == null ? 0 : outpoint.ptr, value, InternalUtils.check_arr_len(pubkey_hash, 20));
+ long ret = bindings.Utxo_new_p2pkh(outpoint.ptr, value, InternalUtils.check_arr_len(pubkey_hash, 20));
Reference.reachabilityFence(outpoint);
Reference.reachabilityFence(value);
Reference.reachabilityFence(pubkey_hash);
* [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
*/
public void resolve_without_forwarding(org.ldk.structs.NetworkGraph graph, org.ldk.structs.Result_TxOutUtxoLookupErrorZ result) {
- bindings.UtxoFuture_resolve_without_forwarding(this.ptr, graph == null ? 0 : graph.ptr, result != null ? result.ptr : 0);
+ bindings.UtxoFuture_resolve_without_forwarding(this.ptr, graph.ptr, result.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(graph);
Reference.reachabilityFence(result);
* [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
*/
public void resolve(org.ldk.structs.NetworkGraph graph, org.ldk.structs.P2PGossipSync gossip, org.ldk.structs.Result_TxOutUtxoLookupErrorZ result) {
- bindings.UtxoFuture_resolve(this.ptr, graph == null ? 0 : graph.ptr, gossip == null ? 0 : gossip.ptr, result != null ? result.ptr : 0);
+ bindings.UtxoFuture_resolve(this.ptr, graph.ptr, gossip.ptr, result.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(graph);
Reference.reachabilityFence(gossip);
@Override public long get_utxo(byte[] chain_hash, long short_channel_id) {
UtxoResult ret = arg.get_utxo(chain_hash, short_channel_id);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
return result;
}
* Utility method to constructs a new Sync-variant UtxoResult
*/
public static UtxoResult sync(org.ldk.structs.Result_TxOutUtxoLookupErrorZ a) {
- long ret = bindings.UtxoResult_sync(a != null ? a.ptr : 0);
+ long ret = bindings.UtxoResult_sync(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.UtxoResult ret_hu_conv = org.ldk.structs.UtxoResult.constr_from_ptr(ret);
* Utility method to constructs a new Async-variant UtxoResult
*/
public static UtxoResult async(org.ldk.structs.UtxoFuture a) {
- long ret = bindings.UtxoResult_async(a == null ? 0 : a.ptr);
+ long ret = bindings.UtxoResult_async(a.ptr);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.UtxoResult ret_hu_conv = org.ldk.structs.UtxoResult.constr_from_ptr(ret);
if (ptr != 0) { bindings.VerifiedInvoiceRequest_free(ptr); }
}
+ /**
+ * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made.
+ */
+ public OfferId get_offer_id() {
+ long ret = bindings.VerifiedInvoiceRequest_get_offer_id(this.ptr);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made.
+ */
+ public void set_offer_id(org.ldk.structs.OfferId val) {
+ bindings.VerifiedInvoiceRequest_set_offer_id(this.ptr, val.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
+ }
+
/**
* Keys used for signing a [`Bolt12Invoice`] if they can be derived.
*
/**
* The minimum amount required for a successful payment of a single item.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- @Nullable
- public Amount amount() {
+ public Option_AmountZ amount() {
long ret = bindings.VerifiedInvoiceRequest_amount(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+ org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
* A complete description of the purpose of the payment. Intended to be displayed to the user
* but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public PrintableString description() {
long ret = bindings.VerifiedInvoiceRequest_description(this.ptr);
Reference.reachabilityFence(this);
long ret = bindings.VerifiedInvoiceRequest_supported_quantity(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+ org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}
/**
* The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
+ @Nullable
public byte[] signing_pubkey() {
byte[] ret = bindings.VerifiedInvoiceRequest_signing_pubkey(this.ptr);
Reference.reachabilityFence(this);
return ret_hu_conv;
}
+ /**
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the
+ * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time.
+ *
+ * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned
+ * creation time is used for the `created_at` parameter.
+ *
+ * [`Duration`]: core::time::Duration
+ */
+ public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) {
+ long ret = bindings.VerifiedInvoiceRequest_respond_with(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payment_paths);
+ Reference.reachabilityFence(payment_hash);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields.
+ *
+ * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after
+ * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds
+ * where [`std::time::SystemTime`] is not available.
+ *
+ * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment
+ * for the invoice.
+ *
+ * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
+ * must contain one or more elements ordered from most-preferred to least-preferred, if there's
+ * a preference. Note, however, that any privacy is lost if a public node id was used for
+ * [`Offer::signing_pubkey`].
+ *
+ * Errors if the request contains unknown required features.
+ *
+ * # Note
+ *
+ * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`],
+ * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead.
+ *
+ * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at
+ * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey
+ */
+ public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) {
+ long ret = bindings.VerifiedInvoiceRequest_respond_with_no_std(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32), created_at);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payment_paths);
+ Reference.reachabilityFence(payment_hash);
+ Reference.reachabilityFence(created_at);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses
+ * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use
+ * the same [`ExpandedKey`] as the one used to create the offer.
+ *
+ * See [`InvoiceRequest::respond_with`] for further details.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+ public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond_using_derived_keys(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) {
+ long ret = bindings.VerifiedInvoiceRequest_respond_using_derived_keys(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payment_paths);
+ Reference.reachabilityFence(payment_hash);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses
+ * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use
+ * the same [`ExpandedKey`] as the one used to create the offer.
+ *
+ * See [`InvoiceRequest::respond_with_no_std`] for further details.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+ public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond_using_derived_keys_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) {
+ long ret = bindings.VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32), created_at);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(payment_paths);
+ Reference.reachabilityFence(payment_hash);
+ Reference.reachabilityFence(created_at);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
@Override public long list_confirmed_utxos() {
Result_CVec_UtxoZNoneZ ret = arg.list_confirmed_utxos();
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long get_change_script() {
Result_CVec_u8ZNoneZ ret = arg.get_change_script();
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public long sign_psbt(byte[] psbt) {
Result_TransactionNoneZ ret = arg.sign_psbt(psbt);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
});
*
* All-0s indicates a warning unrelated to a specific channel.
*/
- public byte[] get_channel_id() {
- byte[] ret = bindings.WarningMessage_get_channel_id(this.ptr);
+ public ChannelId get_channel_id() {
+ long ret = bindings.WarningMessage_get_channel_id(this.ptr);
Reference.reachabilityFence(this);
- return ret;
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
}
/**
*
* All-0s indicates a warning unrelated to a specific channel.
*/
- public void set_channel_id(byte[] val) {
- bindings.WarningMessage_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+ public void set_channel_id(org.ldk.structs.ChannelId val) {
+ bindings.WarningMessage_set_channel_id(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
+ if (this != null) { this.ptrs_to.add(val); };
}
/**
/**
* Constructs a new WarningMessage given each field
*/
- public static WarningMessage of(byte[] channel_id_arg, java.lang.String data_arg) {
- long ret = bindings.WarningMessage_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg);
+ public static WarningMessage of(org.ldk.structs.ChannelId channel_id_arg, java.lang.String data_arg) {
+ long ret = bindings.WarningMessage_new(channel_id_arg.ptr, data_arg);
Reference.reachabilityFence(channel_id_arg);
Reference.reachabilityFence(data_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.WarningMessage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.WarningMessage(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
return ret_hu_conv;
}
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.WarningMessage b) {
- boolean ret = bindings.WarningMessage_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.WarningMessage_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
* For details on asynchronous [`ChannelMonitor`] updating and returning
* [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
*/
- ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events();
+ FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events();
}
private static class LDKWatchHolder { Watch held; }
public static Watch new_impl(WatchInterface arg) {
if (monitor_hu_conv != null) { monitor_hu_conv.ptrs_to.add(this); };
Result_ChannelMonitorUpdateStatusNoneZ ret = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
Reference.reachabilityFence(arg);
- long result = ret == null ? 0 : ret.clone_ptr();
+ long result = ret.clone_ptr();
return result;
}
@Override public ChannelMonitorUpdateStatus update_channel(long funding_txo, long update) {
return ret;
}
@Override public long[] release_pending_monitor_events() {
- ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] ret = arg.release_pending_monitor_events();
+ FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] ret = arg.release_pending_monitor_events();
Reference.reachabilityFence(arg);
- long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_49 -> ret_conv_49 == null ? 0 : ret_conv_49.clone_ptr()).toArray() : null;
+ long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_57 -> ret_conv_57.clone_ptr()).toArray() : null;
return result;
}
});
* [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
*/
public Result_ChannelMonitorUpdateStatusNoneZ watch_channel(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelMonitor monitor) {
- long ret = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, monitor == null ? 0 : monitor.ptr);
+ long ret = bindings.Watch_watch_channel(this.ptr, funding_txo.ptr, monitor.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(funding_txo);
Reference.reachabilityFence(monitor);
* [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
*/
public ChannelMonitorUpdateStatus update_channel(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelMonitorUpdate update) {
- ChannelMonitorUpdateStatus ret = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, update == null ? 0 : update.ptr);
+ ChannelMonitorUpdateStatus ret = bindings.Watch_update_channel(this.ptr, funding_txo.ptr, update.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(funding_txo);
Reference.reachabilityFence(update);
* For details on asynchronous [`ChannelMonitor`] updating and returning
* [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
*/
- public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() {
+ public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() {
long[] ret = bindings.Watch_release_pending_monitor_events(this.ptr);
Reference.reachabilityFence(this);
- int ret_conv_49_len = ret.length;
- ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] ret_conv_49_arr = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[ret_conv_49_len];
- for (int x = 0; x < ret_conv_49_len; x++) {
- long ret_conv_49 = ret[x];
- ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret_conv_49);
- if (ret_conv_49_hu_conv != null) { ret_conv_49_hu_conv.ptrs_to.add(this); };
- ret_conv_49_arr[x] = ret_conv_49_hu_conv;
+ int ret_conv_57_len = ret.length;
+ FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] ret_conv_57_arr = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[ret_conv_57_len];
+ for (int f = 0; f < ret_conv_57_len; f++) {
+ long ret_conv_57 = ret[f];
+ FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret_conv_57);
+ if (ret_conv_57_hu_conv != null) { ret_conv_57_hu_conv.ptrs_to.add(this); };
+ ret_conv_57_arr[f] = ret_conv_57_hu_conv;
}
- return ret_conv_49_arr;
+ return ret_conv_57_arr;
}
}
* Outpoint identifying the transaction output.
*/
public void set_outpoint(org.ldk.structs.OutPoint val) {
- bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+ bindings.WatchedOutput_set_outpoint(this.ptr, val.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(val);
if (this != null) { this.ptrs_to.add(val); };
* Constructs a new WatchedOutput given each field
*/
public static WatchedOutput of(org.ldk.structs.Option_ThirtyTwoBytesZ block_hash_arg, org.ldk.structs.OutPoint outpoint_arg, byte[] script_pubkey_arg) {
- long ret = bindings.WatchedOutput_new(block_hash_arg.ptr, outpoint_arg == null ? 0 : outpoint_arg.ptr, script_pubkey_arg);
+ long ret = bindings.WatchedOutput_new(block_hash_arg.ptr, outpoint_arg.ptr, script_pubkey_arg);
Reference.reachabilityFence(block_hash_arg);
Reference.reachabilityFence(outpoint_arg);
Reference.reachabilityFence(script_pubkey_arg);
* Two objects with NULL inner values will be considered "equal" here.
*/
public boolean eq(org.ldk.structs.WatchedOutput b) {
- boolean ret = bindings.WatchedOutput_eq(this.ptr, b == null ? 0 : b.ptr);
+ boolean ret = bindings.WatchedOutput_eq(this.ptr, b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
if (this != null) { this.ptrs_to.add(b); };
final bindings.LDKWriteableEcdsaChannelSigner bindings_instance;
WriteableEcdsaChannelSigner(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
private WriteableEcdsaChannelSigner(bindings.LDKWriteableEcdsaChannelSigner arg, bindings.LDKEcdsaChannelSigner EcdsaChannelSigner, bindings.LDKChannelSigner ChannelSigner, ChannelPublicKeys pubkeys) {
- super(bindings.LDKWriteableEcdsaChannelSigner_new(arg, EcdsaChannelSigner, ChannelSigner, pubkeys == null ? 0 : pubkeys.clone_ptr()));
+ super(bindings.LDKWriteableEcdsaChannelSigner_new(arg, EcdsaChannelSigner, ChannelSigner, pubkeys.clone_ptr()));
this.ptrs_to.add(arg);
this.ptrs_to.add(EcdsaChannelSigner);
this.ptrs_to.add(ChannelSigner);
case 20: return LDKBolt12SemanticError_MissingPayerId;
case 21: return LDKBolt12SemanticError_DuplicatePaymentId;
case 22: return LDKBolt12SemanticError_MissingPaths;
- case 23: return LDKBolt12SemanticError_InvalidPayInfo;
- case 24: return LDKBolt12SemanticError_MissingCreationTime;
- case 25: return LDKBolt12SemanticError_MissingPaymentHash;
- case 26: return LDKBolt12SemanticError_MissingSignature;
+ case 23: return LDKBolt12SemanticError_UnexpectedPaths;
+ case 24: return LDKBolt12SemanticError_InvalidPayInfo;
+ case 25: return LDKBolt12SemanticError_MissingCreationTime;
+ case 26: return LDKBolt12SemanticError_MissingPaymentHash;
+ case 27: return LDKBolt12SemanticError_MissingSignature;
}
(*env)->FatalError(env, "A call to Bolt12SemanticError.ordinal() from rust returned an invalid value.");
abort(); // Unreachable, but will let the compiler know we don't return here
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerId = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = NULL;
+static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaymentHash = NULL;
CHECK(Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId != NULL);
Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingPaths", "Lorg/ldk/enums/Bolt12SemanticError;");
CHECK(Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths != NULL);
+ Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_UnexpectedPaths", "Lorg/ldk/enums/Bolt12SemanticError;");
+ CHECK(Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths != NULL);
Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_InvalidPayInfo", "Lorg/ldk/enums/Bolt12SemanticError;");
CHECK(Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo != NULL);
Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingCreationTime", "Lorg/ldk/enums/Bolt12SemanticError;");
return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId);
case LDKBolt12SemanticError_MissingPaths:
return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths);
+ case LDKBolt12SemanticError_UnexpectedPaths:
+ return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths);
case LDKBolt12SemanticError_InvalidPayInfo:
return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo);
case LDKBolt12SemanticError_MissingCreationTime:
case 3: return LDKConfirmationTarget_AnchorChannelFee;
case 4: return LDKConfirmationTarget_NonAnchorChannelFee;
case 5: return LDKConfirmationTarget_ChannelCloseMinimum;
+ case 6: return LDKConfirmationTarget_OutputSpendingFee;
}
(*env)->FatalError(env, "A call to ConfirmationTarget.ordinal() from rust returned an invalid value.");
abort(); // Unreachable, but will let the compiler know we don't return here
static jfieldID ConfirmationTarget_LDKConfirmationTarget_AnchorChannelFee = NULL;
static jfieldID ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee = NULL;
static jfieldID ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = NULL;
+static jfieldID ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = NULL;
JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env, jclass clz) {
ConfirmationTarget_class = (*env)->NewGlobalRef(env, clz);
CHECK(ConfirmationTarget_class != NULL);
CHECK(ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee != NULL);
ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_ChannelCloseMinimum", "Lorg/ldk/enums/ConfirmationTarget;");
CHECK(ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum != NULL);
+ ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_OutputSpendingFee", "Lorg/ldk/enums/ConfirmationTarget;");
+ CHECK(ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee != NULL);
}
static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationTarget val) {
switch (val) {
return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee);
case LDKConfirmationTarget_ChannelCloseMinimum:
return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum);
+ case LDKConfirmationTarget_OutputSpendingFee:
+ return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee);
default: abort();
}
}
}
}
+static inline LDKDirection LDKDirection_from_java(JNIEnv *env, jclass clz) {
+ jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to Direction.ordinal() from rust threw an exception.");
+ }
+ switch (ord) {
+ case 0: return LDKDirection_NodeOne;
+ case 1: return LDKDirection_NodeTwo;
+ }
+ (*env)->FatalError(env, "A call to Direction.ordinal() from rust returned an invalid value.");
+ abort(); // Unreachable, but will let the compiler know we don't return here
+}
+static jclass Direction_class = NULL;
+static jfieldID Direction_LDKDirection_NodeOne = NULL;
+static jfieldID Direction_LDKDirection_NodeTwo = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_Direction_init (JNIEnv *env, jclass clz) {
+ Direction_class = (*env)->NewGlobalRef(env, clz);
+ CHECK(Direction_class != NULL);
+ Direction_LDKDirection_NodeOne = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeOne", "Lorg/ldk/enums/Direction;");
+ CHECK(Direction_LDKDirection_NodeOne != NULL);
+ Direction_LDKDirection_NodeTwo = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeTwo", "Lorg/ldk/enums/Direction;");
+ CHECK(Direction_LDKDirection_NodeTwo != NULL);
+}
+static inline jclass LDKDirection_to_java(JNIEnv *env, LDKDirection val) {
+ switch (val) {
+ case LDKDirection_NodeOne:
+ return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeOne);
+ case LDKDirection_NodeTwo:
+ return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeTwo);
+ default: abort();
+ }
+}
+
static inline LDKHTLCClaim LDKHTLCClaim_from_java(JNIEnv *env, jclass clz) {
jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
if (UNLIKELY((*env)->ExceptionCheck(env))) {
}
}
+static inline LDKShortChannelIdError LDKShortChannelIdError_from_java(JNIEnv *env, jclass clz) {
+ jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust threw an exception.");
+ }
+ switch (ord) {
+ case 0: return LDKShortChannelIdError_BlockOverflow;
+ case 1: return LDKShortChannelIdError_TxIndexOverflow;
+ case 2: return LDKShortChannelIdError_VoutIndexOverflow;
+ }
+ (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust returned an invalid value.");
+ abort(); // Unreachable, but will let the compiler know we don't return here
+}
+static jclass ShortChannelIdError_class = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_ShortChannelIdError_init (JNIEnv *env, jclass clz) {
+ ShortChannelIdError_class = (*env)->NewGlobalRef(env, clz);
+ CHECK(ShortChannelIdError_class != NULL);
+ ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_BlockOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+ CHECK(ShortChannelIdError_LDKShortChannelIdError_BlockOverflow != NULL);
+ ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_TxIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+ CHECK(ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow != NULL);
+ ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_VoutIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+ CHECK(ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow != NULL);
+}
+static inline jclass LDKShortChannelIdError_to_java(JNIEnv *env, LDKShortChannelIdError val) {
+ switch (val) {
+ case LDKShortChannelIdError_BlockOverflow:
+ return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_BlockOverflow);
+ case LDKShortChannelIdError_TxIndexOverflow:
+ return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow);
+ case LDKShortChannelIdError_VoutIndexOverflow:
+ return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow);
+ default: abort();
+ }
+}
+
static inline LDKSiPrefix LDKSiPrefix_from_java(JNIEnv *env, jclass clz) {
jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
if (UNLIKELY((*env)->ExceptionCheck(env))) {
default: abort();
}
}
+static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKRefund ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static jclass LDKCOption_u64Z_Some_class = NULL;
static jmethodID LDKCOption_u64Z_Some_meth = NULL;
static jclass LDKCOption_u64Z_None_class = NULL;
static jmethodID LDKDecodeError_Io_meth = NULL;
static jclass LDKDecodeError_UnsupportedCompression_class = NULL;
static jmethodID LDKDecodeError_UnsupportedCompression_meth = NULL;
+static jclass LDKDecodeError_DangerousValue_class = NULL;
+static jmethodID LDKDecodeError_DangerousValue_meth = NULL;
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIEnv *env, jclass clz) {
LDKDecodeError_UnknownVersion_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownVersion"));
CHECK(LDKDecodeError_UnsupportedCompression_class != NULL);
LDKDecodeError_UnsupportedCompression_meth = (*env)->GetMethodID(env, LDKDecodeError_UnsupportedCompression_class, "<init>", "()V");
CHECK(LDKDecodeError_UnsupportedCompression_meth != NULL);
+ LDKDecodeError_DangerousValue_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$DangerousValue"));
+ CHECK(LDKDecodeError_DangerousValue_class != NULL);
+ LDKDecodeError_DangerousValue_meth = (*env)->GetMethodID(env, LDKDecodeError_DangerousValue_class, "<init>", "()V");
+ CHECK(LDKDecodeError_DangerousValue_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
case LDKDecodeError_UnsupportedCompression: {
return (*env)->NewObject(env, LDKDecodeError_UnsupportedCompression_class, LDKDecodeError_UnsupportedCompression_meth);
}
+ case LDKDecodeError_DangerousValue: {
+ return (*env)->NewObject(env, LDKDecodeError_DangerousValue_class, LDKDecodeError_DangerousValue_meth);
+ }
default: abort();
}
}
CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv);
}
+static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKUnsignedBolt12Invoice ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKBolt12Invoice ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form);
+ return ret_arr;
+}
+
+static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+ CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
+}
+
static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) {
LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
default: abort();
}
}
+static jclass LDKAmount_Bitcoin_class = NULL;
+static jmethodID LDKAmount_Bitcoin_meth = NULL;
+static jclass LDKAmount_Currency_class = NULL;
+static jmethodID LDKAmount_Currency_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAmount_init (JNIEnv *env, jclass clz) {
+ LDKAmount_Bitcoin_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Bitcoin"));
+ CHECK(LDKAmount_Bitcoin_class != NULL);
+ LDKAmount_Bitcoin_meth = (*env)->GetMethodID(env, LDKAmount_Bitcoin_class, "<init>", "(J)V");
+ CHECK(LDKAmount_Bitcoin_meth != NULL);
+ LDKAmount_Currency_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Currency"));
+ CHECK(LDKAmount_Currency_class != NULL);
+ LDKAmount_Currency_meth = (*env)->GetMethodID(env, LDKAmount_Currency_class, "<init>", "([BJ)V");
+ CHECK(LDKAmount_Currency_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAmount_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKAmount *obj = (LDKAmount*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKAmount_Bitcoin: {
+ int64_t amount_msats_conv = obj->bitcoin.amount_msats;
+ return (*env)->NewObject(env, LDKAmount_Bitcoin_class, LDKAmount_Bitcoin_meth, amount_msats_conv);
+ }
+ case LDKAmount_Currency: {
+ int8_tArray iso4217_code_arr = (*env)->NewByteArray(env, 3);
+ (*env)->SetByteArrayRegion(env, iso4217_code_arr, 0, 3, obj->currency.iso4217_code.data);
+ int64_t amount_conv = obj->currency.amount;
+ return (*env)->NewObject(env, LDKAmount_Currency_class, LDKAmount_Currency_meth, iso4217_code_arr, amount_conv);
+ }
+ default: abort();
+ }
+}
+static jclass LDKCOption_AmountZ_Some_class = NULL;
+static jmethodID LDKCOption_AmountZ_Some_meth = NULL;
+static jclass LDKCOption_AmountZ_None_class = NULL;
+static jmethodID LDKCOption_AmountZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1AmountZ_init (JNIEnv *env, jclass clz) {
+ LDKCOption_AmountZ_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$Some"));
+ CHECK(LDKCOption_AmountZ_Some_class != NULL);
+ LDKCOption_AmountZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_Some_class, "<init>", "(J)V");
+ CHECK(LDKCOption_AmountZ_Some_meth != NULL);
+ LDKCOption_AmountZ_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$None"));
+ CHECK(LDKCOption_AmountZ_None_class != NULL);
+ LDKCOption_AmountZ_None_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_None_class, "<init>", "()V");
+ CHECK(LDKCOption_AmountZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1AmountZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_AmountZ_Some: {
+ int64_t some_ref = tag_ptr(&obj->some, false);
+ return (*env)->NewObject(env, LDKCOption_AmountZ_Some_class, LDKCOption_AmountZ_Some_meth, some_ref);
+ }
+ case LDKCOption_AmountZ_None: {
+ return (*env)->NewObject(env, LDKCOption_AmountZ_None_class, LDKCOption_AmountZ_None_meth);
+ }
+ default: abort();
+ }
+}
+static jclass LDKQuantity_Bounded_class = NULL;
+static jmethodID LDKQuantity_Bounded_meth = NULL;
+static jclass LDKQuantity_Unbounded_class = NULL;
+static jmethodID LDKQuantity_Unbounded_meth = NULL;
+static jclass LDKQuantity_One_class = NULL;
+static jmethodID LDKQuantity_One_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKQuantity_init (JNIEnv *env, jclass clz) {
+ LDKQuantity_Bounded_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Bounded"));
+ CHECK(LDKQuantity_Bounded_class != NULL);
+ LDKQuantity_Bounded_meth = (*env)->GetMethodID(env, LDKQuantity_Bounded_class, "<init>", "(J)V");
+ CHECK(LDKQuantity_Bounded_meth != NULL);
+ LDKQuantity_Unbounded_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Unbounded"));
+ CHECK(LDKQuantity_Unbounded_class != NULL);
+ LDKQuantity_Unbounded_meth = (*env)->GetMethodID(env, LDKQuantity_Unbounded_class, "<init>", "()V");
+ CHECK(LDKQuantity_Unbounded_meth != NULL);
+ LDKQuantity_One_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$One"));
+ CHECK(LDKQuantity_One_class != NULL);
+ LDKQuantity_One_meth = (*env)->GetMethodID(env, LDKQuantity_One_class, "<init>", "()V");
+ CHECK(LDKQuantity_One_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKQuantity_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKQuantity_Bounded: {
+ int64_t bounded_conv = obj->bounded;
+ return (*env)->NewObject(env, LDKQuantity_Bounded_class, LDKQuantity_Bounded_meth, bounded_conv);
+ }
+ case LDKQuantity_Unbounded: {
+ return (*env)->NewObject(env, LDKQuantity_Unbounded_class, LDKQuantity_Unbounded_meth);
+ }
+ case LDKQuantity_One: {
+ return (*env)->NewObject(env, LDKQuantity_One_class, LDKQuantity_One_meth);
+ }
+ default: abort();
+ }
+}
+static jclass LDKCOption_QuantityZ_Some_class = NULL;
+static jmethodID LDKCOption_QuantityZ_Some_meth = NULL;
+static jclass LDKCOption_QuantityZ_None_class = NULL;
+static jmethodID LDKCOption_QuantityZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1QuantityZ_init (JNIEnv *env, jclass clz) {
+ LDKCOption_QuantityZ_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$Some"));
+ CHECK(LDKCOption_QuantityZ_Some_class != NULL);
+ LDKCOption_QuantityZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_Some_class, "<init>", "(J)V");
+ CHECK(LDKCOption_QuantityZ_Some_meth != NULL);
+ LDKCOption_QuantityZ_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$None"));
+ CHECK(LDKCOption_QuantityZ_None_class != NULL);
+ LDKCOption_QuantityZ_None_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_None_class, "<init>", "()V");
+ CHECK(LDKCOption_QuantityZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1QuantityZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_QuantityZ_Some: {
+ int64_t some_ref = tag_ptr(&obj->some, false);
+ return (*env)->NewObject(env, LDKCOption_QuantityZ_Some_class, LDKCOption_QuantityZ_Some_meth, some_ref);
+ }
+ case LDKCOption_QuantityZ_None: {
+ return (*env)->NewObject(env, LDKCOption_QuantityZ_None_class, LDKCOption_QuantityZ_None_meth);
+ }
+ default: abort();
+ }
+}
static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return ThirtyTwoBytes_clone(&*owner->contents.result);
CResult_RecoverableSignatureNoneZ_get_err(owner_conv);
}
-static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return *owner->contents.result;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form);
return ret_arr;
}
-static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return *owner->contents.err;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
- CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
+ CResult_ECDSASignatureNoneZ_get_err(owner_conv);
}
-static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return *owner->contents.result;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
+ LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
return ret_arr;
}
-static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return *owner->contents.err;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
- CResult_ECDSASignatureNoneZ_get_err(owner_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
+ CResult_TransactionNoneZ_get_err(owner_conv);
}
static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){
return ret_ref;
}
-static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
- LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv);
- int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
- return ret_arr;
-}
-
-static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
- CResult_TransactionNoneZ_get_err(owner_conv);
-}
-
static jclass LDKCandidateRouteHop_FirstHop_class = NULL;
static jmethodID LDKCandidateRouteHop_FirstHop_meth = NULL;
static jclass LDKCandidateRouteHop_PublicHop_class = NULL;
return ret_ref;
}
+static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){
+ LDKBestBlock ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner);
+ LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){
return owner->a;
}
CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv);
}
+static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL;
+static jclass LDKClosureReason_HolderForceClosed_class = NULL;
+static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL;
+static jclass LDKClosureReason_LegacyCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_LegacyCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_LocallyInitiatedCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL;
+static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL;
+static jclass LDKClosureReason_FundingTimedOut_class = NULL;
+static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL;
+static jclass LDKClosureReason_ProcessingError_class = NULL;
+static jmethodID LDKClosureReason_ProcessingError_meth = NULL;
+static jclass LDKClosureReason_DisconnectedPeer_class = NULL;
+static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL;
+static jclass LDKClosureReason_OutdatedChannelManager_class = NULL;
+static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL;
+static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL;
+static jclass LDKClosureReason_FundingBatchClosure_class = NULL;
+static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL;
+static jclass LDKClosureReason_HTLCsTimedOut_class = NULL;
+static jmethodID LDKClosureReason_HTLCsTimedOut_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) {
+ LDKClosureReason_CounterpartyForceClosed_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed"));
+ CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL);
+ LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "<init>", "(J)V");
+ CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL);
+ LDKClosureReason_HolderForceClosed_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed"));
+ CHECK(LDKClosureReason_HolderForceClosed_class != NULL);
+ LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "<init>", "()V");
+ CHECK(LDKClosureReason_HolderForceClosed_meth != NULL);
+ LDKClosureReason_LegacyCooperativeClosure_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LegacyCooperativeClosure"));
+ CHECK(LDKClosureReason_LegacyCooperativeClosure_class != NULL);
+ LDKClosureReason_LegacyCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LegacyCooperativeClosure_class, "<init>", "()V");
+ CHECK(LDKClosureReason_LegacyCooperativeClosure_meth != NULL);
+ LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyInitiatedCooperativeClosure"));
+ CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class != NULL);
+ LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, "<init>", "()V");
+ CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth != NULL);
+ LDKClosureReason_LocallyInitiatedCooperativeClosure_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LocallyInitiatedCooperativeClosure"));
+ CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_class != NULL);
+ LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, "<init>", "()V");
+ CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_meth != NULL);
+ LDKClosureReason_CommitmentTxConfirmed_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed"));
+ CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL);
+ LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "<init>", "()V");
+ CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL);
+ LDKClosureReason_FundingTimedOut_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut"));
+ CHECK(LDKClosureReason_FundingTimedOut_class != NULL);
+ LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "<init>", "()V");
+ CHECK(LDKClosureReason_FundingTimedOut_meth != NULL);
+ LDKClosureReason_ProcessingError_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError"));
+ CHECK(LDKClosureReason_ProcessingError_class != NULL);
+ LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "<init>", "(Ljava/lang/String;)V");
+ CHECK(LDKClosureReason_ProcessingError_meth != NULL);
+ LDKClosureReason_DisconnectedPeer_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer"));
+ CHECK(LDKClosureReason_DisconnectedPeer_class != NULL);
+ LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "<init>", "()V");
+ CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL);
+ LDKClosureReason_OutdatedChannelManager_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager"));
+ CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL);
+ LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "<init>", "()V");
+ CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL);
+ LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel"));
+ CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL);
+ LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "<init>", "()V");
+ CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL);
+ LDKClosureReason_FundingBatchClosure_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure"));
+ CHECK(LDKClosureReason_FundingBatchClosure_class != NULL);
+ LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "<init>", "()V");
+ CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL);
+ LDKClosureReason_HTLCsTimedOut_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HTLCsTimedOut"));
+ CHECK(LDKClosureReason_HTLCsTimedOut_class != NULL);
+ LDKClosureReason_HTLCsTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_HTLCsTimedOut_class, "<init>", "()V");
+ CHECK(LDKClosureReason_HTLCsTimedOut_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKClosureReason_CounterpartyForceClosed: {
+ LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
+ int64_t peer_msg_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var);
+ peer_msg_ref = tag_ptr(peer_msg_var.inner, false);
+ return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref);
+ }
+ case LDKClosureReason_HolderForceClosed: {
+ return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth);
+ }
+ case LDKClosureReason_LegacyCooperativeClosure: {
+ return (*env)->NewObject(env, LDKClosureReason_LegacyCooperativeClosure_class, LDKClosureReason_LegacyCooperativeClosure_meth);
+ }
+ case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: {
+ return (*env)->NewObject(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth);
+ }
+ case LDKClosureReason_LocallyInitiatedCooperativeClosure: {
+ return (*env)->NewObject(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, LDKClosureReason_LocallyInitiatedCooperativeClosure_meth);
+ }
+ case LDKClosureReason_CommitmentTxConfirmed: {
+ return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth);
+ }
+ case LDKClosureReason_FundingTimedOut: {
+ return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth);
+ }
+ case LDKClosureReason_ProcessingError: {
+ LDKStr err_str = obj->processing_error.err;
+ jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
+ return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv);
+ }
+ case LDKClosureReason_DisconnectedPeer: {
+ return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth);
+ }
+ case LDKClosureReason_OutdatedChannelManager: {
+ return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth);
+ }
+ case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: {
+ return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth);
+ }
+ case LDKClosureReason_FundingBatchClosure: {
+ return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth);
+ }
+ case LDKClosureReason_HTLCsTimedOut: {
+ return (*env)->NewObject(env, LDKClosureReason_HTLCsTimedOut_class, LDKClosureReason_HTLCsTimedOut_meth);
+ }
+ default: abort();
+ }
+}
static jclass LDKMonitorEvent_HTLCEvent_class = NULL;
static jmethodID LDKMonitorEvent_HTLCEvent_meth = NULL;
+static jclass LDKMonitorEvent_HolderForceClosedWithInfo_class = NULL;
+static jmethodID LDKMonitorEvent_HolderForceClosedWithInfo_meth = NULL;
static jclass LDKMonitorEvent_HolderForceClosed_class = NULL;
static jmethodID LDKMonitorEvent_HolderForceClosed_meth = NULL;
static jclass LDKMonitorEvent_Completed_class = NULL;
CHECK(LDKMonitorEvent_HTLCEvent_class != NULL);
LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "<init>", "(J)V");
CHECK(LDKMonitorEvent_HTLCEvent_meth != NULL);
+ LDKMonitorEvent_HolderForceClosedWithInfo_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosedWithInfo"));
+ CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_class != NULL);
+ LDKMonitorEvent_HolderForceClosedWithInfo_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, "<init>", "(JJJ)V");
+ CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_meth != NULL);
LDKMonitorEvent_HolderForceClosed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosed"));
CHECK(LDKMonitorEvent_HolderForceClosed_class != NULL);
LDKMonitorEvent_Completed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$Completed"));
CHECK(LDKMonitorEvent_Completed_class != NULL);
- LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJ)V");
+ LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJJ)V");
CHECK(LDKMonitorEvent_Completed_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
htlc_event_ref = tag_ptr(htlc_event_var.inner, false);
return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth, htlc_event_ref);
}
+ case LDKMonitorEvent_HolderForceClosedWithInfo: {
+ int64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false);
+ LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint;
+ int64_t outpoint_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var);
+ outpoint_ref = tag_ptr(outpoint_var.inner, false);
+ LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
+ return (*env)->NewObject(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, LDKMonitorEvent_HolderForceClosedWithInfo_meth, reason_ref, outpoint_ref, channel_id_ref);
+ }
case LDKMonitorEvent_HolderForceClosed: {
LDKOutPoint holder_force_closed_var = obj->holder_force_closed;
int64_t holder_force_closed_ref = 0;
int64_t funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
+ LDKChannelId channel_id_var = obj->completed.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
- return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, monitor_update_id_conv);
+ return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, channel_id_ref, monitor_update_id_conv);
}
default: abort();
}
}
return ret;
}
-static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
LDKOutPoint ret = owner->a;
ret.is_owned = false;
return ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
- LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+ LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
- return CVec_MonitorEventZ_clone(&owner->b);
+static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+ LDKChannelId ret = owner->b;
+ ret.is_owned = false;
+ return ret;
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
- LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+ LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+ return CVec_MonitorEventZ_clone(&owner->c);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+ LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv);
int64_tArray ret_arr = NULL;
ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
return ret_arr;
}
-static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
- return owner->c;
+static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+ return owner->d;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1d(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form);
return ret_arr;
}
-static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) {
- LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) {
+ LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]);
+ ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]);
}
return ret;
}
return ret_ref;
}
+static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){
+ LDKOfferId ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner);
+ LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+ CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv);
+}
+
+static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKOffer ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){
LDKOffer ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
-static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form);
- return ret_arr;
-}
-
-static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
- jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv));
- return ret_conv;
-}
-
static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
LDKNodeId ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
+static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form);
+ return ret_arr;
+}
+
+static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static jclass LDKNetworkUpdate_ChannelUpdateMessage_class = NULL;
static jmethodID LDKNetworkUpdate_ChannelUpdateMessage_meth = NULL;
static jclass LDKNetworkUpdate_ChannelFailure_class = NULL;
default: abort();
}
}
+static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner);
+ int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv);
+ return ret_conv;
+}
+
+static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return ShortChannelIdError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, CResult_u64ShortChannelIdErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){
LDKPendingHTLCInfo ret = *owner->contents.result;
ret.is_owned = false;
CResult_CVec_UtxoZNoneZ_get_err(owner_conv);
}
+static jclass LDKPaymentContext_Unknown_class = NULL;
+static jmethodID LDKPaymentContext_Unknown_meth = NULL;
+static jclass LDKPaymentContext_Bolt12Offer_class = NULL;
+static jmethodID LDKPaymentContext_Bolt12Offer_meth = NULL;
+static jclass LDKPaymentContext_Bolt12Refund_class = NULL;
+static jmethodID LDKPaymentContext_Bolt12Refund_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentContext_init (JNIEnv *env, jclass clz) {
+ LDKPaymentContext_Unknown_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Unknown"));
+ CHECK(LDKPaymentContext_Unknown_class != NULL);
+ LDKPaymentContext_Unknown_meth = (*env)->GetMethodID(env, LDKPaymentContext_Unknown_class, "<init>", "(J)V");
+ CHECK(LDKPaymentContext_Unknown_meth != NULL);
+ LDKPaymentContext_Bolt12Offer_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Offer"));
+ CHECK(LDKPaymentContext_Bolt12Offer_class != NULL);
+ LDKPaymentContext_Bolt12Offer_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Offer_class, "<init>", "(J)V");
+ CHECK(LDKPaymentContext_Bolt12Offer_meth != NULL);
+ LDKPaymentContext_Bolt12Refund_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Refund"));
+ CHECK(LDKPaymentContext_Bolt12Refund_class != NULL);
+ LDKPaymentContext_Bolt12Refund_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Refund_class, "<init>", "(J)V");
+ CHECK(LDKPaymentContext_Bolt12Refund_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentContext_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKPaymentContext_Unknown: {
+ LDKUnknownPaymentContext unknown_var = obj->unknown;
+ int64_t unknown_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var);
+ unknown_ref = tag_ptr(unknown_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentContext_Unknown_class, LDKPaymentContext_Unknown_meth, unknown_ref);
+ }
+ case LDKPaymentContext_Bolt12Offer: {
+ LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer;
+ int64_t bolt12_offer_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var);
+ bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentContext_Bolt12Offer_class, LDKPaymentContext_Bolt12Offer_meth, bolt12_offer_ref);
+ }
+ case LDKPaymentContext_Bolt12Refund: {
+ LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund;
+ int64_t bolt12_refund_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var);
+ bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentContext_Bolt12Refund_class, LDKPaymentContext_Bolt12Refund_meth, bolt12_refund_ref);
+ }
+ default: abort();
+ }
+}
+static jclass LDKCOption_PaymentContextZ_Some_class = NULL;
+static jmethodID LDKCOption_PaymentContextZ_Some_meth = NULL;
+static jclass LDKCOption_PaymentContextZ_None_class = NULL;
+static jmethodID LDKCOption_PaymentContextZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1PaymentContextZ_init (JNIEnv *env, jclass clz) {
+ LDKCOption_PaymentContextZ_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$Some"));
+ CHECK(LDKCOption_PaymentContextZ_Some_class != NULL);
+ LDKCOption_PaymentContextZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_Some_class, "<init>", "(J)V");
+ CHECK(LDKCOption_PaymentContextZ_Some_meth != NULL);
+ LDKCOption_PaymentContextZ_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$None"));
+ CHECK(LDKCOption_PaymentContextZ_None_class != NULL);
+ LDKCOption_PaymentContextZ_None_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_None_class, "<init>", "()V");
+ CHECK(LDKCOption_PaymentContextZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1PaymentContextZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_PaymentContextZ_Some: {
+ int64_t some_ref = tag_ptr(&obj->some, false);
+ return (*env)->NewObject(env, LDKCOption_PaymentContextZ_Some_class, LDKCOption_PaymentContextZ_Some_meth, some_ref);
+ }
+ case LDKCOption_PaymentContextZ_None: {
+ return (*env)->NewObject(env, LDKCOption_PaymentContextZ_None_class, LDKCOption_PaymentContextZ_None_meth);
+ }
+ default: abort();
+ }
+}
static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){
return owner->a;
}
default: abort();
}
}
-static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return ThirtyTwoBytes_clone(&*owner->contents.result);
+static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
+ LDKChannelId ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data);
- return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner);
+ LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return APIError_clone(&*owner->contents.err);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner);
LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
- *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv);
+ *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){
- return ThirtyTwoBytes_clone(&owner->a);
+static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){
+ LDKChannelId ret = owner->a;
+ ret.is_owned = false;
+ return ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data);
- return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner);
+ LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){
+static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){
return owner->b;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner);
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form);
return ret_arr;
}
-static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) {
- LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) {
+ LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) {
+ LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]);
+ ret.data[i] = ChannelId_clone(&orig->data[i]);
}
return ret;
}
+static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static jclass LDKCOption_StrZ_Some_class = NULL;
static jmethodID LDKCOption_StrZ_Some_meth = NULL;
static jclass LDKCOption_StrZ_None_class = NULL;
default: abort();
}
}
-static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
- CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv);
-}
-
-static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return Bolt12SemanticError_clone(&*owner->contents.err);
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
- jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv));
- return ret_conv;
-}
-
static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result);
CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv);
}
+static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return ThirtyTwoBytes_clone(&*owner->contents.result);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return APIError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+ LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
+ *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static jclass LDKOffersMessage_InvoiceRequest_class = NULL;
static jmethodID LDKOffersMessage_InvoiceRequest_meth = NULL;
static jclass LDKOffersMessage_Invoice_class = NULL;
LDKPendingHTLCRouting_Receive_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$Receive"));
CHECK(LDKPendingHTLCRouting_Receive_class != NULL);
- LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "<init>", "(JJI[B[JZ)V");
+ LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "<init>", "(JJJI[B[JZ)V");
CHECK(LDKPendingHTLCRouting_Receive_meth != NULL);
LDKPendingHTLCRouting_ReceiveKeysend_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$ReceiveKeysend"));
CHECK(LDKPendingHTLCRouting_ReceiveKeysend_class != NULL);
- LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "<init>", "(J[BJI[J)V");
+ LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "<init>", "(J[BJI[JZ)V");
CHECK(LDKPendingHTLCRouting_ReceiveKeysend_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_var);
payment_data_ref = tag_ptr(payment_data_var.inner, false);
int64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false);
+ int64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false);
int32_t incoming_cltv_expiry_conv = obj->receive.incoming_cltv_expiry;
int8_tArray phantom_shared_secret_arr = (*env)->NewByteArray(env, 32);
(*env)->SetByteArrayRegion(env, phantom_shared_secret_arr, 0, 32, obj->receive.phantom_shared_secret.data);
}
(*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0);
jboolean requires_blinded_error_conv = obj->receive.requires_blinded_error;
- return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv);
+ return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, payment_context_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv);
}
case LDKPendingHTLCRouting_ReceiveKeysend: {
LDKFinalOnionHopData payment_data_var = obj->receive_keysend.payment_data;
custom_tlvs_arr_ptr[x] = tag_ptr(custom_tlvs_conv_23_conv, true);
}
(*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0);
- return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr);
+ jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error;
+ return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr, requires_blinded_error_conv);
}
default: abort();
}
}
return ret_conv;
}
-LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
+LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
(*env)->ExceptionDescribe(env);
(*env)->FatalError(env, "A call to release_pending_monitor_events in LDKWatch from rust threw an exception.");
}
- LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
+ LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr;
ret_constr.datalen = (*env)->GetArrayLength(env, ret);
if (ret_constr.datalen > 0)
- ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements");
+ ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements");
else
ret_constr.data = NULL;
int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
- for (size_t x = 0; x < ret_constr.datalen; x++) {
- int64_t ret_conv_49 = ret_vals[x];
- void* ret_conv_49_ptr = untag_ptr(ret_conv_49);
- CHECK_ACCESS(ret_conv_49_ptr);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr);
- FREE(untag_ptr(ret_conv_49));
- ret_constr.data[x] = ret_conv_49_conv;
+ for (size_t f = 0; f < ret_constr.datalen; f++) {
+ int64_t ret_conv_57 = ret_vals[f];
+ void* ret_conv_57_ptr = untag_ptr(ret_conv_57);
+ CHECK_ACCESS(ret_conv_57_ptr);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr);
+ FREE(untag_ptr(ret_conv_57));
+ ret_constr.data[f] = ret_conv_57_conv;
}
(*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
if (get_jenv_res == JNI_EDETACHED) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
- LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
+ LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
int64_tArray ret_arr = NULL;
ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
- *ret_conv_49_conv = ret_var.data[x];
- ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true);
+ for (size_t f = 0; f < ret_var.datalen; f++) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+ *ret_conv_57_conv = ret_var.data[f];
+ ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
}
LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request;
int64_t invoice_request_ref = 0;
- // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest
+ invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var);
invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned);
jobject obj = (*env)->NewLocalRef(env, j_calls->o);
}
LDKUnsignedBolt12Invoice invoice_var = *invoice;
int64_t invoice_ref = 0;
- // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice
+ invoice_var = UnsignedBolt12Invoice_clone(&invoice_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var);
invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned);
jobject obj = (*env)->NewLocalRef(env, j_calls->o);
default: abort();
}
}
-static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){
- return owner->a;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form);
- return ret_arr;
-}
-
-static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){
- return COption_SocketAddressZ_clone(&owner->b);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner);
- LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
- *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) {
- LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]);
- }
- return ret;
-}
static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return CVec_u8Z_clone(&*owner->contents.result);
return ret_conv;
}
+static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKUnsignedInvoiceRequest ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequest ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static jclass LDKCOption_SecretKeyZ_Some_class = NULL;
static jmethodID LDKCOption_SecretKeyZ_Some_meth = NULL;
static jclass LDKCOption_SecretKeyZ_None_class = NULL;
default: abort();
}
}
+static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){
LDKVerifiedInvoiceRequest ret = *owner->contents.result;
ret.is_owned = false;
CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv);
}
+static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequestFields ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) {
LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
}
return ret;
}
+static jclass LDKCOption_ECDSASignatureZ_Some_class = NULL;
+static jmethodID LDKCOption_ECDSASignatureZ_Some_meth = NULL;
+static jclass LDKCOption_ECDSASignatureZ_None_class = NULL;
+static jmethodID LDKCOption_ECDSASignatureZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ECDSASignatureZ_init (JNIEnv *env, jclass clz) {
+ LDKCOption_ECDSASignatureZ_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$Some"));
+ CHECK(LDKCOption_ECDSASignatureZ_Some_class != NULL);
+ LDKCOption_ECDSASignatureZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_Some_class, "<init>", "([B)V");
+ CHECK(LDKCOption_ECDSASignatureZ_Some_meth != NULL);
+ LDKCOption_ECDSASignatureZ_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$None"));
+ CHECK(LDKCOption_ECDSASignatureZ_None_class != NULL);
+ LDKCOption_ECDSASignatureZ_None_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_None_class, "<init>", "()V");
+ CHECK(LDKCOption_ECDSASignatureZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ECDSASignatureZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_ECDSASignatureZ_Some: {
+ int8_tArray some_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, some_arr, 0, 64, obj->some.compact_form);
+ return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_Some_class, LDKCOption_ECDSASignatureZ_Some_meth, some_arr);
+ }
+ case LDKCOption_ECDSASignatureZ_None: {
+ return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_None_class, LDKCOption_ECDSASignatureZ_None_meth);
+ }
+ default: abort();
+ }
+}
static jclass LDKCOption_i64Z_Some_class = NULL;
static jmethodID LDKCOption_i64Z_Some_meth = NULL;
static jclass LDKCOption_i64Z_None_class = NULL;
return ret_ref;
}
-static inline LDKCVec_FutureZ CVec_FutureZ_clone(const LDKCVec_FutureZ *orig) {
- LDKCVec_FutureZ ret = { .data = MALLOC(sizeof(LDKFuture) * orig->datalen, "LDKCVec_FutureZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = Future_clone(&orig->data[i]);
- }
- return ret;
-}
static inline struct LDKOffersMessage CResult_OffersMessageDecodeErrorZ_get_ok(LDKCResult_OffersMessageDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return OffersMessage_clone(&*owner->contents.result);
return ret_ref;
}
-static jclass LDKPaymentPurpose_InvoicePayment_class = NULL;
-static jmethodID LDKPaymentPurpose_InvoicePayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt11InvoicePayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt11InvoicePayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt12OfferPayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt12OfferPayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt12RefundPayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt12RefundPayment_meth = NULL;
static jclass LDKPaymentPurpose_SpontaneousPayment_class = NULL;
static jmethodID LDKPaymentPurpose_SpontaneousPayment_meth = NULL;
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (JNIEnv *env, jclass clz) {
- LDKPaymentPurpose_InvoicePayment_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$InvoicePayment"));
- CHECK(LDKPaymentPurpose_InvoicePayment_class != NULL);
- LDKPaymentPurpose_InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_InvoicePayment_class, "<init>", "(J[B)V");
- CHECK(LDKPaymentPurpose_InvoicePayment_meth != NULL);
+ LDKPaymentPurpose_Bolt11InvoicePayment_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt11InvoicePayment"));
+ CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_class != NULL);
+ LDKPaymentPurpose_Bolt11InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, "<init>", "(J[B)V");
+ CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_meth != NULL);
+ LDKPaymentPurpose_Bolt12OfferPayment_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12OfferPayment"));
+ CHECK(LDKPaymentPurpose_Bolt12OfferPayment_class != NULL);
+ LDKPaymentPurpose_Bolt12OfferPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12OfferPayment_class, "<init>", "(J[BJ)V");
+ CHECK(LDKPaymentPurpose_Bolt12OfferPayment_meth != NULL);
+ LDKPaymentPurpose_Bolt12RefundPayment_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12RefundPayment"));
+ CHECK(LDKPaymentPurpose_Bolt12RefundPayment_class != NULL);
+ LDKPaymentPurpose_Bolt12RefundPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12RefundPayment_class, "<init>", "(J[BJ)V");
+ CHECK(LDKPaymentPurpose_Bolt12RefundPayment_meth != NULL);
LDKPaymentPurpose_SpontaneousPayment_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$SpontaneousPayment"));
CHECK(LDKPaymentPurpose_SpontaneousPayment_class != NULL);
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentPurpose_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr);
switch(obj->tag) {
- case LDKPaymentPurpose_InvoicePayment: {
- int64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false);
+ case LDKPaymentPurpose_Bolt11InvoicePayment: {
+ int64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false);
+ int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt11_invoice_payment.payment_secret.data);
+ return (*env)->NewObject(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, LDKPaymentPurpose_Bolt11InvoicePayment_meth, payment_preimage_ref, payment_secret_arr);
+ }
+ case LDKPaymentPurpose_Bolt12OfferPayment: {
+ int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false);
int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->invoice_payment.payment_secret.data);
- return (*env)->NewObject(env, LDKPaymentPurpose_InvoicePayment_class, LDKPaymentPurpose_InvoicePayment_meth, payment_preimage_ref, payment_secret_arr);
+ (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_offer_payment.payment_secret.data);
+ LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context;
+ int64_t payment_context_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var);
+ payment_context_ref = tag_ptr(payment_context_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12OfferPayment_class, LDKPaymentPurpose_Bolt12OfferPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref);
+ }
+ case LDKPaymentPurpose_Bolt12RefundPayment: {
+ int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false);
+ int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_refund_payment.payment_secret.data);
+ LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context;
+ int64_t payment_context_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var);
+ payment_context_ref = tag_ptr(payment_context_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12RefundPayment_class, LDKPaymentPurpose_Bolt12RefundPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref);
}
case LDKPaymentPurpose_SpontaneousPayment: {
int8_tArray spontaneous_payment_arr = (*env)->NewByteArray(env, 32);
return ret_ref;
}
-static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL;
-static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL;
-static jclass LDKClosureReason_HolderForceClosed_class = NULL;
-static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL;
-static jclass LDKClosureReason_CooperativeClosure_class = NULL;
-static jmethodID LDKClosureReason_CooperativeClosure_meth = NULL;
-static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL;
-static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL;
-static jclass LDKClosureReason_FundingTimedOut_class = NULL;
-static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL;
-static jclass LDKClosureReason_ProcessingError_class = NULL;
-static jmethodID LDKClosureReason_ProcessingError_meth = NULL;
-static jclass LDKClosureReason_DisconnectedPeer_class = NULL;
-static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL;
-static jclass LDKClosureReason_OutdatedChannelManager_class = NULL;
-static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL;
-static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL;
-static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL;
-static jclass LDKClosureReason_FundingBatchClosure_class = NULL;
-static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) {
- LDKClosureReason_CounterpartyForceClosed_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed"));
- CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL);
- LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "<init>", "(J)V");
- CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL);
- LDKClosureReason_HolderForceClosed_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed"));
- CHECK(LDKClosureReason_HolderForceClosed_class != NULL);
- LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "<init>", "()V");
- CHECK(LDKClosureReason_HolderForceClosed_meth != NULL);
- LDKClosureReason_CooperativeClosure_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CooperativeClosure"));
- CHECK(LDKClosureReason_CooperativeClosure_class != NULL);
- LDKClosureReason_CooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CooperativeClosure_class, "<init>", "()V");
- CHECK(LDKClosureReason_CooperativeClosure_meth != NULL);
- LDKClosureReason_CommitmentTxConfirmed_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed"));
- CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL);
- LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "<init>", "()V");
- CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL);
- LDKClosureReason_FundingTimedOut_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut"));
- CHECK(LDKClosureReason_FundingTimedOut_class != NULL);
- LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "<init>", "()V");
- CHECK(LDKClosureReason_FundingTimedOut_meth != NULL);
- LDKClosureReason_ProcessingError_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError"));
- CHECK(LDKClosureReason_ProcessingError_class != NULL);
- LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "<init>", "(Ljava/lang/String;)V");
- CHECK(LDKClosureReason_ProcessingError_meth != NULL);
- LDKClosureReason_DisconnectedPeer_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer"));
- CHECK(LDKClosureReason_DisconnectedPeer_class != NULL);
- LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "<init>", "()V");
- CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL);
- LDKClosureReason_OutdatedChannelManager_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager"));
- CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL);
- LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "<init>", "()V");
- CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL);
- LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel"));
- CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL);
- LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "<init>", "()V");
- CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL);
- LDKClosureReason_FundingBatchClosure_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure"));
- CHECK(LDKClosureReason_FundingBatchClosure_class != NULL);
- LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "<init>", "()V");
- CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL);
-}
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKClosureReason_CounterpartyForceClosed: {
- LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
- int64_t peer_msg_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var);
- peer_msg_ref = tag_ptr(peer_msg_var.inner, false);
- return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref);
- }
- case LDKClosureReason_HolderForceClosed: {
- return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth);
- }
- case LDKClosureReason_CooperativeClosure: {
- return (*env)->NewObject(env, LDKClosureReason_CooperativeClosure_class, LDKClosureReason_CooperativeClosure_meth);
- }
- case LDKClosureReason_CommitmentTxConfirmed: {
- return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth);
- }
- case LDKClosureReason_FundingTimedOut: {
- return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth);
- }
- case LDKClosureReason_ProcessingError: {
- LDKStr err_str = obj->processing_error.err;
- jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
- return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv);
- }
- case LDKClosureReason_DisconnectedPeer: {
- return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth);
- }
- case LDKClosureReason_OutdatedChannelManager: {
- return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth);
- }
- case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: {
- return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth);
- }
- case LDKClosureReason_FundingBatchClosure: {
- return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth);
- }
- default: abort();
- }
-}
static jclass LDKCOption_ClosureReasonZ_Some_class = NULL;
static jmethodID LDKCOption_ClosureReasonZ_Some_meth = NULL;
static jclass LDKCOption_ClosureReasonZ_None_class = NULL;
static jmethodID LDKHTLCDestination_UnknownNextHop_meth = NULL;
static jclass LDKHTLCDestination_InvalidForward_class = NULL;
static jmethodID LDKHTLCDestination_InvalidForward_meth = NULL;
+static jclass LDKHTLCDestination_InvalidOnion_class = NULL;
+static jmethodID LDKHTLCDestination_InvalidOnion_meth = NULL;
static jclass LDKHTLCDestination_FailedPayment_class = NULL;
static jmethodID LDKHTLCDestination_FailedPayment_meth = NULL;
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init (JNIEnv *env, jclass clz) {
LDKHTLCDestination_NextHopChannel_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$NextHopChannel"));
CHECK(LDKHTLCDestination_NextHopChannel_class != NULL);
- LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "<init>", "([B[B)V");
+ LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "<init>", "([BJ)V");
CHECK(LDKHTLCDestination_NextHopChannel_meth != NULL);
LDKHTLCDestination_UnknownNextHop_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$UnknownNextHop"));
CHECK(LDKHTLCDestination_InvalidForward_class != NULL);
LDKHTLCDestination_InvalidForward_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidForward_class, "<init>", "(J)V");
CHECK(LDKHTLCDestination_InvalidForward_meth != NULL);
+ LDKHTLCDestination_InvalidOnion_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$InvalidOnion"));
+ CHECK(LDKHTLCDestination_InvalidOnion_class != NULL);
+ LDKHTLCDestination_InvalidOnion_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidOnion_class, "<init>", "()V");
+ CHECK(LDKHTLCDestination_InvalidOnion_meth != NULL);
LDKHTLCDestination_FailedPayment_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$FailedPayment"));
CHECK(LDKHTLCDestination_FailedPayment_class != NULL);
case LDKHTLCDestination_NextHopChannel: {
int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
(*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->next_hop_channel.node_id.compressed_form);
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->next_hop_channel.channel_id.data);
- return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_arr);
+ LDKChannelId channel_id_var = obj->next_hop_channel.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
+ return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_ref);
}
case LDKHTLCDestination_UnknownNextHop: {
int64_t requested_forward_scid_conv = obj->unknown_next_hop.requested_forward_scid;
int64_t requested_forward_scid_conv = obj->invalid_forward.requested_forward_scid;
return (*env)->NewObject(env, LDKHTLCDestination_InvalidForward_class, LDKHTLCDestination_InvalidForward_meth, requested_forward_scid_conv);
}
+ case LDKHTLCDestination_InvalidOnion: {
+ return (*env)->NewObject(env, LDKHTLCDestination_InvalidOnion_class, LDKHTLCDestination_InvalidOnion_meth);
+ }
case LDKHTLCDestination_FailedPayment: {
int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32);
(*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->failed_payment.payment_hash.data);
LDKBumpTransactionEvent_ChannelClose_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$ChannelClose"));
CHECK(LDKBumpTransactionEvent_ChannelClose_class != NULL);
- LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "<init>", "([BI[BJJ[J)V");
+ LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "<init>", "(J[B[BI[BJJ[J)V");
CHECK(LDKBumpTransactionEvent_ChannelClose_meth != NULL);
LDKBumpTransactionEvent_HTLCResolution_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$HTLCResolution"));
CHECK(LDKBumpTransactionEvent_HTLCResolution_class != NULL);
- LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "<init>", "([BI[JI)V");
+ LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "<init>", "(J[B[BI[JI)V");
CHECK(LDKBumpTransactionEvent_HTLCResolution_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
switch(obj->tag) {
case LDKBumpTransactionEvent_ChannelClose: {
+ LDKChannelId channel_id_var = obj->channel_close.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
+ int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_close.counterparty_node_id.compressed_form);
int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32);
(*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->channel_close.claim_id.data);
int32_t package_target_feerate_sat_per_1000_weight_conv = obj->channel_close.package_target_feerate_sat_per_1000_weight;
pending_htlcs_arr_ptr[y] = pending_htlcs_conv_24_ref;
}
(*env)->ReleasePrimitiveArrayCritical(env, pending_htlcs_arr, pending_htlcs_arr_ptr, 0);
- return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr);
+ return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr);
}
case LDKBumpTransactionEvent_HTLCResolution: {
+ LDKChannelId channel_id_var = obj->htlc_resolution.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
+ int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->htlc_resolution.counterparty_node_id.compressed_form);
int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32);
(*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->htlc_resolution.claim_id.data);
int32_t target_feerate_sat_per_1000_weight_conv = obj->htlc_resolution.target_feerate_sat_per_1000_weight;
}
(*env)->ReleasePrimitiveArrayCritical(env, htlc_descriptors_arr, htlc_descriptors_arr_ptr, 0);
int32_t tx_lock_time_conv = obj->htlc_resolution.tx_lock_time;
- return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv);
+ return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv);
}
default: abort();
}
LDKEvent_FundingGenerationReady_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$FundingGenerationReady"));
CHECK(LDKEvent_FundingGenerationReady_class != NULL);
- LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "([B[BJ[B[B)V");
+ LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "(J[BJ[B[B)V");
CHECK(LDKEvent_FundingGenerationReady_meth != NULL);
LDKEvent_PaymentClaimable_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentClaimable"));
LDKEvent_PaymentForwarded_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentForwarded"));
CHECK(LDKEvent_PaymentForwarded_class != NULL);
- LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "<init>", "(JJJZJ)V");
+ LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "<init>", "(JJJJJJZJ)V");
CHECK(LDKEvent_PaymentForwarded_meth != NULL);
LDKEvent_ChannelPending_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelPending"));
CHECK(LDKEvent_ChannelPending_class != NULL);
- LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "<init>", "([B[BJ[BJ)V");
+ LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "<init>", "(J[BJ[BJJ)V");
CHECK(LDKEvent_ChannelPending_meth != NULL);
LDKEvent_ChannelReady_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelReady"));
CHECK(LDKEvent_ChannelReady_class != NULL);
- LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "<init>", "([B[B[BJ)V");
+ LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "<init>", "(J[B[BJ)V");
CHECK(LDKEvent_ChannelReady_meth != NULL);
LDKEvent_ChannelClosed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelClosed"));
CHECK(LDKEvent_ChannelClosed_class != NULL);
- LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "<init>", "([B[BJ[BJJ)V");
+ LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "<init>", "(J[BJ[BJJ)V");
CHECK(LDKEvent_ChannelClosed_meth != NULL);
LDKEvent_DiscardFunding_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$DiscardFunding"));
CHECK(LDKEvent_DiscardFunding_class != NULL);
- LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "<init>", "([B[B)V");
+ LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "<init>", "(J[B)V");
CHECK(LDKEvent_DiscardFunding_meth != NULL);
LDKEvent_OpenChannelRequest_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$OpenChannelRequest"));
CHECK(LDKEvent_OpenChannelRequest_class != NULL);
- LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "<init>", "([B[BJJJ)V");
+ LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "<init>", "(J[BJJJ)V");
CHECK(LDKEvent_OpenChannelRequest_meth != NULL);
LDKEvent_HTLCHandlingFailed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$HTLCHandlingFailed"));
CHECK(LDKEvent_HTLCHandlingFailed_class != NULL);
- LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "<init>", "([BJ)V");
+ LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "<init>", "(JJ)V");
CHECK(LDKEvent_HTLCHandlingFailed_meth != NULL);
LDKEvent_BumpTransaction_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$BumpTransaction"));
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
switch(obj->tag) {
case LDKEvent_FundingGenerationReady: {
- int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->funding_generation_ready.temporary_channel_id.data);
+ LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id;
+ int64_t temporary_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var);
+ temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false);
int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
(*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->funding_generation_ready.counterparty_node_id.compressed_form);
int64_t channel_value_satoshis_conv = obj->funding_generation_ready.channel_value_satoshis;
(*env)->SetByteArrayRegion(env, output_script_arr, 0, output_script_var.datalen, output_script_var.data);
int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->funding_generation_ready.user_channel_id.le_bytes);
- return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_arr, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr);
+ return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_ref, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr);
}
case LDKEvent_PaymentClaimable: {
int8_tArray receiver_node_id_arr = (*env)->NewByteArray(env, 33);
int64_t amount_msat_conv = obj->payment_claimable.amount_msat;
int64_t counterparty_skimmed_fee_msat_conv = obj->payment_claimable.counterparty_skimmed_fee_msat;
int64_t purpose_ref = tag_ptr(&obj->payment_claimable.purpose, false);
- int64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false);
+ LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id;
+ int64_t via_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var);
+ via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false);
int64_t via_user_channel_id_ref = tag_ptr(&obj->payment_claimable.via_user_channel_id, false);
int64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false);
return (*env)->NewObject(env, LDKEvent_PaymentClaimable_class, LDKEvent_PaymentClaimable_meth, receiver_node_id_arr, payment_hash_arr, onion_fields_ref, amount_msat_conv, counterparty_skimmed_fee_msat_conv, purpose_ref, via_channel_id_ref, via_user_channel_id_ref, claim_deadline_ref);
outputs_arr_ptr[b] = outputs_conv_27_ref;
}
(*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
- int64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false);
+ LDKChannelId channel_id_var = obj->spendable_outputs.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth, outputs_arr, channel_id_ref);
}
case LDKEvent_PaymentForwarded: {
- int64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false);
- int64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false);
- int64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false);
+ LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id;
+ int64_t prev_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var);
+ prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false);
+ LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id;
+ int64_t next_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var);
+ next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false);
+ int64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false);
+ int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false);
+ int64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false);
+ int64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false);
jboolean claim_from_onchain_tx_conv = obj->payment_forwarded.claim_from_onchain_tx;
int64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false);
- return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, fee_earned_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref);
+ return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, prev_user_channel_id_ref, next_user_channel_id_ref, total_fee_earned_msat_ref, skimmed_fee_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref);
}
case LDKEvent_ChannelPending: {
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_pending.channel_id.data);
+ LDKChannelId channel_id_var = obj->channel_pending.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_pending.user_channel_id.le_bytes);
- int64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false);
+ LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id;
+ int64_t former_temporary_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var);
+ former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false);
int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
(*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_pending.counterparty_node_id.compressed_form);
LDKOutPoint funding_txo_var = obj->channel_pending.funding_txo;
int64_t funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
- return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_arr, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref);
+ LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type;
+ int64_t channel_type_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
+ channel_type_ref = tag_ptr(channel_type_var.inner, false);
+ return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_ref, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref, channel_type_ref);
}
case LDKEvent_ChannelReady: {
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_ready.channel_id.data);
+ LDKChannelId channel_id_var = obj->channel_ready.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_ready.user_channel_id.le_bytes);
int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
int64_t channel_type_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
channel_type_ref = tag_ptr(channel_type_var.inner, false);
- return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_arr, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref);
+ return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_ref, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref);
}
case LDKEvent_ChannelClosed: {
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_closed.channel_id.data);
+ LDKChannelId channel_id_var = obj->channel_closed.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_closed.user_channel_id.le_bytes);
int64_t reason_ref = tag_ptr(&obj->channel_closed.reason, false);
int64_t channel_funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_var);
channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false);
- return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_arr, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref);
+ return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_ref, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref);
}
case LDKEvent_DiscardFunding: {
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->discard_funding.channel_id.data);
+ LDKChannelId channel_id_var = obj->discard_funding.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
LDKTransaction transaction_var = obj->discard_funding.transaction;
int8_tArray transaction_arr = (*env)->NewByteArray(env, transaction_var.datalen);
(*env)->SetByteArrayRegion(env, transaction_arr, 0, transaction_var.datalen, transaction_var.data);
- return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_arr, transaction_arr);
+ return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_ref, transaction_arr);
}
case LDKEvent_OpenChannelRequest: {
- int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->open_channel_request.temporary_channel_id.data);
+ LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id;
+ int64_t temporary_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var);
+ temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false);
int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
(*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->open_channel_request.counterparty_node_id.compressed_form);
int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis;
int64_t channel_type_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
channel_type_ref = tag_ptr(channel_type_var.inner, false);
- return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_arr, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref);
+ return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_ref, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref);
}
case LDKEvent_HTLCHandlingFailed: {
- int8_tArray prev_channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, prev_channel_id_arr, 0, 32, obj->htlc_handling_failed.prev_channel_id.data);
+ LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id;
+ int64_t prev_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var);
+ prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false);
int64_t failed_next_destination_ref = tag_ptr(&obj->htlc_handling_failed.failed_next_destination, false);
- return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_arr, failed_next_destination_ref);
+ return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_ref, failed_next_destination_ref);
}
case LDKEvent_BumpTransaction: {
int64_t bump_transaction_ref = tag_ptr(&obj->bump_transaction, false);
return ret_ref;
}
+static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){
+ LDKChannelId ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner);
+ LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){
return ThirtyTwoBytes_clone(&owner->a);
}
return ret_ref;
}
-static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
- return ThirtyTwoBytes_clone(&owner->a);
+static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return PaymentContext_clone(&*owner->contents.result);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data);
- return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
- LDKRecipientOnionFields ret = owner->b;
+static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
+ LDKUnknownPaymentContext ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
- LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner);
+ LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
- LDKRouteParameters ret = owner->c;
+static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){
+ LDKBolt12OfferContext ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
- LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner);
+ LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result);
+static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
- LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
- *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv);
- return tag_ptr(ret_conv, true);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){
+ LDKBolt12RefundContext ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner);
+ LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return *owner->contents.err;
+ return DecodeError_clone(&*owner->contents.err);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
- CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){
return ret_conv;
}
+static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+ return ThirtyTwoBytes_clone(&owner->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+ LDKRecipientOnionFields ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+ LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+ LDKRouteParameters ret = owner->c;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+ LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
+ *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv);
+}
+
static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){
return owner->a;
}
static jmethodID LDKSendError_BufferFull_meth = NULL;
static jclass LDKSendError_GetNodeIdFailed_class = NULL;
static jmethodID LDKSendError_GetNodeIdFailed_meth = NULL;
+static jclass LDKSendError_UnresolvedIntroductionNode_class = NULL;
+static jmethodID LDKSendError_UnresolvedIntroductionNode_meth = NULL;
static jclass LDKSendError_BlindedPathAdvanceFailed_class = NULL;
static jmethodID LDKSendError_BlindedPathAdvanceFailed_meth = NULL;
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv *env, jclass clz) {
CHECK(LDKSendError_GetNodeIdFailed_class != NULL);
LDKSendError_GetNodeIdFailed_meth = (*env)->GetMethodID(env, LDKSendError_GetNodeIdFailed_class, "<init>", "()V");
CHECK(LDKSendError_GetNodeIdFailed_meth != NULL);
+ LDKSendError_UnresolvedIntroductionNode_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$UnresolvedIntroductionNode"));
+ CHECK(LDKSendError_UnresolvedIntroductionNode_class != NULL);
+ LDKSendError_UnresolvedIntroductionNode_meth = (*env)->GetMethodID(env, LDKSendError_UnresolvedIntroductionNode_class, "<init>", "()V");
+ CHECK(LDKSendError_UnresolvedIntroductionNode_meth != NULL);
LDKSendError_BlindedPathAdvanceFailed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$BlindedPathAdvanceFailed"));
CHECK(LDKSendError_BlindedPathAdvanceFailed_class != NULL);
case LDKSendError_GetNodeIdFailed: {
return (*env)->NewObject(env, LDKSendError_GetNodeIdFailed_class, LDKSendError_GetNodeIdFailed_meth);
}
+ case LDKSendError_UnresolvedIntroductionNode: {
+ return (*env)->NewObject(env, LDKSendError_UnresolvedIntroductionNode_class, LDKSendError_UnresolvedIntroductionNode_meth);
+ }
case LDKSendError_BlindedPathAdvanceFailed: {
return (*env)->NewObject(env, LDKSendError_BlindedPathAdvanceFailed_class, LDKSendError_BlindedPathAdvanceFailed_meth);
}
return ret_ref;
}
+static jclass LDKNextMessageHop_NodeId_class = NULL;
+static jmethodID LDKNextMessageHop_NodeId_meth = NULL;
+static jclass LDKNextMessageHop_ShortChannelId_class = NULL;
+static jmethodID LDKNextMessageHop_ShortChannelId_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNextMessageHop_init (JNIEnv *env, jclass clz) {
+ LDKNextMessageHop_NodeId_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$NodeId"));
+ CHECK(LDKNextMessageHop_NodeId_class != NULL);
+ LDKNextMessageHop_NodeId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_NodeId_class, "<init>", "([B)V");
+ CHECK(LDKNextMessageHop_NodeId_meth != NULL);
+ LDKNextMessageHop_ShortChannelId_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$ShortChannelId"));
+ CHECK(LDKNextMessageHop_ShortChannelId_class != NULL);
+ LDKNextMessageHop_ShortChannelId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_ShortChannelId_class, "<init>", "(J)V");
+ CHECK(LDKNextMessageHop_ShortChannelId_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNextMessageHop_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKNextMessageHop_NodeId: {
+ int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form);
+ return (*env)->NewObject(env, LDKNextMessageHop_NodeId_class, LDKNextMessageHop_NodeId_meth, node_id_arr);
+ }
+ case LDKNextMessageHop_ShortChannelId: {
+ int64_t short_channel_id_conv = obj->short_channel_id;
+ return (*env)->NewObject(env, LDKNextMessageHop_ShortChannelId_class, LDKNextMessageHop_ShortChannelId_meth, short_channel_id_conv);
+ }
+ default: abort();
+ }
+}
static jclass LDKParsedOnionMessageContents_Offers_class = NULL;
static jmethodID LDKParsedOnionMessageContents_Offers_meth = NULL;
static jclass LDKParsedOnionMessageContents_Custom_class = NULL;
LDKPeeledOnion_Forward_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Forward"));
CHECK(LDKPeeledOnion_Forward_class != NULL);
- LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "<init>", "([BJ)V");
+ LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "<init>", "(JJ)V");
CHECK(LDKPeeledOnion_Forward_meth != NULL);
LDKPeeledOnion_Receive_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Receive"));
LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
switch(obj->tag) {
case LDKPeeledOnion_Forward: {
- int8_tArray _0_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, _0_arr, 0, 33, obj->forward._0.compressed_form);
+ int64_t _0_ref = tag_ptr(&obj->forward._0, false);
LDKOnionMessage _1_var = obj->forward._1;
int64_t _1_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(_1_var);
_1_ref = tag_ptr(_1_var.inner, false);
- return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_arr, _1_ref);
+ return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_ref, _1_ref);
}
case LDKPeeledOnion_Receive: {
int64_t _0_ref = tag_ptr(&obj->receive._0, false);
return ret_ref;
}
-static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
- LDKDelayedPaymentBasepoint ret = *owner->contents.result;
+static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){
+ LDKTrackedSpendableOutput ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner);
+ LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return DecodeError_clone(&*owner->contents.err);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner);
LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
- LDKDelayedPaymentKey ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
- LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
- LDKHtlcBasepoint ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
- LDKHtlcKey ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
- LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
- LDKRevocationBasepoint ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+ *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static jclass LDKOutputSpendStatus_PendingInitialBroadcast_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingInitialBroadcast_meth = NULL;
+static jclass LDKOutputSpendStatus_PendingFirstConfirmation_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingFirstConfirmation_meth = NULL;
+static jclass LDKOutputSpendStatus_PendingThresholdConfirmations_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingThresholdConfirmations_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKOutputSpendStatus_init (JNIEnv *env, jclass clz) {
+ LDKOutputSpendStatus_PendingInitialBroadcast_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingInitialBroadcast"));
+ CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_class != NULL);
+ LDKOutputSpendStatus_PendingInitialBroadcast_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, "<init>", "(J)V");
+ CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_meth != NULL);
+ LDKOutputSpendStatus_PendingFirstConfirmation_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingFirstConfirmation"));
+ CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_class != NULL);
+ LDKOutputSpendStatus_PendingFirstConfirmation_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, "<init>", "([BI[B)V");
+ CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_meth != NULL);
+ LDKOutputSpendStatus_PendingThresholdConfirmations_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingThresholdConfirmations"));
+ CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_class != NULL);
+ LDKOutputSpendStatus_PendingThresholdConfirmations_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, "<init>", "([BI[BI[B)V");
+ CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKOutputSpendStatus_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKOutputSpendStatus_PendingInitialBroadcast: {
+ int64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false);
+ return (*env)->NewObject(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, LDKOutputSpendStatus_PendingInitialBroadcast_meth, delayed_until_height_ref);
+ }
+ case LDKOutputSpendStatus_PendingFirstConfirmation: {
+ int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_first_confirmation.first_broadcast_hash.data);
+ int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height;
+ LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx;
+ int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen);
+ (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data);
+ return (*env)->NewObject(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, LDKOutputSpendStatus_PendingFirstConfirmation_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr);
+ }
+ case LDKOutputSpendStatus_PendingThresholdConfirmations: {
+ int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_threshold_confirmations.first_broadcast_hash.data);
+ int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height;
+ LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx;
+ int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen);
+ (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data);
+ int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height;
+ int8_tArray confirmation_hash_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, confirmation_hash_arr, 0, 32, obj->pending_threshold_confirmations.confirmation_hash.data);
+ return (*env)->NewObject(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, LDKOutputSpendStatus_PendingThresholdConfirmations_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr, confirmation_height_conv, confirmation_hash_arr);
+ }
+ default: abort();
+ }
}
-
-static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
+static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return OutputSpendStatus_clone(&*owner->contents.result);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner);
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
- LDKRevocationKey ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
- LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return DecodeError_clone(&*owner->contents.err);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner);
LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv);
+ *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
default: abort();
}
}
-static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
- LDKLockedChannelMonitor ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
- LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
- CResult_LockedChannelMonitorNoneZ_get_err(owner_conv);
-}
-
-static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) {
- LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) {
+ LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = OutPoint_clone(&orig->data[i]);
+ ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]);
}
return ret;
}
-static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) {
- LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = MonitorUpdateId_clone(&orig->data[i]);
+typedef struct LDKChangeDestinationSource_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID get_change_destination_script_meth;
+} LDKChangeDestinationSource_JCalls;
+static void LDKChangeDestinationSource_JCalls_free(void* this_arg) {
+ LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
}
- return ret;
}
-static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
- LDKOutPoint ret = owner->a;
- ret.is_owned = false;
- return ret;
+LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) {
+ LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->get_change_destination_script_meth);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to get_change_destination_script in LDKChangeDestinationSource from rust threw an exception.");
+ }
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
- LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) {
+ LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
}
+static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->get_change_destination_script_meth = (*env)->GetMethodID(env, c, "get_change_destination_script", "()J");
+ CHECK(calls->get_change_destination_script_meth != NULL);
-static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
- return CVec_MonitorUpdateIdZ_clone(&owner->b);
+ LDKChangeDestinationSource ret = {
+ .this_arg = (void*) calls,
+ .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall,
+ .free = LDKChangeDestinationSource_JCalls_free,
+ };
+ return ret;
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
- LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv);
- int64_tArray ret_arr = NULL;
- ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
- int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t r = 0; r < ret_var.datalen; r++) {
- LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r];
- int64_t ret_conv_17_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var);
- ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned);
- ret_arr_ptr[r] = ret_conv_17_ref;
- }
- (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
- FREE(ret_var.data);
- return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChangeDestinationSource_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource");
+ *res_ptr = LDKChangeDestinationSource_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
}
-
-static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) {
- LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]);
- }
- return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1get_1change_1destination_1script(JNIEnv *env, jclass clz, int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr;
+ LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ");
+ *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg);
+ return tag_ptr(ret_conv, true);
}
+
typedef struct LDKKVStore_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
return tag_ptr(ret_conv, true);
}
+typedef struct LDKOutputSpender_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID spend_spendable_outputs_meth;
+} LDKOutputSpender_JCalls;
+static void LDKOutputSpender_JCalls_free(void* this_arg) {
+ LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) {
+ LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors;
+ int64_tArray descriptors_arr = NULL;
+ descriptors_arr = (*env)->NewLongArray(env, descriptors_var.datalen);
+ int64_t *descriptors_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, descriptors_arr, NULL);
+ for (size_t b = 0; b < descriptors_var.datalen; b++) {
+ LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+ *descriptors_conv_27_copy = descriptors_var.data[b];
+ int64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true);
+ descriptors_arr_ptr[b] = descriptors_conv_27_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, descriptors_arr, descriptors_arr_ptr, 0);
+ FREE(descriptors_var.data);
+ LDKCVec_TxOutZ outputs_var = outputs;
+ int64_tArray outputs_arr = NULL;
+ outputs_arr = (*env)->NewLongArray(env, outputs_var.datalen);
+ int64_t *outputs_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, outputs_arr, NULL);
+ for (size_t h = 0; h < outputs_var.datalen; h++) {
+ LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *outputs_conv_7_ref = outputs_var.data[h];
+ outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true);
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
+ FREE(outputs_var.data);
+ LDKCVec_u8Z change_destination_script_var = change_destination_script;
+ int8_tArray change_destination_script_arr = (*env)->NewByteArray(env, change_destination_script_var.datalen);
+ (*env)->SetByteArrayRegion(env, change_destination_script_arr, 0, change_destination_script_var.datalen, change_destination_script_var.data);
+ CVec_u8Z_free(change_destination_script_var);
+ int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight;
+ LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *locktime_copy = locktime;
+ int64_t locktime_ref = tag_ptr(locktime_copy, true);
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->spend_spendable_outputs_meth, descriptors_arr, outputs_arr, change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to spend_spendable_outputs in LDKOutputSpender from rust threw an exception.");
+ }
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_conv;
+}
+static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) {
+ LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKOutputSpender LDKOutputSpender_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->spend_spendable_outputs_meth = (*env)->GetMethodID(env, c, "spend_spendable_outputs", "([J[J[BIJ)J");
+ CHECK(calls->spend_spendable_outputs_meth != NULL);
+
+ LDKOutputSpender ret = {
+ .this_arg = (void*) calls,
+ .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall,
+ .free = LDKOutputSpender_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKOutputSpender_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+ *res_ptr = LDKOutputSpender_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpender_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr;
+ LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
+ descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
+ if (descriptors_constr.datalen > 0)
+ descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+ else
+ descriptors_constr.data = NULL;
+ int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
+ for (size_t b = 0; b < descriptors_constr.datalen; b++) {
+ int64_t descriptors_conv_27 = descriptors_vals[b];
+ void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
+ CHECK_ACCESS(descriptors_conv_27_ptr);
+ LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
+ descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
+ descriptors_constr.data[b] = descriptors_conv_27_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
+ LDKCVec_TxOutZ outputs_constr;
+ outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
+ if (outputs_constr.datalen > 0)
+ outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
+ else
+ outputs_constr.data = NULL;
+ int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
+ for (size_t h = 0; h < outputs_constr.datalen; h++) {
+ int64_t outputs_conv_7 = outputs_vals[h];
+ void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
+ CHECK_ACCESS(outputs_conv_7_ptr);
+ LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
+ outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
+ outputs_constr.data[h] = outputs_conv_7_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
+ LDKCVec_u8Z change_destination_script_ref;
+ change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
+ change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
+ void* locktime_ptr = untag_ptr(locktime);
+ CHECK_ACCESS(locktime_ptr);
+ LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
+ locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){
+ LDKOutputSweeper ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner);
+ LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){
+ LDKBestBlock ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner);
+ LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){
+ LDKOutputSweeper ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner);
+ LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return &*owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner);
+ int64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false);
+ return ret_ret;
+}
+
+static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+ LDKDelayedPaymentBasepoint ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+ LDKDelayedPaymentKey ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+ LDKHtlcBasepoint ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+ LDKHtlcKey ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+ LDKRevocationBasepoint ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+ LDKRevocationKey ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+ LDKLockedChannelMonitor ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
+ LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
+ CResult_LockedChannelMonitorNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){
+ LDKOutPoint ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner);
+ LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){
+ LDKChannelId ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner);
+ LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) {
+ LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) {
+ LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = MonitorUpdateId_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
+ LDKOutPoint ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
+ LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
+ return CVec_MonitorUpdateIdZ_clone(&owner->b);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
+ LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t r = 0; r < ret_var.datalen; r++) {
+ LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r];
+ int64_t ret_conv_17_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var);
+ ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned);
+ ret_arr_ptr[r] = ret_conv_17_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) {
+ LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
typedef struct LDKPersister_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
jweak o;
jmethodID persist_new_channel_meth;
jmethodID update_persisted_channel_meth;
+ jmethodID archive_persisted_channel_meth;
} LDKPersist_JCalls;
static void LDKPersist_JCalls_free(void* this_arg) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
FREE(j_calls);
}
}
-LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
} else {
DO_ASSERT(get_jenv_res == JNI_OK);
}
- LDKOutPoint channel_id_var = channel_id;
- int64_t channel_id_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
- channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned);
+ LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+ int64_t channel_funding_outpoint_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+ channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
LDKChannelMonitor data_var = *data;
int64_t data_ref = 0;
data_var = ChannelMonitor_clone(&data_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
jobject obj = (*env)->NewLocalRef(env, j_calls->o);
CHECK(obj != NULL);
- jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref);
+ jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_funding_outpoint_ref, data_ref, update_id_ref);
if (UNLIKELY((*env)->ExceptionCheck(env))) {
(*env)->ExceptionDescribe(env);
(*env)->FatalError(env, "A call to persist_new_channel in LDKPersist from rust threw an exception.");
}
return ret_conv;
}
-LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
} else {
DO_ASSERT(get_jenv_res == JNI_OK);
}
- LDKOutPoint channel_id_var = channel_id;
- int64_t channel_id_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
- channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned);
+ LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+ int64_t channel_funding_outpoint_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+ channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
LDKChannelMonitorUpdate update_var = update;
int64_t update_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
jobject obj = (*env)->NewLocalRef(env, j_calls->o);
CHECK(obj != NULL);
- jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref);
+ jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref);
if (UNLIKELY((*env)->ExceptionCheck(env))) {
(*env)->ExceptionDescribe(env);
(*env)->FatalError(env, "A call to update_persisted_channel in LDKPersist from rust threw an exception.");
}
return ret_conv;
}
+void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) {
+ LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+ int64_t channel_funding_outpoint_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+ channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ (*env)->CallVoidMethod(env, obj, j_calls->archive_persisted_channel_meth, channel_funding_outpoint_ref);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to archive_persisted_channel in LDKPersist from rust threw an exception.");
+ }
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+}
static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
CHECK(calls->persist_new_channel_meth != NULL);
calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
CHECK(calls->update_persisted_channel_meth != NULL);
+ calls->archive_persisted_channel_meth = (*env)->GetMethodID(env, c, "archive_persisted_channel", "(J)V");
+ CHECK(calls->archive_persisted_channel_meth != NULL);
LDKPersist ret = {
.this_arg = (void*) calls,
.persist_new_channel = persist_new_channel_LDKPersist_jcall,
.update_persisted_channel = update_persisted_channel_LDKPersist_jcall,
+ .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall,
.free = LDKPersist_JCalls_free,
};
return ret;
*res_ptr = LDKPersist_init(env, clz, o);
return tag_ptr(res_ptr, true);
}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t data, int64_t update_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
- LDKOutPoint channel_id_conv;
- channel_id_conv.inner = untag_ptr(channel_id);
- channel_id_conv.is_owned = ptr_is_owned(channel_id);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
- channel_id_conv = OutPoint_clone(&channel_id_conv);
+ LDKOutPoint channel_funding_outpoint_conv;
+ channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+ channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+ channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
LDKChannelMonitor data_conv;
data_conv.inner = untag_ptr(data);
data_conv.is_owned = ptr_is_owned(data);
update_id_conv.is_owned = ptr_is_owned(update_id);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
update_id_conv = MonitorUpdateId_clone(&update_id_conv);
- jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+ jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv));
return ret_conv;
}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t update, int64_t data, int64_t update_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
- LDKOutPoint channel_id_conv;
- channel_id_conv.inner = untag_ptr(channel_id);
- channel_id_conv.is_owned = ptr_is_owned(channel_id);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
- channel_id_conv = OutPoint_clone(&channel_id_conv);
+ LDKOutPoint channel_funding_outpoint_conv;
+ channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+ channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+ channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
LDKChannelMonitorUpdate update_conv;
update_conv.inner = untag_ptr(update);
update_conv.is_owned = ptr_is_owned(update);
update_id_conv.is_owned = ptr_is_owned(update_id);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
update_id_conv = MonitorUpdateId_clone(&update_id_conv);
- jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv));
+ jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv));
return ret_conv;
}
-typedef struct LDKFutureCallback_JCalls {
- atomic_size_t refcnt;
- JavaVM *vm;
- jweak o;
- jmethodID call_meth;
-} LDKFutureCallback_JCalls;
-static void LDKFutureCallback_JCalls_free(void* this_arg) {
- LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
- if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- (*env)->DeleteWeakGlobalRef(env, j_calls->o);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
- FREE(j_calls);
- }
-}
-void call_LDKFutureCallback_jcall(const void* this_arg) {
- LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- jobject obj = (*env)->NewLocalRef(env, j_calls->o);
- CHECK(obj != NULL);
- (*env)->CallVoidMethod(env, obj, j_calls->call_meth);
- if (UNLIKELY((*env)->ExceptionCheck(env))) {
- (*env)->ExceptionDescribe(env);
- (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception.");
- }
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
-}
-static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
- LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
- atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-}
-static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) {
- jclass c = (*env)->GetObjectClass(env, o);
- CHECK(c != NULL);
- LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls");
- atomic_init(&calls->refcnt, 1);
- DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
- calls->o = (*env)->NewWeakGlobalRef(env, o);
- calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V");
- CHECK(calls->call_meth != NULL);
-
- LDKFutureCallback ret = {
- .this_arg = (void*) calls,
- .call = call_LDKFutureCallback_jcall,
- .free = LDKFutureCallback_JCalls_free,
- };
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) {
- LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback");
- *res_ptr = LDKFutureCallback_init(env, clz, o);
- return tag_ptr(res_ptr, true);
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1archive_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr;
- (this_arg_conv->call)(this_arg_conv->this_arg);
+ LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
+ LDKOutPoint channel_funding_outpoint_conv;
+ channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+ channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+ channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
+ (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv);
}
typedef struct LDKListen_JCalls {
return ret_arr;
}
-typedef struct LDKEventHandler_JCalls {
+static jclass LDKSpendingDelay_Relative_class = NULL;
+static jmethodID LDKSpendingDelay_Relative_meth = NULL;
+static jclass LDKSpendingDelay_Absolute_class = NULL;
+static jmethodID LDKSpendingDelay_Absolute_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendingDelay_init (JNIEnv *env, jclass clz) {
+ LDKSpendingDelay_Relative_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Relative"));
+ CHECK(LDKSpendingDelay_Relative_class != NULL);
+ LDKSpendingDelay_Relative_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Relative_class, "<init>", "(I)V");
+ CHECK(LDKSpendingDelay_Relative_meth != NULL);
+ LDKSpendingDelay_Absolute_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Absolute"));
+ CHECK(LDKSpendingDelay_Absolute_class != NULL);
+ LDKSpendingDelay_Absolute_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Absolute_class, "<init>", "(I)V");
+ CHECK(LDKSpendingDelay_Absolute_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendingDelay_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKSpendingDelay_Relative: {
+ int32_t num_blocks_conv = obj->relative.num_blocks;
+ return (*env)->NewObject(env, LDKSpendingDelay_Relative_class, LDKSpendingDelay_Relative_meth, num_blocks_conv);
+ }
+ case LDKSpendingDelay_Absolute: {
+ int32_t height_conv = obj->absolute.height;
+ return (*env)->NewObject(env, LDKSpendingDelay_Absolute_class, LDKSpendingDelay_Absolute_meth, height_conv);
+ }
+ default: abort();
+ }
+}
+typedef struct LDKFutureCallback_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
jweak o;
- jmethodID handle_event_meth;
-} LDKEventHandler_JCalls;
-static void LDKEventHandler_JCalls_free(void* this_arg) {
- LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
+ jmethodID call_meth;
+} LDKFutureCallback_JCalls;
+static void LDKFutureCallback_JCalls_free(void* this_arg) {
+ LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
FREE(j_calls);
}
}
-void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) {
+void call_LDKFutureCallback_jcall(const void* this_arg) {
+ LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ (*env)->CallVoidMethod(env, obj, j_calls->call_meth);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception.");
+ }
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+}
+static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
+ LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V");
+ CHECK(calls->call_meth != NULL);
+
+ LDKFutureCallback ret = {
+ .this_arg = (void*) calls,
+ .call = call_LDKFutureCallback_jcall,
+ .free = LDKFutureCallback_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback");
+ *res_ptr = LDKFutureCallback_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr;
+ (this_arg_conv->call)(this_arg_conv->this_arg);
+}
+
+typedef struct LDKEventHandler_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID handle_event_meth;
+} LDKEventHandler_JCalls;
+static void LDKEventHandler_JCalls_free(void* this_arg) {
+ LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) {
LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
jmethodID handle_shutdown_meth;
jmethodID handle_closing_signed_meth;
jmethodID handle_stfu_meth;
- jmethodID handle_splice_meth;
- jmethodID handle_splice_ack_meth;
- jmethodID handle_splice_locked_meth;
jmethodID handle_tx_add_input_meth;
jmethodID handle_tx_add_output_meth;
jmethodID handle_tx_remove_input_meth;
DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
}
}
-void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) {
- LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
- LDKSplice msg_var = *msg;
- int64_t msg_ref = 0;
- msg_var = Splice_clone(&msg_var);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
- msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- jobject obj = (*env)->NewLocalRef(env, j_calls->o);
- CHECK(obj != NULL);
- (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_meth, their_node_id_arr, msg_ref);
- if (UNLIKELY((*env)->ExceptionCheck(env))) {
- (*env)->ExceptionDescribe(env);
- (*env)->FatalError(env, "A call to handle_splice in LDKChannelMessageHandler from rust threw an exception.");
- }
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
-}
-void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) {
- LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
- LDKSpliceAck msg_var = *msg;
- int64_t msg_ref = 0;
- msg_var = SpliceAck_clone(&msg_var);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
- msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- jobject obj = (*env)->NewLocalRef(env, j_calls->o);
- CHECK(obj != NULL);
- (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_ack_meth, their_node_id_arr, msg_ref);
- if (UNLIKELY((*env)->ExceptionCheck(env))) {
- (*env)->ExceptionDescribe(env);
- (*env)->FatalError(env, "A call to handle_splice_ack in LDKChannelMessageHandler from rust threw an exception.");
- }
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
-}
-void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) {
- LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
- LDKSpliceLocked msg_var = *msg;
- int64_t msg_ref = 0;
- msg_var = SpliceLocked_clone(&msg_var);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
- msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- jobject obj = (*env)->NewLocalRef(env, j_calls->o);
- CHECK(obj != NULL);
- (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_locked_meth, their_node_id_arr, msg_ref);
- if (UNLIKELY((*env)->ExceptionCheck(env))) {
- (*env)->ExceptionDescribe(env);
- (*env)->FatalError(env, "A call to handle_splice_locked in LDKChannelMessageHandler from rust threw an exception.");
- }
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
-}
void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
JNIEnv *env;
CHECK(calls->handle_closing_signed_meth != NULL);
calls->handle_stfu_meth = (*env)->GetMethodID(env, c, "handle_stfu", "([BJ)V");
CHECK(calls->handle_stfu_meth != NULL);
- calls->handle_splice_meth = (*env)->GetMethodID(env, c, "handle_splice", "([BJ)V");
- CHECK(calls->handle_splice_meth != NULL);
- calls->handle_splice_ack_meth = (*env)->GetMethodID(env, c, "handle_splice_ack", "([BJ)V");
- CHECK(calls->handle_splice_ack_meth != NULL);
- calls->handle_splice_locked_meth = (*env)->GetMethodID(env, c, "handle_splice_locked", "([BJ)V");
- CHECK(calls->handle_splice_locked_meth != NULL);
calls->handle_tx_add_input_meth = (*env)->GetMethodID(env, c, "handle_tx_add_input", "([BJ)V");
CHECK(calls->handle_tx_add_input_meth != NULL);
calls->handle_tx_add_output_meth = (*env)->GetMethodID(env, c, "handle_tx_add_output", "([BJ)V");
.handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall,
.handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall,
.handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall,
- .handle_splice = handle_splice_LDKChannelMessageHandler_jcall,
- .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall,
- .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall,
.handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall,
.handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall,
.handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall,
(this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
- LDKPublicKey their_node_id_ref;
- CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
- (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
- LDKSplice msg_conv;
- msg_conv.inner = untag_ptr(msg);
- msg_conv.is_owned = ptr_is_owned(msg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv.is_owned = false;
- (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
- LDKPublicKey their_node_id_ref;
- CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
- (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
- LDKSpliceAck msg_conv;
- msg_conv.inner = untag_ptr(msg);
- msg_conv.is_owned = ptr_is_owned(msg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv.is_owned = false;
- (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
- LDKPublicKey their_node_id_ref;
- CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
- (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
- LDKSpliceLocked msg_conv;
- msg_conv.inner = untag_ptr(msg);
- msg_conv.is_owned = ptr_is_owned(msg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv.is_owned = false;
- (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1tx_1add_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
return ret_arr;
}
+typedef struct LDKNodeIdLookUp_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID next_node_id_meth;
+} LDKNodeIdLookUp_JCalls;
+static void LDKNodeIdLookUp_JCalls_free(void* this_arg) {
+ LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) {
+ LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ int64_t short_channel_id_conv = short_channel_id;
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->next_node_id_meth, short_channel_id_conv);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to next_node_id in LDKNodeIdLookUp from rust threw an exception.");
+ }
+ LDKPublicKey ret_ref;
+ CHECK((*env)->GetArrayLength(env, ret) == 33);
+ (*env)->GetByteArrayRegion(env, ret, 0, 33, ret_ref.compressed_form);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_ref;
+}
+static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) {
+ LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->next_node_id_meth = (*env)->GetMethodID(env, c, "next_node_id", "(J)[B");
+ CHECK(calls->next_node_id_meth != NULL);
+
+ LDKNodeIdLookUp ret = {
+ .this_arg = (void*) calls,
+ .next_node_id = next_node_id_LDKNodeIdLookUp_jcall,
+ .free = LDKNodeIdLookUp_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKNodeIdLookUp_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+ *res_ptr = LDKNodeIdLookUp_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1next_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t short_channel_id) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form);
+ return ret_arr;
+}
+
typedef struct LDKRoutingMessageHandler_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
return ret_conv;
}
+typedef struct LDKSignBolt12InvoiceFn_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID sign_invoice_meth;
+} LDKSignBolt12InvoiceFn_JCalls;
+static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) {
+ LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) {
+ LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ LDKUnsignedBolt12Invoice message_var = *message;
+ int64_t message_ref = 0;
+ message_var = UnsignedBolt12Invoice_clone(&message_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+ message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_meth, message_ref);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to sign_invoice in LDKSignBolt12InvoiceFn from rust threw an exception.");
+ }
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_conv;
+}
+static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) {
+ LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->sign_invoice_meth = (*env)->GetMethodID(env, c, "sign_invoice", "(J)J");
+ CHECK(calls->sign_invoice_meth != NULL);
+
+ LDKSignBolt12InvoiceFn ret = {
+ .this_arg = (void*) calls,
+ .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall,
+ .free = LDKSignBolt12InvoiceFn_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignBolt12InvoiceFn_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn");
+ *res_ptr = LDKSignBolt12InvoiceFn_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1sign_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr;
+ LDKUnsignedBolt12Invoice message_conv;
+ message_conv.inner = untag_ptr(message);
+ message_conv.is_owned = ptr_is_owned(message);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
+ message_conv.is_owned = false;
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+typedef struct LDKSignInvoiceRequestFn_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID sign_invoice_request_meth;
+} LDKSignInvoiceRequestFn_JCalls;
+static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) {
+ LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) {
+ LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ LDKUnsignedInvoiceRequest message_var = *message;
+ int64_t message_ref = 0;
+ message_var = UnsignedInvoiceRequest_clone(&message_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+ message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_request_meth, message_ref);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to sign_invoice_request in LDKSignInvoiceRequestFn from rust threw an exception.");
+ }
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_conv;
+}
+static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) {
+ LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->sign_invoice_request_meth = (*env)->GetMethodID(env, c, "sign_invoice_request", "(J)J");
+ CHECK(calls->sign_invoice_request_meth != NULL);
+
+ LDKSignInvoiceRequestFn ret = {
+ .this_arg = (void*) calls,
+ .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall,
+ .free = LDKSignInvoiceRequestFn_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignInvoiceRequestFn_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn");
+ *res_ptr = LDKSignInvoiceRequestFn_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1sign_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr;
+ LDKUnsignedInvoiceRequest message_conv;
+ message_conv.inner = untag_ptr(message);
+ message_conv.is_owned = ptr_is_owned(message);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
+ message_conv.is_owned = false;
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static jclass LDKSignError_Signing_class = NULL;
+static jmethodID LDKSignError_Signing_meth = NULL;
+static jclass LDKSignError_Verification_class = NULL;
+static jmethodID LDKSignError_Verification_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSignError_init (JNIEnv *env, jclass clz) {
+ LDKSignError_Signing_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Signing"));
+ CHECK(LDKSignError_Signing_class != NULL);
+ LDKSignError_Signing_meth = (*env)->GetMethodID(env, LDKSignError_Signing_class, "<init>", "()V");
+ CHECK(LDKSignError_Signing_meth != NULL);
+ LDKSignError_Verification_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Verification"));
+ CHECK(LDKSignError_Verification_class != NULL);
+ LDKSignError_Verification_meth = (*env)->GetMethodID(env, LDKSignError_Verification_class, "<init>", "(Lorg/ldk/enums/Secp256k1Error;)V");
+ CHECK(LDKSignError_Verification_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSignError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKSignError *obj = (LDKSignError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKSignError_Signing: {
+ return (*env)->NewObject(env, LDKSignError_Signing_class, LDKSignError_Signing_meth);
+ }
+ case LDKSignError_Verification: {
+ jclass verification_conv = LDKSecp256k1Error_to_java(env, obj->verification);
+ return (*env)->NewObject(env, LDKSignError_Verification_class, LDKSignError_Verification_meth, verification_conv);
+ }
+ default: abort();
+ }
+}
static jclass LDKEffectiveCapacity_ExactLiquidity_class = NULL;
static jmethodID LDKEffectiveCapacity_ExactLiquidity_meth = NULL;
static jclass LDKEffectiveCapacity_AdvertisedMaxHTLC_class = NULL;
return ret_arr;
}
+static jclass LDKIntroductionNode_NodeId_class = NULL;
+static jmethodID LDKIntroductionNode_NodeId_meth = NULL;
+static jclass LDKIntroductionNode_DirectedShortChannelId_class = NULL;
+static jmethodID LDKIntroductionNode_DirectedShortChannelId_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKIntroductionNode_init (JNIEnv *env, jclass clz) {
+ LDKIntroductionNode_NodeId_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$NodeId"));
+ CHECK(LDKIntroductionNode_NodeId_class != NULL);
+ LDKIntroductionNode_NodeId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_NodeId_class, "<init>", "([B)V");
+ CHECK(LDKIntroductionNode_NodeId_meth != NULL);
+ LDKIntroductionNode_DirectedShortChannelId_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$DirectedShortChannelId"));
+ CHECK(LDKIntroductionNode_DirectedShortChannelId_class != NULL);
+ LDKIntroductionNode_DirectedShortChannelId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_DirectedShortChannelId_class, "<init>", "(Lorg/ldk/enums/Direction;J)V");
+ CHECK(LDKIntroductionNode_DirectedShortChannelId_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKIntroductionNode_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKIntroductionNode_NodeId: {
+ int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form);
+ return (*env)->NewObject(env, LDKIntroductionNode_NodeId_class, LDKIntroductionNode_NodeId_meth, node_id_arr);
+ }
+ case LDKIntroductionNode_DirectedShortChannelId: {
+ jclass _0_conv = LDKDirection_to_java(env, obj->directed_short_channel_id._0);
+ int64_t _1_conv = obj->directed_short_channel_id._1;
+ return (*env)->NewObject(env, LDKIntroductionNode_DirectedShortChannelId_class, LDKIntroductionNode_DirectedShortChannelId_meth, _0_conv, _1_conv);
+ }
+ default: abort();
+ }
+}
typedef struct LDKCoinSelectionSource_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
return tag_ptr(ret_ref, true);
}
+static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) {
+ LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar");
+ *ret_ref = BigEndianScalar_clone(arg);
+ return tag_ptr(ret_ref, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg);
+ int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig);
+ LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar");
+ *ret_ref = BigEndianScalar_clone(orig_conv);
+ return tag_ptr(ret_ref, true);
+}
+
static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) {
LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error");
*ret_copy = Bech32Error_clone(arg);
Str_free(dummy);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
+ LDKCVec_u8Z _res_ref;
+ _res_ref.datalen = (*env)->GetArrayLength(env, _res);
+ _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
+ CVec_u8Z_free(_res_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKRefundMaybeWithDerivedMetadataBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKRefund o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Refund_clone(&o_conv);
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_RefundBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1some(JNIEnv *env, jclass clz, int64_t o) {
LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
*ret_copy = COption_u64Z_some(o);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
- LDKCVec_u8Z _res_ref;
- _res_ref.datalen = (*env)->GetArrayLength(env, _res);
- _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
- (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
- CVec_u8Z_free(_res_ref);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1u8ZZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
LDKCVec_u8Z o_ref;
o_ref.datalen = (*env)->GetArrayLength(env, o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKUnsignedBolt12Invoice o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = UnsignedBolt12Invoice_clone(&o_conv);
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBolt12Invoice o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Bolt12Invoice_clone(&o_conv);
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKSchnorrSignature o_ref;
+ CHECK((*env)->GetArrayLength(env, o) == 64);
+ (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) {
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = CResult_SchnorrSignatureNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_SchnorrSignatureNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) {
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig);
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ThirtyTwoBytesZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
LDKCVec_ThirtyTwoBytesZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKAmount o_conv = *(LDKAmount*)(o_ptr);
+ o_conv = Amount_clone((LDKAmount*)untag_ptr(o));
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = COption_AmountZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = COption_AmountZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_AmountZ_free(_res_conv);
+}
+
+static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) {
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = COption_AmountZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = COption_AmountZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKQuantity o_conv = *(LDKQuantity*)(o_ptr);
+ o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o));
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = COption_QuantityZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = COption_QuantityZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_QuantityZ_free(_res_conv);
+}
+
+static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) {
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = COption_QuantityZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig);
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = COption_QuantityZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
LDKThirtyTwoBytes o_ref;
CHECK((*env)->GetArrayLength(env, o) == 32);
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr);
- // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar
+ o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o));
LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ");
*ret_copy = COption_BigEndianScalarZ_some(o_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
- LDKSchnorrSignature o_ref;
- CHECK((*env)->GetArrayLength(env, o) == 64);
- (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) {
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = CResult_SchnorrSignatureNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_SchnorrSignatureNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) {
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig);
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
LDKECDSASignature o_ref;
CHECK((*env)->GetArrayLength(env, o) == 64);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKTransaction o_ref;
+ o_ref.datalen = (*env)->GetArrayLength(env, o);
+ o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
+ o_ref.data_is_owned = true;
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = CResult_TransactionNoneZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) {
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = CResult_TransactionNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_TransactionNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) {
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = CResult_TransactionNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig);
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = CResult_TransactionNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WriteableEcdsaChannelSignerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
- LDKTransaction o_ref;
- o_ref.datalen = (*env)->GetArrayLength(env, o);
- o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes");
- (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
- o_ref.data_is_owned = true;
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = CResult_TransactionNoneZ_ok(o_ref);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) {
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = CResult_TransactionNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_TransactionNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) {
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = CResult_TransactionNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig);
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = CResult_TransactionNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1WriteableScoreZ_1some(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBestBlock o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = BestBlock_clone(&o_conv);
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_BestBlockDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) {
LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
*ret_conv = C2Tuple_usizeTransactionZ_clone(arg);
CVec_MonitorEventZ_free(_res_constr);
}
-static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
- *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg);
+static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+ *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg);
- int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg);
+ int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
- *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+ *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_tArray b, int8_tArray c) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_tArray c, int8_tArray d) {
LDKOutPoint a_conv;
a_conv.inner = untag_ptr(a);
a_conv.is_owned = ptr_is_owned(a);
CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
a_conv = OutPoint_clone(&a_conv);
- LDKCVec_MonitorEventZ b_constr;
- b_constr.datalen = (*env)->GetArrayLength(env, b);
- if (b_constr.datalen > 0)
- b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+ LDKChannelId b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv = ChannelId_clone(&b_conv);
+ LDKCVec_MonitorEventZ c_constr;
+ c_constr.datalen = (*env)->GetArrayLength(env, c);
+ if (c_constr.datalen > 0)
+ c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
else
- b_constr.data = NULL;
- int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t o = 0; o < b_constr.datalen; o++) {
- int64_t b_conv_14 = b_vals[o];
- void* b_conv_14_ptr = untag_ptr(b_conv_14);
- CHECK_ACCESS(b_conv_14_ptr);
- LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr);
- b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14));
- b_constr.data[o] = b_conv_14_conv;
- }
- (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
- LDKPublicKey c_ref;
- CHECK((*env)->GetArrayLength(env, c) == 33);
- (*env)->GetByteArrayRegion(env, c, 0, 33, c_ref.compressed_form);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
- *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ c_constr.data = NULL;
+ int64_t* c_vals = (*env)->GetLongArrayElements (env, c, NULL);
+ for (size_t o = 0; o < c_constr.datalen; o++) {
+ int64_t c_conv_14 = c_vals[o];
+ void* c_conv_14_ptr = untag_ptr(c_conv_14);
+ CHECK_ACCESS(c_conv_14_ptr);
+ LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr);
+ c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14));
+ c_constr.data[o] = c_conv_14_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, c, c_vals, 0);
+ LDKPublicKey d_ref;
+ CHECK((*env)->GetArrayLength(env, d) == 33);
+ (*env)->GetByteArrayRegion(env, d, 0, 33, d_ref.compressed_form);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+ *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr);
FREE(untag_ptr(_res));
- C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv);
+ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
- LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements");
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t x = 0; x < _res_constr.datalen; x++) {
- int64_t _res_conv_49 = _res_vals[x];
- void* _res_conv_49_ptr = untag_ptr(_res_conv_49);
- CHECK_ACCESS(_res_conv_49_ptr);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr);
- FREE(untag_ptr(_res_conv_49));
- _res_constr.data[x] = _res_conv_49_conv;
+ for (size_t f = 0; f < _res_constr.datalen; f++) {
+ int64_t _res_conv_57 = _res_vals[f];
+ void* _res_conv_57_ptr = untag_ptr(_res_conv_57);
+ CHECK_ACCESS(_res_conv_57_ptr);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr);
+ FREE(untag_ptr(_res_conv_57));
+ _res_constr.data[f] = _res_conv_57_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
- CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
+ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOfferId o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = OfferId_clone(&o_conv);
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OfferIdDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) {
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok();
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_NoneBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOffer o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Offer_clone(&o_conv);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OfferBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKOffer o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
- LDKPublicKey o_ref;
- CHECK((*env)->GetArrayLength(env, o) == 33);
- (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
- LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
- *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
- LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
- LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
- *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_PublicKeySecp256k1ErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) {
- LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
- *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig);
- LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
- *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKNodeId o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKPublicKey o_ref;
+ CHECK((*env)->GetArrayLength(env, o) == 33);
+ (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
+ LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+ *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+ LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+ *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_PublicKeySecp256k1ErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+ *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig);
+ LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+ *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1NetworkUpdateZ_1some(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+ *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_java(env, e);
+ LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+ *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_u64ShortChannelIdErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKPendingHTLCInfo o_conv;
o_conv.inner = untag_ptr(o);
e_conv.inner = untag_ptr(e);
e_conv.is_owned = ptr_is_owned(e);
CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr
-
+ e_conv = InboundHTLCErr_clone(&e_conv);
LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
*ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv);
return tag_ptr(ret_conv, true);
CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv);
}
+static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) {
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+ *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig);
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+ *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
LDKCVec_HTLCOutputInCommitmentZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr);
+ o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o));
+ LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+ *ret_copy = COption_PaymentContextZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+ *ret_copy = COption_PaymentContextZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_PaymentContextZ_free(_res_conv);
+}
+
+static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) {
+ LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+ *ret_copy = COption_PaymentContextZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig);
+ LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+ *ret_copy = COption_PaymentContextZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) {
LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z");
*ret_conv = C2Tuple_u64u16Z_clone(arg);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
- LDKThirtyTwoBytes o_ref;
- CHECK((*env)->GetArrayLength(env, o) == 32);
- (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data);
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKChannelId o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = ChannelId_clone(&o_conv);
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+ *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv);
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+ *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr);
+ LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv);
+ CResult_ChannelIdAPIErrorZ_free(_res_conv);
}
-static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg);
+static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+ *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig);
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig);
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+ *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
- *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg);
+static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+ *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg);
- int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
- *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig);
+ LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+ *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) {
- LDKThirtyTwoBytes a_ref;
- CHECK((*env)->GetArrayLength(env, a) == 32);
- (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
+ LDKChannelId a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = ChannelId_clone(&a_conv);
LDKPublicKey b_ref;
CHECK((*env)->GetArrayLength(env, b) == 33);
(*env)->GetByteArrayRegion(env, b, 0, 33, b_ref.compressed_form);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
- *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref);
+ LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+ *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr);
+ LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr);
FREE(untag_ptr(_res));
- C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv);
+ C2Tuple_ChannelIdPublicKeyZ_free(_res_conv);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
- LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ChannelIdPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements");
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t j = 0; j < _res_constr.datalen; j++) {
- int64_t _res_conv_35 = _res_vals[j];
- void* _res_conv_35_ptr = untag_ptr(_res_conv_35);
- CHECK_ACCESS(_res_conv_35_ptr);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr);
- FREE(untag_ptr(_res_conv_35));
- _res_constr.data[j] = _res_conv_35_conv;
+ for (size_t e = 0; e < _res_constr.datalen; e++) {
+ int64_t _res_conv_30 = _res_vals[e];
+ void* _res_conv_30_ptr = untag_ptr(_res_conv_30);
+ CHECK_ACCESS(_res_conv_30_ptr);
+ LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr);
+ FREE(untag_ptr(_res_conv_30));
+ _res_constr.data[e] = _res_conv_30_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+ CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_ChannelIdZ _res_constr;
+ _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+ for (size_t l = 0; l < _res_constr.datalen; l++) {
+ int64_t _res_conv_11 = _res_vals[l];
+ LDKChannelId _res_conv_11_conv;
+ _res_conv_11_conv.inner = untag_ptr(_res_conv_11);
+ _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv);
+ _res_constr.data[l] = _res_conv_11_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
- CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr);
+ CVec_ChannelIdZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOfferWithDerivedMetadataBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv);
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1some(JNIEnv *env, jclass clz, jstring o) {
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) {
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok();
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
- LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_NoneBolt12SemanticErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) {
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig);
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKThirtyTwoBytes o_ref;
+ CHECK((*env)->GetArrayLength(env, o) == 32);
+ (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data);
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
+ e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig);
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1OffersMessageZ_1some(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CVec_CommitmentTransactionZ_free(_res_constr);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
- LDKCVec_TransactionZ _res_constr;
- _res_constr.datalen = (*env)->GetArrayLength(env, _res);
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
- else
- _res_constr.data = NULL;
- for (size_t i = 0; i < _res_constr.datalen; i++) {
- int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
- LDKTransaction _res_conv_8_ref;
- _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8);
- _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes");
- (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data);
- _res_conv_8_ref.data_is_owned = true;
- _res_constr.data[i] = _res_conv_8_ref;
- }
- CVec_TransactionZ_free(_res_constr);
-}
-
static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) {
LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
*ret_conv = C2Tuple_u32TxOutZ_clone(arg);
return ret_ref;
}
-static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
- *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg);
- int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig);
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
- *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
- LDKPublicKey a_ref;
- CHECK((*env)->GetArrayLength(env, a) == 33);
- (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
- void* b_ptr = untag_ptr(b);
- CHECK_ACCESS(b_ptr);
- LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr);
- b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b));
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
- *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyCOption_1SocketAddressZZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
- LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PeerDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_PeerDetailsZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements");
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t r = 0; r < _res_constr.datalen; r++) {
- int64_t _res_conv_43 = _res_vals[r];
- void* _res_conv_43_ptr = untag_ptr(_res_conv_43);
- CHECK_ACCESS(_res_conv_43_ptr);
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr);
- FREE(untag_ptr(_res_conv_43));
- _res_constr.data[r] = _res_conv_43_conv;
+ for (size_t n = 0; n < _res_constr.datalen; n++) {
+ int64_t _res_conv_13 = _res_vals[n];
+ LDKPeerDetails _res_conv_13_conv;
+ _res_conv_13_conv.inner = untag_ptr(_res_conv_13);
+ _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv);
+ _res_constr.data[n] = _res_conv_13_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
- CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr);
+ CVec_PeerDetailsZ_free(_res_constr);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKUnsignedInvoiceRequest o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = UnsignedInvoiceRequest_clone(&o_conv);
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceRequest o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = InvoiceRequest_clone(&o_conv);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
LDKSecretKey o_ref;
CHECK((*env)->GetArrayLength(env, o) == 32);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKVerifiedInvoiceRequest o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceRequestFields o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = InvoiceRequestFields_clone(&o_conv);
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_COption_1NoneZ_1some(JNIEnv *env, jclass clz) {
jclass ret_conv = LDKCOption_NoneZ_to_java(env, COption_NoneZ_some());
return ret_conv;
CVec_WitnessZ_free(_res_constr);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKECDSASignature o_ref;
+ CHECK((*env)->GetArrayLength(env, o) == 64);
+ (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = COption_ECDSASignatureZ_some(o_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = COption_ECDSASignatureZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_ECDSASignatureZ_free(_res_conv);
+}
+
+static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) {
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = COption_ECDSASignatureZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig);
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = COption_ECDSASignatureZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1i64Z_1some(JNIEnv *env, jclass clz, int64_t o) {
LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z");
*ret_copy = COption_i64Z_some(o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+ LDKCVec_TransactionZ _res_constr;
+ _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
+ else
+ _res_constr.data = NULL;
+ for (size_t i = 0; i < _res_constr.datalen; i++) {
+ int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
+ LDKTransaction _res_conv_8_ref;
+ _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8);
+ _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data);
+ _res_conv_8_ref.data_is_owned = true;
+ _res_constr.data[i] = _res_conv_8_ref;
+ }
+ CVec_TransactionZ_free(_res_constr);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKChannelId o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = ChannelId_clone(&o_conv);
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ChannelIdDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) {
LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z");
*ret_conv = C2Tuple__u832u16Z_clone(arg);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr);
+ o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o));
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_PaymentContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKUnknownPaymentContext o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = UnknownPaymentContext_clone(&o_conv);
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBolt12OfferContext o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Bolt12OfferContext_clone(&o_conv);
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBolt12RefundContext o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Bolt12RefundContext_clone(&o_conv);
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) {
+ LDKStr o_conv = java_to_owned_str(env, o);
+ LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+ *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+ LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+ *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_StrSecp256k1ErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) {
+ LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+ *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig);
+ LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+ *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) {
LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
*ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) {
- LDKStr o_conv = java_to_owned_str(env, o);
- LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
- *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
- LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
- LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
- *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_StrSecp256k1ErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) {
- LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
- *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig);
- LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
- *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutUtxoLookupErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv);
}
+static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) {
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+ *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig);
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+ *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CResult_PeeledOnionNoneZ_free(_res_conv);
}
+static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) {
+ LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+ *ret_conv = CResult_PeeledOnionNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig);
+ LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+ *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CResult_SendSuccessSendErrorZ_free(_res_conv);
}
+static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) {
+ LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+ *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig);
+ LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+ *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedPathNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKBlindedPath o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKTrackedSpendableOutput o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = TrackedSpendableOutput_clone(&o_conv);
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr);
+ o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o));
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKFilter o_conv = *(LDKFilter*)(o_ptr);
+ if (o_conv.free == LDKFilter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFilter_JCalls_cloned(&o_conv);
+ }
+ LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
+ *ret_copy = COption_FilterZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
+ *ret_copy = COption_FilterZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_FilterZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TrackedSpendableOutputZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_TrackedSpendableOutputZ _res_constr;
+ _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+ for (size_t y = 0; y < _res_constr.datalen; y++) {
+ int64_t _res_conv_24 = _res_vals[y];
+ LDKTrackedSpendableOutput _res_conv_24_conv;
+ _res_conv_24_conv.inner = untag_ptr(_res_conv_24);
+ _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv);
+ _res_constr.data[y] = _res_conv_24_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+ CVec_TrackedSpendableOutputZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOutputSweeper o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKOutputSweeper
+
+ LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+ *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+ *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OutputSweeperDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKBestBlock a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = BestBlock_clone(&a_conv);
+ LDKOutputSweeper b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ // WARNING: we need a move here but no clone is available for LDKOutputSweeper
+
+ LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ");
+ *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_BestBlockOutputSweeperZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr);
+ // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+ *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+ *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKDelayedPaymentBasepoint o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) {
- void* o_ptr = untag_ptr(o);
- CHECK_ACCESS(o_ptr);
- LDKFilter o_conv = *(LDKFilter*)(o_ptr);
- if (o_conv.free == LDKFilter_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKFilter_JCalls_cloned(&o_conv);
- }
- LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
- *ret_copy = COption_FilterZ_some(o_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) {
- LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
- *ret_copy = COption_FilterZ_none();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- COption_FilterZ_free(_res_conv);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKLockedChannelMonitor o_conv;
o_conv.inner = untag_ptr(o);
CResult_LockedChannelMonitorNoneZ_free(_res_conv);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1OutPointZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
- LDKCVec_OutPointZ _res_constr;
+static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) {
+ LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+ *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig);
+ LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+ *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKOutPoint a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = OutPoint_clone(&a_conv);
+ LDKChannelId b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv = ChannelId_clone(&b_conv);
+ LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+ *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_OutPointChannelIdZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1OutPointChannelIdZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements");
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t k = 0; k < _res_constr.datalen; k++) {
- int64_t _res_conv_10 = _res_vals[k];
- LDKOutPoint _res_conv_10_conv;
- _res_conv_10_conv.inner = untag_ptr(_res_conv_10);
- _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv);
- _res_constr.data[k] = _res_conv_10_conv;
+ for (size_t d = 0; d < _res_constr.datalen; d++) {
+ int64_t _res_conv_29 = _res_vals[d];
+ void* _res_conv_29_ptr = untag_ptr(_res_conv_29);
+ CHECK_ACCESS(_res_conv_29_ptr);
+ LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr);
+ FREE(untag_ptr(_res_conv_29));
+ _res_constr.data[d] = _res_conv_29_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
- CVec_OutPointZ_free(_res_constr);
+ CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorUpdateIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
return ret_arr;
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1as_1transaction(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKTransactionU16LenLimited this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ Transaction_free(ret_var);
+ return ret_arr;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKTransactionU16LenLimited obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_ret, true);
}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig);
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_clone(orig_conv));
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1block_1overflow(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_block_overflow());
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1tx_1index_1overflow(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_tx_index_overflow());
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1vout_1index_1overflow(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_vout_index_overflow());
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a);
+ LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b);
+ jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_block_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+ int32_t ret_conv = block_from_scid(short_channel_id);
+ return ret_conv;
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_tx_1index_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+ int32_t ret_conv = tx_index_from_scid(short_channel_id);
+ return ret_conv;
+}
+
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_vout_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+ int16_t ret_conv = vout_from_scid(short_channel_id);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_scid_1from_1parts(JNIEnv *env, jclass clz, int64_t block, int64_t tx_index, int64_t vout_index) {
+ LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+ *ret_conv = scid_from_parts(block, tx_index, vout_index);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UntrustedString_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKUntrustedString this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- FutureCallback_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKFuture this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKTrackedSpendableOutput this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- Future_free(this_obj_conv);
+ TrackedSpendableOutput_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+ *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr);
+ val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val));
+ TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1status(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1status(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr);
+ val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val));
+ TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1new(JNIEnv *env, jclass clz, int64_t descriptor_arg, int64_t channel_id_arg, int64_t status_arg) {
+ void* descriptor_arg_ptr = untag_ptr(descriptor_arg);
+ CHECK_ACCESS(descriptor_arg_ptr);
+ LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr);
+ descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg));
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ void* status_arg_ptr = untag_ptr(status_arg);
+ CHECK_ACCESS(status_arg_ptr);
+ LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr);
+ status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg));
+ LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) {
- LDKFuture ret_var = Future_clone(arg);
+static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) {
+ LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKFuture arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKTrackedSpendableOutput arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = Future_clone_ptr(&arg_conv);
+ int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKFuture orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKTrackedSpendableOutput orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKFuture ret_var = Future_clone(&orig_conv);
+ LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKTrackedSpendableOutput a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKTrackedSpendableOutput b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1is_1spent_1in(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx) {
+ LDKTrackedSpendableOutput this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKTransaction tx_ref;
+ tx_ref.datalen = (*env)->GetArrayLength(env, tx);
+ tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, tx, 0, tx_ref.datalen, tx_ref.data);
+ tx_ref.data_is_owned = true;
+ jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKTrackedSpendableOutput obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = TrackedSpendableOutput_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ OutputSpendStatus_free(this_ptr_conv);
+}
+
+static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) {
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg);
+ int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig);
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1initial_1broadcast(JNIEnv *env, jclass clz, int64_t delayed_until_height) {
+ void* delayed_until_height_ptr = untag_ptr(delayed_until_height);
+ CHECK_ACCESS(delayed_until_height_ptr);
+ LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr);
+ delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height));
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1first_1confirmation(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) {
+ LDKThirtyTwoBytes first_broadcast_hash_ref;
+ CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32);
+ (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data);
+ LDKTransaction latest_spending_tx_ref;
+ latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx);
+ latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data);
+ latest_spending_tx_ref.data_is_owned = true;
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1threshold_1confirmations(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) {
+ LDKThirtyTwoBytes first_broadcast_hash_ref;
+ CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32);
+ (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data);
+ LDKTransaction latest_spending_tx_ref;
+ latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx);
+ latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data);
+ latest_spending_tx_ref.data_is_owned = true;
+ LDKThirtyTwoBytes confirmation_hash_ref;
+ CHECK((*env)->GetArrayLength(env, confirmation_hash) == 32);
+ (*env)->GetByteArrayRegion(env, confirmation_hash, 0, 32, confirmation_hash_ref.data);
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a);
+ LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b);
+ jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = OutputSpendStatus_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOutputSweeper this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OutputSweeper_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1new(JNIEnv *env, jclass clz, int64_t best_block, int64_t broadcaster, int64_t fee_estimator, int64_t chain_data_source, int64_t output_spender, int64_t change_destination_source, int64_t kv_store, int64_t logger) {
+ LDKBestBlock best_block_conv;
+ best_block_conv.inner = untag_ptr(best_block);
+ best_block_conv.is_owned = ptr_is_owned(best_block);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv);
+ best_block_conv = BestBlock_clone(&best_block_conv);
+ void* broadcaster_ptr = untag_ptr(broadcaster);
+ CHECK_ACCESS(broadcaster_ptr);
+ LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr);
+ if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv);
+ }
+ void* fee_estimator_ptr = untag_ptr(fee_estimator);
+ CHECK_ACCESS(fee_estimator_ptr);
+ LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr);
+ if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
+ }
+ void* chain_data_source_ptr = untag_ptr(chain_data_source);
+ CHECK_ACCESS(chain_data_source_ptr);
+ LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr);
+ // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+ if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) {
+ // Manually implement clone for Java trait instances
+ if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFilter_JCalls_cloned(&chain_data_source_conv.some);
+ }
+ }
+ void* output_spender_ptr = untag_ptr(output_spender);
+ CHECK_ACCESS(output_spender_ptr);
+ LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr);
+ if (output_spender_conv.free == LDKOutputSpender_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOutputSpender_JCalls_cloned(&output_spender_conv);
+ }
+ void* change_destination_source_ptr = untag_ptr(change_destination_source);
+ CHECK_ACCESS(change_destination_source_ptr);
+ LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr);
+ if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv);
+ }
+ void* kv_store_ptr = untag_ptr(kv_store);
+ CHECK_ACCESS(kv_store_ptr);
+ LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr);
+ if (kv_store_conv.free == LDKKVStore_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKKVStore_JCalls_cloned(&kv_store_conv);
+ }
+ void* logger_ptr = untag_ptr(logger);
+ CHECK_ACCESS(logger_ptr);
+ LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+ if (logger_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&logger_conv);
+ }
+ LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1track_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray output_descriptors, int64_t channel_id, jboolean exclude_static_outputs, int64_t delay_until_height) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr;
+ output_descriptors_constr.datalen = (*env)->GetArrayLength(env, output_descriptors);
+ if (output_descriptors_constr.datalen > 0)
+ output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+ else
+ output_descriptors_constr.data = NULL;
+ int64_t* output_descriptors_vals = (*env)->GetLongArrayElements (env, output_descriptors, NULL);
+ for (size_t b = 0; b < output_descriptors_constr.datalen; b++) {
+ int64_t output_descriptors_conv_27 = output_descriptors_vals[b];
+ void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27);
+ CHECK_ACCESS(output_descriptors_conv_27_ptr);
+ LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr);
+ output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27));
+ output_descriptors_constr.data[b] = output_descriptors_conv_27_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, output_descriptors, output_descriptors_vals, 0);
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
+ void* delay_until_height_ptr = untag_ptr(delay_until_height);
+ CHECK_ACCESS(delay_until_height_ptr);
+ LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr);
+ delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height));
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1tracked_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t y = 0; y < ret_var.datalen; y++) {
+ LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y];
+ int64_t ret_conv_24_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var);
+ ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned);
+ ret_arr_ptr[y] = ret_conv_24_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1current_1best_1block(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen");
+ *ret_ret = OutputSweeper_as_Listen(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Confirm(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm");
+ *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SpendingDelay_free(this_ptr_conv);
+}
+
+static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) {
+ LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+ *ret_copy = SpendingDelay_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg);
+ int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig);
+ LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+ *ret_copy = SpendingDelay_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1relative(JNIEnv *env, jclass clz, int32_t num_blocks) {
+ LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+ *ret_copy = SpendingDelay_relative(num_blocks);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1absolute(JNIEnv *env, jclass clz, int32_t height) {
+ LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+ *ret_copy = SpendingDelay_absolute(height);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ void* arg_a_ptr = untag_ptr(arg_a);
+ CHECK_ACCESS(arg_a_ptr);
+ LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr);
+ if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv);
+ }
+ void* arg_b_ptr = untag_ptr(arg_b);
+ CHECK_ACCESS(arg_b_ptr);
+ LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr);
+ if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFeeEstimator_JCalls_cloned(&arg_b_conv);
+ }
+ void* arg_c_ptr = untag_ptr(arg_c);
+ CHECK_ACCESS(arg_c_ptr);
+ LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr);
+ // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+ if (arg_c_conv.tag == LDKCOption_FilterZ_Some) {
+ // Manually implement clone for Java trait instances
+ if (arg_c_conv.some.free == LDKFilter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFilter_JCalls_cloned(&arg_c_conv.some);
+ }
+ }
+ void* arg_d_ptr = untag_ptr(arg_d);
+ CHECK_ACCESS(arg_d_ptr);
+ LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr);
+ if (arg_d_conv.free == LDKOutputSpender_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOutputSpender_JCalls_cloned(&arg_d_conv);
+ }
+ void* arg_e_ptr = untag_ptr(arg_e);
+ CHECK_ACCESS(arg_e_ptr);
+ LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr);
+ if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv);
+ }
+ void* arg_f_ptr = untag_ptr(arg_f);
+ CHECK_ACCESS(arg_f_ptr);
+ LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr);
+ if (arg_f_conv.free == LDKKVStore_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKKVStore_JCalls_cloned(&arg_f_conv);
+ }
+ void* arg_g_ptr = untag_ptr(arg_g);
+ CHECK_ACCESS(arg_g_ptr);
+ LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr);
+ if (arg_g_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&arg_g_conv);
+ }
+ LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+ *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ void* arg_a_ptr = untag_ptr(arg_a);
+ CHECK_ACCESS(arg_a_ptr);
+ LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr);
+ if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv);
+ }
+ void* arg_b_ptr = untag_ptr(arg_b);
+ CHECK_ACCESS(arg_b_ptr);
+ LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr);
+ if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFeeEstimator_JCalls_cloned(&arg_b_conv);
+ }
+ void* arg_c_ptr = untag_ptr(arg_c);
+ CHECK_ACCESS(arg_c_ptr);
+ LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr);
+ // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+ if (arg_c_conv.tag == LDKCOption_FilterZ_Some) {
+ // Manually implement clone for Java trait instances
+ if (arg_c_conv.some.free == LDKFilter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFilter_JCalls_cloned(&arg_c_conv.some);
+ }
+ }
+ void* arg_d_ptr = untag_ptr(arg_d);
+ CHECK_ACCESS(arg_d_ptr);
+ LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr);
+ if (arg_d_conv.free == LDKOutputSpender_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOutputSpender_JCalls_cloned(&arg_d_conv);
+ }
+ void* arg_e_ptr = untag_ptr(arg_e);
+ CHECK_ACCESS(arg_e_ptr);
+ LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr);
+ if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv);
+ }
+ void* arg_f_ptr = untag_ptr(arg_f);
+ CHECK_ACCESS(arg_f_ptr);
+ LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr);
+ if (arg_f_conv.free == LDKKVStore_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKKVStore_JCalls_cloned(&arg_f_conv);
+ }
+ void* arg_g_ptr = untag_ptr(arg_g);
+ CHECK_ACCESS(arg_g_ptr);
+ LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr);
+ if (arg_g_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&arg_g_conv);
+ }
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+ *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ FutureCallback_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKFuture this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Future_free(this_obj_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1register_1callback_1fn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t callback) {
LDKFuture this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv = Future_clone(&this_arg_conv);
- Future_wait(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ Future_wait(&this_arg_conv);
}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIEnv *env, jclass clz, int64_t this_arg, int64_t max_wait) {
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv = Future_clone(&this_arg_conv);
- jboolean ret_conv = Future_wait_timeout(this_arg_conv, max_wait);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = Future_wait_timeout(&this_arg_conv, max_wait);
return ret_conv;
}
future_conv.inner = untag_ptr(future);
future_conv.is_owned = ptr_is_owned(future);
CHECK_INNER_FIELD_ACCESS_OR_NULL(future_conv);
- future_conv = Future_clone(&future_conv);
- LDKSleeper ret_var = Sleeper_from_single_future(future_conv);
+ future_conv.is_owned = false;
+ LDKSleeper ret_var = Sleeper_from_single_future(&future_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
fut_a_conv.inner = untag_ptr(fut_a);
fut_a_conv.is_owned = ptr_is_owned(fut_a);
CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_a_conv);
- fut_a_conv = Future_clone(&fut_a_conv);
+ fut_a_conv.is_owned = false;
LDKFuture fut_b_conv;
fut_b_conv.inner = untag_ptr(fut_b);
fut_b_conv.is_owned = ptr_is_owned(fut_b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_b_conv);
- fut_b_conv = Future_clone(&fut_b_conv);
- LDKSleeper ret_var = Sleeper_from_two_futures(fut_a_conv, fut_b_conv);
+ fut_b_conv.is_owned = false;
+ LDKSleeper ret_var = Sleeper_from_two_futures(&fut_a_conv, &fut_b_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
futures_conv_8_conv.inner = untag_ptr(futures_conv_8);
futures_conv_8_conv.is_owned = ptr_is_owned(futures_conv_8);
CHECK_INNER_FIELD_ACCESS_OR_NULL(futures_conv_8_conv);
- futures_conv_8_conv = Future_clone(&futures_conv_8_conv);
+ // WARNING: we need a move here but no clone is available for LDKFuture
+
futures_constr.data[i] = futures_conv_8_conv;
}
(*env)->ReleaseLongArrayElements(env, futures, futures_vals, 0);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ");
- *ret_copy = Record_get_channel_id(&this_ptr_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr);
- val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val));
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
Record_set_channel_id(&this_ptr_conv, val_conv);
}
LDKPublicKey peer_id_arg_ref;
CHECK((*env)->GetArrayLength(env, peer_id_arg) == 33);
(*env)->GetByteArrayRegion(env, peer_id_arg, 0, 33, peer_id_arg_ref.compressed_form);
- void* channel_id_arg_ptr = untag_ptr(channel_id_arg);
- CHECK_ACCESS(channel_id_arg_ptr);
- LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr);
- channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg));
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKStr args_arg_conv = java_to_owned_str(env, args_arg);
LDKStr module_path_arg_conv = java_to_owned_str(env, module_path_arg);
LDKStr file_arg_conv = java_to_owned_str(env, file_arg);
BestBlock_free(this_obj_conv);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKBestBlock this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *BestBlock_get_block_hash(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKBestBlock this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ BestBlock_set_block_hash(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1height(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKBestBlock this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int32_t ret_conv = BestBlock_get_height(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1height(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+ LDKBestBlock this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ BestBlock_set_height(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash_arg, int32_t height_arg) {
+ LDKThirtyTwoBytes block_hash_arg_ref;
+ CHECK((*env)->GetArrayLength(env, block_hash_arg) == 32);
+ (*env)->GetByteArrayRegion(env, block_hash_arg, 0, 32, block_hash_arg_ref.data);
+ LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) {
LDKBestBlock ret_var = BestBlock_clone(arg);
int64_t ret_ref = 0;
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBestBlock o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = BestBlock_hash(&o_conv);
+ return ret_conv;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BestBlock_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
LDKBestBlock a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash, int32_t height) {
- LDKThirtyTwoBytes block_hash_ref;
- CHECK((*env)->GetArrayLength(env, block_hash) == 32);
- (*env)->GetByteArrayRegion(env, block_hash, 0, 32, block_hash_ref.data);
- LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1block_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
- LDKBestBlock this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, BestBlock_block_hash(&this_arg_conv).data);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKBestBlock obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
return ret_arr;
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1height(JNIEnv *env, jclass clz, int64_t this_arg) {
- LDKBestBlock this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- int32_t ret_conv = BestBlock_height(&this_arg_conv);
- return ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = BestBlock_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
return ret_conv;
}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1output_1spending_1fee(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKConfirmationTarget_to_java(env, ConfirmationTarget_output_spending_fee());
+ return ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1hash(JNIEnv *env, jclass clz, int64_t o) {
LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o);
int64_t ret_conv = ConfirmationTarget_hash(o_conv);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
+ LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
int64_tArray ret_arr = NULL;
ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t k = 0; k < ret_var.datalen; k++) {
- LDKOutPoint ret_conv_10_var = ret_var.data[k];
- int64_t ret_conv_10_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var);
- ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned);
- ret_arr_ptr[k] = ret_conv_10_ref;
+ for (size_t d = 0; d < ret_var.datalen; d++) {
+ LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+ *ret_conv_29_conv = ret_var.data[d];
+ ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
ChainMonitor_rebroadcast_pending_claims(&this_arg_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t monitor_opt) {
+ LDKChainMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKOutPoint monitor_opt_conv;
+ monitor_opt_conv.inner = untag_ptr(monitor_opt);
+ monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv);
+ monitor_opt_conv = OutPoint_clone(&monitor_opt_conv);
+ ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1archive_1fully_1resolved_1channel_1monitors(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChainMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKChainMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKChannelMonitorUpdate this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKChannelMonitorUpdate this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv);
+}
+
static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) {
LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg);
int64_t ret_ref = 0;
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed_1with_1info(JNIEnv *env, jclass clz, int64_t reason, int64_t outpoint, int64_t channel_id) {
+ void* reason_ptr = untag_ptr(reason);
+ CHECK_ACCESS(reason_ptr);
+ LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr);
+ reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason));
+ LDKOutPoint outpoint_conv;
+ outpoint_conv.inner = untag_ptr(outpoint);
+ outpoint_conv.is_owned = ptr_is_owned(outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
+ outpoint_conv = OutPoint_clone(&outpoint_conv);
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
+ LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+ *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed(JNIEnv *env, jclass clz, int64_t a) {
LDKOutPoint a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t channel_id, int64_t monitor_update_id) {
LDKOutPoint funding_txo_conv;
funding_txo_conv.inner = untag_ptr(funding_txo);
funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
- *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
+ *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChannelMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_arr;
}
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1broadcast_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
+ void* broadcaster_ptr = untag_ptr(broadcaster);
+ if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); }
+ LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr;
+ void* fee_estimator_ptr = untag_ptr(fee_estimator);
+ if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); }
+ LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr;
void* logger_ptr = untag_ptr(logger);
if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
- LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv);
- jobjectArray ret_arr = NULL;
- ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
- ;
- for (size_t i = 0; i < ret_var.datalen; i++) {
- LDKTransaction ret_conv_8_var = ret_var.data[i];
- int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, ret_conv_8_var.datalen);
- (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, ret_conv_8_var.datalen, ret_conv_8_var.data);
- Transaction_free(ret_conv_8_var);
- (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
- }
-
- FREE(ret_var.data);
- return ret_arr;
+ ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
}
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
+ LDKChannelMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ void* broadcaster_ptr = untag_ptr(broadcaster);
+ CHECK_ACCESS(broadcaster_ptr);
+ LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr);
+ if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv);
+ }
+ void* fee_estimator_ptr = untag_ptr(fee_estimator);
+ CHECK_ACCESS(fee_estimator_ptr);
+ LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr);
+ if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
+ }
+ void* logger_ptr = untag_ptr(logger);
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+ ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
+}
+
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx, int32_t confirmation_height) {
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_arr;
}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1is_1fully_1resolved(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) {
+ LDKChannelMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ void* logger_ptr = untag_ptr(logger);
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+ jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv);
+ return ret_conv;
+}
+
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1claimable_1balances(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
- LDKOutPoint this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, OutPoint_to_channel_id(&this_arg_conv).data);
- return ret_arr;
-}
-
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKOutPoint obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) {
+ LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKInboundHTLCErr arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKInboundHTLCErr orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInboundHTLCErr o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = InboundHTLCErr_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKInboundHTLCErr a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKInboundHTLCErr b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1payment_1onion(JNIEnv *env, jclass clz, int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) {
LDKUpdateAddHTLC msg_conv;
msg_conv.inner = untag_ptr(msg);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
LDKFinalOnionHopData payment_data_conv;
payment_data_conv.inner = untag_ptr(payment_data);
payment_data_conv.is_owned = ptr_is_owned(payment_data);
CHECK_ACCESS(payment_metadata_ptr);
LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr);
payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata));
+ void* payment_context_ptr = untag_ptr(payment_context);
+ CHECK_ACCESS(payment_context_ptr);
+ LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr);
+ payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context));
LDKThirtyTwoBytes phantom_shared_secret_ref;
CHECK((*env)->GetArrayLength(env, phantom_shared_secret) == 32);
(*env)->GetByteArrayRegion(env, phantom_shared_secret, 0, 32, phantom_shared_secret_ref.data);
}
(*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0);
LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
- *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error);
+ *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
LDKFinalOnionHopData payment_data_conv;
payment_data_conv.inner = untag_ptr(payment_data);
payment_data_conv.is_owned = ptr_is_owned(payment_data);
}
(*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0);
LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
- *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr);
+ *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
ChannelDetails_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKChannelDetails this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKChannelDetails this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ChannelDetails_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ChannelDetails_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty(JNIEnv *env, jclass clz, int64_t this_ptr) {
ChannelDetails_set_config(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t counterparty_arg, int64_t funding_txo_arg, int64_t channel_type_arg, int64_t short_channel_id_arg, int64_t outbound_scid_alias_arg, int64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, int64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, int64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, int64_t confirmations_required_arg, int64_t confirmations_arg, int64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, int64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKChannelCounterparty counterparty_arg_conv;
- counterparty_arg_conv.inner = untag_ptr(counterparty_arg);
- counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv);
- counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv);
- LDKOutPoint funding_txo_arg_conv;
- funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg);
- funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv);
- funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv);
- LDKChannelTypeFeatures channel_type_arg_conv;
- channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
- channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
- channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
- void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg);
- CHECK_ACCESS(short_channel_id_arg_ptr);
- LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr);
- short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg));
- void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg);
- CHECK_ACCESS(outbound_scid_alias_arg_ptr);
- LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr);
- outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg));
- void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg);
- CHECK_ACCESS(inbound_scid_alias_arg_ptr);
- LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr);
- inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg));
- void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg);
- CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr);
- LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr);
- LDKU128 user_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16);
- (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes);
- void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg);
- CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr);
- LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr);
- feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg));
- void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg);
- CHECK_ACCESS(confirmations_required_arg_ptr);
- LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr);
- confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg));
- void* confirmations_arg_ptr = untag_ptr(confirmations_arg);
- CHECK_ACCESS(confirmations_arg_ptr);
- LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr);
- confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg));
- void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg);
- CHECK_ACCESS(force_close_spend_delay_arg_ptr);
- LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr);
- force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg));
- void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg);
- CHECK_ACCESS(channel_shutdown_state_arg_ptr);
- LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr);
- channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg));
- void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg);
- CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr);
- LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr);
- inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg));
- void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg);
- CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr);
- LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr);
- inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg));
- LDKChannelConfig config_arg_conv;
- config_arg_conv.inner = untag_ptr(config_arg);
- config_arg_conv.is_owned = ptr_is_owned(config_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv);
- config_arg_conv = ChannelConfig_clone(&config_arg_conv);
- LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) {
LDKChannelDetails ret_var = ChannelDetails_clone(arg);
int64_t ret_ref = 0;
LDKU128 user_channel_id_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
- void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id);
- CHECK_ACCESS(temporary_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr);
- temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id));
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
LDKUserConfig override_config_conv;
override_config_conv.inner = untag_ptr(override_config);
override_config_conv.is_owned = ptr_is_owned(override_config);
CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv);
override_config_conv = UserConfig_clone(&override_config_conv);
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
*ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv);
return tag_ptr(ret_conv, true);
}
return ret_arr;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
- uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+ *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
- uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv);
shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv);
+ *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
- uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+ *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
- uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+ *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t temporary_channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
- uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
(*env)->GetByteArrayRegion(env, funding_transaction, 0, funding_transaction_ref.datalen, funding_transaction_ref.data);
funding_transaction_ref.data_is_owned = true;
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref);
+ *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref);
return tag_ptr(ret_conv, true);
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr;
+ LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr;
temporary_channels_constr.datalen = (*env)->GetArrayLength(env, temporary_channels);
if (temporary_channels_constr.datalen > 0)
- temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements");
+ temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements");
else
temporary_channels_constr.data = NULL;
int64_t* temporary_channels_vals = (*env)->GetLongArrayElements (env, temporary_channels, NULL);
- for (size_t j = 0; j < temporary_channels_constr.datalen; j++) {
- int64_t temporary_channels_conv_35 = temporary_channels_vals[j];
- void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35);
- CHECK_ACCESS(temporary_channels_conv_35_ptr);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr);
- temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35));
- temporary_channels_constr.data[j] = temporary_channels_conv_35_conv;
+ for (size_t e = 0; e < temporary_channels_constr.datalen; e++) {
+ int64_t temporary_channels_conv_30 = temporary_channels_vals[e];
+ void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30);
+ CHECK_ACCESS(temporary_channels_conv_30_ptr);
+ LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr);
+ temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30));
+ temporary_channels_constr.data[e] = temporary_channels_conv_30_conv;
}
(*env)->ReleaseLongArrayElements(env, temporary_channels, temporary_channels_vals, 0);
LDKTransaction funding_transaction_ref;
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config_update) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config_update) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
- LDKCVec_ThirtyTwoBytesZ channel_ids_constr;
+ LDKCVec_ChannelIdZ channel_ids_constr;
channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids);
if (channel_ids_constr.datalen > 0)
- channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+ channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
else
channel_ids_constr.data = NULL;
- for (size_t i = 0; i < channel_ids_constr.datalen; i++) {
- int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i);
- LDKThirtyTwoBytes channel_ids_conv_8_ref;
- CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32);
- (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data);
- channel_ids_constr.data[i] = channel_ids_conv_8_ref;
- }
+ int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL);
+ for (size_t l = 0; l < channel_ids_constr.datalen; l++) {
+ int64_t channel_ids_conv_11 = channel_ids_vals[l];
+ LDKChannelId channel_ids_conv_11_conv;
+ channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11);
+ channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv);
+ channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv);
+ channel_ids_constr.data[l] = channel_ids_conv_11_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0);
LDKChannelConfigUpdate config_update_conv;
config_update_conv.inner = untag_ptr(config_update);
config_update_conv.is_owned = ptr_is_owned(config_update);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
- LDKCVec_ThirtyTwoBytesZ channel_ids_constr;
+ LDKCVec_ChannelIdZ channel_ids_constr;
channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids);
if (channel_ids_constr.datalen > 0)
- channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+ channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
else
channel_ids_constr.data = NULL;
- for (size_t i = 0; i < channel_ids_constr.datalen; i++) {
- int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i);
- LDKThirtyTwoBytes channel_ids_conv_8_ref;
- CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32);
- (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data);
- channel_ids_constr.data[i] = channel_ids_conv_8_ref;
- }
+ int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL);
+ for (size_t l = 0; l < channel_ids_constr.datalen; l++) {
+ int64_t channel_ids_conv_11 = channel_ids_vals[l];
+ LDKChannelId channel_ids_conv_11_conv;
+ channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11);
+ channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv);
+ channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv);
+ channel_ids_constr.data[l] = channel_ids_conv_11_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0);
LDKChannelConfig config_conv;
config_conv.inner = untag_ptr(config);
config_conv.is_owned = ptr_is_owned(config);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
LDKThirtyTwoBytes intercept_id_ref;
CHECK((*env)->GetArrayLength(env, intercept_id) == 32);
(*env)->GetByteArrayRegion(env, intercept_id, 0, 32, intercept_id_ref.data);
- uint8_t next_hop_channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, next_hop_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, next_hop_channel_id, 0, 32, next_hop_channel_id_arr);
- uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr;
+ LDKChannelId next_hop_channel_id_conv;
+ next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id);
+ next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv);
+ next_hop_channel_id_conv.is_owned = false;
LDKPublicKey next_node_id_ref;
CHECK((*env)->GetArrayLength(env, next_node_id) == 33);
(*env)->GetByteArrayRegion(env, next_node_id, 0, 33, next_node_id_ref.compressed_form);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat);
+ *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat);
return tag_ptr(ret_conv, true);
}
return ret_arr;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t temporary_channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
- uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref);
+ *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t temporary_channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
- uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref);
+ *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1offer_1builder(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1refund_1builder(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+ (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+ void* retry_strategy_ptr = untag_ptr(retry_strategy);
+ CHECK_ACCESS(retry_strategy_ptr);
+ LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
+ retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
+ void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat);
+ CHECK_ACCESS(max_total_routing_fee_msat_ptr);
+ LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr);
+ max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat));
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv);
return tag_ptr(ret_conv, true);
}
refund_conv.is_owned = ptr_is_owned(refund);
CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv);
refund_conv.is_owned = false;
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
*ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_ret, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+ *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1init_1features(JNIEnv *env, jclass clz, int64_t config) {
LDKUserConfig config_conv;
config_conv.inner = untag_ptr(config);
return ret_arr;
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) {
+ LDKDelayedPaymentBasepoint this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKPublicKey per_commitment_point_ref;
+ CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33);
+ (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data);
+ return ret_arr;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKDelayedPaymentBasepoint obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_arr;
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) {
+ LDKHtlcBasepoint this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKPublicKey per_commitment_point_ref;
+ CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33);
+ (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data);
+ return ret_arr;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKHtlcBasepoint obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_add_1public_1key_1tweak(JNIEnv *env, jclass clz, int8_tArray base_point, int8_tArray tweak) {
+ LDKPublicKey base_point_ref;
+ CHECK((*env)->GetArrayLength(env, base_point) == 33);
+ (*env)->GetByteArrayRegion(env, base_point, 0, 33, base_point_ref.compressed_form);
+ uint8_t tweak_arr[32];
+ CHECK((*env)->GetArrayLength(env, tweak) == 32);
+ (*env)->GetByteArrayRegion(env, tweak, 0, 32, tweak_arr);
+ uint8_t (*tweak_ref)[32] = &tweak_arr;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevocationBasepoint_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKRevocationBasepoint this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1dangerous_1value(JNIEnv *env, jclass clz) {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_dangerous_value();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1hash(JNIEnv *env, jclass clz, int64_t o) {
LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o);
int64_t ret_conv = DecodeError_hash(o_conv);
ErrorMessage_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKErrorMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKErrorMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ErrorMessage_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ErrorMessage_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
ErrorMessage_set_data(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKStr data_arg_conv = java_to_owned_str(env, data_arg);
- LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv);
+ LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
WarningMessage_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKWarningMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *WarningMessage_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKWarningMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- WarningMessage_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ WarningMessage_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
WarningMessage_set_data(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKStr data_arg_conv = java_to_owned_str(env, data_arg);
- LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv);
+ LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKOpenChannel this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKCommonOpenChannelFields this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- OpenChannel_free(this_obj_conv);
+ CommonOpenChannelFields_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(&this_ptr_conv));
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv));
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKThirtyTwoBytes val_ref;
CHECK((*env)->GetArrayLength(env, val) == 32);
(*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- OpenChannel_set_chain_hash(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_funding_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
- return ret_conv;
+ LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_push_msat(&this_ptr_conv, val);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv);
+ int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+ int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+ int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv);
+ int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val);
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv);
+ int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_feerate_per_kw(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
}
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv);
+ int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_to_self_delay(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val);
}
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv);
+ int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_payment_point(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv);
+ int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_channel_flags(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+ *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
CHECK_ACCESS(val_ptr);
LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+ CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv);
+ LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
val_conv = ChannelTypeFeatures_clone(&val_conv);
- OpenChannel_set_channel_type(&this_ptr_conv, val_conv);
+ CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
LDKThirtyTwoBytes chain_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+ LDKChannelId temporary_channel_id_arg_conv;
+ temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+ temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+ temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
LDKPublicKey funding_pubkey_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
(*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
LDKPublicKey revocation_basepoint_arg_ref;
CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
(*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
- LDKPublicKey payment_point_arg_ref;
- CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33);
- (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form);
+ LDKPublicKey payment_basepoint_arg_ref;
+ CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
+ (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
LDKPublicKey delayed_payment_basepoint_arg_ref;
CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
(*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
- LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) {
+ LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCommonOpenChannelFields arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCommonOpenChannelFields orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCommonOpenChannelFields o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKCommonOpenChannelFields a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKCommonOpenChannelFields b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOpenChannel this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OpenChannel_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCommonOpenChannelFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = CommonOpenChannelFields_clone(&val_conv);
+ OpenChannel_set_common_fields(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OpenChannel_set_push_msat(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) {
+ LDKCommonOpenChannelFields common_fields_arg_conv;
+ common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+ common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+ common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv);
+ LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
OpenChannelV2_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_chain_hash(&this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ LDKCommonOpenChannelFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = CommonOpenChannelFields_clone(&val_conv);
+ OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv);
}
JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val);
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_to_self_delay(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
OpenChannelV2_set_locktime(&this_ptr_conv, val);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_channel_flags(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
- val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = ChannelTypeFeatures_clone(&val_conv);
- OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv);
-}
-
JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) {
- LDKThirtyTwoBytes chain_hash_arg_ref;
- CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
- (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
- LDKPublicKey funding_pubkey_arg_ref;
- CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
- (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
- LDKPublicKey revocation_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
- LDKPublicKey payment_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
- LDKPublicKey delayed_payment_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
- LDKPublicKey htlc_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form);
- LDKPublicKey first_per_commitment_point_arg_ref;
- CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33);
- (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) {
+ LDKCommonOpenChannelFields common_fields_arg_conv;
+ common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+ common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+ common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv);
LDKPublicKey second_per_commitment_point_arg_ref;
CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33);
(*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form);
- void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
- CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
- LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
- shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
- LDKChannelTypeFeatures channel_type_arg_conv;
- channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
- channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
- channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg);
- LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
+ LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKAcceptChannel this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKCommonAcceptChannelFields this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- AcceptChannel_free(this_obj_conv);
+ CommonAcceptChannelFields_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv);
+ int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+ int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+ int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv);
+ int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val);
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv);
+ int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_minimum_depth(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val);
}
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv);
+ int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_to_self_delay(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val);
}
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKAcceptChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_payment_point(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+ *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
CHECK_ACCESS(val_ptr);
LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+ CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv);
+ LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
val_conv = ChannelTypeFeatures_clone(&val_conv);
- AcceptChannel_set_channel_type(&this_ptr_conv, val_conv);
+ CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
+ LDKChannelId temporary_channel_id_arg_conv;
+ temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+ temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+ temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
LDKPublicKey funding_pubkey_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
(*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
LDKPublicKey revocation_basepoint_arg_ref;
CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
(*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
- LDKPublicKey payment_point_arg_ref;
- CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33);
- (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form);
+ LDKPublicKey payment_basepoint_arg_ref;
+ CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
+ (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
LDKPublicKey delayed_payment_basepoint_arg_ref;
CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
(*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
- LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) {
+ LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCommonAcceptChannelFields arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCommonAcceptChannelFields orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCommonAcceptChannelFields o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKCommonAcceptChannelFields a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKCommonAcceptChannelFields b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKAcceptChannel this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ AcceptChannel_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCommonAcceptChannelFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = CommonAcceptChannelFields_clone(&val_conv);
+ AcceptChannel_set_common_fields(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) {
+ LDKCommonAcceptChannelFields common_fields_arg_conv;
+ common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+ common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+ common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv);
+ LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
AcceptChannelV2_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKAcceptChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKAcceptChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ LDKCommonAcceptChannelFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = CommonAcceptChannelFields_clone(&val_conv);
+ AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKAcceptChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
- val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = ChannelTypeFeatures_clone(&val_conv);
- AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv);
-}
-
JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKAcceptChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) {
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
- LDKPublicKey funding_pubkey_arg_ref;
- CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
- (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
- LDKPublicKey revocation_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
- LDKPublicKey payment_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
- LDKPublicKey delayed_payment_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
- LDKPublicKey htlc_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form);
- LDKPublicKey first_per_commitment_point_arg_ref;
- CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33);
- (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) {
+ LDKCommonAcceptChannelFields common_fields_arg_conv;
+ common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+ common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+ common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv);
LDKPublicKey second_per_commitment_point_arg_ref;
CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33);
(*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form);
- void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
- CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
- LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
- shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
- LDKChannelTypeFeatures channel_type_arg_conv;
- channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
- channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
- channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg);
- LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
+ LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
FundingCreated_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKFundingCreated this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKFundingCreated this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
FundingCreated_set_signature(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) {
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) {
+ LDKChannelId temporary_channel_id_arg_conv;
+ temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+ temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+ temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
LDKThirtyTwoBytes funding_txid_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_txid_arg) == 32);
(*env)->GetByteArrayRegion(env, funding_txid_arg, 0, 32, funding_txid_arg_ref.data);
LDKECDSASignature signature_arg_ref;
CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
(*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
- LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref);
+ LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
FundingSigned_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKFundingSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingSigned_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKFundingSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- FundingSigned_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ FundingSigned_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
FundingSigned_set_signature(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKECDSASignature signature_arg_ref;
CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
(*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
- LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref);
+ LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
ChannelReady_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKChannelReady this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReady_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKChannelReady this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ChannelReady_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ChannelReady_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1next_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKPublicKey next_per_commitment_point_arg_ref;
CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33);
(*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form);
CHECK_ACCESS(short_channel_id_alias_arg_ptr);
LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr);
short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg));
- LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv);
+ LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
Stfu_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKStfu this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Stfu_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKStfu this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- Stfu_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ Stfu_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1initiator(JNIEnv *env, jclass clz, int64_t this_ptr) {
Stfu_set_initiator(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_t initiator_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_t initiator_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
Splice_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKSplice this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Splice_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKSplice this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- Splice_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ Splice_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
Splice_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes chain_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
LDKPublicKey funding_pubkey_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
(*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
- LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref);
+ LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
SpliceAck_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKSpliceAck this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceAck_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKSpliceAck this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- SpliceAck_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ SpliceAck_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes chain_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
LDKPublicKey funding_pubkey_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
(*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
- LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref);
+ LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
SpliceLocked_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKSpliceLocked this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceLocked_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKSpliceLocked this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- SpliceLocked_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ SpliceLocked_set_channel_id(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxAddInput_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxAddInput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddInput_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxAddInput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxAddInput_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxAddInput_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxAddInput_set_sequence(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKTransactionU16LenLimited prevtx_arg_conv;
prevtx_arg_conv.inner = untag_ptr(prevtx_arg);
prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv);
prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv);
- LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg);
+ LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxAddOutput_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxAddOutput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddOutput_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxAddOutput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxAddOutput_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxAddOutput_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxAddOutput_set_script(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKCVec_u8Z script_arg_ref;
script_arg_ref.datalen = (*env)->GetArrayLength(env, script_arg);
script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, script_arg, 0, script_arg_ref.datalen, script_arg_ref.data);
- LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref);
+ LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxRemoveInput_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxRemoveInput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveInput_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxRemoveInput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxRemoveInput_set_serial_id(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxRemoveOutput_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxRemoveOutput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveOutput_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxRemoveOutput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxRemoveOutput_set_serial_id(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxComplete_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxComplete this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxComplete_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxComplete this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxComplete_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxComplete_set_channel_id(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxSignatures_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxSignatures this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxSignatures_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxSignatures this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxSignatures_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxSignatures_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1tx_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxSignatures_set_witnesses(&this_ptr_conv, val_constr);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTxSignatures this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKTxSignatures this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr);
+ val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val));
+ TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg, int64_t funding_outpoint_sig_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes tx_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, tx_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, tx_hash_arg, 0, 32, tx_hash_arg_ref.data);
witnesses_arg_conv_8_ref.data_is_owned = true;
witnesses_arg_constr.data[i] = witnesses_arg_conv_8_ref;
}
- LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr);
+ void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg);
+ CHECK_ACCESS(funding_outpoint_sig_arg_ptr);
+ LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr);
+ funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg));
+ LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxInitRbf_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxInitRbf this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxInitRbf_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxInitRbf this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxInitRbf_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxInitRbf_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg);
CHECK_ACCESS(funding_output_contribution_arg_ptr);
LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr);
funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg));
- LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv);
+ LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxAckRbf_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxAckRbf this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAckRbf_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxAckRbf this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxAckRbf_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxAckRbf_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1funding_1output_1contribution(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t funding_output_contribution_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t funding_output_contribution_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg);
CHECK_ACCESS(funding_output_contribution_arg_ptr);
LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr);
funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg));
- LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv);
+ LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxAbort_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxAbort this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAbort_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxAbort this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxAbort_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxAbort_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxAbort_set_data(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray data_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray data_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKCVec_u8Z data_arg_ref;
data_arg_ref.datalen = (*env)->GetArrayLength(env, data_arg);
data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, data_arg, 0, data_arg_ref.datalen, data_arg_ref.data);
- LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref);
+ LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
Shutdown_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKShutdown this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Shutdown_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKShutdown this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- Shutdown_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ Shutdown_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray scriptpubkey_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKCVec_u8Z scriptpubkey_arg_ref;
scriptpubkey_arg_ref.datalen = (*env)->GetArrayLength(env, scriptpubkey_arg);
scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, scriptpubkey_arg, 0, scriptpubkey_arg_ref.datalen, scriptpubkey_arg_ref.data);
- LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref);
+ LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
ClosingSigned_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKClosingSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKClosingSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ClosingSigned_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ClosingSigned_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
ClosingSigned_set_fee_range(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKECDSASignature signature_arg_ref;
CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
(*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv);
fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv);
- LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv);
+ LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UpdateAddHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateAddHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateAddHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes payment_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, payment_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, payment_hash_arg, 0, 32, payment_hash_arg_ref.data);
LDKPublicKey blinding_point_arg_ref;
CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33);
(*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form);
- LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref);
+ LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UpdateFulfillHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateFulfillHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateFulfillHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes payment_preimage_arg_ref;
CHECK((*env)->GetArrayLength(env, payment_preimage_arg) == 32);
(*env)->GetByteArrayRegion(env, payment_preimage_arg, 0, 32, payment_preimage_arg_ref.data);
- LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref);
+ LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UpdateFailHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateFailHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateFailHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
UpdateFailMalformedHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateFailMalformedHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateFailMalformedHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
CommitmentSigned_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKCommitmentSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKCommitmentSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKECDSASignature signature_arg_ref;
CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
(*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
(*env)->GetByteArrayRegion(env, htlc_signatures_arg_conv_8, 0, 64, htlc_signatures_arg_conv_8_ref.compact_form);
htlc_signatures_arg_constr.data[i] = htlc_signatures_arg_conv_8_ref;
}
- LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr);
+ LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
RevokeAndACK_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKRevokeAndACK this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKRevokeAndACK this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_ptr) {
RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes per_commitment_secret_arg_ref;
CHECK((*env)->GetArrayLength(env, per_commitment_secret_arg) == 32);
(*env)->GetByteArrayRegion(env, per_commitment_secret_arg, 0, 32, per_commitment_secret_arg_ref.data);
LDKPublicKey next_per_commitment_point_arg_ref;
CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33);
(*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form);
- LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref);
+ LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UpdateFee_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateFee this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFee_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateFee this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateFee_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateFee_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) {
UpdateFee_set_feerate_per_kw(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t feerate_per_kw_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
ChannelReestablish_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKChannelReestablish this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKChannelReestablish this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) {
ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref;
CHECK((*env)->GetArrayLength(env, your_last_per_commitment_secret_arg) == 32);
(*env)->GetByteArrayRegion(env, your_last_per_commitment_secret_arg, 0, 32, your_last_per_commitment_secret_arg_ref.data);
CHECK_ACCESS(next_funding_txid_arg_ptr);
LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr);
next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg));
- LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv);
+ LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
AnnouncementSignatures_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKAnnouncementSignatures this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKAnnouncementSignatures this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKECDSASignature node_signature_arg_ref;
CHECK((*env)->GetArrayLength(env, node_signature_arg) == 64);
(*env)->GetByteArrayRegion(env, node_signature_arg, 0, 64, node_signature_arg_ref.compact_form);
LDKECDSASignature bitcoin_signature_arg_ref;
CHECK((*env)->GetArrayLength(env, bitcoin_signature_arg) == 64);
(*env)->GetByteArrayRegion(env, bitcoin_signature_arg, 0, 64, bitcoin_signature_arg_ref.compact_form);
- LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref);
+ LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z val_ref;
+ val_ref.datalen = (*env)->GetArrayLength(env, val);
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+ UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z val_ref;
+ val_ref.datalen = (*env)->GetArrayLength(env, val);
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+ UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1new(JNIEnv *env, jclass clz, int64_t features_arg, int32_t timestamp_arg, int64_t node_id_arg, int8_tArray rgb_arg, int64_t alias_arg, int64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) {
+ LDKNodeFeatures features_arg_conv;
+ features_arg_conv.inner = untag_ptr(features_arg);
+ features_arg_conv.is_owned = ptr_is_owned(features_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv);
+ features_arg_conv = NodeFeatures_clone(&features_arg_conv);
+ LDKNodeId node_id_arg_conv;
+ node_id_arg_conv.inner = untag_ptr(node_id_arg);
+ node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv);
+ node_id_arg_conv = NodeId_clone(&node_id_arg_conv);
+ LDKThreeBytes rgb_arg_ref;
+ CHECK((*env)->GetArrayLength(env, rgb_arg) == 3);
+ (*env)->GetByteArrayRegion(env, rgb_arg, 0, 3, rgb_arg_ref.data);
+ LDKNodeAlias alias_arg_conv;
+ alias_arg_conv.inner = untag_ptr(alias_arg);
+ alias_arg_conv.is_owned = ptr_is_owned(alias_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv);
+ alias_arg_conv = NodeAlias_clone(&alias_arg_conv);
+ LDKCVec_SocketAddressZ addresses_arg_constr;
+ addresses_arg_constr.datalen = (*env)->GetArrayLength(env, addresses_arg);
+ if (addresses_arg_constr.datalen > 0)
+ addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements");
+ else
+ addresses_arg_constr.data = NULL;
+ int64_t* addresses_arg_vals = (*env)->GetLongArrayElements (env, addresses_arg, NULL);
+ for (size_t p = 0; p < addresses_arg_constr.datalen; p++) {
+ int64_t addresses_arg_conv_15 = addresses_arg_vals[p];
+ void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15);
+ CHECK_ACCESS(addresses_arg_conv_15_ptr);
+ LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr);
+ addresses_arg_constr.data[p] = addresses_arg_conv_15_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, addresses_arg, addresses_arg_vals, 0);
+ LDKCVec_u8Z excess_address_data_arg_ref;
+ excess_address_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_address_data_arg);
+ excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, excess_address_data_arg, 0, excess_address_data_arg_ref.datalen, excess_address_data_arg_ref.data);
+ LDKCVec_u8Z excess_data_arg_ref;
+ excess_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_data_arg);
+ excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, excess_data_arg, 0, excess_data_arg_ref.datalen, excess_data_arg_ref.data);
+ LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) {
LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg);
int64_t ret_ref = 0;
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKTrampolineOnionPacket this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ TrampolineOnionPacket_free(this_obj_conv);
+}
+
+JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1version(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1version(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ TrampolineOnionPacket_set_version(&this_ptr_conv, val);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 33);
+ (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+ TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z val_ref;
+ val_ref.datalen = (*env)->GetArrayLength(env, val);
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+ TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TrampolineOnionPacket_get_hmac(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1new(JNIEnv *env, jclass clz, int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) {
+ LDKPublicKey public_key_arg_ref;
+ CHECK((*env)->GetArrayLength(env, public_key_arg) == 33);
+ (*env)->GetByteArrayRegion(env, public_key_arg, 0, 33, public_key_arg_ref.compressed_form);
+ LDKCVec_u8Z hop_data_arg_ref;
+ hop_data_arg_ref.datalen = (*env)->GetArrayLength(env, hop_data_arg);
+ hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, hop_data_arg, 0, hop_data_arg_ref.datalen, hop_data_arg_ref.data);
+ LDKThirtyTwoBytes hmac_arg_ref;
+ CHECK((*env)->GetArrayLength(env, hmac_arg) == 32);
+ (*env)->GetByteArrayRegion(env, hmac_arg, 0, 32, hmac_arg_ref.data);
+ LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) {
+ LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKTrampolineOnionPacket arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKTrampolineOnionPacket orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKTrampolineOnionPacket o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKTrampolineOnionPacket a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKTrampolineOnionPacket b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKTrampolineOnionPacket obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKAcceptChannel obj_conv;
obj_conv.inner = untag_ptr(obj);
SocketDescriptor_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKPeerDetails this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ PeerDetails_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 33);
+ (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+ PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
+ *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr);
+ val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val));
+ PeerDetails_set_socket_address(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInitFeatures val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = InitFeatures_clone(&val_conv);
+ PeerDetails_set_init_features(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ PeerDetails_set_is_inbound_connection(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1new(JNIEnv *env, jclass clz, int8_tArray counterparty_node_id_arg, int64_t socket_address_arg, int64_t init_features_arg, jboolean is_inbound_connection_arg) {
+ LDKPublicKey counterparty_node_id_arg_ref;
+ CHECK((*env)->GetArrayLength(env, counterparty_node_id_arg) == 33);
+ (*env)->GetByteArrayRegion(env, counterparty_node_id_arg, 0, 33, counterparty_node_id_arg_ref.compressed_form);
+ void* socket_address_arg_ptr = untag_ptr(socket_address_arg);
+ CHECK_ACCESS(socket_address_arg_ptr);
+ LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr);
+ LDKInitFeatures init_features_arg_conv;
+ init_features_arg_conv.inner = untag_ptr(init_features_arg);
+ init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv);
+ init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv);
+ LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKPeerHandleError this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1list_1peers(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKPeerManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv);
+ LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv);
int64_tArray ret_arr = NULL;
ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t r = 0; r < ret_var.datalen; r++) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
- *ret_conv_43_conv = ret_var.data[r];
- ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true);
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKPeerDetails ret_conv_13_var = ret_var.data[n];
+ int64_t ret_conv_13_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var);
+ ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned);
+ ret_arr_ptr[n] = ret_conv_13_ref;
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
return ret_arr;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1peer_1by_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id) {
+ LDKPeerManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKPublicKey their_node_id_ref;
+ CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+ (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+ LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1outbound_1connection(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t descriptor, int64_t remote_network_address) {
LDKPeerManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ InitFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ InitFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ NodeFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ NodeFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11InvoiceFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11InvoiceFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11InvoiceFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11InvoiceFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKShutdownScript this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKChannelId this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ChannelId_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKChannelId this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelId_get_a(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKChannelId this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ ChannelId_set_a(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) {
+ LDKThirtyTwoBytes a_arg_ref;
+ CHECK((*env)->GetArrayLength(env, a_arg) == 32);
+ (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data);
+ LDKChannelId ret_var = ChannelId_new(a_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) {
+ LDKChannelId ret_var = ChannelId_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKChannelId arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = ChannelId_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKChannelId orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelId_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKChannelId a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelId b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKChannelId o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ChannelId_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1txid(JNIEnv *env, jclass clz, int8_tArray txid, int16_t output_index) {
+ uint8_t txid_arr[32];
+ CHECK((*env)->GetArrayLength(env, txid) == 32);
+ (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr);
+ uint8_t (*txid_ref)[32] = &txid_arr;
+ LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1outpoint(JNIEnv *env, jclass clz, int64_t outpoint) {
+ LDKOutPoint outpoint_conv;
+ outpoint_conv.inner = untag_ptr(outpoint);
+ outpoint_conv.is_owned = ptr_is_owned(outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
+ outpoint_conv = OutPoint_clone(&outpoint_conv);
+ LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1from_1entropy_1source(JNIEnv *env, jclass clz, int64_t entropy_source) {
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+ LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1from_1bytes(JNIEnv *env, jclass clz, int8_tArray data) {
+ LDKThirtyTwoBytes data_ref;
+ CHECK((*env)->GetArrayLength(env, data) == 32);
+ (*env)->GetByteArrayRegion(env, data, 0, 32, data_ref.data);
+ LDKChannelId ret_var = ChannelId_from_bytes(data_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new_1zero(JNIEnv *env, jclass clz) {
+ LDKChannelId ret_var = ChannelId_new_zero();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1is_1zero(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChannelId this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = ChannelId_is_zero(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v2_1from_1revocation_1basepoints(JNIEnv *env, jclass clz, int64_t ours, int64_t theirs) {
+ LDKRevocationBasepoint ours_conv;
+ ours_conv.inner = untag_ptr(ours);
+ ours_conv.is_owned = ptr_is_owned(ours);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv);
+ ours_conv.is_owned = false;
+ LDKRevocationBasepoint theirs_conv;
+ theirs_conv.inner = untag_ptr(theirs);
+ theirs_conv.is_owned = ptr_is_owned(theirs);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv);
+ theirs_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1v2_1from_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t our_revocation_basepoint) {
+ LDKRevocationBasepoint our_revocation_basepoint_conv;
+ our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint);
+ our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv);
+ our_revocation_basepoint_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKChannelId obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = ChannelId_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Retry_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
Type_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOfferId this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OfferId_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKOfferId this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OfferId_get_a(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKOfferId this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ OfferId_set_a(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) {
+ LDKThirtyTwoBytes a_arg_ref;
+ CHECK((*env)->GetArrayLength(env, a_arg) == 32);
+ (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data);
+ LDKOfferId ret_var = OfferId_new(a_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) {
+ LDKOfferId ret_var = OfferId_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKOfferId arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = OfferId_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKOfferId orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKOfferId ret_var = OfferId_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OfferId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKOfferId a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKOfferId b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = OfferId_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKOfferId obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = OfferId_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = OfferId_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOfferWithExplicitMetadataBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OfferWithExplicitMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) {
+ LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKOfferWithExplicitMetadataBuilder arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKOfferWithExplicitMetadataBuilder orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOfferWithDerivedMetadataBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OfferWithDerivedMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) {
+ LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKOfferWithDerivedMetadataBuilder arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKOfferWithDerivedMetadataBuilder orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray signing_pubkey) {
+ LDKPublicKey signing_pubkey_ref;
+ CHECK((*env)->GetArrayLength(env, signing_pubkey) == 33);
+ (*env)->GetByteArrayRegion(env, signing_pubkey, 0, 33, signing_pubkey_ref.compressed_form);
+ LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKCVec_u8Z metadata_ref;
+ metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+ metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKStr description_conv = java_to_owned_str(env, description);
+ OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKStr issuer_conv = java_to_owned_str(env, issuer);
+ OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKBlindedPath path_conv;
+ path_conv.inner = untag_ptr(path);
+ path_conv.is_owned = ptr_is_owned(path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+ path_conv = BlindedPath_clone(&path_conv);
+ OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ void* quantity_ptr = untag_ptr(quantity);
+ CHECK_ACCESS(quantity_ptr);
+ LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr);
+ quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity));
+ OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1deriving_1signing_1pubkey(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source) {
+ LDKPublicKey node_id_ref;
+ CHECK((*env)->GetArrayLength(env, node_id) == 33);
+ (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+ LDKExpandedKey expanded_key_conv;
+ expanded_key_conv.inner = untag_ptr(expanded_key);
+ expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+ expanded_key_conv.is_owned = false;
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
+ LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr description_conv = java_to_owned_str(env, description);
+ OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr issuer_conv = java_to_owned_str(env, issuer);
+ OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKBlindedPath path_conv;
+ path_conv.inner = untag_ptr(path);
+ path_conv.is_owned = ptr_is_owned(path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+ path_conv = BlindedPath_clone(&path_conv);
+ OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ void* quantity_ptr = untag_ptr(quantity);
+ CHECK_ACCESS(quantity_ptr);
+ LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr);
+ quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity));
+ OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Offer_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKOffer this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = Offer_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = Offer_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Offer_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_arr;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOffer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKOfferId ret_var = Offer_id(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1supports_1chain(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray chain) {
LDKOffer this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1payer_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) {
+ LDKOffer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKExpandedKey expanded_key_conv;
+ expanded_key_conv.inner = untag_ptr(expanded_key);
+ expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+ expanded_key_conv.is_owned = false;
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+ (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) {
+ LDKOffer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKPublicKey payer_id_ref;
+ CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+ (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+ LDKExpandedKey expanded_key_conv;
+ expanded_key_conv.inner = untag_ptr(expanded_key);
+ expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+ expanded_key_conv.is_owned = false;
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+ (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata, int8_tArray payer_id) {
+ LDKOffer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_u8Z metadata_ref;
+ metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+ metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+ LDKPublicKey payer_id_ref;
+ CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+ (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOffer o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Offer_hash(&o_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKOffer obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKAmount this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- Amount_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ Amount_free(this_ptr_conv);
}
static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) {
- LDKAmount ret_var = Amount_clone(arg);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+ *ret_copy = Amount_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKAmount arg_conv;
- arg_conv.inner = untag_ptr(arg);
- arg_conv.is_owned = ptr_is_owned(arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
- arg_conv.is_owned = false;
- int64_t ret_conv = Amount_clone_ptr(&arg_conv);
+ LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg);
+ int64_t ret_conv = Amount_clone_ptr(arg_conv);
return ret_conv;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKAmount orig_conv;
- orig_conv.inner = untag_ptr(orig);
- orig_conv.is_owned = ptr_is_owned(orig);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
- orig_conv.is_owned = false;
- LDKAmount ret_var = Amount_clone(&orig_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig);
+ LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+ *ret_copy = Amount_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1bitcoin(JNIEnv *env, jclass clz, int64_t amount_msats) {
+ LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+ *ret_copy = Amount_bitcoin(amount_msats);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1currency(JNIEnv *env, jclass clz, int8_tArray iso4217_code, int64_t amount) {
+ LDKThreeBytes iso4217_code_ref;
+ CHECK((*env)->GetArrayLength(env, iso4217_code) == 3);
+ (*env)->GetByteArrayRegion(env, iso4217_code, 0, 3, iso4217_code_ref.data);
+ LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+ *ret_copy = Amount_currency(iso4217_code_ref, amount);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKQuantity this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ Quantity_free(this_ptr_conv);
+}
+
+static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) {
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg);
+ int64_t ret_conv = Quantity_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1bounded(JNIEnv *env, jclass clz, int64_t a) {
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_bounded(a);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1unbounded(JNIEnv *env, jclass clz) {
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_unbounded();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1one(JNIEnv *env, jclass clz) {
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_one();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) {
+ LDKStr s_conv = java_to_owned_str(env, s);
+ LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ");
+ *ret_conv = Offer_from_str(s_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- Quantity_free(this_obj_conv);
+ InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv);
}
-static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) {
- LDKQuantity ret_var = Quantity_clone(arg);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ uint8_t script_hash_arr[32];
+ CHECK((*env)->GetArrayLength(env, script_hash) == 32);
+ (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr);
+ uint8_t (*script_hash_ref)[32] = &script_hash_arr;
+ InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ uint8_t pubkey_hash_arr[20];
+ CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20);
+ (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr);
+ uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr;
+ InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ LDKTweakedPublicKey utput_key_ref;
+ CHECK((*env)->GetArrayLength(env, utput_key) == 32);
+ (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate);
+ InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ uint8_t script_hash_arr[32];
+ CHECK((*env)->GetArrayLength(env, script_hash) == 32);
+ (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr);
+ uint8_t (*script_hash_ref)[32] = &script_hash_arr;
+ InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ uint8_t pubkey_hash_arr[20];
+ CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20);
+ (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr);
+ uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr;
+ InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ LDKTweakedPublicKey utput_key_ref;
+ CHECK((*env)->GetArrayLength(env, utput_key) == 32);
+ (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate);
+ InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKUnsignedBolt12Invoice this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ UnsignedBolt12Invoice_free(this_obj_conv);
+}
+
+static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) {
+ LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKQuantity arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKUnsignedBolt12Invoice arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = Quantity_clone_ptr(&arg_conv);
+ int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKQuantity orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKUnsignedBolt12Invoice orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKQuantity ret_var = Quantity_clone(&orig_conv);
+ LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) {
- LDKStr s_conv = java_to_owned_str(env, s);
- LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ");
- *ret_conv = Offer_from_str(s_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKUnsignedBolt12Invoice this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- UnsignedBolt12Invoice_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SignBolt12InvoiceFn_free(this_ptr_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = Bolt12Invoice_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBolt12Invoice o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Bolt12Invoice_hash(&o_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKUnsignedBolt12Invoice obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+ InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+ InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKUnsignedInvoiceRequest this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
UnsignedInvoiceRequest_free(this_obj_conv);
}
+static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) {
+ LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKUnsignedInvoiceRequest arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKUnsignedInvoiceRequest orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SignInvoiceRequestFn_free(this_ptr_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKUnsignedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
VerifiedInvoiceRequest_free(this_obj_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKVerifiedInvoiceRequest this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKVerifiedInvoiceRequest this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOfferId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = OfferId_clone(&val_conv);
+ VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1keys(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKVerifiedInvoiceRequest this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = InvoiceRequest_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
LDKInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form);
- return ret_arr;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+ LDKInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+ return tag_ptr(ret_conv, true);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIEnv *env, jclass clz, int64_t this_arg, int64_t key) {
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form);
+ return ret_arr;
+}
+
JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1chains(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
+ LDKVerifiedInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = VerifiedInvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+ LDKVerifiedInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
+ LDKVerifiedInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+ LDKVerifiedInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKUnsignedInvoiceRequest obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_arr;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceRequestFields this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ InvoiceRequestFields_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 33);
+ (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+ InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr);
+ val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val));
+ InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKUntrustedString val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = UntrustedString_clone(&val_conv);
+ InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1new(JNIEnv *env, jclass clz, int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) {
+ LDKPublicKey payer_id_arg_ref;
+ CHECK((*env)->GetArrayLength(env, payer_id_arg) == 33);
+ (*env)->GetByteArrayRegion(env, payer_id_arg, 0, 33, payer_id_arg_ref.compressed_form);
+ void* quantity_arg_ptr = untag_ptr(quantity_arg);
+ CHECK_ACCESS(quantity_arg_ptr);
+ LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr);
+ quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg));
+ LDKUntrustedString payer_note_truncated_arg_conv;
+ payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg);
+ payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv);
+ payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv);
+ LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) {
+ LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKInvoiceRequestFields arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKInvoiceRequestFields orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKInvoiceRequestFields a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKInvoiceRequestFields b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKInvoiceRequestFields obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = InvoiceRequestFields_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TaggedHash_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKTaggedHash this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_arr;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SignError_free(this_ptr_conv);
+}
+
+static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) {
+ LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+ *ret_copy = SignError_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg);
+ int64_t ret_conv = SignError_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig);
+ LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+ *ret_copy = SignError_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1signing(JNIEnv *env, jclass clz) {
+ LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+ *ret_copy = SignError_signing();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1verification(JNIEnv *env, jclass clz, jclass a) {
+ LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_java(env, a);
+ LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+ *ret_copy = SignError_verification(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12ParseError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKBolt12ParseError this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_conv;
}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1unexpected_1paths(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_unexpected_paths());
+ return ret_conv;
+}
+
JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1invalid_1pay_1info(JNIEnv *env, jclass clz) {
jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_invalid_pay_info());
return ret_conv;
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) {
+ LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKRefundMaybeWithDerivedMetadataBuilder arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKRefundMaybeWithDerivedMetadataBuilder orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) {
+ LDKCVec_u8Z metadata_ref;
+ metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+ metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+ LDKPublicKey payer_id_ref;
+ CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+ (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1deriving_1payer_1id(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) {
+ LDKPublicKey node_id_ref;
+ CHECK((*env)->GetArrayLength(env, node_id) == 33);
+ (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+ LDKExpandedKey expanded_key_conv;
+ expanded_key_conv.inner = untag_ptr(expanded_key);
+ expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+ expanded_key_conv.is_owned = false;
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+ (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr description_conv = java_to_owned_str(env, description);
+ RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr issuer_conv = java_to_owned_str(env, issuer);
+ RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKBlindedPath path_conv;
+ path_conv.inner = untag_ptr(path);
+ path_conv.is_owned = ptr_is_owned(path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+ path_conv = BlindedPath_clone(&path_conv);
+ RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+ RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Refund_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKRefund this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKRefund o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Refund_hash(&o_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Refund_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKRefund obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1slice(JNIEnv *env, jclass clz, int8_tArray bytes) {
+ LDKu8slice bytes_ref;
+ bytes_ref.datalen = (*env)->GetArrayLength(env, bytes);
+ bytes_ref.data = (*env)->GetByteArrayElements (env, bytes, NULL);
+ LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
+ *ret_conv = NodeId_from_slice(bytes_ref);
+ (*env)->ReleaseByteArrayElements(env, bytes, (int8_t*)bytes_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeId_1as_1slice(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKNodeId this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1source(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKDirectedChannelInfo this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1target(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKDirectedChannelInfo this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EffectiveCapacity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_conv;
}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1is_1tor_1only(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeInfo this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKNodeInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelTransactionParameters val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelTransactionParameters_clone(&val_conv);
+ DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, int64_t channel_transaction_parameters_arg) {
LDKOutPoint outpoint_arg_conv;
outpoint_arg_conv.inner = untag_ptr(outpoint_arg);
outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg);
LDKThirtyTwoBytes channel_keys_id_arg_ref;
CHECK((*env)->GetArrayLength(env, channel_keys_id_arg) == 32);
(*env)->GetByteArrayRegion(env, channel_keys_id_arg, 0, 32, channel_keys_id_arg_ref.data);
- LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg);
+ LDKChannelTransactionParameters channel_transaction_parameters_arg_conv;
+ channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg);
+ channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv);
+ channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv);
+ LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKHTLCDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKHTLCDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1per_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1new(JNIEnv *env, jclass clz, int64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, int64_t htlc_arg, int64_t preimage_arg, int8_tArray counterparty_sig_arg) {
+ LDKChannelDerivationParameters channel_derivation_parameters_arg_conv;
+ channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg);
+ channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv);
+ channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv);
+ LDKThirtyTwoBytes commitment_txid_arg_ref;
+ CHECK((*env)->GetArrayLength(env, commitment_txid_arg) == 32);
+ (*env)->GetByteArrayRegion(env, commitment_txid_arg, 0, 32, commitment_txid_arg_ref.data);
+ LDKPublicKey per_commitment_point_arg_ref;
+ CHECK((*env)->GetArrayLength(env, per_commitment_point_arg) == 33);
+ (*env)->GetByteArrayRegion(env, per_commitment_point_arg, 0, 33, per_commitment_point_arg_ref.compressed_form);
+ LDKHTLCOutputInCommitment htlc_arg_conv;
+ htlc_arg_conv.inner = untag_ptr(htlc_arg);
+ htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv);
+ htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv);
+ void* preimage_arg_ptr = untag_ptr(preimage_arg);
+ CHECK_ACCESS(preimage_arg_ptr);
+ LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr);
+ preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg));
+ LDKECDSASignature counterparty_sig_arg_ref;
+ CHECK((*env)->GetArrayLength(env, counterparty_sig_arg) == 64);
+ (*env)->GetByteArrayRegion(env, counterparty_sig_arg, 0, 64, counterparty_sig_arg_ref.compact_form);
+ LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) {
LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg);
int64_t ret_ref = 0;
NodeSigner_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpender_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ OutputSpender_free(this_ptr_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
SignerProvider_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ ChangeDestinationSource_free(this_ptr_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKInMemorySigner this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
- descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
- if (descriptors_constr.datalen > 0)
- descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
- else
- descriptors_constr.data = NULL;
- int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
- for (size_t b = 0; b < descriptors_constr.datalen; b++) {
- int64_t descriptors_conv_27 = descriptors_vals[b];
- void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
- CHECK_ACCESS(descriptors_conv_27_ptr);
- LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
- descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
- descriptors_constr.data[b] = descriptors_conv_27_conv;
- }
- (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
- LDKCVec_TxOutZ outputs_constr;
- outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
- if (outputs_constr.datalen > 0)
- outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
- else
- outputs_constr.data = NULL;
- int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
- for (size_t h = 0; h < outputs_constr.datalen; h++) {
- int64_t outputs_conv_7 = outputs_vals[h];
- void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
- CHECK_ACCESS(outputs_conv_7_ptr);
- LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
- outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
- outputs_constr.data[h] = outputs_conv_7_conv;
- }
- (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
- LDKCVec_u8Z change_destination_script_ref;
- change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
- change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
- (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
- void* locktime_ptr = untag_ptr(locktime);
- CHECK_ACCESS(locktime_ptr);
- LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
- locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
- return tag_ptr(ret_conv, true);
+ LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
+ *ret_ret = KeysManager_as_EntropySource(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
- *ret_ret = KeysManager_as_EntropySource(&this_arg_conv);
+ LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner");
+ *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv);
return tag_ptr(ret_ret, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner");
- *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv);
+ LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+ *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv);
return tag_ptr(ret_ret, true);
}
return tag_ptr(ret_ret, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKPhantomKeysManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+ *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1SignerProvider(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKPhantomKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
- LDKPhantomKeysManager this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
- descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
- if (descriptors_constr.datalen > 0)
- descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
- else
- descriptors_constr.data = NULL;
- int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
- for (size_t b = 0; b < descriptors_constr.datalen; b++) {
- int64_t descriptors_conv_27 = descriptors_vals[b];
- void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
- CHECK_ACCESS(descriptors_conv_27_ptr);
- LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
- descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
- descriptors_constr.data[b] = descriptors_conv_27_conv;
- }
- (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
- LDKCVec_TxOutZ outputs_constr;
- outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
- if (outputs_constr.datalen > 0)
- outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
- else
- outputs_constr.data = NULL;
- int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
- for (size_t h = 0; h < outputs_constr.datalen; h++) {
- int64_t outputs_conv_7 = outputs_vals[h];
- void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
- CHECK_ACCESS(outputs_conv_7_ptr);
- LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
- outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
- outputs_constr.data[h] = outputs_conv_7_conv;
- }
- (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
- LDKCVec_u8Z change_destination_script_ref;
- change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
- change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
- (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
- void* locktime_ptr = untag_ptr(locktime);
- CHECK_ACCESS(locktime_ptr);
- LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
- locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1derive_1channel_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) {
LDKPhantomKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_arr;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RandomBytes_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKRandomBytes this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ RandomBytes_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1new(JNIEnv *env, jclass clz, int8_tArray seed) {
+ LDKThirtyTwoBytes seed_ref;
+ CHECK((*env)->GetArrayLength(env, seed) == 32);
+ (*env)->GetByteArrayRegion(env, seed, 0, 32, seed_ref.data);
+ LDKRandomBytes ret_var = RandomBytes_new(seed_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKRandomBytes this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
+ *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EcdsaChannelSigner_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKDestination* o_conv = (LDKDestination*)untag_ptr(o);
+ int64_t ret_conv = Destination_hash(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Destination_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKDestination* a_conv = (LDKDestination*)untag_ptr(a);
+ LDKDestination* b_conv = (LDKDestination*)untag_ptr(b);
+ jboolean ret_conv = Destination_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Destination_1resolve(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) {
+ LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg);
+ LDKReadOnlyNetworkGraph network_graph_conv;
+ network_graph_conv.inner = untag_ptr(network_graph);
+ network_graph_conv.is_owned = ptr_is_owned(network_graph);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ network_graph_conv.is_owned = false;
+ Destination_resolve(this_arg_conv, &network_graph_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SendSuccess_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o);
+ int64_t ret_conv = SendSuccess_hash(o_conv);
+ return ret_conv;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendSuccess_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a);
LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1unresolved_1introduction_1node(JNIEnv *env, jclass clz) {
+ LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+ *ret_copy = SendError_unresolved_introduction_node();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1advance_1failed(JNIEnv *env, jclass clz) {
LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
*ret_copy = SendError_blinded_path_advance_failed();
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKSendError* o_conv = (LDKSendError*)untag_ptr(o);
+ int64_t ret_conv = SendError_hash(o_conv);
+ return ret_conv;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
- LDKPublicKey a_ref;
- CHECK((*env)->GetArrayLength(env, a) == 33);
- (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr);
+ a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a));
LDKOnionMessage b_conv;
b_conv.inner = untag_ptr(b);
b_conv.is_owned = ptr_is_owned(b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
b_conv = OnionMessage_clone(&b_conv);
LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion");
- *ret_copy = PeeledOnion_forward(a_ref, b_conv);
+ *ret_copy = PeeledOnion_forward(a_conv, b_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t path, int64_t contents, int64_t reply_path) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message_1resolving_1destination(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t network_graph, int64_t path, int64_t contents, int64_t reply_path) {
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+ LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ void* node_signer_ptr = untag_ptr(node_signer);
+ if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); }
+ LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr;
+ void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+ if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); }
+ LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr;
+ LDKReadOnlyNetworkGraph network_graph_conv;
+ network_graph_conv.inner = untag_ptr(network_graph);
+ network_graph_conv.is_owned = ptr_is_owned(network_graph);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ network_graph_conv.is_owned = false;
+ LDKOnionMessagePath path_conv;
+ path_conv.inner = untag_ptr(path);
+ path_conv.is_owned = ptr_is_owned(path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+ path_conv = OnionMessagePath_clone(&path_conv);
+ void* contents_ptr = untag_ptr(contents);
+ CHECK_ACCESS(contents_ptr);
+ LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr);
+ if (contents_conv.free == LDKOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOnionMessageContents_JCalls_cloned(&contents_conv);
+ }
+ LDKBlindedPath reply_path_conv;
+ reply_path_conv.inner = untag_ptr(reply_path);
+ reply_path_conv.is_owned = ptr_is_owned(reply_path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
+ reply_path_conv = BlindedPath_clone(&reply_path_conv);
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+ *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t path, int64_t contents, int64_t reply_path) {
void* entropy_source_ptr = untag_ptr(entropy_source);
if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
void* node_signer_ptr = untag_ptr(node_signer);
if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); }
LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr;
+ void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+ if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); }
+ LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr;
LDKOnionMessagePath path_conv;
path_conv.inner = untag_ptr(path);
path_conv.is_owned = ptr_is_owned(path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
reply_path_conv = BlindedPath_clone(&reply_path_conv);
LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
- *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv);
+ *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t message_router, int64_t offers_handler, int64_t custom_handler) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t node_id_lookup, int64_t message_router, int64_t offers_handler, int64_t custom_handler) {
void* entropy_source_ptr = untag_ptr(entropy_source);
CHECK_ACCESS(entropy_source_ptr);
LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKLogger_JCalls_cloned(&logger_conv);
}
+ void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+ CHECK_ACCESS(node_id_lookup_ptr);
+ LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr);
+ if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv);
+ }
void* message_router_ptr = untag_ptr(message_router);
CHECK_ACCESS(message_router_ptr);
LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
}
- LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv);
+ LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
OnionMessageContents_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ NextMessageHop_free(this_ptr_conv);
+}
+
+static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) {
+ LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+ *ret_copy = NextMessageHop_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg);
+ int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig);
+ LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+ *ret_copy = NextMessageHop_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) {
+ LDKPublicKey a_ref;
+ CHECK((*env)->GetArrayLength(env, a) == 33);
+ (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+ LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+ *ret_copy = NextMessageHop_node_id(a_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t a) {
+ LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+ *ret_copy = NextMessageHop_short_channel_id(a);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o);
+ int64_t ret_conv = NextMessageHop_hash(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a);
+ LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b);
+ jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKBlindedPath this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
BlindedPath_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKBlindedPath this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form);
- return ret_arr;
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKBlindedPath this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref);
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr);
+ val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val));
+ BlindedPath_set_introduction_node(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1blinding_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) {
- LDKPublicKey introduction_node_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, introduction_node_id_arg) == 33);
- (*env)->GetByteArrayRegion(env, introduction_node_id_arg, 0, 33, introduction_node_id_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int64_t introduction_node_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) {
+ void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg);
+ CHECK_ACCESS(introduction_node_arg_ptr);
+ LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr);
+ introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg));
LDKPublicKey blinding_point_arg_ref;
CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33);
(*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form);
blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv;
}
(*env)->ReleaseLongArrayElements(env, blinded_hops_arg, blinded_hops_arg_vals, 0);
- LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr);
+ LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ IntroductionNode_free(this_ptr_conv);
+}
+
+static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) {
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = IntroductionNode_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg);
+ int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig);
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = IntroductionNode_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) {
+ LDKPublicKey a_ref;
+ CHECK((*env)->GetArrayLength(env, a) == 33);
+ (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = IntroductionNode_node_id(a_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1directed_1short_1channel_1id(JNIEnv *env, jclass clz, jclass a, int64_t b) {
+ LDKDirection a_conv = LDKDirection_from_java(env, a);
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o);
+ int64_t ret_conv = IntroductionNode_hash(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a);
+ LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b);
+ jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig);
+ jclass ret_conv = LDKDirection_to_java(env, Direction_clone(orig_conv));
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1one(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKDirection_to_java(env, Direction_node_one());
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1two(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKDirection_to_java(env, Direction_node_two());
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Direction_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKDirection* o_conv = (LDKDirection*)untag_ptr(o);
+ int64_t ret_conv = Direction_hash(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Direction_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKDirection* a_conv = (LDKDirection*)untag_ptr(a);
+ LDKDirection* b_conv = (LDKDirection*)untag_ptr(b);
+ jboolean ret_conv = Direction_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ NodeIdLookUp_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKEmptyNodeIdLookUp this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ EmptyNodeIdLookUp_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1new(JNIEnv *env, jclass clz) {
+ LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKEmptyNodeIdLookUp this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+ *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedHop_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKBlindedHop this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
CHECK((*env)->GetArrayLength(env, recipient_node_id) == 33);
(*env)->GetByteArrayRegion(env, recipient_node_id, 0, 33, recipient_node_id_ref.compressed_form);
void* entropy_source_ptr = untag_ptr(entropy_source);
- if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
- LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ");
*ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv);
return tag_ptr(ret_conv, true);
node_pks_constr.data[i] = node_pks_conv_8_ref;
}
void* entropy_source_ptr = untag_ptr(entropy_source);
- if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
- LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ");
*ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t entropy_source) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) {
LDKPublicKey payee_node_id_ref;
CHECK((*env)->GetArrayLength(env, payee_node_id) == 33);
(*env)->GetByteArrayRegion(env, payee_node_id, 0, 33, payee_node_id_ref.compressed_form);
CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv);
payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv);
void* entropy_source_ptr = untag_ptr(entropy_source);
- if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
- LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ");
- *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv);
+ *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int64_t entropy_source) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) {
LDKCVec_ForwardNodeZ intermediate_nodes_constr;
intermediate_nodes_constr.datalen = (*env)->GetArrayLength(env, intermediate_nodes);
if (intermediate_nodes_constr.datalen > 0)
CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv);
payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv);
void* entropy_source_ptr = untag_ptr(entropy_source);
- if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
- LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ");
- *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv);
+ *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1public_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) {
+ LDKBlindedPath this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKReadOnlyNetworkGraph network_graph_conv;
+ network_graph_conv.inner = untag_ptr(network_graph);
+ network_graph_conv.is_owned = ptr_is_owned(network_graph);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ network_graph_conv.is_owned = false;
+ LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKBlindedPath obj_conv;
obj_conv.inner = untag_ptr(obj);
ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKReceiveTlvs this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKReceiveTlvs this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr);
+ val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val));
+ ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) {
LDKThirtyTwoBytes payment_secret_arg_ref;
CHECK((*env)->GetArrayLength(env, payment_secret_arg) == 32);
(*env)->GetByteArrayRegion(env, payment_secret_arg, 0, 32, payment_secret_arg_ref.data);
payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv);
payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv);
- LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv);
+ void* payment_context_arg_ptr = untag_ptr(payment_context_arg);
+ CHECK_ACCESS(payment_context_arg_ptr);
+ LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr);
+ payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg));
+ LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ PaymentContext_free(this_ptr_conv);
+}
+
+static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) {
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg);
+ int64_t ret_conv = PaymentContext_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1unknown(JNIEnv *env, jclass clz, int64_t a) {
+ LDKUnknownPaymentContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = UnknownPaymentContext_clone(&a_conv);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_unknown(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1offer(JNIEnv *env, jclass clz, int64_t a) {
+ LDKBolt12OfferContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = Bolt12OfferContext_clone(&a_conv);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_bolt12_offer(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1refund(JNIEnv *env, jclass clz, int64_t a) {
+ LDKBolt12RefundContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = Bolt12RefundContext_clone(&a_conv);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_bolt12_refund(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a);
+ LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b);
+ jboolean ret_conv = PaymentContext_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKUnknownPaymentContext this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ UnknownPaymentContext_free(this_obj_conv);
+}
+
+static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) {
+ LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKUnknownPaymentContext arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKUnknownPaymentContext orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKUnknownPaymentContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUnknownPaymentContext b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKBolt12OfferContext this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Bolt12OfferContext_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKBolt12OfferContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKBolt12OfferContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOfferId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = OfferId_clone(&val_conv);
+ Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKBolt12OfferContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKBolt12OfferContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInvoiceRequestFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = InvoiceRequestFields_clone(&val_conv);
+ Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1new(JNIEnv *env, jclass clz, int64_t offer_id_arg, int64_t invoice_request_arg) {
+ LDKOfferId offer_id_arg_conv;
+ offer_id_arg_conv.inner = untag_ptr(offer_id_arg);
+ offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv);
+ offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv);
+ LDKInvoiceRequestFields invoice_request_arg_conv;
+ invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg);
+ invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv);
+ invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv);
+ LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) {
+ LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKBolt12OfferContext arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKBolt12OfferContext orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKBolt12OfferContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKBolt12OfferContext b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKBolt12RefundContext this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Bolt12RefundContext_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1new(JNIEnv *env, jclass clz) {
+ LDKBolt12RefundContext ret_var = Bolt12RefundContext_new();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) {
+ LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKBolt12RefundContext arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKBolt12RefundContext orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKBolt12RefundContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKBolt12RefundContext b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ForwardTlvs_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKForwardTlvs obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = PaymentContext_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKUnknownPaymentContext obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = UnknownPaymentContext_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKBolt12OfferContext obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = Bolt12OfferContext_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKBolt12RefundContext obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = Bolt12RefundContext_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt11_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) {
+ void* payment_preimage_ptr = untag_ptr(payment_preimage);
+ CHECK_ACCESS(payment_preimage_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
+ payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage));
+ LDKThirtyTwoBytes payment_secret_ref;
+ CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
+ (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+ LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
+ *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1offer_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) {
void* payment_preimage_ptr = untag_ptr(payment_preimage);
CHECK_ACCESS(payment_preimage_ptr);
LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
LDKThirtyTwoBytes payment_secret_ref;
CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
(*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+ LDKBolt12OfferContext payment_context_conv;
+ payment_context_conv.inner = untag_ptr(payment_context);
+ payment_context_conv.is_owned = ptr_is_owned(payment_context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv);
+ payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv);
LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
- *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref);
+ *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1refund_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) {
+ void* payment_preimage_ptr = untag_ptr(payment_preimage);
+ CHECK_ACCESS(payment_preimage_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
+ payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage));
+ LDKThirtyTwoBytes payment_secret_ref;
+ CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
+ (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+ LDKBolt12RefundContext payment_context_conv;
+ payment_context_conv.inner = untag_ptr(payment_context);
+ payment_context_conv.is_owned = ptr_is_owned(payment_context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv);
+ payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv);
+ LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
+ *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
ClaimedHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKClaimedHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClaimedHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKClaimedHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1user_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKU128 user_channel_id_arg_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes);
- LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
+ LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1cooperative_1closure(JNIEnv *env, jclass clz) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1legacy_1cooperative_1closure(JNIEnv *env, jclass clz) {
+ LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+ *ret_copy = ClosureReason_legacy_cooperative_closure();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) {
LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
- *ret_copy = ClosureReason_cooperative_closure();
+ *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1locally_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) {
+ LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+ *ret_copy = ClosureReason_locally_initiated_cooperative_closure();
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1htlcs_1timed_1out(JNIEnv *env, jclass clz) {
+ LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+ *ret_copy = ClosureReason_htlcs_timed_out();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosureReason_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int8_tArray channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t channel_id) {
LDKPublicKey node_id_ref;
CHECK((*env)->GetArrayLength(env, node_id) == 33);
(*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination");
- *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref);
+ *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1onion(JNIEnv *env, jclass clz) {
+ LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination");
+ *ret_copy = HTLCDestination_invalid_onion();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1failed_1payment(JNIEnv *env, jclass clz, int8_tArray payment_hash) {
LDKThirtyTwoBytes payment_hash_ref;
CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) {
- LDKThirtyTwoBytes temporary_channel_id_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) {
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref);
+ *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
CHECK_ACCESS(purpose_ptr);
LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr);
purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose));
- void* via_channel_id_ptr = untag_ptr(via_channel_id);
- CHECK_ACCESS(via_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr);
- via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id));
+ LDKChannelId via_channel_id_conv;
+ via_channel_id_conv.inner = untag_ptr(via_channel_id);
+ via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv);
+ via_channel_id_conv = ChannelId_clone(&via_channel_id_conv);
void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id);
CHECK_ACCESS(via_user_channel_id_ptr);
LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr);
outputs_constr.data[b] = outputs_conv_27_conv;
}
(*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
- void* channel_id_ptr = untag_ptr(channel_id);
- CHECK_ACCESS(channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr);
- channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id));
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
*ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t fee_earned_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) {
- void* prev_channel_id_ptr = untag_ptr(prev_channel_id);
- CHECK_ACCESS(prev_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr);
- prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id));
- void* next_channel_id_ptr = untag_ptr(next_channel_id);
- CHECK_ACCESS(next_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr);
- next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id));
- void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat);
- CHECK_ACCESS(fee_earned_msat_ptr);
- LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr);
- fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat));
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int64_t total_fee_earned_msat, int64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) {
+ LDKChannelId prev_channel_id_conv;
+ prev_channel_id_conv.inner = untag_ptr(prev_channel_id);
+ prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv);
+ prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv);
+ LDKChannelId next_channel_id_conv;
+ next_channel_id_conv.inner = untag_ptr(next_channel_id);
+ next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv);
+ next_channel_id_conv = ChannelId_clone(&next_channel_id_conv);
+ void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id);
+ CHECK_ACCESS(prev_user_channel_id_ptr);
+ LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr);
+ prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id));
+ void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id);
+ CHECK_ACCESS(next_user_channel_id_ptr);
+ LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr);
+ next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id));
+ void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat);
+ CHECK_ACCESS(total_fee_earned_msat_ptr);
+ LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr);
+ total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat));
+ void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat);
+ CHECK_ACCESS(skimmed_fee_msat_ptr);
+ LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr);
+ skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat));
void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat);
CHECK_ACCESS(outbound_amount_forwarded_msat_ptr);
LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr);
outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv);
+ *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo) {
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo, int64_t channel_type) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKU128 user_channel_id_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
- void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id);
- CHECK_ACCESS(former_temporary_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr);
- former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id));
+ LDKChannelId former_temporary_channel_id_conv;
+ former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id);
+ former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv);
+ former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+ LDKChannelTypeFeatures channel_type_conv;
+ channel_type_conv.inner = untag_ptr(channel_type);
+ channel_type_conv.is_owned = ptr_is_owned(channel_type);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
+ channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv);
+ *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) {
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKU128 user_channel_id_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv);
+ *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) {
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKU128 user_channel_id_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv);
channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv);
+ *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray transaction) {
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray transaction) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKTransaction transaction_ref;
transaction_ref.datalen = (*env)->GetArrayLength(env, transaction);
transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes");
(*env)->GetByteArrayRegion(env, transaction, 0, transaction_ref.datalen, transaction_ref.data);
transaction_ref.data_is_owned = true;
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref);
+ *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) {
- LDKThirtyTwoBytes temporary_channel_id_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) {
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv);
+ *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int8_tArray prev_channel_id, int64_t failed_next_destination) {
- LDKThirtyTwoBytes prev_channel_id_ref;
- CHECK((*env)->GetArrayLength(env, prev_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, prev_channel_id, 0, 32, prev_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t failed_next_destination) {
+ LDKChannelId prev_channel_id_conv;
+ prev_channel_id_conv.inner = untag_ptr(prev_channel_id);
+ prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv);
+ prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv);
void* failed_next_destination_ptr = untag_ptr(failed_next_destination);
CHECK_ACCESS(failed_next_destination_ptr);
LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr);
failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv);
+ *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
+ LDKPublicKey counterparty_node_id_ref;
+ CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
+ (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKThirtyTwoBytes claim_id_ref;
CHECK((*env)->GetArrayLength(env, claim_id) == 32);
(*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data);
}
(*env)->ReleaseLongArrayElements(env, pending_htlcs, pending_htlcs_vals, 0);
LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent");
- *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr);
+ *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
+ LDKPublicKey counterparty_node_id_ref;
+ CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
+ (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKThirtyTwoBytes claim_id_ref;
CHECK((*env)->GetArrayLength(env, claim_id) == 32);
(*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data);
}
(*env)->ReleaseLongArrayElements(env, htlc_descriptors, htlc_descriptors_vals, 0);
LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent");
- *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time);
+ *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_arr;
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1get_1payee_1pub_1key(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11Invoice this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form);
+ return ret_arr;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1expires_1at(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKBolt11Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
case 20: return LDKBolt12SemanticError_MissingPayerId;
case 21: return LDKBolt12SemanticError_DuplicatePaymentId;
case 22: return LDKBolt12SemanticError_MissingPaths;
- case 23: return LDKBolt12SemanticError_InvalidPayInfo;
- case 24: return LDKBolt12SemanticError_MissingCreationTime;
- case 25: return LDKBolt12SemanticError_MissingPaymentHash;
- case 26: return LDKBolt12SemanticError_MissingSignature;
+ case 23: return LDKBolt12SemanticError_UnexpectedPaths;
+ case 24: return LDKBolt12SemanticError_InvalidPayInfo;
+ case 25: return LDKBolt12SemanticError_MissingCreationTime;
+ case 26: return LDKBolt12SemanticError_MissingPaymentHash;
+ case 27: return LDKBolt12SemanticError_MissingSignature;
}
(*env)->FatalError(env, "A call to Bolt12SemanticError.ordinal() from rust returned an invalid value.");
abort(); // Unreachable, but will let the compiler know we don't return here
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerId = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = NULL;
+static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = NULL;
static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaymentHash = NULL;
CHECK(Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId != NULL);
Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingPaths", "Lorg/ldk/enums/Bolt12SemanticError;");
CHECK(Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths != NULL);
+ Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_UnexpectedPaths", "Lorg/ldk/enums/Bolt12SemanticError;");
+ CHECK(Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths != NULL);
Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_InvalidPayInfo", "Lorg/ldk/enums/Bolt12SemanticError;");
CHECK(Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo != NULL);
Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingCreationTime", "Lorg/ldk/enums/Bolt12SemanticError;");
return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId);
case LDKBolt12SemanticError_MissingPaths:
return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths);
+ case LDKBolt12SemanticError_UnexpectedPaths:
+ return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths);
case LDKBolt12SemanticError_InvalidPayInfo:
return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo);
case LDKBolt12SemanticError_MissingCreationTime:
case 3: return LDKConfirmationTarget_AnchorChannelFee;
case 4: return LDKConfirmationTarget_NonAnchorChannelFee;
case 5: return LDKConfirmationTarget_ChannelCloseMinimum;
+ case 6: return LDKConfirmationTarget_OutputSpendingFee;
}
(*env)->FatalError(env, "A call to ConfirmationTarget.ordinal() from rust returned an invalid value.");
abort(); // Unreachable, but will let the compiler know we don't return here
static jfieldID ConfirmationTarget_LDKConfirmationTarget_AnchorChannelFee = NULL;
static jfieldID ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee = NULL;
static jfieldID ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = NULL;
+static jfieldID ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = NULL;
JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env, jclass clz) {
ConfirmationTarget_class = (*env)->NewGlobalRef(env, clz);
CHECK(ConfirmationTarget_class != NULL);
CHECK(ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee != NULL);
ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_ChannelCloseMinimum", "Lorg/ldk/enums/ConfirmationTarget;");
CHECK(ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum != NULL);
+ ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_OutputSpendingFee", "Lorg/ldk/enums/ConfirmationTarget;");
+ CHECK(ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee != NULL);
}
static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationTarget val) {
switch (val) {
return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee);
case LDKConfirmationTarget_ChannelCloseMinimum:
return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum);
+ case LDKConfirmationTarget_OutputSpendingFee:
+ return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee);
default: abort();
}
}
}
}
+static inline LDKDirection LDKDirection_from_java(JNIEnv *env, jclass clz) {
+ jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to Direction.ordinal() from rust threw an exception.");
+ }
+ switch (ord) {
+ case 0: return LDKDirection_NodeOne;
+ case 1: return LDKDirection_NodeTwo;
+ }
+ (*env)->FatalError(env, "A call to Direction.ordinal() from rust returned an invalid value.");
+ abort(); // Unreachable, but will let the compiler know we don't return here
+}
+static jclass Direction_class = NULL;
+static jfieldID Direction_LDKDirection_NodeOne = NULL;
+static jfieldID Direction_LDKDirection_NodeTwo = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_Direction_init (JNIEnv *env, jclass clz) {
+ Direction_class = (*env)->NewGlobalRef(env, clz);
+ CHECK(Direction_class != NULL);
+ Direction_LDKDirection_NodeOne = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeOne", "Lorg/ldk/enums/Direction;");
+ CHECK(Direction_LDKDirection_NodeOne != NULL);
+ Direction_LDKDirection_NodeTwo = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeTwo", "Lorg/ldk/enums/Direction;");
+ CHECK(Direction_LDKDirection_NodeTwo != NULL);
+}
+static inline jclass LDKDirection_to_java(JNIEnv *env, LDKDirection val) {
+ switch (val) {
+ case LDKDirection_NodeOne:
+ return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeOne);
+ case LDKDirection_NodeTwo:
+ return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeTwo);
+ default: abort();
+ }
+}
+
static inline LDKHTLCClaim LDKHTLCClaim_from_java(JNIEnv *env, jclass clz) {
jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
if (UNLIKELY((*env)->ExceptionCheck(env))) {
}
}
+static inline LDKShortChannelIdError LDKShortChannelIdError_from_java(JNIEnv *env, jclass clz) {
+ jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust threw an exception.");
+ }
+ switch (ord) {
+ case 0: return LDKShortChannelIdError_BlockOverflow;
+ case 1: return LDKShortChannelIdError_TxIndexOverflow;
+ case 2: return LDKShortChannelIdError_VoutIndexOverflow;
+ }
+ (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust returned an invalid value.");
+ abort(); // Unreachable, but will let the compiler know we don't return here
+}
+static jclass ShortChannelIdError_class = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_ShortChannelIdError_init (JNIEnv *env, jclass clz) {
+ ShortChannelIdError_class = (*env)->NewGlobalRef(env, clz);
+ CHECK(ShortChannelIdError_class != NULL);
+ ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_BlockOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+ CHECK(ShortChannelIdError_LDKShortChannelIdError_BlockOverflow != NULL);
+ ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_TxIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+ CHECK(ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow != NULL);
+ ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_VoutIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+ CHECK(ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow != NULL);
+}
+static inline jclass LDKShortChannelIdError_to_java(JNIEnv *env, LDKShortChannelIdError val) {
+ switch (val) {
+ case LDKShortChannelIdError_BlockOverflow:
+ return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_BlockOverflow);
+ case LDKShortChannelIdError_TxIndexOverflow:
+ return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow);
+ case LDKShortChannelIdError_VoutIndexOverflow:
+ return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow);
+ default: abort();
+ }
+}
+
static inline LDKSiPrefix LDKSiPrefix_from_java(JNIEnv *env, jclass clz) {
jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
if (UNLIKELY((*env)->ExceptionCheck(env))) {
default: abort();
}
}
+static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKRefund ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static jclass LDKCOption_u64Z_Some_class = NULL;
static jmethodID LDKCOption_u64Z_Some_meth = NULL;
static jclass LDKCOption_u64Z_None_class = NULL;
static jmethodID LDKDecodeError_Io_meth = NULL;
static jclass LDKDecodeError_UnsupportedCompression_class = NULL;
static jmethodID LDKDecodeError_UnsupportedCompression_meth = NULL;
+static jclass LDKDecodeError_DangerousValue_class = NULL;
+static jmethodID LDKDecodeError_DangerousValue_meth = NULL;
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIEnv *env, jclass clz) {
LDKDecodeError_UnknownVersion_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownVersion"));
CHECK(LDKDecodeError_UnsupportedCompression_class != NULL);
LDKDecodeError_UnsupportedCompression_meth = (*env)->GetMethodID(env, LDKDecodeError_UnsupportedCompression_class, "<init>", "()V");
CHECK(LDKDecodeError_UnsupportedCompression_meth != NULL);
+ LDKDecodeError_DangerousValue_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$DangerousValue"));
+ CHECK(LDKDecodeError_DangerousValue_class != NULL);
+ LDKDecodeError_DangerousValue_meth = (*env)->GetMethodID(env, LDKDecodeError_DangerousValue_class, "<init>", "()V");
+ CHECK(LDKDecodeError_DangerousValue_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
case LDKDecodeError_UnsupportedCompression: {
return (*env)->NewObject(env, LDKDecodeError_UnsupportedCompression_class, LDKDecodeError_UnsupportedCompression_meth);
}
+ case LDKDecodeError_DangerousValue: {
+ return (*env)->NewObject(env, LDKDecodeError_DangerousValue_class, LDKDecodeError_DangerousValue_meth);
+ }
default: abort();
}
}
CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv);
}
+static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKUnsignedBolt12Invoice ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKBolt12Invoice ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form);
+ return ret_arr;
+}
+
+static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+ CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
+}
+
static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) {
LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
default: abort();
}
}
+static jclass LDKAmount_Bitcoin_class = NULL;
+static jmethodID LDKAmount_Bitcoin_meth = NULL;
+static jclass LDKAmount_Currency_class = NULL;
+static jmethodID LDKAmount_Currency_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAmount_init (JNIEnv *env, jclass clz) {
+ LDKAmount_Bitcoin_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Bitcoin"));
+ CHECK(LDKAmount_Bitcoin_class != NULL);
+ LDKAmount_Bitcoin_meth = (*env)->GetMethodID(env, LDKAmount_Bitcoin_class, "<init>", "(J)V");
+ CHECK(LDKAmount_Bitcoin_meth != NULL);
+ LDKAmount_Currency_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Currency"));
+ CHECK(LDKAmount_Currency_class != NULL);
+ LDKAmount_Currency_meth = (*env)->GetMethodID(env, LDKAmount_Currency_class, "<init>", "([BJ)V");
+ CHECK(LDKAmount_Currency_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAmount_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKAmount *obj = (LDKAmount*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKAmount_Bitcoin: {
+ int64_t amount_msats_conv = obj->bitcoin.amount_msats;
+ return (*env)->NewObject(env, LDKAmount_Bitcoin_class, LDKAmount_Bitcoin_meth, amount_msats_conv);
+ }
+ case LDKAmount_Currency: {
+ int8_tArray iso4217_code_arr = (*env)->NewByteArray(env, 3);
+ (*env)->SetByteArrayRegion(env, iso4217_code_arr, 0, 3, obj->currency.iso4217_code.data);
+ int64_t amount_conv = obj->currency.amount;
+ return (*env)->NewObject(env, LDKAmount_Currency_class, LDKAmount_Currency_meth, iso4217_code_arr, amount_conv);
+ }
+ default: abort();
+ }
+}
+static jclass LDKCOption_AmountZ_Some_class = NULL;
+static jmethodID LDKCOption_AmountZ_Some_meth = NULL;
+static jclass LDKCOption_AmountZ_None_class = NULL;
+static jmethodID LDKCOption_AmountZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1AmountZ_init (JNIEnv *env, jclass clz) {
+ LDKCOption_AmountZ_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$Some"));
+ CHECK(LDKCOption_AmountZ_Some_class != NULL);
+ LDKCOption_AmountZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_Some_class, "<init>", "(J)V");
+ CHECK(LDKCOption_AmountZ_Some_meth != NULL);
+ LDKCOption_AmountZ_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$None"));
+ CHECK(LDKCOption_AmountZ_None_class != NULL);
+ LDKCOption_AmountZ_None_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_None_class, "<init>", "()V");
+ CHECK(LDKCOption_AmountZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1AmountZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_AmountZ_Some: {
+ int64_t some_ref = tag_ptr(&obj->some, false);
+ return (*env)->NewObject(env, LDKCOption_AmountZ_Some_class, LDKCOption_AmountZ_Some_meth, some_ref);
+ }
+ case LDKCOption_AmountZ_None: {
+ return (*env)->NewObject(env, LDKCOption_AmountZ_None_class, LDKCOption_AmountZ_None_meth);
+ }
+ default: abort();
+ }
+}
+static jclass LDKQuantity_Bounded_class = NULL;
+static jmethodID LDKQuantity_Bounded_meth = NULL;
+static jclass LDKQuantity_Unbounded_class = NULL;
+static jmethodID LDKQuantity_Unbounded_meth = NULL;
+static jclass LDKQuantity_One_class = NULL;
+static jmethodID LDKQuantity_One_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKQuantity_init (JNIEnv *env, jclass clz) {
+ LDKQuantity_Bounded_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Bounded"));
+ CHECK(LDKQuantity_Bounded_class != NULL);
+ LDKQuantity_Bounded_meth = (*env)->GetMethodID(env, LDKQuantity_Bounded_class, "<init>", "(J)V");
+ CHECK(LDKQuantity_Bounded_meth != NULL);
+ LDKQuantity_Unbounded_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Unbounded"));
+ CHECK(LDKQuantity_Unbounded_class != NULL);
+ LDKQuantity_Unbounded_meth = (*env)->GetMethodID(env, LDKQuantity_Unbounded_class, "<init>", "()V");
+ CHECK(LDKQuantity_Unbounded_meth != NULL);
+ LDKQuantity_One_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$One"));
+ CHECK(LDKQuantity_One_class != NULL);
+ LDKQuantity_One_meth = (*env)->GetMethodID(env, LDKQuantity_One_class, "<init>", "()V");
+ CHECK(LDKQuantity_One_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKQuantity_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKQuantity_Bounded: {
+ int64_t bounded_conv = obj->bounded;
+ return (*env)->NewObject(env, LDKQuantity_Bounded_class, LDKQuantity_Bounded_meth, bounded_conv);
+ }
+ case LDKQuantity_Unbounded: {
+ return (*env)->NewObject(env, LDKQuantity_Unbounded_class, LDKQuantity_Unbounded_meth);
+ }
+ case LDKQuantity_One: {
+ return (*env)->NewObject(env, LDKQuantity_One_class, LDKQuantity_One_meth);
+ }
+ default: abort();
+ }
+}
+static jclass LDKCOption_QuantityZ_Some_class = NULL;
+static jmethodID LDKCOption_QuantityZ_Some_meth = NULL;
+static jclass LDKCOption_QuantityZ_None_class = NULL;
+static jmethodID LDKCOption_QuantityZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1QuantityZ_init (JNIEnv *env, jclass clz) {
+ LDKCOption_QuantityZ_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$Some"));
+ CHECK(LDKCOption_QuantityZ_Some_class != NULL);
+ LDKCOption_QuantityZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_Some_class, "<init>", "(J)V");
+ CHECK(LDKCOption_QuantityZ_Some_meth != NULL);
+ LDKCOption_QuantityZ_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$None"));
+ CHECK(LDKCOption_QuantityZ_None_class != NULL);
+ LDKCOption_QuantityZ_None_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_None_class, "<init>", "()V");
+ CHECK(LDKCOption_QuantityZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1QuantityZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_QuantityZ_Some: {
+ int64_t some_ref = tag_ptr(&obj->some, false);
+ return (*env)->NewObject(env, LDKCOption_QuantityZ_Some_class, LDKCOption_QuantityZ_Some_meth, some_ref);
+ }
+ case LDKCOption_QuantityZ_None: {
+ return (*env)->NewObject(env, LDKCOption_QuantityZ_None_class, LDKCOption_QuantityZ_None_meth);
+ }
+ default: abort();
+ }
+}
static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return ThirtyTwoBytes_clone(&*owner->contents.result);
CResult_RecoverableSignatureNoneZ_get_err(owner_conv);
}
-static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return *owner->contents.result;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form);
return ret_arr;
}
-static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return *owner->contents.err;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
- CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
+ CResult_ECDSASignatureNoneZ_get_err(owner_conv);
}
-static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return *owner->contents.result;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
+ LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
return ret_arr;
}
-static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return *owner->contents.err;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
- CResult_ECDSASignatureNoneZ_get_err(owner_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
+ CResult_TransactionNoneZ_get_err(owner_conv);
}
static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){
return ret_ref;
}
-static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
- LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv);
- int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
- return ret_arr;
-}
-
-static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
- CResult_TransactionNoneZ_get_err(owner_conv);
-}
-
static jclass LDKCandidateRouteHop_FirstHop_class = NULL;
static jmethodID LDKCandidateRouteHop_FirstHop_meth = NULL;
static jclass LDKCandidateRouteHop_PublicHop_class = NULL;
return ret_ref;
}
+static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){
+ LDKBestBlock ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner);
+ LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){
return owner->a;
}
CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv);
}
+static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL;
+static jclass LDKClosureReason_HolderForceClosed_class = NULL;
+static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL;
+static jclass LDKClosureReason_LegacyCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_LegacyCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_LocallyInitiatedCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL;
+static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL;
+static jclass LDKClosureReason_FundingTimedOut_class = NULL;
+static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL;
+static jclass LDKClosureReason_ProcessingError_class = NULL;
+static jmethodID LDKClosureReason_ProcessingError_meth = NULL;
+static jclass LDKClosureReason_DisconnectedPeer_class = NULL;
+static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL;
+static jclass LDKClosureReason_OutdatedChannelManager_class = NULL;
+static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL;
+static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL;
+static jclass LDKClosureReason_FundingBatchClosure_class = NULL;
+static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL;
+static jclass LDKClosureReason_HTLCsTimedOut_class = NULL;
+static jmethodID LDKClosureReason_HTLCsTimedOut_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) {
+ LDKClosureReason_CounterpartyForceClosed_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed"));
+ CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL);
+ LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "<init>", "(J)V");
+ CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL);
+ LDKClosureReason_HolderForceClosed_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed"));
+ CHECK(LDKClosureReason_HolderForceClosed_class != NULL);
+ LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "<init>", "()V");
+ CHECK(LDKClosureReason_HolderForceClosed_meth != NULL);
+ LDKClosureReason_LegacyCooperativeClosure_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LegacyCooperativeClosure"));
+ CHECK(LDKClosureReason_LegacyCooperativeClosure_class != NULL);
+ LDKClosureReason_LegacyCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LegacyCooperativeClosure_class, "<init>", "()V");
+ CHECK(LDKClosureReason_LegacyCooperativeClosure_meth != NULL);
+ LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyInitiatedCooperativeClosure"));
+ CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class != NULL);
+ LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, "<init>", "()V");
+ CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth != NULL);
+ LDKClosureReason_LocallyInitiatedCooperativeClosure_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LocallyInitiatedCooperativeClosure"));
+ CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_class != NULL);
+ LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, "<init>", "()V");
+ CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_meth != NULL);
+ LDKClosureReason_CommitmentTxConfirmed_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed"));
+ CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL);
+ LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "<init>", "()V");
+ CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL);
+ LDKClosureReason_FundingTimedOut_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut"));
+ CHECK(LDKClosureReason_FundingTimedOut_class != NULL);
+ LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "<init>", "()V");
+ CHECK(LDKClosureReason_FundingTimedOut_meth != NULL);
+ LDKClosureReason_ProcessingError_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError"));
+ CHECK(LDKClosureReason_ProcessingError_class != NULL);
+ LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "<init>", "(Ljava/lang/String;)V");
+ CHECK(LDKClosureReason_ProcessingError_meth != NULL);
+ LDKClosureReason_DisconnectedPeer_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer"));
+ CHECK(LDKClosureReason_DisconnectedPeer_class != NULL);
+ LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "<init>", "()V");
+ CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL);
+ LDKClosureReason_OutdatedChannelManager_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager"));
+ CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL);
+ LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "<init>", "()V");
+ CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL);
+ LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel"));
+ CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL);
+ LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "<init>", "()V");
+ CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL);
+ LDKClosureReason_FundingBatchClosure_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure"));
+ CHECK(LDKClosureReason_FundingBatchClosure_class != NULL);
+ LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "<init>", "()V");
+ CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL);
+ LDKClosureReason_HTLCsTimedOut_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HTLCsTimedOut"));
+ CHECK(LDKClosureReason_HTLCsTimedOut_class != NULL);
+ LDKClosureReason_HTLCsTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_HTLCsTimedOut_class, "<init>", "()V");
+ CHECK(LDKClosureReason_HTLCsTimedOut_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKClosureReason_CounterpartyForceClosed: {
+ LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
+ int64_t peer_msg_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var);
+ peer_msg_ref = tag_ptr(peer_msg_var.inner, false);
+ return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref);
+ }
+ case LDKClosureReason_HolderForceClosed: {
+ return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth);
+ }
+ case LDKClosureReason_LegacyCooperativeClosure: {
+ return (*env)->NewObject(env, LDKClosureReason_LegacyCooperativeClosure_class, LDKClosureReason_LegacyCooperativeClosure_meth);
+ }
+ case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: {
+ return (*env)->NewObject(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth);
+ }
+ case LDKClosureReason_LocallyInitiatedCooperativeClosure: {
+ return (*env)->NewObject(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, LDKClosureReason_LocallyInitiatedCooperativeClosure_meth);
+ }
+ case LDKClosureReason_CommitmentTxConfirmed: {
+ return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth);
+ }
+ case LDKClosureReason_FundingTimedOut: {
+ return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth);
+ }
+ case LDKClosureReason_ProcessingError: {
+ LDKStr err_str = obj->processing_error.err;
+ jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
+ return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv);
+ }
+ case LDKClosureReason_DisconnectedPeer: {
+ return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth);
+ }
+ case LDKClosureReason_OutdatedChannelManager: {
+ return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth);
+ }
+ case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: {
+ return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth);
+ }
+ case LDKClosureReason_FundingBatchClosure: {
+ return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth);
+ }
+ case LDKClosureReason_HTLCsTimedOut: {
+ return (*env)->NewObject(env, LDKClosureReason_HTLCsTimedOut_class, LDKClosureReason_HTLCsTimedOut_meth);
+ }
+ default: abort();
+ }
+}
static jclass LDKMonitorEvent_HTLCEvent_class = NULL;
static jmethodID LDKMonitorEvent_HTLCEvent_meth = NULL;
+static jclass LDKMonitorEvent_HolderForceClosedWithInfo_class = NULL;
+static jmethodID LDKMonitorEvent_HolderForceClosedWithInfo_meth = NULL;
static jclass LDKMonitorEvent_HolderForceClosed_class = NULL;
static jmethodID LDKMonitorEvent_HolderForceClosed_meth = NULL;
static jclass LDKMonitorEvent_Completed_class = NULL;
CHECK(LDKMonitorEvent_HTLCEvent_class != NULL);
LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "<init>", "(J)V");
CHECK(LDKMonitorEvent_HTLCEvent_meth != NULL);
+ LDKMonitorEvent_HolderForceClosedWithInfo_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosedWithInfo"));
+ CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_class != NULL);
+ LDKMonitorEvent_HolderForceClosedWithInfo_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, "<init>", "(JJJ)V");
+ CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_meth != NULL);
LDKMonitorEvent_HolderForceClosed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosed"));
CHECK(LDKMonitorEvent_HolderForceClosed_class != NULL);
LDKMonitorEvent_Completed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$Completed"));
CHECK(LDKMonitorEvent_Completed_class != NULL);
- LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJ)V");
+ LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJJ)V");
CHECK(LDKMonitorEvent_Completed_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
htlc_event_ref = tag_ptr(htlc_event_var.inner, false);
return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth, htlc_event_ref);
}
+ case LDKMonitorEvent_HolderForceClosedWithInfo: {
+ int64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false);
+ LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint;
+ int64_t outpoint_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var);
+ outpoint_ref = tag_ptr(outpoint_var.inner, false);
+ LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
+ return (*env)->NewObject(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, LDKMonitorEvent_HolderForceClosedWithInfo_meth, reason_ref, outpoint_ref, channel_id_ref);
+ }
case LDKMonitorEvent_HolderForceClosed: {
LDKOutPoint holder_force_closed_var = obj->holder_force_closed;
int64_t holder_force_closed_ref = 0;
int64_t funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
+ LDKChannelId channel_id_var = obj->completed.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
- return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, monitor_update_id_conv);
+ return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, channel_id_ref, monitor_update_id_conv);
}
default: abort();
}
}
return ret;
}
-static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
LDKOutPoint ret = owner->a;
ret.is_owned = false;
return ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
- LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+ LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
- return CVec_MonitorEventZ_clone(&owner->b);
+static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+ LDKChannelId ret = owner->b;
+ ret.is_owned = false;
+ return ret;
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
- LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+ LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+ return CVec_MonitorEventZ_clone(&owner->c);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+ LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv);
int64_tArray ret_arr = NULL;
ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
return ret_arr;
}
-static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
- return owner->c;
+static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+ return owner->d;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1d(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form);
return ret_arr;
}
-static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) {
- LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) {
+ LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]);
+ ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]);
}
return ret;
}
return ret_ref;
}
+static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){
+ LDKOfferId ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner);
+ LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+ CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv);
+}
+
+static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKOffer ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){
LDKOffer ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
-static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form);
- return ret_arr;
-}
-
-static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
- jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv));
- return ret_conv;
-}
-
static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
LDKNodeId ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
+static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form);
+ return ret_arr;
+}
+
+static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static jclass LDKNetworkUpdate_ChannelUpdateMessage_class = NULL;
static jmethodID LDKNetworkUpdate_ChannelUpdateMessage_meth = NULL;
static jclass LDKNetworkUpdate_ChannelFailure_class = NULL;
default: abort();
}
}
+static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner);
+ int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv);
+ return ret_conv;
+}
+
+static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return ShortChannelIdError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, CResult_u64ShortChannelIdErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){
LDKPendingHTLCInfo ret = *owner->contents.result;
ret.is_owned = false;
CResult_CVec_UtxoZNoneZ_get_err(owner_conv);
}
+static jclass LDKPaymentContext_Unknown_class = NULL;
+static jmethodID LDKPaymentContext_Unknown_meth = NULL;
+static jclass LDKPaymentContext_Bolt12Offer_class = NULL;
+static jmethodID LDKPaymentContext_Bolt12Offer_meth = NULL;
+static jclass LDKPaymentContext_Bolt12Refund_class = NULL;
+static jmethodID LDKPaymentContext_Bolt12Refund_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentContext_init (JNIEnv *env, jclass clz) {
+ LDKPaymentContext_Unknown_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Unknown"));
+ CHECK(LDKPaymentContext_Unknown_class != NULL);
+ LDKPaymentContext_Unknown_meth = (*env)->GetMethodID(env, LDKPaymentContext_Unknown_class, "<init>", "(J)V");
+ CHECK(LDKPaymentContext_Unknown_meth != NULL);
+ LDKPaymentContext_Bolt12Offer_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Offer"));
+ CHECK(LDKPaymentContext_Bolt12Offer_class != NULL);
+ LDKPaymentContext_Bolt12Offer_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Offer_class, "<init>", "(J)V");
+ CHECK(LDKPaymentContext_Bolt12Offer_meth != NULL);
+ LDKPaymentContext_Bolt12Refund_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Refund"));
+ CHECK(LDKPaymentContext_Bolt12Refund_class != NULL);
+ LDKPaymentContext_Bolt12Refund_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Refund_class, "<init>", "(J)V");
+ CHECK(LDKPaymentContext_Bolt12Refund_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentContext_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKPaymentContext_Unknown: {
+ LDKUnknownPaymentContext unknown_var = obj->unknown;
+ int64_t unknown_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var);
+ unknown_ref = tag_ptr(unknown_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentContext_Unknown_class, LDKPaymentContext_Unknown_meth, unknown_ref);
+ }
+ case LDKPaymentContext_Bolt12Offer: {
+ LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer;
+ int64_t bolt12_offer_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var);
+ bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentContext_Bolt12Offer_class, LDKPaymentContext_Bolt12Offer_meth, bolt12_offer_ref);
+ }
+ case LDKPaymentContext_Bolt12Refund: {
+ LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund;
+ int64_t bolt12_refund_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var);
+ bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentContext_Bolt12Refund_class, LDKPaymentContext_Bolt12Refund_meth, bolt12_refund_ref);
+ }
+ default: abort();
+ }
+}
+static jclass LDKCOption_PaymentContextZ_Some_class = NULL;
+static jmethodID LDKCOption_PaymentContextZ_Some_meth = NULL;
+static jclass LDKCOption_PaymentContextZ_None_class = NULL;
+static jmethodID LDKCOption_PaymentContextZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1PaymentContextZ_init (JNIEnv *env, jclass clz) {
+ LDKCOption_PaymentContextZ_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$Some"));
+ CHECK(LDKCOption_PaymentContextZ_Some_class != NULL);
+ LDKCOption_PaymentContextZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_Some_class, "<init>", "(J)V");
+ CHECK(LDKCOption_PaymentContextZ_Some_meth != NULL);
+ LDKCOption_PaymentContextZ_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$None"));
+ CHECK(LDKCOption_PaymentContextZ_None_class != NULL);
+ LDKCOption_PaymentContextZ_None_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_None_class, "<init>", "()V");
+ CHECK(LDKCOption_PaymentContextZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1PaymentContextZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_PaymentContextZ_Some: {
+ int64_t some_ref = tag_ptr(&obj->some, false);
+ return (*env)->NewObject(env, LDKCOption_PaymentContextZ_Some_class, LDKCOption_PaymentContextZ_Some_meth, some_ref);
+ }
+ case LDKCOption_PaymentContextZ_None: {
+ return (*env)->NewObject(env, LDKCOption_PaymentContextZ_None_class, LDKCOption_PaymentContextZ_None_meth);
+ }
+ default: abort();
+ }
+}
static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){
return owner->a;
}
default: abort();
}
}
-static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return ThirtyTwoBytes_clone(&*owner->contents.result);
+static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
+ LDKChannelId ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data);
- return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner);
+ LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return APIError_clone(&*owner->contents.err);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner);
LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
- *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv);
+ *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){
- return ThirtyTwoBytes_clone(&owner->a);
+static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){
+ LDKChannelId ret = owner->a;
+ ret.is_owned = false;
+ return ret;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data);
- return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner);
+ LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){
+static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){
return owner->b;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner);
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form);
return ret_arr;
}
-static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) {
- LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) {
+ LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) {
+ LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]);
+ ret.data[i] = ChannelId_clone(&orig->data[i]);
}
return ret;
}
+static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static jclass LDKCOption_StrZ_Some_class = NULL;
static jmethodID LDKCOption_StrZ_Some_meth = NULL;
static jclass LDKCOption_StrZ_None_class = NULL;
default: abort();
}
}
-static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
- CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv);
-}
-
-static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return Bolt12SemanticError_clone(&*owner->contents.err);
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
- jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv));
- return ret_conv;
-}
-
static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result);
CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv);
}
+static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return ThirtyTwoBytes_clone(&*owner->contents.result);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return APIError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+ LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
+ *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static jclass LDKOffersMessage_InvoiceRequest_class = NULL;
static jmethodID LDKOffersMessage_InvoiceRequest_meth = NULL;
static jclass LDKOffersMessage_Invoice_class = NULL;
LDKPendingHTLCRouting_Receive_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$Receive"));
CHECK(LDKPendingHTLCRouting_Receive_class != NULL);
- LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "<init>", "(JJI[B[JZ)V");
+ LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "<init>", "(JJJI[B[JZ)V");
CHECK(LDKPendingHTLCRouting_Receive_meth != NULL);
LDKPendingHTLCRouting_ReceiveKeysend_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$ReceiveKeysend"));
CHECK(LDKPendingHTLCRouting_ReceiveKeysend_class != NULL);
- LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "<init>", "(J[BJI[J)V");
+ LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "<init>", "(J[BJI[JZ)V");
CHECK(LDKPendingHTLCRouting_ReceiveKeysend_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_var);
payment_data_ref = tag_ptr(payment_data_var.inner, false);
int64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false);
+ int64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false);
int32_t incoming_cltv_expiry_conv = obj->receive.incoming_cltv_expiry;
int8_tArray phantom_shared_secret_arr = (*env)->NewByteArray(env, 32);
(*env)->SetByteArrayRegion(env, phantom_shared_secret_arr, 0, 32, obj->receive.phantom_shared_secret.data);
}
(*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0);
jboolean requires_blinded_error_conv = obj->receive.requires_blinded_error;
- return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv);
+ return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, payment_context_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv);
}
case LDKPendingHTLCRouting_ReceiveKeysend: {
LDKFinalOnionHopData payment_data_var = obj->receive_keysend.payment_data;
custom_tlvs_arr_ptr[x] = tag_ptr(custom_tlvs_conv_23_conv, true);
}
(*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0);
- return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr);
+ jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error;
+ return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr, requires_blinded_error_conv);
}
default: abort();
}
}
return ret_conv;
}
-LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
+LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
(*env)->ExceptionDescribe(env);
(*env)->FatalError(env, "A call to release_pending_monitor_events in LDKWatch from rust threw an exception.");
}
- LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
+ LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr;
ret_constr.datalen = (*env)->GetArrayLength(env, ret);
if (ret_constr.datalen > 0)
- ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements");
+ ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements");
else
ret_constr.data = NULL;
int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
- for (size_t x = 0; x < ret_constr.datalen; x++) {
- int64_t ret_conv_49 = ret_vals[x];
- void* ret_conv_49_ptr = untag_ptr(ret_conv_49);
- CHECK_ACCESS(ret_conv_49_ptr);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr);
- FREE(untag_ptr(ret_conv_49));
- ret_constr.data[x] = ret_conv_49_conv;
+ for (size_t f = 0; f < ret_constr.datalen; f++) {
+ int64_t ret_conv_57 = ret_vals[f];
+ void* ret_conv_57_ptr = untag_ptr(ret_conv_57);
+ CHECK_ACCESS(ret_conv_57_ptr);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr);
+ FREE(untag_ptr(ret_conv_57));
+ ret_constr.data[f] = ret_conv_57_conv;
}
(*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
if (get_jenv_res == JNI_EDETACHED) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
- LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
+ LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
int64_tArray ret_arr = NULL;
ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
- *ret_conv_49_conv = ret_var.data[x];
- ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true);
+ for (size_t f = 0; f < ret_var.datalen; f++) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+ *ret_conv_57_conv = ret_var.data[f];
+ ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
}
LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request;
int64_t invoice_request_ref = 0;
- // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest
+ invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var);
invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned);
jobject obj = (*env)->NewLocalRef(env, j_calls->o);
}
LDKUnsignedBolt12Invoice invoice_var = *invoice;
int64_t invoice_ref = 0;
- // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice
+ invoice_var = UnsignedBolt12Invoice_clone(&invoice_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var);
invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned);
jobject obj = (*env)->NewLocalRef(env, j_calls->o);
default: abort();
}
}
-static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){
- return owner->a;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form);
- return ret_arr;
-}
-
-static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){
- return COption_SocketAddressZ_clone(&owner->b);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner);
- LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
- *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) {
- LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]);
- }
- return ret;
-}
static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return CVec_u8Z_clone(&*owner->contents.result);
return ret_conv;
}
+static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKUnsignedInvoiceRequest ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequest ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static jclass LDKCOption_SecretKeyZ_Some_class = NULL;
static jmethodID LDKCOption_SecretKeyZ_Some_meth = NULL;
static jclass LDKCOption_SecretKeyZ_None_class = NULL;
default: abort();
}
}
+static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){
LDKVerifiedInvoiceRequest ret = *owner->contents.result;
ret.is_owned = false;
CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv);
}
+static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequestFields ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) {
LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
}
return ret;
}
+static jclass LDKCOption_ECDSASignatureZ_Some_class = NULL;
+static jmethodID LDKCOption_ECDSASignatureZ_Some_meth = NULL;
+static jclass LDKCOption_ECDSASignatureZ_None_class = NULL;
+static jmethodID LDKCOption_ECDSASignatureZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ECDSASignatureZ_init (JNIEnv *env, jclass clz) {
+ LDKCOption_ECDSASignatureZ_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$Some"));
+ CHECK(LDKCOption_ECDSASignatureZ_Some_class != NULL);
+ LDKCOption_ECDSASignatureZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_Some_class, "<init>", "([B)V");
+ CHECK(LDKCOption_ECDSASignatureZ_Some_meth != NULL);
+ LDKCOption_ECDSASignatureZ_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$None"));
+ CHECK(LDKCOption_ECDSASignatureZ_None_class != NULL);
+ LDKCOption_ECDSASignatureZ_None_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_None_class, "<init>", "()V");
+ CHECK(LDKCOption_ECDSASignatureZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ECDSASignatureZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_ECDSASignatureZ_Some: {
+ int8_tArray some_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, some_arr, 0, 64, obj->some.compact_form);
+ return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_Some_class, LDKCOption_ECDSASignatureZ_Some_meth, some_arr);
+ }
+ case LDKCOption_ECDSASignatureZ_None: {
+ return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_None_class, LDKCOption_ECDSASignatureZ_None_meth);
+ }
+ default: abort();
+ }
+}
static jclass LDKCOption_i64Z_Some_class = NULL;
static jmethodID LDKCOption_i64Z_Some_meth = NULL;
static jclass LDKCOption_i64Z_None_class = NULL;
return ret_ref;
}
-static inline LDKCVec_FutureZ CVec_FutureZ_clone(const LDKCVec_FutureZ *orig) {
- LDKCVec_FutureZ ret = { .data = MALLOC(sizeof(LDKFuture) * orig->datalen, "LDKCVec_FutureZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = Future_clone(&orig->data[i]);
- }
- return ret;
-}
static inline struct LDKOffersMessage CResult_OffersMessageDecodeErrorZ_get_ok(LDKCResult_OffersMessageDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return OffersMessage_clone(&*owner->contents.result);
return ret_ref;
}
-static jclass LDKPaymentPurpose_InvoicePayment_class = NULL;
-static jmethodID LDKPaymentPurpose_InvoicePayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt11InvoicePayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt11InvoicePayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt12OfferPayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt12OfferPayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt12RefundPayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt12RefundPayment_meth = NULL;
static jclass LDKPaymentPurpose_SpontaneousPayment_class = NULL;
static jmethodID LDKPaymentPurpose_SpontaneousPayment_meth = NULL;
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (JNIEnv *env, jclass clz) {
- LDKPaymentPurpose_InvoicePayment_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$InvoicePayment"));
- CHECK(LDKPaymentPurpose_InvoicePayment_class != NULL);
- LDKPaymentPurpose_InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_InvoicePayment_class, "<init>", "(J[B)V");
- CHECK(LDKPaymentPurpose_InvoicePayment_meth != NULL);
+ LDKPaymentPurpose_Bolt11InvoicePayment_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt11InvoicePayment"));
+ CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_class != NULL);
+ LDKPaymentPurpose_Bolt11InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, "<init>", "(J[B)V");
+ CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_meth != NULL);
+ LDKPaymentPurpose_Bolt12OfferPayment_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12OfferPayment"));
+ CHECK(LDKPaymentPurpose_Bolt12OfferPayment_class != NULL);
+ LDKPaymentPurpose_Bolt12OfferPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12OfferPayment_class, "<init>", "(J[BJ)V");
+ CHECK(LDKPaymentPurpose_Bolt12OfferPayment_meth != NULL);
+ LDKPaymentPurpose_Bolt12RefundPayment_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12RefundPayment"));
+ CHECK(LDKPaymentPurpose_Bolt12RefundPayment_class != NULL);
+ LDKPaymentPurpose_Bolt12RefundPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12RefundPayment_class, "<init>", "(J[BJ)V");
+ CHECK(LDKPaymentPurpose_Bolt12RefundPayment_meth != NULL);
LDKPaymentPurpose_SpontaneousPayment_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$SpontaneousPayment"));
CHECK(LDKPaymentPurpose_SpontaneousPayment_class != NULL);
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentPurpose_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr);
switch(obj->tag) {
- case LDKPaymentPurpose_InvoicePayment: {
- int64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false);
+ case LDKPaymentPurpose_Bolt11InvoicePayment: {
+ int64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false);
+ int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt11_invoice_payment.payment_secret.data);
+ return (*env)->NewObject(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, LDKPaymentPurpose_Bolt11InvoicePayment_meth, payment_preimage_ref, payment_secret_arr);
+ }
+ case LDKPaymentPurpose_Bolt12OfferPayment: {
+ int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false);
int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->invoice_payment.payment_secret.data);
- return (*env)->NewObject(env, LDKPaymentPurpose_InvoicePayment_class, LDKPaymentPurpose_InvoicePayment_meth, payment_preimage_ref, payment_secret_arr);
+ (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_offer_payment.payment_secret.data);
+ LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context;
+ int64_t payment_context_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var);
+ payment_context_ref = tag_ptr(payment_context_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12OfferPayment_class, LDKPaymentPurpose_Bolt12OfferPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref);
+ }
+ case LDKPaymentPurpose_Bolt12RefundPayment: {
+ int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false);
+ int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_refund_payment.payment_secret.data);
+ LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context;
+ int64_t payment_context_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var);
+ payment_context_ref = tag_ptr(payment_context_var.inner, false);
+ return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12RefundPayment_class, LDKPaymentPurpose_Bolt12RefundPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref);
}
case LDKPaymentPurpose_SpontaneousPayment: {
int8_tArray spontaneous_payment_arr = (*env)->NewByteArray(env, 32);
return ret_ref;
}
-static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL;
-static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL;
-static jclass LDKClosureReason_HolderForceClosed_class = NULL;
-static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL;
-static jclass LDKClosureReason_CooperativeClosure_class = NULL;
-static jmethodID LDKClosureReason_CooperativeClosure_meth = NULL;
-static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL;
-static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL;
-static jclass LDKClosureReason_FundingTimedOut_class = NULL;
-static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL;
-static jclass LDKClosureReason_ProcessingError_class = NULL;
-static jmethodID LDKClosureReason_ProcessingError_meth = NULL;
-static jclass LDKClosureReason_DisconnectedPeer_class = NULL;
-static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL;
-static jclass LDKClosureReason_OutdatedChannelManager_class = NULL;
-static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL;
-static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL;
-static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL;
-static jclass LDKClosureReason_FundingBatchClosure_class = NULL;
-static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) {
- LDKClosureReason_CounterpartyForceClosed_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed"));
- CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL);
- LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "<init>", "(J)V");
- CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL);
- LDKClosureReason_HolderForceClosed_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed"));
- CHECK(LDKClosureReason_HolderForceClosed_class != NULL);
- LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "<init>", "()V");
- CHECK(LDKClosureReason_HolderForceClosed_meth != NULL);
- LDKClosureReason_CooperativeClosure_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CooperativeClosure"));
- CHECK(LDKClosureReason_CooperativeClosure_class != NULL);
- LDKClosureReason_CooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CooperativeClosure_class, "<init>", "()V");
- CHECK(LDKClosureReason_CooperativeClosure_meth != NULL);
- LDKClosureReason_CommitmentTxConfirmed_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed"));
- CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL);
- LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "<init>", "()V");
- CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL);
- LDKClosureReason_FundingTimedOut_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut"));
- CHECK(LDKClosureReason_FundingTimedOut_class != NULL);
- LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "<init>", "()V");
- CHECK(LDKClosureReason_FundingTimedOut_meth != NULL);
- LDKClosureReason_ProcessingError_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError"));
- CHECK(LDKClosureReason_ProcessingError_class != NULL);
- LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "<init>", "(Ljava/lang/String;)V");
- CHECK(LDKClosureReason_ProcessingError_meth != NULL);
- LDKClosureReason_DisconnectedPeer_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer"));
- CHECK(LDKClosureReason_DisconnectedPeer_class != NULL);
- LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "<init>", "()V");
- CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL);
- LDKClosureReason_OutdatedChannelManager_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager"));
- CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL);
- LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "<init>", "()V");
- CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL);
- LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel"));
- CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL);
- LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "<init>", "()V");
- CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL);
- LDKClosureReason_FundingBatchClosure_class =
- (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure"));
- CHECK(LDKClosureReason_FundingBatchClosure_class != NULL);
- LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "<init>", "()V");
- CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL);
-}
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKClosureReason_CounterpartyForceClosed: {
- LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
- int64_t peer_msg_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var);
- peer_msg_ref = tag_ptr(peer_msg_var.inner, false);
- return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref);
- }
- case LDKClosureReason_HolderForceClosed: {
- return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth);
- }
- case LDKClosureReason_CooperativeClosure: {
- return (*env)->NewObject(env, LDKClosureReason_CooperativeClosure_class, LDKClosureReason_CooperativeClosure_meth);
- }
- case LDKClosureReason_CommitmentTxConfirmed: {
- return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth);
- }
- case LDKClosureReason_FundingTimedOut: {
- return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth);
- }
- case LDKClosureReason_ProcessingError: {
- LDKStr err_str = obj->processing_error.err;
- jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
- return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv);
- }
- case LDKClosureReason_DisconnectedPeer: {
- return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth);
- }
- case LDKClosureReason_OutdatedChannelManager: {
- return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth);
- }
- case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: {
- return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth);
- }
- case LDKClosureReason_FundingBatchClosure: {
- return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth);
- }
- default: abort();
- }
-}
static jclass LDKCOption_ClosureReasonZ_Some_class = NULL;
static jmethodID LDKCOption_ClosureReasonZ_Some_meth = NULL;
static jclass LDKCOption_ClosureReasonZ_None_class = NULL;
static jmethodID LDKHTLCDestination_UnknownNextHop_meth = NULL;
static jclass LDKHTLCDestination_InvalidForward_class = NULL;
static jmethodID LDKHTLCDestination_InvalidForward_meth = NULL;
+static jclass LDKHTLCDestination_InvalidOnion_class = NULL;
+static jmethodID LDKHTLCDestination_InvalidOnion_meth = NULL;
static jclass LDKHTLCDestination_FailedPayment_class = NULL;
static jmethodID LDKHTLCDestination_FailedPayment_meth = NULL;
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init (JNIEnv *env, jclass clz) {
LDKHTLCDestination_NextHopChannel_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$NextHopChannel"));
CHECK(LDKHTLCDestination_NextHopChannel_class != NULL);
- LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "<init>", "([B[B)V");
+ LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "<init>", "([BJ)V");
CHECK(LDKHTLCDestination_NextHopChannel_meth != NULL);
LDKHTLCDestination_UnknownNextHop_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$UnknownNextHop"));
CHECK(LDKHTLCDestination_InvalidForward_class != NULL);
LDKHTLCDestination_InvalidForward_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidForward_class, "<init>", "(J)V");
CHECK(LDKHTLCDestination_InvalidForward_meth != NULL);
+ LDKHTLCDestination_InvalidOnion_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$InvalidOnion"));
+ CHECK(LDKHTLCDestination_InvalidOnion_class != NULL);
+ LDKHTLCDestination_InvalidOnion_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidOnion_class, "<init>", "()V");
+ CHECK(LDKHTLCDestination_InvalidOnion_meth != NULL);
LDKHTLCDestination_FailedPayment_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$FailedPayment"));
CHECK(LDKHTLCDestination_FailedPayment_class != NULL);
case LDKHTLCDestination_NextHopChannel: {
int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
(*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->next_hop_channel.node_id.compressed_form);
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->next_hop_channel.channel_id.data);
- return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_arr);
+ LDKChannelId channel_id_var = obj->next_hop_channel.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
+ return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_ref);
}
case LDKHTLCDestination_UnknownNextHop: {
int64_t requested_forward_scid_conv = obj->unknown_next_hop.requested_forward_scid;
int64_t requested_forward_scid_conv = obj->invalid_forward.requested_forward_scid;
return (*env)->NewObject(env, LDKHTLCDestination_InvalidForward_class, LDKHTLCDestination_InvalidForward_meth, requested_forward_scid_conv);
}
+ case LDKHTLCDestination_InvalidOnion: {
+ return (*env)->NewObject(env, LDKHTLCDestination_InvalidOnion_class, LDKHTLCDestination_InvalidOnion_meth);
+ }
case LDKHTLCDestination_FailedPayment: {
int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32);
(*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->failed_payment.payment_hash.data);
LDKBumpTransactionEvent_ChannelClose_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$ChannelClose"));
CHECK(LDKBumpTransactionEvent_ChannelClose_class != NULL);
- LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "<init>", "([BI[BJJ[J)V");
+ LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "<init>", "(J[B[BI[BJJ[J)V");
CHECK(LDKBumpTransactionEvent_ChannelClose_meth != NULL);
LDKBumpTransactionEvent_HTLCResolution_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$HTLCResolution"));
CHECK(LDKBumpTransactionEvent_HTLCResolution_class != NULL);
- LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "<init>", "([BI[JI)V");
+ LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "<init>", "(J[B[BI[JI)V");
CHECK(LDKBumpTransactionEvent_HTLCResolution_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
switch(obj->tag) {
case LDKBumpTransactionEvent_ChannelClose: {
+ LDKChannelId channel_id_var = obj->channel_close.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
+ int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_close.counterparty_node_id.compressed_form);
int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32);
(*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->channel_close.claim_id.data);
int32_t package_target_feerate_sat_per_1000_weight_conv = obj->channel_close.package_target_feerate_sat_per_1000_weight;
pending_htlcs_arr_ptr[y] = pending_htlcs_conv_24_ref;
}
(*env)->ReleasePrimitiveArrayCritical(env, pending_htlcs_arr, pending_htlcs_arr_ptr, 0);
- return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr);
+ return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr);
}
case LDKBumpTransactionEvent_HTLCResolution: {
+ LDKChannelId channel_id_var = obj->htlc_resolution.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
+ int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->htlc_resolution.counterparty_node_id.compressed_form);
int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32);
(*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->htlc_resolution.claim_id.data);
int32_t target_feerate_sat_per_1000_weight_conv = obj->htlc_resolution.target_feerate_sat_per_1000_weight;
}
(*env)->ReleasePrimitiveArrayCritical(env, htlc_descriptors_arr, htlc_descriptors_arr_ptr, 0);
int32_t tx_lock_time_conv = obj->htlc_resolution.tx_lock_time;
- return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv);
+ return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv);
}
default: abort();
}
LDKEvent_FundingGenerationReady_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$FundingGenerationReady"));
CHECK(LDKEvent_FundingGenerationReady_class != NULL);
- LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "([B[BJ[B[B)V");
+ LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "(J[BJ[B[B)V");
CHECK(LDKEvent_FundingGenerationReady_meth != NULL);
LDKEvent_PaymentClaimable_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentClaimable"));
LDKEvent_PaymentForwarded_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentForwarded"));
CHECK(LDKEvent_PaymentForwarded_class != NULL);
- LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "<init>", "(JJJZJ)V");
+ LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "<init>", "(JJJJJJZJ)V");
CHECK(LDKEvent_PaymentForwarded_meth != NULL);
LDKEvent_ChannelPending_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelPending"));
CHECK(LDKEvent_ChannelPending_class != NULL);
- LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "<init>", "([B[BJ[BJ)V");
+ LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "<init>", "(J[BJ[BJJ)V");
CHECK(LDKEvent_ChannelPending_meth != NULL);
LDKEvent_ChannelReady_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelReady"));
CHECK(LDKEvent_ChannelReady_class != NULL);
- LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "<init>", "([B[B[BJ)V");
+ LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "<init>", "(J[B[BJ)V");
CHECK(LDKEvent_ChannelReady_meth != NULL);
LDKEvent_ChannelClosed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelClosed"));
CHECK(LDKEvent_ChannelClosed_class != NULL);
- LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "<init>", "([B[BJ[BJJ)V");
+ LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "<init>", "(J[BJ[BJJ)V");
CHECK(LDKEvent_ChannelClosed_meth != NULL);
LDKEvent_DiscardFunding_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$DiscardFunding"));
CHECK(LDKEvent_DiscardFunding_class != NULL);
- LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "<init>", "([B[B)V");
+ LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "<init>", "(J[B)V");
CHECK(LDKEvent_DiscardFunding_meth != NULL);
LDKEvent_OpenChannelRequest_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$OpenChannelRequest"));
CHECK(LDKEvent_OpenChannelRequest_class != NULL);
- LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "<init>", "([B[BJJJ)V");
+ LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "<init>", "(J[BJJJ)V");
CHECK(LDKEvent_OpenChannelRequest_meth != NULL);
LDKEvent_HTLCHandlingFailed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$HTLCHandlingFailed"));
CHECK(LDKEvent_HTLCHandlingFailed_class != NULL);
- LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "<init>", "([BJ)V");
+ LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "<init>", "(JJ)V");
CHECK(LDKEvent_HTLCHandlingFailed_meth != NULL);
LDKEvent_BumpTransaction_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$BumpTransaction"));
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
switch(obj->tag) {
case LDKEvent_FundingGenerationReady: {
- int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->funding_generation_ready.temporary_channel_id.data);
+ LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id;
+ int64_t temporary_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var);
+ temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false);
int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
(*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->funding_generation_ready.counterparty_node_id.compressed_form);
int64_t channel_value_satoshis_conv = obj->funding_generation_ready.channel_value_satoshis;
(*env)->SetByteArrayRegion(env, output_script_arr, 0, output_script_var.datalen, output_script_var.data);
int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->funding_generation_ready.user_channel_id.le_bytes);
- return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_arr, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr);
+ return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_ref, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr);
}
case LDKEvent_PaymentClaimable: {
int8_tArray receiver_node_id_arr = (*env)->NewByteArray(env, 33);
int64_t amount_msat_conv = obj->payment_claimable.amount_msat;
int64_t counterparty_skimmed_fee_msat_conv = obj->payment_claimable.counterparty_skimmed_fee_msat;
int64_t purpose_ref = tag_ptr(&obj->payment_claimable.purpose, false);
- int64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false);
+ LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id;
+ int64_t via_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var);
+ via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false);
int64_t via_user_channel_id_ref = tag_ptr(&obj->payment_claimable.via_user_channel_id, false);
int64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false);
return (*env)->NewObject(env, LDKEvent_PaymentClaimable_class, LDKEvent_PaymentClaimable_meth, receiver_node_id_arr, payment_hash_arr, onion_fields_ref, amount_msat_conv, counterparty_skimmed_fee_msat_conv, purpose_ref, via_channel_id_ref, via_user_channel_id_ref, claim_deadline_ref);
outputs_arr_ptr[b] = outputs_conv_27_ref;
}
(*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
- int64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false);
+ LDKChannelId channel_id_var = obj->spendable_outputs.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth, outputs_arr, channel_id_ref);
}
case LDKEvent_PaymentForwarded: {
- int64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false);
- int64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false);
- int64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false);
+ LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id;
+ int64_t prev_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var);
+ prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false);
+ LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id;
+ int64_t next_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var);
+ next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false);
+ int64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false);
+ int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false);
+ int64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false);
+ int64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false);
jboolean claim_from_onchain_tx_conv = obj->payment_forwarded.claim_from_onchain_tx;
int64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false);
- return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, fee_earned_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref);
+ return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, prev_user_channel_id_ref, next_user_channel_id_ref, total_fee_earned_msat_ref, skimmed_fee_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref);
}
case LDKEvent_ChannelPending: {
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_pending.channel_id.data);
+ LDKChannelId channel_id_var = obj->channel_pending.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_pending.user_channel_id.le_bytes);
- int64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false);
+ LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id;
+ int64_t former_temporary_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var);
+ former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false);
int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
(*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_pending.counterparty_node_id.compressed_form);
LDKOutPoint funding_txo_var = obj->channel_pending.funding_txo;
int64_t funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
- return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_arr, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref);
+ LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type;
+ int64_t channel_type_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
+ channel_type_ref = tag_ptr(channel_type_var.inner, false);
+ return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_ref, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref, channel_type_ref);
}
case LDKEvent_ChannelReady: {
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_ready.channel_id.data);
+ LDKChannelId channel_id_var = obj->channel_ready.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_ready.user_channel_id.le_bytes);
int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
int64_t channel_type_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
channel_type_ref = tag_ptr(channel_type_var.inner, false);
- return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_arr, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref);
+ return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_ref, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref);
}
case LDKEvent_ChannelClosed: {
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_closed.channel_id.data);
+ LDKChannelId channel_id_var = obj->channel_closed.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
(*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_closed.user_channel_id.le_bytes);
int64_t reason_ref = tag_ptr(&obj->channel_closed.reason, false);
int64_t channel_funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_var);
channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false);
- return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_arr, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref);
+ return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_ref, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref);
}
case LDKEvent_DiscardFunding: {
- int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->discard_funding.channel_id.data);
+ LDKChannelId channel_id_var = obj->discard_funding.channel_id;
+ int64_t channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+ channel_id_ref = tag_ptr(channel_id_var.inner, false);
LDKTransaction transaction_var = obj->discard_funding.transaction;
int8_tArray transaction_arr = (*env)->NewByteArray(env, transaction_var.datalen);
(*env)->SetByteArrayRegion(env, transaction_arr, 0, transaction_var.datalen, transaction_var.data);
- return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_arr, transaction_arr);
+ return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_ref, transaction_arr);
}
case LDKEvent_OpenChannelRequest: {
- int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->open_channel_request.temporary_channel_id.data);
+ LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id;
+ int64_t temporary_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var);
+ temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false);
int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
(*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->open_channel_request.counterparty_node_id.compressed_form);
int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis;
int64_t channel_type_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
channel_type_ref = tag_ptr(channel_type_var.inner, false);
- return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_arr, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref);
+ return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_ref, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref);
}
case LDKEvent_HTLCHandlingFailed: {
- int8_tArray prev_channel_id_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, prev_channel_id_arr, 0, 32, obj->htlc_handling_failed.prev_channel_id.data);
+ LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id;
+ int64_t prev_channel_id_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var);
+ prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false);
int64_t failed_next_destination_ref = tag_ptr(&obj->htlc_handling_failed.failed_next_destination, false);
- return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_arr, failed_next_destination_ref);
+ return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_ref, failed_next_destination_ref);
}
case LDKEvent_BumpTransaction: {
int64_t bump_transaction_ref = tag_ptr(&obj->bump_transaction, false);
return ret_ref;
}
+static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){
+ LDKChannelId ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner);
+ LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){
return ThirtyTwoBytes_clone(&owner->a);
}
return ret_ref;
}
-static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
- return ThirtyTwoBytes_clone(&owner->a);
+static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return PaymentContext_clone(&*owner->contents.result);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data);
- return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
- LDKRecipientOnionFields ret = owner->b;
+static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
+ LDKUnknownPaymentContext ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
- LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner);
+ LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
- LDKRouteParameters ret = owner->c;
+static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){
+ LDKBolt12OfferContext ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
- LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner);
+ LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result);
+static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
- LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
- *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv);
- return tag_ptr(ret_conv, true);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){
+ LDKBolt12RefundContext ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner);
+ LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return *owner->contents.err;
+ return DecodeError_clone(&*owner->contents.err);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
- CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){
return ret_conv;
}
+static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+ return ThirtyTwoBytes_clone(&owner->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data);
+ return ret_arr;
+}
+
+static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+ LDKRecipientOnionFields ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+ LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+ LDKRouteParameters ret = owner->c;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+ LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
+ *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv);
+}
+
static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){
return owner->a;
}
static jmethodID LDKSendError_BufferFull_meth = NULL;
static jclass LDKSendError_GetNodeIdFailed_class = NULL;
static jmethodID LDKSendError_GetNodeIdFailed_meth = NULL;
+static jclass LDKSendError_UnresolvedIntroductionNode_class = NULL;
+static jmethodID LDKSendError_UnresolvedIntroductionNode_meth = NULL;
static jclass LDKSendError_BlindedPathAdvanceFailed_class = NULL;
static jmethodID LDKSendError_BlindedPathAdvanceFailed_meth = NULL;
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv *env, jclass clz) {
CHECK(LDKSendError_GetNodeIdFailed_class != NULL);
LDKSendError_GetNodeIdFailed_meth = (*env)->GetMethodID(env, LDKSendError_GetNodeIdFailed_class, "<init>", "()V");
CHECK(LDKSendError_GetNodeIdFailed_meth != NULL);
+ LDKSendError_UnresolvedIntroductionNode_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$UnresolvedIntroductionNode"));
+ CHECK(LDKSendError_UnresolvedIntroductionNode_class != NULL);
+ LDKSendError_UnresolvedIntroductionNode_meth = (*env)->GetMethodID(env, LDKSendError_UnresolvedIntroductionNode_class, "<init>", "()V");
+ CHECK(LDKSendError_UnresolvedIntroductionNode_meth != NULL);
LDKSendError_BlindedPathAdvanceFailed_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$BlindedPathAdvanceFailed"));
CHECK(LDKSendError_BlindedPathAdvanceFailed_class != NULL);
case LDKSendError_GetNodeIdFailed: {
return (*env)->NewObject(env, LDKSendError_GetNodeIdFailed_class, LDKSendError_GetNodeIdFailed_meth);
}
+ case LDKSendError_UnresolvedIntroductionNode: {
+ return (*env)->NewObject(env, LDKSendError_UnresolvedIntroductionNode_class, LDKSendError_UnresolvedIntroductionNode_meth);
+ }
case LDKSendError_BlindedPathAdvanceFailed: {
return (*env)->NewObject(env, LDKSendError_BlindedPathAdvanceFailed_class, LDKSendError_BlindedPathAdvanceFailed_meth);
}
return ret_ref;
}
+static jclass LDKNextMessageHop_NodeId_class = NULL;
+static jmethodID LDKNextMessageHop_NodeId_meth = NULL;
+static jclass LDKNextMessageHop_ShortChannelId_class = NULL;
+static jmethodID LDKNextMessageHop_ShortChannelId_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNextMessageHop_init (JNIEnv *env, jclass clz) {
+ LDKNextMessageHop_NodeId_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$NodeId"));
+ CHECK(LDKNextMessageHop_NodeId_class != NULL);
+ LDKNextMessageHop_NodeId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_NodeId_class, "<init>", "([B)V");
+ CHECK(LDKNextMessageHop_NodeId_meth != NULL);
+ LDKNextMessageHop_ShortChannelId_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$ShortChannelId"));
+ CHECK(LDKNextMessageHop_ShortChannelId_class != NULL);
+ LDKNextMessageHop_ShortChannelId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_ShortChannelId_class, "<init>", "(J)V");
+ CHECK(LDKNextMessageHop_ShortChannelId_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNextMessageHop_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKNextMessageHop_NodeId: {
+ int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form);
+ return (*env)->NewObject(env, LDKNextMessageHop_NodeId_class, LDKNextMessageHop_NodeId_meth, node_id_arr);
+ }
+ case LDKNextMessageHop_ShortChannelId: {
+ int64_t short_channel_id_conv = obj->short_channel_id;
+ return (*env)->NewObject(env, LDKNextMessageHop_ShortChannelId_class, LDKNextMessageHop_ShortChannelId_meth, short_channel_id_conv);
+ }
+ default: abort();
+ }
+}
static jclass LDKParsedOnionMessageContents_Offers_class = NULL;
static jmethodID LDKParsedOnionMessageContents_Offers_meth = NULL;
static jclass LDKParsedOnionMessageContents_Custom_class = NULL;
LDKPeeledOnion_Forward_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Forward"));
CHECK(LDKPeeledOnion_Forward_class != NULL);
- LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "<init>", "([BJ)V");
+ LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "<init>", "(JJ)V");
CHECK(LDKPeeledOnion_Forward_meth != NULL);
LDKPeeledOnion_Receive_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Receive"));
LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
switch(obj->tag) {
case LDKPeeledOnion_Forward: {
- int8_tArray _0_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, _0_arr, 0, 33, obj->forward._0.compressed_form);
+ int64_t _0_ref = tag_ptr(&obj->forward._0, false);
LDKOnionMessage _1_var = obj->forward._1;
int64_t _1_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(_1_var);
_1_ref = tag_ptr(_1_var.inner, false);
- return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_arr, _1_ref);
+ return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_ref, _1_ref);
}
case LDKPeeledOnion_Receive: {
int64_t _0_ref = tag_ptr(&obj->receive._0, false);
return ret_ref;
}
-static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
- LDKDelayedPaymentBasepoint ret = *owner->contents.result;
+static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){
+ LDKTrackedSpendableOutput ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner);
+ LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return DecodeError_clone(&*owner->contents.err);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner);
LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
- LDKDelayedPaymentKey ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
- LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
- LDKHtlcBasepoint ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
- LDKHtlcKey ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
- LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
- LDKRevocationBasepoint ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+ *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static jclass LDKOutputSpendStatus_PendingInitialBroadcast_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingInitialBroadcast_meth = NULL;
+static jclass LDKOutputSpendStatus_PendingFirstConfirmation_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingFirstConfirmation_meth = NULL;
+static jclass LDKOutputSpendStatus_PendingThresholdConfirmations_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingThresholdConfirmations_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKOutputSpendStatus_init (JNIEnv *env, jclass clz) {
+ LDKOutputSpendStatus_PendingInitialBroadcast_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingInitialBroadcast"));
+ CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_class != NULL);
+ LDKOutputSpendStatus_PendingInitialBroadcast_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, "<init>", "(J)V");
+ CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_meth != NULL);
+ LDKOutputSpendStatus_PendingFirstConfirmation_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingFirstConfirmation"));
+ CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_class != NULL);
+ LDKOutputSpendStatus_PendingFirstConfirmation_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, "<init>", "([BI[B)V");
+ CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_meth != NULL);
+ LDKOutputSpendStatus_PendingThresholdConfirmations_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingThresholdConfirmations"));
+ CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_class != NULL);
+ LDKOutputSpendStatus_PendingThresholdConfirmations_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, "<init>", "([BI[BI[B)V");
+ CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKOutputSpendStatus_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKOutputSpendStatus_PendingInitialBroadcast: {
+ int64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false);
+ return (*env)->NewObject(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, LDKOutputSpendStatus_PendingInitialBroadcast_meth, delayed_until_height_ref);
+ }
+ case LDKOutputSpendStatus_PendingFirstConfirmation: {
+ int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_first_confirmation.first_broadcast_hash.data);
+ int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height;
+ LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx;
+ int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen);
+ (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data);
+ return (*env)->NewObject(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, LDKOutputSpendStatus_PendingFirstConfirmation_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr);
+ }
+ case LDKOutputSpendStatus_PendingThresholdConfirmations: {
+ int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_threshold_confirmations.first_broadcast_hash.data);
+ int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height;
+ LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx;
+ int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen);
+ (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data);
+ int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height;
+ int8_tArray confirmation_hash_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, confirmation_hash_arr, 0, 32, obj->pending_threshold_confirmations.confirmation_hash.data);
+ return (*env)->NewObject(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, LDKOutputSpendStatus_PendingThresholdConfirmations_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr, confirmation_height_conv, confirmation_hash_arr);
+ }
+ default: abort();
+ }
}
-
-static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
+static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return OutputSpendStatus_clone(&*owner->contents.result);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner);
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
- LDKRevocationKey ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
- LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return DecodeError_clone(&*owner->contents.err);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner);
LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv);
+ *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
default: abort();
}
}
-static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
- LDKLockedChannelMonitor ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
- LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
- LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
- CResult_LockedChannelMonitorNoneZ_get_err(owner_conv);
-}
-
-static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) {
- LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) {
+ LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = OutPoint_clone(&orig->data[i]);
+ ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]);
}
return ret;
}
-static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) {
- LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = MonitorUpdateId_clone(&orig->data[i]);
+typedef struct LDKChangeDestinationSource_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID get_change_destination_script_meth;
+} LDKChangeDestinationSource_JCalls;
+static void LDKChangeDestinationSource_JCalls_free(void* this_arg) {
+ LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
}
- return ret;
}
-static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
- LDKOutPoint ret = owner->a;
- ret.is_owned = false;
- return ret;
+LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) {
+ LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->get_change_destination_script_meth);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to get_change_destination_script in LDKChangeDestinationSource from rust threw an exception.");
+ }
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
- LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) {
+ LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
}
+static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->get_change_destination_script_meth = (*env)->GetMethodID(env, c, "get_change_destination_script", "()J");
+ CHECK(calls->get_change_destination_script_meth != NULL);
-static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
- return CVec_MonitorUpdateIdZ_clone(&owner->b);
+ LDKChangeDestinationSource ret = {
+ .this_arg = (void*) calls,
+ .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall,
+ .free = LDKChangeDestinationSource_JCalls_free,
+ };
+ return ret;
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
- LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
- LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv);
- int64_tArray ret_arr = NULL;
- ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
- int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t r = 0; r < ret_var.datalen; r++) {
- LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r];
- int64_t ret_conv_17_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var);
- ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned);
- ret_arr_ptr[r] = ret_conv_17_ref;
- }
- (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
- FREE(ret_var.data);
- return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChangeDestinationSource_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource");
+ *res_ptr = LDKChangeDestinationSource_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
}
-
-static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) {
- LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]);
- }
- return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1get_1change_1destination_1script(JNIEnv *env, jclass clz, int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr;
+ LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ");
+ *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg);
+ return tag_ptr(ret_conv, true);
}
+
typedef struct LDKKVStore_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
return tag_ptr(ret_conv, true);
}
+typedef struct LDKOutputSpender_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID spend_spendable_outputs_meth;
+} LDKOutputSpender_JCalls;
+static void LDKOutputSpender_JCalls_free(void* this_arg) {
+ LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) {
+ LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors;
+ int64_tArray descriptors_arr = NULL;
+ descriptors_arr = (*env)->NewLongArray(env, descriptors_var.datalen);
+ int64_t *descriptors_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, descriptors_arr, NULL);
+ for (size_t b = 0; b < descriptors_var.datalen; b++) {
+ LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+ *descriptors_conv_27_copy = descriptors_var.data[b];
+ int64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true);
+ descriptors_arr_ptr[b] = descriptors_conv_27_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, descriptors_arr, descriptors_arr_ptr, 0);
+ FREE(descriptors_var.data);
+ LDKCVec_TxOutZ outputs_var = outputs;
+ int64_tArray outputs_arr = NULL;
+ outputs_arr = (*env)->NewLongArray(env, outputs_var.datalen);
+ int64_t *outputs_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, outputs_arr, NULL);
+ for (size_t h = 0; h < outputs_var.datalen; h++) {
+ LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *outputs_conv_7_ref = outputs_var.data[h];
+ outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true);
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
+ FREE(outputs_var.data);
+ LDKCVec_u8Z change_destination_script_var = change_destination_script;
+ int8_tArray change_destination_script_arr = (*env)->NewByteArray(env, change_destination_script_var.datalen);
+ (*env)->SetByteArrayRegion(env, change_destination_script_arr, 0, change_destination_script_var.datalen, change_destination_script_var.data);
+ CVec_u8Z_free(change_destination_script_var);
+ int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight;
+ LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *locktime_copy = locktime;
+ int64_t locktime_ref = tag_ptr(locktime_copy, true);
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->spend_spendable_outputs_meth, descriptors_arr, outputs_arr, change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to spend_spendable_outputs in LDKOutputSpender from rust threw an exception.");
+ }
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_conv;
+}
+static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) {
+ LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKOutputSpender LDKOutputSpender_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->spend_spendable_outputs_meth = (*env)->GetMethodID(env, c, "spend_spendable_outputs", "([J[J[BIJ)J");
+ CHECK(calls->spend_spendable_outputs_meth != NULL);
+
+ LDKOutputSpender ret = {
+ .this_arg = (void*) calls,
+ .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall,
+ .free = LDKOutputSpender_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKOutputSpender_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+ *res_ptr = LDKOutputSpender_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpender_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr;
+ LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
+ descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
+ if (descriptors_constr.datalen > 0)
+ descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+ else
+ descriptors_constr.data = NULL;
+ int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
+ for (size_t b = 0; b < descriptors_constr.datalen; b++) {
+ int64_t descriptors_conv_27 = descriptors_vals[b];
+ void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
+ CHECK_ACCESS(descriptors_conv_27_ptr);
+ LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
+ descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
+ descriptors_constr.data[b] = descriptors_conv_27_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
+ LDKCVec_TxOutZ outputs_constr;
+ outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
+ if (outputs_constr.datalen > 0)
+ outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
+ else
+ outputs_constr.data = NULL;
+ int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
+ for (size_t h = 0; h < outputs_constr.datalen; h++) {
+ int64_t outputs_conv_7 = outputs_vals[h];
+ void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
+ CHECK_ACCESS(outputs_conv_7_ptr);
+ LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
+ outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
+ outputs_constr.data[h] = outputs_conv_7_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
+ LDKCVec_u8Z change_destination_script_ref;
+ change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
+ change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
+ void* locktime_ptr = untag_ptr(locktime);
+ CHECK_ACCESS(locktime_ptr);
+ LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
+ locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){
+ LDKOutputSweeper ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner);
+ LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){
+ LDKBestBlock ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner);
+ LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){
+ LDKOutputSweeper ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner);
+ LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return &*owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner);
+ int64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false);
+ return ret_ret;
+}
+
+static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+ LDKDelayedPaymentBasepoint ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+ LDKDelayedPaymentKey ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+ LDKHtlcBasepoint ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+ LDKHtlcKey ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+ LDKRevocationBasepoint ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+ LDKRevocationKey ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+ LDKLockedChannelMonitor ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
+ LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
+ CResult_LockedChannelMonitorNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){
+ LDKOutPoint ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner);
+ LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){
+ LDKChannelId ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner);
+ LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) {
+ LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) {
+ LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = MonitorUpdateId_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
+ LDKOutPoint ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
+ LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
+ return CVec_MonitorUpdateIdZ_clone(&owner->b);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+ LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
+ LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t r = 0; r < ret_var.datalen; r++) {
+ LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r];
+ int64_t ret_conv_17_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var);
+ ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned);
+ ret_arr_ptr[r] = ret_conv_17_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) {
+ LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
typedef struct LDKPersister_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
jweak o;
jmethodID persist_new_channel_meth;
jmethodID update_persisted_channel_meth;
+ jmethodID archive_persisted_channel_meth;
} LDKPersist_JCalls;
static void LDKPersist_JCalls_free(void* this_arg) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
FREE(j_calls);
}
}
-LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
} else {
DO_ASSERT(get_jenv_res == JNI_OK);
}
- LDKOutPoint channel_id_var = channel_id;
- int64_t channel_id_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
- channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned);
+ LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+ int64_t channel_funding_outpoint_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+ channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
LDKChannelMonitor data_var = *data;
int64_t data_ref = 0;
data_var = ChannelMonitor_clone(&data_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
jobject obj = (*env)->NewLocalRef(env, j_calls->o);
CHECK(obj != NULL);
- jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref);
+ jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_funding_outpoint_ref, data_ref, update_id_ref);
if (UNLIKELY((*env)->ExceptionCheck(env))) {
(*env)->ExceptionDescribe(env);
(*env)->FatalError(env, "A call to persist_new_channel in LDKPersist from rust threw an exception.");
}
return ret_conv;
}
-LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
} else {
DO_ASSERT(get_jenv_res == JNI_OK);
}
- LDKOutPoint channel_id_var = channel_id;
- int64_t channel_id_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
- channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned);
+ LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+ int64_t channel_funding_outpoint_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+ channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
LDKChannelMonitorUpdate update_var = update;
int64_t update_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
jobject obj = (*env)->NewLocalRef(env, j_calls->o);
CHECK(obj != NULL);
- jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref);
+ jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref);
if (UNLIKELY((*env)->ExceptionCheck(env))) {
(*env)->ExceptionDescribe(env);
(*env)->FatalError(env, "A call to update_persisted_channel in LDKPersist from rust threw an exception.");
}
return ret_conv;
}
+void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) {
+ LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+ int64_t channel_funding_outpoint_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+ channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ (*env)->CallVoidMethod(env, obj, j_calls->archive_persisted_channel_meth, channel_funding_outpoint_ref);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to archive_persisted_channel in LDKPersist from rust threw an exception.");
+ }
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+}
static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
CHECK(calls->persist_new_channel_meth != NULL);
calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
CHECK(calls->update_persisted_channel_meth != NULL);
+ calls->archive_persisted_channel_meth = (*env)->GetMethodID(env, c, "archive_persisted_channel", "(J)V");
+ CHECK(calls->archive_persisted_channel_meth != NULL);
LDKPersist ret = {
.this_arg = (void*) calls,
.persist_new_channel = persist_new_channel_LDKPersist_jcall,
.update_persisted_channel = update_persisted_channel_LDKPersist_jcall,
+ .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall,
.free = LDKPersist_JCalls_free,
};
return ret;
*res_ptr = LDKPersist_init(env, clz, o);
return tag_ptr(res_ptr, true);
}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t data, int64_t update_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
- LDKOutPoint channel_id_conv;
- channel_id_conv.inner = untag_ptr(channel_id);
- channel_id_conv.is_owned = ptr_is_owned(channel_id);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
- channel_id_conv = OutPoint_clone(&channel_id_conv);
+ LDKOutPoint channel_funding_outpoint_conv;
+ channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+ channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+ channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
LDKChannelMonitor data_conv;
data_conv.inner = untag_ptr(data);
data_conv.is_owned = ptr_is_owned(data);
update_id_conv.is_owned = ptr_is_owned(update_id);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
update_id_conv = MonitorUpdateId_clone(&update_id_conv);
- jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+ jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv));
return ret_conv;
}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t update, int64_t data, int64_t update_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
- LDKOutPoint channel_id_conv;
- channel_id_conv.inner = untag_ptr(channel_id);
- channel_id_conv.is_owned = ptr_is_owned(channel_id);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
- channel_id_conv = OutPoint_clone(&channel_id_conv);
+ LDKOutPoint channel_funding_outpoint_conv;
+ channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+ channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+ channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
LDKChannelMonitorUpdate update_conv;
update_conv.inner = untag_ptr(update);
update_conv.is_owned = ptr_is_owned(update);
update_id_conv.is_owned = ptr_is_owned(update_id);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
update_id_conv = MonitorUpdateId_clone(&update_id_conv);
- jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv));
+ jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv));
return ret_conv;
}
-typedef struct LDKFutureCallback_JCalls {
- atomic_size_t refcnt;
- JavaVM *vm;
- jweak o;
- jmethodID call_meth;
-} LDKFutureCallback_JCalls;
-static void LDKFutureCallback_JCalls_free(void* this_arg) {
- LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
- if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- (*env)->DeleteWeakGlobalRef(env, j_calls->o);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
- FREE(j_calls);
- }
-}
-void call_LDKFutureCallback_jcall(const void* this_arg) {
- LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- jobject obj = (*env)->NewLocalRef(env, j_calls->o);
- CHECK(obj != NULL);
- (*env)->CallVoidMethod(env, obj, j_calls->call_meth);
- if (UNLIKELY((*env)->ExceptionCheck(env))) {
- (*env)->ExceptionDescribe(env);
- (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception.");
- }
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
-}
-static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
- LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
- atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-}
-static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) {
- jclass c = (*env)->GetObjectClass(env, o);
- CHECK(c != NULL);
- LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls");
- atomic_init(&calls->refcnt, 1);
- DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
- calls->o = (*env)->NewWeakGlobalRef(env, o);
- calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V");
- CHECK(calls->call_meth != NULL);
-
- LDKFutureCallback ret = {
- .this_arg = (void*) calls,
- .call = call_LDKFutureCallback_jcall,
- .free = LDKFutureCallback_JCalls_free,
- };
- return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) {
- LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback");
- *res_ptr = LDKFutureCallback_init(env, clz, o);
- return tag_ptr(res_ptr, true);
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1archive_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr;
- (this_arg_conv->call)(this_arg_conv->this_arg);
+ LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
+ LDKOutPoint channel_funding_outpoint_conv;
+ channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+ channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+ channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
+ (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv);
}
typedef struct LDKListen_JCalls {
return ret_arr;
}
-typedef struct LDKEventHandler_JCalls {
+static jclass LDKSpendingDelay_Relative_class = NULL;
+static jmethodID LDKSpendingDelay_Relative_meth = NULL;
+static jclass LDKSpendingDelay_Absolute_class = NULL;
+static jmethodID LDKSpendingDelay_Absolute_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendingDelay_init (JNIEnv *env, jclass clz) {
+ LDKSpendingDelay_Relative_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Relative"));
+ CHECK(LDKSpendingDelay_Relative_class != NULL);
+ LDKSpendingDelay_Relative_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Relative_class, "<init>", "(I)V");
+ CHECK(LDKSpendingDelay_Relative_meth != NULL);
+ LDKSpendingDelay_Absolute_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Absolute"));
+ CHECK(LDKSpendingDelay_Absolute_class != NULL);
+ LDKSpendingDelay_Absolute_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Absolute_class, "<init>", "(I)V");
+ CHECK(LDKSpendingDelay_Absolute_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendingDelay_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKSpendingDelay_Relative: {
+ int32_t num_blocks_conv = obj->relative.num_blocks;
+ return (*env)->NewObject(env, LDKSpendingDelay_Relative_class, LDKSpendingDelay_Relative_meth, num_blocks_conv);
+ }
+ case LDKSpendingDelay_Absolute: {
+ int32_t height_conv = obj->absolute.height;
+ return (*env)->NewObject(env, LDKSpendingDelay_Absolute_class, LDKSpendingDelay_Absolute_meth, height_conv);
+ }
+ default: abort();
+ }
+}
+typedef struct LDKFutureCallback_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
jweak o;
- jmethodID handle_event_meth;
-} LDKEventHandler_JCalls;
-static void LDKEventHandler_JCalls_free(void* this_arg) {
- LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
+ jmethodID call_meth;
+} LDKFutureCallback_JCalls;
+static void LDKFutureCallback_JCalls_free(void* this_arg) {
+ LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
FREE(j_calls);
}
}
-void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) {
+void call_LDKFutureCallback_jcall(const void* this_arg) {
+ LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ (*env)->CallVoidMethod(env, obj, j_calls->call_meth);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception.");
+ }
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+}
+static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
+ LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V");
+ CHECK(calls->call_meth != NULL);
+
+ LDKFutureCallback ret = {
+ .this_arg = (void*) calls,
+ .call = call_LDKFutureCallback_jcall,
+ .free = LDKFutureCallback_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback");
+ *res_ptr = LDKFutureCallback_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr;
+ (this_arg_conv->call)(this_arg_conv->this_arg);
+}
+
+typedef struct LDKEventHandler_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID handle_event_meth;
+} LDKEventHandler_JCalls;
+static void LDKEventHandler_JCalls_free(void* this_arg) {
+ LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) {
LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
JNIEnv *env;
jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
jmethodID handle_shutdown_meth;
jmethodID handle_closing_signed_meth;
jmethodID handle_stfu_meth;
- jmethodID handle_splice_meth;
- jmethodID handle_splice_ack_meth;
- jmethodID handle_splice_locked_meth;
jmethodID handle_tx_add_input_meth;
jmethodID handle_tx_add_output_meth;
jmethodID handle_tx_remove_input_meth;
DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
}
}
-void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) {
- LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
- LDKSplice msg_var = *msg;
- int64_t msg_ref = 0;
- msg_var = Splice_clone(&msg_var);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
- msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- jobject obj = (*env)->NewLocalRef(env, j_calls->o);
- CHECK(obj != NULL);
- (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_meth, their_node_id_arr, msg_ref);
- if (UNLIKELY((*env)->ExceptionCheck(env))) {
- (*env)->ExceptionDescribe(env);
- (*env)->FatalError(env, "A call to handle_splice in LDKChannelMessageHandler from rust threw an exception.");
- }
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
-}
-void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) {
- LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
- LDKSpliceAck msg_var = *msg;
- int64_t msg_ref = 0;
- msg_var = SpliceAck_clone(&msg_var);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
- msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- jobject obj = (*env)->NewLocalRef(env, j_calls->o);
- CHECK(obj != NULL);
- (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_ack_meth, their_node_id_arr, msg_ref);
- if (UNLIKELY((*env)->ExceptionCheck(env))) {
- (*env)->ExceptionDescribe(env);
- (*env)->FatalError(env, "A call to handle_splice_ack in LDKChannelMessageHandler from rust threw an exception.");
- }
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
-}
-void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) {
- LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- JNIEnv *env;
- jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
- } else {
- DO_ASSERT(get_jenv_res == JNI_OK);
- }
- int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
- LDKSpliceLocked msg_var = *msg;
- int64_t msg_ref = 0;
- msg_var = SpliceLocked_clone(&msg_var);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
- msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- jobject obj = (*env)->NewLocalRef(env, j_calls->o);
- CHECK(obj != NULL);
- (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_locked_meth, their_node_id_arr, msg_ref);
- if (UNLIKELY((*env)->ExceptionCheck(env))) {
- (*env)->ExceptionDescribe(env);
- (*env)->FatalError(env, "A call to handle_splice_locked in LDKChannelMessageHandler from rust threw an exception.");
- }
- if (get_jenv_res == JNI_EDETACHED) {
- DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
- }
-}
void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
JNIEnv *env;
CHECK(calls->handle_closing_signed_meth != NULL);
calls->handle_stfu_meth = (*env)->GetMethodID(env, c, "handle_stfu", "([BJ)V");
CHECK(calls->handle_stfu_meth != NULL);
- calls->handle_splice_meth = (*env)->GetMethodID(env, c, "handle_splice", "([BJ)V");
- CHECK(calls->handle_splice_meth != NULL);
- calls->handle_splice_ack_meth = (*env)->GetMethodID(env, c, "handle_splice_ack", "([BJ)V");
- CHECK(calls->handle_splice_ack_meth != NULL);
- calls->handle_splice_locked_meth = (*env)->GetMethodID(env, c, "handle_splice_locked", "([BJ)V");
- CHECK(calls->handle_splice_locked_meth != NULL);
calls->handle_tx_add_input_meth = (*env)->GetMethodID(env, c, "handle_tx_add_input", "([BJ)V");
CHECK(calls->handle_tx_add_input_meth != NULL);
calls->handle_tx_add_output_meth = (*env)->GetMethodID(env, c, "handle_tx_add_output", "([BJ)V");
.handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall,
.handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall,
.handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall,
- .handle_splice = handle_splice_LDKChannelMessageHandler_jcall,
- .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall,
- .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall,
.handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall,
.handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall,
.handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall,
(this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
- LDKPublicKey their_node_id_ref;
- CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
- (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
- LDKSplice msg_conv;
- msg_conv.inner = untag_ptr(msg);
- msg_conv.is_owned = ptr_is_owned(msg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv.is_owned = false;
- (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
- LDKPublicKey their_node_id_ref;
- CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
- (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
- LDKSpliceAck msg_conv;
- msg_conv.inner = untag_ptr(msg);
- msg_conv.is_owned = ptr_is_owned(msg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv.is_owned = false;
- (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
- LDKPublicKey their_node_id_ref;
- CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
- (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
- LDKSpliceLocked msg_conv;
- msg_conv.inner = untag_ptr(msg);
- msg_conv.is_owned = ptr_is_owned(msg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv.is_owned = false;
- (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1tx_1add_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
return ret_arr;
}
+typedef struct LDKNodeIdLookUp_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID next_node_id_meth;
+} LDKNodeIdLookUp_JCalls;
+static void LDKNodeIdLookUp_JCalls_free(void* this_arg) {
+ LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) {
+ LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ int64_t short_channel_id_conv = short_channel_id;
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->next_node_id_meth, short_channel_id_conv);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to next_node_id in LDKNodeIdLookUp from rust threw an exception.");
+ }
+ LDKPublicKey ret_ref;
+ CHECK((*env)->GetArrayLength(env, ret) == 33);
+ (*env)->GetByteArrayRegion(env, ret, 0, 33, ret_ref.compressed_form);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_ref;
+}
+static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) {
+ LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->next_node_id_meth = (*env)->GetMethodID(env, c, "next_node_id", "(J)[B");
+ CHECK(calls->next_node_id_meth != NULL);
+
+ LDKNodeIdLookUp ret = {
+ .this_arg = (void*) calls,
+ .next_node_id = next_node_id_LDKNodeIdLookUp_jcall,
+ .free = LDKNodeIdLookUp_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKNodeIdLookUp_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+ *res_ptr = LDKNodeIdLookUp_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1next_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t short_channel_id) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form);
+ return ret_arr;
+}
+
typedef struct LDKRoutingMessageHandler_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
return ret_conv;
}
+typedef struct LDKSignBolt12InvoiceFn_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID sign_invoice_meth;
+} LDKSignBolt12InvoiceFn_JCalls;
+static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) {
+ LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) {
+ LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ LDKUnsignedBolt12Invoice message_var = *message;
+ int64_t message_ref = 0;
+ message_var = UnsignedBolt12Invoice_clone(&message_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+ message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_meth, message_ref);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to sign_invoice in LDKSignBolt12InvoiceFn from rust threw an exception.");
+ }
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_conv;
+}
+static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) {
+ LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->sign_invoice_meth = (*env)->GetMethodID(env, c, "sign_invoice", "(J)J");
+ CHECK(calls->sign_invoice_meth != NULL);
+
+ LDKSignBolt12InvoiceFn ret = {
+ .this_arg = (void*) calls,
+ .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall,
+ .free = LDKSignBolt12InvoiceFn_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignBolt12InvoiceFn_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn");
+ *res_ptr = LDKSignBolt12InvoiceFn_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1sign_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr;
+ LDKUnsignedBolt12Invoice message_conv;
+ message_conv.inner = untag_ptr(message);
+ message_conv.is_owned = ptr_is_owned(message);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
+ message_conv.is_owned = false;
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+typedef struct LDKSignInvoiceRequestFn_JCalls {
+ atomic_size_t refcnt;
+ JavaVM *vm;
+ jweak o;
+ jmethodID sign_invoice_request_meth;
+} LDKSignInvoiceRequestFn_JCalls;
+static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) {
+ LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ FREE(j_calls);
+ }
+}
+LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) {
+ LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg;
+ JNIEnv *env;
+ jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+ } else {
+ DO_ASSERT(get_jenv_res == JNI_OK);
+ }
+ LDKUnsignedInvoiceRequest message_var = *message;
+ int64_t message_ref = 0;
+ message_var = UnsignedInvoiceRequest_clone(&message_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+ message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+ jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+ CHECK(obj != NULL);
+ uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_request_meth, message_ref);
+ if (UNLIKELY((*env)->ExceptionCheck(env))) {
+ (*env)->ExceptionDescribe(env);
+ (*env)->FatalError(env, "A call to sign_invoice_request in LDKSignInvoiceRequestFn from rust threw an exception.");
+ }
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ if (get_jenv_res == JNI_EDETACHED) {
+ DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+ }
+ return ret_conv;
+}
+static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) {
+ LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (JNIEnv *env, jclass clz, jobject o) {
+ jclass c = (*env)->GetObjectClass(env, o);
+ CHECK(c != NULL);
+ LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+ calls->o = (*env)->NewWeakGlobalRef(env, o);
+ calls->sign_invoice_request_meth = (*env)->GetMethodID(env, c, "sign_invoice_request", "(J)J");
+ CHECK(calls->sign_invoice_request_meth != NULL);
+
+ LDKSignInvoiceRequestFn ret = {
+ .this_arg = (void*) calls,
+ .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall,
+ .free = LDKSignInvoiceRequestFn_JCalls_free,
+ };
+ return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignInvoiceRequestFn_1new(JNIEnv *env, jclass clz, jobject o) {
+ LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn");
+ *res_ptr = LDKSignInvoiceRequestFn_init(env, clz, o);
+ return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1sign_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr;
+ LDKUnsignedInvoiceRequest message_conv;
+ message_conv.inner = untag_ptr(message);
+ message_conv.is_owned = ptr_is_owned(message);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
+ message_conv.is_owned = false;
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static jclass LDKSignError_Signing_class = NULL;
+static jmethodID LDKSignError_Signing_meth = NULL;
+static jclass LDKSignError_Verification_class = NULL;
+static jmethodID LDKSignError_Verification_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSignError_init (JNIEnv *env, jclass clz) {
+ LDKSignError_Signing_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Signing"));
+ CHECK(LDKSignError_Signing_class != NULL);
+ LDKSignError_Signing_meth = (*env)->GetMethodID(env, LDKSignError_Signing_class, "<init>", "()V");
+ CHECK(LDKSignError_Signing_meth != NULL);
+ LDKSignError_Verification_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Verification"));
+ CHECK(LDKSignError_Verification_class != NULL);
+ LDKSignError_Verification_meth = (*env)->GetMethodID(env, LDKSignError_Verification_class, "<init>", "(Lorg/ldk/enums/Secp256k1Error;)V");
+ CHECK(LDKSignError_Verification_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSignError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKSignError *obj = (LDKSignError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKSignError_Signing: {
+ return (*env)->NewObject(env, LDKSignError_Signing_class, LDKSignError_Signing_meth);
+ }
+ case LDKSignError_Verification: {
+ jclass verification_conv = LDKSecp256k1Error_to_java(env, obj->verification);
+ return (*env)->NewObject(env, LDKSignError_Verification_class, LDKSignError_Verification_meth, verification_conv);
+ }
+ default: abort();
+ }
+}
static jclass LDKEffectiveCapacity_ExactLiquidity_class = NULL;
static jmethodID LDKEffectiveCapacity_ExactLiquidity_meth = NULL;
static jclass LDKEffectiveCapacity_AdvertisedMaxHTLC_class = NULL;
return ret_arr;
}
+static jclass LDKIntroductionNode_NodeId_class = NULL;
+static jmethodID LDKIntroductionNode_NodeId_meth = NULL;
+static jclass LDKIntroductionNode_DirectedShortChannelId_class = NULL;
+static jmethodID LDKIntroductionNode_DirectedShortChannelId_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKIntroductionNode_init (JNIEnv *env, jclass clz) {
+ LDKIntroductionNode_NodeId_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$NodeId"));
+ CHECK(LDKIntroductionNode_NodeId_class != NULL);
+ LDKIntroductionNode_NodeId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_NodeId_class, "<init>", "([B)V");
+ CHECK(LDKIntroductionNode_NodeId_meth != NULL);
+ LDKIntroductionNode_DirectedShortChannelId_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$DirectedShortChannelId"));
+ CHECK(LDKIntroductionNode_DirectedShortChannelId_class != NULL);
+ LDKIntroductionNode_DirectedShortChannelId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_DirectedShortChannelId_class, "<init>", "(Lorg/ldk/enums/Direction;J)V");
+ CHECK(LDKIntroductionNode_DirectedShortChannelId_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKIntroductionNode_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKIntroductionNode_NodeId: {
+ int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form);
+ return (*env)->NewObject(env, LDKIntroductionNode_NodeId_class, LDKIntroductionNode_NodeId_meth, node_id_arr);
+ }
+ case LDKIntroductionNode_DirectedShortChannelId: {
+ jclass _0_conv = LDKDirection_to_java(env, obj->directed_short_channel_id._0);
+ int64_t _1_conv = obj->directed_short_channel_id._1;
+ return (*env)->NewObject(env, LDKIntroductionNode_DirectedShortChannelId_class, LDKIntroductionNode_DirectedShortChannelId_meth, _0_conv, _1_conv);
+ }
+ default: abort();
+ }
+}
typedef struct LDKCoinSelectionSource_JCalls {
atomic_size_t refcnt;
JavaVM *vm;
return tag_ptr(ret_ref, true);
}
+static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) {
+ LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar");
+ *ret_ref = BigEndianScalar_clone(arg);
+ return tag_ptr(ret_ref, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg);
+ int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig);
+ LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar");
+ *ret_ref = BigEndianScalar_clone(orig_conv);
+ return tag_ptr(ret_ref, true);
+}
+
static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) {
LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error");
*ret_copy = Bech32Error_clone(arg);
Str_free(dummy);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
+ LDKCVec_u8Z _res_ref;
+ _res_ref.datalen = (*env)->GetArrayLength(env, _res);
+ _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
+ CVec_u8Z_free(_res_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKRefundMaybeWithDerivedMetadataBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKRefund o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Refund_clone(&o_conv);
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_RefundBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1some(JNIEnv *env, jclass clz, int64_t o) {
LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
*ret_copy = COption_u64Z_some(o);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
- LDKCVec_u8Z _res_ref;
- _res_ref.datalen = (*env)->GetArrayLength(env, _res);
- _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
- (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
- CVec_u8Z_free(_res_ref);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1u8ZZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
LDKCVec_u8Z o_ref;
o_ref.datalen = (*env)->GetArrayLength(env, o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKUnsignedBolt12Invoice o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = UnsignedBolt12Invoice_clone(&o_conv);
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBolt12Invoice o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Bolt12Invoice_clone(&o_conv);
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKSchnorrSignature o_ref;
+ CHECK((*env)->GetArrayLength(env, o) == 64);
+ (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) {
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = CResult_SchnorrSignatureNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_SchnorrSignatureNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) {
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig);
+ LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+ *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ThirtyTwoBytesZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
LDKCVec_ThirtyTwoBytesZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKAmount o_conv = *(LDKAmount*)(o_ptr);
+ o_conv = Amount_clone((LDKAmount*)untag_ptr(o));
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = COption_AmountZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = COption_AmountZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_AmountZ_free(_res_conv);
+}
+
+static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) {
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = COption_AmountZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = COption_AmountZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKQuantity o_conv = *(LDKQuantity*)(o_ptr);
+ o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o));
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = COption_QuantityZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = COption_QuantityZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_QuantityZ_free(_res_conv);
+}
+
+static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) {
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = COption_QuantityZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig);
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = COption_QuantityZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
LDKThirtyTwoBytes o_ref;
CHECK((*env)->GetArrayLength(env, o) == 32);
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr);
- // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar
+ o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o));
LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ");
*ret_copy = COption_BigEndianScalarZ_some(o_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
- LDKSchnorrSignature o_ref;
- CHECK((*env)->GetArrayLength(env, o) == 64);
- (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) {
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = CResult_SchnorrSignatureNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_SchnorrSignatureNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) {
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig);
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
LDKECDSASignature o_ref;
CHECK((*env)->GetArrayLength(env, o) == 64);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKTransaction o_ref;
+ o_ref.datalen = (*env)->GetArrayLength(env, o);
+ o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
+ o_ref.data_is_owned = true;
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = CResult_TransactionNoneZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) {
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = CResult_TransactionNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_TransactionNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) {
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = CResult_TransactionNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig);
+ LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+ *ret_conv = CResult_TransactionNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WriteableEcdsaChannelSignerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
- LDKTransaction o_ref;
- o_ref.datalen = (*env)->GetArrayLength(env, o);
- o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes");
- (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
- o_ref.data_is_owned = true;
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = CResult_TransactionNoneZ_ok(o_ref);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) {
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = CResult_TransactionNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_TransactionNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) {
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = CResult_TransactionNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig);
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = CResult_TransactionNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1WriteableScoreZ_1some(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBestBlock o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = BestBlock_clone(&o_conv);
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_BestBlockDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) {
LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
*ret_conv = C2Tuple_usizeTransactionZ_clone(arg);
CVec_MonitorEventZ_free(_res_constr);
}
-static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
- *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg);
+static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+ *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg);
- int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg);
+ int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
- *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+ *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_tArray b, int8_tArray c) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_tArray c, int8_tArray d) {
LDKOutPoint a_conv;
a_conv.inner = untag_ptr(a);
a_conv.is_owned = ptr_is_owned(a);
CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
a_conv = OutPoint_clone(&a_conv);
- LDKCVec_MonitorEventZ b_constr;
- b_constr.datalen = (*env)->GetArrayLength(env, b);
- if (b_constr.datalen > 0)
- b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+ LDKChannelId b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv = ChannelId_clone(&b_conv);
+ LDKCVec_MonitorEventZ c_constr;
+ c_constr.datalen = (*env)->GetArrayLength(env, c);
+ if (c_constr.datalen > 0)
+ c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
else
- b_constr.data = NULL;
- int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
- for (size_t o = 0; o < b_constr.datalen; o++) {
- int64_t b_conv_14 = b_vals[o];
- void* b_conv_14_ptr = untag_ptr(b_conv_14);
- CHECK_ACCESS(b_conv_14_ptr);
- LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr);
- b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14));
- b_constr.data[o] = b_conv_14_conv;
- }
- (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
- LDKPublicKey c_ref;
- CHECK((*env)->GetArrayLength(env, c) == 33);
- (*env)->GetByteArrayRegion(env, c, 0, 33, c_ref.compressed_form);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
- *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ c_constr.data = NULL;
+ int64_t* c_vals = (*env)->GetLongArrayElements (env, c, NULL);
+ for (size_t o = 0; o < c_constr.datalen; o++) {
+ int64_t c_conv_14 = c_vals[o];
+ void* c_conv_14_ptr = untag_ptr(c_conv_14);
+ CHECK_ACCESS(c_conv_14_ptr);
+ LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr);
+ c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14));
+ c_constr.data[o] = c_conv_14_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, c, c_vals, 0);
+ LDKPublicKey d_ref;
+ CHECK((*env)->GetArrayLength(env, d) == 33);
+ (*env)->GetByteArrayRegion(env, d, 0, 33, d_ref.compressed_form);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+ *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr);
FREE(untag_ptr(_res));
- C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv);
+ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
- LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements");
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t x = 0; x < _res_constr.datalen; x++) {
- int64_t _res_conv_49 = _res_vals[x];
- void* _res_conv_49_ptr = untag_ptr(_res_conv_49);
- CHECK_ACCESS(_res_conv_49_ptr);
- LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr);
- FREE(untag_ptr(_res_conv_49));
- _res_constr.data[x] = _res_conv_49_conv;
+ for (size_t f = 0; f < _res_constr.datalen; f++) {
+ int64_t _res_conv_57 = _res_vals[f];
+ void* _res_conv_57_ptr = untag_ptr(_res_conv_57);
+ CHECK_ACCESS(_res_conv_57_ptr);
+ LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr);
+ FREE(untag_ptr(_res_conv_57));
+ _res_constr.data[f] = _res_conv_57_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
- CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
+ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOfferId o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = OfferId_clone(&o_conv);
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OfferIdDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) {
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok();
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_NoneBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOffer o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Offer_clone(&o_conv);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OfferBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKOffer o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
- LDKPublicKey o_ref;
- CHECK((*env)->GetArrayLength(env, o) == 33);
- (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
- LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
- *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
- LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
- LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
- *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_PublicKeySecp256k1ErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) {
- LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
- *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig);
- LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
- *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKNodeId o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKPublicKey o_ref;
+ CHECK((*env)->GetArrayLength(env, o) == 33);
+ (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
+ LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+ *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+ LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+ *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_PublicKeySecp256k1ErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+ *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig);
+ LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+ *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1NetworkUpdateZ_1some(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+ *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_java(env, e);
+ LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+ *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_u64ShortChannelIdErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKPendingHTLCInfo o_conv;
o_conv.inner = untag_ptr(o);
e_conv.inner = untag_ptr(e);
e_conv.is_owned = ptr_is_owned(e);
CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
- // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr
-
+ e_conv = InboundHTLCErr_clone(&e_conv);
LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
*ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv);
return tag_ptr(ret_conv, true);
CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv);
}
+static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) {
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+ *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig);
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+ *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
LDKCVec_HTLCOutputInCommitmentZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr);
+ o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o));
+ LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+ *ret_copy = COption_PaymentContextZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+ *ret_copy = COption_PaymentContextZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_PaymentContextZ_free(_res_conv);
+}
+
+static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) {
+ LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+ *ret_copy = COption_PaymentContextZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig);
+ LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+ *ret_copy = COption_PaymentContextZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) {
LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z");
*ret_conv = C2Tuple_u64u16Z_clone(arg);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
- LDKThirtyTwoBytes o_ref;
- CHECK((*env)->GetArrayLength(env, o) == 32);
- (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data);
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKChannelId o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = ChannelId_clone(&o_conv);
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+ *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv);
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+ *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr);
+ LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv);
+ CResult_ChannelIdAPIErrorZ_free(_res_conv);
}
-static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg);
+static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+ *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig);
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig);
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+ *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
- *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg);
+static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+ *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg);
- int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
- *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig);
+ LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+ *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) {
- LDKThirtyTwoBytes a_ref;
- CHECK((*env)->GetArrayLength(env, a) == 32);
- (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
+ LDKChannelId a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = ChannelId_clone(&a_conv);
LDKPublicKey b_ref;
CHECK((*env)->GetArrayLength(env, b) == 33);
(*env)->GetByteArrayRegion(env, b, 0, 33, b_ref.compressed_form);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
- *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref);
+ LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+ *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr);
+ LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr);
FREE(untag_ptr(_res));
- C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv);
+ C2Tuple_ChannelIdPublicKeyZ_free(_res_conv);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
- LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ChannelIdPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements");
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t j = 0; j < _res_constr.datalen; j++) {
- int64_t _res_conv_35 = _res_vals[j];
- void* _res_conv_35_ptr = untag_ptr(_res_conv_35);
- CHECK_ACCESS(_res_conv_35_ptr);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr);
- FREE(untag_ptr(_res_conv_35));
- _res_constr.data[j] = _res_conv_35_conv;
+ for (size_t e = 0; e < _res_constr.datalen; e++) {
+ int64_t _res_conv_30 = _res_vals[e];
+ void* _res_conv_30_ptr = untag_ptr(_res_conv_30);
+ CHECK_ACCESS(_res_conv_30_ptr);
+ LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr);
+ FREE(untag_ptr(_res_conv_30));
+ _res_constr.data[e] = _res_conv_30_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+ CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_ChannelIdZ _res_constr;
+ _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+ for (size_t l = 0; l < _res_constr.datalen; l++) {
+ int64_t _res_conv_11 = _res_vals[l];
+ LDKChannelId _res_conv_11_conv;
+ _res_conv_11_conv.inner = untag_ptr(_res_conv_11);
+ _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv);
+ _res_constr.data[l] = _res_conv_11_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
- CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr);
+ CVec_ChannelIdZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOfferWithDerivedMetadataBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv);
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1some(JNIEnv *env, jclass clz, jstring o) {
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) {
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok();
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
- LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_NoneBolt12SemanticErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) {
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig);
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKThirtyTwoBytes o_ref;
+ CHECK((*env)->GetArrayLength(env, o) == 32);
+ (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data);
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
+ e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig);
+ LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1OffersMessageZ_1some(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CVec_CommitmentTransactionZ_free(_res_constr);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
- LDKCVec_TransactionZ _res_constr;
- _res_constr.datalen = (*env)->GetArrayLength(env, _res);
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
- else
- _res_constr.data = NULL;
- for (size_t i = 0; i < _res_constr.datalen; i++) {
- int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
- LDKTransaction _res_conv_8_ref;
- _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8);
- _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes");
- (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data);
- _res_conv_8_ref.data_is_owned = true;
- _res_constr.data[i] = _res_conv_8_ref;
- }
- CVec_TransactionZ_free(_res_constr);
-}
-
static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) {
LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
*ret_conv = C2Tuple_u32TxOutZ_clone(arg);
return ret_ref;
}
-static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
- *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg);
- int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig);
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
- *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
- LDKPublicKey a_ref;
- CHECK((*env)->GetArrayLength(env, a) == 33);
- (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
- void* b_ptr = untag_ptr(b);
- CHECK_ACCESS(b_ptr);
- LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr);
- b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b));
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
- *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyCOption_1SocketAddressZZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
- LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PeerDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_PeerDetailsZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements");
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t r = 0; r < _res_constr.datalen; r++) {
- int64_t _res_conv_43 = _res_vals[r];
- void* _res_conv_43_ptr = untag_ptr(_res_conv_43);
- CHECK_ACCESS(_res_conv_43_ptr);
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr);
- FREE(untag_ptr(_res_conv_43));
- _res_constr.data[r] = _res_conv_43_conv;
+ for (size_t n = 0; n < _res_constr.datalen; n++) {
+ int64_t _res_conv_13 = _res_vals[n];
+ LDKPeerDetails _res_conv_13_conv;
+ _res_conv_13_conv.inner = untag_ptr(_res_conv_13);
+ _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv);
+ _res_constr.data[n] = _res_conv_13_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
- CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr);
+ CVec_PeerDetailsZ_free(_res_constr);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKUnsignedInvoiceRequest o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = UnsignedInvoiceRequest_clone(&o_conv);
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceRequest o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = InvoiceRequest_clone(&o_conv);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
LDKSecretKey o_ref;
CHECK((*env)->GetArrayLength(env, o) == 32);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKVerifiedInvoiceRequest o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInvoiceRequestFields o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = InvoiceRequestFields_clone(&o_conv);
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_COption_1NoneZ_1some(JNIEnv *env, jclass clz) {
jclass ret_conv = LDKCOption_NoneZ_to_java(env, COption_NoneZ_some());
return ret_conv;
CVec_WitnessZ_free(_res_constr);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
+ LDKECDSASignature o_ref;
+ CHECK((*env)->GetArrayLength(env, o) == 64);
+ (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = COption_ECDSASignatureZ_some(o_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = COption_ECDSASignatureZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_ECDSASignatureZ_free(_res_conv);
+}
+
+static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) {
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = COption_ECDSASignatureZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig);
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = COption_ECDSASignatureZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1i64Z_1some(JNIEnv *env, jclass clz, int64_t o) {
LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z");
*ret_copy = COption_i64Z_some(o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+ LDKCVec_TransactionZ _res_constr;
+ _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
+ else
+ _res_constr.data = NULL;
+ for (size_t i = 0; i < _res_constr.datalen; i++) {
+ int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
+ LDKTransaction _res_conv_8_ref;
+ _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8);
+ _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data);
+ _res_conv_8_ref.data_is_owned = true;
+ _res_constr.data[i] = _res_conv_8_ref;
+ }
+ CVec_TransactionZ_free(_res_constr);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKChannelId o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = ChannelId_clone(&o_conv);
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ChannelIdDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) {
LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z");
*ret_conv = C2Tuple__u832u16Z_clone(arg);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr);
+ o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o));
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_PaymentContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKUnknownPaymentContext o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = UnknownPaymentContext_clone(&o_conv);
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBolt12OfferContext o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Bolt12OfferContext_clone(&o_conv);
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBolt12RefundContext o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Bolt12RefundContext_clone(&o_conv);
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) {
+ LDKStr o_conv = java_to_owned_str(env, o);
+ LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+ *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+ LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+ LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+ *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_StrSecp256k1ErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) {
+ LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+ *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig);
+ LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+ *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) {
LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
*ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) {
- LDKStr o_conv = java_to_owned_str(env, o);
- LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
- *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
- LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
- LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
- *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
- LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_StrSecp256k1ErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) {
- LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
- *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig);
- LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
- *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutUtxoLookupErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv);
}
+static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) {
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+ *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig);
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+ *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CResult_PeeledOnionNoneZ_free(_res_conv);
}
+static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) {
+ LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+ *ret_conv = CResult_PeeledOnionNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig);
+ LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+ *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CResult_SendSuccessSendErrorZ_free(_res_conv);
}
+static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) {
+ LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+ *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig);
+ LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+ *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedPathNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKBlindedPath o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKTrackedSpendableOutput o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = TrackedSpendableOutput_clone(&o_conv);
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr);
+ o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o));
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKFilter o_conv = *(LDKFilter*)(o_ptr);
+ if (o_conv.free == LDKFilter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFilter_JCalls_cloned(&o_conv);
+ }
+ LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
+ *ret_copy = COption_FilterZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
+ *ret_copy = COption_FilterZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_FilterZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TrackedSpendableOutputZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_TrackedSpendableOutputZ _res_constr;
+ _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+ for (size_t y = 0; y < _res_constr.datalen; y++) {
+ int64_t _res_conv_24 = _res_vals[y];
+ LDKTrackedSpendableOutput _res_conv_24_conv;
+ _res_conv_24_conv.inner = untag_ptr(_res_conv_24);
+ _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv);
+ _res_constr.data[y] = _res_conv_24_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+ CVec_TrackedSpendableOutputZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOutputSweeper o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ // WARNING: we need a move here but no clone is available for LDKOutputSweeper
+
+ LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+ *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+ *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OutputSweeperDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKBestBlock a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = BestBlock_clone(&a_conv);
+ LDKOutputSweeper b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ // WARNING: we need a move here but no clone is available for LDKOutputSweeper
+
+ LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ");
+ *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_BestBlockOutputSweeperZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr);
+ // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+ *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+ *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKDelayedPaymentBasepoint o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) {
- void* o_ptr = untag_ptr(o);
- CHECK_ACCESS(o_ptr);
- LDKFilter o_conv = *(LDKFilter*)(o_ptr);
- if (o_conv.free == LDKFilter_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKFilter_JCalls_cloned(&o_conv);
- }
- LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
- *ret_copy = COption_FilterZ_some(o_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) {
- LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
- *ret_copy = COption_FilterZ_none();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- COption_FilterZ_free(_res_conv);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKLockedChannelMonitor o_conv;
o_conv.inner = untag_ptr(o);
CResult_LockedChannelMonitorNoneZ_free(_res_conv);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1OutPointZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
- LDKCVec_OutPointZ _res_constr;
+static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) {
+ LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+ *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig);
+ LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+ *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKOutPoint a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = OutPoint_clone(&a_conv);
+ LDKChannelId b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv = ChannelId_clone(&b_conv);
+ LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+ *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_OutPointChannelIdZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1OutPointChannelIdZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+ LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr;
_res_constr.datalen = (*env)->GetArrayLength(env, _res);
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements");
else
_res_constr.data = NULL;
int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
- for (size_t k = 0; k < _res_constr.datalen; k++) {
- int64_t _res_conv_10 = _res_vals[k];
- LDKOutPoint _res_conv_10_conv;
- _res_conv_10_conv.inner = untag_ptr(_res_conv_10);
- _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv);
- _res_constr.data[k] = _res_conv_10_conv;
+ for (size_t d = 0; d < _res_constr.datalen; d++) {
+ int64_t _res_conv_29 = _res_vals[d];
+ void* _res_conv_29_ptr = untag_ptr(_res_conv_29);
+ CHECK_ACCESS(_res_conv_29_ptr);
+ LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr);
+ FREE(untag_ptr(_res_conv_29));
+ _res_constr.data[d] = _res_conv_29_conv;
}
(*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
- CVec_OutPointZ_free(_res_constr);
+ CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorUpdateIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
return ret_arr;
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1as_1transaction(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKTransactionU16LenLimited this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ Transaction_free(ret_var);
+ return ret_arr;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKTransactionU16LenLimited obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_ret, true);
}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig);
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_clone(orig_conv));
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1block_1overflow(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_block_overflow());
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1tx_1index_1overflow(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_tx_index_overflow());
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1vout_1index_1overflow(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_vout_index_overflow());
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a);
+ LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b);
+ jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_block_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+ int32_t ret_conv = block_from_scid(short_channel_id);
+ return ret_conv;
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_tx_1index_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+ int32_t ret_conv = tx_index_from_scid(short_channel_id);
+ return ret_conv;
+}
+
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_vout_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+ int16_t ret_conv = vout_from_scid(short_channel_id);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_scid_1from_1parts(JNIEnv *env, jclass clz, int64_t block, int64_t tx_index, int64_t vout_index) {
+ LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+ *ret_conv = scid_from_parts(block, tx_index, vout_index);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UntrustedString_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKUntrustedString this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- FutureCallback_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKFuture this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKTrackedSpendableOutput this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- Future_free(this_obj_conv);
+ TrackedSpendableOutput_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+ *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr);
+ val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val));
+ TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1status(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1status(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKTrackedSpendableOutput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr);
+ val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val));
+ TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1new(JNIEnv *env, jclass clz, int64_t descriptor_arg, int64_t channel_id_arg, int64_t status_arg) {
+ void* descriptor_arg_ptr = untag_ptr(descriptor_arg);
+ CHECK_ACCESS(descriptor_arg_ptr);
+ LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr);
+ descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg));
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ void* status_arg_ptr = untag_ptr(status_arg);
+ CHECK_ACCESS(status_arg_ptr);
+ LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr);
+ status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg));
+ LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) {
- LDKFuture ret_var = Future_clone(arg);
+static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) {
+ LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKFuture arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKTrackedSpendableOutput arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = Future_clone_ptr(&arg_conv);
+ int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKFuture orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKTrackedSpendableOutput orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKFuture ret_var = Future_clone(&orig_conv);
+ LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKTrackedSpendableOutput a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKTrackedSpendableOutput b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1is_1spent_1in(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx) {
+ LDKTrackedSpendableOutput this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKTransaction tx_ref;
+ tx_ref.datalen = (*env)->GetArrayLength(env, tx);
+ tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, tx, 0, tx_ref.datalen, tx_ref.data);
+ tx_ref.data_is_owned = true;
+ jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKTrackedSpendableOutput obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+ *ret_conv = TrackedSpendableOutput_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ OutputSpendStatus_free(this_ptr_conv);
+}
+
+static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) {
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg);
+ int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig);
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1initial_1broadcast(JNIEnv *env, jclass clz, int64_t delayed_until_height) {
+ void* delayed_until_height_ptr = untag_ptr(delayed_until_height);
+ CHECK_ACCESS(delayed_until_height_ptr);
+ LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr);
+ delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height));
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1first_1confirmation(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) {
+ LDKThirtyTwoBytes first_broadcast_hash_ref;
+ CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32);
+ (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data);
+ LDKTransaction latest_spending_tx_ref;
+ latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx);
+ latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data);
+ latest_spending_tx_ref.data_is_owned = true;
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1threshold_1confirmations(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) {
+ LDKThirtyTwoBytes first_broadcast_hash_ref;
+ CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32);
+ (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data);
+ LDKTransaction latest_spending_tx_ref;
+ latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx);
+ latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes");
+ (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data);
+ latest_spending_tx_ref.data_is_owned = true;
+ LDKThirtyTwoBytes confirmation_hash_ref;
+ CHECK((*env)->GetArrayLength(env, confirmation_hash) == 32);
+ (*env)->GetByteArrayRegion(env, confirmation_hash, 0, 32, confirmation_hash_ref.data);
+ LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+ *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a);
+ LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b);
+ jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+ *ret_conv = OutputSpendStatus_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOutputSweeper this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OutputSweeper_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1new(JNIEnv *env, jclass clz, int64_t best_block, int64_t broadcaster, int64_t fee_estimator, int64_t chain_data_source, int64_t output_spender, int64_t change_destination_source, int64_t kv_store, int64_t logger) {
+ LDKBestBlock best_block_conv;
+ best_block_conv.inner = untag_ptr(best_block);
+ best_block_conv.is_owned = ptr_is_owned(best_block);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv);
+ best_block_conv = BestBlock_clone(&best_block_conv);
+ void* broadcaster_ptr = untag_ptr(broadcaster);
+ CHECK_ACCESS(broadcaster_ptr);
+ LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr);
+ if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv);
+ }
+ void* fee_estimator_ptr = untag_ptr(fee_estimator);
+ CHECK_ACCESS(fee_estimator_ptr);
+ LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr);
+ if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
+ }
+ void* chain_data_source_ptr = untag_ptr(chain_data_source);
+ CHECK_ACCESS(chain_data_source_ptr);
+ LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr);
+ // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+ if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) {
+ // Manually implement clone for Java trait instances
+ if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFilter_JCalls_cloned(&chain_data_source_conv.some);
+ }
+ }
+ void* output_spender_ptr = untag_ptr(output_spender);
+ CHECK_ACCESS(output_spender_ptr);
+ LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr);
+ if (output_spender_conv.free == LDKOutputSpender_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOutputSpender_JCalls_cloned(&output_spender_conv);
+ }
+ void* change_destination_source_ptr = untag_ptr(change_destination_source);
+ CHECK_ACCESS(change_destination_source_ptr);
+ LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr);
+ if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv);
+ }
+ void* kv_store_ptr = untag_ptr(kv_store);
+ CHECK_ACCESS(kv_store_ptr);
+ LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr);
+ if (kv_store_conv.free == LDKKVStore_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKKVStore_JCalls_cloned(&kv_store_conv);
+ }
+ void* logger_ptr = untag_ptr(logger);
+ CHECK_ACCESS(logger_ptr);
+ LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+ if (logger_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&logger_conv);
+ }
+ LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1track_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray output_descriptors, int64_t channel_id, jboolean exclude_static_outputs, int64_t delay_until_height) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr;
+ output_descriptors_constr.datalen = (*env)->GetArrayLength(env, output_descriptors);
+ if (output_descriptors_constr.datalen > 0)
+ output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+ else
+ output_descriptors_constr.data = NULL;
+ int64_t* output_descriptors_vals = (*env)->GetLongArrayElements (env, output_descriptors, NULL);
+ for (size_t b = 0; b < output_descriptors_constr.datalen; b++) {
+ int64_t output_descriptors_conv_27 = output_descriptors_vals[b];
+ void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27);
+ CHECK_ACCESS(output_descriptors_conv_27_ptr);
+ LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr);
+ output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27));
+ output_descriptors_constr.data[b] = output_descriptors_conv_27_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, output_descriptors, output_descriptors_vals, 0);
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
+ void* delay_until_height_ptr = untag_ptr(delay_until_height);
+ CHECK_ACCESS(delay_until_height_ptr);
+ LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr);
+ delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height));
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1tracked_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+ int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+ for (size_t y = 0; y < ret_var.datalen; y++) {
+ LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y];
+ int64_t ret_conv_24_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var);
+ ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned);
+ ret_arr_ptr[y] = ret_conv_24_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1current_1best_1block(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen");
+ *ret_ret = OutputSweeper_as_Listen(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Confirm(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOutputSweeper this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm");
+ *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SpendingDelay_free(this_ptr_conv);
+}
+
+static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) {
+ LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+ *ret_copy = SpendingDelay_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg);
+ int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig);
+ LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+ *ret_copy = SpendingDelay_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1relative(JNIEnv *env, jclass clz, int32_t num_blocks) {
+ LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+ *ret_copy = SpendingDelay_relative(num_blocks);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1absolute(JNIEnv *env, jclass clz, int32_t height) {
+ LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+ *ret_copy = SpendingDelay_absolute(height);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ void* arg_a_ptr = untag_ptr(arg_a);
+ CHECK_ACCESS(arg_a_ptr);
+ LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr);
+ if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv);
+ }
+ void* arg_b_ptr = untag_ptr(arg_b);
+ CHECK_ACCESS(arg_b_ptr);
+ LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr);
+ if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFeeEstimator_JCalls_cloned(&arg_b_conv);
+ }
+ void* arg_c_ptr = untag_ptr(arg_c);
+ CHECK_ACCESS(arg_c_ptr);
+ LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr);
+ // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+ if (arg_c_conv.tag == LDKCOption_FilterZ_Some) {
+ // Manually implement clone for Java trait instances
+ if (arg_c_conv.some.free == LDKFilter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFilter_JCalls_cloned(&arg_c_conv.some);
+ }
+ }
+ void* arg_d_ptr = untag_ptr(arg_d);
+ CHECK_ACCESS(arg_d_ptr);
+ LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr);
+ if (arg_d_conv.free == LDKOutputSpender_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOutputSpender_JCalls_cloned(&arg_d_conv);
+ }
+ void* arg_e_ptr = untag_ptr(arg_e);
+ CHECK_ACCESS(arg_e_ptr);
+ LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr);
+ if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv);
+ }
+ void* arg_f_ptr = untag_ptr(arg_f);
+ CHECK_ACCESS(arg_f_ptr);
+ LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr);
+ if (arg_f_conv.free == LDKKVStore_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKKVStore_JCalls_cloned(&arg_f_conv);
+ }
+ void* arg_g_ptr = untag_ptr(arg_g);
+ CHECK_ACCESS(arg_g_ptr);
+ LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr);
+ if (arg_g_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&arg_g_conv);
+ }
+ LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+ *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ void* arg_a_ptr = untag_ptr(arg_a);
+ CHECK_ACCESS(arg_a_ptr);
+ LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr);
+ if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv);
+ }
+ void* arg_b_ptr = untag_ptr(arg_b);
+ CHECK_ACCESS(arg_b_ptr);
+ LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr);
+ if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFeeEstimator_JCalls_cloned(&arg_b_conv);
+ }
+ void* arg_c_ptr = untag_ptr(arg_c);
+ CHECK_ACCESS(arg_c_ptr);
+ LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr);
+ // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+ if (arg_c_conv.tag == LDKCOption_FilterZ_Some) {
+ // Manually implement clone for Java trait instances
+ if (arg_c_conv.some.free == LDKFilter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFilter_JCalls_cloned(&arg_c_conv.some);
+ }
+ }
+ void* arg_d_ptr = untag_ptr(arg_d);
+ CHECK_ACCESS(arg_d_ptr);
+ LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr);
+ if (arg_d_conv.free == LDKOutputSpender_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOutputSpender_JCalls_cloned(&arg_d_conv);
+ }
+ void* arg_e_ptr = untag_ptr(arg_e);
+ CHECK_ACCESS(arg_e_ptr);
+ LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr);
+ if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv);
+ }
+ void* arg_f_ptr = untag_ptr(arg_f);
+ CHECK_ACCESS(arg_f_ptr);
+ LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr);
+ if (arg_f_conv.free == LDKKVStore_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKKVStore_JCalls_cloned(&arg_f_conv);
+ }
+ void* arg_g_ptr = untag_ptr(arg_g);
+ CHECK_ACCESS(arg_g_ptr);
+ LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr);
+ if (arg_g_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&arg_g_conv);
+ }
+ LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+ *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ FutureCallback_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKFuture this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Future_free(this_obj_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1register_1callback_1fn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t callback) {
LDKFuture this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv = Future_clone(&this_arg_conv);
- Future_wait(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ Future_wait(&this_arg_conv);
}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIEnv *env, jclass clz, int64_t this_arg, int64_t max_wait) {
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv = Future_clone(&this_arg_conv);
- jboolean ret_conv = Future_wait_timeout(this_arg_conv, max_wait);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = Future_wait_timeout(&this_arg_conv, max_wait);
return ret_conv;
}
future_conv.inner = untag_ptr(future);
future_conv.is_owned = ptr_is_owned(future);
CHECK_INNER_FIELD_ACCESS_OR_NULL(future_conv);
- future_conv = Future_clone(&future_conv);
- LDKSleeper ret_var = Sleeper_from_single_future(future_conv);
+ future_conv.is_owned = false;
+ LDKSleeper ret_var = Sleeper_from_single_future(&future_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
fut_a_conv.inner = untag_ptr(fut_a);
fut_a_conv.is_owned = ptr_is_owned(fut_a);
CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_a_conv);
- fut_a_conv = Future_clone(&fut_a_conv);
+ fut_a_conv.is_owned = false;
LDKFuture fut_b_conv;
fut_b_conv.inner = untag_ptr(fut_b);
fut_b_conv.is_owned = ptr_is_owned(fut_b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_b_conv);
- fut_b_conv = Future_clone(&fut_b_conv);
- LDKSleeper ret_var = Sleeper_from_two_futures(fut_a_conv, fut_b_conv);
+ fut_b_conv.is_owned = false;
+ LDKSleeper ret_var = Sleeper_from_two_futures(&fut_a_conv, &fut_b_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
futures_conv_8_conv.inner = untag_ptr(futures_conv_8);
futures_conv_8_conv.is_owned = ptr_is_owned(futures_conv_8);
CHECK_INNER_FIELD_ACCESS_OR_NULL(futures_conv_8_conv);
- futures_conv_8_conv = Future_clone(&futures_conv_8_conv);
+ // WARNING: we need a move here but no clone is available for LDKFuture
+
futures_constr.data[i] = futures_conv_8_conv;
}
(*env)->ReleaseLongArrayElements(env, futures, futures_vals, 0);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ");
- *ret_copy = Record_get_channel_id(&this_ptr_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr);
- val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val));
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
Record_set_channel_id(&this_ptr_conv, val_conv);
}
LDKPublicKey peer_id_arg_ref;
CHECK((*env)->GetArrayLength(env, peer_id_arg) == 33);
(*env)->GetByteArrayRegion(env, peer_id_arg, 0, 33, peer_id_arg_ref.compressed_form);
- void* channel_id_arg_ptr = untag_ptr(channel_id_arg);
- CHECK_ACCESS(channel_id_arg_ptr);
- LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr);
- channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg));
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKStr args_arg_conv = java_to_owned_str(env, args_arg);
LDKStr module_path_arg_conv = java_to_owned_str(env, module_path_arg);
LDKStr file_arg_conv = java_to_owned_str(env, file_arg);
BestBlock_free(this_obj_conv);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKBestBlock this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *BestBlock_get_block_hash(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKBestBlock this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ BestBlock_set_block_hash(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1height(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKBestBlock this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int32_t ret_conv = BestBlock_get_height(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1height(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+ LDKBestBlock this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ BestBlock_set_height(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash_arg, int32_t height_arg) {
+ LDKThirtyTwoBytes block_hash_arg_ref;
+ CHECK((*env)->GetArrayLength(env, block_hash_arg) == 32);
+ (*env)->GetByteArrayRegion(env, block_hash_arg, 0, 32, block_hash_arg_ref.data);
+ LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) {
LDKBestBlock ret_var = BestBlock_clone(arg);
int64_t ret_ref = 0;
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBestBlock o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = BestBlock_hash(&o_conv);
+ return ret_conv;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BestBlock_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
LDKBestBlock a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash, int32_t height) {
- LDKThirtyTwoBytes block_hash_ref;
- CHECK((*env)->GetArrayLength(env, block_hash) == 32);
- (*env)->GetByteArrayRegion(env, block_hash, 0, 32, block_hash_ref.data);
- LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1block_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
- LDKBestBlock this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, BestBlock_block_hash(&this_arg_conv).data);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKBestBlock obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
return ret_arr;
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1height(JNIEnv *env, jclass clz, int64_t this_arg) {
- LDKBestBlock this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- int32_t ret_conv = BestBlock_height(&this_arg_conv);
- return ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+ *ret_conv = BestBlock_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
}
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
return ret_conv;
}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1output_1spending_1fee(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKConfirmationTarget_to_java(env, ConfirmationTarget_output_spending_fee());
+ return ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1hash(JNIEnv *env, jclass clz, int64_t o) {
LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o);
int64_t ret_conv = ConfirmationTarget_hash(o_conv);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
+ LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
int64_tArray ret_arr = NULL;
ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t k = 0; k < ret_var.datalen; k++) {
- LDKOutPoint ret_conv_10_var = ret_var.data[k];
- int64_t ret_conv_10_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var);
- ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned);
- ret_arr_ptr[k] = ret_conv_10_ref;
+ for (size_t d = 0; d < ret_var.datalen; d++) {
+ LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+ *ret_conv_29_conv = ret_var.data[d];
+ ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true);
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
ChainMonitor_rebroadcast_pending_claims(&this_arg_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t monitor_opt) {
+ LDKChainMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKOutPoint monitor_opt_conv;
+ monitor_opt_conv.inner = untag_ptr(monitor_opt);
+ monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv);
+ monitor_opt_conv = OutPoint_clone(&monitor_opt_conv);
+ ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1archive_1fully_1resolved_1channel_1monitors(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChainMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKChainMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKChannelMonitorUpdate this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKChannelMonitorUpdate this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv);
+}
+
static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) {
LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg);
int64_t ret_ref = 0;
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed_1with_1info(JNIEnv *env, jclass clz, int64_t reason, int64_t outpoint, int64_t channel_id) {
+ void* reason_ptr = untag_ptr(reason);
+ CHECK_ACCESS(reason_ptr);
+ LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr);
+ reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason));
+ LDKOutPoint outpoint_conv;
+ outpoint_conv.inner = untag_ptr(outpoint);
+ outpoint_conv.is_owned = ptr_is_owned(outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
+ outpoint_conv = OutPoint_clone(&outpoint_conv);
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
+ LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+ *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed(JNIEnv *env, jclass clz, int64_t a) {
LDKOutPoint a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t channel_id, int64_t monitor_update_id) {
LDKOutPoint funding_txo_conv;
funding_txo_conv.inner = untag_ptr(funding_txo);
funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
- *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
+ *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChannelMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_arr;
}
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1broadcast_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
+ void* broadcaster_ptr = untag_ptr(broadcaster);
+ if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); }
+ LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr;
+ void* fee_estimator_ptr = untag_ptr(fee_estimator);
+ if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); }
+ LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr;
void* logger_ptr = untag_ptr(logger);
if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
- LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv);
- jobjectArray ret_arr = NULL;
- ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
- ;
- for (size_t i = 0; i < ret_var.datalen; i++) {
- LDKTransaction ret_conv_8_var = ret_var.data[i];
- int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, ret_conv_8_var.datalen);
- (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, ret_conv_8_var.datalen, ret_conv_8_var.data);
- Transaction_free(ret_conv_8_var);
- (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
- }
-
- FREE(ret_var.data);
- return ret_arr;
+ ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
}
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
+ LDKChannelMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ void* broadcaster_ptr = untag_ptr(broadcaster);
+ CHECK_ACCESS(broadcaster_ptr);
+ LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr);
+ if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv);
+ }
+ void* fee_estimator_ptr = untag_ptr(fee_estimator);
+ CHECK_ACCESS(fee_estimator_ptr);
+ LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr);
+ if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
+ }
+ void* logger_ptr = untag_ptr(logger);
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+ ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
+}
+
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx, int32_t confirmation_height) {
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_arr;
}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1is_1fully_1resolved(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) {
+ LDKChannelMonitor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ void* logger_ptr = untag_ptr(logger);
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+ jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv);
+ return ret_conv;
+}
+
JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1claimable_1balances(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
- LDKOutPoint this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, OutPoint_to_channel_id(&this_arg_conv).data);
- return ret_arr;
-}
-
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKOutPoint obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) {
+ LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKInboundHTLCErr arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKInboundHTLCErr orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKInboundHTLCErr o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = InboundHTLCErr_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKInboundHTLCErr a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKInboundHTLCErr b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1payment_1onion(JNIEnv *env, jclass clz, int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) {
LDKUpdateAddHTLC msg_conv;
msg_conv.inner = untag_ptr(msg);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
LDKFinalOnionHopData payment_data_conv;
payment_data_conv.inner = untag_ptr(payment_data);
payment_data_conv.is_owned = ptr_is_owned(payment_data);
CHECK_ACCESS(payment_metadata_ptr);
LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr);
payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata));
+ void* payment_context_ptr = untag_ptr(payment_context);
+ CHECK_ACCESS(payment_context_ptr);
+ LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr);
+ payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context));
LDKThirtyTwoBytes phantom_shared_secret_ref;
CHECK((*env)->GetArrayLength(env, phantom_shared_secret) == 32);
(*env)->GetByteArrayRegion(env, phantom_shared_secret, 0, 32, phantom_shared_secret_ref.data);
}
(*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0);
LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
- *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error);
+ *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
LDKFinalOnionHopData payment_data_conv;
payment_data_conv.inner = untag_ptr(payment_data);
payment_data_conv.is_owned = ptr_is_owned(payment_data);
}
(*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0);
LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
- *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr);
+ *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
ChannelDetails_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKChannelDetails this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKChannelDetails this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ChannelDetails_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ChannelDetails_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty(JNIEnv *env, jclass clz, int64_t this_ptr) {
ChannelDetails_set_config(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t counterparty_arg, int64_t funding_txo_arg, int64_t channel_type_arg, int64_t short_channel_id_arg, int64_t outbound_scid_alias_arg, int64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, int64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, int64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, int64_t confirmations_required_arg, int64_t confirmations_arg, int64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, int64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKChannelCounterparty counterparty_arg_conv;
- counterparty_arg_conv.inner = untag_ptr(counterparty_arg);
- counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv);
- counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv);
- LDKOutPoint funding_txo_arg_conv;
- funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg);
- funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv);
- funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv);
- LDKChannelTypeFeatures channel_type_arg_conv;
- channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
- channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
- channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
- void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg);
- CHECK_ACCESS(short_channel_id_arg_ptr);
- LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr);
- short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg));
- void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg);
- CHECK_ACCESS(outbound_scid_alias_arg_ptr);
- LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr);
- outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg));
- void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg);
- CHECK_ACCESS(inbound_scid_alias_arg_ptr);
- LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr);
- inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg));
- void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg);
- CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr);
- LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr);
- LDKU128 user_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16);
- (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes);
- void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg);
- CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr);
- LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr);
- feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg));
- void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg);
- CHECK_ACCESS(confirmations_required_arg_ptr);
- LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr);
- confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg));
- void* confirmations_arg_ptr = untag_ptr(confirmations_arg);
- CHECK_ACCESS(confirmations_arg_ptr);
- LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr);
- confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg));
- void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg);
- CHECK_ACCESS(force_close_spend_delay_arg_ptr);
- LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr);
- force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg));
- void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg);
- CHECK_ACCESS(channel_shutdown_state_arg_ptr);
- LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr);
- channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg));
- void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg);
- CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr);
- LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr);
- inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg));
- void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg);
- CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr);
- LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr);
- inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg));
- LDKChannelConfig config_arg_conv;
- config_arg_conv.inner = untag_ptr(config_arg);
- config_arg_conv.is_owned = ptr_is_owned(config_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv);
- config_arg_conv = ChannelConfig_clone(&config_arg_conv);
- LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) {
LDKChannelDetails ret_var = ChannelDetails_clone(arg);
int64_t ret_ref = 0;
LDKU128 user_channel_id_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
- void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id);
- CHECK_ACCESS(temporary_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr);
- temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id));
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
LDKUserConfig override_config_conv;
override_config_conv.inner = untag_ptr(override_config);
override_config_conv.is_owned = ptr_is_owned(override_config);
CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv);
override_config_conv = UserConfig_clone(&override_config_conv);
- LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+ LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
*ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv);
return tag_ptr(ret_conv, true);
}
return ret_arr;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
- uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+ *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
- uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv);
shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv);
+ *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
- uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+ *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
- uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+ *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t temporary_channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
- uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
(*env)->GetByteArrayRegion(env, funding_transaction, 0, funding_transaction_ref.datalen, funding_transaction_ref.data);
funding_transaction_ref.data_is_owned = true;
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref);
+ *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref);
return tag_ptr(ret_conv, true);
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr;
+ LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr;
temporary_channels_constr.datalen = (*env)->GetArrayLength(env, temporary_channels);
if (temporary_channels_constr.datalen > 0)
- temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements");
+ temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements");
else
temporary_channels_constr.data = NULL;
int64_t* temporary_channels_vals = (*env)->GetLongArrayElements (env, temporary_channels, NULL);
- for (size_t j = 0; j < temporary_channels_constr.datalen; j++) {
- int64_t temporary_channels_conv_35 = temporary_channels_vals[j];
- void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35);
- CHECK_ACCESS(temporary_channels_conv_35_ptr);
- LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr);
- temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35));
- temporary_channels_constr.data[j] = temporary_channels_conv_35_conv;
+ for (size_t e = 0; e < temporary_channels_constr.datalen; e++) {
+ int64_t temporary_channels_conv_30 = temporary_channels_vals[e];
+ void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30);
+ CHECK_ACCESS(temporary_channels_conv_30_ptr);
+ LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr);
+ temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30));
+ temporary_channels_constr.data[e] = temporary_channels_conv_30_conv;
}
(*env)->ReleaseLongArrayElements(env, temporary_channels, temporary_channels_vals, 0);
LDKTransaction funding_transaction_ref;
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config_update) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config_update) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
- LDKCVec_ThirtyTwoBytesZ channel_ids_constr;
+ LDKCVec_ChannelIdZ channel_ids_constr;
channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids);
if (channel_ids_constr.datalen > 0)
- channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+ channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
else
channel_ids_constr.data = NULL;
- for (size_t i = 0; i < channel_ids_constr.datalen; i++) {
- int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i);
- LDKThirtyTwoBytes channel_ids_conv_8_ref;
- CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32);
- (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data);
- channel_ids_constr.data[i] = channel_ids_conv_8_ref;
- }
+ int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL);
+ for (size_t l = 0; l < channel_ids_constr.datalen; l++) {
+ int64_t channel_ids_conv_11 = channel_ids_vals[l];
+ LDKChannelId channel_ids_conv_11_conv;
+ channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11);
+ channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv);
+ channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv);
+ channel_ids_constr.data[l] = channel_ids_conv_11_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0);
LDKChannelConfigUpdate config_update_conv;
config_update_conv.inner = untag_ptr(config_update);
config_update_conv.is_owned = ptr_is_owned(config_update);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
- LDKCVec_ThirtyTwoBytesZ channel_ids_constr;
+ LDKCVec_ChannelIdZ channel_ids_constr;
channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids);
if (channel_ids_constr.datalen > 0)
- channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+ channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
else
channel_ids_constr.data = NULL;
- for (size_t i = 0; i < channel_ids_constr.datalen; i++) {
- int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i);
- LDKThirtyTwoBytes channel_ids_conv_8_ref;
- CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32);
- (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data);
- channel_ids_constr.data[i] = channel_ids_conv_8_ref;
- }
+ int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL);
+ for (size_t l = 0; l < channel_ids_constr.datalen; l++) {
+ int64_t channel_ids_conv_11 = channel_ids_vals[l];
+ LDKChannelId channel_ids_conv_11_conv;
+ channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11);
+ channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv);
+ channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv);
+ channel_ids_constr.data[l] = channel_ids_conv_11_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0);
LDKChannelConfig config_conv;
config_conv.inner = untag_ptr(config);
config_conv.is_owned = ptr_is_owned(config);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
LDKThirtyTwoBytes intercept_id_ref;
CHECK((*env)->GetArrayLength(env, intercept_id) == 32);
(*env)->GetByteArrayRegion(env, intercept_id, 0, 32, intercept_id_ref.data);
- uint8_t next_hop_channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, next_hop_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, next_hop_channel_id, 0, 32, next_hop_channel_id_arr);
- uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr;
+ LDKChannelId next_hop_channel_id_conv;
+ next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id);
+ next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv);
+ next_hop_channel_id_conv.is_owned = false;
LDKPublicKey next_node_id_ref;
CHECK((*env)->GetArrayLength(env, next_node_id) == 33);
(*env)->GetByteArrayRegion(env, next_node_id, 0, 33, next_node_id_ref.compressed_form);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat);
+ *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat);
return tag_ptr(ret_conv, true);
}
return ret_arr;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t temporary_channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
- uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref);
+ *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- uint8_t temporary_channel_id_arr[32];
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
- uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv.is_owned = false;
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref);
+ *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1offer_1builder(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1refund_1builder(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+ (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+ void* retry_strategy_ptr = untag_ptr(retry_strategy);
+ CHECK_ACCESS(retry_strategy_ptr);
+ LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
+ retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
+ void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat);
+ CHECK_ACCESS(max_total_routing_fee_msat_ptr);
+ LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr);
+ max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat));
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv);
return tag_ptr(ret_conv, true);
}
refund_conv.is_owned = ptr_is_owned(refund);
CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv);
refund_conv.is_owned = false;
- LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
*ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_ret, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+ *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1init_1features(JNIEnv *env, jclass clz, int64_t config) {
LDKUserConfig config_conv;
config_conv.inner = untag_ptr(config);
return ret_arr;
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) {
+ LDKDelayedPaymentBasepoint this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKPublicKey per_commitment_point_ref;
+ CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33);
+ (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data);
+ return ret_arr;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKDelayedPaymentBasepoint obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_arr;
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) {
+ LDKHtlcBasepoint this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKPublicKey per_commitment_point_ref;
+ CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33);
+ (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data);
+ return ret_arr;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKHtlcBasepoint obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_add_1public_1key_1tweak(JNIEnv *env, jclass clz, int8_tArray base_point, int8_tArray tweak) {
+ LDKPublicKey base_point_ref;
+ CHECK((*env)->GetArrayLength(env, base_point) == 33);
+ (*env)->GetByteArrayRegion(env, base_point, 0, 33, base_point_ref.compressed_form);
+ uint8_t tweak_arr[32];
+ CHECK((*env)->GetArrayLength(env, tweak) == 32);
+ (*env)->GetByteArrayRegion(env, tweak, 0, 32, tweak_arr);
+ uint8_t (*tweak_ref)[32] = &tweak_arr;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form);
+ return ret_arr;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevocationBasepoint_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKRevocationBasepoint this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1dangerous_1value(JNIEnv *env, jclass clz) {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_dangerous_value();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1hash(JNIEnv *env, jclass clz, int64_t o) {
LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o);
int64_t ret_conv = DecodeError_hash(o_conv);
ErrorMessage_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKErrorMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKErrorMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ErrorMessage_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ErrorMessage_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
ErrorMessage_set_data(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKStr data_arg_conv = java_to_owned_str(env, data_arg);
- LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv);
+ LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
WarningMessage_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKWarningMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *WarningMessage_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKWarningMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- WarningMessage_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ WarningMessage_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
WarningMessage_set_data(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKStr data_arg_conv = java_to_owned_str(env, data_arg);
- LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv);
+ LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKOpenChannel this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKCommonOpenChannelFields this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- OpenChannel_free(this_obj_conv);
+ CommonOpenChannelFields_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(&this_ptr_conv));
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv));
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKThirtyTwoBytes val_ref;
CHECK((*env)->GetArrayLength(env, val) == 32);
(*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- OpenChannel_set_chain_hash(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_funding_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
- return ret_conv;
+ LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_push_msat(&this_ptr_conv, val);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv);
+ int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+ int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+ int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv);
+ int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val);
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv);
+ int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_feerate_per_kw(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
}
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv);
+ int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_to_self_delay(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val);
}
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv);
+ int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_payment_point(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+ CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv);
+ int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannel_set_channel_flags(&this_ptr_conv, val);
+ CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+ *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
CHECK_ACCESS(val_ptr);
LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+ CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv);
+ LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonOpenChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
val_conv = ChannelTypeFeatures_clone(&val_conv);
- OpenChannel_set_channel_type(&this_ptr_conv, val_conv);
+ CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
LDKThirtyTwoBytes chain_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+ LDKChannelId temporary_channel_id_arg_conv;
+ temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+ temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+ temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
LDKPublicKey funding_pubkey_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
(*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
LDKPublicKey revocation_basepoint_arg_ref;
CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
(*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
- LDKPublicKey payment_point_arg_ref;
- CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33);
- (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form);
+ LDKPublicKey payment_basepoint_arg_ref;
+ CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
+ (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
LDKPublicKey delayed_payment_basepoint_arg_ref;
CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
(*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
- LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) {
+ LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCommonOpenChannelFields arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCommonOpenChannelFields orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCommonOpenChannelFields o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKCommonOpenChannelFields a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKCommonOpenChannelFields b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOpenChannel this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OpenChannel_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCommonOpenChannelFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = CommonOpenChannelFields_clone(&val_conv);
+ OpenChannel_set_common_fields(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OpenChannel_set_push_msat(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) {
+ LDKCommonOpenChannelFields common_fields_arg_conv;
+ common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+ common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+ common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv);
+ LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
OpenChannelV2_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_chain_hash(&this_ptr_conv));
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ LDKCommonOpenChannelFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = CommonOpenChannelFields_clone(&val_conv);
+ OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv);
}
JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val);
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_to_self_delay(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
OpenChannelV2_set_locktime(&this_ptr_conv, val);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannelV2_set_channel_flags(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
- val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = ChannelTypeFeatures_clone(&val_conv);
- OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv);
-}
-
JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) {
- LDKThirtyTwoBytes chain_hash_arg_ref;
- CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
- (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
- LDKPublicKey funding_pubkey_arg_ref;
- CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
- (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
- LDKPublicKey revocation_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
- LDKPublicKey payment_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
- LDKPublicKey delayed_payment_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
- LDKPublicKey htlc_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form);
- LDKPublicKey first_per_commitment_point_arg_ref;
- CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33);
- (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) {
+ LDKCommonOpenChannelFields common_fields_arg_conv;
+ common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+ common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+ common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv);
LDKPublicKey second_per_commitment_point_arg_ref;
CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33);
(*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form);
- void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
- CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
- LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
- shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
- LDKChannelTypeFeatures channel_type_arg_conv;
- channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
- channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
- channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg);
- LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
+ LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKAcceptChannel this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKCommonAcceptChannelFields this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- AcceptChannel_free(this_obj_conv);
+ CommonAcceptChannelFields_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv);
+ int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+ int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+ int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv);
+ int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val);
}
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv);
+ int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_minimum_depth(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val);
}
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv);
+ int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv);
return ret_conv;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_to_self_delay(&this_ptr_conv, val);
+ CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val);
}
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKAcceptChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_payment_point(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK((*env)->GetArrayLength(env, val) == 33);
(*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+ CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+ *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
CHECK_ACCESS(val_ptr);
LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+ CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv);
+ LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKCommonAcceptChannelFields this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
val_conv = ChannelTypeFeatures_clone(&val_conv);
- AcceptChannel_set_channel_type(&this_ptr_conv, val_conv);
+ CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
+ LDKChannelId temporary_channel_id_arg_conv;
+ temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+ temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+ temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
LDKPublicKey funding_pubkey_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
(*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
LDKPublicKey revocation_basepoint_arg_ref;
CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
(*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
- LDKPublicKey payment_point_arg_ref;
- CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33);
- (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form);
+ LDKPublicKey payment_basepoint_arg_ref;
+ CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
+ (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
LDKPublicKey delayed_payment_basepoint_arg_ref;
CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
(*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
- LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) {
+ LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKCommonAcceptChannelFields arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCommonAcceptChannelFields orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKCommonAcceptChannelFields o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKCommonAcceptChannelFields a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKCommonAcceptChannelFields b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKAcceptChannel this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ AcceptChannel_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCommonAcceptChannelFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = CommonAcceptChannelFields_clone(&val_conv);
+ AcceptChannel_set_common_fields(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) {
+ LDKCommonAcceptChannelFields common_fields_arg_conv;
+ common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+ common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+ common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv);
+ LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
AcceptChannelV2_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKAcceptChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKAcceptChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ LDKCommonAcceptChannelFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = CommonAcceptChannelFields_clone(&val_conv);
+ AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
- return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
- return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKAcceptChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
- val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = ChannelTypeFeatures_clone(&val_conv);
- AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv);
-}
-
JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKAcceptChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) {
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
- LDKPublicKey funding_pubkey_arg_ref;
- CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
- (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
- LDKPublicKey revocation_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
- LDKPublicKey payment_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
- LDKPublicKey delayed_payment_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
- LDKPublicKey htlc_basepoint_arg_ref;
- CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33);
- (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form);
- LDKPublicKey first_per_commitment_point_arg_ref;
- CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33);
- (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) {
+ LDKCommonAcceptChannelFields common_fields_arg_conv;
+ common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+ common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+ common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv);
LDKPublicKey second_per_commitment_point_arg_ref;
CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33);
(*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form);
- void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
- CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
- LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
- shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
- LDKChannelTypeFeatures channel_type_arg_conv;
- channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
- channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
- channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg);
- LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
+ LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
FundingCreated_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKFundingCreated this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKFundingCreated this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
FundingCreated_set_signature(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) {
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) {
+ LDKChannelId temporary_channel_id_arg_conv;
+ temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+ temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+ temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
LDKThirtyTwoBytes funding_txid_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_txid_arg) == 32);
(*env)->GetByteArrayRegion(env, funding_txid_arg, 0, 32, funding_txid_arg_ref.data);
LDKECDSASignature signature_arg_ref;
CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
(*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
- LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref);
+ LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
FundingSigned_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKFundingSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingSigned_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKFundingSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- FundingSigned_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ FundingSigned_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
FundingSigned_set_signature(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKECDSASignature signature_arg_ref;
CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
(*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
- LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref);
+ LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
ChannelReady_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKChannelReady this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReady_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKChannelReady this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ChannelReady_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ChannelReady_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1next_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKPublicKey next_per_commitment_point_arg_ref;
CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33);
(*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form);
CHECK_ACCESS(short_channel_id_alias_arg_ptr);
LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr);
short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg));
- LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv);
+ LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
Stfu_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKStfu this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Stfu_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKStfu this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- Stfu_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ Stfu_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1initiator(JNIEnv *env, jclass clz, int64_t this_ptr) {
Stfu_set_initiator(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_t initiator_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_t initiator_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
Splice_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKSplice this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Splice_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKSplice this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- Splice_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ Splice_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
Splice_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes chain_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
LDKPublicKey funding_pubkey_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
(*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
- LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref);
+ LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
SpliceAck_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKSpliceAck this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceAck_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKSpliceAck this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- SpliceAck_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ SpliceAck_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes chain_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
LDKPublicKey funding_pubkey_arg_ref;
CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
(*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
- LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref);
+ LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
SpliceLocked_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKSpliceLocked this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceLocked_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKSpliceLocked this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- SpliceLocked_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ SpliceLocked_set_channel_id(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxAddInput_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxAddInput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddInput_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxAddInput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxAddInput_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxAddInput_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxAddInput_set_sequence(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKTransactionU16LenLimited prevtx_arg_conv;
prevtx_arg_conv.inner = untag_ptr(prevtx_arg);
prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv);
prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv);
- LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg);
+ LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxAddOutput_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxAddOutput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddOutput_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxAddOutput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxAddOutput_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxAddOutput_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxAddOutput_set_script(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKCVec_u8Z script_arg_ref;
script_arg_ref.datalen = (*env)->GetArrayLength(env, script_arg);
script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, script_arg, 0, script_arg_ref.datalen, script_arg_ref.data);
- LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref);
+ LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxRemoveInput_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxRemoveInput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveInput_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxRemoveInput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxRemoveInput_set_serial_id(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxRemoveOutput_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxRemoveOutput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveOutput_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxRemoveOutput this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxRemoveOutput_set_serial_id(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxComplete_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxComplete this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxComplete_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxComplete this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxComplete_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxComplete_set_channel_id(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxSignatures_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxSignatures this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxSignatures_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxSignatures this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxSignatures_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxSignatures_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1tx_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxSignatures_set_witnesses(&this_ptr_conv, val_constr);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTxSignatures this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+ *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKTxSignatures this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr);
+ val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val));
+ TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg, int64_t funding_outpoint_sig_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes tx_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, tx_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, tx_hash_arg, 0, 32, tx_hash_arg_ref.data);
witnesses_arg_conv_8_ref.data_is_owned = true;
witnesses_arg_constr.data[i] = witnesses_arg_conv_8_ref;
}
- LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr);
+ void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg);
+ CHECK_ACCESS(funding_outpoint_sig_arg_ptr);
+ LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr);
+ funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg));
+ LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxInitRbf_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxInitRbf this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxInitRbf_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxInitRbf this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxInitRbf_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxInitRbf_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg);
CHECK_ACCESS(funding_output_contribution_arg_ptr);
LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr);
funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg));
- LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv);
+ LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxAckRbf_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxAckRbf this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAckRbf_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxAckRbf this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxAckRbf_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxAckRbf_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1funding_1output_1contribution(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t funding_output_contribution_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t funding_output_contribution_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg);
CHECK_ACCESS(funding_output_contribution_arg_ptr);
LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr);
funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg));
- LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv);
+ LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
TxAbort_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKTxAbort this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAbort_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKTxAbort this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- TxAbort_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ TxAbort_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
TxAbort_set_data(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray data_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray data_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKCVec_u8Z data_arg_ref;
data_arg_ref.datalen = (*env)->GetArrayLength(env, data_arg);
data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, data_arg, 0, data_arg_ref.datalen, data_arg_ref.data);
- LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref);
+ LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
Shutdown_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKShutdown this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Shutdown_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKShutdown this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- Shutdown_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ Shutdown_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray scriptpubkey_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKCVec_u8Z scriptpubkey_arg_ref;
scriptpubkey_arg_ref.datalen = (*env)->GetArrayLength(env, scriptpubkey_arg);
scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes");
(*env)->GetByteArrayRegion(env, scriptpubkey_arg, 0, scriptpubkey_arg_ref.datalen, scriptpubkey_arg_ref.data);
- LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref);
+ LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
ClosingSigned_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKClosingSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKClosingSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ClosingSigned_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ClosingSigned_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
ClosingSigned_set_fee_range(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKECDSASignature signature_arg_ref;
CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
(*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv);
fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv);
- LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv);
+ LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UpdateAddHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateAddHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateAddHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes payment_hash_arg_ref;
CHECK((*env)->GetArrayLength(env, payment_hash_arg) == 32);
(*env)->GetByteArrayRegion(env, payment_hash_arg, 0, 32, payment_hash_arg_ref.data);
LDKPublicKey blinding_point_arg_ref;
CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33);
(*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form);
- LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref);
+ LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UpdateFulfillHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateFulfillHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateFulfillHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes payment_preimage_arg_ref;
CHECK((*env)->GetArrayLength(env, payment_preimage_arg) == 32);
(*env)->GetByteArrayRegion(env, payment_preimage_arg, 0, 32, payment_preimage_arg_ref.data);
- LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref);
+ LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UpdateFailHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateFailHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateFailHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
UpdateFailMalformedHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateFailMalformedHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateFailMalformedHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
CommitmentSigned_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKCommitmentSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKCommitmentSigned this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKECDSASignature signature_arg_ref;
CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
(*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
(*env)->GetByteArrayRegion(env, htlc_signatures_arg_conv_8, 0, 64, htlc_signatures_arg_conv_8_ref.compact_form);
htlc_signatures_arg_constr.data[i] = htlc_signatures_arg_conv_8_ref;
}
- LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr);
+ LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
RevokeAndACK_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKRevokeAndACK this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKRevokeAndACK this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_ptr) {
RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes per_commitment_secret_arg_ref;
CHECK((*env)->GetArrayLength(env, per_commitment_secret_arg) == 32);
(*env)->GetByteArrayRegion(env, per_commitment_secret_arg, 0, 32, per_commitment_secret_arg_ref.data);
LDKPublicKey next_per_commitment_point_arg_ref;
CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33);
(*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form);
- LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref);
+ LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UpdateFee_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKUpdateFee this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFee_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKUpdateFee this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- UpdateFee_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ UpdateFee_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) {
UpdateFee_set_feerate_per_kw(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
- LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t feerate_per_kw_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+ LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
ChannelReestablish_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKChannelReestablish this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKChannelReestablish this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) {
ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref;
CHECK((*env)->GetArrayLength(env, your_last_per_commitment_secret_arg) == 32);
(*env)->GetByteArrayRegion(env, your_last_per_commitment_secret_arg, 0, 32, your_last_per_commitment_secret_arg_ref.data);
CHECK_ACCESS(next_funding_txid_arg_ptr);
LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr);
next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg));
- LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv);
+ LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
AnnouncementSignatures_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKAnnouncementSignatures this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKAnnouncementSignatures this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKECDSASignature node_signature_arg_ref;
CHECK((*env)->GetArrayLength(env, node_signature_arg) == 64);
(*env)->GetByteArrayRegion(env, node_signature_arg, 0, 64, node_signature_arg_ref.compact_form);
LDKECDSASignature bitcoin_signature_arg_ref;
CHECK((*env)->GetArrayLength(env, bitcoin_signature_arg) == 64);
(*env)->GetByteArrayRegion(env, bitcoin_signature_arg, 0, 64, bitcoin_signature_arg_ref.compact_form);
- LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref);
+ LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z val_ref;
+ val_ref.datalen = (*env)->GetArrayLength(env, val);
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+ UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKUnsignedNodeAnnouncement this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z val_ref;
+ val_ref.datalen = (*env)->GetArrayLength(env, val);
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+ UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1new(JNIEnv *env, jclass clz, int64_t features_arg, int32_t timestamp_arg, int64_t node_id_arg, int8_tArray rgb_arg, int64_t alias_arg, int64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) {
+ LDKNodeFeatures features_arg_conv;
+ features_arg_conv.inner = untag_ptr(features_arg);
+ features_arg_conv.is_owned = ptr_is_owned(features_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv);
+ features_arg_conv = NodeFeatures_clone(&features_arg_conv);
+ LDKNodeId node_id_arg_conv;
+ node_id_arg_conv.inner = untag_ptr(node_id_arg);
+ node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv);
+ node_id_arg_conv = NodeId_clone(&node_id_arg_conv);
+ LDKThreeBytes rgb_arg_ref;
+ CHECK((*env)->GetArrayLength(env, rgb_arg) == 3);
+ (*env)->GetByteArrayRegion(env, rgb_arg, 0, 3, rgb_arg_ref.data);
+ LDKNodeAlias alias_arg_conv;
+ alias_arg_conv.inner = untag_ptr(alias_arg);
+ alias_arg_conv.is_owned = ptr_is_owned(alias_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv);
+ alias_arg_conv = NodeAlias_clone(&alias_arg_conv);
+ LDKCVec_SocketAddressZ addresses_arg_constr;
+ addresses_arg_constr.datalen = (*env)->GetArrayLength(env, addresses_arg);
+ if (addresses_arg_constr.datalen > 0)
+ addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements");
+ else
+ addresses_arg_constr.data = NULL;
+ int64_t* addresses_arg_vals = (*env)->GetLongArrayElements (env, addresses_arg, NULL);
+ for (size_t p = 0; p < addresses_arg_constr.datalen; p++) {
+ int64_t addresses_arg_conv_15 = addresses_arg_vals[p];
+ void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15);
+ CHECK_ACCESS(addresses_arg_conv_15_ptr);
+ LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr);
+ addresses_arg_constr.data[p] = addresses_arg_conv_15_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, addresses_arg, addresses_arg_vals, 0);
+ LDKCVec_u8Z excess_address_data_arg_ref;
+ excess_address_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_address_data_arg);
+ excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, excess_address_data_arg, 0, excess_address_data_arg_ref.datalen, excess_address_data_arg_ref.data);
+ LDKCVec_u8Z excess_data_arg_ref;
+ excess_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_data_arg);
+ excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, excess_data_arg, 0, excess_data_arg_ref.datalen, excess_data_arg_ref.data);
+ LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) {
LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg);
int64_t ret_ref = 0;
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKTrampolineOnionPacket this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ TrampolineOnionPacket_free(this_obj_conv);
+}
+
+JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1version(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1version(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ TrampolineOnionPacket_set_version(&this_ptr_conv, val);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 33);
+ (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+ TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z val_ref;
+ val_ref.datalen = (*env)->GetArrayLength(env, val);
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+ TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TrampolineOnionPacket_get_hmac(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKTrampolineOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1new(JNIEnv *env, jclass clz, int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) {
+ LDKPublicKey public_key_arg_ref;
+ CHECK((*env)->GetArrayLength(env, public_key_arg) == 33);
+ (*env)->GetByteArrayRegion(env, public_key_arg, 0, 33, public_key_arg_ref.compressed_form);
+ LDKCVec_u8Z hop_data_arg_ref;
+ hop_data_arg_ref.datalen = (*env)->GetArrayLength(env, hop_data_arg);
+ hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, hop_data_arg, 0, hop_data_arg_ref.datalen, hop_data_arg_ref.data);
+ LDKThirtyTwoBytes hmac_arg_ref;
+ CHECK((*env)->GetArrayLength(env, hmac_arg) == 32);
+ (*env)->GetByteArrayRegion(env, hmac_arg, 0, 32, hmac_arg_ref.data);
+ LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) {
+ LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKTrampolineOnionPacket arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKTrampolineOnionPacket orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKTrampolineOnionPacket o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKTrampolineOnionPacket a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKTrampolineOnionPacket b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKTrampolineOnionPacket obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKAcceptChannel obj_conv;
obj_conv.inner = untag_ptr(obj);
SocketDescriptor_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKPeerDetails this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ PeerDetails_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 33);
+ (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+ PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
+ *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr);
+ val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val));
+ PeerDetails_set_socket_address(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInitFeatures val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = InitFeatures_clone(&val_conv);
+ PeerDetails_set_init_features(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) {
+ LDKPeerDetails this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ PeerDetails_set_is_inbound_connection(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1new(JNIEnv *env, jclass clz, int8_tArray counterparty_node_id_arg, int64_t socket_address_arg, int64_t init_features_arg, jboolean is_inbound_connection_arg) {
+ LDKPublicKey counterparty_node_id_arg_ref;
+ CHECK((*env)->GetArrayLength(env, counterparty_node_id_arg) == 33);
+ (*env)->GetByteArrayRegion(env, counterparty_node_id_arg, 0, 33, counterparty_node_id_arg_ref.compressed_form);
+ void* socket_address_arg_ptr = untag_ptr(socket_address_arg);
+ CHECK_ACCESS(socket_address_arg_ptr);
+ LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr);
+ LDKInitFeatures init_features_arg_conv;
+ init_features_arg_conv.inner = untag_ptr(init_features_arg);
+ init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv);
+ init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv);
+ LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKPeerHandleError this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1list_1peers(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKPeerManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv);
+ LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv);
int64_tArray ret_arr = NULL;
ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
- for (size_t r = 0; r < ret_var.datalen; r++) {
- LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
- *ret_conv_43_conv = ret_var.data[r];
- ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true);
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKPeerDetails ret_conv_13_var = ret_var.data[n];
+ int64_t ret_conv_13_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var);
+ ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned);
+ ret_arr_ptr[n] = ret_conv_13_ref;
}
(*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
FREE(ret_var.data);
return ret_arr;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1peer_1by_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id) {
+ LDKPeerManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKPublicKey their_node_id_ref;
+ CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+ (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+ LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1outbound_1connection(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t descriptor, int64_t remote_network_address) {
LDKPeerManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ InitFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ InitFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ NodeFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ NodeFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11InvoiceFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11InvoiceFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11InvoiceFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11InvoiceFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKShutdownScript this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKChannelId this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ChannelId_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKChannelId this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelId_get_a(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKChannelId this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ ChannelId_set_a(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) {
+ LDKThirtyTwoBytes a_arg_ref;
+ CHECK((*env)->GetArrayLength(env, a_arg) == 32);
+ (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data);
+ LDKChannelId ret_var = ChannelId_new(a_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) {
+ LDKChannelId ret_var = ChannelId_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKChannelId arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = ChannelId_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKChannelId orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelId_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKChannelId a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKChannelId b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKChannelId o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ChannelId_hash(&o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1txid(JNIEnv *env, jclass clz, int8_tArray txid, int16_t output_index) {
+ uint8_t txid_arr[32];
+ CHECK((*env)->GetArrayLength(env, txid) == 32);
+ (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr);
+ uint8_t (*txid_ref)[32] = &txid_arr;
+ LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1outpoint(JNIEnv *env, jclass clz, int64_t outpoint) {
+ LDKOutPoint outpoint_conv;
+ outpoint_conv.inner = untag_ptr(outpoint);
+ outpoint_conv.is_owned = ptr_is_owned(outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
+ outpoint_conv = OutPoint_clone(&outpoint_conv);
+ LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1from_1entropy_1source(JNIEnv *env, jclass clz, int64_t entropy_source) {
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+ LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1from_1bytes(JNIEnv *env, jclass clz, int8_tArray data) {
+ LDKThirtyTwoBytes data_ref;
+ CHECK((*env)->GetArrayLength(env, data) == 32);
+ (*env)->GetByteArrayRegion(env, data, 0, 32, data_ref.data);
+ LDKChannelId ret_var = ChannelId_from_bytes(data_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new_1zero(JNIEnv *env, jclass clz) {
+ LDKChannelId ret_var = ChannelId_new_zero();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1is_1zero(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKChannelId this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = ChannelId_is_zero(&this_arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v2_1from_1revocation_1basepoints(JNIEnv *env, jclass clz, int64_t ours, int64_t theirs) {
+ LDKRevocationBasepoint ours_conv;
+ ours_conv.inner = untag_ptr(ours);
+ ours_conv.is_owned = ptr_is_owned(ours);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv);
+ ours_conv.is_owned = false;
+ LDKRevocationBasepoint theirs_conv;
+ theirs_conv.inner = untag_ptr(theirs);
+ theirs_conv.is_owned = ptr_is_owned(theirs);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv);
+ theirs_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1v2_1from_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t our_revocation_basepoint) {
+ LDKRevocationBasepoint our_revocation_basepoint_conv;
+ our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint);
+ our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv);
+ our_revocation_basepoint_conv.is_owned = false;
+ LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKChannelId obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+ *ret_conv = ChannelId_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Retry_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
Type_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOfferId this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OfferId_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKOfferId this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OfferId_get_a(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKOfferId this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ OfferId_set_a(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) {
+ LDKThirtyTwoBytes a_arg_ref;
+ CHECK((*env)->GetArrayLength(env, a_arg) == 32);
+ (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data);
+ LDKOfferId ret_var = OfferId_new(a_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) {
+ LDKOfferId ret_var = OfferId_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKOfferId arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = OfferId_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKOfferId orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKOfferId ret_var = OfferId_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OfferId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKOfferId a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKOfferId b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = OfferId_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKOfferId obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = OfferId_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+ *ret_conv = OfferId_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOfferWithExplicitMetadataBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OfferWithExplicitMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) {
+ LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKOfferWithExplicitMetadataBuilder arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKOfferWithExplicitMetadataBuilder orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKOfferWithDerivedMetadataBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OfferWithDerivedMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) {
+ LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKOfferWithDerivedMetadataBuilder arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKOfferWithDerivedMetadataBuilder orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray signing_pubkey) {
+ LDKPublicKey signing_pubkey_ref;
+ CHECK((*env)->GetArrayLength(env, signing_pubkey) == 33);
+ (*env)->GetByteArrayRegion(env, signing_pubkey, 0, 33, signing_pubkey_ref.compressed_form);
+ LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKCVec_u8Z metadata_ref;
+ metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+ metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKStr description_conv = java_to_owned_str(env, description);
+ OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKStr issuer_conv = java_to_owned_str(env, issuer);
+ OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKBlindedPath path_conv;
+ path_conv.inner = untag_ptr(path);
+ path_conv.is_owned = ptr_is_owned(path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+ path_conv = BlindedPath_clone(&path_conv);
+ OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ void* quantity_ptr = untag_ptr(quantity);
+ CHECK_ACCESS(quantity_ptr);
+ LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr);
+ quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity));
+ OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1deriving_1signing_1pubkey(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source) {
+ LDKPublicKey node_id_ref;
+ CHECK((*env)->GetArrayLength(env, node_id) == 33);
+ (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+ LDKExpandedKey expanded_key_conv;
+ expanded_key_conv.inner = untag_ptr(expanded_key);
+ expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+ expanded_key_conv.is_owned = false;
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
+ LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr description_conv = java_to_owned_str(env, description);
+ OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr issuer_conv = java_to_owned_str(env, issuer);
+ OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKBlindedPath path_conv;
+ path_conv.inner = untag_ptr(path);
+ path_conv.is_owned = ptr_is_owned(path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+ path_conv = BlindedPath_clone(&path_conv);
+ OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ void* quantity_ptr = untag_ptr(quantity);
+ CHECK_ACCESS(quantity_ptr);
+ LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr);
+ quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity));
+ OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+ *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Offer_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKOffer this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = Offer_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = Offer_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Offer_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_arr;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKOffer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKOfferId ret_var = Offer_id(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1supports_1chain(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray chain) {
LDKOffer this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1payer_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) {
+ LDKOffer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKExpandedKey expanded_key_conv;
+ expanded_key_conv.inner = untag_ptr(expanded_key);
+ expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+ expanded_key_conv.is_owned = false;
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+ (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+ LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) {
+ LDKOffer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKPublicKey payer_id_ref;
+ CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+ (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+ LDKExpandedKey expanded_key_conv;
+ expanded_key_conv.inner = untag_ptr(expanded_key);
+ expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+ expanded_key_conv.is_owned = false;
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+ (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata, int8_tArray payer_id) {
+ LDKOffer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_u8Z metadata_ref;
+ metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+ metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+ LDKPublicKey payer_id_ref;
+ CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+ (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+ LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+ *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKOffer o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Offer_hash(&o_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKOffer obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_arr;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKAmount this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- Amount_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ Amount_free(this_ptr_conv);
}
static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) {
- LDKAmount ret_var = Amount_clone(arg);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+ *ret_copy = Amount_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKAmount arg_conv;
- arg_conv.inner = untag_ptr(arg);
- arg_conv.is_owned = ptr_is_owned(arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
- arg_conv.is_owned = false;
- int64_t ret_conv = Amount_clone_ptr(&arg_conv);
+ LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg);
+ int64_t ret_conv = Amount_clone_ptr(arg_conv);
return ret_conv;
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKAmount orig_conv;
- orig_conv.inner = untag_ptr(orig);
- orig_conv.is_owned = ptr_is_owned(orig);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
- orig_conv.is_owned = false;
- LDKAmount ret_var = Amount_clone(&orig_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig);
+ LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+ *ret_copy = Amount_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1bitcoin(JNIEnv *env, jclass clz, int64_t amount_msats) {
+ LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+ *ret_copy = Amount_bitcoin(amount_msats);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1currency(JNIEnv *env, jclass clz, int8_tArray iso4217_code, int64_t amount) {
+ LDKThreeBytes iso4217_code_ref;
+ CHECK((*env)->GetArrayLength(env, iso4217_code) == 3);
+ (*env)->GetByteArrayRegion(env, iso4217_code, 0, 3, iso4217_code_ref.data);
+ LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+ *ret_copy = Amount_currency(iso4217_code_ref, amount);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKQuantity this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ Quantity_free(this_ptr_conv);
+}
+
+static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) {
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg);
+ int64_t ret_conv = Quantity_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1bounded(JNIEnv *env, jclass clz, int64_t a) {
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_bounded(a);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1unbounded(JNIEnv *env, jclass clz) {
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_unbounded();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1one(JNIEnv *env, jclass clz) {
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = Quantity_one();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) {
+ LDKStr s_conv = java_to_owned_str(env, s);
+ LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ");
+ *ret_conv = Offer_from_str(s_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- Quantity_free(this_obj_conv);
+ InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv);
}
-static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) {
- LDKQuantity ret_var = Quantity_clone(arg);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ uint8_t script_hash_arr[32];
+ CHECK((*env)->GetArrayLength(env, script_hash) == 32);
+ (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr);
+ uint8_t (*script_hash_ref)[32] = &script_hash_arr;
+ InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ uint8_t pubkey_hash_arr[20];
+ CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20);
+ (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr);
+ uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr;
+ InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ LDKTweakedPublicKey utput_key_ref;
+ CHECK((*env)->GetArrayLength(env, utput_key) == 32);
+ (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate);
+ InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+
+ InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+ *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ uint8_t script_hash_arr[32];
+ CHECK((*env)->GetArrayLength(env, script_hash) == 32);
+ (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr);
+ uint8_t (*script_hash_ref)[32] = &script_hash_arr;
+ InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ uint8_t pubkey_hash_arr[20];
+ CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20);
+ (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr);
+ uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr;
+ InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ LDKTweakedPublicKey utput_key_ref;
+ CHECK((*env)->GetArrayLength(env, utput_key) == 32);
+ (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate);
+ InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+
+ InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKUnsignedBolt12Invoice this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ UnsignedBolt12Invoice_free(this_obj_conv);
+}
+
+static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) {
+ LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
- LDKQuantity arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKUnsignedBolt12Invoice arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = Quantity_clone_ptr(&arg_conv);
+ int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv);
return ret_conv;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) {
- LDKQuantity orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKUnsignedBolt12Invoice orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKQuantity ret_var = Quantity_clone(&orig_conv);
+ LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) {
- LDKStr s_conv = java_to_owned_str(env, s);
- LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ");
- *ret_conv = Offer_from_str(s_conv);
- return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
- LDKUnsignedBolt12Invoice this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- UnsignedBolt12Invoice_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SignBolt12InvoiceFn_free(this_ptr_conv);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = Bolt12Invoice_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+ *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKBolt12Invoice o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Bolt12Invoice_hash(&o_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKUnsignedBolt12Invoice obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+ LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+
+ LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+ InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+ LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+
+ LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+ InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKUnsignedInvoiceRequest this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
UnsignedInvoiceRequest_free(this_obj_conv);
}
+static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) {
+ LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKUnsignedInvoiceRequest arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKUnsignedInvoiceRequest orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SignInvoiceRequestFn_free(this_ptr_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKUnsignedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
VerifiedInvoiceRequest_free(this_obj_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKVerifiedInvoiceRequest this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKVerifiedInvoiceRequest this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOfferId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = OfferId_clone(&val_conv);
+ VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1keys(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKVerifiedInvoiceRequest this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = InvoiceRequest_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
LDKInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form);
- return ret_arr;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+ LDKInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+ return tag_ptr(ret_conv, true);
}
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIEnv *env, jclass clz, int64_t this_arg, int64_t key) {
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form);
+ return ret_arr;
+}
+
JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1chains(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+ *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv);
- int64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+ *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
+ LDKVerifiedInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = VerifiedInvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+ LDKVerifiedInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
+ LDKVerifiedInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+ LDKVerifiedInvoiceRequest this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+ payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+ if (payment_paths_constr.datalen > 0)
+ payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ payment_paths_constr.data = NULL;
+ int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+ for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+ int64_t payment_paths_conv_37 = payment_paths_vals[l];
+ void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+ CHECK_ACCESS(payment_paths_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+ payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+ payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+ }
+ (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+ (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+ LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKUnsignedInvoiceRequest obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_arr;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKInvoiceRequestFields this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ InvoiceRequestFields_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 33);
+ (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+ InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr);
+ val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val));
+ InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKInvoiceRequestFields this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKUntrustedString val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = UntrustedString_clone(&val_conv);
+ InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1new(JNIEnv *env, jclass clz, int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) {
+ LDKPublicKey payer_id_arg_ref;
+ CHECK((*env)->GetArrayLength(env, payer_id_arg) == 33);
+ (*env)->GetByteArrayRegion(env, payer_id_arg, 0, 33, payer_id_arg_ref.compressed_form);
+ void* quantity_arg_ptr = untag_ptr(quantity_arg);
+ CHECK_ACCESS(quantity_arg_ptr);
+ LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr);
+ quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg));
+ LDKUntrustedString payer_note_truncated_arg_conv;
+ payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg);
+ payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv);
+ payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv);
+ LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) {
+ LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKInvoiceRequestFields arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKInvoiceRequestFields orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKInvoiceRequestFields a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKInvoiceRequestFields b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKInvoiceRequestFields obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+ *ret_conv = InvoiceRequestFields_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TaggedHash_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKTaggedHash this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_arr;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SignError_free(this_ptr_conv);
+}
+
+static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) {
+ LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+ *ret_copy = SignError_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg);
+ int64_t ret_conv = SignError_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig);
+ LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+ *ret_copy = SignError_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1signing(JNIEnv *env, jclass clz) {
+ LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+ *ret_copy = SignError_signing();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1verification(JNIEnv *env, jclass clz, jclass a) {
+ LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_java(env, a);
+ LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+ *ret_copy = SignError_verification(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12ParseError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKBolt12ParseError this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_conv;
}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1unexpected_1paths(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_unexpected_paths());
+ return ret_conv;
+}
+
JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1invalid_1pay_1info(JNIEnv *env, jclass clz) {
jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_invalid_pay_info());
return ret_conv;
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) {
+ LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKRefundMaybeWithDerivedMetadataBuilder arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKRefundMaybeWithDerivedMetadataBuilder orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) {
+ LDKCVec_u8Z metadata_ref;
+ metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+ metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+ LDKPublicKey payer_id_ref;
+ CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+ (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1deriving_1payer_1id(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) {
+ LDKPublicKey node_id_ref;
+ CHECK((*env)->GetArrayLength(env, node_id) == 33);
+ (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+ LDKExpandedKey expanded_key_conv;
+ expanded_key_conv.inner = untag_ptr(expanded_key);
+ expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+ expanded_key_conv.is_owned = false;
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+ (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+ LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr description_conv = java_to_owned_str(env, description);
+ RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr issuer_conv = java_to_owned_str(env, issuer);
+ RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKBlindedPath path_conv;
+ path_conv.inner = untag_ptr(path);
+ path_conv.is_owned = ptr_is_owned(path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+ path_conv = BlindedPath_clone(&path_conv);
+ RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+ RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+ RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+ LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Refund_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKRefund this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKRefund o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Refund_hash(&o_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Refund_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKRefund obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1slice(JNIEnv *env, jclass clz, int8_tArray bytes) {
+ LDKu8slice bytes_ref;
+ bytes_ref.datalen = (*env)->GetArrayLength(env, bytes);
+ bytes_ref.data = (*env)->GetByteArrayElements (env, bytes, NULL);
+ LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
+ *ret_conv = NodeId_from_slice(bytes_ref);
+ (*env)->ReleaseByteArrayElements(env, bytes, (int8_t*)bytes_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeId_1as_1slice(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKNodeId this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1source(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKDirectedChannelInfo this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1target(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKDirectedChannelInfo this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EffectiveCapacity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_conv;
}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1is_1tor_1only(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKNodeInfo this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKNodeInfo obj_conv;
obj_conv.inner = untag_ptr(obj);
DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelTransactionParameters val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelTransactionParameters_clone(&val_conv);
+ DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, int64_t channel_transaction_parameters_arg) {
LDKOutPoint outpoint_arg_conv;
outpoint_arg_conv.inner = untag_ptr(outpoint_arg);
outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg);
LDKThirtyTwoBytes channel_keys_id_arg_ref;
CHECK((*env)->GetArrayLength(env, channel_keys_id_arg) == 32);
(*env)->GetByteArrayRegion(env, channel_keys_id_arg, 0, 32, channel_keys_id_arg_ref.data);
- LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg);
+ LDKChannelTransactionParameters channel_transaction_parameters_arg_conv;
+ channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg);
+ channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv);
+ channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv);
+ LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKHTLCDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv));
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKHTLCDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1per_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1new(JNIEnv *env, jclass clz, int64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, int64_t htlc_arg, int64_t preimage_arg, int8_tArray counterparty_sig_arg) {
+ LDKChannelDerivationParameters channel_derivation_parameters_arg_conv;
+ channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg);
+ channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv);
+ channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv);
+ LDKThirtyTwoBytes commitment_txid_arg_ref;
+ CHECK((*env)->GetArrayLength(env, commitment_txid_arg) == 32);
+ (*env)->GetByteArrayRegion(env, commitment_txid_arg, 0, 32, commitment_txid_arg_ref.data);
+ LDKPublicKey per_commitment_point_arg_ref;
+ CHECK((*env)->GetArrayLength(env, per_commitment_point_arg) == 33);
+ (*env)->GetByteArrayRegion(env, per_commitment_point_arg, 0, 33, per_commitment_point_arg_ref.compressed_form);
+ LDKHTLCOutputInCommitment htlc_arg_conv;
+ htlc_arg_conv.inner = untag_ptr(htlc_arg);
+ htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv);
+ htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv);
+ void* preimage_arg_ptr = untag_ptr(preimage_arg);
+ CHECK_ACCESS(preimage_arg_ptr);
+ LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr);
+ preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg));
+ LDKECDSASignature counterparty_sig_arg_ref;
+ CHECK((*env)->GetArrayLength(env, counterparty_sig_arg) == 64);
+ (*env)->GetByteArrayRegion(env, counterparty_sig_arg, 0, 64, counterparty_sig_arg_ref.compact_form);
+ LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) {
LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg);
int64_t ret_ref = 0;
NodeSigner_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpender_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ OutputSpender_free(this_ptr_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
SignerProvider_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ ChangeDestinationSource_free(this_ptr_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKInMemorySigner this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
- descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
- if (descriptors_constr.datalen > 0)
- descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
- else
- descriptors_constr.data = NULL;
- int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
- for (size_t b = 0; b < descriptors_constr.datalen; b++) {
- int64_t descriptors_conv_27 = descriptors_vals[b];
- void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
- CHECK_ACCESS(descriptors_conv_27_ptr);
- LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
- descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
- descriptors_constr.data[b] = descriptors_conv_27_conv;
- }
- (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
- LDKCVec_TxOutZ outputs_constr;
- outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
- if (outputs_constr.datalen > 0)
- outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
- else
- outputs_constr.data = NULL;
- int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
- for (size_t h = 0; h < outputs_constr.datalen; h++) {
- int64_t outputs_conv_7 = outputs_vals[h];
- void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
- CHECK_ACCESS(outputs_conv_7_ptr);
- LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
- outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
- outputs_constr.data[h] = outputs_conv_7_conv;
- }
- (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
- LDKCVec_u8Z change_destination_script_ref;
- change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
- change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
- (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
- void* locktime_ptr = untag_ptr(locktime);
- CHECK_ACCESS(locktime_ptr);
- LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
- locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
- return tag_ptr(ret_conv, true);
+ LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
+ *ret_ret = KeysManager_as_EntropySource(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
- *ret_ret = KeysManager_as_EntropySource(&this_arg_conv);
+ LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner");
+ *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv);
return tag_ptr(ret_ret, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner");
- *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv);
+ LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+ *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv);
return tag_ptr(ret_ret, true);
}
return tag_ptr(ret_ret, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKPhantomKeysManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+ *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1SignerProvider(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKPhantomKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
- LDKPhantomKeysManager this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
- descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
- if (descriptors_constr.datalen > 0)
- descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
- else
- descriptors_constr.data = NULL;
- int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
- for (size_t b = 0; b < descriptors_constr.datalen; b++) {
- int64_t descriptors_conv_27 = descriptors_vals[b];
- void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
- CHECK_ACCESS(descriptors_conv_27_ptr);
- LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
- descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
- descriptors_constr.data[b] = descriptors_conv_27_conv;
- }
- (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
- LDKCVec_TxOutZ outputs_constr;
- outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
- if (outputs_constr.datalen > 0)
- outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
- else
- outputs_constr.data = NULL;
- int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
- for (size_t h = 0; h < outputs_constr.datalen; h++) {
- int64_t outputs_conv_7 = outputs_vals[h];
- void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
- CHECK_ACCESS(outputs_conv_7_ptr);
- LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
- outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
- outputs_constr.data[h] = outputs_conv_7_conv;
- }
- (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
- LDKCVec_u8Z change_destination_script_ref;
- change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
- change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
- (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
- void* locktime_ptr = untag_ptr(locktime);
- CHECK_ACCESS(locktime_ptr);
- LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
- locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
- LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
- return tag_ptr(ret_conv, true);
-}
-
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1derive_1channel_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) {
LDKPhantomKeysManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_arr;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RandomBytes_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKRandomBytes this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ RandomBytes_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1new(JNIEnv *env, jclass clz, int8_tArray seed) {
+ LDKThirtyTwoBytes seed_ref;
+ CHECK((*env)->GetArrayLength(env, seed) == 32);
+ (*env)->GetByteArrayRegion(env, seed, 0, 32, seed_ref.data);
+ LDKRandomBytes ret_var = RandomBytes_new(seed_ref);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKRandomBytes this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
+ *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EcdsaChannelSigner_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKDestination* o_conv = (LDKDestination*)untag_ptr(o);
+ int64_t ret_conv = Destination_hash(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Destination_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKDestination* a_conv = (LDKDestination*)untag_ptr(a);
+ LDKDestination* b_conv = (LDKDestination*)untag_ptr(b);
+ jboolean ret_conv = Destination_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Destination_1resolve(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) {
+ LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg);
+ LDKReadOnlyNetworkGraph network_graph_conv;
+ network_graph_conv.inner = untag_ptr(network_graph);
+ network_graph_conv.is_owned = ptr_is_owned(network_graph);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ network_graph_conv.is_owned = false;
+ Destination_resolve(this_arg_conv, &network_graph_conv);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SendSuccess_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o);
+ int64_t ret_conv = SendSuccess_hash(o_conv);
+ return ret_conv;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendSuccess_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a);
LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b);
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1unresolved_1introduction_1node(JNIEnv *env, jclass clz) {
+ LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+ *ret_copy = SendError_unresolved_introduction_node();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1advance_1failed(JNIEnv *env, jclass clz) {
LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
*ret_copy = SendError_blinded_path_advance_failed();
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKSendError* o_conv = (LDKSendError*)untag_ptr(o);
+ int64_t ret_conv = SendError_hash(o_conv);
+ return ret_conv;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
- LDKPublicKey a_ref;
- CHECK((*env)->GetArrayLength(env, a) == 33);
- (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr);
+ a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a));
LDKOnionMessage b_conv;
b_conv.inner = untag_ptr(b);
b_conv.is_owned = ptr_is_owned(b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
b_conv = OnionMessage_clone(&b_conv);
LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion");
- *ret_copy = PeeledOnion_forward(a_ref, b_conv);
+ *ret_copy = PeeledOnion_forward(a_conv, b_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t path, int64_t contents, int64_t reply_path) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message_1resolving_1destination(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t network_graph, int64_t path, int64_t contents, int64_t reply_path) {
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+ LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ void* node_signer_ptr = untag_ptr(node_signer);
+ if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); }
+ LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr;
+ void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+ if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); }
+ LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr;
+ LDKReadOnlyNetworkGraph network_graph_conv;
+ network_graph_conv.inner = untag_ptr(network_graph);
+ network_graph_conv.is_owned = ptr_is_owned(network_graph);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ network_graph_conv.is_owned = false;
+ LDKOnionMessagePath path_conv;
+ path_conv.inner = untag_ptr(path);
+ path_conv.is_owned = ptr_is_owned(path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+ path_conv = OnionMessagePath_clone(&path_conv);
+ void* contents_ptr = untag_ptr(contents);
+ CHECK_ACCESS(contents_ptr);
+ LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr);
+ if (contents_conv.free == LDKOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOnionMessageContents_JCalls_cloned(&contents_conv);
+ }
+ LDKBlindedPath reply_path_conv;
+ reply_path_conv.inner = untag_ptr(reply_path);
+ reply_path_conv.is_owned = ptr_is_owned(reply_path);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
+ reply_path_conv = BlindedPath_clone(&reply_path_conv);
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+ *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t path, int64_t contents, int64_t reply_path) {
void* entropy_source_ptr = untag_ptr(entropy_source);
if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
void* node_signer_ptr = untag_ptr(node_signer);
if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); }
LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr;
+ void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+ if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); }
+ LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr;
LDKOnionMessagePath path_conv;
path_conv.inner = untag_ptr(path);
path_conv.is_owned = ptr_is_owned(path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
reply_path_conv = BlindedPath_clone(&reply_path_conv);
LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
- *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv);
+ *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t message_router, int64_t offers_handler, int64_t custom_handler) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t node_id_lookup, int64_t message_router, int64_t offers_handler, int64_t custom_handler) {
void* entropy_source_ptr = untag_ptr(entropy_source);
CHECK_ACCESS(entropy_source_ptr);
LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKLogger_JCalls_cloned(&logger_conv);
}
+ void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+ CHECK_ACCESS(node_id_lookup_ptr);
+ LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr);
+ if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv);
+ }
void* message_router_ptr = untag_ptr(message_router);
CHECK_ACCESS(message_router_ptr);
LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
}
- LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv);
+ LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
OnionMessageContents_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ NextMessageHop_free(this_ptr_conv);
+}
+
+static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) {
+ LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+ *ret_copy = NextMessageHop_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg);
+ int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig);
+ LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+ *ret_copy = NextMessageHop_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) {
+ LDKPublicKey a_ref;
+ CHECK((*env)->GetArrayLength(env, a) == 33);
+ (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+ LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+ *ret_copy = NextMessageHop_node_id(a_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t a) {
+ LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+ *ret_copy = NextMessageHop_short_channel_id(a);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o);
+ int64_t ret_conv = NextMessageHop_hash(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a);
+ LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b);
+ jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKBlindedPath this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
BlindedPath_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKBlindedPath this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form);
- return ret_arr;
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKBlindedPath this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 33);
- (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
- BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref);
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr);
+ val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val));
+ BlindedPath_set_introduction_node(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1blinding_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) {
- LDKPublicKey introduction_node_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, introduction_node_id_arg) == 33);
- (*env)->GetByteArrayRegion(env, introduction_node_id_arg, 0, 33, introduction_node_id_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int64_t introduction_node_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) {
+ void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg);
+ CHECK_ACCESS(introduction_node_arg_ptr);
+ LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr);
+ introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg));
LDKPublicKey blinding_point_arg_ref;
CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33);
(*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form);
blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv;
}
(*env)->ReleaseLongArrayElements(env, blinded_hops_arg, blinded_hops_arg_vals, 0);
- LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr);
+ LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_conv;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ IntroductionNode_free(this_ptr_conv);
+}
+
+static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) {
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = IntroductionNode_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg);
+ int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig);
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = IntroductionNode_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) {
+ LDKPublicKey a_ref;
+ CHECK((*env)->GetArrayLength(env, a) == 33);
+ (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = IntroductionNode_node_id(a_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1directed_1short_1channel_1id(JNIEnv *env, jclass clz, jclass a, int64_t b) {
+ LDKDirection a_conv = LDKDirection_from_java(env, a);
+ LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+ *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o);
+ int64_t ret_conv = IntroductionNode_hash(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a);
+ LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b);
+ jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig);
+ jclass ret_conv = LDKDirection_to_java(env, Direction_clone(orig_conv));
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1one(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKDirection_to_java(env, Direction_node_one());
+ return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1two(JNIEnv *env, jclass clz) {
+ jclass ret_conv = LDKDirection_to_java(env, Direction_node_two());
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Direction_1hash(JNIEnv *env, jclass clz, int64_t o) {
+ LDKDirection* o_conv = (LDKDirection*)untag_ptr(o);
+ int64_t ret_conv = Direction_hash(o_conv);
+ return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Direction_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKDirection* a_conv = (LDKDirection*)untag_ptr(a);
+ LDKDirection* b_conv = (LDKDirection*)untag_ptr(b);
+ jboolean ret_conv = Direction_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ NodeIdLookUp_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKEmptyNodeIdLookUp this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ EmptyNodeIdLookUp_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1new(JNIEnv *env, jclass clz) {
+ LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKEmptyNodeIdLookUp this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+ *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedHop_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
LDKBlindedHop this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
CHECK((*env)->GetArrayLength(env, recipient_node_id) == 33);
(*env)->GetByteArrayRegion(env, recipient_node_id, 0, 33, recipient_node_id_ref.compressed_form);
void* entropy_source_ptr = untag_ptr(entropy_source);
- if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
- LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ");
*ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv);
return tag_ptr(ret_conv, true);
node_pks_constr.data[i] = node_pks_conv_8_ref;
}
void* entropy_source_ptr = untag_ptr(entropy_source);
- if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
- LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ");
*ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t entropy_source) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) {
LDKPublicKey payee_node_id_ref;
CHECK((*env)->GetArrayLength(env, payee_node_id) == 33);
(*env)->GetByteArrayRegion(env, payee_node_id, 0, 33, payee_node_id_ref.compressed_form);
CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv);
payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv);
void* entropy_source_ptr = untag_ptr(entropy_source);
- if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
- LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ");
- *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv);
+ *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv);
return tag_ptr(ret_conv, true);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int64_t entropy_source) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) {
LDKCVec_ForwardNodeZ intermediate_nodes_constr;
intermediate_nodes_constr.datalen = (*env)->GetArrayLength(env, intermediate_nodes);
if (intermediate_nodes_constr.datalen > 0)
CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv);
payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv);
void* entropy_source_ptr = untag_ptr(entropy_source);
- if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
- LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ");
- *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv);
+ *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1public_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) {
+ LDKBlindedPath this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKReadOnlyNetworkGraph network_graph_conv;
+ network_graph_conv.inner = untag_ptr(network_graph);
+ network_graph_conv.is_owned = ptr_is_owned(network_graph);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ network_graph_conv.is_owned = false;
+ LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKBlindedPath obj_conv;
obj_conv.inner = untag_ptr(obj);
ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKReceiveTlvs this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKReceiveTlvs this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr);
+ val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val));
+ ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) {
LDKThirtyTwoBytes payment_secret_arg_ref;
CHECK((*env)->GetArrayLength(env, payment_secret_arg) == 32);
(*env)->GetByteArrayRegion(env, payment_secret_arg, 0, 32, payment_secret_arg_ref.data);
payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv);
payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv);
- LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv);
+ void* payment_context_arg_ptr = untag_ptr(payment_context_arg);
+ CHECK_ACCESS(payment_context_arg_ptr);
+ LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr);
+ payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg));
+ LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ PaymentContext_free(this_ptr_conv);
+}
+
+static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) {
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg);
+ int64_t ret_conv = PaymentContext_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1unknown(JNIEnv *env, jclass clz, int64_t a) {
+ LDKUnknownPaymentContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = UnknownPaymentContext_clone(&a_conv);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_unknown(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1offer(JNIEnv *env, jclass clz, int64_t a) {
+ LDKBolt12OfferContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = Bolt12OfferContext_clone(&a_conv);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_bolt12_offer(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1refund(JNIEnv *env, jclass clz, int64_t a) {
+ LDKBolt12RefundContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = Bolt12RefundContext_clone(&a_conv);
+ LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+ *ret_copy = PaymentContext_bolt12_refund(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a);
+ LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b);
+ jboolean ret_conv = PaymentContext_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKUnknownPaymentContext this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ UnknownPaymentContext_free(this_obj_conv);
+}
+
+static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) {
+ LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKUnknownPaymentContext arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKUnknownPaymentContext orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKUnknownPaymentContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKUnknownPaymentContext b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKBolt12OfferContext this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Bolt12OfferContext_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKBolt12OfferContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKBolt12OfferContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOfferId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = OfferId_clone(&val_conv);
+ Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKBolt12OfferContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKBolt12OfferContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInvoiceRequestFields val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = InvoiceRequestFields_clone(&val_conv);
+ Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1new(JNIEnv *env, jclass clz, int64_t offer_id_arg, int64_t invoice_request_arg) {
+ LDKOfferId offer_id_arg_conv;
+ offer_id_arg_conv.inner = untag_ptr(offer_id_arg);
+ offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv);
+ offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv);
+ LDKInvoiceRequestFields invoice_request_arg_conv;
+ invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg);
+ invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv);
+ invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv);
+ LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) {
+ LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKBolt12OfferContext arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKBolt12OfferContext orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKBolt12OfferContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKBolt12OfferContext b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKBolt12RefundContext this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Bolt12RefundContext_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1new(JNIEnv *env, jclass clz) {
+ LDKBolt12RefundContext ret_var = Bolt12RefundContext_new();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) {
+ LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+ LDKBolt12RefundContext arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKBolt12RefundContext orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+ LDKBolt12RefundContext a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKBolt12RefundContext b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ForwardTlvs_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKForwardTlvs obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+ *ret_conv = PaymentContext_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKUnknownPaymentContext obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+ *ret_conv = UnknownPaymentContext_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKBolt12OfferContext obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+ *ret_conv = Bolt12OfferContext_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+ LDKBolt12RefundContext obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv);
+ int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+ ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+ LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+ *ret_conv = Bolt12RefundContext_read(ser_ref);
+ (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+ return tag_ptr(ret_conv, true);
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt11_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) {
+ void* payment_preimage_ptr = untag_ptr(payment_preimage);
+ CHECK_ACCESS(payment_preimage_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
+ payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage));
+ LDKThirtyTwoBytes payment_secret_ref;
+ CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
+ (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+ LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
+ *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1offer_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) {
void* payment_preimage_ptr = untag_ptr(payment_preimage);
CHECK_ACCESS(payment_preimage_ptr);
LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
LDKThirtyTwoBytes payment_secret_ref;
CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
(*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+ LDKBolt12OfferContext payment_context_conv;
+ payment_context_conv.inner = untag_ptr(payment_context);
+ payment_context_conv.is_owned = ptr_is_owned(payment_context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv);
+ payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv);
LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
- *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref);
+ *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1refund_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) {
+ void* payment_preimage_ptr = untag_ptr(payment_preimage);
+ CHECK_ACCESS(payment_preimage_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
+ payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage));
+ LDKThirtyTwoBytes payment_secret_ref;
+ CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
+ (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+ LDKBolt12RefundContext payment_context_conv;
+ payment_context_conv.inner = untag_ptr(payment_context);
+ payment_context_conv.is_owned = ptr_is_owned(payment_context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv);
+ payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv);
+ LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
+ *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
ClaimedHTLC_free(this_obj_conv);
}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKClaimedHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
- (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClaimedHTLC_get_channel_id(&this_ptr_conv));
- return ret_arr;
+ LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv);
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
LDKClaimedHTLC this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK((*env)->GetArrayLength(env, val) == 32);
- (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
- ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref);
+ LDKChannelId val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelId_clone(&val_conv);
+ ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv);
}
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1user_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val);
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
- (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) {
+ LDKChannelId channel_id_arg_conv;
+ channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+ channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+ channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
LDKU128 user_channel_id_arg_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes);
- LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
+ LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1cooperative_1closure(JNIEnv *env, jclass clz) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1legacy_1cooperative_1closure(JNIEnv *env, jclass clz) {
+ LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+ *ret_copy = ClosureReason_legacy_cooperative_closure();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) {
LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
- *ret_copy = ClosureReason_cooperative_closure();
+ *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1locally_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) {
+ LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+ *ret_copy = ClosureReason_locally_initiated_cooperative_closure();
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1htlcs_1timed_1out(JNIEnv *env, jclass clz) {
+ LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+ *ret_copy = ClosureReason_htlcs_timed_out();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosureReason_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int8_tArray channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t channel_id) {
LDKPublicKey node_id_ref;
CHECK((*env)->GetArrayLength(env, node_id) == 33);
(*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination");
- *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref);
+ *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1onion(JNIEnv *env, jclass clz) {
+ LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination");
+ *ret_copy = HTLCDestination_invalid_onion();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1failed_1payment(JNIEnv *env, jclass clz, int8_tArray payment_hash) {
LDKThirtyTwoBytes payment_hash_ref;
CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) {
- LDKThirtyTwoBytes temporary_channel_id_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) {
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref);
+ *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
CHECK_ACCESS(purpose_ptr);
LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr);
purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose));
- void* via_channel_id_ptr = untag_ptr(via_channel_id);
- CHECK_ACCESS(via_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr);
- via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id));
+ LDKChannelId via_channel_id_conv;
+ via_channel_id_conv.inner = untag_ptr(via_channel_id);
+ via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv);
+ via_channel_id_conv = ChannelId_clone(&via_channel_id_conv);
void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id);
CHECK_ACCESS(via_user_channel_id_ptr);
LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr);
outputs_constr.data[b] = outputs_conv_27_conv;
}
(*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
- void* channel_id_ptr = untag_ptr(channel_id);
- CHECK_ACCESS(channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr);
- channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id));
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
*ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t fee_earned_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) {
- void* prev_channel_id_ptr = untag_ptr(prev_channel_id);
- CHECK_ACCESS(prev_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr);
- prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id));
- void* next_channel_id_ptr = untag_ptr(next_channel_id);
- CHECK_ACCESS(next_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr);
- next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id));
- void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat);
- CHECK_ACCESS(fee_earned_msat_ptr);
- LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr);
- fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat));
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int64_t total_fee_earned_msat, int64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) {
+ LDKChannelId prev_channel_id_conv;
+ prev_channel_id_conv.inner = untag_ptr(prev_channel_id);
+ prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv);
+ prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv);
+ LDKChannelId next_channel_id_conv;
+ next_channel_id_conv.inner = untag_ptr(next_channel_id);
+ next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv);
+ next_channel_id_conv = ChannelId_clone(&next_channel_id_conv);
+ void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id);
+ CHECK_ACCESS(prev_user_channel_id_ptr);
+ LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr);
+ prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id));
+ void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id);
+ CHECK_ACCESS(next_user_channel_id_ptr);
+ LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr);
+ next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id));
+ void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat);
+ CHECK_ACCESS(total_fee_earned_msat_ptr);
+ LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr);
+ total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat));
+ void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat);
+ CHECK_ACCESS(skimmed_fee_msat_ptr);
+ LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr);
+ skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat));
void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat);
CHECK_ACCESS(outbound_amount_forwarded_msat_ptr);
LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr);
outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv);
+ *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo) {
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo, int64_t channel_type) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKU128 user_channel_id_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
- void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id);
- CHECK_ACCESS(former_temporary_channel_id_ptr);
- LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr);
- former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id));
+ LDKChannelId former_temporary_channel_id_conv;
+ former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id);
+ former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv);
+ former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+ LDKChannelTypeFeatures channel_type_conv;
+ channel_type_conv.inner = untag_ptr(channel_type);
+ channel_type_conv.is_owned = ptr_is_owned(channel_type);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
+ channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv);
+ *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) {
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKU128 user_channel_id_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv);
+ *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) {
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKU128 user_channel_id_ref;
CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
(*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv);
channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv);
+ *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray transaction) {
- LDKThirtyTwoBytes channel_id_ref;
- CHECK((*env)->GetArrayLength(env, channel_id) == 32);
- (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray transaction) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
LDKTransaction transaction_ref;
transaction_ref.datalen = (*env)->GetArrayLength(env, transaction);
transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes");
(*env)->GetByteArrayRegion(env, transaction, 0, transaction_ref.datalen, transaction_ref.data);
transaction_ref.data_is_owned = true;
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref);
+ *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) {
- LDKThirtyTwoBytes temporary_channel_id_ref;
- CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) {
+ LDKChannelId temporary_channel_id_conv;
+ temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+ temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+ temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
LDKPublicKey counterparty_node_id_ref;
CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
(*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv);
+ *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int8_tArray prev_channel_id, int64_t failed_next_destination) {
- LDKThirtyTwoBytes prev_channel_id_ref;
- CHECK((*env)->GetArrayLength(env, prev_channel_id) == 32);
- (*env)->GetByteArrayRegion(env, prev_channel_id, 0, 32, prev_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t failed_next_destination) {
+ LDKChannelId prev_channel_id_conv;
+ prev_channel_id_conv.inner = untag_ptr(prev_channel_id);
+ prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv);
+ prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv);
void* failed_next_destination_ptr = untag_ptr(failed_next_destination);
CHECK_ACCESS(failed_next_destination_ptr);
LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr);
failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv);
+ *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
+ LDKPublicKey counterparty_node_id_ref;
+ CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
+ (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKThirtyTwoBytes claim_id_ref;
CHECK((*env)->GetArrayLength(env, claim_id) == 32);
(*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data);
}
(*env)->ReleaseLongArrayElements(env, pending_htlcs, pending_htlcs_vals, 0);
LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent");
- *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr);
+ *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) {
+ LDKChannelId channel_id_conv;
+ channel_id_conv.inner = untag_ptr(channel_id);
+ channel_id_conv.is_owned = ptr_is_owned(channel_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+ channel_id_conv = ChannelId_clone(&channel_id_conv);
+ LDKPublicKey counterparty_node_id_ref;
+ CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
+ (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
LDKThirtyTwoBytes claim_id_ref;
CHECK((*env)->GetArrayLength(env, claim_id) == 32);
(*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data);
}
(*env)->ReleaseLongArrayElements(env, htlc_descriptors, htlc_descriptors_vals, 0);
LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent");
- *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time);
+ *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_arr;
}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1get_1payee_1pub_1key(JNIEnv *env, jclass clz, int64_t this_arg) {
+ LDKBolt11Invoice this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form);
+ return ret_arr;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1expires_1at(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKBolt11Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_enums_Direction */
+
+#ifndef _Included_org_ldk_enums_Direction
+#define _Included_org_ldk_enums_Direction
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_enums_Direction
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_enums_Direction_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_enums_ShortChannelIdError */
+
+#ifndef _Included_org_ldk_enums_ShortChannelIdError
+#define _Included_org_ldk_enums_ShortChannelIdError
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_enums_ShortChannelIdError
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_enums_ShortChannelIdError_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBech32Error_1ref_1from_1ptr
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCOption_u64Z_ref_from_ptr
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsNoneZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SchnorrSignatureNoneZ_get_ok
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SchnorrSignatureNoneZ_get_err
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCOption_CVec_ThirtyTwoBytesZZ_ref_from_ptr
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1ThirtyTwoBytesZZ_1ref_1from_1ptr
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKAmount_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKAmount;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAmount_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCOption_AmountZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_AmountZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1AmountZ_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKQuantity_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKQuantity;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKQuantity_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCOption_QuantityZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_QuantityZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1QuantityZ_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_ThirtyTwoBytesNoneZ_get_ok
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_SchnorrSignatureNoneZ_get_ok
+ * Method: CResult_ECDSASignatureNoneZ_get_ok
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_SchnorrSignatureNoneZ_get_err
+ * Method: CResult_ECDSASignatureNoneZ_get_err
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ECDSASignatureNoneZ_get_ok
+ * Method: CResult_TransactionNoneZ_get_ok
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ECDSASignatureNoneZ_get_err
+ * Method: CResult_TransactionNoneZ_get_err
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_TransactionNoneZ_get_ok
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_TransactionNoneZ_get_err
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err
- (JNIEnv *, jclass, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: LDKCandidateRouteHop_ref_from_ptr
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_BestBlockDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_BestBlockDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: C2Tuple_usizeTransactionZ_get_a
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateStatusNoneZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKClosureReason_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKClosureReason;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKMonitorEvent_ref_from_ptr
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a
+ * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1a
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b
+ * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c
* Signature: (J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1b
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1c
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c
+ * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1c
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1d
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_OfferBolt12ParseErrorZ_get_ok
+ * Method: CResult_OfferIdDecodeErrorZ_get_ok
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_OfferBolt12ParseErrorZ_get_err
+ * Method: CResult_OfferIdDecodeErrorZ_get_err
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_PublicKeySecp256k1ErrorZ_get_ok
- * Signature: (J)[B
+ * Method: CResult_NoneBolt12SemanticErrorZ_get_ok
+ * Signature: (J)V
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_PublicKeySecp256k1ErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/Secp256k1Error;
+ * Method: CResult_NoneBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
*/
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12ParseErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12ParseErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_PublicKeySecp256k1ErrorZ_get_ok
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_PublicKeySecp256k1ErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Secp256k1Error;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKNetworkUpdate_ref_from_ptr
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1SocketAddressZZ_1ref_1from_1ptr
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_u64ShortChannelIdErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_u64ShortChannelIdErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKPaymentContext_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKPaymentContext;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentContext_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCOption_PaymentContextZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_PaymentContextZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1PaymentContextZ_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: C2Tuple_u64u16Z_get_a
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ThirtyTwoBytesAPIErrorZ_get_ok
- * Signature: (J)[B
+ * Method: CResult_ChannelIdAPIErrorZ_get_ok
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ThirtyTwoBytesAPIErrorZ_get_err
+ * Method: CResult_ChannelIdAPIErrorZ_get_err
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a
- * Signature: (J)[B
+ * Method: C2Tuple_ChannelIdPublicKeyZ_get_a
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1a
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b
+ * Method: C2Tuple_ChannelIdPublicKeyZ_get_b
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1b
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: LDKCOption_StrZ_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_StrZ;
+ * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
*/
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NoneBolt12SemanticErrorZ_get_ok
- * Signature: (J)V
+ * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NoneBolt12SemanticErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ * Method: LDKCOption_StrZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_StrZ;
*/
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from_1ptr
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ThirtyTwoBytesAPIErrorZ_get_ok
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ThirtyTwoBytesAPIErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKOffersMessage_ref_from_ptr
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SocketAddressZ_1ref_1from_1ptr
(JNIEnv *, jclass, jlong);
-/*
- * Class: org_ldk_impl_bindings
- * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1a
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1b
- (JNIEnv *, jclass, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: CResult_CVec_u8ZPeerHandleErrorZ_get_ok
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesChannelMonitorZIOErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCOption_SecretKeyZ_ref_from_ptr
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SecretKeyZ_1ref_1from_1ptr
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_VerifiedInvoiceRequestNoneZ_get_ok
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCOption_ECDSASignatureZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_ECDSASignatureZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ECDSASignatureZ_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCOption_i64Z_ref_from_ptr
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1PathFailureZDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
-/*
- * Class: org_ldk_impl_bindings
- * Method: LDKClosureReason_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKClosureReason;
- */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr
- (JNIEnv *, jclass, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: LDKCOption_ClosureReasonZ_ref_from_ptr
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ChannelIdDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ChannelIdDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: C2Tuple__u832u16Z_get_a
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a
- * Signature: (J)[B
+ * Method: CResult_PaymentContextDecodeErrorZ_get_ok
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b
+ * Method: CResult_PaymentContextDecodeErrorZ_get_err
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c
+ * Method: CResult_UnknownPaymentContextDecodeErrorZ_get_ok
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok
+ * Method: CResult_UnknownPaymentContextDecodeErrorZ_get_err
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err
- * Signature: (J)V
+ * Method: CResult_Bolt12OfferContextDecodeErrorZ_get_ok
+ * Signature: (J)J
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12OfferContextDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12RefundContextDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12RefundContextDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKNextMessageHop_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKNextMessageHop;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNextMessageHop_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKParsedOnionMessageContents_ref_from_ptr
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_DelayedPaymentBasepointDecodeErrorZ_get_err
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_DelayedPaymentKeyDecodeErrorZ_get_ok
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_DelayedPaymentKeyDecodeErrorZ_get_err
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_HtlcBasepointDecodeErrorZ_get_ok
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_HtlcBasepointDecodeErrorZ_get_err
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_HtlcKeyDecodeErrorZ_get_ok
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_HtlcKeyDecodeErrorZ_get_err
+ * Method: CResult_TrackedSpendableOutputDecodeErrorZ_get_ok
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_RevocationBasepointDecodeErrorZ_get_ok
+ * Method: CResult_TrackedSpendableOutputDecodeErrorZ_get_err
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_RevocationBasepointDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method: LDKOutputSpendStatus_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKOutputSpendStatus;
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKOutputSpendStatus_1ref_1from_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_RevocationKeyDecodeErrorZ_get_ok
+ * Method: CResult_OutputSpendStatusDecodeErrorZ_get_ok
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_RevocationKeyDecodeErrorZ_get_err
+ * Method: CResult_OutputSpendStatusDecodeErrorZ_get_err
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_LockedChannelMonitorNoneZ_get_ok
- * Signature: (J)J
+ * Method: LDKChangeDestinationSource_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKChangeDestinationSource;)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_LockedChannelMonitorNoneZ_get_err
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err
- (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChangeDestinationSource_1new
+ (JNIEnv *, jclass, jobject);
/*
* Class: org_ldk_impl_bindings
- * Method: C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a
+ * Method: ChangeDestinationSource_get_change_destination_script
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b
- * Signature: (J)[J
- */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1get_1change_1destination_1script
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KVStore_1list
(JNIEnv *, jclass, jlong, jstring, jstring);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKOutputSpender_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKOutputSpender;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKOutputSpender_1new
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpender_spend_spendable_outputs
+ * Signature: (J[J[J[BIJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpender_1spend_1spendable_1outputs
+ (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSweeperDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSweeperDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_BestBlockOutputSweeperZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1a
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_BestBlockOutputSweeperZ_get_b
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1b
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_DelayedPaymentBasepointDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_DelayedPaymentKeyDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_DelayedPaymentKeyDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_HtlcBasepointDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_HtlcBasepointDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_HtlcKeyDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_HtlcKeyDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RevocationBasepointDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RevocationBasepointDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RevocationKeyDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RevocationKeyDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_LockedChannelMonitorNoneZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_LockedChannelMonitorNoneZ_get_err
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_OutPointChannelIdZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1a
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_OutPointChannelIdZ_get_b
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1b
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKPersister_new
/*
* Class: org_ldk_impl_bindings
- * Method: LDKFutureCallback_new
- * Signature: (Lorg/ldk/impl/bindings/LDKFutureCallback;)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new
- (JNIEnv *, jclass, jobject);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: FutureCallback_call
- * Signature: (J)V
+ * Method: Persist_archive_persisted_channel
+ * Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call
- (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1archive_1persisted_1channel
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_Confirm_1get_1relevant_1txids
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKSpendingDelay_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKSpendingDelay;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendingDelay_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKFutureCallback_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKFutureCallback;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: FutureCallback_call
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKEventHandler_new
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1stfu
(JNIEnv *, jclass, jlong, jbyteArray, jlong);
-/*
- * Class: org_ldk_impl_bindings
- * Method: ChannelMessageHandler_handle_splice
- * Signature: (J[BJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice
- (JNIEnv *, jclass, jlong, jbyteArray, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: ChannelMessageHandler_handle_splice_ack
- * Signature: (J[BJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1ack
- (JNIEnv *, jclass, jlong, jbyteArray, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: ChannelMessageHandler_handle_splice_locked
- * Signature: (J[BJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1locked
- (JNIEnv *, jclass, jlong, jbyteArray, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: ChannelMessageHandler_handle_tx_add_input
JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_OffersMessageHandler_1release_1pending_1messages
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKNodeIdLookUp_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKNodeIdLookUp;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKNodeIdLookUp_1new
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeIdLookUp_next_node_id
+ * Signature: (JJ)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1next_1node_1id
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKRoutingMessageHandler_new
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKSignBolt12InvoiceFn_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKSignBolt12InvoiceFn;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSignBolt12InvoiceFn_1new
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SignBolt12InvoiceFn_sign_invoice
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1sign_1invoice
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKSignInvoiceRequestFn_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKSignInvoiceRequestFn;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSignInvoiceRequestFn_1new
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SignInvoiceRequestFn_sign_invoice_request
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1sign_1invoice_1request
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKSignError_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKSignError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSignError_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKEffectiveCapacity_ref_from_ptr
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Score_1write
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKIntroductionNode_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKIntroductionNode;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKIntroductionNode_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCoinSelectionSource_new
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1new
(JNIEnv *, jclass, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: BigEndianScalar_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: BigEndianScalar_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: Bech32Error_clone_ptr
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Str_1free
(JNIEnv *, jclass, jstring);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CVec_u8Z_free
+ * Signature: ([B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_RefundBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: COption_u64Z_some
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ThirtyTwoBytesZ_1clone
(JNIEnv *, jclass, jlong);
-/*
- * Class: org_ldk_impl_bindings
- * Method: CVec_u8Z_free
- * Signature: ([B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free
- (JNIEnv *, jclass, jbyteArray);
-
/*
* Class: org_ldk_impl_bindings
* Method: COption_CVec_u8ZZ_some
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsNoneZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SchnorrSignatureNoneZ_ok
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SchnorrSignatureNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SchnorrSignatureNoneZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SchnorrSignatureNoneZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SchnorrSignatureNoneZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SchnorrSignatureNoneZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CVec_ThirtyTwoBytesZ_free
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1ThirtyTwoBytesZZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_AmountZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1some
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_AmountZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1none
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_AmountZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_AmountZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_AmountZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_QuantityZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1some
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_QuantityZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1none
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_QuantityZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_QuantityZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_QuantityZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_ThirtyTwoBytesNoneZ_ok
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_SchnorrSignatureNoneZ_ok
+ * Method: CResult_ECDSASignatureNoneZ_ok
* Signature: ([B)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok
(JNIEnv *, jclass, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_SchnorrSignatureNoneZ_err
+ * Method: CResult_ECDSASignatureNoneZ_err
* Signature: ()J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1err
(JNIEnv *, jclass);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_SchnorrSignatureNoneZ_is_ok
+ * Method: CResult_ECDSASignatureNoneZ_is_ok
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1is_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_SchnorrSignatureNoneZ_free
+ * Method: CResult_ECDSASignatureNoneZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_SchnorrSignatureNoneZ_clone_ptr
+ * Method: CResult_ECDSASignatureNoneZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_SchnorrSignatureNoneZ_clone
+ * Method: CResult_ECDSASignatureNoneZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ECDSASignatureNoneZ_ok
+ * Method: CResult_TransactionNoneZ_ok
* Signature: ([B)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok
(JNIEnv *, jclass, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ECDSASignatureNoneZ_err
+ * Method: CResult_TransactionNoneZ_err
* Signature: ()J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err
(JNIEnv *, jclass);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ECDSASignatureNoneZ_is_ok
+ * Method: CResult_TransactionNoneZ_is_ok
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ECDSASignatureNoneZ_free
+ * Method: CResult_TransactionNoneZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ECDSASignatureNoneZ_clone_ptr
+ * Method: CResult_TransactionNoneZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ECDSASignatureNoneZ_clone
+ * Method: CResult_TransactionNoneZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1clone
(JNIEnv *, jclass, jlong);
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_TransactionNoneZ_ok
- * Signature: ([B)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok
- (JNIEnv *, jclass, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_TransactionNoneZ_err
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err
- (JNIEnv *, jclass);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_TransactionNoneZ_is_ok
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_TransactionNoneZ_free
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_TransactionNoneZ_clone_ptr
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CResult_TransactionNoneZ_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone
- (JNIEnv *, jclass, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: COption_WriteableScoreZ_some
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_BestBlockDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_BestBlockDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_BestBlockDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_BestBlockDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_BestBlockDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_BestBlockDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: C2Tuple_usizeTransactionZ_clone_ptr
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr
+ * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone
+ * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new
- * Signature: (J[J[B)J
+ * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new
+ * Signature: (JJ[J[B)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1new
- (JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1new
+ (JNIEnv *, jclass, jlong, jlong, jlongArray, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free
+ * Method: C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free
+ * Method: CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free
* Signature: ([J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZZ_1free
(JNIEnv *, jclass, jlongArray);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesDecodeErrorZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferIdDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferIdDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferIdDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferIdDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferIdDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferIdDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_NoneBolt12SemanticErrorZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_NoneBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_NoneBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_NoneBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_NoneBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_NoneBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_OfferBolt12ParseErrorZ_ok
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_PublicKeySecp256k1ErrorZ_ok
- * Signature: ([B)J
+ * Method: CResult_NodeIdDecodeErrorZ_ok
+ * Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok
- (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_PublicKeySecp256k1ErrorZ_err
- * Signature: (Lorg/ldk/enums/Secp256k1Error;)J
+ * Method: CResult_NodeIdDecodeErrorZ_err
+ * Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err
- (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_PublicKeySecp256k1ErrorZ_is_ok
+ * Method: CResult_NodeIdDecodeErrorZ_is_ok
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1is_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_PublicKeySecp256k1ErrorZ_free
+ * Method: CResult_NodeIdDecodeErrorZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_PublicKeySecp256k1ErrorZ_clone_ptr
+ * Method: CResult_NodeIdDecodeErrorZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_PublicKeySecp256k1ErrorZ_clone
+ * Method: CResult_NodeIdDecodeErrorZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NodeIdDecodeErrorZ_ok
- * Signature: (J)J
+ * Method: CResult_PublicKeySecp256k1ErrorZ_ok
+ * Signature: ([B)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok
- (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok
+ (JNIEnv *, jclass, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NodeIdDecodeErrorZ_err
- * Signature: (J)J
+ * Method: CResult_PublicKeySecp256k1ErrorZ_err
+ * Signature: (Lorg/ldk/enums/Secp256k1Error;)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1err
- (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err
+ (JNIEnv *, jclass, jobject);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NodeIdDecodeErrorZ_is_ok
+ * Method: CResult_PublicKeySecp256k1ErrorZ_is_ok
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NodeIdDecodeErrorZ_free
+ * Method: CResult_PublicKeySecp256k1ErrorZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NodeIdDecodeErrorZ_clone_ptr
+ * Method: CResult_PublicKeySecp256k1ErrorZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NodeIdDecodeErrorZ_clone
+ * Method: CResult_PublicKeySecp256k1ErrorZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1SocketAddressZZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_u64ShortChannelIdErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_u64ShortChannelIdErrorZ_err
+ * Signature: (Lorg/ldk/enums/ShortChannelIdError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_u64ShortChannelIdErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_u64ShortChannelIdErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_PendingHTLCInfoInboundHTLCErrZ_ok
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_PendingHTLCInfoInboundHTLCErrZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CVec_HTLCOutputInCommitmentZ_free
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_PaymentContextZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1some
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_PaymentContextZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1none
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_PaymentContextZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_PaymentContextZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_PaymentContextZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: C2Tuple_u64u16Z_clone_ptr
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ThirtyTwoBytesAPIErrorZ_ok
- * Signature: ([B)J
+ * Method: CResult_ChannelIdAPIErrorZ_ok
+ * Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok
- (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ThirtyTwoBytesAPIErrorZ_err
+ * Method: CResult_ChannelIdAPIErrorZ_err
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1err
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ThirtyTwoBytesAPIErrorZ_is_ok
+ * Method: CResult_ChannelIdAPIErrorZ_is_ok
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1is_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ThirtyTwoBytesAPIErrorZ_free
+ * Method: CResult_ChannelIdAPIErrorZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr
+ * Method: CResult_ChannelIdAPIErrorZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_ThirtyTwoBytesAPIErrorZ_clone
+ * Method: CResult_ChannelIdAPIErrorZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone
(JNIEnv *, jclass, jlong);
/*
/*
* Class: org_ldk_impl_bindings
- * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr
+ * Method: C2Tuple_ChannelIdPublicKeyZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_clone
+ * Method: C2Tuple_ChannelIdPublicKeyZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_new
- * Signature: ([B[B)J
+ * Method: C2Tuple_ChannelIdPublicKeyZ_new
+ * Signature: (J[B)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1new
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: C2Tuple_ThirtyTwoBytesPublicKeyZ_free
+ * Method: C2Tuple_ChannelIdPublicKeyZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free
+ * Method: CVec_C2Tuple_ChannelIdPublicKeyZZ_free
* Signature: ([J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesPublicKeyZZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ChannelIdPublicKeyZZ_1free
(JNIEnv *, jclass, jlongArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CVec_ChannelIdZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelIdZ_1free
+ (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: COption_StrZ_some
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NoneBolt12SemanticErrorZ_ok
- * Signature: ()J
+ * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok
+ * Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok
- (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NoneBolt12SemanticErrorZ_err
- * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err
+ * Signature: ()J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err
- (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1err
+ (JNIEnv *, jclass);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NoneBolt12SemanticErrorZ_is_ok
+ * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1is_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NoneBolt12SemanticErrorZ_free
+ * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NoneBolt12SemanticErrorZ_clone_ptr
+ * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_NoneBolt12SemanticErrorZ_clone
+ * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok
- * Signature: (J)J
+ * Method: CResult_ThirtyTwoBytesAPIErrorZ_ok
+ * Signature: ([B)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok
- (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok
+ (JNIEnv *, jclass, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err
- * Signature: ()J
+ * Method: CResult_ThirtyTwoBytesAPIErrorZ_err
+ * Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1err
- (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok
+ * Method: CResult_ThirtyTwoBytesAPIErrorZ_is_ok
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free
+ * Method: CResult_ThirtyTwoBytesAPIErrorZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr
+ * Method: CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone
+ * Method: CResult_ThirtyTwoBytesAPIErrorZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CommitmentTransactionZ_1free
(JNIEnv *, jclass, jlongArray);
-/*
- * Class: org_ldk_impl_bindings
- * Method: CVec_TransactionZ_free
- * Signature: ([[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free
- (JNIEnv *, jclass, jobjectArray);
-
/*
* Class: org_ldk_impl_bindings
* Method: C2Tuple_u32TxOutZ_clone_ptr
/*
* Class: org_ldk_impl_bindings
- * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone_1ptr
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_new
- * Signature: ([BJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1new
- (JNIEnv *, jclass, jbyteArray, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: C2Tuple_PublicKeyCOption_SocketAddressZZ_free
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1free
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free
+ * Method: CVec_PeerDetailsZ_free
* Signature: ([J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyCOption_1SocketAddressZZZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PeerDetailsZ_1free
(JNIEnv *, jclass, jlongArray);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesChannelMonitorZIOErrorZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: COption_SecretKeyZ_some
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_VerifiedInvoiceRequestNoneZ_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1err
+ (JNIEnv *, jclass, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_InvoiceRequestFieldsDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: COption_NoneZ_some
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1WitnessZ_1free
(JNIEnv *, jclass, jobjectArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_ECDSASignatureZ_some
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1some
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_ECDSASignatureZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1none
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_ECDSASignatureZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_ECDSASignatureZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_ECDSASignatureZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: COption_i64Z_some
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInvalidShutdownScriptZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CVec_TransactionZ_free
+ * Signature: ([[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free
+ (JNIEnv *, jclass, jobjectArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_PaymentPurposeDecodeErrorZ_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecodeErrorZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ChannelIdDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ChannelIdDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ChannelIdDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ChannelIdDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ChannelIdDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_ChannelIdDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: C2Tuple__u832u16Z_clone_ptr
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr
+ * Method: CResult_PaymentContextDecodeErrorZ_ok
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone
+ * Method: CResult_PaymentContextDecodeErrorZ_err
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1err
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new
- * Signature: ([BJJ)J
+ * Method: CResult_PaymentContextDecodeErrorZ_is_ok
+ * Signature: (J)Z
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free
+ * Method: CResult_PaymentContextDecodeErrorZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok
+ * Method: CResult_PaymentContextDecodeErrorZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err
- * Signature: ()J
+ * Method: CResult_PaymentContextDecodeErrorZ_clone
+ * Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1err
- (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok
+ * Method: CResult_UnknownPaymentContextDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnknownPaymentContextDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_UnknownPaymentContextDecodeErrorZ_is_ok
* Signature: (J)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1is_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free
+ * Method: CResult_UnknownPaymentContextDecodeErrorZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr
+ * Method: CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone
+ * Method: CResult_UnknownPaymentContextDecodeErrorZ_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12OfferContextDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12OfferContextDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12OfferContextDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12OfferContextDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12OfferContextDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12RefundContextDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12RefundContextDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12RefundContextDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12RefundContextDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_Bolt12RefundContextDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new
+ * Signature: ([BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1new
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1err
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_TxOutUtxoLookupErrorZ_ok
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_PeeledOnionNoneZ_ok
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_PeeledOnionNoneZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_PeeledOnionNoneZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_SendSuccessSendErrorZ_ok
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SendSuccessSendErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_SendSuccessSendErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_BlindedPathNoneZ_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecodeErrorZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_TrackedSpendableOutputDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_TrackedSpendableOutputDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_TrackedSpendableOutputDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_TrackedSpendableOutputDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_TrackedSpendableOutputDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSpendStatusDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSpendStatusDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSpendStatusDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSpendStatusDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSpendStatusDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSpendStatusDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_FilterZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_FilterZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_FilterZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CVec_TrackedSpendableOutputZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TrackedSpendableOutputZ_1free
+ (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSweeperDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSweeperDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSweeperDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_OutputSweeperDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_BestBlockOutputSweeperZ_new
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1new
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_BestBlockOutputSweeperZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1err
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_DelayedPaymentBasepointDecodeErrorZ_ok
/*
* Class: org_ldk_impl_bindings
- * Method: COption_FilterZ_some
+ * Method: CResult_LockedChannelMonitorNoneZ_ok
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: COption_FilterZ_none
+ * Method: CResult_LockedChannelMonitorNoneZ_err
* Signature: ()J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1err
(JNIEnv *, jclass);
/*
* Class: org_ldk_impl_bindings
- * Method: COption_FilterZ_free
+ * Method: CResult_LockedChannelMonitorNoneZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1is_1ok
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: CResult_LockedChannelMonitorNoneZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_LockedChannelMonitorNoneZ_ok
+ * Method: C2Tuple_OutPointChannelIdZ_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_LockedChannelMonitorNoneZ_err
- * Signature: ()J
+ * Method: C2Tuple_OutPointChannelIdZ_clone
+ * Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1err
- (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_LockedChannelMonitorNoneZ_is_ok
- * Signature: (J)Z
+ * Method: C2Tuple_OutPointChannelIdZ_new
+ * Signature: (JJ)J
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1is_1ok
- (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1new
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CResult_LockedChannelMonitorNoneZ_free
+ * Method: C2Tuple_OutPointChannelIdZ_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: CVec_OutPointZ_free
+ * Method: CVec_C2Tuple_OutPointChannelIdZZ_free
* Signature: ([J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1OutPointZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1OutPointChannelIdZZ_1free
(JNIEnv *, jclass, jlongArray);
/*
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1into_1transaction
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TransactionU16LenLimited_as_transaction
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1as_1transaction
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: TransactionU16LenLimited_write
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorUpdatingPersister_1as_1Persist
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ShortChannelIdError_clone
+ * Signature: (J)Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ShortChannelIdError_block_overflow
+ * Signature: ()Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1block_1overflow
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ShortChannelIdError_tx_index_overflow
+ * Signature: ()Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1tx_1index_1overflow
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ShortChannelIdError_vout_index_overflow
+ * Signature: ()Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1vout_1index_1overflow
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ShortChannelIdError_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: block_from_scid
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_block_1from_1scid
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: tx_index_from_scid
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_tx_1index_1from_1scid
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: vout_from_scid
+ * Signature: (J)S
+ */
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_vout_1from_1scid
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: scid_from_parts
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_scid_1from_1parts
+ (JNIEnv *, jclass, jlong, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: UntrustedString_free
/*
* Class: org_ldk_impl_bindings
- * Method: FutureCallback_free
+ * Method: TrackedSpendableOutput_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: Future_free
+ * Method: TrackedSpendableOutput_get_descriptor
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1descriptor
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_set_descriptor
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1descriptor
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_get_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1channel_1id
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_set_channel_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1channel_1id
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_get_status
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1status
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_set_status
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1status
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_new
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1new
+ (JNIEnv *, jclass, jlong, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_is_spent_in
+ * Signature: (J[B)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1is_1spent_1in
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrackedSpendableOutput_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1read
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpendStatus_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpendStatus_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpendStatus_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpendStatus_pending_initial_broadcast
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1initial_1broadcast
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpendStatus_pending_first_confirmation
+ * Signature: ([BI[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1first_1confirmation
+ (JNIEnv *, jclass, jbyteArray, jint, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpendStatus_pending_threshold_confirmations
+ * Signature: ([BI[BI[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1threshold_1confirmations
+ (JNIEnv *, jclass, jbyteArray, jint, jbyteArray, jint, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpendStatus_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpendStatus_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpendStatus_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1read
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSweeper_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSweeper_new
+ * Signature: (JJJJJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1new
+ (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSweeper_track_spendable_outputs
+ * Signature: (J[JJZJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1track_1spendable_1outputs
+ (JNIEnv *, jclass, jlong, jlongArray, jlong, jboolean, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSweeper_tracked_spendable_outputs
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1tracked_1spendable_1outputs
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSweeper_current_best_block
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1current_1best_1block
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: Future_clone_ptr
+ * Method: OutputSweeper_as_Listen
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Future_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Listen
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: Future_clone
+ * Method: OutputSweeper_as_Confirm
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Future_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Confirm
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SpendingDelay_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SpendingDelay_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SpendingDelay_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SpendingDelay_relative
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1relative
+ (JNIEnv *, jclass, jint);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SpendingDelay_absolute
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1absolute
+ (JNIEnv *, jclass, jint);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSweeper_read
+ * Signature: ([BJJJJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1read
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: C2Tuple_BestBlockOutputSweeperZ_read
+ * Signature: ([BJJJJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1read
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: FutureCallback_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Future_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free
(JNIEnv *, jclass, jlong);
/*
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: BestBlock_get_block_hash
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1block_1hash
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: BestBlock_set_block_hash
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1block_1hash
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: BestBlock_get_height
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1height
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: BestBlock_set_height
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1height
+ (JNIEnv *, jclass, jlong, jint);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: BestBlock_new
+ * Signature: ([BI)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1new
+ (JNIEnv *, jclass, jbyteArray, jint);
+
/*
* Class: org_ldk_impl_bindings
* Method: BestBlock_clone_ptr
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: BestBlock_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1hash
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: BestBlock_eq
/*
* Class: org_ldk_impl_bindings
- * Method: BestBlock_new
- * Signature: ([BI)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1new
- (JNIEnv *, jclass, jbyteArray, jint);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: BestBlock_block_hash
+ * Method: BestBlock_write
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1block_1hash
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1write
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: BestBlock_height
- * Signature: (J)I
+ * Method: BestBlock_read
+ * Signature: ([B)J
*/
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_BestBlock_1height
- (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1read
+ (JNIEnv *, jclass, jbyteArray);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1channel_1close_1minimum
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ConfirmationTarget_output_spending_fee
+ * Signature: ()Lorg/ldk/enums/ConfirmationTarget;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1output_1spending_1fee
+ (JNIEnv *, jclass);
+
/*
* Class: org_ldk_impl_bindings
* Method: ConfirmationTarget_hash
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1rebroadcast_1pending_1claims
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChainMonitor_signer_unblocked
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1signer_1unblocked
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChainMonitor_archive_fully_resolved_channel_monitors
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1archive_1fully_1resolved_1channel_1monitors
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ChainMonitor_as_Listen
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelMonitorUpdate_get_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1channel_1id
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelMonitorUpdate_set_channel_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1channel_1id
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ChannelMonitorUpdate_clone_ptr
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1htlcevent
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: MonitorEvent_holder_force_closed_with_info
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed_1with_1info
+ (JNIEnv *, jclass, jlong, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: MonitorEvent_holder_force_closed
/*
* Class: org_ldk_impl_bindings
* Method: MonitorEvent_completed
- * Signature: (JJ)J
+ * Signature: (JJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed
- (JNIEnv *, jclass, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelMonitor_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1channel_1id
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ChannelMonitor_get_outputs_to_watch
/*
* Class: org_ldk_impl_bindings
- * Method: ChannelMonitor_get_latest_holder_commitment_txn
- * Signature: (JJ)[[B
+ * Method: ChannelMonitor_broadcast_latest_holder_commitment_txn
+ * Signature: (JJJJ)V
*/
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn
- (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1broadcast_1latest_1holder_1commitment_1txn
+ (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1rebroadcast_1pending_1claims
(JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelMonitor_signer_unblocked
+ * Signature: (JJJJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1signer_1unblocked
+ (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ChannelMonitor_get_spendable_outputs
JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1spendable_1outputs
(JNIEnv *, jclass, jlong, jbyteArray, jint);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelMonitor_is_fully_resolved
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1is_1fully_1resolved
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ChannelMonitor_get_claimable_balances
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1hash
(JNIEnv *, jclass, jlong);
-/*
- * Class: org_ldk_impl_bindings
- * Method: OutPoint_to_channel_id
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id
- (JNIEnv *, jclass, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: OutPoint_write
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1new
(JNIEnv *, jclass, jshort, jbyteArray, jstring);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InboundHTLCErr_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InboundHTLCErr_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InboundHTLCErr_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1hash
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InboundHTLCErr_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: peel_payment_onion
/*
* Class: org_ldk_impl_bindings
* Method: PendingHTLCRouting_receive
- * Signature: (JJI[B[JZ)J
+ * Signature: (JJJI[B[JZ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive
- (JNIEnv *, jclass, jlong, jlong, jint, jbyteArray, jlongArray, jboolean);
+ (JNIEnv *, jclass, jlong, jlong, jlong, jint, jbyteArray, jlongArray, jboolean);
/*
* Class: org_ldk_impl_bindings
* Method: PendingHTLCRouting_receive_keysend
- * Signature: (J[BJI[J)J
+ * Signature: (J[BJI[JZ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend
- (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jlongArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jlongArray, jboolean);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelDetails_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelDetails_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1config
(JNIEnv *, jclass, jlong, jlong);
-/*
- * Class: org_ldk_impl_bindings
- * Method: ChannelDetails_new
- * Signature: ([BJJJJJJJJ[BJJJJJJJJJZZJZZJJJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jboolean, jboolean, jlong, jboolean, jboolean, jlong, jlong, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: ChannelDetails_clone_ptr
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_close_channel
- * Signature: (J[B[B)J
+ * Signature: (JJ[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel
- (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_close_channel_with_feerate_and_script
- * Signature: (J[B[BJJ)J
+ * Signature: (JJ[BJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script
- (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_force_close_broadcasting_latest_txn
- * Signature: (J[B[B)J
+ * Signature: (JJ[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn
- (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_force_close_without_broadcasting_txn
- * Signature: (J[B[B)J
+ * Signature: (JJ[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn
- (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_funding_transaction_generated
- * Signature: (J[B[B[B)J
+ * Signature: (JJ[B[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated
- (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_update_partial_channel_config
- * Signature: (J[B[[BJ)J
+ * Signature: (J[B[JJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config
- (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlongArray, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_update_channel_config
- * Signature: (J[B[[BJ)J
+ * Signature: (J[B[JJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config
- (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlongArray, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_forward_intercepted_htlc
- * Signature: (J[B[B[BJ)J
+ * Signature: (J[BJ[BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc
- (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_accept_inbound_channel
- * Signature: (J[B[B[B)J
+ * Signature: (JJ[B[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel
- (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelManager_accept_inbound_channel_from_trusted_peer_0conf
- * Signature: (J[B[B[B)J
+ * Signature: (JJ[B[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf
- (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelManager_create_offer_builder
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1offer_1builder
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelManager_create_refund_builder
+ * Signature: (JJJ[BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1refund_1builder
+ (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1OffersMessageHandler
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelManager_as_NodeIdLookUp
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1NodeIdLookUp
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: provided_init_features
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1to_1public_1key
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DelayedPaymentBasepoint_derive_add_tweak
+ * Signature: (J[B)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1derive_1add_1tweak
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: DelayedPaymentBasepoint_write
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1to_1public_1key
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: HtlcBasepoint_derive_add_tweak
+ * Signature: (J[B)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1derive_1add_1tweak
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: HtlcBasepoint_write
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HtlcKey_1read
(JNIEnv *, jclass, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: add_public_key_tweak
+ * Signature: ([B[B)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_add_1public_1key_1tweak
+ (JNIEnv *, jclass, jbyteArray, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: RevocationBasepoint_free
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1compression
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DecodeError_dangerous_value
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1dangerous_1value
+ (JNIEnv *, jclass);
+
/*
* Class: org_ldk_impl_bindings
* Method: DecodeError_hash
/*
* Class: org_ldk_impl_bindings
* Method: ErrorMessage_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: ErrorMessage_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ErrorMessage_new
- * Signature: ([BLjava/lang/String;)J
+ * Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new
- (JNIEnv *, jclass, jbyteArray, jstring);
+ (JNIEnv *, jclass, jlong, jstring);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: WarningMessage_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: WarningMessage_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: WarningMessage_new
- * Signature: ([BLjava/lang/String;)J
+ * Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new
- (JNIEnv *, jclass, jbyteArray, jstring);
+ (JNIEnv *, jclass, jlong, jstring);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_free
+ * Method: CommonOpenChannelFields_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_chain_hash
+ * Method: CommonOpenChannelFields_get_chain_hash
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1chain_1hash
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_chain_hash
+ * Method: CommonOpenChannelFields_set_chain_hash
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1chain_1hash
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_temporary_channel_id
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_temporary_channel_id
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_funding_satoshis
+ * Method: CommonOpenChannelFields_get_temporary_channel_id
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1temporary_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_funding_satoshis
+ * Method: CommonOpenChannelFields_set_temporary_channel_id
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1temporary_1channel_1id
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_push_msat
+ * Method: CommonOpenChannelFields_get_funding_satoshis
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1satoshis
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_push_msat
+ * Method: CommonOpenChannelFields_set_funding_satoshis
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1satoshis
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_dust_limit_satoshis
+ * Method: CommonOpenChannelFields_get_dust_limit_satoshis
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1dust_1limit_1satoshis
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_dust_limit_satoshis
+ * Method: CommonOpenChannelFields_set_dust_limit_satoshis
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1dust_1limit_1satoshis
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_max_htlc_value_in_flight_msat
+ * Method: CommonOpenChannelFields_get_max_htlc_value_in_flight_msat
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_max_htlc_value_in_flight_msat
+ * Method: CommonOpenChannelFields_set_max_htlc_value_in_flight_msat
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat
- (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_channel_reserve_satoshis
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_channel_reserve_satoshis
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_htlc_minimum_msat
+ * Method: CommonOpenChannelFields_get_htlc_minimum_msat
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1minimum_1msat
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_htlc_minimum_msat
+ * Method: CommonOpenChannelFields_set_htlc_minimum_msat
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1minimum_1msat
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_feerate_per_kw
+ * Method: CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1commitment_1feerate_1sat_1per_11000_1weight
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_feerate_per_kw
+ * Method: CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight
* Signature: (JI)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1commitment_1feerate_1sat_1per_11000_1weight
(JNIEnv *, jclass, jlong, jint);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_to_self_delay
+ * Method: CommonOpenChannelFields_get_to_self_delay
* Signature: (J)S
*/
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1to_1self_1delay
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_to_self_delay
+ * Method: CommonOpenChannelFields_set_to_self_delay
* Signature: (JS)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1to_1self_1delay
(JNIEnv *, jclass, jlong, jshort);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_max_accepted_htlcs
+ * Method: CommonOpenChannelFields_get_max_accepted_htlcs
* Signature: (J)S
*/
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1accepted_1htlcs
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_max_accepted_htlcs
+ * Method: CommonOpenChannelFields_set_max_accepted_htlcs
* Signature: (JS)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1accepted_1htlcs
(JNIEnv *, jclass, jlong, jshort);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_funding_pubkey
+ * Method: CommonOpenChannelFields_get_funding_pubkey
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1pubkey
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_funding_pubkey
+ * Method: CommonOpenChannelFields_set_funding_pubkey
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1pubkey
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_revocation_basepoint
+ * Method: CommonOpenChannelFields_get_revocation_basepoint
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1revocation_1basepoint
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_revocation_basepoint
+ * Method: CommonOpenChannelFields_set_revocation_basepoint
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1revocation_1basepoint
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_payment_point
+ * Method: CommonOpenChannelFields_get_payment_basepoint
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1payment_1basepoint
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_payment_point
+ * Method: CommonOpenChannelFields_set_payment_basepoint
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1payment_1basepoint
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_delayed_payment_basepoint
+ * Method: CommonOpenChannelFields_get_delayed_payment_basepoint
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1delayed_1payment_1basepoint
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_delayed_payment_basepoint
+ * Method: CommonOpenChannelFields_set_delayed_payment_basepoint
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1delayed_1payment_1basepoint
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_htlc_basepoint
+ * Method: CommonOpenChannelFields_get_htlc_basepoint
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1basepoint
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_htlc_basepoint
+ * Method: CommonOpenChannelFields_set_htlc_basepoint
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1basepoint
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_first_per_commitment_point
+ * Method: CommonOpenChannelFields_get_first_per_commitment_point
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1first_1per_1commitment_1point
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_first_per_commitment_point
+ * Method: CommonOpenChannelFields_set_first_per_commitment_point
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1first_1per_1commitment_1point
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_channel_flags
+ * Method: CommonOpenChannelFields_get_channel_flags
* Signature: (J)B
*/
-JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags
+JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1flags
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_channel_flags
+ * Method: CommonOpenChannelFields_set_channel_flags
* Signature: (JB)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1flags
(JNIEnv *, jclass, jlong, jbyte);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_shutdown_scriptpubkey
+ * Method: CommonOpenChannelFields_get_shutdown_scriptpubkey
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1shutdown_1scriptpubkey
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1shutdown_1scriptpubkey
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_shutdown_scriptpubkey
+ * Method: CommonOpenChannelFields_set_shutdown_scriptpubkey
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1scriptpubkey
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1shutdown_1scriptpubkey
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_get_channel_type
+ * Method: CommonOpenChannelFields_get_channel_type
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1type
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1type
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_set_channel_type
+ * Method: CommonOpenChannelFields_set_channel_type
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1type
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1type
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_new
- * Signature: ([B[BJJJJJJISS[B[B[B[B[B[BBJJ)J
+ * Method: CommonOpenChannelFields_new
+ * Signature: ([BJJJJJISS[B[B[B[B[B[BBJJ)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyte, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1new
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyte, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_clone_ptr
+ * Method: CommonOpenChannelFields_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_clone
+ * Method: CommonOpenChannelFields_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_hash
+ * Method: CommonOpenChannelFields_hash
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1hash
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1hash
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannel_eq
+ * Method: CommonOpenChannelFields_eq
* Signature: (JJ)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannel_1eq
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1eq
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_free
+ * Method: OpenChannel_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_chain_hash
- * Signature: (J)[B
+ * Method: OpenChannel_get_common_fields
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1chain_1hash
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1common_1fields
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_chain_hash
- * Signature: (J[B)V
+ * Method: OpenChannel_set_common_fields
+ * Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1chain_1hash
- (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1common_1fields
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_temporary_channel_id
- * Signature: (J)[B
+ * Method: OpenChannel_get_push_msat
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1temporary_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_temporary_channel_id
- * Signature: (J[B)V
+ * Method: OpenChannel_set_push_msat
+ * Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_funding_feerate_sat_per_1000_weight
- * Signature: (J)I
+ * Method: OpenChannel_get_channel_reserve_satoshis
+ * Signature: (J)J
*/
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_funding_feerate_sat_per_1000_weight
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1feerate_1sat_1per_11000_1weight
- (JNIEnv *, jclass, jlong, jint);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_commitment_feerate_sat_per_1000_weight
- * Signature: (J)I
+ * Method: OpenChannel_set_channel_reserve_satoshis
+ * Signature: (JJ)V
*/
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1commitment_1feerate_1sat_1per_11000_1weight
- (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_commitment_feerate_sat_per_1000_weight
- * Signature: (JI)V
+ * Method: OpenChannel_new
+ * Signature: (JJJ)J
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1commitment_1feerate_1sat_1per_11000_1weight
- (JNIEnv *, jclass, jlong, jint);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new
+ (JNIEnv *, jclass, jlong, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_funding_satoshis
+ * Method: OpenChannel_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_funding_satoshis
- * Signature: (JJ)V
+ * Method: OpenChannel_clone
+ * Signature: (J)J
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1satoshis
- (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_dust_limit_satoshis
+ * Method: OpenChannel_hash
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1dust_1limit_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1hash
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_dust_limit_satoshis
- * Signature: (JJ)V
+ * Method: OpenChannel_eq
+ * Signature: (JJ)Z
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1dust_1limit_1satoshis
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannel_1eq
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_max_htlc_value_in_flight_msat
- * Signature: (J)J
+ * Method: OpenChannelV2_free
+ * Signature: (J)V
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_max_htlc_value_in_flight_msat
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat
- (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_htlc_minimum_msat
+ * Method: OpenChannelV2_get_common_fields
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1minimum_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1common_1fields
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_htlc_minimum_msat
+ * Method: OpenChannelV2_set_common_fields
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1minimum_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1common_1fields
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_to_self_delay
- * Signature: (J)S
- */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1to_1self_1delay
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_to_self_delay
- * Signature: (JS)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1to_1self_1delay
- (JNIEnv *, jclass, jlong, jshort);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_max_accepted_htlcs
- * Signature: (J)S
+ * Method: OpenChannelV2_get_funding_feerate_sat_per_1000_weight
+ * Signature: (J)I
*/
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1accepted_1htlcs
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_max_accepted_htlcs
- * Signature: (JS)V
+ * Method: OpenChannelV2_set_funding_feerate_sat_per_1000_weight
+ * Signature: (JI)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1accepted_1htlcs
- (JNIEnv *, jclass, jlong, jshort);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1feerate_1sat_1per_11000_1weight
+ (JNIEnv *, jclass, jlong, jint);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1locktime
(JNIEnv *, jclass, jlong, jint);
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_funding_pubkey
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1pubkey
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_funding_pubkey
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1pubkey
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_revocation_basepoint
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1revocation_1basepoint
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_revocation_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1revocation_1basepoint
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_payment_basepoint
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1payment_1basepoint
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_payment_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1payment_1basepoint
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_delayed_payment_basepoint
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1delayed_1payment_1basepoint
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_delayed_payment_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1delayed_1payment_1basepoint
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_htlc_basepoint
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1basepoint
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_htlc_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1basepoint
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_first_per_commitment_point
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1first_1per_1commitment_1point
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_first_per_commitment_point
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1first_1per_1commitment_1point
- (JNIEnv *, jclass, jlong, jbyteArray);
-
/*
* Class: org_ldk_impl_bindings
* Method: OpenChannelV2_get_second_per_commitment_point
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1second_1per_1commitment_1point
(JNIEnv *, jclass, jlong, jbyteArray);
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_channel_flags
- * Signature: (J)B
- */
-JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1flags
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_channel_flags
- * Signature: (JB)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1flags
- (JNIEnv *, jclass, jlong, jbyte);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_shutdown_scriptpubkey
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1shutdown_1scriptpubkey
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_shutdown_scriptpubkey
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1shutdown_1scriptpubkey
- (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_get_channel_type
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1type
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: OpenChannelV2_set_channel_type
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1type
- (JNIEnv *, jclass, jlong, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: OpenChannelV2_get_require_confirmed_inputs
/*
* Class: org_ldk_impl_bindings
* Method: OpenChannelV2_new
- * Signature: ([B[BIIJJJJSSI[B[B[B[B[B[B[BBJJLorg/ldk/enums/COption_NoneZ;)J
+ * Signature: (JII[BLorg/ldk/enums/COption_NoneZ;)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jint, jint, jlong, jlong, jlong, jlong, jshort, jshort, jint, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyte, jlong, jlong, jobject);
+ (JNIEnv *, jclass, jlong, jint, jint, jbyteArray, jobject);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_free
+ * Method: CommonAcceptChannelFields_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_temporary_channel_id
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_temporary_channel_id
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_dust_limit_satoshis
+ * Method: CommonAcceptChannelFields_get_temporary_channel_id
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1temporary_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_dust_limit_satoshis
+ * Method: CommonAcceptChannelFields_set_temporary_channel_id
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1temporary_1channel_1id
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_max_htlc_value_in_flight_msat
+ * Method: CommonAcceptChannelFields_get_dust_limit_satoshis
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1dust_1limit_1satoshis
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_max_htlc_value_in_flight_msat
+ * Method: CommonAcceptChannelFields_set_dust_limit_satoshis
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1dust_1limit_1satoshis
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_channel_reserve_satoshis
+ * Method: CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_channel_reserve_satoshis
+ * Method: CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_htlc_minimum_msat
+ * Method: CommonAcceptChannelFields_get_htlc_minimum_msat
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1minimum_1msat
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_htlc_minimum_msat
+ * Method: CommonAcceptChannelFields_set_htlc_minimum_msat
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1minimum_1msat
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_minimum_depth
+ * Method: CommonAcceptChannelFields_get_minimum_depth
* Signature: (J)I
*/
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1minimum_1depth
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_minimum_depth
+ * Method: CommonAcceptChannelFields_set_minimum_depth
* Signature: (JI)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1minimum_1depth
(JNIEnv *, jclass, jlong, jint);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_to_self_delay
+ * Method: CommonAcceptChannelFields_get_to_self_delay
* Signature: (J)S
*/
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1to_1self_1delay
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_to_self_delay
+ * Method: CommonAcceptChannelFields_set_to_self_delay
* Signature: (JS)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1to_1self_1delay
(JNIEnv *, jclass, jlong, jshort);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_max_accepted_htlcs
+ * Method: CommonAcceptChannelFields_get_max_accepted_htlcs
* Signature: (J)S
*/
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1accepted_1htlcs
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_max_accepted_htlcs
+ * Method: CommonAcceptChannelFields_set_max_accepted_htlcs
* Signature: (JS)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1accepted_1htlcs
(JNIEnv *, jclass, jlong, jshort);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_funding_pubkey
+ * Method: CommonAcceptChannelFields_get_funding_pubkey
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1funding_1pubkey
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_funding_pubkey
+ * Method: CommonAcceptChannelFields_set_funding_pubkey
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1funding_1pubkey
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_revocation_basepoint
+ * Method: CommonAcceptChannelFields_get_revocation_basepoint
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1revocation_1basepoint
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_revocation_basepoint
+ * Method: CommonAcceptChannelFields_set_revocation_basepoint
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1revocation_1basepoint
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_payment_point
+ * Method: CommonAcceptChannelFields_get_payment_basepoint
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1payment_1basepoint
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_payment_point
+ * Method: CommonAcceptChannelFields_set_payment_basepoint
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1payment_1basepoint
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_delayed_payment_basepoint
+ * Method: CommonAcceptChannelFields_get_delayed_payment_basepoint
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1delayed_1payment_1basepoint
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_delayed_payment_basepoint
+ * Method: CommonAcceptChannelFields_set_delayed_payment_basepoint
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1delayed_1payment_1basepoint
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_htlc_basepoint
+ * Method: CommonAcceptChannelFields_get_htlc_basepoint
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1basepoint
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_htlc_basepoint
+ * Method: CommonAcceptChannelFields_set_htlc_basepoint
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1basepoint
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_first_per_commitment_point
+ * Method: CommonAcceptChannelFields_get_first_per_commitment_point
* Signature: (J)[B
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1first_1per_1commitment_1point
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_first_per_commitment_point
+ * Method: CommonAcceptChannelFields_set_first_per_commitment_point
* Signature: (J[B)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1first_1per_1commitment_1point
(JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_shutdown_scriptpubkey
+ * Method: CommonAcceptChannelFields_get_shutdown_scriptpubkey
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1shutdown_1scriptpubkey
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1shutdown_1scriptpubkey
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_shutdown_scriptpubkey
+ * Method: CommonAcceptChannelFields_set_shutdown_scriptpubkey
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1scriptpubkey
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1shutdown_1scriptpubkey
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_get_channel_type
+ * Method: CommonAcceptChannelFields_get_channel_type
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1type
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1channel_1type
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_set_channel_type
+ * Method: CommonAcceptChannelFields_set_channel_type
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1type
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1channel_1type
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_new
- * Signature: ([BJJJJISS[B[B[B[B[B[BJJ)J
+ * Method: CommonAcceptChannelFields_new
+ * Signature: (JJJJISS[B[B[B[B[B[BJJ)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1new
+ (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_clone_ptr
+ * Method: CommonAcceptChannelFields_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_clone
+ * Method: CommonAcceptChannelFields_clone
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_hash
+ * Method: CommonAcceptChannelFields_hash
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1hash
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1hash
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannel_eq
+ * Method: CommonAcceptChannelFields_eq
* Signature: (JJ)Z
*/
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1eq
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1eq
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_free
+ * Method: AcceptChannel_free
* Signature: (J)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_temporary_channel_id
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1temporary_1channel_1id
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_temporary_channel_id
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_funding_satoshis
+ * Method: AcceptChannel_get_common_fields
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1common_1fields
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_funding_satoshis
+ * Method: AcceptChannel_set_common_fields
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1common_1fields
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_dust_limit_satoshis
+ * Method: AcceptChannel_get_channel_reserve_satoshis
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1dust_1limit_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_dust_limit_satoshis
+ * Method: AcceptChannel_set_channel_reserve_satoshis
* Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1dust_1limit_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_max_htlc_value_in_flight_msat
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_max_htlc_value_in_flight_msat
- * Signature: (JJ)V
+ * Method: AcceptChannel_new
+ * Signature: (JJ)J
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_htlc_minimum_msat
+ * Method: AcceptChannel_clone_ptr
* Signature: (J)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1minimum_1msat
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_htlc_minimum_msat
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1minimum_1msat
- (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_minimum_depth
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1minimum_1depth
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_minimum_depth
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1minimum_1depth
- (JNIEnv *, jclass, jlong, jint);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_to_self_delay
- * Signature: (J)S
- */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1to_1self_1delay
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_to_self_delay
- * Signature: (JS)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1to_1self_1delay
- (JNIEnv *, jclass, jlong, jshort);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_max_accepted_htlcs
- * Signature: (J)S
- */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1accepted_1htlcs
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_max_accepted_htlcs
- * Signature: (JS)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1accepted_1htlcs
- (JNIEnv *, jclass, jlong, jshort);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_funding_pubkey
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1pubkey
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone_1ptr
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_funding_pubkey
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1pubkey
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_revocation_basepoint
- * Signature: (J)[B
+ * Method: AcceptChannel_clone
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1revocation_1basepoint
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_revocation_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1revocation_1basepoint
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_payment_basepoint
- * Signature: (J)[B
+ * Method: AcceptChannel_hash
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1payment_1basepoint
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1hash
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_payment_basepoint
- * Signature: (J[B)V
+ * Method: AcceptChannel_eq
+ * Signature: (JJ)Z
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1payment_1basepoint
- (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1eq
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_delayed_payment_basepoint
- * Signature: (J)[B
+ * Method: AcceptChannelV2_free
+ * Signature: (J)V
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1delayed_1payment_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_delayed_payment_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1delayed_1payment_1basepoint
- (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_htlc_basepoint
- * Signature: (J)[B
+ * Method: AcceptChannelV2_get_common_fields
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1basepoint
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1common_1fields
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_htlc_basepoint
- * Signature: (J[B)V
+ * Method: AcceptChannelV2_set_common_fields
+ * Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1basepoint
- (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1common_1fields
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_first_per_commitment_point
- * Signature: (J)[B
+ * Method: AcceptChannelV2_get_funding_satoshis
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1first_1per_1commitment_1point
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_first_per_commitment_point
- * Signature: (J[B)V
+ * Method: AcceptChannelV2_set_funding_satoshis
+ * Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1first_1per_1commitment_1point
- (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1satoshis
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1second_1per_1commitment_1point
(JNIEnv *, jclass, jlong, jbyteArray);
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_shutdown_scriptpubkey
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1shutdown_1scriptpubkey
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_shutdown_scriptpubkey
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1shutdown_1scriptpubkey
- (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_get_channel_type
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1channel_1type
- (JNIEnv *, jclass, jlong);
-
-/*
- * Class: org_ldk_impl_bindings
- * Method: AcceptChannelV2_set_channel_type
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1channel_1type
- (JNIEnv *, jclass, jlong, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: AcceptChannelV2_get_require_confirmed_inputs
/*
* Class: org_ldk_impl_bindings
* Method: AcceptChannelV2_new
- * Signature: ([BJJJJISS[B[B[B[B[B[B[BJJLorg/ldk/enums/COption_NoneZ;)J
+ * Signature: (JJ[BLorg/ldk/enums/COption_NoneZ;)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong, jobject);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray, jobject);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingCreated_get_temporary_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: FundingCreated_set_temporary_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingCreated_new
- * Signature: ([B[BS[B)J
+ * Signature: (J[BS[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jshort, jbyteArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jshort, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingSigned_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: FundingSigned_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: FundingSigned_new
- * Signature: ([B[B)J
+ * Signature: (J[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelReady_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelReady_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelReady_new
- * Signature: ([B[BJ)J
+ * Signature: (J[BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: Stfu_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: Stfu_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: Stfu_new
- * Signature: ([BB)J
+ * Signature: (JB)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Stfu_1new
- (JNIEnv *, jclass, jbyteArray, jbyte);
+ (JNIEnv *, jclass, jlong, jbyte);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: Splice_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: Splice_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: Splice_new
- * Signature: ([B[BJII[B)J
+ * Signature: (J[BJII[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Splice_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jint, jint, jbyteArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jint, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: SpliceAck_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: SpliceAck_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: SpliceAck_new
- * Signature: ([B[BJ[B)J
+ * Signature: (J[BJ[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: SpliceLocked_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: SpliceLocked_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: SpliceLocked_new
- * Signature: ([B)J
+ * Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new
- (JNIEnv *, jclass, jbyteArray);
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxAddInput_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxAddInput_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxAddInput_new
- * Signature: ([BJJII)J
+ * Signature: (JJJII)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jlong, jint, jint);
+ (JNIEnv *, jclass, jlong, jlong, jlong, jint, jint);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxAddOutput_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxAddOutput_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxAddOutput_new
- * Signature: ([BJJ[B)J
+ * Signature: (JJJ[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxRemoveInput_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxRemoveInput_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxRemoveInput_new
- * Signature: ([BJ)J
+ * Signature: (JJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new
- (JNIEnv *, jclass, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxRemoveOutput_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxRemoveOutput_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxRemoveOutput_new
- * Signature: ([BJ)J
+ * Signature: (JJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new
- (JNIEnv *, jclass, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxComplete_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxComplete_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxComplete_new
- * Signature: ([B)J
+ * Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxComplete_1new
- (JNIEnv *, jclass, jbyteArray);
+ (JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxSignatures_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxSignatures_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1witnesses
(JNIEnv *, jclass, jlong, jobjectArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TxSignatures_get_funding_outpoint_sig
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1funding_1outpoint_1sig
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TxSignatures_set_funding_outpoint_sig
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1funding_1outpoint_1sig
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: TxSignatures_new
- * Signature: ([B[B[[B)J
+ * Signature: (J[B[[BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jobjectArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxInitRbf_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxInitRbf_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxInitRbf_new
- * Signature: ([BIIJ)J
+ * Signature: (JIIJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new
- (JNIEnv *, jclass, jbyteArray, jint, jint, jlong);
+ (JNIEnv *, jclass, jlong, jint, jint, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxAckRbf_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxAckRbf_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxAckRbf_new
- * Signature: ([BJ)J
+ * Signature: (JJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new
- (JNIEnv *, jclass, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxAbort_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: TxAbort_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: TxAbort_new
- * Signature: ([B[B)J
+ * Signature: (J[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAbort_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: Shutdown_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: Shutdown_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: Shutdown_new
- * Signature: ([B[B)J
+ * Signature: (J[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ClosingSigned_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: ClosingSigned_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ClosingSigned_new
- * Signature: ([BJ[BJ)J
+ * Signature: (JJ[BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateAddHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: UpdateAddHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateAddHTLC_new
- * Signature: ([BJJ[BIJJ[B)J
+ * Signature: (JJJ[BIJJ[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jlong, jbyteArray, jint, jlong, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray, jint, jlong, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFulfillHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFulfillHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFulfillHTLC_new
- * Signature: ([BJ[B)J
+ * Signature: (JJ[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFailHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFailHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFailMalformedHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFailMalformedHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: CommitmentSigned_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: CommitmentSigned_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: CommitmentSigned_new
- * Signature: ([B[B[[B)J
+ * Signature: (J[B[[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jobjectArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: RevokeAndACK_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: RevokeAndACK_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: RevokeAndACK_new
- * Signature: ([B[B[B)J
+ * Signature: (J[B[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFee_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFee_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: UpdateFee_new
- * Signature: ([BI)J
+ * Signature: (JI)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new
- (JNIEnv *, jclass, jbyteArray, jint);
+ (JNIEnv *, jclass, jlong, jint);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelReestablish_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: ChannelReestablish_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ChannelReestablish_new
- * Signature: ([BJJ[B[BJ)J
+ * Signature: (JJJ[B[BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jlong, jbyteArray, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: AnnouncementSignatures_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: AnnouncementSignatures_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: AnnouncementSignatures_new
- * Signature: ([BJ[B[B)J
+ * Signature: (JJ[B[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new
- (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses
(JNIEnv *, jclass, jlong, jlongArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedNodeAnnouncement_get_excess_address_data
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1address_1data
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedNodeAnnouncement_set_excess_address_data
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1address_1data
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedNodeAnnouncement_get_excess_data
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1data
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedNodeAnnouncement_set_excess_data
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1data
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedNodeAnnouncement_new
+ * Signature: (JIJ[BJ[J[B[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1new
+ (JNIEnv *, jclass, jlong, jint, jlong, jbyteArray, jlong, jlongArray, jbyteArray, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedNodeAnnouncement_clone_ptr
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionPacket_1eq
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_get_version
+ * Signature: (J)B
+ */
+JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1version
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_set_version
+ * Signature: (JB)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1version
+ (JNIEnv *, jclass, jlong, jbyte);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_get_public_key
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1public_1key
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_set_public_key
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1public_1key
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_get_hop_data
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hop_1data
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_set_hop_data
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hop_1data
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_get_hmac
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hmac
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_set_hmac
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hmac
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_new
+ * Signature: (B[B[B[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1new
+ (JNIEnv *, jclass, jbyte, jbyteArray, jbyteArray, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1hash
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: TrampolineOnionPacket_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1write
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: AcceptChannel_write
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_get_counterparty_node_id
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1counterparty_1node_1id
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_set_counterparty_node_id
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1counterparty_1node_1id
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_get_socket_address
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1socket_1address
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_set_socket_address
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1socket_1address
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_get_init_features
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1init_1features
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_set_init_features
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1init_1features
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_get_is_inbound_connection
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1is_1inbound_1connection
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_set_is_inbound_connection
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1is_1inbound_1connection
+ (JNIEnv *, jclass, jlong, jboolean);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerDetails_new
+ * Signature: ([BJJZ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerDetails_1new
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong, jboolean);
+
/*
* Class: org_ldk_impl_bindings
* Method: PeerHandleError_free
/*
* Class: org_ldk_impl_bindings
- * Method: PeerManager_get_peer_node_ids
+ * Method: PeerManager_list_peers
* Signature: (J)[J
*/
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1list_1peers
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PeerManager_peer_by_node_id
+ * Signature: (J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1peer_1by_1node_1id
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: PeerManager_new_outbound_connection
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1keysend
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InitFeatures_set_trampoline_routing_optional
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1optional
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InitFeatures_set_trampoline_routing_required
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1required
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InitFeatures_supports_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1supports_1trampoline_1routing
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeFeatures_set_trampoline_routing_optional
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1optional
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeFeatures_set_trampoline_routing_required
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1required
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeFeatures_supports_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1trampoline_1routing
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt11InvoiceFeatures_set_trampoline_routing_optional
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1optional
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt11InvoiceFeatures_set_trampoline_routing_required
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1required
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt11InvoiceFeatures_supports_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1supports_1trampoline_1routing
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InitFeatures_requires_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1trampoline_1routing
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeFeatures_requires_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1trampoline_1routing
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt11InvoiceFeatures_requires_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1requires_1trampoline_1routing
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ShutdownScript_free
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1is_1compatible
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_get_a
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1get_1a
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_set_a
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1set_1a
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_new
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1new
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1hash
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_v1_from_funding_txid
+ * Signature: ([BS)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1txid
+ (JNIEnv *, jclass, jbyteArray, jshort);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_v1_from_funding_outpoint
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1outpoint
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_temporary_from_entropy_source
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1from_1entropy_1source
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_from_bytes
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1from_1bytes
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_new_zero
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1new_1zero
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_is_zero
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1is_1zero
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_v2_from_revocation_basepoints
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1v2_1from_1revocation_1basepoints
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_temporary_v2_from_revocation_basepoint
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1v2_1from_1revocation_1basepoint
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelId_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1read
+ (JNIEnv *, jclass, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: Retry_free
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Type_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferId_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferId_get_a
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OfferId_1get_1a
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferId_set_a
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1set_1a
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferId_new
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1new
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferId_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferId_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferId_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OfferId_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferId_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OfferId_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferId_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1read
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_new
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1new
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_metadata
+ * Signature: (J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1metadata
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1chain
+ (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_amount_msats
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1amount_1msats
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_absolute_expiry
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1absolute_1expiry
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_description
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1description
+ (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_issuer
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1issuer
+ (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_path
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1path
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_supported_quantity
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1supported_1quantity
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithExplicitMetadataBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1build
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_deriving_signing_pubkey
+ * Signature: ([BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1deriving_1signing_1pubkey
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1chain
+ (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_amount_msats
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1amount_1msats
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_absolute_expiry
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1absolute_1expiry
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_description
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1description
+ (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_issuer
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1issuer
+ (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_path
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1path
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_supported_quantity
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1supported_1quantity
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OfferWithDerivedMetadataBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1build
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: Offer_free
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Offer_1signing_1pubkey
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Offer_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1id
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: Offer_supports_chain
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1expects_1quantity
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Offer_request_invoice_deriving_payer_id
+ * Signature: (JJJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1payer_1id
+ (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Offer_request_invoice_deriving_metadata
+ * Signature: (J[BJJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1metadata
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Offer_request_invoice
+ * Signature: (J[B[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice
+ (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Offer_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1hash
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: Offer_write
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Amount_bitcoin
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1bitcoin
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Amount_currency
+ * Signature: ([BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1currency
+ (JNIEnv *, jclass, jbyteArray, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: Quantity_free
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Quantity_bounded
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1bounded
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Quantity_unbounded
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1unbounded
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Quantity_one
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1one
+ (JNIEnv *, jclass);
+
/*
* Class: org_ldk_impl_bindings
* Method: Offer_from_str
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str
(JNIEnv *, jclass, jstring);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithExplicitSigningPubkeyBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithDerivedSigningPubkeyBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithExplicitSigningPubkeyBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1build
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1relative_1expiry
+ (JNIEnv *, jclass, jlong, jint);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wsh
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wpkh
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1allow_1mpp
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1build_1and_1sign
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1relative_1expiry
+ (JNIEnv *, jclass, jlong, jint);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wsh
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wpkh
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1allow_1mpp
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedBolt12Invoice_free
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedBolt12Invoice_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedBolt12Invoice_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SignBolt12InvoiceFn_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedBolt12Invoice_tagged_hash
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1verify
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12Invoice_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1hash
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedBolt12Invoice_write
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceError_1read
(JNIEnv *, jclass, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithExplicitPayerIdBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithDerivedPayerIdBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithExplicitPayerIdBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1build
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithExplicitPayerIdBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1chain
+ (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithExplicitPayerIdBuilder_amount_msats
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1amount_1msats
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithExplicitPayerIdBuilder_quantity
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1quantity
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithExplicitPayerIdBuilder_payer_note
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1payer_1note
+ (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1build_1and_1sign
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithDerivedPayerIdBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1chain
+ (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithDerivedPayerIdBuilder_amount_msats
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1amount_1msats
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithDerivedPayerIdBuilder_quantity
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1quantity
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestWithDerivedPayerIdBuilder_payer_note
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1payer_1note
+ (JNIEnv *, jclass, jlong, jstring);
+
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedInvoiceRequest_free
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedInvoiceRequest_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnsignedInvoiceRequest_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SignInvoiceRequestFn_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedInvoiceRequest_tagged_hash
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: VerifiedInvoiceRequest_get_offer_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1offer_1id
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: VerifiedInvoiceRequest_set_offer_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1set_1offer_1id
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: VerifiedInvoiceRequest_get_keys
/*
* Class: org_ldk_impl_bindings
- * Method: InvoiceRequest_signature
- * Signature: (J)[B
+ * Method: InvoiceRequest_respond_with
+ * Signature: (J[J[B)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature
- (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with
+ (JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequest_respond_with_no_std
+ * Signature: (J[J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with_1no_1std
+ (JNIEnv *, jclass, jlong, jlongArray, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequest_signature
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: VerifiedInvoiceRequest_chains
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1payer_1note
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: VerifiedInvoiceRequest_respond_with
+ * Signature: (J[J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with
+ (JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: VerifiedInvoiceRequest_respond_with_no_std
+ * Signature: (J[J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with_1no_1std
+ (JNIEnv *, jclass, jlong, jlongArray, jbyteArray, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: VerifiedInvoiceRequest_respond_using_derived_keys
+ * Signature: (J[J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys
+ (JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: VerifiedInvoiceRequest_respond_using_derived_keys_no_std
+ * Signature: (J[J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys_1no_1std
+ (JNIEnv *, jclass, jlong, jlongArray, jbyteArray, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: UnsignedInvoiceRequest_write
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1write
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_get_payer_id
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1id
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_set_payer_id
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1id
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_get_quantity
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1quantity
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_set_quantity
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1quantity
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_get_payer_note_truncated
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1note_1truncated
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_set_payer_note_truncated
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1note_1truncated
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_new
+ * Signature: ([BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1new
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: InvoiceRequestFields_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1read
+ (JNIEnv *, jclass, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: TaggedHash_free
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TaggedHash_1merkle_1root
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SignError_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignError_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SignError_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SignError_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SignError_signing
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1signing
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SignError_verification
+ * Signature: (Lorg/ldk/enums/Secp256k1Error;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1verification
+ (JNIEnv *, jclass, jobject);
+
/*
* Class: org_ldk_impl_bindings
* Method: Bolt12ParseError_free
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing_1paths
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12SemanticError_unexpected_paths
+ * Signature: ()Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1unexpected_1paths
+ (JNIEnv *, jclass);
+
/*
* Class: org_ldk_impl_bindings
* Method: Bolt12SemanticError_invalid_pay_info
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing_1signature
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_new
+ * Signature: ([B[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1new
+ (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id
+ * Signature: ([BJJJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1deriving_1payer_1id
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_description
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1description
+ (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_absolute_expiry
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1absolute_1expiry
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_issuer
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1issuer
+ (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_path
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1path
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1chain
+ (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_quantity
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1quantity
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_payer_note
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1payer_1note
+ (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RefundMaybeWithDerivedMetadataBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1build
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: Refund_free
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Refund_1payer_1note
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Refund_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Refund_1hash
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: Refund_write
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1pubkey
(JNIEnv *, jclass, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeId_from_slice
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1slice
+ (JNIEnv *, jclass, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: NodeId_as_slice
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1effective_1capacity
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DirectedChannelInfo_source
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1source
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DirectedChannelInfo_target
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1target
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: EffectiveCapacity_free
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeInfo_is_tor_only
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1is_1tor_1only
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: NodeInfo_write
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1value_1satoshis
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DelayedPaymentOutputDescriptor_get_channel_transaction_parameters
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1transaction_1parameters
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DelayedPaymentOutputDescriptor_set_channel_transaction_parameters
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1transaction_1parameters
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: DelayedPaymentOutputDescriptor_new
- * Signature: (J[BSJJ[BJ)J
+ * Signature: (J[BSJJ[BJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new
- (JNIEnv *, jclass, jlong, jbyteArray, jshort, jlong, jlong, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jshort, jlong, jlong, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1channel_1derivation_1parameters
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: HTLCDescriptor_get_commitment_txid
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1commitment_1txid
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: HTLCDescriptor_set_commitment_txid
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1commitment_1txid
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: HTLCDescriptor_get_per_commitment_number
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1counterparty_1sig
(JNIEnv *, jclass, jlong, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: HTLCDescriptor_new
+ * Signature: (J[BJ[BIJJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1new
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jint, jlong, jlong, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: HTLCDescriptor_clone_ptr
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeSigner_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: OutputSpender_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpender_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: SignerProvider_free
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChangeDestinationSource_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: InMemorySigner_free
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1sign_1spendable_1outputs_1psbt
(JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
-/*
- * Class: org_ldk_impl_bindings
- * Method: KeysManager_spend_spendable_outputs
- * Signature: (J[J[J[BIJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs
- (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: KeysManager_as_EntropySource
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: KeysManager_as_OutputSpender
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1OutputSpender
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: KeysManager_as_SignerProvider
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1NodeSigner
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PhantomKeysManager_as_OutputSpender
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1OutputSpender
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: PhantomKeysManager_as_SignerProvider
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1new
(JNIEnv *, jclass, jbyteArray, jlong, jint, jbyteArray);
-/*
- * Class: org_ldk_impl_bindings
- * Method: PhantomKeysManager_spend_spendable_outputs
- * Signature: (J[J[J[BIJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1spend_1spendable_1outputs
- (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint, jlong);
-
/*
* Class: org_ldk_impl_bindings
* Method: PhantomKeysManager_derive_channel_keys
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1get_1phantom_1node_1secret_1key
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RandomBytes_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RandomBytes_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RandomBytes_new
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RandomBytes_1new
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RandomBytes_as_EntropySource
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RandomBytes_1as_1EntropySource
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: EcdsaChannelSigner_free
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Destination_1blinded_1path
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Destination_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Destination_1hash
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Destination_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Destination_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Destination_resolve
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Destination_1resolve
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: SendSuccess_free
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendSuccess_1buffered_1awaiting_1connection
(JNIEnv *, jclass, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SendSuccess_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendSuccess_1hash
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: SendSuccess_eq
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1get_1node_1id_1failed
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SendError_unresolved_introduction_node
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1unresolved_1introduction_1node
+ (JNIEnv *, jclass);
+
/*
* Class: org_ldk_impl_bindings
* Method: SendError_blinded_path_advance_failed
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1advance_1failed
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: SendError_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1hash
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: SendError_eq
/*
* Class: org_ldk_impl_bindings
* Method: PeeledOnion_forward
- * Signature: ([BJ)J
+ * Signature: (JJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward
- (JNIEnv *, jclass, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1receive
(JNIEnv *, jclass, jlong, jbyteArray, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: create_onion_message_resolving_destination
+ * Signature: (JJJJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1onion_1message_1resolving_1destination
+ (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: create_onion_message
- * Signature: (JJJJJ)J
+ * Signature: (JJJJJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1onion_1message
- (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: OnionMessenger_new
- * Signature: (JJJJJJ)J
+ * Signature: (JJJJJJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new
- (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageContents_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NextMessageHop_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NextMessageHop_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NextMessageHop_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NextMessageHop_node_id
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1node_1id
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NextMessageHop_short_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1short_1channel_1id
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NextMessageHop_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1hash
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NextMessageHop_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: BlindedPath_free
/*
* Class: org_ldk_impl_bindings
- * Method: BlindedPath_get_introduction_node_id
- * Signature: (J)[B
+ * Method: BlindedPath_get_introduction_node
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
- * Method: BlindedPath_set_introduction_node_id
- * Signature: (J[B)V
+ * Method: BlindedPath_set_introduction_node
+ * Signature: (JJ)V
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: BlindedPath_new
- * Signature: ([B[B[J)J
+ * Signature: (J[B[J)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jlongArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlongArray);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlindedPath_1eq
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: IntroductionNode_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: IntroductionNode_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: IntroductionNode_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: IntroductionNode_node_id
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1node_1id
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: IntroductionNode_directed_short_channel_id
+ * Signature: (Lorg/ldk/enums/Direction;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1directed_1short_1channel_1id
+ (JNIEnv *, jclass, jobject, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: IntroductionNode_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1hash
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: IntroductionNode_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Direction_clone
+ * Signature: (J)Lorg/ldk/enums/Direction;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Direction_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Direction_node_one
+ * Signature: ()Lorg/ldk/enums/Direction;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Direction_1node_1one
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Direction_node_two
+ * Signature: ()Lorg/ldk/enums/Direction;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Direction_1node_1two
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Direction_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Direction_1hash
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Direction_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Direction_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: NodeIdLookUp_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: EmptyNodeIdLookUp_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: EmptyNodeIdLookUp_new
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1new
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: EmptyNodeIdLookUp_as_NodeIdLookUp
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1as_1NodeIdLookUp
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: BlindedHop_free
/*
* Class: org_ldk_impl_bindings
* Method: BlindedPath_one_hop_for_payment
- * Signature: ([BJJ)J
+ * Signature: ([BJSJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment
- (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong, jshort, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: BlindedPath_new_for_payment
- * Signature: ([J[BJJJ)J
+ * Signature: ([J[BJJSJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment
- (JNIEnv *, jclass, jlongArray, jbyteArray, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jlongArray, jbyteArray, jlong, jlong, jshort, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: BlindedPath_public_introduction_node_id
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1public_1introduction_1node_1id
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1constraints
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ReceiveTlvs_get_payment_context
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1context
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ReceiveTlvs_set_payment_context
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1context
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ReceiveTlvs_new
- * Signature: ([BJ)J
+ * Signature: ([BJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new
- (JNIEnv *, jclass, jbyteArray, jlong);
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentContext_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentContext_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentContext_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentContext_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentContext_unknown
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1unknown
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentContext_bolt12_offer
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1offer
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentContext_bolt12_refund
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1refund
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentContext_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PaymentContext_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnknownPaymentContext_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnknownPaymentContext_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnknownPaymentContext_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnknownPaymentContext_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_get_offer_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1offer_1id
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_set_offer_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1offer_1id
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_get_invoice_request
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1invoice_1request
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_set_invoice_request
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1invoice_1request
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_new
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1new
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12RefundContext_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12RefundContext_new
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1new
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12RefundContext_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone_1ptr
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12RefundContext_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12RefundContext_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1eq
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ForwardTlvs_write
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1read
(JNIEnv *, jclass, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentContext_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PaymentContext_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentContext_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1read
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnknownPaymentContext_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: UnknownPaymentContext_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1read
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12OfferContext_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1read
+ (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12RefundContext_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1write
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt12RefundContext_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1read
+ (JNIEnv *, jclass, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: PaymentPurpose_free
/*
* Class: org_ldk_impl_bindings
- * Method: PaymentPurpose_invoice_payment
+ * Method: PaymentPurpose_bolt11_invoice_payment
* Signature: (J[B)J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1payment
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt11_1invoice_1payment
(JNIEnv *, jclass, jlong, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentPurpose_bolt12_offer_payment
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1offer_1payment
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: PaymentPurpose_bolt12_refund_payment
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1refund_1payment
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: PaymentPurpose_spontaneous_payment
/*
* Class: org_ldk_impl_bindings
* Method: ClaimedHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
*/
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id
(JNIEnv *, jclass, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: ClaimedHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id
- (JNIEnv *, jclass, jlong, jbyteArray);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: ClaimedHTLC_new
- * Signature: ([B[BIJJ)J
+ * Signature: (J[BIJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jint, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jint, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
- * Method: ClosureReason_cooperative_closure
+ * Method: ClosureReason_legacy_cooperative_closure
* Signature: ()J
*/
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1cooperative_1closure
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1legacy_1cooperative_1closure
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ClosureReason_counterparty_initiated_cooperative_closure
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1initiated_1cooperative_1closure
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ClosureReason_locally_initiated_cooperative_closure
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1locally_1initiated_1cooperative_1closure
(JNIEnv *, jclass);
/*
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1funding_1batch_1closure
(JNIEnv *, jclass);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ClosureReason_htlcs_timed_out
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1htlcs_1timed_1out
+ (JNIEnv *, jclass);
+
/*
* Class: org_ldk_impl_bindings
* Method: ClosureReason_eq
/*
* Class: org_ldk_impl_bindings
* Method: HTLCDestination_next_hop_channel
- * Signature: ([B[B)J
+ * Signature: ([BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel
- (JNIEnv *, jclass, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1forward
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: HTLCDestination_invalid_onion
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1onion
+ (JNIEnv *, jclass);
+
/*
* Class: org_ldk_impl_bindings
* Method: HTLCDestination_failed_payment
/*
* Class: org_ldk_impl_bindings
* Method: Event_funding_generation_ready
- * Signature: ([B[BJ[B[B)J
+ * Signature: (J[BJ[B[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jbyteArray);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: Event_payment_forwarded
- * Signature: (JJJZJ)J
+ * Signature: (JJJJJJZJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded
- (JNIEnv *, jclass, jlong, jlong, jlong, jboolean, jlong);
+ (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jboolean, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: Event_channel_pending
- * Signature: ([B[BJ[BJ)J
+ * Signature: (J[BJ[BJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: Event_channel_ready
- * Signature: ([B[B[BJ)J
+ * Signature: (J[B[BJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: Event_channel_closed
- * Signature: ([B[BJ[BJJ)J
+ * Signature: (J[BJ[BJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: Event_discard_funding
- * Signature: ([B[B)J
+ * Signature: (J[B)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding
- (JNIEnv *, jclass, jbyteArray, jbyteArray);
+ (JNIEnv *, jclass, jlong, jbyteArray);
/*
* Class: org_ldk_impl_bindings
* Method: Event_open_channel_request
- * Signature: ([B[BJJJ)J
+ * Signature: (J[BJJJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request
- (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jlong, jlong);
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
* Method: Event_htlchandling_failed
- * Signature: ([BJ)J
+ * Signature: (JJ)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed
- (JNIEnv *, jclass, jbyteArray, jlong);
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
/*
* Class: org_ldk_impl_bindings
* Method: BumpTransactionEvent_channel_close
- * Signature: ([BI[BJJ[J)J
+ * Signature: (J[B[BI[BJJ[J)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close
- (JNIEnv *, jclass, jbyteArray, jint, jbyteArray, jlong, jlong, jlongArray);
+ (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jint, jbyteArray, jlong, jlong, jlongArray);
/*
* Class: org_ldk_impl_bindings
* Method: BumpTransactionEvent_htlcresolution
- * Signature: ([BI[JI)J
+ * Signature: (J[B[BI[JI)J
*/
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution
- (JNIEnv *, jclass, jbyteArray, jint, jlongArray, jint);
+ (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jint, jlongArray, jint);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1recover_1payee_1pub_1key
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: Bolt11Invoice_get_payee_pub_key
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1get_1payee_1pub_1key
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: Bolt11Invoice_expires_at
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKAmount */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKAmount
+#define _Included_org_ldk_impl_bindings_LDKAmount
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKAmount
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAmount_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_AmountZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_AmountZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_AmountZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKCOption_AmountZ
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1AmountZ_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ECDSASignatureZ_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_PaymentContextZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_PaymentContextZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_PaymentContextZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKCOption_PaymentContextZ
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1PaymentContextZ_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_QuantityZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_QuantityZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_QuantityZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKCOption_QuantityZ
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1QuantityZ_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKIntroductionNode */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKIntroductionNode
+#define _Included_org_ldk_impl_bindings_LDKIntroductionNode
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKIntroductionNode
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKIntroductionNode_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKNextMessageHop */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKNextMessageHop
+#define _Included_org_ldk_impl_bindings_LDKNextMessageHop
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKNextMessageHop
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNextMessageHop_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKOutputSpendStatus */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKOutputSpendStatus
+#define _Included_org_ldk_impl_bindings_LDKOutputSpendStatus
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKOutputSpendStatus
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKOutputSpendStatus_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKPaymentContext */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKPaymentContext
+#define _Included_org_ldk_impl_bindings_LDKPaymentContext
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKPaymentContext
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentContext_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKQuantity */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKQuantity
+#define _Included_org_ldk_impl_bindings_LDKQuantity
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKQuantity
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKQuantity_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKSignError */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKSignError
+#define _Included_org_ldk_impl_bindings_LDKSignError
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKSignError
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSignError_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKSpendingDelay */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKSpendingDelay
+#define _Included_org_ldk_impl_bindings_LDKSpendingDelay
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKSpendingDelay
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendingDelay_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif