package org.ldk.enums;
+/**
+ * An enum representing the possible Bitcoin or test networks which we can run on
+ */
public enum LDKNetwork {
LDKNetwork_Bitcoin,
LDKNetwork_Testnet,
package org.ldk.enums;
+/**
+ * Represents an error returned from libsecp256k1 during validation of some secp256k1 data
+ */
public enum LDKSecp256k1Error {
LDKSecp256k1Error_IncorrectSignature,
LDKSecp256k1Error_InvalidMessage,
public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
public static native long LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
+ public static class LDKCOption_u32Z {
+ private LDKCOption_u32Z() {}
+ public final static class Some extends LDKCOption_u32Z {
+ public int some;
+ Some(int some) { this.some = some; }
+ }
+ public final static class None extends LDKCOption_u32Z {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_u32Z.init(); }
+ public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+ public static class LDKCOption_u64Z {
+ private LDKCOption_u64Z() {}
+ public final static class Some extends LDKCOption_u64Z {
+ public long some;
+ Some(long some) { this.some = some; }
+ }
+ public final static class None extends LDKCOption_u64Z {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_u64Z.init(); }
+ public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
public static class LDKMonitorEvent {
private LDKMonitorEvent() {}
public final static class HTLCEvent extends LDKMonitorEvent {
- HTLCEvent() { }
+ public long htlc_event;
+ HTLCEvent(long htlc_event) { this.htlc_event = htlc_event; }
}
public final static class CommitmentTxBroadcasted extends LDKMonitorEvent {
- CommitmentTxBroadcasted() { }
+ public long commitment_tx_broadcasted;
+ CommitmentTxBroadcasted(long commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
}
static native void init();
}
StaticOutput(long outpoint, long output) { this.outpoint = outpoint; this.output = output; }
}
public final static class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
- DelayedPaymentOutput() { }
+ public long delayed_payment_output;
+ DelayedPaymentOutput(long delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
}
public final static class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
- StaticPaymentOutput() { }
+ public long static_payment_output;
+ StaticPaymentOutput(long static_payment_output) { this.static_payment_output = static_payment_output; }
}
static native void init();
}
public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
public static native long LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
+ public static class LDKCOption_C2Tuple_usizeTransactionZZ {
+ private LDKCOption_C2Tuple_usizeTransactionZZ() {}
+ public final static class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
+ public long some;
+ Some(long some) { this.some = some; }
+ }
+ public final static class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
+ public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
public static class LDKAPIError {
private LDKAPIError() {}
public final static class APIMisuseError extends LDKAPIError {
public static class LDKPaymentSendFailure {
private LDKPaymentSendFailure() {}
public final static class ParameterError extends LDKPaymentSendFailure {
- ParameterError() { }
+ public long parameter_error;
+ ParameterError(long parameter_error) { this.parameter_error = parameter_error; }
}
public final static class PathParameterError extends LDKPaymentSendFailure {
- PathParameterError() { }
+ public long[] path_parameter_error;
+ PathParameterError(long[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
}
public final static class AllFailedRetrySafe extends LDKPaymentSendFailure {
- AllFailedRetrySafe() { }
+ public long[] all_failed_retry_safe;
+ AllFailedRetrySafe(long[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
}
public final static class PartialFailure extends LDKPaymentSendFailure {
- PartialFailure() { }
+ public long[] partial_failure;
+ PartialFailure(long[] partial_failure) { this.partial_failure = partial_failure; }
}
static native void init();
}
public static native void Listen_block_disconnected(long this_arg, byte[] header, int height);
public interface LDKFilter {
void register_tx(byte[] txid, byte[] script_pubkey);
- void register_output(long outpoint, byte[] script_pubkey);
+ long register_output(long output);
}
public static native long LDKFilter_new(LDKFilter impl);
// void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
public static native void Filter_register_tx(long this_arg, byte[] txid, byte[] script_pubkey);
- // void Filter_register_output LDKFilter *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
- public static native void Filter_register_output(long this_arg, long outpoint, byte[] script_pubkey);
+ // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
+ public static native long Filter_register_output(long this_arg, long output);
public interface LDKPersist {
long persist_new_channel(long id, long data);
long update_persisted_channel(long id, long update, long data);
public static native long CResult_TxCreationKeysErrorZ_err(LDKSecp256k1Error e);
// void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
public static native void CResult_TxCreationKeysErrorZ_free(long _res);
+ // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
+ public static native long COption_u32Z_some(int o);
+ // struct LDKCOption_u32Z COption_u32Z_none(void);
+ public static native long COption_u32Z_none();
+ // void COption_u32Z_free(struct LDKCOption_u32Z _res);
+ public static native void COption_u32Z_free(long _res);
+ // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
+ public static native long COption_u32Z_clone(long orig);
// struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(long o);
// struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
public static native void CResult_ChannelConfigDecodeErrorZ_free(long _res);
// struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
public static native long CResult_ChannelConfigDecodeErrorZ_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_u64Z_none();
+ // void COption_u64Z_free(struct LDKCOption_u64Z _res);
+ public static native void COption_u64Z_free(long _res);
+ // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
+ public static native long COption_u64Z_clone(long orig);
// struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
public static native long CResult_DirectionalChannelInfoDecodeErrorZ_ok(long o);
// struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
public static native void CResult_TxOutAccessErrorZ_free(long _res);
// struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
public static native long CResult_TxOutAccessErrorZ_clone(long orig);
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
+ public static native long COption_C2Tuple_usizeTransactionZZ_some(long o);
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
+ public static native long COption_C2Tuple_usizeTransactionZZ_none();
+ // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
+ public static native void COption_C2Tuple_usizeTransactionZZ_free(long _res);
// struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
public static native long CResult_NoneAPIErrorZ_ok();
// struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
public static native void Watch_free(long this_ptr);
// void Filter_free(struct LDKFilter this_ptr);
public static native void Filter_free(long this_ptr);
+ // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
+ public static native void WatchedOutput_free(long this_obj);
+ // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+ public static native byte[] WatchedOutput_get_block_hash(long this_ptr);
+ // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ public static native void WatchedOutput_set_block_hash(long this_ptr, byte[] val);
+ // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+ public static native long WatchedOutput_get_outpoint(long this_ptr);
+ // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+ public static native void WatchedOutput_set_outpoint(long this_ptr, long val);
+ // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+ public static native byte[] WatchedOutput_get_script_pubkey(long this_ptr);
+ // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+ public static native void WatchedOutput_set_script_pubkey(long this_ptr, byte[] val);
+ // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
+ public static native long WatchedOutput_new(byte[] block_hash_arg, long outpoint_arg, byte[] script_pubkey_arg);
// void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
public static native void BroadcasterInterface_free(long this_ptr);
// enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
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 LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+ public static native long ChannelDetails_get_short_channel_id(long this_ptr);
+ // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ public static native void ChannelDetails_set_short_channel_id(long this_ptr, long val);
// struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
public static native byte[] ChannelDetails_get_remote_network_id(long this_ptr);
// void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
public static native byte[] HTLCOutputInCommitment_get_payment_hash(long this_ptr);
// void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, byte[] val);
+ // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
+ public static native long HTLCOutputInCommitment_get_transaction_output_index(long this_ptr);
+ // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
+ public static native void HTLCOutputInCommitment_set_transaction_output_index(long this_ptr, long val);
+ // MUST_USE_RES struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_new(bool offered_arg, uint64_t amount_msat_arg, uint32_t cltv_expiry_arg, struct LDKThirtyTwoBytes payment_hash_arg, struct LDKCOption_u32Z transaction_output_index_arg);
+ public static native long HTLCOutputInCommitment_new(boolean offered_arg, long amount_msat_arg, int cltv_expiry_arg, byte[] payment_hash_arg, long transaction_output_index_arg);
// struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
public static native long HTLCOutputInCommitment_clone(long orig);
// struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
public static native short RouteHint_get_cltv_expiry_delta(long this_ptr);
// void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
public static native void RouteHint_set_cltv_expiry_delta(long this_ptr, short val);
+ // struct LDKCOption_u64Z RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+ public static native long RouteHint_get_htlc_minimum_msat(long this_ptr);
+ // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ public static native void RouteHint_set_htlc_minimum_msat(long this_ptr, long val);
+ // struct LDKCOption_u64Z RouteHint_get_htlc_maximum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+ public static native long RouteHint_get_htlc_maximum_msat(long this_ptr);
+ // void RouteHint_set_htlc_maximum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ public static native void RouteHint_set_htlc_maximum_msat(long this_ptr, long val);
+ // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
+ public static native long RouteHint_new(byte[] src_node_id_arg, long short_channel_id_arg, long fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg);
// struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
public static native long RouteHint_clone(long orig);
// struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
public static native long DirectionalChannelInfo_get_htlc_minimum_msat(long this_ptr);
// void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
public static native void DirectionalChannelInfo_set_htlc_minimum_msat(long this_ptr, long val);
+ // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
+ public static native long DirectionalChannelInfo_get_htlc_maximum_msat(long this_ptr);
+ // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ public static native void DirectionalChannelInfo_set_htlc_maximum_msat(long this_ptr, long val);
// struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
public static native long DirectionalChannelInfo_get_fees(long this_ptr);
// void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
public static native long DirectionalChannelInfo_get_last_update_message(long this_ptr);
// void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
public static native void DirectionalChannelInfo_set_last_update_message(long this_ptr, long val);
+ // MUST_USE_RES struct LDKDirectionalChannelInfo DirectionalChannelInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
+ public static native long DirectionalChannelInfo_new(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, long fees_arg, long last_update_message_arg);
// struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
public static native long DirectionalChannelInfo_clone(long orig);
// struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
public static native long ChannelInfo_get_two_to_one(long this_ptr);
// void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
public static native void ChannelInfo_set_two_to_one(long this_ptr, long val);
+ // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+ public static native long ChannelInfo_get_capacity_sats(long this_ptr);
+ // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ public static native void ChannelInfo_set_capacity_sats(long this_ptr, long val);
// struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
public static native long ChannelInfo_get_announcement_message(long this_ptr);
// void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
public static native void ChannelInfo_set_announcement_message(long this_ptr, long val);
+ // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
+ public static native long ChannelInfo_new(long features_arg, byte[] node_one_arg, long one_to_two_arg, byte[] node_two_arg, long two_to_one_arg, long capacity_sats_arg, long announcement_message_arg);
// struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
public static native long ChannelInfo_clone(long orig);
// struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
super(null, ptr);
}
}
+ /**
+ * Creates a copy of the APIError
+ */
+ public APIError clone() {
+ long ret = bindings.APIError_clone(this.ptr);
+ APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
bindings.ChannelDetails_set_channel_id(this.ptr, val);
}
+ /**
+ * The position of the funding transaction in the chain. None if the funding transaction has
+ * not yet been confirmed and the channel fully opened.
+ */
+ public Option_u64Z get_short_channel_id() {
+ long ret = bindings.ChannelDetails_get_short_channel_id(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The position of the funding transaction in the chain. None if the funding transaction has
+ * not yet been confirmed and the channel fully opened.
+ */
+ public void set_short_channel_id(Option_u64Z val) {
+ bindings.ChannelDetails_set_short_channel_id(this.ptr, val.ptr);
+ }
+
/**
* The node_id of our counterparty
*/
this.ptrs_to.add(val);
}
+ /**
+ * The channel capacity as seen on-chain, if chain lookup is available.
+ */
+ public Option_u64Z get_capacity_sats() {
+ long ret = bindings.ChannelInfo_get_capacity_sats(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The channel capacity as seen on-chain, if chain lookup is available.
+ */
+ public void set_capacity_sats(Option_u64Z val) {
+ bindings.ChannelInfo_set_capacity_sats(this.ptr, val.ptr);
+ }
+
/**
* An initial announcement of the channel
* Mostly redundant with the data we store in fields explicitly.
this.ptrs_to.add(val);
}
+ /**
+ * Constructs a new ChannelInfo given each field
+ */
+ public static ChannelInfo constructor_new(ChannelFeatures features_arg, byte[] node_one_arg, DirectionalChannelInfo one_to_two_arg, byte[] node_two_arg, DirectionalChannelInfo two_to_one_arg, Option_u64Z capacity_sats_arg, ChannelAnnouncement announcement_message_arg) {
+ long ret = bindings.ChannelInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, node_one_arg, one_to_two_arg == null ? 0 : one_to_two_arg.ptr & ~1, node_two_arg, two_to_one_arg == null ? 0 : two_to_one_arg.ptr & ~1, capacity_sats_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+ ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(features_arg);
+ ret_hu_conv.ptrs_to.add(one_to_two_arg);
+ ret_hu_conv.ptrs_to.add(two_to_one_arg);
+ ret_hu_conv.ptrs_to.add(announcement_message_arg);
+ return ret_hu_conv;
+ }
+
/**
* Creates a copy of the ChannelInfo
*/
bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
}
+ /**
+ * The maximum value which may be relayed to the next hop via the channel.
+ */
+ public Option_u64Z get_htlc_maximum_msat() {
+ long ret = bindings.DirectionalChannelInfo_get_htlc_maximum_msat(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The maximum value which may be relayed to the next hop via the channel.
+ */
+ public void set_htlc_maximum_msat(Option_u64Z val) {
+ bindings.DirectionalChannelInfo_set_htlc_maximum_msat(this.ptr, val.ptr);
+ }
+
/**
* Fees charged when the channel is used for routing
*/
this.ptrs_to.add(val);
}
+ /**
+ * Constructs a new DirectionalChannelInfo given each field
+ */
+ public static DirectionalChannelInfo constructor_new(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg, RoutingFees fees_arg, ChannelUpdate last_update_message_arg) {
+ long ret = bindings.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg.ptr, fees_arg == null ? 0 : fees_arg.ptr & ~1, last_update_message_arg == null ? 0 : last_update_message_arg.ptr & ~1);
+ DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(fees_arg);
+ ret_hu_conv.ptrs_to.add(last_update_message_arg);
+ return ret_hu_conv;
+ }
+
/**
* Creates a copy of the DirectionalChannelInfo
*/
this.msg = msg_hu_conv;
}
}
+ /**
+ * Creates a copy of the ErrorAction
+ */
+ public ErrorAction clone() {
+ long ret = bindings.ErrorAction_clone(this.ptr);
+ ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
this.outputs = outputs_conv_27_arr;
}
}
+ /**
+ * Creates a copy of the Event
+ */
+ public Event clone() {
+ long ret = bindings.Event_clone(this.ptr);
+ Event ret_hu_conv = Event.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the Event object into a byte array which can be read by Event_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.Event_write(this.ptr);
+ return ret;
+ }
+
}
*/
void register_tx(byte[] txid, byte[] script_pubkey);
/**
- * Registers interest in spends of a transaction output identified by `outpoint` having
- * `script_pubkey` as the spending condition.
+ * Registers interest in spends of a transaction output.
+ *
+ * Optionally, when `output.block_hash` is set, should return any transaction spending the
+ * output that is found in the corresponding block along with its index.
+ *
+ * This return value is useful for Electrum clients in order to supply in-block descendant
+ * transactions which otherwise were not included. This is not necessary for other clients if
+ * such descendant transactions were already included (e.g., when a BIP 157 client provides the
+ * full block).
*/
- void register_output(OutPoint outpoint, byte[] script_pubkey);
+ Option_C2Tuple_usizeTransactionZZ register_output(WatchedOutput output);
}
private static class LDKFilterHolder { Filter held; }
public static Filter new_impl(FilterInterface arg) {
@Override public void register_tx(byte[] txid, byte[] script_pubkey) {
arg.register_tx(txid, script_pubkey);
}
- @Override public void register_output(long outpoint, byte[] script_pubkey) {
- OutPoint outpoint_hu_conv = new OutPoint(null, outpoint);
- arg.register_output(outpoint_hu_conv, script_pubkey);
+ @Override public long register_output(long output) {
+ WatchedOutput output_hu_conv = new WatchedOutput(null, output);
+ output_hu_conv.ptrs_to.add(this);
+ Option_C2Tuple_usizeTransactionZZ ret = arg.register_output(output_hu_conv);
+ long result = ret.ptr;
+ return result;
}
});
return impl_holder.held;
}
/**
- * Registers interest in spends of a transaction output identified by `outpoint` having
- * `script_pubkey` as the spending condition.
+ * Registers interest in spends of a transaction output.
+ *
+ * Optionally, when `output.block_hash` is set, should return any transaction spending the
+ * output that is found in the corresponding block along with its index.
+ *
+ * This return value is useful for Electrum clients in order to supply in-block descendant
+ * transactions which otherwise were not included. This is not necessary for other clients if
+ * such descendant transactions were already included (e.g., when a BIP 157 client provides the
+ * full block).
*/
- public void register_output(OutPoint outpoint, byte[] script_pubkey) {
- bindings.Filter_register_output(this.ptr, outpoint == null ? 0 : outpoint.ptr & ~1, script_pubkey);
- this.ptrs_to.add(outpoint);
+ public Option_C2Tuple_usizeTransactionZZ register_output(byte[] output_block_hash_arg, OutPoint output_outpoint_arg, byte[] output_script_pubkey_arg) {
+ long ret = bindings.Filter_register_output(this.ptr, bindings.WatchedOutput_new(output_block_hash_arg, output_outpoint_arg == null ? 0 : output_outpoint_arg.ptr & ~1, output_script_pubkey_arg));
+ Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ ret_hu_conv.ptrs_to.add(output_outpoint_arg);
+ return ret_hu_conv;
}
}
this.is_permanent = obj.is_permanent;
}
}
+ /**
+ * Creates a copy of the HTLCFailChannelUpdate
+ */
+ public HTLCFailChannelUpdate clone() {
+ long ret = bindings.HTLCFailChannelUpdate_clone(this.ptr);
+ HTLCFailChannelUpdate ret_hu_conv = HTLCFailChannelUpdate.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
}
+ /**
+ * The position within the commitment transactions' outputs. This may be None if the value is
+ * below the dust limit (in which case no output appears in the commitment transaction and the
+ * value is spent to additional transaction fees).
+ */
+ public Option_u32Z get_transaction_output_index() {
+ long ret = bindings.HTLCOutputInCommitment_get_transaction_output_index(this.ptr);
+ Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The position within the commitment transactions' outputs. This may be None if the value is
+ * below the dust limit (in which case no output appears in the commitment transaction and the
+ * value is spent to additional transaction fees).
+ */
+ public void set_transaction_output_index(Option_u32Z val) {
+ bindings.HTLCOutputInCommitment_set_transaction_output_index(this.ptr, val.ptr);
+ }
+
+ /**
+ * Constructs a new HTLCOutputInCommitment given each field
+ */
+ public static HTLCOutputInCommitment constructor_new(boolean offered_arg, long amount_msat_arg, int cltv_expiry_arg, byte[] payment_hash_arg, Option_u32Z transaction_output_index_arg) {
+ long ret = bindings.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg, transaction_output_index_arg.ptr);
+ HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
/**
* Creates a copy of the HTLCOutputInCommitment
*/
this.msg = msg_hu_conv;
}
}
+ /**
+ * Creates a copy of the MessageSendEvent
+ */
+ public MessageSendEvent clone() {
+ long ret = bindings.MessageSendEvent_clone(this.ptr);
+ MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
}
public final static class HTLCEvent extends MonitorEvent {
+ public final HTLCUpdate htlc_event;
private HTLCEvent(long ptr, bindings.LDKMonitorEvent.HTLCEvent obj) {
super(null, ptr);
+ long htlc_event = obj.htlc_event;
+ HTLCUpdate htlc_event_hu_conv = new HTLCUpdate(null, htlc_event);
+ htlc_event_hu_conv.ptrs_to.add(this);
+ this.htlc_event = htlc_event_hu_conv;
}
}
public final static class CommitmentTxBroadcasted extends MonitorEvent {
+ public final OutPoint commitment_tx_broadcasted;
private CommitmentTxBroadcasted(long ptr, bindings.LDKMonitorEvent.CommitmentTxBroadcasted obj) {
super(null, ptr);
+ long commitment_tx_broadcasted = obj.commitment_tx_broadcasted;
+ OutPoint commitment_tx_broadcasted_hu_conv = new OutPoint(null, commitment_tx_broadcasted);
+ commitment_tx_broadcasted_hu_conv.ptrs_to.add(this);
+ this.commitment_tx_broadcasted = commitment_tx_broadcasted_hu_conv;
}
}
+ /**
+ * Creates a copy of the MonitorEvent
+ */
+ public MonitorEvent clone() {
+ long ret = bindings.MonitorEvent_clone(this.ptr);
+ MonitorEvent ret_hu_conv = MonitorEvent.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
this.port = obj.port;
}
}
+ /**
+ * Creates a copy of the NetAddress
+ */
+ public NetAddress clone() {
+ long ret = bindings.NetAddress_clone(this.ptr);
+ NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the NetAddress object into a byte array which can be read by NetAddress_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.NetAddress_write(this.ptr);
+ 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;
+
+
+/**
+ * An enum which can either contain a crate::c_types::derived::C2Tuple_usizeTransactionZ or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_C2Tuple_usizeTransactionZZ extends CommonBase {
+ private Option_C2Tuple_usizeTransactionZZ(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.COption_C2Tuple_usizeTransactionZZ_free(ptr); }
+ }
+ static Option_C2Tuple_usizeTransactionZZ constr_from_ptr(long ptr) {
+ bindings.LDKCOption_C2Tuple_usizeTransactionZZ raw_val = bindings.LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some.class) {
+ return new Some(ptr, (bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None.class) {
+ return new None(ptr, (bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ public final static class Some extends Option_C2Tuple_usizeTransactionZZ {
+ public final TwoTuple<Long, byte[]> some;
+ private Some(long ptr, bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some obj) {
+ super(null, ptr);
+ long some = obj.some;
+ long some_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(some);
+ byte[] some_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(some);
+ TwoTuple<Long, byte[]> some_conv = new TwoTuple<Long, byte[]>(some_a, some_b, () -> {
+ bindings.C2Tuple_usizeTransactionZ_free(some);
+ });
+ this.some = some_conv;
+ }
+ }
+ public final static class None extends Option_C2Tuple_usizeTransactionZZ {
+ private None(long ptr, bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * Constructs a new COption_C2Tuple_usizeTransactionZZ containing a crate::c_types::derived::C2Tuple_usizeTransactionZ
+ */
+ public static Option_C2Tuple_usizeTransactionZZ constructor_some(TwoTuple<Long, byte[]> o) {
+ long ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(bindings.C2Tuple_usizeTransactionZ_new(o.a, o.b));
+ Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_C2Tuple_usizeTransactionZZ containing nothing
+ */
+ public static Option_C2Tuple_usizeTransactionZZ constructor_none() {
+ long ret = bindings.COption_C2Tuple_usizeTransactionZZ_none();
+ Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
+ 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;
+
+
+/**
+ * An enum which can either contain a u32 or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_u32Z extends CommonBase {
+ private Option_u32Z(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.COption_u32Z_free(ptr); }
+ }
+ static Option_u32Z constr_from_ptr(long ptr) {
+ bindings.LDKCOption_u32Z raw_val = bindings.LDKCOption_u32Z_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKCOption_u32Z.Some.class) {
+ return new Some(ptr, (bindings.LDKCOption_u32Z.Some)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKCOption_u32Z.None.class) {
+ return new None(ptr, (bindings.LDKCOption_u32Z.None)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ public final static class Some extends Option_u32Z {
+ public final int some;
+ private Some(long ptr, bindings.LDKCOption_u32Z.Some obj) {
+ super(null, ptr);
+ this.some = obj.some;
+ }
+ }
+ public final static class None extends Option_u32Z {
+ private None(long ptr, bindings.LDKCOption_u32Z.None obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * Constructs a new COption_u32Z containing a u32
+ */
+ public static Option_u32Z constructor_some(int o) {
+ long ret = bindings.COption_u32Z_some(o);
+ Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_u32Z containing nothing
+ */
+ public static Option_u32Z constructor_none() {
+ long ret = bindings.COption_u32Z_none();
+ Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new COption_u32Z which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_u32Z clone() {
+ long ret = bindings.COption_u32Z_clone(this.ptr);
+ Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+ 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;
+
+
+/**
+ * An enum which can either contain a u64 or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_u64Z extends CommonBase {
+ private Option_u64Z(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.COption_u64Z_free(ptr); }
+ }
+ static Option_u64Z constr_from_ptr(long ptr) {
+ bindings.LDKCOption_u64Z raw_val = bindings.LDKCOption_u64Z_ref_from_ptr(ptr);
+ if (raw_val.getClass() == bindings.LDKCOption_u64Z.Some.class) {
+ return new Some(ptr, (bindings.LDKCOption_u64Z.Some)raw_val);
+ }
+ if (raw_val.getClass() == bindings.LDKCOption_u64Z.None.class) {
+ return new None(ptr, (bindings.LDKCOption_u64Z.None)raw_val);
+ }
+ assert false; return null; // Unreachable without extending the (internal) bindings interface
+ }
+
+ public final static class Some extends Option_u64Z {
+ public final long some;
+ private Some(long ptr, bindings.LDKCOption_u64Z.Some obj) {
+ super(null, ptr);
+ this.some = obj.some;
+ }
+ }
+ public final static class None extends Option_u64Z {
+ private None(long ptr, bindings.LDKCOption_u64Z.None obj) {
+ super(null, ptr);
+ }
+ }
+ /**
+ * Constructs a new COption_u64Z containing a u64
+ */
+ public static Option_u64Z constructor_some(long o) {
+ long ret = bindings.COption_u64Z_some(o);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_u64Z containing nothing
+ */
+ public static Option_u64Z constructor_none() {
+ long ret = bindings.COption_u64Z_none();
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new COption_u64Z which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_u64Z clone() {
+ long ret = bindings.COption_u64Z_clone(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+}
}
public final static class ParameterError extends PaymentSendFailure {
+ public final APIError parameter_error;
private ParameterError(long ptr, bindings.LDKPaymentSendFailure.ParameterError obj) {
super(null, ptr);
+ long parameter_error = obj.parameter_error;
+ APIError parameter_error_hu_conv = APIError.constr_from_ptr(parameter_error);
+ parameter_error_hu_conv.ptrs_to.add(this);
+ this.parameter_error = parameter_error_hu_conv;
}
}
public final static class PathParameterError extends PaymentSendFailure {
+ public final Result_NoneAPIErrorZ[] path_parameter_error;
private PathParameterError(long ptr, bindings.LDKPaymentSendFailure.PathParameterError obj) {
super(null, ptr);
+ long[] path_parameter_error = obj.path_parameter_error;
+ Result_NoneAPIErrorZ[] path_parameter_error_conv_22_arr = new Result_NoneAPIErrorZ[path_parameter_error.length];
+ for (int w = 0; w < path_parameter_error.length; w++) {
+ long path_parameter_error_conv_22 = path_parameter_error[w];
+ Result_NoneAPIErrorZ path_parameter_error_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(path_parameter_error_conv_22);
+ path_parameter_error_conv_22_arr[w] = path_parameter_error_conv_22_hu_conv;
+ }
+ this.path_parameter_error = path_parameter_error_conv_22_arr;
}
}
public final static class AllFailedRetrySafe extends PaymentSendFailure {
+ public final APIError[] all_failed_retry_safe;
private AllFailedRetrySafe(long ptr, bindings.LDKPaymentSendFailure.AllFailedRetrySafe obj) {
super(null, ptr);
+ long[] all_failed_retry_safe = obj.all_failed_retry_safe;
+ APIError[] all_failed_retry_safe_conv_10_arr = new APIError[all_failed_retry_safe.length];
+ for (int k = 0; k < all_failed_retry_safe.length; k++) {
+ long all_failed_retry_safe_conv_10 = all_failed_retry_safe[k];
+ APIError all_failed_retry_safe_conv_10_hu_conv = APIError.constr_from_ptr(all_failed_retry_safe_conv_10);
+ all_failed_retry_safe_conv_10_hu_conv.ptrs_to.add(this);
+ all_failed_retry_safe_conv_10_arr[k] = all_failed_retry_safe_conv_10_hu_conv;
+ }
+ this.all_failed_retry_safe = all_failed_retry_safe_conv_10_arr;
}
}
public final static class PartialFailure extends PaymentSendFailure {
+ public final Result_NoneAPIErrorZ[] partial_failure;
private PartialFailure(long ptr, bindings.LDKPaymentSendFailure.PartialFailure obj) {
super(null, ptr);
+ long[] partial_failure = obj.partial_failure;
+ Result_NoneAPIErrorZ[] partial_failure_conv_22_arr = new Result_NoneAPIErrorZ[partial_failure.length];
+ for (int w = 0; w < partial_failure.length; w++) {
+ long partial_failure_conv_22 = partial_failure[w];
+ Result_NoneAPIErrorZ partial_failure_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(partial_failure_conv_22);
+ partial_failure_conv_22_arr[w] = partial_failure_conv_22_hu_conv;
+ }
+ this.partial_failure = partial_failure_conv_22_arr;
}
}
+ /**
+ * Creates a copy of the PaymentSendFailure
+ */
+ public PaymentSendFailure clone() {
+ long ret = bindings.PaymentSendFailure_clone(this.ptr);
+ PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_AcceptChannelDecodeErrorZ_OK(AcceptChannel res) {
- this(null, bindings.CResult_AcceptChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_AcceptChannelDecodeErrorZ_Err extends Result_AcceptChannelDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_AcceptChannelDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_AcceptChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state.
+ */
+ public static Result_AcceptChannelDecodeErrorZ constructor_ok(AcceptChannel o) {
+ long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_AcceptChannelDecodeErrorZ in the error state.
+ */
+ public static Result_AcceptChannelDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_AcceptChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_AcceptChannelDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_AcceptChannelDecodeErrorZ clone() {
+ long ret = bindings.CResult_AcceptChannelDecodeErrorZ_clone(this.ptr);
+ Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_AnnouncementSignaturesDecodeErrorZ_OK(AnnouncementSignatures res) {
- this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_AnnouncementSignaturesDecodeErrorZ_Err extends Result_AnnouncementSignaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_AnnouncementSignaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state.
+ */
+ public static Result_AnnouncementSignaturesDecodeErrorZ constructor_ok(AnnouncementSignatures o) {
+ long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state.
+ */
+ public static Result_AnnouncementSignaturesDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_AnnouncementSignaturesDecodeErrorZ clone() {
+ long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_clone(this.ptr);
+ Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_BuiltCommitmentTransactionDecodeErrorZ_OK(BuiltCommitmentTransaction res) {
- this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_BuiltCommitmentTransactionDecodeErrorZ_Err extends Result_BuiltCommitmentTransactionDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_BuiltCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the success state.
+ */
+ public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_ok(BuiltCommitmentTransaction o) {
+ long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the error state.
+ */
+ public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_BuiltCommitmentTransactionDecodeErrorZ clone() {
+ long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(this.ptr);
+ Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_b_hu_conv.ptrs_to.add(res_conv);
this.res = res_conv;
}
- public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(TwoTuple<byte[], ChannelManager> res) {
- this(null, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(res.a, res.b == null ? 0 : res.b.ptr & ~1)));
- this.ptrs_to.add(res.b);
- // 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, res.b is reset to null and is now a dummy object.
- res.b.ptr = 0;
- }
}
public static final class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err extends Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the success state.
+ */
+ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_ok(TwoTuple<byte[], ChannelManager> o) {
+ long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+ Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o.b);
+ // 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.b is reset to null and is now a dummy object.
+ o.b.ptr = 0;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state.
+ */
+ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_b_hu_conv.ptrs_to.add(res_conv);
this.res = res_conv;
}
- public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(TwoTuple<byte[], ChannelMonitor> res) {
- this(null, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(res.a, res.b == null ? 0 : res.b.ptr & ~1)));
- this.ptrs_to.add(res.b);
- }
}
public static final class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err extends Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the success state.
+ */
+ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_ok(TwoTuple<byte[], ChannelMonitor> o) {
+ long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+ Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o.b);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state.
+ */
+ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
});
this.res = res_conv;
}
- public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(TwoTuple<byte[], byte[][]> res) {
- this(null, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(res.a, res.b)));
- }
}
public static final class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
private Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err() {
- this(null, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err());
- }
}
+
+ /**
+ * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the success state.
+ */
+ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor_ok(TwoTuple<byte[], byte[][]> o) {
+ long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(o.a, o.b));
+ Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the error state.
+ */
+ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor_err() {
+ long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+ Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ clone() {
+ long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(this.ptr);
+ Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
Result_NetAddressu8Z res_hu_conv = Result_NetAddressu8Z.constr_from_ptr(res);
this.res = res_hu_conv;
}
- public Result_CResult_NetAddressu8ZDecodeErrorZ_OK(Result_NetAddressu8Z res) {
- this(null, bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(res != null ? res.ptr : 0));
- }
}
public static final class Result_CResult_NetAddressu8ZDecodeErrorZ_Err extends Result_CResult_NetAddressu8ZDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CResult_NetAddressu8ZDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the success state.
+ */
+ public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor_ok(Result_NetAddressu8Z o) {
+ long ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o != null ? o.ptr : 0);
+ Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the error state.
+ */
+ public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_CResult_NetAddressu8ZDecodeErrorZ clone() {
+ long ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(this.ptr);
+ Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(ptr);
}
- public Result_CVec_CVec_u8ZZNoneZ_OK(byte[][] res) {
- this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(res));
- }
}
public static final class Result_CVec_CVec_u8ZZNoneZ_Err extends Result_CVec_CVec_u8ZZNoneZ {
private Result_CVec_CVec_u8ZZNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_CVec_CVec_u8ZZNoneZ_Err() {
- this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_err());
- }
}
+
+ /**
+ * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the success state.
+ */
+ public static Result_CVec_CVec_u8ZZNoneZ constructor_ok(byte[][] o) {
+ long ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
+ Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the error state.
+ */
+ public static Result_CVec_CVec_u8ZZNoneZ constructor_err() {
+ long ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_err();
+ Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CVec_CVec_u8ZZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_CVec_CVec_u8ZZNoneZ clone() {
+ long ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_clone(this.ptr);
+ Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_CVec_SignatureZNoneZ_get_ok(ptr);
}
- public Result_CVec_SignatureZNoneZ_OK(byte[][] res) {
- this(null, bindings.CResult_CVec_SignatureZNoneZ_ok(res));
- }
}
public static final class Result_CVec_SignatureZNoneZ_Err extends Result_CVec_SignatureZNoneZ {
private Result_CVec_SignatureZNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_CVec_SignatureZNoneZ_Err() {
- this(null, bindings.CResult_CVec_SignatureZNoneZ_err());
- }
}
+
+ /**
+ * Creates a new CResult_CVec_SignatureZNoneZ in the success state.
+ */
+ public static Result_CVec_SignatureZNoneZ constructor_ok(byte[][] o) {
+ long ret = bindings.CResult_CVec_SignatureZNoneZ_ok(o);
+ Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CVec_SignatureZNoneZ in the error state.
+ */
+ public static Result_CVec_SignatureZNoneZ constructor_err() {
+ long ret = bindings.CResult_CVec_SignatureZNoneZ_err();
+ Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CVec_SignatureZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_CVec_SignatureZNoneZ clone() {
+ long ret = bindings.CResult_CVec_SignatureZNoneZ_clone(this.ptr);
+ Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(ptr);
}
- public Result_CVec_u8ZPeerHandleErrorZ_OK(byte[] res) {
- this(null, bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(res));
- }
}
public static final class Result_CVec_u8ZPeerHandleErrorZ_Err extends Result_CVec_u8ZPeerHandleErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CVec_u8ZPeerHandleErrorZ_Err(PeerHandleError err) {
- this(null, bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state.
+ */
+ public static Result_CVec_u8ZPeerHandleErrorZ constructor_ok(byte[] o) {
+ long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(o);
+ Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state.
+ */
+ public static Result_CVec_u8ZPeerHandleErrorZ constructor_err(PeerHandleError e) {
+ long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CVec_u8ZPeerHandleErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_CVec_u8ZPeerHandleErrorZ clone() {
+ long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_clone(this.ptr);
+ Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelAnnouncementDecodeErrorZ_OK(ChannelAnnouncement res) {
- this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelAnnouncementDecodeErrorZ_Err extends Result_ChannelAnnouncementDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelAnnouncementDecodeErrorZ constructor_ok(ChannelAnnouncement o) {
+ long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelAnnouncementDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelAnnouncementDecodeErrorZ clone() {
+ long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_clone(this.ptr);
+ Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelConfigDecodeErrorZ_OK(ChannelConfig res) {
- this(null, bindings.CResult_ChannelConfigDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelConfigDecodeErrorZ_Err extends Result_ChannelConfigDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelConfigDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelConfigDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelConfigDecodeErrorZ constructor_ok(ChannelConfig o) {
+ long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelConfigDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelConfigDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ChannelConfigDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelConfigDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelConfigDecodeErrorZ clone() {
+ long ret = bindings.CResult_ChannelConfigDecodeErrorZ_clone(this.ptr);
+ Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelFeaturesDecodeErrorZ_OK(ChannelFeatures res) {
- this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelFeaturesDecodeErrorZ_Err extends Result_ChannelFeaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelFeaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelFeaturesDecodeErrorZ constructor_ok(ChannelFeatures o) {
+ long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelFeaturesDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelInfoDecodeErrorZ_OK(ChannelInfo res) {
- this(null, bindings.CResult_ChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelInfoDecodeErrorZ_Err extends Result_ChannelInfoDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelInfoDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelInfoDecodeErrorZ constructor_ok(ChannelInfo o) {
+ long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelInfoDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelInfoDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelInfoDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelInfoDecodeErrorZ clone() {
+ long ret = bindings.CResult_ChannelInfoDecodeErrorZ_clone(this.ptr);
+ Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelMonitorUpdateDecodeErrorZ_OK(ChannelMonitorUpdate res) {
- this(null, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelMonitorUpdateDecodeErrorZ_Err extends Result_ChannelMonitorUpdateDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelMonitorUpdateDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_ok(ChannelMonitorUpdate o) {
+ long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelMonitorUpdateDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelMonitorUpdateDecodeErrorZ clone() {
+ long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(this.ptr);
+ Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelPublicKeysDecodeErrorZ_OK(ChannelPublicKeys res) {
- this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelPublicKeysDecodeErrorZ_Err extends Result_ChannelPublicKeysDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelPublicKeysDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelPublicKeysDecodeErrorZ constructor_ok(ChannelPublicKeys o) {
+ long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelPublicKeysDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelPublicKeysDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelPublicKeysDecodeErrorZ clone() {
+ long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_clone(this.ptr);
+ Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelReestablishDecodeErrorZ_OK(ChannelReestablish res) {
- this(null, bindings.CResult_ChannelReestablishDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelReestablishDecodeErrorZ_Err extends Result_ChannelReestablishDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelReestablishDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelReestablishDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelReestablishDecodeErrorZ constructor_ok(ChannelReestablish o) {
+ long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelReestablishDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelReestablishDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelReestablishDecodeErrorZ clone() {
+ long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_clone(this.ptr);
+ Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelTransactionParametersDecodeErrorZ_OK(ChannelTransactionParameters res) {
- this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelTransactionParametersDecodeErrorZ_Err extends Result_ChannelTransactionParametersDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelTransactionParametersDecodeErrorZ constructor_ok(ChannelTransactionParameters o) {
+ long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelTransactionParametersDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelTransactionParametersDecodeErrorZ clone() {
+ long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
+ Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelUpdateDecodeErrorZ_OK(ChannelUpdate res) {
- this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelUpdateDecodeErrorZ_Err extends Result_ChannelUpdateDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelUpdateDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state.
+ */
+ public static Result_ChannelUpdateDecodeErrorZ constructor_ok(ChannelUpdate o) {
+ long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state.
+ */
+ public static Result_ChannelUpdateDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ChannelUpdateDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ChannelUpdateDecodeErrorZ clone() {
+ long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_clone(this.ptr);
+ Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ClosingSignedDecodeErrorZ_OK(ClosingSigned res) {
- this(null, bindings.CResult_ClosingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ClosingSignedDecodeErrorZ_Err extends Result_ClosingSignedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ClosingSignedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ClosingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state.
+ */
+ public static Result_ClosingSignedDecodeErrorZ constructor_ok(ClosingSigned o) {
+ long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ClosingSignedDecodeErrorZ in the error state.
+ */
+ public static Result_ClosingSignedDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ClosingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ClosingSignedDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ClosingSignedDecodeErrorZ clone() {
+ long ret = bindings.CResult_ClosingSignedDecodeErrorZ_clone(this.ptr);
+ Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_CommitmentSignedDecodeErrorZ_OK(CommitmentSigned res) {
- this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_CommitmentSignedDecodeErrorZ_Err extends Result_CommitmentSignedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CommitmentSignedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state.
+ */
+ public static Result_CommitmentSignedDecodeErrorZ constructor_ok(CommitmentSigned o) {
+ long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state.
+ */
+ public static Result_CommitmentSignedDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CommitmentSignedDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_CommitmentSignedDecodeErrorZ clone() {
+ long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_clone(this.ptr);
+ Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_CommitmentTransactionDecodeErrorZ_OK(CommitmentTransaction res) {
- this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_CommitmentTransactionDecodeErrorZ_Err extends Result_CommitmentTransactionDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the success state.
+ */
+ public static Result_CommitmentTransactionDecodeErrorZ constructor_ok(CommitmentTransaction o) {
+ long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the error state.
+ */
+ public static Result_CommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CommitmentTransactionDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_CommitmentTransactionDecodeErrorZ clone() {
+ long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_clone(this.ptr);
+ Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(CounterpartyChannelTransactionParameters res) {
- this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err extends Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the success state.
+ */
+ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_ok(CounterpartyChannelTransactionParameters o) {
+ long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the error state.
+ */
+ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_CounterpartyChannelTransactionParametersDecodeErrorZ clone() {
+ long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
+ Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_DirectionalChannelInfoDecodeErrorZ_OK(DirectionalChannelInfo res) {
- this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_DirectionalChannelInfoDecodeErrorZ_Err extends Result_DirectionalChannelInfoDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_DirectionalChannelInfoDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the success state.
+ */
+ public static Result_DirectionalChannelInfoDecodeErrorZ constructor_ok(DirectionalChannelInfo o) {
+ long ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the error state.
+ */
+ public static Result_DirectionalChannelInfoDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_DirectionalChannelInfoDecodeErrorZ clone() {
+ long ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_clone(this.ptr);
+ Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ErrorMessageDecodeErrorZ_OK(ErrorMessage res) {
- this(null, bindings.CResult_ErrorMessageDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ErrorMessageDecodeErrorZ_Err extends Result_ErrorMessageDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ErrorMessageDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ErrorMessageDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state.
+ */
+ public static Result_ErrorMessageDecodeErrorZ constructor_ok(ErrorMessage o) {
+ long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ErrorMessageDecodeErrorZ in the error state.
+ */
+ public static Result_ErrorMessageDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ErrorMessageDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ErrorMessageDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ErrorMessageDecodeErrorZ clone() {
+ long ret = bindings.CResult_ErrorMessageDecodeErrorZ_clone(this.ptr);
+ Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_FundingCreatedDecodeErrorZ_OK(FundingCreated res) {
- this(null, bindings.CResult_FundingCreatedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_FundingCreatedDecodeErrorZ_Err extends Result_FundingCreatedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_FundingCreatedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_FundingCreatedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state.
+ */
+ public static Result_FundingCreatedDecodeErrorZ constructor_ok(FundingCreated o) {
+ long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_FundingCreatedDecodeErrorZ in the error state.
+ */
+ public static Result_FundingCreatedDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_FundingCreatedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_FundingCreatedDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_FundingCreatedDecodeErrorZ clone() {
+ long ret = bindings.CResult_FundingCreatedDecodeErrorZ_clone(this.ptr);
+ Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_FundingLockedDecodeErrorZ_OK(FundingLocked res) {
- this(null, bindings.CResult_FundingLockedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_FundingLockedDecodeErrorZ_Err extends Result_FundingLockedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_FundingLockedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_FundingLockedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_FundingLockedDecodeErrorZ in the success state.
+ */
+ public static Result_FundingLockedDecodeErrorZ constructor_ok(FundingLocked o) {
+ long ret = bindings.CResult_FundingLockedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_FundingLockedDecodeErrorZ in the error state.
+ */
+ public static Result_FundingLockedDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_FundingLockedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_FundingLockedDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_FundingLockedDecodeErrorZ clone() {
+ long ret = bindings.CResult_FundingLockedDecodeErrorZ_clone(this.ptr);
+ Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_FundingSignedDecodeErrorZ_OK(FundingSigned res) {
- this(null, bindings.CResult_FundingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_FundingSignedDecodeErrorZ_Err extends Result_FundingSignedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_FundingSignedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_FundingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_FundingSignedDecodeErrorZ in the success state.
+ */
+ public static Result_FundingSignedDecodeErrorZ constructor_ok(FundingSigned o) {
+ long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_FundingSignedDecodeErrorZ in the error state.
+ */
+ public static Result_FundingSignedDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_FundingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_FundingSignedDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_FundingSignedDecodeErrorZ clone() {
+ long ret = bindings.CResult_FundingSignedDecodeErrorZ_clone(this.ptr);
+ Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_GossipTimestampFilterDecodeErrorZ_OK(GossipTimestampFilter res) {
- this(null, bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_GossipTimestampFilterDecodeErrorZ_Err extends Result_GossipTimestampFilterDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_GossipTimestampFilterDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state.
+ */
+ public static Result_GossipTimestampFilterDecodeErrorZ constructor_ok(GossipTimestampFilter o) {
+ long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state.
+ */
+ public static Result_GossipTimestampFilterDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_GossipTimestampFilterDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_GossipTimestampFilterDecodeErrorZ clone() {
+ long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_clone(this.ptr);
+ Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_HTLCOutputInCommitmentDecodeErrorZ_OK(HTLCOutputInCommitment res) {
- this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_HTLCOutputInCommitmentDecodeErrorZ_Err extends Result_HTLCOutputInCommitmentDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_HTLCOutputInCommitmentDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the success state.
+ */
+ public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_ok(HTLCOutputInCommitment o) {
+ long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the error state.
+ */
+ public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_HTLCOutputInCommitmentDecodeErrorZ clone() {
+ long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(this.ptr);
+ Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_HTLCUpdateDecodeErrorZ_OK(HTLCUpdate res) {
- this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_HTLCUpdateDecodeErrorZ_Err extends Result_HTLCUpdateDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_HTLCUpdateDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state.
+ */
+ public static Result_HTLCUpdateDecodeErrorZ constructor_ok(HTLCUpdate o) {
+ long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state.
+ */
+ public static Result_HTLCUpdateDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_HTLCUpdateDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_HTLCUpdateDecodeErrorZ clone() {
+ long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_clone(this.ptr);
+ Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_HolderCommitmentTransactionDecodeErrorZ_OK(HolderCommitmentTransaction res) {
- this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_HolderCommitmentTransactionDecodeErrorZ_Err extends Result_HolderCommitmentTransactionDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_HolderCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the success state.
+ */
+ public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_ok(HolderCommitmentTransaction o) {
+ long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the error state.
+ */
+ public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_HolderCommitmentTransactionDecodeErrorZ clone() {
+ long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(this.ptr);
+ Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_InMemorySignerDecodeErrorZ_OK(InMemorySigner res) {
- this(null, bindings.CResult_InMemorySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_InMemorySignerDecodeErrorZ_Err extends Result_InMemorySignerDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_InMemorySignerDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_InMemorySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state.
+ */
+ public static Result_InMemorySignerDecodeErrorZ constructor_ok(InMemorySigner o) {
+ long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state.
+ */
+ public static Result_InMemorySignerDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_InMemorySignerDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InMemorySignerDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_InMemorySignerDecodeErrorZ clone() {
+ long ret = bindings.CResult_InMemorySignerDecodeErrorZ_clone(this.ptr);
+ Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_InitDecodeErrorZ_OK(Init res) {
- this(null, bindings.CResult_InitDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_InitDecodeErrorZ_Err extends Result_InitDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_InitDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_InitDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_InitDecodeErrorZ in the success state.
+ */
+ public static Result_InitDecodeErrorZ constructor_ok(Init o) {
+ long ret = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InitDecodeErrorZ in the error state.
+ */
+ public static Result_InitDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_InitDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InitDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_InitDecodeErrorZ clone() {
+ long ret = bindings.CResult_InitDecodeErrorZ_clone(this.ptr);
+ Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_InitFeaturesDecodeErrorZ_OK(InitFeatures res) {
- this(null, bindings.CResult_InitFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_InitFeaturesDecodeErrorZ_Err extends Result_InitFeaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_InitFeaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_InitFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state.
+ */
+ public static Result_InitFeaturesDecodeErrorZ constructor_ok(InitFeatures o) {
+ long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InitFeaturesDecodeErrorZ in the error state.
+ */
+ public static Result_InitFeaturesDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_InitFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_InvoiceFeaturesDecodeErrorZ_OK(InvoiceFeatures res) {
- this(null, bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_InvoiceFeaturesDecodeErrorZ_Err extends Result_InvoiceFeaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_InvoiceFeaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the success state.
+ */
+ public static Result_InvoiceFeaturesDecodeErrorZ constructor_ok(InvoiceFeatures o) {
+ long ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the error state.
+ */
+ public static Result_InvoiceFeaturesDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NetAddressu8Z_OK(NetAddress res) {
- this(null, bindings.CResult_NetAddressu8Z_ok(res.ptr));
- }
}
public static final class Result_NetAddressu8Z_Err extends Result_NetAddressu8Z {
super(_dummy, ptr);
this.err = bindings.LDKCResult_NetAddressu8Z_get_err(ptr);
}
- public Result_NetAddressu8Z_Err(byte err) {
- this(null, bindings.CResult_NetAddressu8Z_err(err));
- }
}
+
+ /**
+ * Creates a new CResult_NetAddressu8Z in the success state.
+ */
+ public static Result_NetAddressu8Z constructor_ok(NetAddress o) {
+ long ret = bindings.CResult_NetAddressu8Z_ok(o.ptr);
+ Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NetAddressu8Z in the error state.
+ */
+ public static Result_NetAddressu8Z constructor_err(byte e) {
+ long ret = bindings.CResult_NetAddressu8Z_err(e);
+ Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NetAddressu8Z which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NetAddressu8Z clone() {
+ long ret = bindings.CResult_NetAddressu8Z_clone(this.ptr);
+ Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NetworkGraphDecodeErrorZ_OK(NetworkGraph res) {
- this(null, bindings.CResult_NetworkGraphDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NetworkGraphDecodeErrorZ_Err extends Result_NetworkGraphDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NetworkGraphDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NetworkGraphDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_NetworkGraphDecodeErrorZ in the success state.
+ */
+ public static Result_NetworkGraphDecodeErrorZ constructor_ok(NetworkGraph o) {
+ long ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NetworkGraphDecodeErrorZ in the error state.
+ */
+ public static Result_NetworkGraphDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_NetworkGraphDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NetworkGraphDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NetworkGraphDecodeErrorZ clone() {
+ long ret = bindings.CResult_NetworkGraphDecodeErrorZ_clone(this.ptr);
+ Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NodeAnnouncementDecodeErrorZ_OK(NodeAnnouncement res) {
- this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NodeAnnouncementDecodeErrorZ_Err extends Result_NodeAnnouncementDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state.
+ */
+ public static Result_NodeAnnouncementDecodeErrorZ constructor_ok(NodeAnnouncement o) {
+ long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state.
+ */
+ public static Result_NodeAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NodeAnnouncementDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NodeAnnouncementDecodeErrorZ clone() {
+ long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_clone(this.ptr);
+ Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NodeAnnouncementInfoDecodeErrorZ_OK(NodeAnnouncementInfo res) {
- this(null, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NodeAnnouncementInfoDecodeErrorZ_Err extends Result_NodeAnnouncementInfoDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NodeAnnouncementInfoDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state.
+ */
+ public static Result_NodeAnnouncementInfoDecodeErrorZ constructor_ok(NodeAnnouncementInfo o) {
+ long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the error state.
+ */
+ public static Result_NodeAnnouncementInfoDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NodeAnnouncementInfoDecodeErrorZ clone() {
+ long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(this.ptr);
+ Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NodeFeaturesDecodeErrorZ_OK(NodeFeatures res) {
- this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NodeFeaturesDecodeErrorZ_Err extends Result_NodeFeaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NodeFeaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state.
+ */
+ public static Result_NodeFeaturesDecodeErrorZ constructor_ok(NodeFeatures o) {
+ long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NodeFeaturesDecodeErrorZ in the error state.
+ */
+ public static Result_NodeFeaturesDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NodeInfoDecodeErrorZ_OK(NodeInfo res) {
- this(null, bindings.CResult_NodeInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NodeInfoDecodeErrorZ_Err extends Result_NodeInfoDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NodeInfoDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NodeInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_NodeInfoDecodeErrorZ in the success state.
+ */
+ public static Result_NodeInfoDecodeErrorZ constructor_ok(NodeInfo o) {
+ long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NodeInfoDecodeErrorZ in the error state.
+ */
+ public static Result_NodeInfoDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_NodeInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NodeInfoDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NodeInfoDecodeErrorZ clone() {
+ long ret = bindings.CResult_NodeInfoDecodeErrorZ_clone(this.ptr);
+ Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NoneAPIErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NoneAPIErrorZ_OK() {
- this(null, bindings.CResult_NoneAPIErrorZ_ok());
- }
}
public static final class Result_NoneAPIErrorZ_Err extends Result_NoneAPIErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NoneAPIErrorZ_Err(APIError err) {
- this(null, bindings.CResult_NoneAPIErrorZ_err(err.ptr));
- }
}
+
+ /**
+ * Creates a new CResult_NoneAPIErrorZ in the success state.
+ */
+ public static Result_NoneAPIErrorZ constructor_ok() {
+ long ret = bindings.CResult_NoneAPIErrorZ_ok();
+ Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NoneAPIErrorZ in the error state.
+ */
+ public static Result_NoneAPIErrorZ constructor_err(APIError e) {
+ long ret = bindings.CResult_NoneAPIErrorZ_err(e.ptr);
+ Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NoneAPIErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NoneAPIErrorZ clone() {
+ long ret = bindings.CResult_NoneAPIErrorZ_clone(this.ptr);
+ Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NoneChannelMonitorUpdateErrZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NoneChannelMonitorUpdateErrZ_OK() {
- this(null, bindings.CResult_NoneChannelMonitorUpdateErrZ_ok());
- }
}
public static final class Result_NoneChannelMonitorUpdateErrZ_Err extends Result_NoneChannelMonitorUpdateErrZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(ptr);
}
- public Result_NoneChannelMonitorUpdateErrZ_Err(LDKChannelMonitorUpdateErr err) {
- this(null, bindings.CResult_NoneChannelMonitorUpdateErrZ_err(err));
- }
}
+
+ /**
+ * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state.
+ */
+ public static Result_NoneChannelMonitorUpdateErrZ constructor_ok() {
+ long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
+ Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state.
+ */
+ public static Result_NoneChannelMonitorUpdateErrZ constructor_err(LDKChannelMonitorUpdateErr e) {
+ long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e);
+ Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NoneChannelMonitorUpdateErrZ clone() {
+ long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
+ Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NoneLightningErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NoneLightningErrorZ_OK() {
- this(null, bindings.CResult_NoneLightningErrorZ_ok());
- }
}
public static final class Result_NoneLightningErrorZ_Err extends Result_NoneLightningErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NoneLightningErrorZ_Err(LightningError err) {
- this(null, bindings.CResult_NoneLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_NoneLightningErrorZ in the success state.
+ */
+ public static Result_NoneLightningErrorZ constructor_ok() {
+ long ret = bindings.CResult_NoneLightningErrorZ_ok();
+ Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NoneLightningErrorZ in the error state.
+ */
+ public static Result_NoneLightningErrorZ constructor_err(LightningError e) {
+ long ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NoneLightningErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NoneLightningErrorZ clone() {
+ long ret = bindings.CResult_NoneLightningErrorZ_clone(this.ptr);
+ Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NoneMonitorUpdateErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NoneMonitorUpdateErrorZ_OK() {
- this(null, bindings.CResult_NoneMonitorUpdateErrorZ_ok());
- }
}
public static final class Result_NoneMonitorUpdateErrorZ_Err extends Result_NoneMonitorUpdateErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NoneMonitorUpdateErrorZ_Err(MonitorUpdateError err) {
- this(null, bindings.CResult_NoneMonitorUpdateErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_NoneMonitorUpdateErrorZ in the success state.
+ */
+ public static Result_NoneMonitorUpdateErrorZ constructor_ok() {
+ long ret = bindings.CResult_NoneMonitorUpdateErrorZ_ok();
+ Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NoneMonitorUpdateErrorZ in the error state.
+ */
+ public static Result_NoneMonitorUpdateErrorZ constructor_err(MonitorUpdateError e) {
+ long ret = bindings.CResult_NoneMonitorUpdateErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NoneMonitorUpdateErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NoneMonitorUpdateErrorZ clone() {
+ long ret = bindings.CResult_NoneMonitorUpdateErrorZ_clone(this.ptr);
+ Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NonePaymentSendFailureZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NonePaymentSendFailureZ_OK() {
- this(null, bindings.CResult_NonePaymentSendFailureZ_ok());
- }
}
public static final class Result_NonePaymentSendFailureZ_Err extends Result_NonePaymentSendFailureZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NonePaymentSendFailureZ_Err(PaymentSendFailure err) {
- this(null, bindings.CResult_NonePaymentSendFailureZ_err(err.ptr));
- }
}
+
+ /**
+ * Creates a new CResult_NonePaymentSendFailureZ in the success state.
+ */
+ public static Result_NonePaymentSendFailureZ constructor_ok() {
+ long ret = bindings.CResult_NonePaymentSendFailureZ_ok();
+ Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NonePaymentSendFailureZ in the error state.
+ */
+ public static Result_NonePaymentSendFailureZ constructor_err(PaymentSendFailure e) {
+ long ret = bindings.CResult_NonePaymentSendFailureZ_err(e.ptr);
+ Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NonePaymentSendFailureZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NonePaymentSendFailureZ clone() {
+ long ret = bindings.CResult_NonePaymentSendFailureZ_clone(this.ptr);
+ Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NonePeerHandleErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NonePeerHandleErrorZ_OK() {
- this(null, bindings.CResult_NonePeerHandleErrorZ_ok());
- }
}
public static final class Result_NonePeerHandleErrorZ_Err extends Result_NonePeerHandleErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NonePeerHandleErrorZ_Err(PeerHandleError err) {
- this(null, bindings.CResult_NonePeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_NonePeerHandleErrorZ in the success state.
+ */
+ public static Result_NonePeerHandleErrorZ constructor_ok() {
+ long ret = bindings.CResult_NonePeerHandleErrorZ_ok();
+ Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NonePeerHandleErrorZ in the error state.
+ */
+ public static Result_NonePeerHandleErrorZ constructor_err(PeerHandleError e) {
+ long ret = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NonePeerHandleErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NonePeerHandleErrorZ clone() {
+ long ret = bindings.CResult_NonePeerHandleErrorZ_clone(this.ptr);
+ Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_OpenChannelDecodeErrorZ_OK(OpenChannel res) {
- this(null, bindings.CResult_OpenChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_OpenChannelDecodeErrorZ_Err extends Result_OpenChannelDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_OpenChannelDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_OpenChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_OpenChannelDecodeErrorZ in the success state.
+ */
+ public static Result_OpenChannelDecodeErrorZ constructor_ok(OpenChannel o) {
+ long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_OpenChannelDecodeErrorZ in the error state.
+ */
+ public static Result_OpenChannelDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_OpenChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_OpenChannelDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_OpenChannelDecodeErrorZ clone() {
+ long ret = bindings.CResult_OpenChannelDecodeErrorZ_clone(this.ptr);
+ Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_OutPointDecodeErrorZ_OK(OutPoint res) {
- this(null, bindings.CResult_OutPointDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_OutPointDecodeErrorZ_Err extends Result_OutPointDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_OutPointDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_OutPointDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_OutPointDecodeErrorZ in the success state.
+ */
+ public static Result_OutPointDecodeErrorZ constructor_ok(OutPoint o) {
+ long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_OutPointDecodeErrorZ in the error state.
+ */
+ public static Result_OutPointDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_OutPointDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_OutPointDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_OutPointDecodeErrorZ clone() {
+ long ret = bindings.CResult_OutPointDecodeErrorZ_clone(this.ptr);
+ Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_PingDecodeErrorZ_OK(Ping res) {
- this(null, bindings.CResult_PingDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_PingDecodeErrorZ_Err extends Result_PingDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_PingDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_PingDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_PingDecodeErrorZ in the success state.
+ */
+ public static Result_PingDecodeErrorZ constructor_ok(Ping o) {
+ long ret = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_PingDecodeErrorZ in the error state.
+ */
+ public static Result_PingDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_PingDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_PingDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_PingDecodeErrorZ clone() {
+ long ret = bindings.CResult_PingDecodeErrorZ_clone(this.ptr);
+ Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_PongDecodeErrorZ_OK(Pong res) {
- this(null, bindings.CResult_PongDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_PongDecodeErrorZ_Err extends Result_PongDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_PongDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_PongDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_PongDecodeErrorZ in the success state.
+ */
+ public static Result_PongDecodeErrorZ constructor_ok(Pong o) {
+ long ret = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_PongDecodeErrorZ in the error state.
+ */
+ public static Result_PongDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_PongDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_PongDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_PongDecodeErrorZ clone() {
+ long ret = bindings.CResult_PongDecodeErrorZ_clone(this.ptr);
+ Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_PublicKeyErrorZ_get_ok(ptr);
}
- public Result_PublicKeyErrorZ_OK(byte[] res) {
- this(null, bindings.CResult_PublicKeyErrorZ_ok(res));
- }
}
public static final class Result_PublicKeyErrorZ_Err extends Result_PublicKeyErrorZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_PublicKeyErrorZ_get_err(ptr);
}
- public Result_PublicKeyErrorZ_Err(LDKSecp256k1Error err) {
- this(null, bindings.CResult_PublicKeyErrorZ_err(err));
- }
}
+
+ /**
+ * Creates a new CResult_PublicKeyErrorZ in the success state.
+ */
+ public static Result_PublicKeyErrorZ constructor_ok(byte[] o) {
+ long ret = bindings.CResult_PublicKeyErrorZ_ok(o);
+ Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_PublicKeyErrorZ in the error state.
+ */
+ public static Result_PublicKeyErrorZ constructor_err(LDKSecp256k1Error e) {
+ long ret = bindings.CResult_PublicKeyErrorZ_err(e);
+ Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_QueryChannelRangeDecodeErrorZ_OK(QueryChannelRange res) {
- this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_QueryChannelRangeDecodeErrorZ_Err extends Result_QueryChannelRangeDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_QueryChannelRangeDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state.
+ */
+ public static Result_QueryChannelRangeDecodeErrorZ constructor_ok(QueryChannelRange o) {
+ long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state.
+ */
+ public static Result_QueryChannelRangeDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_QueryChannelRangeDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_QueryChannelRangeDecodeErrorZ clone() {
+ long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_clone(this.ptr);
+ Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_QueryShortChannelIdsDecodeErrorZ_OK(QueryShortChannelIds res) {
- this(null, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_QueryShortChannelIdsDecodeErrorZ_Err extends Result_QueryShortChannelIdsDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_QueryShortChannelIdsDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state.
+ */
+ public static Result_QueryShortChannelIdsDecodeErrorZ constructor_ok(QueryShortChannelIds o) {
+ long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state.
+ */
+ public static Result_QueryShortChannelIdsDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_QueryShortChannelIdsDecodeErrorZ clone() {
+ long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_clone(this.ptr);
+ Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ReplyChannelRangeDecodeErrorZ_OK(ReplyChannelRange res) {
- this(null, bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ReplyChannelRangeDecodeErrorZ_Err extends Result_ReplyChannelRangeDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ReplyChannelRangeDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state.
+ */
+ public static Result_ReplyChannelRangeDecodeErrorZ constructor_ok(ReplyChannelRange o) {
+ long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state.
+ */
+ public static Result_ReplyChannelRangeDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ReplyChannelRangeDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ReplyChannelRangeDecodeErrorZ clone() {
+ long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_clone(this.ptr);
+ Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ReplyShortChannelIdsEndDecodeErrorZ_OK(ReplyShortChannelIdsEnd res) {
- this(null, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ReplyShortChannelIdsEndDecodeErrorZ_Err extends Result_ReplyShortChannelIdsEndDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ReplyShortChannelIdsEndDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state.
+ */
+ public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_ok(ReplyShortChannelIdsEnd o) {
+ long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state.
+ */
+ public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ReplyShortChannelIdsEndDecodeErrorZ clone() {
+ long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(this.ptr);
+ Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_RevokeAndACKDecodeErrorZ_OK(RevokeAndACK res) {
- this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_RevokeAndACKDecodeErrorZ_Err extends Result_RevokeAndACKDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_RevokeAndACKDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state.
+ */
+ public static Result_RevokeAndACKDecodeErrorZ constructor_ok(RevokeAndACK o) {
+ long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state.
+ */
+ public static Result_RevokeAndACKDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RevokeAndACKDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_RevokeAndACKDecodeErrorZ clone() {
+ long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_clone(this.ptr);
+ Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_RouteDecodeErrorZ_OK(Route res) {
- this(null, bindings.CResult_RouteDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_RouteDecodeErrorZ_Err extends Result_RouteDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_RouteDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_RouteDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_RouteDecodeErrorZ in the success state.
+ */
+ public static Result_RouteDecodeErrorZ constructor_ok(Route o) {
+ long ret = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RouteDecodeErrorZ in the error state.
+ */
+ public static Result_RouteDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_RouteDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RouteDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_RouteDecodeErrorZ clone() {
+ long ret = bindings.CResult_RouteDecodeErrorZ_clone(this.ptr);
+ Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_RouteLightningErrorZ_OK(Route res) {
- this(null, bindings.CResult_RouteLightningErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_RouteLightningErrorZ_Err extends Result_RouteLightningErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_RouteLightningErrorZ_Err(LightningError err) {
- this(null, bindings.CResult_RouteLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_RouteLightningErrorZ in the success state.
+ */
+ public static Result_RouteLightningErrorZ constructor_ok(Route o) {
+ long ret = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RouteLightningErrorZ in the error state.
+ */
+ public static Result_RouteLightningErrorZ constructor_err(LightningError e) {
+ long ret = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RouteLightningErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_RouteLightningErrorZ clone() {
+ long ret = bindings.CResult_RouteLightningErrorZ_clone(this.ptr);
+ Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_RoutingFeesDecodeErrorZ_OK(RoutingFees res) {
- this(null, bindings.CResult_RoutingFeesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_RoutingFeesDecodeErrorZ_Err extends Result_RoutingFeesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_RoutingFeesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_RoutingFeesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state.
+ */
+ public static Result_RoutingFeesDecodeErrorZ constructor_ok(RoutingFees o) {
+ long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RoutingFeesDecodeErrorZ in the error state.
+ */
+ public static Result_RoutingFeesDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_RoutingFeesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_RoutingFeesDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_RoutingFeesDecodeErrorZ clone() {
+ long ret = bindings.CResult_RoutingFeesDecodeErrorZ_clone(this.ptr);
+ Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_SecretKeyErrorZ_get_ok(ptr);
}
- public Result_SecretKeyErrorZ_OK(byte[] res) {
- this(null, bindings.CResult_SecretKeyErrorZ_ok(res));
- }
}
public static final class Result_SecretKeyErrorZ_Err extends Result_SecretKeyErrorZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_SecretKeyErrorZ_get_err(ptr);
}
- public Result_SecretKeyErrorZ_Err(LDKSecp256k1Error err) {
- this(null, bindings.CResult_SecretKeyErrorZ_err(err));
- }
}
+
+ /**
+ * Creates a new CResult_SecretKeyErrorZ in the success state.
+ */
+ public static Result_SecretKeyErrorZ constructor_ok(byte[] o) {
+ long ret = bindings.CResult_SecretKeyErrorZ_ok(o);
+ Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_SecretKeyErrorZ in the error state.
+ */
+ public static Result_SecretKeyErrorZ constructor_err(LDKSecp256k1Error e) {
+ long ret = bindings.CResult_SecretKeyErrorZ_err(e);
+ Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ShutdownDecodeErrorZ_OK(Shutdown res) {
- this(null, bindings.CResult_ShutdownDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ShutdownDecodeErrorZ_Err extends Result_ShutdownDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ShutdownDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ShutdownDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_ShutdownDecodeErrorZ in the success state.
+ */
+ public static Result_ShutdownDecodeErrorZ constructor_ok(Shutdown o) {
+ long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ShutdownDecodeErrorZ in the error state.
+ */
+ public static Result_ShutdownDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_ShutdownDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_ShutdownDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_ShutdownDecodeErrorZ clone() {
+ long ret = bindings.CResult_ShutdownDecodeErrorZ_clone(this.ptr);
+ Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
ret_hu_conv.ptrs_to.add(this);
this.res = ret_hu_conv;
}
- public Result_SignDecodeErrorZ_OK(Sign res) {
- this(null, bindings.CResult_SignDecodeErrorZ_ok(res == null ? 0 : res.ptr));
- this.ptrs_to.add(res);
- }
}
public static final class Result_SignDecodeErrorZ_Err extends Result_SignDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_SignDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_SignDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_SignDecodeErrorZ in the success state.
+ */
+ public static Result_SignDecodeErrorZ constructor_ok(Sign o) {
+ long ret = bindings.CResult_SignDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_SignDecodeErrorZ in the error state.
+ */
+ public static Result_SignDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_SignDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_SignDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_SignDecodeErrorZ clone() {
+ long ret = bindings.CResult_SignDecodeErrorZ_clone(this.ptr);
+ Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_SignatureNoneZ_get_ok(ptr);
}
- public Result_SignatureNoneZ_OK(byte[] res) {
- this(null, bindings.CResult_SignatureNoneZ_ok(res));
- }
}
public static final class Result_SignatureNoneZ_Err extends Result_SignatureNoneZ {
private Result_SignatureNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_SignatureNoneZ_Err() {
- this(null, bindings.CResult_SignatureNoneZ_err());
- }
}
+
+ /**
+ * Creates a new CResult_SignatureNoneZ in the success state.
+ */
+ public static Result_SignatureNoneZ constructor_ok(byte[] o) {
+ long ret = bindings.CResult_SignatureNoneZ_ok(o);
+ Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_SignatureNoneZ in the error state.
+ */
+ public static Result_SignatureNoneZ constructor_err() {
+ long ret = bindings.CResult_SignatureNoneZ_err();
+ Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_SignatureNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_SignatureNoneZ clone() {
+ long ret = bindings.CResult_SignatureNoneZ_clone(this.ptr);
+ Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_SpendableOutputDescriptorDecodeErrorZ_OK(SpendableOutputDescriptor res) {
- this(null, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(res.ptr));
- }
}
public static final class Result_SpendableOutputDescriptorDecodeErrorZ_Err extends Result_SpendableOutputDescriptorDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_SpendableOutputDescriptorDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the success state.
+ */
+ public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_ok(SpendableOutputDescriptor o) {
+ long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o.ptr);
+ Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state.
+ */
+ public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_SpendableOutputDescriptorDecodeErrorZ clone() {
+ long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(this.ptr);
+ Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_TransactionNoneZ_get_ok(ptr);
}
- public Result_TransactionNoneZ_OK(byte[] res) {
- this(null, bindings.CResult_TransactionNoneZ_ok(res));
- }
}
public static final class Result_TransactionNoneZ_Err extends Result_TransactionNoneZ {
private Result_TransactionNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_TransactionNoneZ_Err() {
- this(null, bindings.CResult_TransactionNoneZ_err());
- }
}
+
+ /**
+ * Creates a new CResult_TransactionNoneZ in the success state.
+ */
+ public static Result_TransactionNoneZ constructor_ok(byte[] o) {
+ long ret = bindings.CResult_TransactionNoneZ_ok(o);
+ Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_TransactionNoneZ in the error state.
+ */
+ public static Result_TransactionNoneZ constructor_err() {
+ long ret = bindings.CResult_TransactionNoneZ_err();
+ Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_TrustedCommitmentTransactionNoneZ_OK(TrustedCommitmentTransaction res) {
- this(null, bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- // 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, res is reset to null and is now a dummy object.
- res.ptr = 0;
- }
}
public static final class Result_TrustedCommitmentTransactionNoneZ_Err extends Result_TrustedCommitmentTransactionNoneZ {
private Result_TrustedCommitmentTransactionNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_TrustedCommitmentTransactionNoneZ_Err() {
- this(null, bindings.CResult_TrustedCommitmentTransactionNoneZ_err());
- }
}
+
+ /**
+ * Creates a new CResult_TrustedCommitmentTransactionNoneZ in the success state.
+ */
+ public static Result_TrustedCommitmentTransactionNoneZ constructor_ok(TrustedCommitmentTransaction o) {
+ long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
+ 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_TrustedCommitmentTransactionNoneZ in the error state.
+ */
+ public static Result_TrustedCommitmentTransactionNoneZ constructor_err() {
+ long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_err();
+ Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_TxCreationKeysDecodeErrorZ_OK(TxCreationKeys res) {
- this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_TxCreationKeysDecodeErrorZ_Err extends Result_TxCreationKeysDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_TxCreationKeysDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_TxCreationKeysDecodeErrorZ in the success state.
+ */
+ public static Result_TxCreationKeysDecodeErrorZ constructor_ok(TxCreationKeys o) {
+ long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_TxCreationKeysDecodeErrorZ in the error state.
+ */
+ public static Result_TxCreationKeysDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_TxCreationKeysDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_TxCreationKeysDecodeErrorZ clone() {
+ long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_clone(this.ptr);
+ Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_TxCreationKeysErrorZ_OK(TxCreationKeys res) {
- this(null, bindings.CResult_TxCreationKeysErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_TxCreationKeysErrorZ_Err extends Result_TxCreationKeysErrorZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_TxCreationKeysErrorZ_get_err(ptr);
}
- public Result_TxCreationKeysErrorZ_Err(LDKSecp256k1Error err) {
- this(null, bindings.CResult_TxCreationKeysErrorZ_err(err));
- }
}
+
+ /**
+ * Creates a new CResult_TxCreationKeysErrorZ in the success state.
+ */
+ public static Result_TxCreationKeysErrorZ constructor_ok(TxCreationKeys o) {
+ long ret = bindings.CResult_TxCreationKeysErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_TxCreationKeysErrorZ in the error state.
+ */
+ public static Result_TxCreationKeysErrorZ constructor_err(LDKSecp256k1Error e) {
+ long ret = bindings.CResult_TxCreationKeysErrorZ_err(e);
+ Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
TxOut res_conv = new TxOut(null, res);
this.res = res_conv;
}
- public Result_TxOutAccessErrorZ_OK(TxOut res) {
- this(null, bindings.CResult_TxOutAccessErrorZ_ok(res.ptr));
- }
}
public static final class Result_TxOutAccessErrorZ_Err extends Result_TxOutAccessErrorZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_TxOutAccessErrorZ_get_err(ptr);
}
- public Result_TxOutAccessErrorZ_Err(LDKAccessError err) {
- this(null, bindings.CResult_TxOutAccessErrorZ_err(err));
- }
}
+
+ /**
+ * Creates a new CResult_TxOutAccessErrorZ in the success state.
+ */
+ public static Result_TxOutAccessErrorZ constructor_ok(TxOut o) {
+ long ret = bindings.CResult_TxOutAccessErrorZ_ok(o.ptr);
+ Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_TxOutAccessErrorZ in the error state.
+ */
+ public static Result_TxOutAccessErrorZ constructor_err(LDKAccessError e) {
+ long ret = bindings.CResult_TxOutAccessErrorZ_err(e);
+ Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_TxOutAccessErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_TxOutAccessErrorZ clone() {
+ long ret = bindings.CResult_TxOutAccessErrorZ_clone(this.ptr);
+ Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UnsignedChannelAnnouncementDecodeErrorZ_OK(UnsignedChannelAnnouncement res) {
- this(null, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UnsignedChannelAnnouncementDecodeErrorZ_Err extends Result_UnsignedChannelAnnouncementDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UnsignedChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state.
+ */
+ public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_ok(UnsignedChannelAnnouncement o) {
+ long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state.
+ */
+ public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UnsignedChannelAnnouncementDecodeErrorZ clone() {
+ long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(this.ptr);
+ Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UnsignedChannelUpdateDecodeErrorZ_OK(UnsignedChannelUpdate res) {
- this(null, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UnsignedChannelUpdateDecodeErrorZ_Err extends Result_UnsignedChannelUpdateDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UnsignedChannelUpdateDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state.
+ */
+ public static Result_UnsignedChannelUpdateDecodeErrorZ constructor_ok(UnsignedChannelUpdate o) {
+ long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state.
+ */
+ public static Result_UnsignedChannelUpdateDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UnsignedChannelUpdateDecodeErrorZ clone() {
+ long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(this.ptr);
+ Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UnsignedNodeAnnouncementDecodeErrorZ_OK(UnsignedNodeAnnouncement res) {
- this(null, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UnsignedNodeAnnouncementDecodeErrorZ_Err extends Result_UnsignedNodeAnnouncementDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UnsignedNodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state.
+ */
+ public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor_ok(UnsignedNodeAnnouncement o) {
+ long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state.
+ */
+ public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UnsignedNodeAnnouncementDecodeErrorZ clone() {
+ long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(this.ptr);
+ Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateAddHTLCDecodeErrorZ_OK(UpdateAddHTLC res) {
- this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateAddHTLCDecodeErrorZ_Err extends Result_UpdateAddHTLCDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateAddHTLCDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state.
+ */
+ public static Result_UpdateAddHTLCDecodeErrorZ constructor_ok(UpdateAddHTLC o) {
+ long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state.
+ */
+ public static Result_UpdateAddHTLCDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateAddHTLCDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UpdateAddHTLCDecodeErrorZ clone() {
+ long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_clone(this.ptr);
+ Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateFailHTLCDecodeErrorZ_OK(UpdateFailHTLC res) {
- this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateFailHTLCDecodeErrorZ_Err extends Result_UpdateFailHTLCDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateFailHTLCDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state.
+ */
+ public static Result_UpdateFailHTLCDecodeErrorZ constructor_ok(UpdateFailHTLC o) {
+ long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state.
+ */
+ public static Result_UpdateFailHTLCDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateFailHTLCDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UpdateFailHTLCDecodeErrorZ clone() {
+ long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_clone(this.ptr);
+ Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(UpdateFailMalformedHTLC res) {
- this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateFailMalformedHTLCDecodeErrorZ_Err extends Result_UpdateFailMalformedHTLCDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state.
+ */
+ public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_ok(UpdateFailMalformedHTLC o) {
+ long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state.
+ */
+ public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UpdateFailMalformedHTLCDecodeErrorZ clone() {
+ long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(this.ptr);
+ Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateFeeDecodeErrorZ_OK(UpdateFee res) {
- this(null, bindings.CResult_UpdateFeeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateFeeDecodeErrorZ_Err extends Result_UpdateFeeDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateFeeDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateFeeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state.
+ */
+ public static Result_UpdateFeeDecodeErrorZ constructor_ok(UpdateFee o) {
+ long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateFeeDecodeErrorZ in the error state.
+ */
+ public static Result_UpdateFeeDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_UpdateFeeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateFeeDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UpdateFeeDecodeErrorZ clone() {
+ long ret = bindings.CResult_UpdateFeeDecodeErrorZ_clone(this.ptr);
+ Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateFulfillHTLCDecodeErrorZ_OK(UpdateFulfillHTLC res) {
- this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateFulfillHTLCDecodeErrorZ_Err extends Result_UpdateFulfillHTLCDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateFulfillHTLCDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state.
+ */
+ public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_ok(UpdateFulfillHTLC o) {
+ long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state.
+ */
+ public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_err(DecodeError e) {
+ long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_UpdateFulfillHTLCDecodeErrorZ clone() {
+ long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(this.ptr);
+ Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_boolLightningErrorZ_get_ok(ptr);
}
- public Result_boolLightningErrorZ_OK(boolean res) {
- this(null, bindings.CResult_boolLightningErrorZ_ok(res));
- }
}
public static final class Result_boolLightningErrorZ_Err extends Result_boolLightningErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_boolLightningErrorZ_Err(LightningError err) {
- this(null, bindings.CResult_boolLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_boolLightningErrorZ in the success state.
+ */
+ public static Result_boolLightningErrorZ constructor_ok(boolean o) {
+ long ret = bindings.CResult_boolLightningErrorZ_ok(o);
+ Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_boolLightningErrorZ in the error state.
+ */
+ public static Result_boolLightningErrorZ constructor_err(LightningError e) {
+ long ret = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_boolLightningErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_boolLightningErrorZ clone() {
+ long ret = bindings.CResult_boolLightningErrorZ_clone(this.ptr);
+ Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_boolPeerHandleErrorZ_get_ok(ptr);
}
- public Result_boolPeerHandleErrorZ_OK(boolean res) {
- this(null, bindings.CResult_boolPeerHandleErrorZ_ok(res));
- }
}
public static final class Result_boolPeerHandleErrorZ_Err extends Result_boolPeerHandleErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_boolPeerHandleErrorZ_Err(PeerHandleError err) {
- this(null, bindings.CResult_boolPeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ /**
+ * Creates a new CResult_boolPeerHandleErrorZ in the success state.
+ */
+ public static Result_boolPeerHandleErrorZ constructor_ok(boolean o) {
+ long ret = bindings.CResult_boolPeerHandleErrorZ_ok(o);
+ Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_boolPeerHandleErrorZ in the error state.
+ */
+ public static Result_boolPeerHandleErrorZ constructor_err(PeerHandleError e) {
+ long ret = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_boolPeerHandleErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_boolPeerHandleErrorZ clone() {
+ long ret = bindings.CResult_boolPeerHandleErrorZ_clone(this.ptr);
+ Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
}
+ /**
+ * The minimum value, in msat, which must be relayed to the next hop.
+ */
+ public Option_u64Z get_htlc_minimum_msat() {
+ long ret = bindings.RouteHint_get_htlc_minimum_msat(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The minimum value, in msat, which must be relayed to the next hop.
+ */
+ public void set_htlc_minimum_msat(Option_u64Z val) {
+ bindings.RouteHint_set_htlc_minimum_msat(this.ptr, val.ptr);
+ }
+
+ /**
+ * The maximum value in msat available for routing with a single HTLC.
+ */
+ public Option_u64Z get_htlc_maximum_msat() {
+ long ret = bindings.RouteHint_get_htlc_maximum_msat(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The maximum value in msat available for routing with a single HTLC.
+ */
+ public void set_htlc_maximum_msat(Option_u64Z val) {
+ bindings.RouteHint_set_htlc_maximum_msat(this.ptr, val.ptr);
+ }
+
+ /**
+ * Constructs a new RouteHint given each field
+ */
+ public static RouteHint constructor_new(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, Option_u64Z htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg) {
+ long ret = bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr);
+ RouteHint ret_hu_conv = new RouteHint(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(fees_arg);
+ return ret_hu_conv;
+ }
+
/**
* Creates a copy of the RouteHint
*/
}
}
public final static class DelayedPaymentOutput extends SpendableOutputDescriptor {
+ public final DelayedPaymentOutputDescriptor delayed_payment_output;
private DelayedPaymentOutput(long ptr, bindings.LDKSpendableOutputDescriptor.DelayedPaymentOutput obj) {
super(null, ptr);
+ long delayed_payment_output = obj.delayed_payment_output;
+ DelayedPaymentOutputDescriptor delayed_payment_output_hu_conv = new DelayedPaymentOutputDescriptor(null, delayed_payment_output);
+ delayed_payment_output_hu_conv.ptrs_to.add(this);
+ this.delayed_payment_output = delayed_payment_output_hu_conv;
}
}
public final static class StaticPaymentOutput extends SpendableOutputDescriptor {
+ public final StaticPaymentOutputDescriptor static_payment_output;
private StaticPaymentOutput(long ptr, bindings.LDKSpendableOutputDescriptor.StaticPaymentOutput obj) {
super(null, ptr);
+ long static_payment_output = obj.static_payment_output;
+ StaticPaymentOutputDescriptor static_payment_output_hu_conv = new StaticPaymentOutputDescriptor(null, static_payment_output);
+ static_payment_output_hu_conv.ptrs_to.add(this);
+ this.static_payment_output = static_payment_output_hu_conv;
}
}
+ /**
+ * Creates a copy of the SpendableOutputDescriptor
+ */
+ public SpendableOutputDescriptor clone() {
+ long ret = bindings.SpendableOutputDescriptor_clone(this.ptr);
+ SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.SpendableOutputDescriptor_write(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Read a SpendableOutputDescriptor from a byte array, created by SpendableOutputDescriptor_write
+ */
+ public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_read(byte[] ser) {
+ long ret = bindings.SpendableOutputDescriptor_read(ser);
+ Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.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;
+
+
+/**
+ * A transaction output watched by a [`ChannelMonitor`] for spends on-chain.
+ *
+ * Used to convey to a [`Filter`] such an output with a given spending condition. Any transaction
+ * spending the output must be given to [`ChannelMonitor::block_connected`] either directly or via
+ * the return value of [`Filter::register_output`].
+ *
+ * If `block_hash` is `Some`, this indicates the output was created in the corresponding block and
+ * may have been spent there. See [`Filter::register_output`] for details.
+ *
+ * [`ChannelMonitor`]: channelmonitor::ChannelMonitor
+ * [`ChannelMonitor::block_connected`]: channelmonitor::ChannelMonitor::block_connected
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class WatchedOutput extends CommonBase {
+ WatchedOutput(Object _dummy, long ptr) { super(ptr); }
+ @Override @SuppressWarnings("deprecation")
+ protected void finalize() throws Throwable {
+ super.finalize();
+ if (ptr != 0) { bindings.WatchedOutput_free(ptr); }
+ }
+
+ /**
+ * First block where the transaction output may have been spent.
+ */
+ public byte[] get_block_hash() {
+ byte[] ret = bindings.WatchedOutput_get_block_hash(this.ptr);
+ return ret;
+ }
+
+ /**
+ * First block where the transaction output may have been spent.
+ */
+ public void set_block_hash(byte[] val) {
+ bindings.WatchedOutput_set_block_hash(this.ptr, val);
+ }
+
+ /**
+ * Outpoint identifying the transaction output.
+ */
+ public OutPoint get_outpoint() {
+ long ret = bindings.WatchedOutput_get_outpoint(this.ptr);
+ OutPoint ret_hu_conv = new OutPoint(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Outpoint identifying the transaction output.
+ */
+ public void set_outpoint(OutPoint val) {
+ bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
+ this.ptrs_to.add(val);
+ }
+
+ /**
+ * Spending condition of the transaction output.
+ */
+ public byte[] get_script_pubkey() {
+ byte[] ret = bindings.WatchedOutput_get_script_pubkey(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Spending condition of the transaction output.
+ */
+ public void set_script_pubkey(byte[] val) {
+ bindings.WatchedOutput_set_script_pubkey(this.ptr, val);
+ }
+
+ /**
+ * Constructs a new WatchedOutput given each field
+ */
+ public static WatchedOutput constructor_new(byte[] block_hash_arg, OutPoint outpoint_arg, byte[] script_pubkey_arg) {
+ long ret = bindings.WatchedOutput_new(block_hash_arg, outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, script_pubkey_arg);
+ WatchedOutput ret_hu_conv = new WatchedOutput(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(outpoint_arg);
+ return ret_hu_conv;
+ }
+
+}
jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
return err_conv;
}
+static jclass LDKCOption_u32Z_Some_class = NULL;
+static jmethodID LDKCOption_u32Z_Some_meth = NULL;
+static jclass LDKCOption_u32Z_None_class = NULL;
+static jmethodID LDKCOption_u32Z_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1u32Z_init (JNIEnv *env, jclass clz) {
+ LDKCOption_u32Z_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_u32Z$Some;"));
+ CHECK(LDKCOption_u32Z_Some_class != NULL);
+ LDKCOption_u32Z_Some_meth = (*env)->GetMethodID(env, LDKCOption_u32Z_Some_class, "<init>", "(I)V");
+ CHECK(LDKCOption_u32Z_Some_meth != NULL);
+ LDKCOption_u32Z_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_u32Z$None;"));
+ CHECK(LDKCOption_u32Z_None_class != NULL);
+ LDKCOption_u32Z_None_meth = (*env)->GetMethodID(env, LDKCOption_u32Z_None_class, "<init>", "()V");
+ CHECK(LDKCOption_u32Z_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1u32Z_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_u32Z *obj = (LDKCOption_u32Z*)(ptr & ~1);
+ switch(obj->tag) {
+ case LDKCOption_u32Z_Some: {
+ return (*env)->NewObject(env, LDKCOption_u32Z_Some_class, LDKCOption_u32Z_Some_meth, obj->some);
+ }
+ case LDKCOption_u32Z_None: {
+ return (*env)->NewObject(env, LDKCOption_u32Z_None_class, LDKCOption_u32Z_None_meth);
+ }
+ default: abort();
+ }
+}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)arg)->result_ok;
}
CHECK(LDKErrorAction_SendErrorMessage_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKErrorAction_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKErrorAction *obj = (LDKErrorAction*)ptr;
+ LDKErrorAction *obj = (LDKErrorAction*)(ptr & ~1);
switch(obj->tag) {
case LDKErrorAction_DisconnectPeer: {
LDKErrorMessage msg_var = obj->disconnect_peer.msg;
CHECK(LDKHTLCFailChannelUpdate_NodeFailure_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCFailChannelUpdate_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)ptr;
+ LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)(ptr & ~1);
switch(obj->tag) {
case LDKHTLCFailChannelUpdate_ChannelUpdateMessage: {
LDKChannelUpdate msg_var = obj->channel_update_message.msg;
CHECK(LDKMessageSendEvent_SendReplyChannelRange_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKMessageSendEvent *obj = (LDKMessageSendEvent*)ptr;
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)(ptr & ~1);
switch(obj->tag) {
case LDKMessageSendEvent_SendAcceptChannel: {
int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
long err_ref = (long)err_var.inner & ~1;
return err_ref;
}
+static jclass LDKCOption_u64Z_Some_class = NULL;
+static jmethodID LDKCOption_u64Z_Some_meth = NULL;
+static jclass LDKCOption_u64Z_None_class = NULL;
+static jmethodID LDKCOption_u64Z_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1u64Z_init (JNIEnv *env, jclass clz) {
+ LDKCOption_u64Z_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_u64Z$Some;"));
+ CHECK(LDKCOption_u64Z_Some_class != NULL);
+ LDKCOption_u64Z_Some_meth = (*env)->GetMethodID(env, LDKCOption_u64Z_Some_class, "<init>", "(J)V");
+ CHECK(LDKCOption_u64Z_Some_meth != NULL);
+ LDKCOption_u64Z_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_u64Z$None;"));
+ CHECK(LDKCOption_u64Z_None_class != NULL);
+ LDKCOption_u64Z_None_meth = (*env)->GetMethodID(env, LDKCOption_u64Z_None_class, "<init>", "()V");
+ CHECK(LDKCOption_u64Z_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1u64Z_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_u64Z *obj = (LDKCOption_u64Z*)(ptr & ~1);
+ switch(obj->tag) {
+ case LDKCOption_u64Z_Some: {
+ return (*env)->NewObject(env, LDKCOption_u64Z_Some_class, LDKCOption_u64Z_Some_meth, obj->some);
+ }
+ case LDKCOption_u64Z_None: {
+ return (*env)->NewObject(env, LDKCOption_u64Z_None_class, LDKCOption_u64Z_None_meth);
+ }
+ default: abort();
+ }
+}
JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
return ((LDKCResult_DirectionalChannelInfoDecodeErrorZ*)arg)->result_ok;
}
CHECK(LDKNetAddress_OnionV3_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNetAddress_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKNetAddress *obj = (LDKNetAddress*)ptr;
+ LDKNetAddress *obj = (LDKNetAddress*)(ptr & ~1);
switch(obj->tag) {
case LDKNetAddress_IPv4: {
int8_tArray addr_arr = (*env)->NewByteArray(env, 4);
LDKMonitorEvent_HTLCEvent_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKMonitorEvent$HTLCEvent;"));
CHECK(LDKMonitorEvent_HTLCEvent_class != NULL);
- LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "<init>", "()V");
+ LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "<init>", "(J)V");
CHECK(LDKMonitorEvent_HTLCEvent_meth != NULL);
LDKMonitorEvent_CommitmentTxBroadcasted_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKMonitorEvent$CommitmentTxBroadcasted;"));
CHECK(LDKMonitorEvent_CommitmentTxBroadcasted_class != NULL);
- LDKMonitorEvent_CommitmentTxBroadcasted_meth = (*env)->GetMethodID(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, "<init>", "()V");
+ LDKMonitorEvent_CommitmentTxBroadcasted_meth = (*env)->GetMethodID(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, "<init>", "(J)V");
CHECK(LDKMonitorEvent_CommitmentTxBroadcasted_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKMonitorEvent *obj = (LDKMonitorEvent*)ptr;
+ LDKMonitorEvent *obj = (LDKMonitorEvent*)(ptr & ~1);
switch(obj->tag) {
case LDKMonitorEvent_HTLCEvent: {
- return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth);
+ LDKHTLCUpdate htlc_event_var = obj->htlc_event;
+ CHECK((((long)htlc_event_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&htlc_event_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long htlc_event_ref = (long)htlc_event_var.inner & ~1;
+ return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth, htlc_event_ref);
}
case LDKMonitorEvent_CommitmentTxBroadcasted: {
- return (*env)->NewObject(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, LDKMonitorEvent_CommitmentTxBroadcasted_meth);
+ LDKOutPoint commitment_tx_broadcasted_var = obj->commitment_tx_broadcasted;
+ CHECK((((long)commitment_tx_broadcasted_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&commitment_tx_broadcasted_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long commitment_tx_broadcasted_ref = (long)commitment_tx_broadcasted_var.inner & ~1;
+ return (*env)->NewObject(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, LDKMonitorEvent_CommitmentTxBroadcasted_meth, commitment_tx_broadcasted_ref);
}
default: abort();
}
LDKSpendableOutputDescriptor_DelayedPaymentOutput_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$DelayedPaymentOutput;"));
CHECK(LDKSpendableOutputDescriptor_DelayedPaymentOutput_class != NULL);
- LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, "<init>", "()V");
+ LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, "<init>", "(J)V");
CHECK(LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth != NULL);
LDKSpendableOutputDescriptor_StaticPaymentOutput_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticPaymentOutput;"));
CHECK(LDKSpendableOutputDescriptor_StaticPaymentOutput_class != NULL);
- LDKSpendableOutputDescriptor_StaticPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, "<init>", "()V");
+ LDKSpendableOutputDescriptor_StaticPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, "<init>", "(J)V");
CHECK(LDKSpendableOutputDescriptor_StaticPaymentOutput_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
+ LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)(ptr & ~1);
switch(obj->tag) {
case LDKSpendableOutputDescriptor_StaticOutput: {
LDKOutPoint outpoint_var = obj->static_output.outpoint;
return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutput_class, LDKSpendableOutputDescriptor_StaticOutput_meth, outpoint_ref, (long)output_ref);
}
case LDKSpendableOutputDescriptor_DelayedPaymentOutput: {
- return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth);
+ LDKDelayedPaymentOutputDescriptor delayed_payment_output_var = obj->delayed_payment_output;
+ CHECK((((long)delayed_payment_output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&delayed_payment_output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long delayed_payment_output_ref = (long)delayed_payment_output_var.inner & ~1;
+ return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth, delayed_payment_output_ref);
}
case LDKSpendableOutputDescriptor_StaticPaymentOutput: {
- return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, LDKSpendableOutputDescriptor_StaticPaymentOutput_meth);
+ LDKStaticPaymentOutputDescriptor static_payment_output_var = obj->static_payment_output;
+ CHECK((((long)static_payment_output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&static_payment_output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long static_payment_output_ref = (long)static_payment_output_var.inner & ~1;
+ return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, LDKSpendableOutputDescriptor_StaticPaymentOutput_meth, static_payment_output_ref);
}
default: abort();
}
CHECK(LDKEvent_SpendableOutputs_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKEvent *obj = (LDKEvent*)ptr;
+ LDKEvent *obj = (LDKEvent*)(ptr & ~1);
switch(obj->tag) {
case LDKEvent_FundingGenerationReady: {
int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
jclass err_conv = LDKAccessError_to_java(env, (*val->contents.err));
return err_conv;
}
+static jclass LDKCOption_C2Tuple_usizeTransactionZZ_Some_class = NULL;
+static jmethodID LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth = NULL;
+static jclass LDKCOption_C2Tuple_usizeTransactionZZ_None_class = NULL;
+static jmethodID LDKCOption_C2Tuple_usizeTransactionZZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1C2Tuple_1usizeTransactionZZ_init (JNIEnv *env, jclass clz) {
+ LDKCOption_C2Tuple_usizeTransactionZZ_Some_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_C2Tuple_usizeTransactionZZ$Some;"));
+ CHECK(LDKCOption_C2Tuple_usizeTransactionZZ_Some_class != NULL);
+ LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, "<init>", "(J)V");
+ CHECK(LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth != NULL);
+ LDKCOption_C2Tuple_usizeTransactionZZ_None_class =
+ (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKCOption_C2Tuple_usizeTransactionZZ$None;"));
+ CHECK(LDKCOption_C2Tuple_usizeTransactionZZ_None_class != NULL);
+ LDKCOption_C2Tuple_usizeTransactionZZ_None_meth = (*env)->GetMethodID(env, LDKCOption_C2Tuple_usizeTransactionZZ_None_class, "<init>", "()V");
+ CHECK(LDKCOption_C2Tuple_usizeTransactionZZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1C2Tuple_1usizeTransactionZZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+ LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
+ long some_ref = (long)(&obj->some) | 1;
+ return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_Some_class, LDKCOption_C2Tuple_usizeTransactionZZ_Some_meth, some_ref);
+ }
+ case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
+ return (*env)->NewObject(env, LDKCOption_C2Tuple_usizeTransactionZZ_None_class, LDKCOption_C2Tuple_usizeTransactionZZ_None_meth);
+ }
+ default: abort();
+ }
+}
static jclass LDKAPIError_APIMisuseError_class = NULL;
static jmethodID LDKAPIError_APIMisuseError_meth = NULL;
static jclass LDKAPIError_FeeRateTooHigh_class = NULL;
CHECK(LDKAPIError_MonitorUpdateFailed_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)ptr;
+ LDKAPIError *obj = (LDKAPIError*)(ptr & ~1);
switch(obj->tag) {
case LDKAPIError_APIMisuseError: {
LDKCVec_u8Z err_var = obj->api_misuse_error.err;
LDKPaymentSendFailure_ParameterError_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$ParameterError;"));
CHECK(LDKPaymentSendFailure_ParameterError_class != NULL);
- LDKPaymentSendFailure_ParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_ParameterError_class, "<init>", "()V");
+ LDKPaymentSendFailure_ParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_ParameterError_class, "<init>", "(J)V");
CHECK(LDKPaymentSendFailure_ParameterError_meth != NULL);
LDKPaymentSendFailure_PathParameterError_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$PathParameterError;"));
CHECK(LDKPaymentSendFailure_PathParameterError_class != NULL);
- LDKPaymentSendFailure_PathParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PathParameterError_class, "<init>", "()V");
+ LDKPaymentSendFailure_PathParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PathParameterError_class, "<init>", "([J)V");
CHECK(LDKPaymentSendFailure_PathParameterError_meth != NULL);
LDKPaymentSendFailure_AllFailedRetrySafe_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$AllFailedRetrySafe;"));
CHECK(LDKPaymentSendFailure_AllFailedRetrySafe_class != NULL);
- LDKPaymentSendFailure_AllFailedRetrySafe_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, "<init>", "()V");
+ LDKPaymentSendFailure_AllFailedRetrySafe_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, "<init>", "([J)V");
CHECK(LDKPaymentSendFailure_AllFailedRetrySafe_meth != NULL);
LDKPaymentSendFailure_PartialFailure_class =
(*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$PartialFailure;"));
CHECK(LDKPaymentSendFailure_PartialFailure_class != NULL);
- LDKPaymentSendFailure_PartialFailure_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PartialFailure_class, "<init>", "()V");
+ LDKPaymentSendFailure_PartialFailure_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PartialFailure_class, "<init>", "([J)V");
CHECK(LDKPaymentSendFailure_PartialFailure_meth != NULL);
}
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentSendFailure_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)ptr;
+ LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)(ptr & ~1);
switch(obj->tag) {
case LDKPaymentSendFailure_ParameterError: {
- return (*env)->NewObject(env, LDKPaymentSendFailure_ParameterError_class, LDKPaymentSendFailure_ParameterError_meth);
+ long parameter_error_ref = ((long)&obj->parameter_error) | 1;
+ return (*env)->NewObject(env, LDKPaymentSendFailure_ParameterError_class, LDKPaymentSendFailure_ParameterError_meth, parameter_error_ref);
}
case LDKPaymentSendFailure_PathParameterError: {
- return (*env)->NewObject(env, LDKPaymentSendFailure_PathParameterError_class, LDKPaymentSendFailure_PathParameterError_meth);
+ LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
+ int64_tArray path_parameter_error_arr = (*env)->NewLongArray(env, path_parameter_error_var.datalen);
+ int64_t *path_parameter_error_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, path_parameter_error_arr, NULL);
+ for (size_t w = 0; w < path_parameter_error_var.datalen; w++) {
+ LDKCResult_NoneAPIErrorZ* path_parameter_error_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *path_parameter_error_conv_22_conv = path_parameter_error_var.data[w];
+ *path_parameter_error_conv_22_conv = CResult_NoneAPIErrorZ_clone(path_parameter_error_conv_22_conv);
+ path_parameter_error_arr_ptr[w] = (long)path_parameter_error_conv_22_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, path_parameter_error_arr, path_parameter_error_arr_ptr, 0);
+ return (*env)->NewObject(env, LDKPaymentSendFailure_PathParameterError_class, LDKPaymentSendFailure_PathParameterError_meth, path_parameter_error_arr);
}
case LDKPaymentSendFailure_AllFailedRetrySafe: {
- return (*env)->NewObject(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, LDKPaymentSendFailure_AllFailedRetrySafe_meth);
+ LDKCVec_APIErrorZ all_failed_retry_safe_var = obj->all_failed_retry_safe;
+ int64_tArray all_failed_retry_safe_arr = (*env)->NewLongArray(env, all_failed_retry_safe_var.datalen);
+ int64_t *all_failed_retry_safe_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, all_failed_retry_safe_arr, NULL);
+ for (size_t k = 0; k < all_failed_retry_safe_var.datalen; k++) {
+ long all_failed_retry_safe_conv_10_ref = ((long)&all_failed_retry_safe_var.data[k]) | 1;
+ all_failed_retry_safe_arr_ptr[k] = all_failed_retry_safe_conv_10_ref;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, all_failed_retry_safe_arr, all_failed_retry_safe_arr_ptr, 0);
+ return (*env)->NewObject(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, LDKPaymentSendFailure_AllFailedRetrySafe_meth, all_failed_retry_safe_arr);
}
case LDKPaymentSendFailure_PartialFailure: {
- return (*env)->NewObject(env, LDKPaymentSendFailure_PartialFailure_class, LDKPaymentSendFailure_PartialFailure_meth);
+ LDKCVec_CResult_NoneAPIErrorZZ partial_failure_var = obj->partial_failure;
+ int64_tArray partial_failure_arr = (*env)->NewLongArray(env, partial_failure_var.datalen);
+ int64_t *partial_failure_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, partial_failure_arr, NULL);
+ for (size_t w = 0; w < partial_failure_var.datalen; w++) {
+ LDKCResult_NoneAPIErrorZ* partial_failure_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *partial_failure_conv_22_conv = partial_failure_var.data[w];
+ *partial_failure_conv_22_conv = CResult_NoneAPIErrorZ_clone(partial_failure_conv_22_conv);
+ partial_failure_arr_ptr[w] = (long)partial_failure_conv_22_conv;
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, partial_failure_arr, partial_failure_arr_ptr, 0);
+ return (*env)->NewObject(env, LDKPaymentSendFailure_PartialFailure_class, LDKPaymentSendFailure_PartialFailure_meth, partial_failure_arr);
}
default: abort();
}
CHECK(obj != NULL);
return (*env)->CallVoidMethod(env, obj, j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
}
-void register_output_LDKFilter_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
+LDKCOption_C2Tuple_usizeTransactionZZ register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
JNIEnv *env;
DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
- LDKOutPoint outpoint_var = *outpoint;
- outpoint_var = OutPoint_clone(outpoint);
- CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- long outpoint_ref = (long)outpoint_var.inner;
- if (outpoint_var.is_owned) {
- outpoint_ref |= 1;
+ LDKWatchedOutput output_var = output;
+ CHECK((((long)output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long output_ref = (long)output_var.inner;
+ if (output_var.is_owned) {
+ output_ref |= 1;
}
- LDKu8slice script_pubkey_var = script_pubkey;
- int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
- (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
jobject obj = (*env)->NewLocalRef(env, j_calls->o);
CHECK(obj != NULL);
- return (*env)->CallVoidMethod(env, obj, j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
+ LDKCOption_C2Tuple_usizeTransactionZZ* ret = (LDKCOption_C2Tuple_usizeTransactionZZ*)(*env)->CallLongMethod(env, obj, j_calls->register_output_meth, output_ref);
+ LDKCOption_C2Tuple_usizeTransactionZZ ret_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(((uint64_t)ret) & ~1);
+ // Warning: we may need a move here but no clone is available for LDKCOption_C2Tuple_usizeTransactionZZ
+ return ret_conv;
}
static void* LDKFilter_JCalls_clone(const void* this_arg) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
calls->o = (*env)->NewWeakGlobalRef(env, o);
calls->register_tx_meth = (*env)->GetMethodID(env, c, "register_tx", "([B[B)V");
CHECK(calls->register_tx_meth != NULL);
- calls->register_output_meth = (*env)->GetMethodID(env, c, "register_output", "(J[B)V");
+ calls->register_output_meth = (*env)->GetMethodID(env, c, "register_output", "(J)J");
CHECK(calls->register_output_meth != NULL);
LDKFilter ret = {
(*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output(JNIEnv *env, jclass clz, int64_t this_arg, int64_t outpoint, int8_tArray script_pubkey) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output(JNIEnv *env, jclass clz, int64_t this_arg, int64_t output) {
LDKFilter* this_arg_conv = (LDKFilter*)(((uint64_t)this_arg) & ~1);
- LDKOutPoint outpoint_conv;
- outpoint_conv.inner = (void*)(outpoint & (~1));
- outpoint_conv.is_owned = false;
- LDKu8slice script_pubkey_ref;
- script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
- script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
- (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
- (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
+ LDKWatchedOutput output_conv;
+ output_conv.inner = (void*)(output & (~1));
+ output_conv.is_owned = (output & 1) || (output == 0);
+ // Warning: we need a move here but no clone is available for LDKWatchedOutput
+ LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+ *ret_copy = (this_arg_conv->register_output)(this_arg_conv->this_arg, output_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
}
typedef struct LDKPersist_JCalls {
CResult_TxCreationKeysErrorZ_free(_res_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1some(JNIEnv *env, jclass clz, int32_t o) {
+ LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = COption_u32Z_some(o);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = COption_u32Z_none();
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if ((_res & 1) != 0) return;
+ LDKCOption_u32Z _res_conv = *(LDKCOption_u32Z*)(((uint64_t)_res) & ~1);
+ FREE((void*)_res);
+ COption_u32Z_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_u32Z* orig_conv = (LDKCOption_u32Z*)orig;
+ LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = COption_u32Z_clone(orig_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKHTLCOutputInCommitment o_conv;
o_conv.inner = (void*)(o & (~1));
return (long)ret_conv;
}
+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);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = COption_u64Z_none();
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if ((_res & 1) != 0) return;
+ LDKCOption_u64Z _res_conv = *(LDKCOption_u64Z*)(((uint64_t)_res) & ~1);
+ FREE((void*)_res);
+ COption_u64Z_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+ LDKCOption_u64Z* orig_conv = (LDKCOption_u64Z*)orig;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = COption_u64Z_clone(orig_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
LDKDirectionalChannelInfo o_conv;
o_conv.inner = (void*)(o & (~1));
return (long)ret_conv;
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+ LDKC2Tuple_usizeTransactionZ o_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)o) & ~1);
+ FREE((void*)o);
+ LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+ *ret_copy = COption_C2Tuple_usizeTransactionZZ_some(o_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1none(JNIEnv *env, jclass clz) {
+ LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+ *ret_copy = COption_C2Tuple_usizeTransactionZZ_none();
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+ if ((_res & 1) != 0) return;
+ LDKCOption_C2Tuple_usizeTransactionZZ _res_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(((uint64_t)_res) & ~1);
+ FREE((void*)_res);
+ COption_C2Tuple_usizeTransactionZZ_free(_res_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv *env, jclass clz) {
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
*ret_conv = CResult_NoneAPIErrorZ_ok();
Filter_free(this_ptr_conv);
}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+ LDKWatchedOutput this_obj_conv;
+ this_obj_conv.inner = (void*)(this_obj & (~1));
+ this_obj_conv.is_owned = (this_obj & 1) || (this_obj == 0);
+ WatchedOutput_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+ (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, WatchedOutput_get_block_hash(&this_ptr_conv).data);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK((*env)->GetArrayLength(env, val) == 32);
+ (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+ WatchedOutput_set_block_hash(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1outpoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKOutPoint ret_var = WatchedOutput_get_outpoint(&this_ptr_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1outpoint(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKOutPoint val_conv;
+ val_conv.inner = (void*)(val & (~1));
+ val_conv.is_owned = (val & 1) || (val == 0);
+ val_conv = OutPoint_clone(&val_conv);
+ WatchedOutput_set_outpoint(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1script_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKu8slice ret_var = WatchedOutput_get_script_pubkey(&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);
+ return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1script_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ 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);
+ WatchedOutput_set_script_pubkey(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1new(JNIEnv *env, jclass clz, int8_tArray block_hash_arg, int64_t outpoint_arg, int8_tArray script_pubkey_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);
+ LDKOutPoint outpoint_arg_conv;
+ outpoint_arg_conv.inner = (void*)(outpoint_arg & (~1));
+ outpoint_arg_conv.is_owned = (outpoint_arg & 1) || (outpoint_arg == 0);
+ outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+ LDKCVec_u8Z script_pubkey_arg_ref;
+ script_pubkey_arg_ref.datalen = (*env)->GetArrayLength(env, script_pubkey_arg);
+ script_pubkey_arg_ref.data = MALLOC(script_pubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+ (*env)->GetByteArrayRegion(env, script_pubkey_arg, 0, script_pubkey_arg_ref.datalen, script_pubkey_arg_ref.data);
+ LDKWatchedOutput ret_var = WatchedOutput_new(block_hash_arg_ref, outpoint_arg_conv, script_pubkey_arg_ref);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
if ((this_ptr & 1) != 0) return;
LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)(((uint64_t)this_ptr) & ~1);
ChannelDetails_set_channel_id(&this_ptr_conv, val_ref);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKChannelDetails this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = ChannelDetails_get_short_channel_id(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKChannelDetails this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ ChannelDetails_set_short_channel_id(&this_ptr_conv, val_conv);
+}
+
JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1remote_1network_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKChannelDetails this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
HTLCOutputInCommitment_set_payment_hash(&this_ptr_conv, val_ref);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1transaction_1output_1index(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKHTLCOutputInCommitment this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = HTLCOutputInCommitment_get_transaction_output_index(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1transaction_1output_1index(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKHTLCOutputInCommitment this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u32Z val_conv = *(LDKCOption_u32Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ HTLCOutputInCommitment_set_transaction_output_index(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1new(JNIEnv *env, jclass clz, jboolean offered_arg, int64_t amount_msat_arg, int32_t cltv_expiry_arg, int8_tArray payment_hash_arg, int64_t transaction_output_index_arg) {
+ 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);
+ LDKCOption_u32Z transaction_output_index_arg_conv = *(LDKCOption_u32Z*)(((uint64_t)transaction_output_index_arg) & ~1);
+ FREE((void*)transaction_output_index_arg);
+ LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg_ref, transaction_output_index_arg_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKHTLCOutputInCommitment orig_conv;
orig_conv.inner = (void*)(orig & (~1));
RouteHint_set_cltv_expiry_delta(&this_ptr_conv, val);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKRouteHint this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = RouteHint_get_htlc_minimum_msat(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKRouteHint this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ RouteHint_set_htlc_minimum_msat(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1maximum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKRouteHint this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = RouteHint_get_htlc_maximum_msat(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1maximum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKRouteHint this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ RouteHint_set_htlc_maximum_msat(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1new(JNIEnv *env, jclass clz, int8_tArray src_node_id_arg, int64_t short_channel_id_arg, int64_t fees_arg, int16_t cltv_expiry_delta_arg, int64_t htlc_minimum_msat_arg, int64_t htlc_maximum_msat_arg) {
+ LDKPublicKey src_node_id_arg_ref;
+ CHECK((*env)->GetArrayLength(env, src_node_id_arg) == 33);
+ (*env)->GetByteArrayRegion(env, src_node_id_arg, 0, 33, src_node_id_arg_ref.compressed_form);
+ LDKRoutingFees fees_arg_conv;
+ fees_arg_conv.inner = (void*)(fees_arg & (~1));
+ fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
+ fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
+ LDKCOption_u64Z htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_minimum_msat_arg) & ~1);
+ FREE((void*)htlc_minimum_msat_arg);
+ LDKCOption_u64Z htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_maximum_msat_arg) & ~1);
+ FREE((void*)htlc_maximum_msat_arg);
+ LDKRouteHint ret_var = RouteHint_new(src_node_id_arg_ref, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg_conv, htlc_maximum_msat_arg_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKRouteHint orig_conv;
orig_conv.inner = (void*)(orig & (~1));
DirectionalChannelInfo_set_htlc_minimum_msat(&this_ptr_conv, val);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1htlc_1maximum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKDirectionalChannelInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = DirectionalChannelInfo_get_htlc_maximum_msat(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1maximum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKDirectionalChannelInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ DirectionalChannelInfo_set_htlc_maximum_msat(&this_ptr_conv, val_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1fees(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKDirectionalChannelInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
DirectionalChannelInfo_set_last_update_message(&this_ptr_conv, val_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1new(JNIEnv *env, jclass clz, int32_t last_update_arg, jboolean enabled_arg, int16_t cltv_expiry_delta_arg, int64_t htlc_minimum_msat_arg, int64_t htlc_maximum_msat_arg, int64_t fees_arg, int64_t last_update_message_arg) {
+ LDKCOption_u64Z htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_maximum_msat_arg) & ~1);
+ FREE((void*)htlc_maximum_msat_arg);
+ LDKRoutingFees fees_arg_conv;
+ fees_arg_conv.inner = (void*)(fees_arg & (~1));
+ fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
+ fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
+ LDKChannelUpdate last_update_message_arg_conv;
+ last_update_message_arg_conv.inner = (void*)(last_update_message_arg & (~1));
+ last_update_message_arg_conv.is_owned = (last_update_message_arg & 1) || (last_update_message_arg == 0);
+ last_update_message_arg_conv = ChannelUpdate_clone(&last_update_message_arg_conv);
+ LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg_conv, fees_arg_conv, last_update_message_arg_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKDirectionalChannelInfo orig_conv;
orig_conv.inner = (void*)(orig & (~1));
ChannelInfo_set_two_to_one(&this_ptr_conv, val_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1capacity_1sats(JNIEnv *env, jclass clz, int64_t this_ptr) {
+ LDKChannelInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = ChannelInfo_get_capacity_sats(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1capacity_1sats(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+ LDKChannelInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ ChannelInfo_set_capacity_sats(&this_ptr_conv, val_conv);
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1announcement_1message(JNIEnv *env, jclass clz, int64_t this_ptr) {
LDKChannelInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
ChannelInfo_set_announcement_message(&this_ptr_conv, val_conv);
}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1new(JNIEnv *env, jclass clz, int64_t features_arg, int8_tArray node_one_arg, int64_t one_to_two_arg, int8_tArray node_two_arg, int64_t two_to_one_arg, int64_t capacity_sats_arg, int64_t announcement_message_arg) {
+ LDKChannelFeatures features_arg_conv;
+ features_arg_conv.inner = (void*)(features_arg & (~1));
+ features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
+ features_arg_conv = ChannelFeatures_clone(&features_arg_conv);
+ LDKPublicKey node_one_arg_ref;
+ CHECK((*env)->GetArrayLength(env, node_one_arg) == 33);
+ (*env)->GetByteArrayRegion(env, node_one_arg, 0, 33, node_one_arg_ref.compressed_form);
+ LDKDirectionalChannelInfo one_to_two_arg_conv;
+ one_to_two_arg_conv.inner = (void*)(one_to_two_arg & (~1));
+ one_to_two_arg_conv.is_owned = (one_to_two_arg & 1) || (one_to_two_arg == 0);
+ one_to_two_arg_conv = DirectionalChannelInfo_clone(&one_to_two_arg_conv);
+ LDKPublicKey node_two_arg_ref;
+ CHECK((*env)->GetArrayLength(env, node_two_arg) == 33);
+ (*env)->GetByteArrayRegion(env, node_two_arg, 0, 33, node_two_arg_ref.compressed_form);
+ LDKDirectionalChannelInfo two_to_one_arg_conv;
+ two_to_one_arg_conv.inner = (void*)(two_to_one_arg & (~1));
+ two_to_one_arg_conv.is_owned = (two_to_one_arg & 1) || (two_to_one_arg == 0);
+ two_to_one_arg_conv = DirectionalChannelInfo_clone(&two_to_one_arg_conv);
+ LDKCOption_u64Z capacity_sats_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)capacity_sats_arg) & ~1);
+ FREE((void*)capacity_sats_arg);
+ LDKChannelAnnouncement announcement_message_arg_conv;
+ announcement_message_arg_conv.inner = (void*)(announcement_message_arg & (~1));
+ announcement_message_arg_conv.is_owned = (announcement_message_arg & 1) || (announcement_message_arg == 0);
+ announcement_message_arg_conv = ChannelAnnouncement_clone(&announcement_message_arg_conv);
+ LDKChannelInfo ret_var = ChannelInfo_new(features_arg_conv, node_one_arg_ref, one_to_two_arg_conv, node_two_arg_ref, two_to_one_arg_conv, capacity_sats_arg_conv, announcement_message_arg_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
LDKChannelInfo orig_conv;
orig_conv.inner = (void*)(orig & (~1));
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCOption_u32Z_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_u32Z;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1u32Z_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCOption_u64Z_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_u64Z;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1u64Z_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok
JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1err
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_C2Tuple_usizeTransactionZZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1C2Tuple_1usizeTransactionZZ_1ref_1from_1ptr
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: LDKAPIError_ref_from_ptr
/*
* Class: org_ldk_impl_bindings
* Method: Filter_register_output
- * Signature: (JJ[B)V
+ * Signature: (JJ)J
*/
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output
- (JNIEnv *, jclass, jlong, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output
+ (JNIEnv *, jclass, jlong, jlong);
/*
* Class: org_ldk_impl_bindings
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_u32Z_some
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1some
+ (JNIEnv *, jclass, jint);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_u32Z_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1none
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_u32Z_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_u32Z_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u32Z_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_HTLCOutputInCommitmentDecodeErrorZ_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_u64Z_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1some
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_u64Z_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1none
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_u64Z_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_u64Z_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1clone
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_DirectionalChannelInfoDecodeErrorZ_ok
JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_C2Tuple_usizeTransactionZZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1some
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_C2Tuple_usizeTransactionZZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1none
+ (JNIEnv *, jclass);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: COption_C2Tuple_usizeTransactionZZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1C2Tuple_1usizeTransactionZZ_1free
+ (JNIEnv *, jclass, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: CResult_NoneAPIErrorZ_ok
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1free
(JNIEnv *, jclass, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: WatchedOutput_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1free
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: WatchedOutput_get_block_hash
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1block_1hash
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: WatchedOutput_set_block_hash
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1block_1hash
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: WatchedOutput_get_outpoint
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1outpoint
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: WatchedOutput_set_outpoint
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1outpoint
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: WatchedOutput_get_script_pubkey
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1get_1script_1pubkey
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: WatchedOutput_set_script_pubkey
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1set_1script_1pubkey
+ (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: WatchedOutput_new
+ * Signature: ([BJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1new
+ (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray);
+
/*
* Class: org_ldk_impl_bindings
* Method: BroadcasterInterface_free
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id
(JNIEnv *, jclass, jlong, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelDetails_get_short_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1short_1channel_1id
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelDetails_set_short_channel_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1short_1channel_1id
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ChannelDetails_get_remote_network_id
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash
(JNIEnv *, jclass, jlong, jbyteArray);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: HTLCOutputInCommitment_get_transaction_output_index
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1transaction_1output_1index
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: HTLCOutputInCommitment_set_transaction_output_index
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1transaction_1output_1index
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: HTLCOutputInCommitment_new
+ * Signature: (ZJI[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1new
+ (JNIEnv *, jclass, jboolean, jlong, jint, jbyteArray, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: HTLCOutputInCommitment_clone
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1cltv_1expiry_1delta
(JNIEnv *, jclass, jlong, jshort);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RouteHint_get_htlc_minimum_msat
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RouteHint_set_htlc_minimum_msat
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RouteHint_get_htlc_maximum_msat
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1maximum_1msat
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RouteHint_set_htlc_maximum_msat
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1maximum_1msat
+ (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: RouteHint_new
+ * Signature: ([BJJSJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1new
+ (JNIEnv *, jclass, jbyteArray, jlong, jlong, jshort, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: RouteHint_clone
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1minimum_1msat
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DirectionalChannelInfo_get_htlc_maximum_msat
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1htlc_1maximum_1msat
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DirectionalChannelInfo_set_htlc_maximum_msat
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1maximum_1msat
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: DirectionalChannelInfo_get_fees
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update_1message
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: DirectionalChannelInfo_new
+ * Signature: (IZSJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1new
+ (JNIEnv *, jclass, jint, jboolean, jshort, jlong, jlong, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: DirectionalChannelInfo_clone
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1two_1to_1one
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelInfo_get_capacity_sats
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1capacity_1sats
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelInfo_set_capacity_sats
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1capacity_1sats
+ (JNIEnv *, jclass, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ChannelInfo_get_announcement_message
JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1announcement_1message
(JNIEnv *, jclass, jlong, jlong);
+/*
+ * Class: org_ldk_impl_bindings
+ * Method: ChannelInfo_new
+ * Signature: (J[BJ[BJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1new
+ (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong, jlong, jlong);
+
/*
* Class: org_ldk_impl_bindings
* Method: ChannelInfo_clone
--- /dev/null
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKCOption_C2Tuple_usizeTransactionZZ
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1C2Tuple_1usizeTransactionZZ_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_u32Z */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_u32Z
+#define _Included_org_ldk_impl_bindings_LDKCOption_u32Z
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKCOption_u32Z
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1u32Z_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_u64Z */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_u64Z
+#define _Included_org_ldk_impl_bindings_LDKCOption_u64Z
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: org_ldk_impl_bindings_LDKCOption_u64Z
+ * Method: init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1u64Z_init
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
return err_conv;
}
+uint32_t __attribute__((visibility("default"))) TS_LDKCOption_u32Z_ref_from_ptr(uint32_t ptr) {
+ LDKCOption_u32Z *obj = (LDKCOption_u32Z*)(ptr & ~1);
+ switch(obj->tag) {
+ case LDKCOption_u32Z_Some: {
+ return 0 /* LDKCOption_u32Z - Some */; (void) obj->some;
+ }
+ case LDKCOption_u32Z_None: {
+ return 0 /* LDKCOption_u32Z - None */;
+ }
+ default: abort();
+ }
+}
jboolean __attribute__((visibility("default"))) TS_LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)arg)->result_ok;
}
return *val->contents.err;
}
uint32_t __attribute__((visibility("default"))) TS_LDKErrorAction_ref_from_ptr(uint32_t ptr) {
- LDKErrorAction *obj = (LDKErrorAction*)ptr;
+ LDKErrorAction *obj = (LDKErrorAction*)(ptr & ~1);
switch(obj->tag) {
case LDKErrorAction_DisconnectPeer: {
LDKErrorMessage msg_var = obj->disconnect_peer.msg;
}
}
uint32_t __attribute__((visibility("default"))) TS_LDKHTLCFailChannelUpdate_ref_from_ptr(uint32_t ptr) {
- LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)ptr;
+ LDKHTLCFailChannelUpdate *obj = (LDKHTLCFailChannelUpdate*)(ptr & ~1);
switch(obj->tag) {
case LDKHTLCFailChannelUpdate_ChannelUpdateMessage: {
LDKChannelUpdate msg_var = obj->channel_update_message.msg;
}
}
uint32_t __attribute__((visibility("default"))) TS_LDKMessageSendEvent_ref_from_ptr(uint32_t ptr) {
- LDKMessageSendEvent *obj = (LDKMessageSendEvent*)ptr;
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)(ptr & ~1);
switch(obj->tag) {
case LDKMessageSendEvent_SendAcceptChannel: {
int8_tArray node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
long err_ref = (long)err_var.inner & ~1;
return err_ref;
}
+uint32_t __attribute__((visibility("default"))) TS_LDKCOption_u64Z_ref_from_ptr(uint32_t ptr) {
+ LDKCOption_u64Z *obj = (LDKCOption_u64Z*)(ptr & ~1);
+ switch(obj->tag) {
+ case LDKCOption_u64Z_Some: {
+ return 0 /* LDKCOption_u64Z - Some */; (void) obj->some;
+ }
+ case LDKCOption_u64Z_None: {
+ return 0 /* LDKCOption_u64Z - None */;
+ }
+ default: abort();
+ }
+}
jboolean __attribute__((visibility("default"))) TS_LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(uint32_t arg) {
return ((LDKCResult_DirectionalChannelInfoDecodeErrorZ*)arg)->result_ok;
}
return err_ref;
}
uint32_t __attribute__((visibility("default"))) TS_LDKNetAddress_ref_from_ptr(uint32_t ptr) {
- LDKNetAddress *obj = (LDKNetAddress*)ptr;
+ LDKNetAddress *obj = (LDKNetAddress*)(ptr & ~1);
switch(obj->tag) {
case LDKNetAddress_IPv4: {
int8_tArray addr_arr = init_arr(4, sizeof(uint8_t), "Native int8_tArray Bytes");
return err_conv;
}
uint32_t __attribute__((visibility("default"))) TS_LDKMonitorEvent_ref_from_ptr(uint32_t ptr) {
- LDKMonitorEvent *obj = (LDKMonitorEvent*)ptr;
+ LDKMonitorEvent *obj = (LDKMonitorEvent*)(ptr & ~1);
switch(obj->tag) {
case LDKMonitorEvent_HTLCEvent: {
- return 0 /* LDKMonitorEvent - HTLCEvent */;
+ LDKHTLCUpdate htlc_event_var = obj->htlc_event;
+ CHECK((((long)htlc_event_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&htlc_event_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long htlc_event_ref = (long)htlc_event_var.inner & ~1;
+ return 0 /* LDKMonitorEvent - HTLCEvent */; (void) htlc_event_ref;
}
case LDKMonitorEvent_CommitmentTxBroadcasted: {
- return 0 /* LDKMonitorEvent - CommitmentTxBroadcasted */;
+ LDKOutPoint commitment_tx_broadcasted_var = obj->commitment_tx_broadcasted;
+ CHECK((((long)commitment_tx_broadcasted_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&commitment_tx_broadcasted_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long commitment_tx_broadcasted_ref = (long)commitment_tx_broadcasted_var.inner & ~1;
+ return 0 /* LDKMonitorEvent - CommitmentTxBroadcasted */; (void) commitment_tx_broadcasted_ref;
}
default: abort();
}
return ret;
}
uint32_t __attribute__((visibility("default"))) TS_LDKSpendableOutputDescriptor_ref_from_ptr(uint32_t ptr) {
- LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
+ LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)(ptr & ~1);
switch(obj->tag) {
case LDKSpendableOutputDescriptor_StaticOutput: {
LDKOutPoint outpoint_var = obj->static_output.outpoint;
return 0 /* LDKSpendableOutputDescriptor - StaticOutput */; (void) outpoint_ref; (void) (long)output_ref;
}
case LDKSpendableOutputDescriptor_DelayedPaymentOutput: {
- return 0 /* LDKSpendableOutputDescriptor - DelayedPaymentOutput */;
+ LDKDelayedPaymentOutputDescriptor delayed_payment_output_var = obj->delayed_payment_output;
+ CHECK((((long)delayed_payment_output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&delayed_payment_output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long delayed_payment_output_ref = (long)delayed_payment_output_var.inner & ~1;
+ return 0 /* LDKSpendableOutputDescriptor - DelayedPaymentOutput */; (void) delayed_payment_output_ref;
}
case LDKSpendableOutputDescriptor_StaticPaymentOutput: {
- return 0 /* LDKSpendableOutputDescriptor - StaticPaymentOutput */;
+ LDKStaticPaymentOutputDescriptor static_payment_output_var = obj->static_payment_output;
+ CHECK((((long)static_payment_output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&static_payment_output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long static_payment_output_ref = (long)static_payment_output_var.inner & ~1;
+ return 0 /* LDKSpendableOutputDescriptor - StaticPaymentOutput */; (void) static_payment_output_ref;
}
default: abort();
}
return ret;
}
uint32_t __attribute__((visibility("default"))) TS_LDKEvent_ref_from_ptr(uint32_t ptr) {
- LDKEvent *obj = (LDKEvent*)ptr;
+ LDKEvent *obj = (LDKEvent*)(ptr & ~1);
switch(obj->tag) {
case LDKEvent_FundingGenerationReady: {
int8_tArray temporary_channel_id_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
uint32_t err_conv = LDKAccessError_to_js((*val->contents.err));
return err_conv;
}
+uint32_t __attribute__((visibility("default"))) TS_LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(uint32_t ptr) {
+ LDKCOption_C2Tuple_usizeTransactionZZ *obj = (LDKCOption_C2Tuple_usizeTransactionZZ*)(ptr & ~1);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_usizeTransactionZZ_Some: {
+ long some_ref = (long)(&obj->some) | 1;
+ return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - Some */; (void) some_ref;
+ }
+ case LDKCOption_C2Tuple_usizeTransactionZZ_None: {
+ return 0 /* LDKCOption_C2Tuple_usizeTransactionZZ - None */;
+ }
+ default: abort();
+ }
+}
uint32_t __attribute__((visibility("default"))) TS_LDKAPIError_ref_from_ptr(uint32_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)ptr;
+ LDKAPIError *obj = (LDKAPIError*)(ptr & ~1);
switch(obj->tag) {
case LDKAPIError_APIMisuseError: {
LDKCVec_u8Z err_var = obj->api_misuse_error.err;
return ret;
}
uint32_t __attribute__((visibility("default"))) TS_LDKPaymentSendFailure_ref_from_ptr(uint32_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)ptr;
+ LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)(ptr & ~1);
switch(obj->tag) {
case LDKPaymentSendFailure_ParameterError: {
- return 0 /* LDKPaymentSendFailure - ParameterError */;
+ long parameter_error_ref = ((long)&obj->parameter_error) | 1;
+ return 0 /* LDKPaymentSendFailure - ParameterError */; (void) parameter_error_ref;
}
case LDKPaymentSendFailure_PathParameterError: {
- return 0 /* LDKPaymentSendFailure - PathParameterError */;
+ LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
+ uint32_tArray path_parameter_error_arr = init_arr(path_parameter_error_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+ uint32_t *path_parameter_error_arr_ptr = (uint32_t*)(path_parameter_error_arr + 4);
+ for (size_t w = 0; w < path_parameter_error_var.datalen; w++) {
+ LDKCResult_NoneAPIErrorZ* path_parameter_error_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *path_parameter_error_conv_22_conv = path_parameter_error_var.data[w];
+ *path_parameter_error_conv_22_conv = CResult_NoneAPIErrorZ_clone(path_parameter_error_conv_22_conv);
+ path_parameter_error_arr_ptr[w] = (long)path_parameter_error_conv_22_conv;
+ }
+ return 0 /* LDKPaymentSendFailure - PathParameterError */; (void) path_parameter_error_arr;
}
case LDKPaymentSendFailure_AllFailedRetrySafe: {
- return 0 /* LDKPaymentSendFailure - AllFailedRetrySafe */;
+ LDKCVec_APIErrorZ all_failed_retry_safe_var = obj->all_failed_retry_safe;
+ uint32_tArray all_failed_retry_safe_arr = init_arr(all_failed_retry_safe_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+ uint32_t *all_failed_retry_safe_arr_ptr = (uint32_t*)(all_failed_retry_safe_arr + 4);
+ for (size_t k = 0; k < all_failed_retry_safe_var.datalen; k++) {
+ long all_failed_retry_safe_conv_10_ref = ((long)&all_failed_retry_safe_var.data[k]) | 1;
+ all_failed_retry_safe_arr_ptr[k] = all_failed_retry_safe_conv_10_ref;
+ }
+ return 0 /* LDKPaymentSendFailure - AllFailedRetrySafe */; (void) all_failed_retry_safe_arr;
}
case LDKPaymentSendFailure_PartialFailure: {
- return 0 /* LDKPaymentSendFailure - PartialFailure */;
+ LDKCVec_CResult_NoneAPIErrorZZ partial_failure_var = obj->partial_failure;
+ uint32_tArray partial_failure_arr = init_arr(partial_failure_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+ uint32_t *partial_failure_arr_ptr = (uint32_t*)(partial_failure_arr + 4);
+ for (size_t w = 0; w < partial_failure_var.datalen; w++) {
+ LDKCResult_NoneAPIErrorZ* partial_failure_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *partial_failure_conv_22_conv = partial_failure_var.data[w];
+ *partial_failure_conv_22_conv = CResult_NoneAPIErrorZ_clone(partial_failure_conv_22_conv);
+ partial_failure_arr_ptr[w] = (long)partial_failure_conv_22_conv;
+ }
+ return 0 /* LDKPaymentSendFailure - PartialFailure */; (void) partial_failure_arr;
}
default: abort();
}
memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
js_invoke_function_2(j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
}
-void register_output_LDKFilter_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
+LDKCOption_C2Tuple_usizeTransactionZZ register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
- LDKOutPoint outpoint_var = *outpoint;
- outpoint_var = OutPoint_clone(outpoint);
- CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- long outpoint_ref = (long)outpoint_var.inner;
- if (outpoint_var.is_owned) {
- outpoint_ref |= 1;
- }
- LDKu8slice script_pubkey_var = script_pubkey;
- int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
- memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
- js_invoke_function_2(j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
+ LDKWatchedOutput output_var = output;
+ CHECK((((long)output_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&output_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long output_ref = (long)output_var.inner;
+ if (output_var.is_owned) {
+ output_ref |= 1;
+ }
+ LDKCOption_C2Tuple_usizeTransactionZZ* ret = (LDKCOption_C2Tuple_usizeTransactionZZ*)js_invoke_function_1(j_calls->register_output_meth, output_ref);
+ LDKCOption_C2Tuple_usizeTransactionZZ ret_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(((uint64_t)ret) & ~1);
+ // Warning: we may need a move here but no clone is available for LDKCOption_C2Tuple_usizeTransactionZZ
+ return ret_conv;
}
static void* LDKFilter_JCalls_clone(const void* this_arg) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
(this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
}
-void __attribute__((visibility("default"))) TS_Filter_register_output(uint32_t this_arg, uint32_t outpoint, int8_tArray script_pubkey) {
+uint32_t __attribute__((visibility("default"))) TS_Filter_register_output(uint32_t this_arg, uint32_t output) {
LDKFilter* this_arg_conv = (LDKFilter*)(((uint64_t)this_arg) & ~1);
- LDKOutPoint outpoint_conv;
- outpoint_conv.inner = (void*)(outpoint & (~1));
- outpoint_conv.is_owned = false;
- LDKu8slice script_pubkey_ref;
- script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
- script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
- (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
+ LDKWatchedOutput output_conv;
+ output_conv.inner = (void*)(output & (~1));
+ output_conv.is_owned = (output & 1) || (output == 0);
+ // Warning: we need a move here but no clone is available for LDKWatchedOutput
+ LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+ *ret_copy = (this_arg_conv->register_output)(this_arg_conv->this_arg, output_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
}
typedef struct LDKPersist_JCalls {
CResult_TxCreationKeysErrorZ_free(_res_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_COption_u32Z_some(int32_t o) {
+ LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = COption_u32Z_some(o);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+uint32_t __attribute__((visibility("default"))) TS_COption_u32Z_none() {
+ LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = COption_u32Z_none();
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_COption_u32Z_free(uint32_t _res) {
+ if ((_res & 1) != 0) return;
+ LDKCOption_u32Z _res_conv = *(LDKCOption_u32Z*)(((uint64_t)_res) & ~1);
+ FREE((void*)_res);
+ COption_u32Z_free(_res_conv);
+}
+
+uint32_t __attribute__((visibility("default"))) TS_COption_u32Z_clone(uint32_t orig) {
+ LDKCOption_u32Z* orig_conv = (LDKCOption_u32Z*)orig;
+ LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = COption_u32Z_clone(orig_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(uint32_t o) {
LDKHTLCOutputInCommitment o_conv;
o_conv.inner = (void*)(o & (~1));
return (long)ret_conv;
}
+uint32_t __attribute__((visibility("default"))) TS_COption_u64Z_some(int64_t o) {
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = COption_u64Z_some(o);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+uint32_t __attribute__((visibility("default"))) TS_COption_u64Z_none() {
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = COption_u64Z_none();
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_COption_u64Z_free(uint32_t _res) {
+ if ((_res & 1) != 0) return;
+ LDKCOption_u64Z _res_conv = *(LDKCOption_u64Z*)(((uint64_t)_res) & ~1);
+ FREE((void*)_res);
+ COption_u64Z_free(_res_conv);
+}
+
+uint32_t __attribute__((visibility("default"))) TS_COption_u64Z_clone(uint32_t orig) {
+ LDKCOption_u64Z* orig_conv = (LDKCOption_u64Z*)orig;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = COption_u64Z_clone(orig_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_ok(uint32_t o) {
LDKDirectionalChannelInfo o_conv;
o_conv.inner = (void*)(o & (~1));
return (long)ret_conv;
}
+uint32_t __attribute__((visibility("default"))) TS_COption_C2Tuple_usizeTransactionZZ_some(uint32_t o) {
+ LDKC2Tuple_usizeTransactionZ o_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)o) & ~1);
+ FREE((void*)o);
+ LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+ *ret_copy = COption_C2Tuple_usizeTransactionZZ_some(o_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+uint32_t __attribute__((visibility("default"))) TS_COption_C2Tuple_usizeTransactionZZ_none() {
+ LDKCOption_C2Tuple_usizeTransactionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_usizeTransactionZZ), "LDKCOption_C2Tuple_usizeTransactionZZ");
+ *ret_copy = COption_C2Tuple_usizeTransactionZZ_none();
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_COption_C2Tuple_usizeTransactionZZ_free(uint32_t _res) {
+ if ((_res & 1) != 0) return;
+ LDKCOption_C2Tuple_usizeTransactionZZ _res_conv = *(LDKCOption_C2Tuple_usizeTransactionZZ*)(((uint64_t)_res) & ~1);
+ FREE((void*)_res);
+ COption_C2Tuple_usizeTransactionZZ_free(_res_conv);
+}
+
uint32_t __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_ok() {
LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
*ret_conv = CResult_NoneAPIErrorZ_ok();
Filter_free(this_ptr_conv);
}
+void __attribute__((visibility("default"))) TS_WatchedOutput_free(uint32_t this_obj) {
+ LDKWatchedOutput this_obj_conv;
+ this_obj_conv.inner = (void*)(this_obj & (~1));
+ this_obj_conv.is_owned = (this_obj & 1) || (this_obj == 0);
+ WatchedOutput_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((visibility("default"))) TS_WatchedOutput_get_block_hash(uint32_t this_ptr) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), WatchedOutput_get_block_hash(&this_ptr_conv).data, 32);
+ return ret_arr;
+}
+
+void __attribute__((visibility("default"))) TS_WatchedOutput_set_block_hash(uint32_t this_ptr, int8_tArray val) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(*((uint32_t*)val) == 32);
+ memcpy(val_ref.data, (uint8_t*)(val + 4), 32);
+ WatchedOutput_set_block_hash(&this_ptr_conv, val_ref);
+}
+
+uint32_t __attribute__((visibility("default"))) TS_WatchedOutput_get_outpoint(uint32_t this_ptr) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKOutPoint ret_var = WatchedOutput_get_outpoint(&this_ptr_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_WatchedOutput_set_outpoint(uint32_t this_ptr, uint32_t val) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKOutPoint val_conv;
+ val_conv.inner = (void*)(val & (~1));
+ val_conv.is_owned = (val & 1) || (val == 0);
+ val_conv = OutPoint_clone(&val_conv);
+ WatchedOutput_set_outpoint(&this_ptr_conv, val_conv);
+}
+
+int8_tArray __attribute__((visibility("default"))) TS_WatchedOutput_get_script_pubkey(uint32_t this_ptr) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKu8slice ret_var = WatchedOutput_get_script_pubkey(&this_ptr_conv);
+ int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+ memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+ return ret_arr;
+}
+
+void __attribute__((visibility("default"))) TS_WatchedOutput_set_script_pubkey(uint32_t this_ptr, int8_tArray val) {
+ LDKWatchedOutput this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z val_ref;
+ val_ref.datalen = *((uint32_t*)val);
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(val_ref.data, (uint8_t*)(val + 4), val_ref.datalen);
+ WatchedOutput_set_script_pubkey(&this_ptr_conv, val_ref);
+}
+
+uint32_t __attribute__((visibility("default"))) TS_WatchedOutput_new(int8_tArray block_hash_arg, uint32_t outpoint_arg, int8_tArray script_pubkey_arg) {
+ LDKThirtyTwoBytes block_hash_arg_ref;
+ CHECK(*((uint32_t*)block_hash_arg) == 32);
+ memcpy(block_hash_arg_ref.data, (uint8_t*)(block_hash_arg + 4), 32);
+ LDKOutPoint outpoint_arg_conv;
+ outpoint_arg_conv.inner = (void*)(outpoint_arg & (~1));
+ outpoint_arg_conv.is_owned = (outpoint_arg & 1) || (outpoint_arg == 0);
+ outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+ LDKCVec_u8Z script_pubkey_arg_ref;
+ script_pubkey_arg_ref.datalen = *((uint32_t*)script_pubkey_arg);
+ script_pubkey_arg_ref.data = MALLOC(script_pubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(script_pubkey_arg_ref.data, (uint8_t*)(script_pubkey_arg + 4), script_pubkey_arg_ref.datalen);
+ LDKWatchedOutput ret_var = WatchedOutput_new(block_hash_arg_ref, outpoint_arg_conv, script_pubkey_arg_ref);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
void __attribute__((visibility("default"))) TS_BroadcasterInterface_free(uint32_t this_ptr) {
if ((this_ptr & 1) != 0) return;
LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)(((uint64_t)this_ptr) & ~1);
ChannelDetails_set_channel_id(&this_ptr_conv, val_ref);
}
+uint32_t __attribute__((visibility("default"))) TS_ChannelDetails_get_short_channel_id(uint32_t this_ptr) {
+ LDKChannelDetails this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = ChannelDetails_get_short_channel_id(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_ChannelDetails_set_short_channel_id(uint32_t this_ptr, uint32_t val) {
+ LDKChannelDetails this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ ChannelDetails_set_short_channel_id(&this_ptr_conv, val_conv);
+}
+
int8_tArray __attribute__((visibility("default"))) TS_ChannelDetails_get_remote_network_id(uint32_t this_ptr) {
LDKChannelDetails this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
HTLCOutputInCommitment_set_payment_hash(&this_ptr_conv, val_ref);
}
+uint32_t __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_get_transaction_output_index(uint32_t this_ptr) {
+ LDKHTLCOutputInCommitment this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = HTLCOutputInCommitment_get_transaction_output_index(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_set_transaction_output_index(uint32_t this_ptr, uint32_t val) {
+ LDKHTLCOutputInCommitment this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u32Z val_conv = *(LDKCOption_u32Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ HTLCOutputInCommitment_set_transaction_output_index(&this_ptr_conv, val_conv);
+}
+
+uint32_t __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_new(jboolean offered_arg, int64_t amount_msat_arg, int32_t cltv_expiry_arg, int8_tArray payment_hash_arg, uint32_t transaction_output_index_arg) {
+ LDKThirtyTwoBytes payment_hash_arg_ref;
+ CHECK(*((uint32_t*)payment_hash_arg) == 32);
+ memcpy(payment_hash_arg_ref.data, (uint8_t*)(payment_hash_arg + 4), 32);
+ LDKCOption_u32Z transaction_output_index_arg_conv = *(LDKCOption_u32Z*)(((uint64_t)transaction_output_index_arg) & ~1);
+ FREE((void*)transaction_output_index_arg);
+ LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg_ref, transaction_output_index_arg_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_clone(uint32_t orig) {
LDKHTLCOutputInCommitment orig_conv;
orig_conv.inner = (void*)(orig & (~1));
RouteHint_set_cltv_expiry_delta(&this_ptr_conv, val);
}
+uint32_t __attribute__((visibility("default"))) TS_RouteHint_get_htlc_minimum_msat(uint32_t this_ptr) {
+ LDKRouteHint this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = RouteHint_get_htlc_minimum_msat(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_RouteHint_set_htlc_minimum_msat(uint32_t this_ptr, uint32_t val) {
+ LDKRouteHint this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ RouteHint_set_htlc_minimum_msat(&this_ptr_conv, val_conv);
+}
+
+uint32_t __attribute__((visibility("default"))) TS_RouteHint_get_htlc_maximum_msat(uint32_t this_ptr) {
+ LDKRouteHint this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = RouteHint_get_htlc_maximum_msat(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_RouteHint_set_htlc_maximum_msat(uint32_t this_ptr, uint32_t val) {
+ LDKRouteHint this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ RouteHint_set_htlc_maximum_msat(&this_ptr_conv, val_conv);
+}
+
+uint32_t __attribute__((visibility("default"))) TS_RouteHint_new(int8_tArray src_node_id_arg, int64_t short_channel_id_arg, uint32_t fees_arg, int16_t cltv_expiry_delta_arg, uint32_t htlc_minimum_msat_arg, uint32_t htlc_maximum_msat_arg) {
+ LDKPublicKey src_node_id_arg_ref;
+ CHECK(*((uint32_t*)src_node_id_arg) == 33);
+ memcpy(src_node_id_arg_ref.compressed_form, (uint8_t*)(src_node_id_arg + 4), 33);
+ LDKRoutingFees fees_arg_conv;
+ fees_arg_conv.inner = (void*)(fees_arg & (~1));
+ fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
+ fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
+ LDKCOption_u64Z htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_minimum_msat_arg) & ~1);
+ FREE((void*)htlc_minimum_msat_arg);
+ LDKCOption_u64Z htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_maximum_msat_arg) & ~1);
+ FREE((void*)htlc_maximum_msat_arg);
+ LDKRouteHint ret_var = RouteHint_new(src_node_id_arg_ref, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg_conv, htlc_maximum_msat_arg_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_RouteHint_clone(uint32_t orig) {
LDKRouteHint orig_conv;
orig_conv.inner = (void*)(orig & (~1));
DirectionalChannelInfo_set_htlc_minimum_msat(&this_ptr_conv, val);
}
+uint32_t __attribute__((visibility("default"))) TS_DirectionalChannelInfo_get_htlc_maximum_msat(uint32_t this_ptr) {
+ LDKDirectionalChannelInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = DirectionalChannelInfo_get_htlc_maximum_msat(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_DirectionalChannelInfo_set_htlc_maximum_msat(uint32_t this_ptr, uint32_t val) {
+ LDKDirectionalChannelInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ DirectionalChannelInfo_set_htlc_maximum_msat(&this_ptr_conv, val_conv);
+}
+
uint32_t __attribute__((visibility("default"))) TS_DirectionalChannelInfo_get_fees(uint32_t this_ptr) {
LDKDirectionalChannelInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
DirectionalChannelInfo_set_last_update_message(&this_ptr_conv, val_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_DirectionalChannelInfo_new(int32_t last_update_arg, jboolean enabled_arg, int16_t cltv_expiry_delta_arg, int64_t htlc_minimum_msat_arg, uint32_t htlc_maximum_msat_arg, uint32_t fees_arg, uint32_t last_update_message_arg) {
+ LDKCOption_u64Z htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)htlc_maximum_msat_arg) & ~1);
+ FREE((void*)htlc_maximum_msat_arg);
+ LDKRoutingFees fees_arg_conv;
+ fees_arg_conv.inner = (void*)(fees_arg & (~1));
+ fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
+ fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
+ LDKChannelUpdate last_update_message_arg_conv;
+ last_update_message_arg_conv.inner = (void*)(last_update_message_arg & (~1));
+ last_update_message_arg_conv.is_owned = (last_update_message_arg & 1) || (last_update_message_arg == 0);
+ last_update_message_arg_conv = ChannelUpdate_clone(&last_update_message_arg_conv);
+ LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg_conv, fees_arg_conv, last_update_message_arg_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_DirectionalChannelInfo_clone(uint32_t orig) {
LDKDirectionalChannelInfo orig_conv;
orig_conv.inner = (void*)(orig & (~1));
ChannelInfo_set_two_to_one(&this_ptr_conv, val_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_ChannelInfo_get_capacity_sats(uint32_t this_ptr) {
+ LDKChannelInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = ChannelInfo_get_capacity_sats(&this_ptr_conv);
+ long ret_ref = (long)ret_copy;
+ return ret_ref;
+}
+
+void __attribute__((visibility("default"))) TS_ChannelInfo_set_capacity_sats(uint32_t this_ptr, uint32_t val) {
+ LDKChannelInfo this_ptr_conv;
+ this_ptr_conv.inner = (void*)(this_ptr & (~1));
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(((uint64_t)val) & ~1);
+ FREE((void*)val);
+ ChannelInfo_set_capacity_sats(&this_ptr_conv, val_conv);
+}
+
uint32_t __attribute__((visibility("default"))) TS_ChannelInfo_get_announcement_message(uint32_t this_ptr) {
LDKChannelInfo this_ptr_conv;
this_ptr_conv.inner = (void*)(this_ptr & (~1));
ChannelInfo_set_announcement_message(&this_ptr_conv, val_conv);
}
+uint32_t __attribute__((visibility("default"))) TS_ChannelInfo_new(uint32_t features_arg, int8_tArray node_one_arg, uint32_t one_to_two_arg, int8_tArray node_two_arg, uint32_t two_to_one_arg, uint32_t capacity_sats_arg, uint32_t announcement_message_arg) {
+ LDKChannelFeatures features_arg_conv;
+ features_arg_conv.inner = (void*)(features_arg & (~1));
+ features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
+ features_arg_conv = ChannelFeatures_clone(&features_arg_conv);
+ LDKPublicKey node_one_arg_ref;
+ CHECK(*((uint32_t*)node_one_arg) == 33);
+ memcpy(node_one_arg_ref.compressed_form, (uint8_t*)(node_one_arg + 4), 33);
+ LDKDirectionalChannelInfo one_to_two_arg_conv;
+ one_to_two_arg_conv.inner = (void*)(one_to_two_arg & (~1));
+ one_to_two_arg_conv.is_owned = (one_to_two_arg & 1) || (one_to_two_arg == 0);
+ one_to_two_arg_conv = DirectionalChannelInfo_clone(&one_to_two_arg_conv);
+ LDKPublicKey node_two_arg_ref;
+ CHECK(*((uint32_t*)node_two_arg) == 33);
+ memcpy(node_two_arg_ref.compressed_form, (uint8_t*)(node_two_arg + 4), 33);
+ LDKDirectionalChannelInfo two_to_one_arg_conv;
+ two_to_one_arg_conv.inner = (void*)(two_to_one_arg & (~1));
+ two_to_one_arg_conv.is_owned = (two_to_one_arg & 1) || (two_to_one_arg == 0);
+ two_to_one_arg_conv = DirectionalChannelInfo_clone(&two_to_one_arg_conv);
+ LDKCOption_u64Z capacity_sats_arg_conv = *(LDKCOption_u64Z*)(((uint64_t)capacity_sats_arg) & ~1);
+ FREE((void*)capacity_sats_arg);
+ LDKChannelAnnouncement announcement_message_arg_conv;
+ announcement_message_arg_conv.inner = (void*)(announcement_message_arg & (~1));
+ announcement_message_arg_conv.is_owned = (announcement_message_arg & 1) || (announcement_message_arg == 0);
+ announcement_message_arg_conv = ChannelAnnouncement_clone(&announcement_message_arg_conv);
+ LDKChannelInfo ret_var = ChannelInfo_new(features_arg_conv, node_one_arg_ref, one_to_two_arg_conv, node_two_arg_ref, two_to_one_arg_conv, capacity_sats_arg_conv, announcement_message_arg_conv);
+ CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+ CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+ long ret_ref = (long)ret_var.inner;
+ if (ret_var.is_owned) {
+ ret_ref |= 1;
+ }
+ return ret_ref;
+}
+
uint32_t __attribute__((visibility("default"))) TS_ChannelInfo_clone(uint32_t orig) {
LDKChannelInfo orig_conv;
orig_conv.inner = (void*)(orig & (~1));
public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
+ public static class LDKCOption_u32Z {
+ private LDKCOption_u32Z() {}
+ export class Some extends LDKCOption_u32Z {
+ public number some;
+ Some(number some) { this.some = some; }
+ }
+ export class None extends LDKCOption_u32Z {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_u32Z.init(); }
+ public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+ public static class LDKCOption_u64Z {
+ private LDKCOption_u64Z() {}
+ export class Some extends LDKCOption_u64Z {
+ public number some;
+ Some(number some) { this.some = some; }
+ }
+ export class None extends LDKCOption_u64Z {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_u64Z.init(); }
+ public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
public static class LDKMonitorEvent {
private LDKMonitorEvent() {}
export class HTLCEvent extends LDKMonitorEvent {
- HTLCEvent() { }
+ public number htlc_event;
+ HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
}
export class CommitmentTxBroadcasted extends LDKMonitorEvent {
- CommitmentTxBroadcasted() { }
+ public number commitment_tx_broadcasted;
+ CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
}
static native void init();
}
StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
}
export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
- DelayedPaymentOutput() { }
+ public number delayed_payment_output;
+ DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
}
export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
- StaticPaymentOutput() { }
+ public number static_payment_output;
+ StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
}
static native void init();
}
public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
+ public static class LDKCOption_C2Tuple_usizeTransactionZZ {
+ private LDKCOption_C2Tuple_usizeTransactionZZ() {}
+ export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
+ public number some;
+ Some(number some) { this.some = some; }
+ }
+ export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
+ public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
public static class LDKAPIError {
private LDKAPIError() {}
export class APIMisuseError extends LDKAPIError {
public static class LDKPaymentSendFailure {
private LDKPaymentSendFailure() {}
export class ParameterError extends LDKPaymentSendFailure {
- ParameterError() { }
+ public number parameter_error;
+ ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
}
export class PathParameterError extends LDKPaymentSendFailure {
- PathParameterError() { }
+ public number[] path_parameter_error;
+ PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
}
export class AllFailedRetrySafe extends LDKPaymentSendFailure {
- AllFailedRetrySafe() { }
+ public number[] all_failed_retry_safe;
+ AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
}
export class PartialFailure extends LDKPaymentSendFailure {
- PartialFailure() { }
+ public number[] partial_failure;
+ PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
}
static native void init();
}
export interface LDKFilter {
register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
- register_output (outpoint: number, script_pubkey: Uint8Array): void;
+ register_output (output: number): number;
}
export function LDKFilter_new(impl: LDKFilter): number {
const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
// debug statements here
}
- // void Filter_register_output LDKFilter *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
- export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
+ // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
+ export function Filter_register_output(this_arg: number, output: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
- // debug statements here
+ const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
+ return nativeResponseValue;
}
const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
// debug statements here
}
+ // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
+ export function COption_u32Z_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u32Z COption_u32Z_none(void);
+ export function COption_u32Z_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_none();
+ return nativeResponseValue;
+ }
+ // void COption_u32Z_free(struct LDKCOption_u32Z _res);
+ export function COption_u32Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
+ export function COption_u32Z_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_clone(orig);
+ return nativeResponseValue;
+ }
// struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
return nativeResponseValue;
}
+ // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
+ export function COption_u64Z_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u64Z_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u64Z COption_u64Z_none(void);
+ export function COption_u64Z_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u64Z_none();
+ return nativeResponseValue;
+ }
+ // void COption_u64Z_free(struct LDKCOption_u64Z _res);
+ export function COption_u64Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u64Z_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
+ export function COption_u64Z_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u64Z_clone(orig);
+ return nativeResponseValue;
+ }
// struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
return nativeResponseValue;
}
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
+ export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
+ export function COption_C2Tuple_usizeTransactionZZ_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
+ return nativeResponseValue;
+ }
+ // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
+ export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
+ // debug statements here
+ }
// struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
export function CResult_NoneAPIErrorZ_ok(): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.Filter_free(this_ptr);
// debug statements here
}
+ // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
+ export function WatchedOutput_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+ export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
+ return decodeArray(nativeResponseValue);
+ }
+ // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
+ // debug statements here
+ }
+ // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+ export function WatchedOutput_get_outpoint(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
+ return nativeResponseValue;
+ }
+ // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+ export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+ export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
+ return decodeArray(nativeResponseValue);
+ }
+ // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+ export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
+ export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
+ return nativeResponseValue;
+ }
// void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
export function BroadcasterInterface_free(this_ptr: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
// debug statements here
}
+ // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+ export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
+ // debug statements here
+ }
// struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
// debug statements here
}
+ // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
+ export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
+ return nativeResponseValue;
+ }
+ // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
+ export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_new(bool offered_arg, uint64_t amount_msat_arg, uint32_t cltv_expiry_arg, struct LDKThirtyTwoBytes payment_hash_arg, struct LDKCOption_u32Z transaction_output_index_arg);
+ export function HTLCOutputInCommitment_new(offered_arg: boolean, amount_msat_arg: number, cltv_expiry_arg: number, payment_hash_arg: Uint8Array, transaction_output_index_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
+ return nativeResponseValue;
+ }
// struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
export function HTLCOutputInCommitment_clone(orig: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
// debug statements here
}
+ // struct LDKCOption_u64Z RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+ export function RouteHint_get_htlc_minimum_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_get_htlc_minimum_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function RouteHint_set_htlc_minimum_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_set_htlc_minimum_msat(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKCOption_u64Z RouteHint_get_htlc_maximum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+ export function RouteHint_get_htlc_maximum_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_get_htlc_maximum_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHint_set_htlc_maximum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function RouteHint_set_htlc_maximum_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_set_htlc_maximum_msat(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
+ export function RouteHint_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
+ return nativeResponseValue;
+ }
// struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
export function RouteHint_clone(orig: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
// debug statements here
}
+ // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
+ export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
+ // debug statements here
+ }
// struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
// debug statements here
}
+ // MUST_USE_RES struct LDKDirectionalChannelInfo DirectionalChannelInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
+ export function DirectionalChannelInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg, last_update_message_arg);
+ return nativeResponseValue;
+ }
// struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
export function DirectionalChannelInfo_clone(orig: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
// debug statements here
}
+ // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+ export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
+ // debug statements here
+ }
// struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
export function ChannelInfo_get_announcement_message(this_ptr: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
// debug statements here
}
+ // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
+ export function ChannelInfo_new(features_arg: number, node_one_arg: Uint8Array, one_to_two_arg: number, node_two_arg: Uint8Array, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelInfo_new(features_arg, encodeArray(node_one_arg), one_to_two_arg, encodeArray(node_two_arg), two_to_one_arg, capacity_sats_arg, announcement_message_arg);
+ return nativeResponseValue;
+ }
// struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
export function ChannelInfo_clone(orig: number): number {
if(!isWasmInitialized) {
private constructor(ptr: number, obj: bindings.LDKAPIError.MonitorUpdateFailed) {
super(null, ptr);
}
+}
+ public APIError clone() {
+ number ret = bindings.APIError_clone(this.ptr);
+ APIError ret_hu_conv = APIError.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
bindings.ChannelDetails_set_channel_id(this.ptr, val);
}
+ public Option_u64Z get_short_channel_id() {
+ number ret = bindings.ChannelDetails_get_short_channel_id(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public void set_short_channel_id(Option_u64Z val) {
+ bindings.ChannelDetails_set_short_channel_id(this.ptr, val.ptr);
+ }
+
public Uint8Array get_remote_network_id() {
Uint8Array ret = bindings.ChannelDetails_get_remote_network_id(this.ptr);
return ret;
this.ptrs_to.add(val);
}
+ public Option_u64Z get_capacity_sats() {
+ number ret = bindings.ChannelInfo_get_capacity_sats(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public void set_capacity_sats(Option_u64Z val) {
+ bindings.ChannelInfo_set_capacity_sats(this.ptr, val.ptr);
+ }
+
public ChannelAnnouncement get_announcement_message() {
number ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
this.ptrs_to.add(val);
}
+ public static ChannelInfo constructor_new(ChannelFeatures features_arg, Uint8Array node_one_arg, DirectionalChannelInfo one_to_two_arg, Uint8Array node_two_arg, DirectionalChannelInfo two_to_one_arg, Option_u64Z capacity_sats_arg, ChannelAnnouncement announcement_message_arg) {
+ number ret = bindings.ChannelInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, node_one_arg, one_to_two_arg == null ? 0 : one_to_two_arg.ptr & ~1, node_two_arg, two_to_one_arg == null ? 0 : two_to_one_arg.ptr & ~1, capacity_sats_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+ const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(features_arg);
+ ret_hu_conv.ptrs_to.add(one_to_two_arg);
+ ret_hu_conv.ptrs_to.add(two_to_one_arg);
+ ret_hu_conv.ptrs_to.add(announcement_message_arg);
+ return ret_hu_conv;
+ }
+
public ChannelInfo clone() {
number ret = bindings.ChannelInfo_clone(this.ptr);
const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
}
+ public Option_u64Z get_htlc_maximum_msat() {
+ number ret = bindings.DirectionalChannelInfo_get_htlc_maximum_msat(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public void set_htlc_maximum_msat(Option_u64Z val) {
+ bindings.DirectionalChannelInfo_set_htlc_maximum_msat(this.ptr, val.ptr);
+ }
+
public RoutingFees get_fees() {
number ret = bindings.DirectionalChannelInfo_get_fees(this.ptr);
const ret_hu_conv: RoutingFees = new RoutingFees(null, ret);
this.ptrs_to.add(val);
}
+ public static DirectionalChannelInfo constructor_new(number last_update_arg, boolean enabled_arg, number cltv_expiry_delta_arg, number htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg, RoutingFees fees_arg, ChannelUpdate last_update_message_arg) {
+ number ret = bindings.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg.ptr, fees_arg == null ? 0 : fees_arg.ptr & ~1, last_update_message_arg == null ? 0 : last_update_message_arg.ptr & ~1);
+ const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(fees_arg);
+ ret_hu_conv.ptrs_to.add(last_update_message_arg);
+ return ret_hu_conv;
+ }
+
public DirectionalChannelInfo clone() {
number ret = bindings.DirectionalChannelInfo_clone(this.ptr);
const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
+}
+ public ErrorAction clone() {
+ number ret = bindings.ErrorAction_clone(this.ptr);
+ ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
}
this.outputs = outputs_conv_27_arr;
}
+}
+ public Event clone() {
+ number ret = bindings.Event_clone(this.ptr);
+ Event ret_hu_conv = Event.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public Uint8Array write() {
+ Uint8Array ret = bindings.Event_write(this.ptr);
+ return ret;
+ }
+
}
arg.register_tx(txid, script_pubkey);
},
- register_output (outpoint: number, script_pubkey: Uint8Array): void {
- const outpoint_hu_conv: OutPoint = new OutPoint(null, outpoint);
- arg.register_output(outpoint_hu_conv, script_pubkey);
+ register_output (output: number): number {
+ const output_hu_conv: WatchedOutput = new WatchedOutput(null, output);
+ output_hu_conv.ptrs_to.add(this);
+ Option_C2Tuple_usizeTransactionZZ ret = arg.register_output(output_hu_conv);
+ result: number = ret.ptr;
+ return result;
},
export interface FilterInterface {
register_tx(txid: Uint8Array, script_pubkey: Uint8Array): void;
- register_output(outpoint: OutPoint, script_pubkey: Uint8Array): void;
+ register_output(output: WatchedOutput): Option_C2Tuple_usizeTransactionZZ;
}
bindings.Filter_register_tx(this.ptr, txid, script_pubkey);
}
- public void register_output(OutPoint outpoint, Uint8Array script_pubkey) {
- bindings.Filter_register_output(this.ptr, outpoint == null ? 0 : outpoint.ptr & ~1, script_pubkey);
- this.ptrs_to.add(outpoint);
+ public Option_C2Tuple_usizeTransactionZZ register_output(Uint8Array output_block_hash_arg, OutPoint output_outpoint_arg, Uint8Array output_script_pubkey_arg) {
+ number ret = bindings.Filter_register_output(this.ptr, bindings.WatchedOutput_new(output_block_hash_arg, output_outpoint_arg == null ? 0 : output_outpoint_arg.ptr & ~1, output_script_pubkey_arg));
+ Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ ret_hu_conv.ptrs_to.add(output_outpoint_arg);
+ return ret_hu_conv;
}
}
this.node_id = obj.node_id;
this.is_permanent = obj.is_permanent;
}
+}
+ public HTLCFailChannelUpdate clone() {
+ number ret = bindings.HTLCFailChannelUpdate_clone(this.ptr);
+ HTLCFailChannelUpdate ret_hu_conv = HTLCFailChannelUpdate.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
}
+ public Option_u32Z get_transaction_output_index() {
+ number ret = bindings.HTLCOutputInCommitment_get_transaction_output_index(this.ptr);
+ Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public void set_transaction_output_index(Option_u32Z val) {
+ bindings.HTLCOutputInCommitment_set_transaction_output_index(this.ptr, val.ptr);
+ }
+
+ public static HTLCOutputInCommitment constructor_new(boolean offered_arg, number amount_msat_arg, number cltv_expiry_arg, Uint8Array payment_hash_arg, Option_u32Z transaction_output_index_arg) {
+ number ret = bindings.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg, transaction_output_index_arg.ptr);
+ const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
public HTLCOutputInCommitment clone() {
number ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
+}
+ public MessageSendEvent clone() {
+ number ret = bindings.MessageSendEvent_clone(this.ptr);
+ MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
}
export class HTLCEvent extends MonitorEvent {
+ public htlc_event: HTLCUpdate;
private constructor(ptr: number, obj: bindings.LDKMonitorEvent.HTLCEvent) {
super(null, ptr);
+ const htlc_event: number = obj.htlc_event;
+ const htlc_event_hu_conv: HTLCUpdate = new HTLCUpdate(null, htlc_event);
+ htlc_event_hu_conv.ptrs_to.add(this);
+ this.htlc_event = htlc_event_hu_conv;
}
}
export class CommitmentTxBroadcasted extends MonitorEvent {
+ public commitment_tx_broadcasted: OutPoint;
private constructor(ptr: number, obj: bindings.LDKMonitorEvent.CommitmentTxBroadcasted) {
super(null, ptr);
+ const commitment_tx_broadcasted: number = obj.commitment_tx_broadcasted;
+ const commitment_tx_broadcasted_hu_conv: OutPoint = new OutPoint(null, commitment_tx_broadcasted);
+ commitment_tx_broadcasted_hu_conv.ptrs_to.add(this);
+ this.commitment_tx_broadcasted = commitment_tx_broadcasted_hu_conv;
}
+}
+ public MonitorEvent clone() {
+ number ret = bindings.MonitorEvent_clone(this.ptr);
+ MonitorEvent ret_hu_conv = MonitorEvent.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
this.version = obj.version;
this.port = obj.port;
}
+}
+ public NetAddress clone() {
+ number ret = bindings.NetAddress_clone(this.ptr);
+ NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public Uint8Array write() {
+ Uint8Array ret = bindings.NetAddress_write(this.ptr);
+ return ret;
+ }
+
}
--- /dev/null
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+export default class COption_C2Tuple_usizeTransactionZZ extends CommonBase {
+ protected constructor(_dummy: object, ptr: number) { super(ptr); }
+ protected finalize() {
+ super.finalize();
+ if (this.ptr != 0) { bindings.COption_C2Tuple_usizeTransactionZZ_free(this.ptr); }
+ }
+ static constr_from_ptr(ptr: number): COption_C2Tuple_usizeTransactionZZ {
+ const raw_val: bindings.LDKCOption_C2Tuple_usizeTransactionZZ = bindings.LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(ptr);
+ if (raw_val instanceof bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some) {
+ return new Some(this.ptr, raw_val);
+ }
+ if (raw_val instanceof bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None) {
+ return new None(this.ptr, raw_val);
+ }
+ throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+ }
+
+}
+export class Some extends COption_C2Tuple_usizeTransactionZZ {
+ public some: TwoTuple<Number, Uint8Array>;
+ private constructor(ptr: number, obj: bindings.LDKCOption_C2Tuple_usizeTransactionZZ.Some) {
+ super(null, ptr);
+ const some: number = obj.some;
+ number some_a = bindings.LDKC2Tuple_usizeTransactionZ_get_a(some);
+ Uint8Array some_b = bindings.LDKC2Tuple_usizeTransactionZ_get_b(some);
+ TwoTuple<Number, Uint8Array> some_conv = new TwoTuple<Number, Uint8Array>(some_a, some_b, () -> {
+ bindings.C2Tuple_usizeTransactionZ_free(some);
+ });
+ this.some = some_conv;
+ }
+}
+export class None extends COption_C2Tuple_usizeTransactionZZ {
+ private constructor(ptr: number, obj: bindings.LDKCOption_C2Tuple_usizeTransactionZZ.None) {
+ super(null, ptr);
+ }
+}
+ public static Option_C2Tuple_usizeTransactionZZ constructor__some(TwoTuple<Number, Uint8Array> o) {
+ number ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(bindings.C2Tuple_usizeTransactionZ_new(o.a, o.b));
+ Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ public static Option_C2Tuple_usizeTransactionZZ constructor__none() {
+ number ret = bindings.COption_C2Tuple_usizeTransactionZZ_none();
+ Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+export default class COption_u32Z extends CommonBase {
+ protected constructor(_dummy: object, ptr: number) { super(ptr); }
+ protected finalize() {
+ super.finalize();
+ if (this.ptr != 0) { bindings.COption_u32Z_free(this.ptr); }
+ }
+ static constr_from_ptr(ptr: number): COption_u32Z {
+ const raw_val: bindings.LDKCOption_u32Z = bindings.LDKCOption_u32Z_ref_from_ptr(ptr);
+ if (raw_val instanceof bindings.LDKCOption_u32Z.Some) {
+ return new Some(this.ptr, raw_val);
+ }
+ if (raw_val instanceof bindings.LDKCOption_u32Z.None) {
+ return new None(this.ptr, raw_val);
+ }
+ throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+ }
+
+}
+export class Some extends COption_u32Z {
+ public some: number;
+ private constructor(ptr: number, obj: bindings.LDKCOption_u32Z.Some) {
+ super(null, ptr);
+ this.some = obj.some;
+ }
+}
+export class None extends COption_u32Z {
+ private constructor(ptr: number, obj: bindings.LDKCOption_u32Z.None) {
+ super(null, ptr);
+ }
+}
+ public static Option_u32Z constructor__some(number o) {
+ number ret = bindings.COption_u32Z_some(o);
+ Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ public static Option_u32Z constructor__none() {
+ number ret = bindings.COption_u32Z_none();
+ Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ public Option_u32Z _clone() {
+ number ret = bindings.COption_u32Z_clone(this.ptr);
+ Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+}
--- /dev/null
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+export default class COption_u64Z extends CommonBase {
+ protected constructor(_dummy: object, ptr: number) { super(ptr); }
+ protected finalize() {
+ super.finalize();
+ if (this.ptr != 0) { bindings.COption_u64Z_free(this.ptr); }
+ }
+ static constr_from_ptr(ptr: number): COption_u64Z {
+ const raw_val: bindings.LDKCOption_u64Z = bindings.LDKCOption_u64Z_ref_from_ptr(ptr);
+ if (raw_val instanceof bindings.LDKCOption_u64Z.Some) {
+ return new Some(this.ptr, raw_val);
+ }
+ if (raw_val instanceof bindings.LDKCOption_u64Z.None) {
+ return new None(this.ptr, raw_val);
+ }
+ throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+ }
+
+}
+export class Some extends COption_u64Z {
+ public some: number;
+ private constructor(ptr: number, obj: bindings.LDKCOption_u64Z.Some) {
+ super(null, ptr);
+ this.some = obj.some;
+ }
+}
+export class None extends COption_u64Z {
+ private constructor(ptr: number, obj: bindings.LDKCOption_u64Z.None) {
+ super(null, ptr);
+ }
+}
+ public static Option_u64Z constructor__some(number o) {
+ number ret = bindings.COption_u64Z_some(o);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ public static Option_u64Z constructor__none() {
+ number ret = bindings.COption_u64Z_none();
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ public Option_u64Z _clone() {
+ number ret = bindings.COption_u64Z_clone(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+}
}
export class ParameterError extends PaymentSendFailure {
+ public parameter_error: APIError;
private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.ParameterError) {
super(null, ptr);
+ const parameter_error: number = obj.parameter_error;
+ APIError parameter_error_hu_conv = APIError.constr_from_ptr(parameter_error);
+ parameter_error_hu_conv.ptrs_to.add(this);
+ this.parameter_error = parameter_error_hu_conv;
}
}
export class PathParameterError extends PaymentSendFailure {
+ public path_parameter_error: Result_NoneAPIErrorZ[];
private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.PathParameterError) {
super(null, ptr);
+ const path_parameter_error: number[] = obj.path_parameter_error;
+ Result_NoneAPIErrorZ[] path_parameter_error_conv_22_arr = new Result_NoneAPIErrorZ[path_parameter_error.length];
+ for (int w = 0; w < path_parameter_error.length; w++) {
+ number path_parameter_error_conv_22 = path_parameter_error[w];
+ Result_NoneAPIErrorZ path_parameter_error_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(path_parameter_error_conv_22);
+ path_parameter_error_conv_22_arr[w] = path_parameter_error_conv_22_hu_conv;
+ }
+ this.path_parameter_error = path_parameter_error_conv_22_arr;
}
}
export class AllFailedRetrySafe extends PaymentSendFailure {
+ public all_failed_retry_safe: APIError[];
private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.AllFailedRetrySafe) {
super(null, ptr);
+ const all_failed_retry_safe: number[] = obj.all_failed_retry_safe;
+ APIError[] all_failed_retry_safe_conv_10_arr = new APIError[all_failed_retry_safe.length];
+ for (int k = 0; k < all_failed_retry_safe.length; k++) {
+ number all_failed_retry_safe_conv_10 = all_failed_retry_safe[k];
+ APIError all_failed_retry_safe_conv_10_hu_conv = APIError.constr_from_ptr(all_failed_retry_safe_conv_10);
+ all_failed_retry_safe_conv_10_hu_conv.ptrs_to.add(this);
+ all_failed_retry_safe_conv_10_arr[k] = all_failed_retry_safe_conv_10_hu_conv;
+ }
+ this.all_failed_retry_safe = all_failed_retry_safe_conv_10_arr;
}
}
export class PartialFailure extends PaymentSendFailure {
+ public partial_failure: Result_NoneAPIErrorZ[];
private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.PartialFailure) {
super(null, ptr);
+ const partial_failure: number[] = obj.partial_failure;
+ Result_NoneAPIErrorZ[] partial_failure_conv_22_arr = new Result_NoneAPIErrorZ[partial_failure.length];
+ for (int w = 0; w < partial_failure.length; w++) {
+ number partial_failure_conv_22 = partial_failure[w];
+ Result_NoneAPIErrorZ partial_failure_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(partial_failure_conv_22);
+ partial_failure_conv_22_arr[w] = partial_failure_conv_22_hu_conv;
+ }
+ this.partial_failure = partial_failure_conv_22_arr;
}
+}
+ public PaymentSendFailure clone() {
+ number ret = bindings.PaymentSendFailure_clone(this.ptr);
+ PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_AcceptChannelDecodeErrorZ_OK(AcceptChannel res) {
- this(null, bindings.CResult_AcceptChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_AcceptChannelDecodeErrorZ_Err extends Result_AcceptChannelDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_AcceptChannelDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_AcceptChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_AcceptChannelDecodeErrorZ constructor__ok(AcceptChannel o) {
+ number ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_AcceptChannelDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_AcceptChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_AcceptChannelDecodeErrorZ _clone() {
+ number ret = bindings.CResult_AcceptChannelDecodeErrorZ_clone(this.ptr);
+ Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_AnnouncementSignaturesDecodeErrorZ_OK(AnnouncementSignatures res) {
- this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_AnnouncementSignaturesDecodeErrorZ_Err extends Result_AnnouncementSignaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_AnnouncementSignaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_AnnouncementSignaturesDecodeErrorZ constructor__ok(AnnouncementSignatures o) {
+ number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_AnnouncementSignaturesDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_AnnouncementSignaturesDecodeErrorZ _clone() {
+ number ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_clone(this.ptr);
+ Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_BuiltCommitmentTransactionDecodeErrorZ_OK(BuiltCommitmentTransaction res) {
- this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_BuiltCommitmentTransactionDecodeErrorZ_Err extends Result_BuiltCommitmentTransactionDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_BuiltCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor__ok(BuiltCommitmentTransaction o) {
+ number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_BuiltCommitmentTransactionDecodeErrorZ _clone() {
+ number ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(this.ptr);
+ Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_b_hu_conv.ptrs_to.add(res_conv);
this.res = res_conv;
}
- public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(TwoTuple<Uint8Array, ChannelManager> res) {
- this(null, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(res.a, res.b == null ? 0 : res.b.ptr & ~1)));
- this.ptrs_to.add(res.b);
- // 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, res.b is reset to null and is now a dummy object.
- res.b.ptr = 0;
- }
}
public static final class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err extends Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor__ok(TwoTuple<Uint8Array, ChannelManager> o) {
+ number ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelManagerZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+ Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o.b);
+ // 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.b is reset to null and is now a dummy object.
+ o.b.ptr = 0;
+ return ret_hu_conv;
+ }
+
+ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_b_hu_conv.ptrs_to.add(res_conv);
this.res = res_conv;
}
- public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(TwoTuple<Uint8Array, ChannelMonitor> res) {
- this(null, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(res.a, res.b == null ? 0 : res.b.ptr & ~1)));
- this.ptrs_to.add(res.b);
- }
}
public static final class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err extends Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor__ok(TwoTuple<Uint8Array, ChannelMonitor> o) {
+ number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(bindings.C2Tuple_BlockHashChannelMonitorZ_new(o.a, o.b == null ? 0 : o.b.ptr & ~1));
+ Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o.b);
+ return ret_hu_conv;
+ }
+
+ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
});
this.res = res_conv;
}
- public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(TwoTuple<Uint8Array, Uint8Array[]> res) {
- this(null, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(res.a, res.b)));
- }
}
public static final class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
private Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err() {
- this(null, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err());
- }
}
+
+ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor__ok(TwoTuple<Uint8Array, Uint8Array[]> o) {
+ number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(bindings.C2Tuple_SignatureCVec_SignatureZZ_new(o.a, o.b));
+ Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ constructor__err() {
+ number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+ Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ _clone() {
+ number ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(this.ptr);
+ Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
Result_NetAddressu8Z res_hu_conv = Result_NetAddressu8Z.constr_from_ptr(res);
this.res = res_hu_conv;
}
- public Result_CResult_NetAddressu8ZDecodeErrorZ_OK(Result_NetAddressu8Z res) {
- this(null, bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(res != null ? res.ptr : 0));
- }
}
public static final class Result_CResult_NetAddressu8ZDecodeErrorZ_Err extends Result_CResult_NetAddressu8ZDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CResult_NetAddressu8ZDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor__ok(Result_NetAddressu8Z o) {
+ number ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o != null ? o.ptr : 0);
+ Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_CResult_NetAddressu8ZDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_CResult_NetAddressu8ZDecodeErrorZ _clone() {
+ number ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(this.ptr);
+ Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(ptr);
}
- public Result_CVec_CVec_u8ZZNoneZ_OK(Uint8Array[] res) {
- this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(res));
- }
}
public static final class Result_CVec_CVec_u8ZZNoneZ_Err extends Result_CVec_CVec_u8ZZNoneZ {
private Result_CVec_CVec_u8ZZNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_CVec_CVec_u8ZZNoneZ_Err() {
- this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_err());
- }
}
+
+ public static Result_CVec_CVec_u8ZZNoneZ constructor__ok(Uint8Array[] o) {
+ number ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
+ Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_CVec_CVec_u8ZZNoneZ constructor__err() {
+ number ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_err();
+ Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_CVec_CVec_u8ZZNoneZ _clone() {
+ number ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_clone(this.ptr);
+ Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_CVec_SignatureZNoneZ_get_ok(ptr);
}
- public Result_CVec_SignatureZNoneZ_OK(Uint8Array[] res) {
- this(null, bindings.CResult_CVec_SignatureZNoneZ_ok(res));
- }
}
public static final class Result_CVec_SignatureZNoneZ_Err extends Result_CVec_SignatureZNoneZ {
private Result_CVec_SignatureZNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_CVec_SignatureZNoneZ_Err() {
- this(null, bindings.CResult_CVec_SignatureZNoneZ_err());
- }
}
+
+ public static Result_CVec_SignatureZNoneZ constructor__ok(Uint8Array[] o) {
+ number ret = bindings.CResult_CVec_SignatureZNoneZ_ok(o);
+ Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_CVec_SignatureZNoneZ constructor__err() {
+ number ret = bindings.CResult_CVec_SignatureZNoneZ_err();
+ Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_CVec_SignatureZNoneZ _clone() {
+ number ret = bindings.CResult_CVec_SignatureZNoneZ_clone(this.ptr);
+ Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(ptr);
}
- public Result_CVec_u8ZPeerHandleErrorZ_OK(Uint8Array res) {
- this(null, bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(res));
- }
}
public static final class Result_CVec_u8ZPeerHandleErrorZ_Err extends Result_CVec_u8ZPeerHandleErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CVec_u8ZPeerHandleErrorZ_Err(PeerHandleError err) {
- this(null, bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_CVec_u8ZPeerHandleErrorZ constructor__ok(Uint8Array o) {
+ number ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(o);
+ Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_CVec_u8ZPeerHandleErrorZ constructor__err(PeerHandleError e) {
+ number ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_CVec_u8ZPeerHandleErrorZ _clone() {
+ number ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_clone(this.ptr);
+ Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelAnnouncementDecodeErrorZ_OK(ChannelAnnouncement res) {
- this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelAnnouncementDecodeErrorZ_Err extends Result_ChannelAnnouncementDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ChannelAnnouncementDecodeErrorZ constructor__ok(ChannelAnnouncement o) {
+ number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ChannelAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ChannelAnnouncementDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_clone(this.ptr);
+ Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelConfigDecodeErrorZ_OK(ChannelConfig res) {
- this(null, bindings.CResult_ChannelConfigDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelConfigDecodeErrorZ_Err extends Result_ChannelConfigDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelConfigDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelConfigDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ChannelConfigDecodeErrorZ constructor__ok(ChannelConfig o) {
+ number ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ChannelConfigDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ChannelConfigDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ChannelConfigDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ChannelConfigDecodeErrorZ_clone(this.ptr);
+ Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelFeaturesDecodeErrorZ_OK(ChannelFeatures res) {
- this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelFeaturesDecodeErrorZ_Err extends Result_ChannelFeaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelFeaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ChannelFeaturesDecodeErrorZ constructor__ok(ChannelFeatures o) {
+ number ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ChannelFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelInfoDecodeErrorZ_OK(ChannelInfo res) {
- this(null, bindings.CResult_ChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelInfoDecodeErrorZ_Err extends Result_ChannelInfoDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelInfoDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ChannelInfoDecodeErrorZ constructor__ok(ChannelInfo o) {
+ number ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ChannelInfoDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ChannelInfoDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ChannelInfoDecodeErrorZ_clone(this.ptr);
+ Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelMonitorUpdateDecodeErrorZ_OK(ChannelMonitorUpdate res) {
- this(null, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelMonitorUpdateDecodeErrorZ_Err extends Result_ChannelMonitorUpdateDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelMonitorUpdateDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ChannelMonitorUpdateDecodeErrorZ constructor__ok(ChannelMonitorUpdate o) {
+ number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ChannelMonitorUpdateDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ChannelMonitorUpdateDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(this.ptr);
+ Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelPublicKeysDecodeErrorZ_OK(ChannelPublicKeys res) {
- this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelPublicKeysDecodeErrorZ_Err extends Result_ChannelPublicKeysDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelPublicKeysDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ChannelPublicKeysDecodeErrorZ constructor__ok(ChannelPublicKeys o) {
+ number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ChannelPublicKeysDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ChannelPublicKeysDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_clone(this.ptr);
+ Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelReestablishDecodeErrorZ_OK(ChannelReestablish res) {
- this(null, bindings.CResult_ChannelReestablishDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelReestablishDecodeErrorZ_Err extends Result_ChannelReestablishDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelReestablishDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelReestablishDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ChannelReestablishDecodeErrorZ constructor__ok(ChannelReestablish o) {
+ number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ChannelReestablishDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ChannelReestablishDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ChannelReestablishDecodeErrorZ_clone(this.ptr);
+ Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelTransactionParametersDecodeErrorZ_OK(ChannelTransactionParameters res) {
- this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelTransactionParametersDecodeErrorZ_Err extends Result_ChannelTransactionParametersDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ChannelTransactionParametersDecodeErrorZ constructor__ok(ChannelTransactionParameters o) {
+ number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ChannelTransactionParametersDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ChannelTransactionParametersDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
+ Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ChannelUpdateDecodeErrorZ_OK(ChannelUpdate res) {
- this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ChannelUpdateDecodeErrorZ_Err extends Result_ChannelUpdateDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ChannelUpdateDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ChannelUpdateDecodeErrorZ constructor__ok(ChannelUpdate o) {
+ number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ChannelUpdateDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ChannelUpdateDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ChannelUpdateDecodeErrorZ_clone(this.ptr);
+ Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ClosingSignedDecodeErrorZ_OK(ClosingSigned res) {
- this(null, bindings.CResult_ClosingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ClosingSignedDecodeErrorZ_Err extends Result_ClosingSignedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ClosingSignedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ClosingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ClosingSignedDecodeErrorZ constructor__ok(ClosingSigned o) {
+ number ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ClosingSignedDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ClosingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ClosingSignedDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ClosingSignedDecodeErrorZ_clone(this.ptr);
+ Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_CommitmentSignedDecodeErrorZ_OK(CommitmentSigned res) {
- this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_CommitmentSignedDecodeErrorZ_Err extends Result_CommitmentSignedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CommitmentSignedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_CommitmentSignedDecodeErrorZ constructor__ok(CommitmentSigned o) {
+ number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_CommitmentSignedDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_CommitmentSignedDecodeErrorZ _clone() {
+ number ret = bindings.CResult_CommitmentSignedDecodeErrorZ_clone(this.ptr);
+ Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_CommitmentTransactionDecodeErrorZ_OK(CommitmentTransaction res) {
- this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_CommitmentTransactionDecodeErrorZ_Err extends Result_CommitmentTransactionDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_CommitmentTransactionDecodeErrorZ constructor__ok(CommitmentTransaction o) {
+ number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_CommitmentTransactionDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_CommitmentTransactionDecodeErrorZ _clone() {
+ number ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_clone(this.ptr);
+ Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(CounterpartyChannelTransactionParameters res) {
- this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err extends Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor__ok(CounterpartyChannelTransactionParameters o) {
+ number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_CounterpartyChannelTransactionParametersDecodeErrorZ _clone() {
+ number ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(this.ptr);
+ Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_DirectionalChannelInfoDecodeErrorZ_OK(DirectionalChannelInfo res) {
- this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_DirectionalChannelInfoDecodeErrorZ_Err extends Result_DirectionalChannelInfoDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_DirectionalChannelInfoDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_DirectionalChannelInfoDecodeErrorZ constructor__ok(DirectionalChannelInfo o) {
+ number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_DirectionalChannelInfoDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_DirectionalChannelInfoDecodeErrorZ _clone() {
+ number ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_clone(this.ptr);
+ Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ErrorMessageDecodeErrorZ_OK(ErrorMessage res) {
- this(null, bindings.CResult_ErrorMessageDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ErrorMessageDecodeErrorZ_Err extends Result_ErrorMessageDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ErrorMessageDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ErrorMessageDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ErrorMessageDecodeErrorZ constructor__ok(ErrorMessage o) {
+ number ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ErrorMessageDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ErrorMessageDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ErrorMessageDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ErrorMessageDecodeErrorZ_clone(this.ptr);
+ Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_FundingCreatedDecodeErrorZ_OK(FundingCreated res) {
- this(null, bindings.CResult_FundingCreatedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_FundingCreatedDecodeErrorZ_Err extends Result_FundingCreatedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_FundingCreatedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_FundingCreatedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_FundingCreatedDecodeErrorZ constructor__ok(FundingCreated o) {
+ number ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_FundingCreatedDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_FundingCreatedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_FundingCreatedDecodeErrorZ _clone() {
+ number ret = bindings.CResult_FundingCreatedDecodeErrorZ_clone(this.ptr);
+ Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_FundingLockedDecodeErrorZ_OK(FundingLocked res) {
- this(null, bindings.CResult_FundingLockedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_FundingLockedDecodeErrorZ_Err extends Result_FundingLockedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_FundingLockedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_FundingLockedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_FundingLockedDecodeErrorZ constructor__ok(FundingLocked o) {
+ number ret = bindings.CResult_FundingLockedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_FundingLockedDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_FundingLockedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_FundingLockedDecodeErrorZ _clone() {
+ number ret = bindings.CResult_FundingLockedDecodeErrorZ_clone(this.ptr);
+ Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_FundingSignedDecodeErrorZ_OK(FundingSigned res) {
- this(null, bindings.CResult_FundingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_FundingSignedDecodeErrorZ_Err extends Result_FundingSignedDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_FundingSignedDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_FundingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_FundingSignedDecodeErrorZ constructor__ok(FundingSigned o) {
+ number ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_FundingSignedDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_FundingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_FundingSignedDecodeErrorZ _clone() {
+ number ret = bindings.CResult_FundingSignedDecodeErrorZ_clone(this.ptr);
+ Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_GossipTimestampFilterDecodeErrorZ_OK(GossipTimestampFilter res) {
- this(null, bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_GossipTimestampFilterDecodeErrorZ_Err extends Result_GossipTimestampFilterDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_GossipTimestampFilterDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_GossipTimestampFilterDecodeErrorZ constructor__ok(GossipTimestampFilter o) {
+ number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_GossipTimestampFilterDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_GossipTimestampFilterDecodeErrorZ _clone() {
+ number ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_clone(this.ptr);
+ Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_HTLCOutputInCommitmentDecodeErrorZ_OK(HTLCOutputInCommitment res) {
- this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_HTLCOutputInCommitmentDecodeErrorZ_Err extends Result_HTLCOutputInCommitmentDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_HTLCOutputInCommitmentDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor__ok(HTLCOutputInCommitment o) {
+ number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_HTLCOutputInCommitmentDecodeErrorZ _clone() {
+ number ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(this.ptr);
+ Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_HTLCUpdateDecodeErrorZ_OK(HTLCUpdate res) {
- this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_HTLCUpdateDecodeErrorZ_Err extends Result_HTLCUpdateDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_HTLCUpdateDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_HTLCUpdateDecodeErrorZ constructor__ok(HTLCUpdate o) {
+ number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_HTLCUpdateDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_HTLCUpdateDecodeErrorZ _clone() {
+ number ret = bindings.CResult_HTLCUpdateDecodeErrorZ_clone(this.ptr);
+ Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_HolderCommitmentTransactionDecodeErrorZ_OK(HolderCommitmentTransaction res) {
- this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_HolderCommitmentTransactionDecodeErrorZ_Err extends Result_HolderCommitmentTransactionDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_HolderCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_HolderCommitmentTransactionDecodeErrorZ constructor__ok(HolderCommitmentTransaction o) {
+ number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_HolderCommitmentTransactionDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_HolderCommitmentTransactionDecodeErrorZ _clone() {
+ number ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(this.ptr);
+ Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_InMemorySignerDecodeErrorZ_OK(InMemorySigner res) {
- this(null, bindings.CResult_InMemorySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_InMemorySignerDecodeErrorZ_Err extends Result_InMemorySignerDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_InMemorySignerDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_InMemorySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_InMemorySignerDecodeErrorZ constructor__ok(InMemorySigner o) {
+ number ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_InMemorySignerDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_InMemorySignerDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_InMemorySignerDecodeErrorZ _clone() {
+ number ret = bindings.CResult_InMemorySignerDecodeErrorZ_clone(this.ptr);
+ Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_InitDecodeErrorZ_OK(Init res) {
- this(null, bindings.CResult_InitDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_InitDecodeErrorZ_Err extends Result_InitDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_InitDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_InitDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_InitDecodeErrorZ constructor__ok(Init o) {
+ number ret = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_InitDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_InitDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_InitDecodeErrorZ _clone() {
+ number ret = bindings.CResult_InitDecodeErrorZ_clone(this.ptr);
+ Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_InitFeaturesDecodeErrorZ_OK(InitFeatures res) {
- this(null, bindings.CResult_InitFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_InitFeaturesDecodeErrorZ_Err extends Result_InitFeaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_InitFeaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_InitFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_InitFeaturesDecodeErrorZ constructor__ok(InitFeatures o) {
+ number ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_InitFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_InitFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_InvoiceFeaturesDecodeErrorZ_OK(InvoiceFeatures res) {
- this(null, bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_InvoiceFeaturesDecodeErrorZ_Err extends Result_InvoiceFeaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_InvoiceFeaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_InvoiceFeaturesDecodeErrorZ constructor__ok(InvoiceFeatures o) {
+ number ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_InvoiceFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NetAddressu8Z_OK(NetAddress res) {
- this(null, bindings.CResult_NetAddressu8Z_ok(res.ptr));
- }
}
public static final class Result_NetAddressu8Z_Err extends Result_NetAddressu8Z {
super(_dummy, ptr);
this.err = bindings.LDKCResult_NetAddressu8Z_get_err(ptr);
}
- public Result_NetAddressu8Z_Err(number err) {
- this(null, bindings.CResult_NetAddressu8Z_err(err));
- }
}
+
+ public static Result_NetAddressu8Z constructor__ok(NetAddress o) {
+ number ret = bindings.CResult_NetAddressu8Z_ok(o.ptr);
+ Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_NetAddressu8Z constructor__err(number e) {
+ number ret = bindings.CResult_NetAddressu8Z_err(e);
+ Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_NetAddressu8Z _clone() {
+ number ret = bindings.CResult_NetAddressu8Z_clone(this.ptr);
+ Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NetworkGraphDecodeErrorZ_OK(NetworkGraph res) {
- this(null, bindings.CResult_NetworkGraphDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NetworkGraphDecodeErrorZ_Err extends Result_NetworkGraphDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NetworkGraphDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NetworkGraphDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_NetworkGraphDecodeErrorZ constructor__ok(NetworkGraph o) {
+ number ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_NetworkGraphDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_NetworkGraphDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_NetworkGraphDecodeErrorZ _clone() {
+ number ret = bindings.CResult_NetworkGraphDecodeErrorZ_clone(this.ptr);
+ Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NodeAnnouncementDecodeErrorZ_OK(NodeAnnouncement res) {
- this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NodeAnnouncementDecodeErrorZ_Err extends Result_NodeAnnouncementDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_NodeAnnouncementDecodeErrorZ constructor__ok(NodeAnnouncement o) {
+ number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_NodeAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_NodeAnnouncementDecodeErrorZ _clone() {
+ number ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_clone(this.ptr);
+ Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NodeAnnouncementInfoDecodeErrorZ_OK(NodeAnnouncementInfo res) {
- this(null, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NodeAnnouncementInfoDecodeErrorZ_Err extends Result_NodeAnnouncementInfoDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NodeAnnouncementInfoDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_NodeAnnouncementInfoDecodeErrorZ constructor__ok(NodeAnnouncementInfo o) {
+ number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_NodeAnnouncementInfoDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_NodeAnnouncementInfoDecodeErrorZ _clone() {
+ number ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(this.ptr);
+ Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NodeFeaturesDecodeErrorZ_OK(NodeFeatures res) {
- this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NodeFeaturesDecodeErrorZ_Err extends Result_NodeFeaturesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NodeFeaturesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_NodeFeaturesDecodeErrorZ constructor__ok(NodeFeatures o) {
+ number ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_NodeFeaturesDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_NodeFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_NodeInfoDecodeErrorZ_OK(NodeInfo res) {
- this(null, bindings.CResult_NodeInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_NodeInfoDecodeErrorZ_Err extends Result_NodeInfoDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NodeInfoDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_NodeInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_NodeInfoDecodeErrorZ constructor__ok(NodeInfo o) {
+ number ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_NodeInfoDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_NodeInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_NodeInfoDecodeErrorZ _clone() {
+ number ret = bindings.CResult_NodeInfoDecodeErrorZ_clone(this.ptr);
+ Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NoneAPIErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NoneAPIErrorZ_OK() {
- this(null, bindings.CResult_NoneAPIErrorZ_ok());
- }
}
public static final class Result_NoneAPIErrorZ_Err extends Result_NoneAPIErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NoneAPIErrorZ_Err(APIError err) {
- this(null, bindings.CResult_NoneAPIErrorZ_err(err.ptr));
- }
}
+
+ public static Result_NoneAPIErrorZ constructor__ok() {
+ number ret = bindings.CResult_NoneAPIErrorZ_ok();
+ Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_NoneAPIErrorZ constructor__err(APIError e) {
+ number ret = bindings.CResult_NoneAPIErrorZ_err(e.ptr);
+ Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_NoneAPIErrorZ _clone() {
+ number ret = bindings.CResult_NoneAPIErrorZ_clone(this.ptr);
+ Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NoneChannelMonitorUpdateErrZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NoneChannelMonitorUpdateErrZ_OK() {
- this(null, bindings.CResult_NoneChannelMonitorUpdateErrZ_ok());
- }
}
public static final class Result_NoneChannelMonitorUpdateErrZ_Err extends Result_NoneChannelMonitorUpdateErrZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(ptr);
}
- public Result_NoneChannelMonitorUpdateErrZ_Err(LDKChannelMonitorUpdateErr err) {
- this(null, bindings.CResult_NoneChannelMonitorUpdateErrZ_err(err));
- }
}
+
+ public static Result_NoneChannelMonitorUpdateErrZ constructor__ok() {
+ number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
+ Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_NoneChannelMonitorUpdateErrZ constructor__err(LDKChannelMonitorUpdateErr e) {
+ number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e);
+ Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_NoneChannelMonitorUpdateErrZ _clone() {
+ number ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
+ Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NoneLightningErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NoneLightningErrorZ_OK() {
- this(null, bindings.CResult_NoneLightningErrorZ_ok());
- }
}
public static final class Result_NoneLightningErrorZ_Err extends Result_NoneLightningErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NoneLightningErrorZ_Err(LightningError err) {
- this(null, bindings.CResult_NoneLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_NoneLightningErrorZ constructor__ok() {
+ number ret = bindings.CResult_NoneLightningErrorZ_ok();
+ Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_NoneLightningErrorZ constructor__err(LightningError e) {
+ number ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_NoneLightningErrorZ _clone() {
+ number ret = bindings.CResult_NoneLightningErrorZ_clone(this.ptr);
+ Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NoneMonitorUpdateErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NoneMonitorUpdateErrorZ_OK() {
- this(null, bindings.CResult_NoneMonitorUpdateErrorZ_ok());
- }
}
public static final class Result_NoneMonitorUpdateErrorZ_Err extends Result_NoneMonitorUpdateErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NoneMonitorUpdateErrorZ_Err(MonitorUpdateError err) {
- this(null, bindings.CResult_NoneMonitorUpdateErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_NoneMonitorUpdateErrorZ constructor__ok() {
+ number ret = bindings.CResult_NoneMonitorUpdateErrorZ_ok();
+ Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_NoneMonitorUpdateErrorZ constructor__err(MonitorUpdateError e) {
+ number ret = bindings.CResult_NoneMonitorUpdateErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_NoneMonitorUpdateErrorZ _clone() {
+ number ret = bindings.CResult_NoneMonitorUpdateErrorZ_clone(this.ptr);
+ Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NonePaymentSendFailureZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NonePaymentSendFailureZ_OK() {
- this(null, bindings.CResult_NonePaymentSendFailureZ_ok());
- }
}
public static final class Result_NonePaymentSendFailureZ_Err extends Result_NonePaymentSendFailureZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NonePaymentSendFailureZ_Err(PaymentSendFailure err) {
- this(null, bindings.CResult_NonePaymentSendFailureZ_err(err.ptr));
- }
}
+
+ public static Result_NonePaymentSendFailureZ constructor__ok() {
+ number ret = bindings.CResult_NonePaymentSendFailureZ_ok();
+ Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_NonePaymentSendFailureZ constructor__err(PaymentSendFailure e) {
+ number ret = bindings.CResult_NonePaymentSendFailureZ_err(e.ptr);
+ Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_NonePaymentSendFailureZ _clone() {
+ number ret = bindings.CResult_NonePaymentSendFailureZ_clone(this.ptr);
+ Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
private Result_NonePeerHandleErrorZ_OK(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_NonePeerHandleErrorZ_OK() {
- this(null, bindings.CResult_NonePeerHandleErrorZ_ok());
- }
}
public static final class Result_NonePeerHandleErrorZ_Err extends Result_NonePeerHandleErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_NonePeerHandleErrorZ_Err(PeerHandleError err) {
- this(null, bindings.CResult_NonePeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_NonePeerHandleErrorZ constructor__ok() {
+ number ret = bindings.CResult_NonePeerHandleErrorZ_ok();
+ Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_NonePeerHandleErrorZ constructor__err(PeerHandleError e) {
+ number ret = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_NonePeerHandleErrorZ _clone() {
+ number ret = bindings.CResult_NonePeerHandleErrorZ_clone(this.ptr);
+ Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_OpenChannelDecodeErrorZ_OK(OpenChannel res) {
- this(null, bindings.CResult_OpenChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_OpenChannelDecodeErrorZ_Err extends Result_OpenChannelDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_OpenChannelDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_OpenChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_OpenChannelDecodeErrorZ constructor__ok(OpenChannel o) {
+ number ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_OpenChannelDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_OpenChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_OpenChannelDecodeErrorZ _clone() {
+ number ret = bindings.CResult_OpenChannelDecodeErrorZ_clone(this.ptr);
+ Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_OutPointDecodeErrorZ_OK(OutPoint res) {
- this(null, bindings.CResult_OutPointDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_OutPointDecodeErrorZ_Err extends Result_OutPointDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_OutPointDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_OutPointDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_OutPointDecodeErrorZ constructor__ok(OutPoint o) {
+ number ret = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_OutPointDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_OutPointDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_OutPointDecodeErrorZ _clone() {
+ number ret = bindings.CResult_OutPointDecodeErrorZ_clone(this.ptr);
+ Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_PingDecodeErrorZ_OK(Ping res) {
- this(null, bindings.CResult_PingDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_PingDecodeErrorZ_Err extends Result_PingDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_PingDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_PingDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_PingDecodeErrorZ constructor__ok(Ping o) {
+ number ret = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_PingDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_PingDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_PingDecodeErrorZ _clone() {
+ number ret = bindings.CResult_PingDecodeErrorZ_clone(this.ptr);
+ Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_PongDecodeErrorZ_OK(Pong res) {
- this(null, bindings.CResult_PongDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_PongDecodeErrorZ_Err extends Result_PongDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_PongDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_PongDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_PongDecodeErrorZ constructor__ok(Pong o) {
+ number ret = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_PongDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_PongDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_PongDecodeErrorZ _clone() {
+ number ret = bindings.CResult_PongDecodeErrorZ_clone(this.ptr);
+ Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_PublicKeyErrorZ_get_ok(ptr);
}
- public Result_PublicKeyErrorZ_OK(Uint8Array res) {
- this(null, bindings.CResult_PublicKeyErrorZ_ok(res));
- }
}
public static final class Result_PublicKeyErrorZ_Err extends Result_PublicKeyErrorZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_PublicKeyErrorZ_get_err(ptr);
}
- public Result_PublicKeyErrorZ_Err(LDKSecp256k1Error err) {
- this(null, bindings.CResult_PublicKeyErrorZ_err(err));
- }
}
+
+ public static Result_PublicKeyErrorZ constructor__ok(Uint8Array o) {
+ number ret = bindings.CResult_PublicKeyErrorZ_ok(o);
+ Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_PublicKeyErrorZ constructor__err(LDKSecp256k1Error e) {
+ number ret = bindings.CResult_PublicKeyErrorZ_err(e);
+ Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_QueryChannelRangeDecodeErrorZ_OK(QueryChannelRange res) {
- this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_QueryChannelRangeDecodeErrorZ_Err extends Result_QueryChannelRangeDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_QueryChannelRangeDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_QueryChannelRangeDecodeErrorZ constructor__ok(QueryChannelRange o) {
+ number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_QueryChannelRangeDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_QueryChannelRangeDecodeErrorZ _clone() {
+ number ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_clone(this.ptr);
+ Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_QueryShortChannelIdsDecodeErrorZ_OK(QueryShortChannelIds res) {
- this(null, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_QueryShortChannelIdsDecodeErrorZ_Err extends Result_QueryShortChannelIdsDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_QueryShortChannelIdsDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_QueryShortChannelIdsDecodeErrorZ constructor__ok(QueryShortChannelIds o) {
+ number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_QueryShortChannelIdsDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_QueryShortChannelIdsDecodeErrorZ _clone() {
+ number ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_clone(this.ptr);
+ Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ReplyChannelRangeDecodeErrorZ_OK(ReplyChannelRange res) {
- this(null, bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ReplyChannelRangeDecodeErrorZ_Err extends Result_ReplyChannelRangeDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ReplyChannelRangeDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ReplyChannelRangeDecodeErrorZ constructor__ok(ReplyChannelRange o) {
+ number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ReplyChannelRangeDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ReplyChannelRangeDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_clone(this.ptr);
+ Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ReplyShortChannelIdsEndDecodeErrorZ_OK(ReplyShortChannelIdsEnd res) {
- this(null, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ReplyShortChannelIdsEndDecodeErrorZ_Err extends Result_ReplyShortChannelIdsEndDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ReplyShortChannelIdsEndDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor__ok(ReplyShortChannelIdsEnd o) {
+ number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ReplyShortChannelIdsEndDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(this.ptr);
+ Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_RevokeAndACKDecodeErrorZ_OK(RevokeAndACK res) {
- this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_RevokeAndACKDecodeErrorZ_Err extends Result_RevokeAndACKDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_RevokeAndACKDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_RevokeAndACKDecodeErrorZ constructor__ok(RevokeAndACK o) {
+ number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_RevokeAndACKDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_RevokeAndACKDecodeErrorZ _clone() {
+ number ret = bindings.CResult_RevokeAndACKDecodeErrorZ_clone(this.ptr);
+ Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_RouteDecodeErrorZ_OK(Route res) {
- this(null, bindings.CResult_RouteDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_RouteDecodeErrorZ_Err extends Result_RouteDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_RouteDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_RouteDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_RouteDecodeErrorZ constructor__ok(Route o) {
+ number ret = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_RouteDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_RouteDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_RouteDecodeErrorZ _clone() {
+ number ret = bindings.CResult_RouteDecodeErrorZ_clone(this.ptr);
+ Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_RouteLightningErrorZ_OK(Route res) {
- this(null, bindings.CResult_RouteLightningErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_RouteLightningErrorZ_Err extends Result_RouteLightningErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_RouteLightningErrorZ_Err(LightningError err) {
- this(null, bindings.CResult_RouteLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_RouteLightningErrorZ constructor__ok(Route o) {
+ number ret = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_RouteLightningErrorZ constructor__err(LightningError e) {
+ number ret = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_RouteLightningErrorZ _clone() {
+ number ret = bindings.CResult_RouteLightningErrorZ_clone(this.ptr);
+ Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_RoutingFeesDecodeErrorZ_OK(RoutingFees res) {
- this(null, bindings.CResult_RoutingFeesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_RoutingFeesDecodeErrorZ_Err extends Result_RoutingFeesDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_RoutingFeesDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_RoutingFeesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_RoutingFeesDecodeErrorZ constructor__ok(RoutingFees o) {
+ number ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_RoutingFeesDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_RoutingFeesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_RoutingFeesDecodeErrorZ _clone() {
+ number ret = bindings.CResult_RoutingFeesDecodeErrorZ_clone(this.ptr);
+ Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_SecretKeyErrorZ_get_ok(ptr);
}
- public Result_SecretKeyErrorZ_OK(Uint8Array res) {
- this(null, bindings.CResult_SecretKeyErrorZ_ok(res));
- }
}
public static final class Result_SecretKeyErrorZ_Err extends Result_SecretKeyErrorZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_SecretKeyErrorZ_get_err(ptr);
}
- public Result_SecretKeyErrorZ_Err(LDKSecp256k1Error err) {
- this(null, bindings.CResult_SecretKeyErrorZ_err(err));
- }
}
+
+ public static Result_SecretKeyErrorZ constructor__ok(Uint8Array o) {
+ number ret = bindings.CResult_SecretKeyErrorZ_ok(o);
+ Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_SecretKeyErrorZ constructor__err(LDKSecp256k1Error e) {
+ number ret = bindings.CResult_SecretKeyErrorZ_err(e);
+ Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_ShutdownDecodeErrorZ_OK(Shutdown res) {
- this(null, bindings.CResult_ShutdownDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_ShutdownDecodeErrorZ_Err extends Result_ShutdownDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_ShutdownDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_ShutdownDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_ShutdownDecodeErrorZ constructor__ok(Shutdown o) {
+ number ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_ShutdownDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_ShutdownDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_ShutdownDecodeErrorZ _clone() {
+ number ret = bindings.CResult_ShutdownDecodeErrorZ_clone(this.ptr);
+ Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
ret_hu_conv.ptrs_to.add(this);
this.res = ret_hu_conv;
}
- public Result_SignDecodeErrorZ_OK(Sign res) {
- this(null, bindings.CResult_SignDecodeErrorZ_ok(res == null ? 0 : res.ptr));
- this.ptrs_to.add(res);
- }
}
public static final class Result_SignDecodeErrorZ_Err extends Result_SignDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_SignDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_SignDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_SignDecodeErrorZ constructor__ok(Sign o) {
+ number ret = bindings.CResult_SignDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+ Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_SignDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_SignDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_SignDecodeErrorZ _clone() {
+ number ret = bindings.CResult_SignDecodeErrorZ_clone(this.ptr);
+ Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_SignatureNoneZ_get_ok(ptr);
}
- public Result_SignatureNoneZ_OK(Uint8Array res) {
- this(null, bindings.CResult_SignatureNoneZ_ok(res));
- }
}
public static final class Result_SignatureNoneZ_Err extends Result_SignatureNoneZ {
private Result_SignatureNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_SignatureNoneZ_Err() {
- this(null, bindings.CResult_SignatureNoneZ_err());
- }
}
+
+ public static Result_SignatureNoneZ constructor__ok(Uint8Array o) {
+ number ret = bindings.CResult_SignatureNoneZ_ok(o);
+ Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_SignatureNoneZ constructor__err() {
+ number ret = bindings.CResult_SignatureNoneZ_err();
+ Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_SignatureNoneZ _clone() {
+ number ret = bindings.CResult_SignatureNoneZ_clone(this.ptr);
+ Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_SpendableOutputDescriptorDecodeErrorZ_OK(SpendableOutputDescriptor res) {
- this(null, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(res.ptr));
- }
}
public static final class Result_SpendableOutputDescriptorDecodeErrorZ_Err extends Result_SpendableOutputDescriptorDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_SpendableOutputDescriptorDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_SpendableOutputDescriptorDecodeErrorZ constructor__ok(SpendableOutputDescriptor o) {
+ number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o.ptr);
+ Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_SpendableOutputDescriptorDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_SpendableOutputDescriptorDecodeErrorZ _clone() {
+ number ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(this.ptr);
+ Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_TransactionNoneZ_get_ok(ptr);
}
- public Result_TransactionNoneZ_OK(Uint8Array res) {
- this(null, bindings.CResult_TransactionNoneZ_ok(res));
- }
}
public static final class Result_TransactionNoneZ_Err extends Result_TransactionNoneZ {
private Result_TransactionNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_TransactionNoneZ_Err() {
- this(null, bindings.CResult_TransactionNoneZ_err());
- }
}
+
+ public static Result_TransactionNoneZ constructor__ok(Uint8Array o) {
+ number ret = bindings.CResult_TransactionNoneZ_ok(o);
+ Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_TransactionNoneZ constructor__err() {
+ number ret = bindings.CResult_TransactionNoneZ_err();
+ Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_TrustedCommitmentTransactionNoneZ_OK(TrustedCommitmentTransaction res) {
- this(null, bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- // 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, res is reset to null and is now a dummy object.
- res.ptr = 0;
- }
}
public static final class Result_TrustedCommitmentTransactionNoneZ_Err extends Result_TrustedCommitmentTransactionNoneZ {
private Result_TrustedCommitmentTransactionNoneZ_Err(Object _dummy, long ptr) {
super(_dummy, ptr);
}
- public Result_TrustedCommitmentTransactionNoneZ_Err() {
- this(null, bindings.CResult_TrustedCommitmentTransactionNoneZ_err());
- }
}
+
+ public static Result_TrustedCommitmentTransactionNoneZ constructor__ok(TrustedCommitmentTransaction o) {
+ number ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
+ 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;
+ }
+
+ public static Result_TrustedCommitmentTransactionNoneZ constructor__err() {
+ number ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_err();
+ Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_TxCreationKeysDecodeErrorZ_OK(TxCreationKeys res) {
- this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_TxCreationKeysDecodeErrorZ_Err extends Result_TxCreationKeysDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_TxCreationKeysDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_TxCreationKeysDecodeErrorZ constructor__ok(TxCreationKeys o) {
+ number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_TxCreationKeysDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_TxCreationKeysDecodeErrorZ _clone() {
+ number ret = bindings.CResult_TxCreationKeysDecodeErrorZ_clone(this.ptr);
+ Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_TxCreationKeysErrorZ_OK(TxCreationKeys res) {
- this(null, bindings.CResult_TxCreationKeysErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_TxCreationKeysErrorZ_Err extends Result_TxCreationKeysErrorZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_TxCreationKeysErrorZ_get_err(ptr);
}
- public Result_TxCreationKeysErrorZ_Err(LDKSecp256k1Error err) {
- this(null, bindings.CResult_TxCreationKeysErrorZ_err(err));
- }
}
+
+ public static Result_TxCreationKeysErrorZ constructor__ok(TxCreationKeys o) {
+ number ret = bindings.CResult_TxCreationKeysErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_TxCreationKeysErrorZ constructor__err(LDKSecp256k1Error e) {
+ number ret = bindings.CResult_TxCreationKeysErrorZ_err(e);
+ Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
TxOut res_conv = new TxOut(null, res);
this.res = res_conv;
}
- public Result_TxOutAccessErrorZ_OK(TxOut res) {
- this(null, bindings.CResult_TxOutAccessErrorZ_ok(res.ptr));
- }
}
public static final class Result_TxOutAccessErrorZ_Err extends Result_TxOutAccessErrorZ {
super(_dummy, ptr);
this.err = bindings.LDKCResult_TxOutAccessErrorZ_get_err(ptr);
}
- public Result_TxOutAccessErrorZ_Err(LDKAccessError err) {
- this(null, bindings.CResult_TxOutAccessErrorZ_err(err));
- }
}
+
+ public static Result_TxOutAccessErrorZ constructor__ok(TxOut o) {
+ number ret = bindings.CResult_TxOutAccessErrorZ_ok(o.ptr);
+ Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_TxOutAccessErrorZ constructor__err(LDKAccessError e) {
+ number ret = bindings.CResult_TxOutAccessErrorZ_err(e);
+ Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_TxOutAccessErrorZ _clone() {
+ number ret = bindings.CResult_TxOutAccessErrorZ_clone(this.ptr);
+ Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UnsignedChannelAnnouncementDecodeErrorZ_OK(UnsignedChannelAnnouncement res) {
- this(null, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UnsignedChannelAnnouncementDecodeErrorZ_Err extends Result_UnsignedChannelAnnouncementDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UnsignedChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor__ok(UnsignedChannelAnnouncement o) {
+ number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_UnsignedChannelAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_UnsignedChannelAnnouncementDecodeErrorZ _clone() {
+ number ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(this.ptr);
+ Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UnsignedChannelUpdateDecodeErrorZ_OK(UnsignedChannelUpdate res) {
- this(null, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UnsignedChannelUpdateDecodeErrorZ_Err extends Result_UnsignedChannelUpdateDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UnsignedChannelUpdateDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_UnsignedChannelUpdateDecodeErrorZ constructor__ok(UnsignedChannelUpdate o) {
+ number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_UnsignedChannelUpdateDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_UnsignedChannelUpdateDecodeErrorZ _clone() {
+ number ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(this.ptr);
+ Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UnsignedNodeAnnouncementDecodeErrorZ_OK(UnsignedNodeAnnouncement res) {
- this(null, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UnsignedNodeAnnouncementDecodeErrorZ_Err extends Result_UnsignedNodeAnnouncementDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UnsignedNodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor__ok(UnsignedNodeAnnouncement o) {
+ number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_UnsignedNodeAnnouncementDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_UnsignedNodeAnnouncementDecodeErrorZ _clone() {
+ number ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(this.ptr);
+ Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateAddHTLCDecodeErrorZ_OK(UpdateAddHTLC res) {
- this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateAddHTLCDecodeErrorZ_Err extends Result_UpdateAddHTLCDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateAddHTLCDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_UpdateAddHTLCDecodeErrorZ constructor__ok(UpdateAddHTLC o) {
+ number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_UpdateAddHTLCDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_UpdateAddHTLCDecodeErrorZ _clone() {
+ number ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_clone(this.ptr);
+ Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateFailHTLCDecodeErrorZ_OK(UpdateFailHTLC res) {
- this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateFailHTLCDecodeErrorZ_Err extends Result_UpdateFailHTLCDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateFailHTLCDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_UpdateFailHTLCDecodeErrorZ constructor__ok(UpdateFailHTLC o) {
+ number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_UpdateFailHTLCDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_UpdateFailHTLCDecodeErrorZ _clone() {
+ number ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_clone(this.ptr);
+ Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(UpdateFailMalformedHTLC res) {
- this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateFailMalformedHTLCDecodeErrorZ_Err extends Result_UpdateFailMalformedHTLCDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor__ok(UpdateFailMalformedHTLC o) {
+ number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_UpdateFailMalformedHTLCDecodeErrorZ _clone() {
+ number ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(this.ptr);
+ Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateFeeDecodeErrorZ_OK(UpdateFee res) {
- this(null, bindings.CResult_UpdateFeeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateFeeDecodeErrorZ_Err extends Result_UpdateFeeDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateFeeDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateFeeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_UpdateFeeDecodeErrorZ constructor__ok(UpdateFee o) {
+ number ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_UpdateFeeDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_UpdateFeeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_UpdateFeeDecodeErrorZ _clone() {
+ number ret = bindings.CResult_UpdateFeeDecodeErrorZ_clone(this.ptr);
+ Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
res_hu_conv.ptrs_to.add(this);
this.res = res_hu_conv;
}
- public Result_UpdateFulfillHTLCDecodeErrorZ_OK(UpdateFulfillHTLC res) {
- this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
- this.ptrs_to.add(res);
- }
}
public static final class Result_UpdateFulfillHTLCDecodeErrorZ_Err extends Result_UpdateFulfillHTLCDecodeErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_UpdateFulfillHTLCDecodeErrorZ_Err(DecodeError err) {
- this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_UpdateFulfillHTLCDecodeErrorZ constructor__ok(UpdateFulfillHTLC o) {
+ number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1);
+ Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(o);
+ return ret_hu_conv;
+ }
+
+ public static Result_UpdateFulfillHTLCDecodeErrorZ constructor__err(DecodeError e) {
+ number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_UpdateFulfillHTLCDecodeErrorZ _clone() {
+ number ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(this.ptr);
+ Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_boolLightningErrorZ_get_ok(ptr);
}
- public Result_boolLightningErrorZ_OK(boolean res) {
- this(null, bindings.CResult_boolLightningErrorZ_ok(res));
- }
}
public static final class Result_boolLightningErrorZ_Err extends Result_boolLightningErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_boolLightningErrorZ_Err(LightningError err) {
- this(null, bindings.CResult_boolLightningErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_boolLightningErrorZ constructor__ok(boolean o) {
+ number ret = bindings.CResult_boolLightningErrorZ_ok(o);
+ Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_boolLightningErrorZ constructor__err(LightningError e) {
+ number ret = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_boolLightningErrorZ _clone() {
+ number ret = bindings.CResult_boolLightningErrorZ_clone(this.ptr);
+ Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
super(_dummy, ptr);
this.res = bindings.LDKCResult_boolPeerHandleErrorZ_get_ok(ptr);
}
- public Result_boolPeerHandleErrorZ_OK(boolean res) {
- this(null, bindings.CResult_boolPeerHandleErrorZ_ok(res));
- }
}
public static final class Result_boolPeerHandleErrorZ_Err extends Result_boolPeerHandleErrorZ {
err_hu_conv.ptrs_to.add(this);
this.err = err_hu_conv;
}
- public Result_boolPeerHandleErrorZ_Err(PeerHandleError err) {
- this(null, bindings.CResult_boolPeerHandleErrorZ_err(err == null ? 0 : err.ptr & ~1));
- this.ptrs_to.add(err);
- }
}
+
+ public static Result_boolPeerHandleErrorZ constructor__ok(boolean o) {
+ number ret = bindings.CResult_boolPeerHandleErrorZ_ok(o);
+ Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public static Result_boolPeerHandleErrorZ constructor__err(PeerHandleError e) {
+ number ret = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1);
+ Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(e);
+ return ret_hu_conv;
+ }
+
+ public Result_boolPeerHandleErrorZ _clone() {
+ number ret = bindings.CResult_boolPeerHandleErrorZ_clone(this.ptr);
+ Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
}
+ public Option_u64Z get_htlc_minimum_msat() {
+ number ret = bindings.RouteHint_get_htlc_minimum_msat(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public void set_htlc_minimum_msat(Option_u64Z val) {
+ bindings.RouteHint_set_htlc_minimum_msat(this.ptr, val.ptr);
+ }
+
+ public Option_u64Z get_htlc_maximum_msat() {
+ number ret = bindings.RouteHint_get_htlc_maximum_msat(this.ptr);
+ Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public void set_htlc_maximum_msat(Option_u64Z val) {
+ bindings.RouteHint_set_htlc_maximum_msat(this.ptr, val.ptr);
+ }
+
+ public static RouteHint constructor_new(Uint8Array src_node_id_arg, number short_channel_id_arg, RoutingFees fees_arg, number cltv_expiry_delta_arg, Option_u64Z htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg) {
+ number ret = bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr);
+ const ret_hu_conv: RouteHint = new RouteHint(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(fees_arg);
+ return ret_hu_conv;
+ }
+
public RouteHint clone() {
number ret = bindings.RouteHint_clone(this.ptr);
const ret_hu_conv: RouteHint = new RouteHint(null, ret);
}
}
export class DelayedPaymentOutput extends SpendableOutputDescriptor {
+ public delayed_payment_output: DelayedPaymentOutputDescriptor;
private constructor(ptr: number, obj: bindings.LDKSpendableOutputDescriptor.DelayedPaymentOutput) {
super(null, ptr);
+ const delayed_payment_output: number = obj.delayed_payment_output;
+ const delayed_payment_output_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, delayed_payment_output);
+ delayed_payment_output_hu_conv.ptrs_to.add(this);
+ this.delayed_payment_output = delayed_payment_output_hu_conv;
}
}
export class StaticPaymentOutput extends SpendableOutputDescriptor {
+ public static_payment_output: StaticPaymentOutputDescriptor;
private constructor(ptr: number, obj: bindings.LDKSpendableOutputDescriptor.StaticPaymentOutput) {
super(null, ptr);
+ const static_payment_output: number = obj.static_payment_output;
+ const static_payment_output_hu_conv: StaticPaymentOutputDescriptor = new StaticPaymentOutputDescriptor(null, static_payment_output);
+ static_payment_output_hu_conv.ptrs_to.add(this);
+ this.static_payment_output = static_payment_output_hu_conv;
}
+}
+ public SpendableOutputDescriptor clone() {
+ number ret = bindings.SpendableOutputDescriptor_clone(this.ptr);
+ SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public Uint8Array write() {
+ Uint8Array ret = bindings.SpendableOutputDescriptor_write(this.ptr);
+ return ret;
+ }
+
+ public static Result_SpendableOutputDescriptorDecodeErrorZ constructor_read(Uint8Array ser) {
+ number ret = bindings.SpendableOutputDescriptor_read(ser);
+ Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
--- /dev/null
+
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+ export default class WatchedOutput extends CommonBase {
+ constructor(_dummy: object, ptr: number) {
+ super(ptr);
+ }
+
+
+ protected finalize() {
+ super.finalize();
+
+ if (this.ptr != 0) {
+ bindings.WatchedOutput_free(this.ptr);
+ }
+ }
+ public Uint8Array get_block_hash() {
+ Uint8Array ret = bindings.WatchedOutput_get_block_hash(this.ptr);
+ return ret;
+ }
+
+ public void set_block_hash(Uint8Array val) {
+ bindings.WatchedOutput_set_block_hash(this.ptr, val);
+ }
+
+ public OutPoint get_outpoint() {
+ number ret = bindings.WatchedOutput_get_outpoint(this.ptr);
+ const ret_hu_conv: OutPoint = new OutPoint(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ public void set_outpoint(OutPoint val) {
+ bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
+ this.ptrs_to.add(val);
+ }
+
+ public Uint8Array get_script_pubkey() {
+ Uint8Array ret = bindings.WatchedOutput_get_script_pubkey(this.ptr);
+ return ret;
+ }
+
+ public void set_script_pubkey(Uint8Array val) {
+ bindings.WatchedOutput_set_script_pubkey(this.ptr, val);
+ }
+
+ public static WatchedOutput constructor_new(Uint8Array block_hash_arg, OutPoint outpoint_arg, Uint8Array script_pubkey_arg) {
+ number ret = bindings.WatchedOutput_new(block_hash_arg, outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, script_pubkey_arg);
+ const ret_hu_conv: WatchedOutput = new WatchedOutput(null, ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ ret_hu_conv.ptrs_to.add(outpoint_arg);
+ return ret_hu_conv;
+ }
+
+}