}
}
+static inline LDKBlindedFailure LDKBlindedFailure_from_js(int32_t ord) {
+ switch (ord) {
+ case 0: return LDKBlindedFailure_FromIntroductionNode;
+ case 1: return LDKBlindedFailure_FromBlindedNode;
+ }
+ abort();
+}
+static inline int32_t LDKBlindedFailure_to_js(LDKBlindedFailure val) {
+ switch (val) {
+ case LDKBlindedFailure_FromIntroductionNode: return 0;
+ case LDKBlindedFailure_FromBlindedNode: return 1;
+ default: abort();
+ }
+}
static inline LDKBolt11SemanticError LDKBolt11SemanticError_from_js(int32_t ord) {
switch (ord) {
case 0: return LDKBolt11SemanticError_NoPaymentHash;
case 18: return LDKBolt12SemanticError_UnexpectedMetadata;
case 19: return LDKBolt12SemanticError_MissingPayerMetadata;
case 20: return LDKBolt12SemanticError_MissingPayerId;
- case 21: return LDKBolt12SemanticError_MissingPaths;
- case 22: return LDKBolt12SemanticError_InvalidPayInfo;
- case 23: return LDKBolt12SemanticError_MissingCreationTime;
- case 24: return LDKBolt12SemanticError_MissingPaymentHash;
- case 25: return LDKBolt12SemanticError_MissingSignature;
+ case 21: return LDKBolt12SemanticError_DuplicatePaymentId;
+ case 22: return LDKBolt12SemanticError_MissingPaths;
+ case 23: return LDKBolt12SemanticError_InvalidPayInfo;
+ case 24: return LDKBolt12SemanticError_MissingCreationTime;
+ case 25: return LDKBolt12SemanticError_MissingPaymentHash;
+ case 26: return LDKBolt12SemanticError_MissingSignature;
}
abort();
}
case LDKBolt12SemanticError_UnexpectedMetadata: return 18;
case LDKBolt12SemanticError_MissingPayerMetadata: return 19;
case LDKBolt12SemanticError_MissingPayerId: return 20;
- case LDKBolt12SemanticError_MissingPaths: return 21;
- case LDKBolt12SemanticError_InvalidPayInfo: return 22;
- case LDKBolt12SemanticError_MissingCreationTime: return 23;
- case LDKBolt12SemanticError_MissingPaymentHash: return 24;
- case LDKBolt12SemanticError_MissingSignature: return 25;
+ case LDKBolt12SemanticError_DuplicatePaymentId: return 21;
+ case LDKBolt12SemanticError_MissingPaths: return 22;
+ case LDKBolt12SemanticError_InvalidPayInfo: return 23;
+ case LDKBolt12SemanticError_MissingCreationTime: return 24;
+ case LDKBolt12SemanticError_MissingPaymentHash: return 25;
+ case LDKBolt12SemanticError_MissingSignature: return 26;
default: abort();
}
}
}
static inline LDKConfirmationTarget LDKConfirmationTarget_from_js(int32_t ord) {
switch (ord) {
- case 0: return LDKConfirmationTarget_MempoolMinimum;
- case 1: return LDKConfirmationTarget_Background;
- case 2: return LDKConfirmationTarget_Normal;
- case 3: return LDKConfirmationTarget_HighPriority;
+ case 0: return LDKConfirmationTarget_OnChainSweep;
+ case 1: return LDKConfirmationTarget_MinAllowedAnchorChannelRemoteFee;
+ case 2: return LDKConfirmationTarget_MinAllowedNonAnchorChannelRemoteFee;
+ case 3: return LDKConfirmationTarget_AnchorChannelFee;
+ case 4: return LDKConfirmationTarget_NonAnchorChannelFee;
+ case 5: return LDKConfirmationTarget_ChannelCloseMinimum;
}
abort();
}
static inline int32_t LDKConfirmationTarget_to_js(LDKConfirmationTarget val) {
switch (val) {
- case LDKConfirmationTarget_MempoolMinimum: return 0;
- case LDKConfirmationTarget_Background: return 1;
- case LDKConfirmationTarget_Normal: return 2;
- case LDKConfirmationTarget_HighPriority: return 3;
+ case LDKConfirmationTarget_OnChainSweep: return 0;
+ case LDKConfirmationTarget_MinAllowedAnchorChannelRemoteFee: return 1;
+ case LDKConfirmationTarget_MinAllowedNonAnchorChannelRemoteFee: return 2;
+ case LDKConfirmationTarget_AnchorChannelFee: return 3;
+ case LDKConfirmationTarget_NonAnchorChannelFee: return 4;
+ case LDKConfirmationTarget_ChannelCloseMinimum: return 5;
default: abort();
}
}
default: abort();
}
}
+static inline LDKCVec_u8Z CVec_u8Z_clone(const LDKCVec_u8Z *orig) {
+ LDKCVec_u8Z ret = { .data = MALLOC(sizeof(int8_t) * orig->datalen, "LDKCVec_u8Z clone bytes"), .datalen = orig->datalen };
+ memcpy(ret.data, orig->data, sizeof(int8_t) * ret.datalen);
+ return ret;
+}
struct LDKThirtyTwoBytes BigEndianScalar_get_bytes (struct LDKBigEndianScalar* thing) {
LDKThirtyTwoBytes ret = { .data = *thing->big_endian_bytes };
return ret;
int32_t __attribute__((export_name("TS_LDKBech32Error_InvalidChar_get_invalid_char"))) TS_LDKBech32Error_InvalidChar_get_invalid_char(uint64_t ptr) {
LDKBech32Error *obj = (LDKBech32Error*)untag_ptr(ptr);
assert(obj->tag == LDKBech32Error_InvalidChar);
- int32_t invalid_char_conv = obj->invalid_char;
+ int32_t invalid_char_conv = obj->invalid_char;
return invalid_char_conv;
}
int8_t __attribute__((export_name("TS_LDKBech32Error_InvalidData_get_invalid_data"))) TS_LDKBech32Error_InvalidData_get_invalid_data(uint64_t ptr) {
LDKBech32Error *obj = (LDKBech32Error*)untag_ptr(ptr);
assert(obj->tag == LDKBech32Error_InvalidData);
- int8_t invalid_data_conv = obj->invalid_data;
+ int8_t invalid_data_conv = obj->invalid_data;
return invalid_data_conv;
}
-static inline LDKCVec_u8Z CVec_u8Z_clone(const LDKCVec_u8Z *orig) {
- LDKCVec_u8Z ret = { .data = MALLOC(sizeof(int8_t) * orig->datalen, "LDKCVec_u8Z clone bytes"), .datalen = orig->datalen };
- memcpy(ret.data, orig->data, sizeof(int8_t) * ret.datalen);
- return ret;
-}
-struct LDKWitness TxIn_get_witness (struct LDKTxIn* thing) { return Witness_clone(&thing->witness);}int8_tArray __attribute__((export_name("TS_TxIn_get_witness"))) TS_TxIn_get_witness(uint64_t thing) {
- LDKTxIn* thing_conv = (LDKTxIn*)untag_ptr(thing);
- LDKWitness ret_var = TxIn_get_witness(thing_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- Witness_free(ret_var);
- return ret_arr;
-}
-
-struct LDKCVec_u8Z TxIn_get_script_sig (struct LDKTxIn* thing) { return CVec_u8Z_clone(&thing->script_sig);}int8_tArray __attribute__((export_name("TS_TxIn_get_script_sig"))) TS_TxIn_get_script_sig(uint64_t thing) {
- LDKTxIn* thing_conv = (LDKTxIn*)untag_ptr(thing);
- LDKCVec_u8Z ret_var = TxIn_get_script_sig(thing_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-LDKThirtyTwoBytes TxIn_get_previous_txid (struct LDKTxIn* thing) { return thing->previous_txid;}int8_tArray __attribute__((export_name("TS_TxIn_get_previous_txid"))) TS_TxIn_get_previous_txid(uint64_t thing) {
- LDKTxIn* thing_conv = (LDKTxIn*)untag_ptr(thing);
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, TxIn_get_previous_txid(thing_conv).data, 32);
- return ret_arr;
-}
-
-uint32_t TxIn_get_previous_vout (struct LDKTxIn* thing) { return thing->previous_vout;}int32_t __attribute__((export_name("TS_TxIn_get_previous_vout"))) TS_TxIn_get_previous_vout(uint64_t thing) {
- LDKTxIn* thing_conv = (LDKTxIn*)untag_ptr(thing);
- int32_t ret_conv = TxIn_get_previous_vout(thing_conv);
- return ret_conv;
-}
-
-uint32_t TxIn_get_sequence (struct LDKTxIn* thing) { return thing->sequence;}int32_t __attribute__((export_name("TS_TxIn_get_sequence"))) TS_TxIn_get_sequence(uint64_t thing) {
- LDKTxIn* thing_conv = (LDKTxIn*)untag_ptr(thing);
- int32_t ret_conv = TxIn_get_sequence(thing_conv);
- return ret_conv;
-}
-
-struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing) { return CVec_u8Z_clone(&thing->script_pubkey);}int8_tArray __attribute__((export_name("TS_TxOut_get_script_pubkey"))) TS_TxOut_get_script_pubkey(uint64_t thing) {
- LDKTxOut* thing_conv = (LDKTxOut*)untag_ptr(thing);
- LDKCVec_u8Z ret_var = TxOut_get_script_pubkey(thing_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-uint64_t TxOut_get_value (struct LDKTxOut* thing) { return thing->value;}int64_t __attribute__((export_name("TS_TxOut_get_value"))) TS_TxOut_get_value(uint64_t thing) {
- LDKTxOut* thing_conv = (LDKTxOut*)untag_ptr(thing);
- int64_t ret_conv = TxOut_get_value(thing_conv);
- return ret_conv;
-}
-
uint32_t __attribute__((export_name("TS_LDKCOption_u64Z_ty_from_ptr"))) TS_LDKCOption_u64Z_ty_from_ptr(uint64_t ptr) {
LDKCOption_u64Z *obj = (LDKCOption_u64Z*)untag_ptr(ptr);
switch(obj->tag) {
int64_t __attribute__((export_name("TS_LDKCOption_u64Z_Some_get_some"))) TS_LDKCOption_u64Z_Some_get_some(uint64_t ptr) {
LDKCOption_u64Z *obj = (LDKCOption_u64Z*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_u64Z_Some);
- int64_t some_conv = obj->some;
+ int64_t some_conv = obj->some;
return some_conv;
}
static inline LDKCVec_BlindedPathZ CVec_BlindedPathZ_clone(const LDKCVec_BlindedPathZ *orig) {
int32_t __attribute__((export_name("TS_LDKRetry_Attempts_get_attempts"))) TS_LDKRetry_Attempts_get_attempts(uint64_t ptr) {
LDKRetry *obj = (LDKRetry*)untag_ptr(ptr);
assert(obj->tag == LDKRetry_Attempts);
- int32_t attempts_conv = obj->attempts;
+ int32_t attempts_conv = obj->attempts;
return attempts_conv;
}
uint32_t __attribute__((export_name("TS_LDKDecodeError_ty_from_ptr"))) TS_LDKDecodeError_ty_from_ptr(uint64_t ptr) {
uint32_t __attribute__((export_name("TS_LDKDecodeError_Io_get_io"))) TS_LDKDecodeError_Io_get_io(uint64_t ptr) {
LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
assert(obj->tag == LDKDecodeError_Io);
- uint32_t io_conv = LDKIOError_to_js(obj->io);
+ uint32_t io_conv = LDKIOError_to_js(obj->io);
return io_conv;
}
static inline struct LDKRetry CResult_RetryDecodeErrorZ_get_ok(LDKCResult_RetryDecodeErrorZ *NONNULL_PTR owner){
jstring __attribute__((export_name("TS_LDKAPIError_APIMisuseError_get_err"))) TS_LDKAPIError_APIMisuseError_get_err(uint64_t ptr) {
LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
assert(obj->tag == LDKAPIError_APIMisuseError);
- LDKStr err_str = obj->api_misuse_error.err;
+ LDKStr err_str = obj->api_misuse_error.err;
jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len);
return err_conv;
}
jstring __attribute__((export_name("TS_LDKAPIError_FeeRateTooHigh_get_err"))) TS_LDKAPIError_FeeRateTooHigh_get_err(uint64_t ptr) {
LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
assert(obj->tag == LDKAPIError_FeeRateTooHigh);
- LDKStr err_str = obj->fee_rate_too_high.err;
+ LDKStr err_str = obj->fee_rate_too_high.err;
jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len);
return err_conv;
}
int32_t __attribute__((export_name("TS_LDKAPIError_FeeRateTooHigh_get_feerate"))) TS_LDKAPIError_FeeRateTooHigh_get_feerate(uint64_t ptr) {
LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
assert(obj->tag == LDKAPIError_FeeRateTooHigh);
- int32_t feerate_conv = obj->fee_rate_too_high.feerate;
+ int32_t feerate_conv = obj->fee_rate_too_high.feerate;
return feerate_conv;
}
jstring __attribute__((export_name("TS_LDKAPIError_InvalidRoute_get_err"))) TS_LDKAPIError_InvalidRoute_get_err(uint64_t ptr) {
LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
assert(obj->tag == LDKAPIError_InvalidRoute);
- LDKStr err_str = obj->invalid_route.err;
+ LDKStr err_str = obj->invalid_route.err;
jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len);
return err_conv;
}
jstring __attribute__((export_name("TS_LDKAPIError_ChannelUnavailable_get_err"))) TS_LDKAPIError_ChannelUnavailable_get_err(uint64_t ptr) {
LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
assert(obj->tag == LDKAPIError_ChannelUnavailable);
- LDKStr err_str = obj->channel_unavailable.err;
+ LDKStr err_str = obj->channel_unavailable.err;
jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len);
return err_conv;
}
uint64_t __attribute__((export_name("TS_LDKAPIError_IncompatibleShutdownScript_get_script"))) TS_LDKAPIError_IncompatibleShutdownScript_get_script(uint64_t ptr) {
LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
assert(obj->tag == LDKAPIError_IncompatibleShutdownScript);
- LDKShutdownScript script_var = obj->incompatible_shutdown_script.script;
+ LDKShutdownScript script_var = obj->incompatible_shutdown_script.script;
uint64_t script_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(script_var);
script_ref = tag_ptr(script_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKCOption_ThirtyTwoBytesZ_Some_get_some"))) TS_LDKCOption_ThirtyTwoBytesZ_Some_get_some(uint64_t ptr) {
LDKCOption_ThirtyTwoBytesZ *obj = (LDKCOption_ThirtyTwoBytesZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_ThirtyTwoBytesZ_Some);
- int8_tArray some_arr = init_int8_tArray(32, __LINE__);
- memcpy(some_arr->elems, obj->some.data, 32);
+ int8_tArray some_arr = init_int8_tArray(32, __LINE__);
+ memcpy(some_arr->elems, obj->some.data, 32);
return some_arr;
}
uint32_t __attribute__((export_name("TS_LDKCOption_CVec_u8ZZ_ty_from_ptr"))) TS_LDKCOption_CVec_u8ZZ_ty_from_ptr(uint64_t ptr) {
int8_tArray __attribute__((export_name("TS_LDKCOption_CVec_u8ZZ_Some_get_some"))) TS_LDKCOption_CVec_u8ZZ_Some_get_some(uint64_t ptr) {
LDKCOption_CVec_u8ZZ *obj = (LDKCOption_CVec_u8ZZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_CVec_u8ZZ_Some);
- LDKCVec_u8Z some_var = obj->some;
+ LDKCVec_u8Z some_var = obj->some;
int8_tArray some_arr = init_int8_tArray(some_var.datalen, __LINE__);
memcpy(some_arr->elems, some_var.data, some_var.datalen);
return some_arr;
ptrArray __attribute__((export_name("TS_LDKCOption_CVec_ThirtyTwoBytesZZ_Some_get_some"))) TS_LDKCOption_CVec_ThirtyTwoBytesZZ_Some_get_some(uint64_t ptr) {
LDKCOption_CVec_ThirtyTwoBytesZZ *obj = (LDKCOption_CVec_ThirtyTwoBytesZZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_CVec_ThirtyTwoBytesZZ_Some);
- LDKCVec_ThirtyTwoBytesZ some_var = obj->some;
+ LDKCVec_ThirtyTwoBytesZ some_var = obj->some;
ptrArray some_arr = NULL;
some_arr = init_ptrArray(some_var.datalen, __LINE__);
int8_tArray *some_arr_ptr = (int8_tArray*)(((uint8_t*)some_arr) + 8);
uint64_t __attribute__((export_name("TS_LDKSpendableOutputDescriptor_StaticOutput_get_outpoint"))) TS_LDKSpendableOutputDescriptor_StaticOutput_get_outpoint(uint64_t ptr) {
LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)untag_ptr(ptr);
assert(obj->tag == LDKSpendableOutputDescriptor_StaticOutput);
- LDKOutPoint outpoint_var = obj->static_output.outpoint;
+ LDKOutPoint outpoint_var = obj->static_output.outpoint;
uint64_t outpoint_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var);
outpoint_ref = tag_ptr(outpoint_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKSpendableOutputDescriptor_StaticOutput_get_output"))) TS_LDKSpendableOutputDescriptor_StaticOutput_get_output(uint64_t ptr) {
LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)untag_ptr(ptr);
assert(obj->tag == LDKSpendableOutputDescriptor_StaticOutput);
- LDKTxOut* output_ref = &obj->static_output.output;
+ LDKTxOut* output_ref = &obj->static_output.output;
return tag_ptr(output_ref, false);
}
+int8_tArray __attribute__((export_name("TS_LDKSpendableOutputDescriptor_StaticOutput_get_channel_keys_id"))) TS_LDKSpendableOutputDescriptor_StaticOutput_get_channel_keys_id(uint64_t ptr) {
+ LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)untag_ptr(ptr);
+ assert(obj->tag == LDKSpendableOutputDescriptor_StaticOutput);
+ int8_tArray channel_keys_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(channel_keys_id_arr->elems, obj->static_output.channel_keys_id.data, 32);
+ return channel_keys_id_arr;
+}
uint64_t __attribute__((export_name("TS_LDKSpendableOutputDescriptor_DelayedPaymentOutput_get_delayed_payment_output"))) TS_LDKSpendableOutputDescriptor_DelayedPaymentOutput_get_delayed_payment_output(uint64_t ptr) {
LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)untag_ptr(ptr);
assert(obj->tag == LDKSpendableOutputDescriptor_DelayedPaymentOutput);
- LDKDelayedPaymentOutputDescriptor delayed_payment_output_var = obj->delayed_payment_output;
+ LDKDelayedPaymentOutputDescriptor delayed_payment_output_var = obj->delayed_payment_output;
uint64_t delayed_payment_output_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(delayed_payment_output_var);
delayed_payment_output_ref = tag_ptr(delayed_payment_output_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKSpendableOutputDescriptor_StaticPaymentOutput_get_static_payment_output"))) TS_LDKSpendableOutputDescriptor_StaticPaymentOutput_get_static_payment_output(uint64_t ptr) {
LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)untag_ptr(ptr);
assert(obj->tag == LDKSpendableOutputDescriptor_StaticPaymentOutput);
- LDKStaticPaymentOutputDescriptor static_payment_output_var = obj->static_payment_output;
+ LDKStaticPaymentOutputDescriptor static_payment_output_var = obj->static_payment_output;
uint64_t static_payment_output_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(static_payment_output_var);
static_payment_output_ref = tag_ptr(static_payment_output_var.inner, false);
int32_t __attribute__((export_name("TS_LDKCOption_u32Z_Some_get_some"))) TS_LDKCOption_u32Z_Some_get_some(uint64_t ptr) {
LDKCOption_u32Z *obj = (LDKCOption_u32Z*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_u32Z_Some);
- int32_t some_conv = obj->some;
+ int32_t some_conv = obj->some;
return some_conv;
}
-static inline struct LDKCVec_u8Z C2Tuple_CVec_u8ZusizeZ_get_a(LDKC2Tuple_CVec_u8ZusizeZ *NONNULL_PTR owner){
+static inline struct LDKCVec_u8Z C2Tuple_CVec_u8Zu64Z_get_a(LDKC2Tuple_CVec_u8Zu64Z *NONNULL_PTR owner){
return CVec_u8Z_clone(&owner->a);
}
-int8_tArray __attribute__((export_name("TS_C2Tuple_CVec_u8ZusizeZ_get_a"))) TS_C2Tuple_CVec_u8ZusizeZ_get_a(uint64_t owner) {
- LDKC2Tuple_CVec_u8ZusizeZ* owner_conv = (LDKC2Tuple_CVec_u8ZusizeZ*)untag_ptr(owner);
- LDKCVec_u8Z ret_var = C2Tuple_CVec_u8ZusizeZ_get_a(owner_conv);
+int8_tArray __attribute__((export_name("TS_C2Tuple_CVec_u8Zu64Z_get_a"))) TS_C2Tuple_CVec_u8Zu64Z_get_a(uint64_t owner) {
+ LDKC2Tuple_CVec_u8Zu64Z* owner_conv = (LDKC2Tuple_CVec_u8Zu64Z*)untag_ptr(owner);
+ LDKCVec_u8Z ret_var = C2Tuple_CVec_u8Zu64Z_get_a(owner_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
CVec_u8Z_free(ret_var);
return ret_arr;
}
-static inline uintptr_t C2Tuple_CVec_u8ZusizeZ_get_b(LDKC2Tuple_CVec_u8ZusizeZ *NONNULL_PTR owner){
+static inline uint64_t C2Tuple_CVec_u8Zu64Z_get_b(LDKC2Tuple_CVec_u8Zu64Z *NONNULL_PTR owner){
return owner->b;
}
-uint32_t __attribute__((export_name("TS_C2Tuple_CVec_u8ZusizeZ_get_b"))) TS_C2Tuple_CVec_u8ZusizeZ_get_b(uint64_t owner) {
- LDKC2Tuple_CVec_u8ZusizeZ* owner_conv = (LDKC2Tuple_CVec_u8ZusizeZ*)untag_ptr(owner);
- uint32_t ret_conv = C2Tuple_CVec_u8ZusizeZ_get_b(owner_conv);
+int64_t __attribute__((export_name("TS_C2Tuple_CVec_u8Zu64Z_get_b"))) TS_C2Tuple_CVec_u8Zu64Z_get_b(uint64_t owner) {
+ LDKC2Tuple_CVec_u8Zu64Z* owner_conv = (LDKC2Tuple_CVec_u8Zu64Z*)untag_ptr(owner);
+ int64_t ret_conv = C2Tuple_CVec_u8Zu64Z_get_b(owner_conv);
return ret_conv;
}
-static inline struct LDKC2Tuple_CVec_u8ZusizeZ CResult_C2Tuple_CVec_u8ZusizeZNoneZ_get_ok(LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ *NONNULL_PTR owner){
+static inline struct LDKC2Tuple_CVec_u8Zu64Z CResult_C2Tuple_CVec_u8Zu64ZNoneZ_get_ok(LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
- return C2Tuple_CVec_u8ZusizeZ_clone(&*owner->contents.result);
+ return C2Tuple_CVec_u8Zu64Z_clone(&*owner->contents.result);
}
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_get_ok"))) TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_get_ok(uint64_t owner) {
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* owner_conv = (LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ*)untag_ptr(owner);
- LDKC2Tuple_CVec_u8ZusizeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_u8ZusizeZ), "LDKC2Tuple_CVec_u8ZusizeZ");
- *ret_conv = CResult_C2Tuple_CVec_u8ZusizeZNoneZ_get_ok(owner_conv);
+uint64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_get_ok"))) TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* owner_conv = (LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ*)untag_ptr(owner);
+ LDKC2Tuple_CVec_u8Zu64Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_u8Zu64Z), "LDKC2Tuple_CVec_u8Zu64Z");
+ *ret_conv = CResult_C2Tuple_CVec_u8Zu64ZNoneZ_get_ok(owner_conv);
return tag_ptr(ret_conv, true);
}
-static inline void CResult_C2Tuple_CVec_u8ZusizeZNoneZ_get_err(LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ *NONNULL_PTR owner){
+static inline void CResult_C2Tuple_CVec_u8Zu64ZNoneZ_get_err(LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return *owner->contents.err;
}
-void __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_get_err"))) TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_get_err(uint64_t owner) {
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* owner_conv = (LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ*)untag_ptr(owner);
- CResult_C2Tuple_CVec_u8ZusizeZNoneZ_get_err(owner_conv);
+void __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_get_err"))) TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_get_err(uint64_t owner) {
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* owner_conv = (LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ*)untag_ptr(owner);
+ CResult_C2Tuple_CVec_u8Zu64ZNoneZ_get_err(owner_conv);
}
-static inline void CResult_NoneNoneZ_get_ok(LDKCResult_NoneNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
+static inline struct LDKChannelDerivationParameters CResult_ChannelDerivationParametersDecodeErrorZ_get_ok(LDKCResult_ChannelDerivationParametersDecodeErrorZ *NONNULL_PTR owner){
+ LDKChannelDerivationParameters ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
}
-void __attribute__((export_name("TS_CResult_NoneNoneZ_get_ok"))) TS_CResult_NoneNoneZ_get_ok(uint64_t owner) {
- LDKCResult_NoneNoneZ* owner_conv = (LDKCResult_NoneNoneZ*)untag_ptr(owner);
- CResult_NoneNoneZ_get_ok(owner_conv);
+uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_get_ok"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(owner);
+ LDKChannelDerivationParameters ret_var = CResult_ChannelDerivationParametersDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-static inline void CResult_NoneNoneZ_get_err(LDKCResult_NoneNoneZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_ChannelDerivationParametersDecodeErrorZ_get_err(LDKCResult_ChannelDerivationParametersDecodeErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-void __attribute__((export_name("TS_CResult_NoneNoneZ_get_err"))) TS_CResult_NoneNoneZ_get_err(uint64_t owner) {
- LDKCResult_NoneNoneZ* owner_conv = (LDKCResult_NoneNoneZ*)untag_ptr(owner);
- CResult_NoneNoneZ_get_err(owner_conv);
-}
-
-static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){
- return owner->a;
-}
-int8_tArray __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(uint64_t owner) {
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* owner_conv = (LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(owner);
- int8_tArray ret_arr = init_int8_tArray(64, __LINE__);
- memcpy(ret_arr->elems, C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(owner_conv).compact_form, 64);
- return ret_arr;
-}
-
-static inline struct LDKCVec_ECDSASignatureZ C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){
- return owner->b;
+ return DecodeError_clone(&*owner->contents.err);
}
-ptrArray __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(uint64_t owner) {
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* owner_conv = (LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(owner);
- LDKCVec_ECDSASignatureZ ret_var = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(owner_conv);
- ptrArray ret_arr = NULL;
- ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
- for (size_t m = 0; m < ret_var.datalen; m++) {
- int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
- memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
- ret_arr_ptr[m] = ret_conv_12_arr;
- }
-
- return ret_arr;
+uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_get_err"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelDerivationParametersDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-static inline struct LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_ok(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone(&*owner->contents.result);
+static inline struct LDKHTLCDescriptor CResult_HTLCDescriptorDecodeErrorZ_get_ok(LDKCResult_HTLCDescriptorDecodeErrorZ *NONNULL_PTR owner){
+ LDKHTLCDescriptor ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
}
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_ok"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_ok(uint64_t owner) {
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* owner_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(owner);
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ), "LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ");
- *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_ok(owner_conv);
- return tag_ptr(ret_conv, true);
+uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_get_ok"))) TS_CResult_HTLCDescriptorDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_HTLCDescriptorDecodeErrorZ* owner_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(owner);
+ LDKHTLCDescriptor ret_var = CResult_HTLCDescriptorDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-static inline void CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_err(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_HTLCDescriptorDecodeErrorZ_get_err(LDKCResult_HTLCDescriptorDecodeErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return *owner->contents.err;
+ return DecodeError_clone(&*owner->contents.err);
}
-void __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_err"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_err(uint64_t owner) {
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* owner_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(owner);
- CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_err(owner_conv);
+uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_get_err"))) TS_CResult_HTLCDescriptorDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_HTLCDescriptorDecodeErrorZ* owner_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HTLCDescriptorDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_NoneNoneZ_get_ok(LDKCResult_NoneNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return *owner->contents.result;
}
-int8_tArray __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_ok"))) TS_CResult_ECDSASignatureNoneZ_get_ok(uint64_t owner) {
- LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
- int8_tArray ret_arr = init_int8_tArray(64, __LINE__);
- memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64);
- return ret_arr;
+void __attribute__((export_name("TS_CResult_NoneNoneZ_get_ok"))) TS_CResult_NoneNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_NoneNoneZ* owner_conv = (LDKCResult_NoneNoneZ*)untag_ptr(owner);
+ CResult_NoneNoneZ_get_ok(owner_conv);
}
-static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_NoneNoneZ_get_err(LDKCResult_NoneNoneZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return *owner->contents.err;
}
-void __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_err"))) TS_CResult_ECDSASignatureNoneZ_get_err(uint64_t owner) {
- LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
- CResult_ECDSASignatureNoneZ_get_err(owner_conv);
+void __attribute__((export_name("TS_CResult_NoneNoneZ_get_err"))) TS_CResult_NoneNoneZ_get_err(uint64_t owner) {
+ LDKCResult_NoneNoneZ* owner_conv = (LDKCResult_NoneNoneZ*)untag_ptr(owner);
+ CResult_NoneNoneZ_get_err(owner_conv);
}
static inline struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKCOption_BigEndianScalarZ_Some_get_some"))) TS_LDKCOption_BigEndianScalarZ_Some_get_some(uint64_t ptr) {
LDKCOption_BigEndianScalarZ *obj = (LDKCOption_BigEndianScalarZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_BigEndianScalarZ_Some);
- LDKBigEndianScalar* some_ref = &obj->some;
+ LDKBigEndianScalar* some_ref = &obj->some;
return tag_ptr(some_ref, false);
}
static inline struct LDKRecoverableSignature CResult_RecoverableSignatureNoneZ_get_ok(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner){
CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
}
+static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+int8_tArray __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_ok"))) TS_CResult_ECDSASignatureNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(64, __LINE__);
+ memcpy(ret_arr->elems, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form, 64);
+ return ret_arr;
+}
+
+static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_get_err"))) TS_CResult_ECDSASignatureNoneZ_get_err(uint64_t owner) {
+ LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
+ CResult_ECDSASignatureNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){
+ return owner->a;
+}
+int8_tArray __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(uint64_t owner) {
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* owner_conv = (LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(64, __LINE__);
+ memcpy(ret_arr->elems, C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(owner_conv).compact_form, 64);
+ return ret_arr;
+}
+
+static inline struct LDKCVec_ECDSASignatureZ C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){
+ return owner->b;
+}
+ptrArray __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(uint64_t owner) {
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* owner_conv = (LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(owner);
+ LDKCVec_ECDSASignatureZ ret_var = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(owner_conv);
+ ptrArray ret_arr = NULL;
+ ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
+ int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
+ for (size_t m = 0; m < ret_var.datalen; m++) {
+ int8_tArray ret_conv_12_arr = init_int8_tArray(64, __LINE__);
+ memcpy(ret_conv_12_arr->elems, ret_var.data[m].compact_form, 64);
+ ret_arr_ptr[m] = ret_conv_12_arr;
+ }
+
+ return ret_arr;
+}
+
+static inline struct LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_ok(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone(&*owner->contents.result);
+}
+uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_ok"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* owner_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(owner);
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ), "LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ");
+ *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_ok(owner_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline void CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_err(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_err"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_err(uint64_t owner) {
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* owner_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(owner);
+ CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_get_err(owner_conv);
+}
+
typedef struct LDKChannelSigner_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
return ret_ref;
}
-LDKCResult_NoneNoneZ validate_holder_commitment_LDKChannelSigner_jcall(const void* this_arg, const LDKHolderCommitmentTransaction * holder_tx, LDKCVec_ThirtyTwoBytesZ preimages) {
+LDKCResult_NoneNoneZ validate_holder_commitment_LDKChannelSigner_jcall(const void* this_arg, const LDKHolderCommitmentTransaction * holder_tx, LDKCVec_ThirtyTwoBytesZ outbound_htlc_preimages) {
LDKChannelSigner_JCalls *j_calls = (LDKChannelSigner_JCalls*) this_arg;
LDKHolderCommitmentTransaction holder_tx_var = *holder_tx;
uint64_t holder_tx_ref = 0;
holder_tx_var = HolderCommitmentTransaction_clone(&holder_tx_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(holder_tx_var);
holder_tx_ref = tag_ptr(holder_tx_var.inner, holder_tx_var.is_owned);
- LDKCVec_ThirtyTwoBytesZ preimages_var = preimages;
- ptrArray preimages_arr = NULL;
- preimages_arr = init_ptrArray(preimages_var.datalen, __LINE__);
- int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 8);
- for (size_t m = 0; m < preimages_var.datalen; m++) {
- int8_tArray preimages_conv_12_arr = init_int8_tArray(32, __LINE__);
- memcpy(preimages_conv_12_arr->elems, preimages_var.data[m].data, 32);
- preimages_arr_ptr[m] = preimages_conv_12_arr;
+ LDKCVec_ThirtyTwoBytesZ outbound_htlc_preimages_var = outbound_htlc_preimages;
+ ptrArray outbound_htlc_preimages_arr = NULL;
+ outbound_htlc_preimages_arr = init_ptrArray(outbound_htlc_preimages_var.datalen, __LINE__);
+ int8_tArray *outbound_htlc_preimages_arr_ptr = (int8_tArray*)(((uint8_t*)outbound_htlc_preimages_arr) + 8);
+ for (size_t m = 0; m < outbound_htlc_preimages_var.datalen; m++) {
+ int8_tArray outbound_htlc_preimages_conv_12_arr = init_int8_tArray(32, __LINE__);
+ memcpy(outbound_htlc_preimages_conv_12_arr->elems, outbound_htlc_preimages_var.data[m].data, 32);
+ outbound_htlc_preimages_arr_ptr[m] = outbound_htlc_preimages_conv_12_arr;
}
- FREE(preimages_var.data);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 2, holder_tx_ref, (uint32_t)preimages_arr, 0, 0, 0, 0);
+ FREE(outbound_htlc_preimages_var.data);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 2, holder_tx_ref, (uint32_t)outbound_htlc_preimages_arr, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+LDKCResult_NoneNoneZ validate_counterparty_revocation_LDKChannelSigner_jcall(const void* this_arg, uint64_t idx, const uint8_t (* secret)[32]) {
+ LDKChannelSigner_JCalls *j_calls = (LDKChannelSigner_JCalls*) this_arg;
+ int64_t idx_conv = idx;
+ int8_tArray secret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(secret_arr->elems, *secret, 32);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 3, idx_conv, (uint32_t)secret_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
}
LDKThirtyTwoBytes channel_keys_id_LDKChannelSigner_jcall(const void* this_arg) {
LDKChannelSigner_JCalls *j_calls = (LDKChannelSigner_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 3, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 4, 0, 0, 0, 0, 0, 0);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
channel_parameters_var = ChannelTransactionParameters_clone(&channel_parameters_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_parameters_var);
channel_parameters_ref = tag_ptr(channel_parameters_var.inner, channel_parameters_var.is_owned);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 4, channel_parameters_ref, 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 5, channel_parameters_ref, 0, 0, 0, 0, 0);
}
static void LDKChannelSigner_JCalls_cloned(LDKChannelSigner* new_obj) {
LDKChannelSigner_JCalls *j_calls = (LDKChannelSigner_JCalls*) new_obj->this_arg;
.get_per_commitment_point = get_per_commitment_point_LDKChannelSigner_jcall,
.release_commitment_secret = release_commitment_secret_LDKChannelSigner_jcall,
.validate_holder_commitment = validate_holder_commitment_LDKChannelSigner_jcall,
+ .validate_counterparty_revocation = validate_counterparty_revocation_LDKChannelSigner_jcall,
.channel_keys_id = channel_keys_id_LDKChannelSigner_jcall,
.provide_channel_parameters = provide_channel_parameters_LDKChannelSigner_jcall,
.free = LDKChannelSigner_JCalls_free,
return ret_arr;
}
-uint64_t __attribute__((export_name("TS_ChannelSigner_validate_holder_commitment"))) TS_ChannelSigner_validate_holder_commitment(uint64_t this_arg, uint64_t holder_tx, ptrArray preimages) {
+uint64_t __attribute__((export_name("TS_ChannelSigner_validate_holder_commitment"))) TS_ChannelSigner_validate_holder_commitment(uint64_t this_arg, uint64_t holder_tx, ptrArray outbound_htlc_preimages) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKChannelSigner* this_arg_conv = (LDKChannelSigner*)this_arg_ptr;
holder_tx_conv.is_owned = ptr_is_owned(holder_tx);
CHECK_INNER_FIELD_ACCESS_OR_NULL(holder_tx_conv);
holder_tx_conv.is_owned = false;
- LDKCVec_ThirtyTwoBytesZ preimages_constr;
- preimages_constr.datalen = preimages->arr_len;
- if (preimages_constr.datalen > 0)
- preimages_constr.data = MALLOC(preimages_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+ LDKCVec_ThirtyTwoBytesZ outbound_htlc_preimages_constr;
+ outbound_htlc_preimages_constr.datalen = outbound_htlc_preimages->arr_len;
+ if (outbound_htlc_preimages_constr.datalen > 0)
+ outbound_htlc_preimages_constr.data = MALLOC(outbound_htlc_preimages_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
else
- preimages_constr.data = NULL;
- int8_tArray* preimages_vals = (void*) preimages->elems;
- for (size_t m = 0; m < preimages_constr.datalen; m++) {
- int8_tArray preimages_conv_12 = preimages_vals[m];
- LDKThirtyTwoBytes preimages_conv_12_ref;
- CHECK(preimages_conv_12->arr_len == 32);
- memcpy(preimages_conv_12_ref.data, preimages_conv_12->elems, 32); FREE(preimages_conv_12);
- preimages_constr.data[m] = preimages_conv_12_ref;
- }
- FREE(preimages);
+ outbound_htlc_preimages_constr.data = NULL;
+ int8_tArray* outbound_htlc_preimages_vals = (void*) outbound_htlc_preimages->elems;
+ for (size_t m = 0; m < outbound_htlc_preimages_constr.datalen; m++) {
+ int8_tArray outbound_htlc_preimages_conv_12 = outbound_htlc_preimages_vals[m];
+ LDKThirtyTwoBytes outbound_htlc_preimages_conv_12_ref;
+ CHECK(outbound_htlc_preimages_conv_12->arr_len == 32);
+ memcpy(outbound_htlc_preimages_conv_12_ref.data, outbound_htlc_preimages_conv_12->elems, 32); FREE(outbound_htlc_preimages_conv_12);
+ outbound_htlc_preimages_constr.data[m] = outbound_htlc_preimages_conv_12_ref;
+ }
+ FREE(outbound_htlc_preimages);
LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
- *ret_conv = (this_arg_conv->validate_holder_commitment)(this_arg_conv->this_arg, &holder_tx_conv, preimages_constr);
+ *ret_conv = (this_arg_conv->validate_holder_commitment)(this_arg_conv->this_arg, &holder_tx_conv, outbound_htlc_preimages_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_ChannelSigner_validate_counterparty_revocation"))) TS_ChannelSigner_validate_counterparty_revocation(uint64_t this_arg, int64_t idx, int8_tArray secret) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKChannelSigner* this_arg_conv = (LDKChannelSigner*)this_arg_ptr;
+ uint8_t secret_arr[32];
+ CHECK(secret->arr_len == 32);
+ memcpy(secret_arr, secret->elems, 32); FREE(secret);
+ uint8_t (*secret_ref)[32] = &secret_arr;
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = (this_arg_conv->validate_counterparty_revocation)(this_arg_conv->this_arg, idx, secret_ref);
return tag_ptr(ret_conv, true);
}
FREE(j_calls);
}
}
-LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ sign_counterparty_commitment_LDKEcdsaChannelSigner_jcall(const void* this_arg, const LDKCommitmentTransaction * commitment_tx, LDKCVec_ThirtyTwoBytesZ preimages) {
+LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ sign_counterparty_commitment_LDKEcdsaChannelSigner_jcall(const void* this_arg, const LDKCommitmentTransaction * commitment_tx, LDKCVec_ThirtyTwoBytesZ inbound_htlc_preimages, LDKCVec_ThirtyTwoBytesZ outbound_htlc_preimages) {
LDKEcdsaChannelSigner_JCalls *j_calls = (LDKEcdsaChannelSigner_JCalls*) this_arg;
LDKCommitmentTransaction commitment_tx_var = *commitment_tx;
uint64_t commitment_tx_ref = 0;
commitment_tx_var = CommitmentTransaction_clone(&commitment_tx_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(commitment_tx_var);
commitment_tx_ref = tag_ptr(commitment_tx_var.inner, commitment_tx_var.is_owned);
- LDKCVec_ThirtyTwoBytesZ preimages_var = preimages;
- ptrArray preimages_arr = NULL;
- preimages_arr = init_ptrArray(preimages_var.datalen, __LINE__);
- int8_tArray *preimages_arr_ptr = (int8_tArray*)(((uint8_t*)preimages_arr) + 8);
- for (size_t m = 0; m < preimages_var.datalen; m++) {
- int8_tArray preimages_conv_12_arr = init_int8_tArray(32, __LINE__);
- memcpy(preimages_conv_12_arr->elems, preimages_var.data[m].data, 32);
- preimages_arr_ptr[m] = preimages_conv_12_arr;
+ LDKCVec_ThirtyTwoBytesZ inbound_htlc_preimages_var = inbound_htlc_preimages;
+ ptrArray inbound_htlc_preimages_arr = NULL;
+ inbound_htlc_preimages_arr = init_ptrArray(inbound_htlc_preimages_var.datalen, __LINE__);
+ int8_tArray *inbound_htlc_preimages_arr_ptr = (int8_tArray*)(((uint8_t*)inbound_htlc_preimages_arr) + 8);
+ for (size_t m = 0; m < inbound_htlc_preimages_var.datalen; m++) {
+ int8_tArray inbound_htlc_preimages_conv_12_arr = init_int8_tArray(32, __LINE__);
+ memcpy(inbound_htlc_preimages_conv_12_arr->elems, inbound_htlc_preimages_var.data[m].data, 32);
+ inbound_htlc_preimages_arr_ptr[m] = inbound_htlc_preimages_conv_12_arr;
+ }
+
+ FREE(inbound_htlc_preimages_var.data);
+ LDKCVec_ThirtyTwoBytesZ outbound_htlc_preimages_var = outbound_htlc_preimages;
+ ptrArray outbound_htlc_preimages_arr = NULL;
+ outbound_htlc_preimages_arr = init_ptrArray(outbound_htlc_preimages_var.datalen, __LINE__);
+ int8_tArray *outbound_htlc_preimages_arr_ptr = (int8_tArray*)(((uint8_t*)outbound_htlc_preimages_arr) + 8);
+ for (size_t m = 0; m < outbound_htlc_preimages_var.datalen; m++) {
+ int8_tArray outbound_htlc_preimages_conv_12_arr = init_int8_tArray(32, __LINE__);
+ memcpy(outbound_htlc_preimages_conv_12_arr->elems, outbound_htlc_preimages_var.data[m].data, 32);
+ outbound_htlc_preimages_arr_ptr[m] = outbound_htlc_preimages_conv_12_arr;
}
- FREE(preimages_var.data);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 5, commitment_tx_ref, (uint32_t)preimages_arr, 0, 0, 0, 0);
+ FREE(outbound_htlc_preimages_var.data);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 6, commitment_tx_ref, (uint32_t)inbound_htlc_preimages_arr, (uint32_t)outbound_htlc_preimages_arr, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_NoneNoneZ validate_counterparty_revocation_LDKEcdsaChannelSigner_jcall(const void* this_arg, uint64_t idx, const uint8_t (* secret)[32]) {
- LDKEcdsaChannelSigner_JCalls *j_calls = (LDKEcdsaChannelSigner_JCalls*) this_arg;
- int64_t idx_conv = idx;
- int8_tArray secret_arr = init_int8_tArray(32, __LINE__);
- memcpy(secret_arr->elems, *secret, 32);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 6, idx_conv, (uint32_t)secret_arr, 0, 0, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
-LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ sign_holder_commitment_and_htlcs_LDKEcdsaChannelSigner_jcall(const void* this_arg, const LDKHolderCommitmentTransaction * commitment_tx) {
+LDKCResult_ECDSASignatureNoneZ sign_holder_commitment_LDKEcdsaChannelSigner_jcall(const void* this_arg, const LDKHolderCommitmentTransaction * commitment_tx) {
LDKEcdsaChannelSigner_JCalls *j_calls = (LDKEcdsaChannelSigner_JCalls*) this_arg;
LDKHolderCommitmentTransaction commitment_tx_var = *commitment_tx;
uint64_t commitment_tx_ref = 0;
uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 7, commitment_tx_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)(ret_ptr);
+ LDKCResult_ECDSASignatureNoneZ ret_conv = *(LDKCResult_ECDSASignatureNoneZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
LDKEcdsaChannelSigner ret = {
.this_arg = (void*) calls,
.sign_counterparty_commitment = sign_counterparty_commitment_LDKEcdsaChannelSigner_jcall,
- .validate_counterparty_revocation = validate_counterparty_revocation_LDKEcdsaChannelSigner_jcall,
- .sign_holder_commitment_and_htlcs = sign_holder_commitment_and_htlcs_LDKEcdsaChannelSigner_jcall,
+ .sign_holder_commitment = sign_holder_commitment_LDKEcdsaChannelSigner_jcall,
.sign_justice_revoked_output = sign_justice_revoked_output_LDKEcdsaChannelSigner_jcall,
.sign_justice_revoked_htlc = sign_justice_revoked_htlc_LDKEcdsaChannelSigner_jcall,
.sign_holder_htlc_transaction = sign_holder_htlc_transaction_LDKEcdsaChannelSigner_jcall,
*res_ptr = LDKEcdsaChannelSigner_init(o, ChannelSigner, pubkeys);
return tag_ptr(res_ptr, true);
}
-uint64_t __attribute__((export_name("TS_EcdsaChannelSigner_sign_counterparty_commitment"))) TS_EcdsaChannelSigner_sign_counterparty_commitment(uint64_t this_arg, uint64_t commitment_tx, ptrArray preimages) {
+uint64_t __attribute__((export_name("TS_EcdsaChannelSigner_sign_counterparty_commitment"))) TS_EcdsaChannelSigner_sign_counterparty_commitment(uint64_t this_arg, uint64_t commitment_tx, ptrArray inbound_htlc_preimages, ptrArray outbound_htlc_preimages) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKEcdsaChannelSigner* this_arg_conv = (LDKEcdsaChannelSigner*)this_arg_ptr;
commitment_tx_conv.is_owned = ptr_is_owned(commitment_tx);
CHECK_INNER_FIELD_ACCESS_OR_NULL(commitment_tx_conv);
commitment_tx_conv.is_owned = false;
- LDKCVec_ThirtyTwoBytesZ preimages_constr;
- preimages_constr.datalen = preimages->arr_len;
- if (preimages_constr.datalen > 0)
- preimages_constr.data = MALLOC(preimages_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+ LDKCVec_ThirtyTwoBytesZ inbound_htlc_preimages_constr;
+ inbound_htlc_preimages_constr.datalen = inbound_htlc_preimages->arr_len;
+ if (inbound_htlc_preimages_constr.datalen > 0)
+ inbound_htlc_preimages_constr.data = MALLOC(inbound_htlc_preimages_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
else
- preimages_constr.data = NULL;
- int8_tArray* preimages_vals = (void*) preimages->elems;
- for (size_t m = 0; m < preimages_constr.datalen; m++) {
- int8_tArray preimages_conv_12 = preimages_vals[m];
- LDKThirtyTwoBytes preimages_conv_12_ref;
- CHECK(preimages_conv_12->arr_len == 32);
- memcpy(preimages_conv_12_ref.data, preimages_conv_12->elems, 32); FREE(preimages_conv_12);
- preimages_constr.data[m] = preimages_conv_12_ref;
- }
- FREE(preimages);
+ inbound_htlc_preimages_constr.data = NULL;
+ int8_tArray* inbound_htlc_preimages_vals = (void*) inbound_htlc_preimages->elems;
+ for (size_t m = 0; m < inbound_htlc_preimages_constr.datalen; m++) {
+ int8_tArray inbound_htlc_preimages_conv_12 = inbound_htlc_preimages_vals[m];
+ LDKThirtyTwoBytes inbound_htlc_preimages_conv_12_ref;
+ CHECK(inbound_htlc_preimages_conv_12->arr_len == 32);
+ memcpy(inbound_htlc_preimages_conv_12_ref.data, inbound_htlc_preimages_conv_12->elems, 32); FREE(inbound_htlc_preimages_conv_12);
+ inbound_htlc_preimages_constr.data[m] = inbound_htlc_preimages_conv_12_ref;
+ }
+ FREE(inbound_htlc_preimages);
+ LDKCVec_ThirtyTwoBytesZ outbound_htlc_preimages_constr;
+ outbound_htlc_preimages_constr.datalen = outbound_htlc_preimages->arr_len;
+ if (outbound_htlc_preimages_constr.datalen > 0)
+ outbound_htlc_preimages_constr.data = MALLOC(outbound_htlc_preimages_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+ else
+ outbound_htlc_preimages_constr.data = NULL;
+ int8_tArray* outbound_htlc_preimages_vals = (void*) outbound_htlc_preimages->elems;
+ for (size_t m = 0; m < outbound_htlc_preimages_constr.datalen; m++) {
+ int8_tArray outbound_htlc_preimages_conv_12 = outbound_htlc_preimages_vals[m];
+ LDKThirtyTwoBytes outbound_htlc_preimages_conv_12_ref;
+ CHECK(outbound_htlc_preimages_conv_12->arr_len == 32);
+ memcpy(outbound_htlc_preimages_conv_12_ref.data, outbound_htlc_preimages_conv_12->elems, 32); FREE(outbound_htlc_preimages_conv_12);
+ outbound_htlc_preimages_constr.data[m] = outbound_htlc_preimages_conv_12_ref;
+ }
+ FREE(outbound_htlc_preimages);
LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
- *ret_conv = (this_arg_conv->sign_counterparty_commitment)(this_arg_conv->this_arg, &commitment_tx_conv, preimages_constr);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_EcdsaChannelSigner_validate_counterparty_revocation"))) TS_EcdsaChannelSigner_validate_counterparty_revocation(uint64_t this_arg, int64_t idx, int8_tArray secret) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKEcdsaChannelSigner* this_arg_conv = (LDKEcdsaChannelSigner*)this_arg_ptr;
- uint8_t secret_arr[32];
- CHECK(secret->arr_len == 32);
- memcpy(secret_arr, secret->elems, 32); FREE(secret);
- uint8_t (*secret_ref)[32] = &secret_arr;
- LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
- *ret_conv = (this_arg_conv->validate_counterparty_revocation)(this_arg_conv->this_arg, idx, secret_ref);
+ *ret_conv = (this_arg_conv->sign_counterparty_commitment)(this_arg_conv->this_arg, &commitment_tx_conv, inbound_htlc_preimages_constr, outbound_htlc_preimages_constr);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_EcdsaChannelSigner_sign_holder_commitment_and_htlcs"))) TS_EcdsaChannelSigner_sign_holder_commitment_and_htlcs(uint64_t this_arg, uint64_t commitment_tx) {
+uint64_t __attribute__((export_name("TS_EcdsaChannelSigner_sign_holder_commitment"))) TS_EcdsaChannelSigner_sign_holder_commitment(uint64_t this_arg, uint64_t commitment_tx) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKEcdsaChannelSigner* this_arg_conv = (LDKEcdsaChannelSigner*)this_arg_ptr;
commitment_tx_conv.is_owned = ptr_is_owned(commitment_tx);
CHECK_INNER_FIELD_ACCESS_OR_NULL(commitment_tx_conv);
commitment_tx_conv.is_owned = false;
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
- *ret_conv = (this_arg_conv->sign_holder_commitment_and_htlcs)(this_arg_conv->this_arg, &commitment_tx_conv);
+ LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
+ *ret_conv = (this_arg_conv->sign_holder_commitment)(this_arg_conv->this_arg, &commitment_tx_conv);
return tag_ptr(ret_conv, true);
}
int16_t __attribute__((export_name("TS_LDKCOption_u16Z_Some_get_some"))) TS_LDKCOption_u16Z_Some_get_some(uint64_t ptr) {
LDKCOption_u16Z *obj = (LDKCOption_u16Z*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_u16Z_Some);
- int16_t some_conv = obj->some;
+ int16_t some_conv = obj->some;
return some_conv;
}
uint32_t __attribute__((export_name("TS_LDKCOption_boolZ_ty_from_ptr"))) TS_LDKCOption_boolZ_ty_from_ptr(uint64_t ptr) {
jboolean __attribute__((export_name("TS_LDKCOption_boolZ_Some_get_some"))) TS_LDKCOption_boolZ_Some_get_some(uint64_t ptr) {
LDKCOption_boolZ *obj = (LDKCOption_boolZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_boolZ_Some);
- jboolean some_conv = obj->some;
+ jboolean some_conv = obj->some;
return some_conv;
}
-static inline LDKCVec_CVec_u8ZZ CVec_CVec_u8ZZ_clone(const LDKCVec_CVec_u8ZZ *orig) {
- LDKCVec_CVec_u8ZZ ret = { .data = MALLOC(sizeof(LDKCVec_u8Z) * orig->datalen, "LDKCVec_CVec_u8ZZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = CVec_u8Z_clone(&orig->data[i]);
- }
- return ret;
-}
-static inline struct LDKCVec_CVec_u8ZZ CResult_CVec_CVec_u8ZZNoneZ_get_ok(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner){
+static inline struct LDKWitness CResult_WitnessNoneZ_get_ok(LDKCResult_WitnessNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
- return CVec_CVec_u8ZZ_clone(&*owner->contents.result);
+ return Witness_clone(&*owner->contents.result);
}
-ptrArray __attribute__((export_name("TS_CResult_CVec_CVec_u8ZZNoneZ_get_ok"))) TS_CResult_CVec_CVec_u8ZZNoneZ_get_ok(uint64_t owner) {
- LDKCResult_CVec_CVec_u8ZZNoneZ* owner_conv = (LDKCResult_CVec_CVec_u8ZZNoneZ*)untag_ptr(owner);
- LDKCVec_CVec_u8ZZ ret_var = CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner_conv);
- ptrArray ret_arr = NULL;
- ret_arr = init_ptrArray(ret_var.datalen, __LINE__);
- int8_tArray *ret_arr_ptr = (int8_tArray*)(((uint8_t*)ret_arr) + 8);
- for (size_t m = 0; m < ret_var.datalen; m++) {
- LDKCVec_u8Z ret_conv_12_var = ret_var.data[m];
- int8_tArray ret_conv_12_arr = init_int8_tArray(ret_conv_12_var.datalen, __LINE__);
- memcpy(ret_conv_12_arr->elems, ret_conv_12_var.data, ret_conv_12_var.datalen);
- CVec_u8Z_free(ret_conv_12_var);
- ret_arr_ptr[m] = ret_conv_12_arr;
- }
-
- FREE(ret_var.data);
+int8_tArray __attribute__((export_name("TS_CResult_WitnessNoneZ_get_ok"))) TS_CResult_WitnessNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_WitnessNoneZ* owner_conv = (LDKCResult_WitnessNoneZ*)untag_ptr(owner);
+ LDKWitness ret_var = CResult_WitnessNoneZ_get_ok(owner_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ Witness_free(ret_var);
return ret_arr;
}
-static inline void CResult_CVec_CVec_u8ZZNoneZ_get_err(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner){
+static inline void CResult_WitnessNoneZ_get_err(LDKCResult_WitnessNoneZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return *owner->contents.err;
}
-void __attribute__((export_name("TS_CResult_CVec_CVec_u8ZZNoneZ_get_err"))) TS_CResult_CVec_CVec_u8ZZNoneZ_get_err(uint64_t owner) {
- LDKCResult_CVec_CVec_u8ZZNoneZ* owner_conv = (LDKCResult_CVec_CVec_u8ZZNoneZ*)untag_ptr(owner);
- CResult_CVec_CVec_u8ZZNoneZ_get_err(owner_conv);
+void __attribute__((export_name("TS_CResult_WitnessNoneZ_get_err"))) TS_CResult_WitnessNoneZ_get_err(uint64_t owner) {
+ LDKCResult_WitnessNoneZ* owner_conv = (LDKCResult_WitnessNoneZ*)untag_ptr(owner);
+ CResult_WitnessNoneZ_get_err(owner_conv);
}
static inline struct LDKInMemorySigner CResult_InMemorySignerDecodeErrorZ_get_ok(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner){
return ret_ref;
}
+static inline struct LDKBlindedPayInfo C2Tuple_BlindedPayInfoBlindedPathZ_get_a(LDKC2Tuple_BlindedPayInfoBlindedPathZ *NONNULL_PTR owner){
+ LDKBlindedPayInfo ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_get_a"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_get_a(uint64_t owner) {
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ* owner_conv = (LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(owner);
+ LDKBlindedPayInfo ret_var = C2Tuple_BlindedPayInfoBlindedPathZ_get_a(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKBlindedPath C2Tuple_BlindedPayInfoBlindedPathZ_get_b(LDKC2Tuple_BlindedPayInfoBlindedPathZ *NONNULL_PTR owner){
+ LDKBlindedPath ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_get_b"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_get_b(uint64_t owner) {
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ* owner_conv = (LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(owner);
+ LDKBlindedPath ret_var = C2Tuple_BlindedPayInfoBlindedPathZ_get_b(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_clone(const LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ *orig) {
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ) * orig->datalen, "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_BlindedPayInfoBlindedPathZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_get_ok(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_clone(&*owner->contents.result);
+}
+uint64_tArray __attribute__((export_name("TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_get_ok"))) TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* owner_conv = (LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ*)untag_ptr(owner);
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ ret_var = CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_get_ok(owner_conv);
+ uint64_tArray ret_arr = NULL;
+ ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
+ uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t l = 0; l < ret_var.datalen; l++) {
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ* ret_conv_37_conv = MALLOC(sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKC2Tuple_BlindedPayInfoBlindedPathZ");
+ *ret_conv_37_conv = ret_var.data[l];
+ ret_arr_ptr[l] = tag_ptr(ret_conv_37_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline void CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_get_err(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void __attribute__((export_name("TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_get_err"))) TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_get_err(uint64_t owner) {
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* owner_conv = (LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ*)untag_ptr(owner);
+ CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKOnionMessagePath CResult_OnionMessagePathNoneZ_get_ok(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
+ LDKOnionMessagePath ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_get_ok"))) TS_CResult_OnionMessagePathNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
+ LDKOnionMessagePath ret_var = CResult_OnionMessagePathNoneZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline void CResult_OnionMessagePathNoneZ_get_err(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_get_err"))) TS_CResult_OnionMessagePathNoneZ_get_err(uint64_t owner) {
+ LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
+ CResult_OnionMessagePathNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKCVec_BlindedPathZ CResult_CVec_BlindedPathZNoneZ_get_ok(LDKCResult_CVec_BlindedPathZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return CVec_BlindedPathZ_clone(&*owner->contents.result);
+}
+uint64_tArray __attribute__((export_name("TS_CResult_CVec_BlindedPathZNoneZ_get_ok"))) TS_CResult_CVec_BlindedPathZNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_CVec_BlindedPathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedPathZNoneZ*)untag_ptr(owner);
+ LDKCVec_BlindedPathZ ret_var = CResult_CVec_BlindedPathZNoneZ_get_ok(owner_conv);
+ uint64_tArray ret_arr = NULL;
+ ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
+ uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t n = 0; n < ret_var.datalen; n++) {
+ LDKBlindedPath ret_conv_13_var = ret_var.data[n];
+ uint64_t ret_conv_13_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var);
+ ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned);
+ ret_arr_ptr[n] = ret_conv_13_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline void CResult_CVec_BlindedPathZNoneZ_get_err(LDKCResult_CVec_BlindedPathZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void __attribute__((export_name("TS_CResult_CVec_BlindedPathZNoneZ_get_err"))) TS_CResult_CVec_BlindedPathZNoneZ_get_err(uint64_t owner) {
+ LDKCResult_CVec_BlindedPathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedPathZNoneZ*)untag_ptr(owner);
+ CResult_CVec_BlindedPathZNoneZ_get_err(owner_conv);
+}
+
static inline struct LDKInFlightHtlcs CResult_InFlightHtlcsDecodeErrorZ_get_ok(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner){
LDKInFlightHtlcs ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
-static inline struct LDKBlindedPayInfo C2Tuple_BlindedPayInfoBlindedPathZ_get_a(LDKC2Tuple_BlindedPayInfoBlindedPathZ *NONNULL_PTR owner){
- LDKBlindedPayInfo ret = owner->a;
- ret.is_owned = false;
- return ret;
-}
-uint64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_get_a"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_get_a(uint64_t owner) {
- LDKC2Tuple_BlindedPayInfoBlindedPathZ* owner_conv = (LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(owner);
- LDKBlindedPayInfo ret_var = C2Tuple_BlindedPayInfoBlindedPathZ_get_a(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline struct LDKBlindedPath C2Tuple_BlindedPayInfoBlindedPathZ_get_b(LDKC2Tuple_BlindedPayInfoBlindedPathZ *NONNULL_PTR owner){
- LDKBlindedPath ret = owner->b;
- ret.is_owned = false;
- return ret;
-}
-uint64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_get_b"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_get_b(uint64_t owner) {
- LDKC2Tuple_BlindedPayInfoBlindedPathZ* owner_conv = (LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(owner);
- LDKBlindedPath ret_var = C2Tuple_BlindedPayInfoBlindedPathZ_get_b(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_clone(const LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ *orig) {
- LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ) * orig->datalen, "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C2Tuple_BlindedPayInfoBlindedPathZ_clone(&orig->data[i]);
- }
- return ret;
-}
static inline LDKCVec_RouteHintZ CVec_RouteHintZ_clone(const LDKCVec_RouteHintZ *orig) {
LDKCVec_RouteHintZ ret = { .data = MALLOC(sizeof(LDKRouteHint) * orig->datalen, "LDKCVec_RouteHintZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
uint64_t __attribute__((export_name("TS_LDKCOption_C2Tuple_u64u64ZZ_Some_get_some"))) TS_LDKCOption_C2Tuple_u64u64ZZ_Some_get_some(uint64_t ptr) {
LDKCOption_C2Tuple_u64u64ZZ *obj = (LDKCOption_C2Tuple_u64u64ZZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_C2Tuple_u64u64ZZ_Some);
- LDKC2Tuple_u64u64Z* some_conv = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
- *some_conv = obj->some;
+ LDKC2Tuple_u64u64Z* some_conv = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
+ *some_conv = obj->some;
*some_conv = C2Tuple_u64u64Z_clone(some_conv);
return tag_ptr(some_conv, true);
}
uint64_t __attribute__((export_name("TS_LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Some_get_some"))) TS_LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Some_get_some(uint64_t ptr) {
LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ *obj = (LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Some);
- LDKC2Tuple__u1632_u1632Z* some_conv = &obj->some;
+ LDKC2Tuple__u1632_u1632Z* some_conv = &obj->some;
// WARNING: we really need to clone here, but no clone is available for LDKC2Tuple__u1632_u1632Z
return tag_ptr(some_conv, false);
}
double __attribute__((export_name("TS_LDKCOption_f64Z_Some_get_some"))) TS_LDKCOption_f64Z_Some_get_some(uint64_t ptr) {
LDKCOption_f64Z *obj = (LDKCOption_f64Z*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_f64Z_Some);
- double some_conv = obj->some;
+ double some_conv = obj->some;
return some_conv;
}
typedef struct LDKLogger_JCalls {
FREE(j_calls);
}
}
-void log_LDKLogger_jcall(const void* this_arg, const LDKRecord * record) {
+void log_LDKLogger_jcall(const void* this_arg, LDKRecord record) {
LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
- LDKRecord record_var = *record;
+ LDKRecord record_var = record;
uint64_t record_ref = 0;
- record_var = Record_clone(&record_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(record_var);
record_ref = tag_ptr(record_var.inner, record_var.is_owned);
js_invoke_function_buuuuu(j_calls->instance_ptr, 16, record_ref, 0, 0, 0, 0, 0);
}
return ret;
}
-static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_a(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ *NONNULL_PTR owner){
+static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_a(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ *NONNULL_PTR owner){
return ThirtyTwoBytes_clone(&owner->a);
}
-int8_tArray __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_a"))) TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_a(uint64_t owner) {
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ*)untag_ptr(owner);
+int8_tArray __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_a"))) TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_a(uint64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ*)untag_ptr(owner);
int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_a(owner_conv).data, 32);
+ memcpy(ret_arr->elems, C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_a(owner_conv).data, 32);
return ret_arr;
}
-static inline struct LDKCOption_ThirtyTwoBytesZ C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_b(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ *NONNULL_PTR owner){
- return COption_ThirtyTwoBytesZ_clone(&owner->b);
+static inline uint32_t C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_b(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ *NONNULL_PTR owner){
+ return owner->b;
+}
+int32_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_b"))) TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_b(uint64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ*)untag_ptr(owner);
+ int32_t ret_conv = C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_b(owner_conv);
+ return ret_conv;
+}
+
+static inline struct LDKCOption_ThirtyTwoBytesZ C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_c(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ *NONNULL_PTR owner){
+ return COption_ThirtyTwoBytesZ_clone(&owner->c);
}
-uint64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_b"))) TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_b(uint64_t owner) {
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ*)untag_ptr(owner);
+uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_c"))) TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_c(uint64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ*)untag_ptr(owner);
LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ");
- *ret_copy = C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_get_b(owner_conv);
+ *ret_copy = C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_get_c(owner_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-static inline LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ CVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ *orig) {
- LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ CVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ_clone(const LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ *orig) {
+ LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ) * orig->datalen, "LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone(&orig->data[i]);
+ ret.data[i] = C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone(&orig->data[i]);
}
return ret;
}
uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HTLCEvent_get_htlc_event"))) TS_LDKMonitorEvent_HTLCEvent_get_htlc_event(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMonitorEvent_HTLCEvent);
- LDKHTLCUpdate htlc_event_var = obj->htlc_event;
+ LDKHTLCUpdate htlc_event_var = obj->htlc_event;
uint64_t htlc_event_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_event_var);
htlc_event_ref = tag_ptr(htlc_event_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKMonitorEvent_HolderForceClosed_get_holder_force_closed"))) TS_LDKMonitorEvent_HolderForceClosed_get_holder_force_closed(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMonitorEvent_HolderForceClosed);
- LDKOutPoint holder_force_closed_var = obj->holder_force_closed;
+ LDKOutPoint holder_force_closed_var = obj->holder_force_closed;
uint64_t holder_force_closed_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(holder_force_closed_var);
holder_force_closed_ref = tag_ptr(holder_force_closed_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_funding_txo"))) TS_LDKMonitorEvent_Completed_get_funding_txo(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMonitorEvent_Completed);
- LDKOutPoint funding_txo_var = obj->completed.funding_txo;
+ LDKOutPoint funding_txo_var = obj->completed.funding_txo;
uint64_t funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
int64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_monitor_update_id"))) TS_LDKMonitorEvent_Completed_get_monitor_update_id(uint64_t ptr) {
LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMonitorEvent_Completed);
- int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
+ int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
return monitor_update_id_conv;
}
static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_MonitorEventZ *orig) {
uint64_t __attribute__((export_name("TS_LDKNetworkUpdate_ChannelUpdateMessage_get_msg"))) TS_LDKNetworkUpdate_ChannelUpdateMessage_get_msg(uint64_t ptr) {
LDKNetworkUpdate *obj = (LDKNetworkUpdate*)untag_ptr(ptr);
assert(obj->tag == LDKNetworkUpdate_ChannelUpdateMessage);
- LDKChannelUpdate msg_var = obj->channel_update_message.msg;
+ LDKChannelUpdate msg_var = obj->channel_update_message.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int64_t __attribute__((export_name("TS_LDKNetworkUpdate_ChannelFailure_get_short_channel_id"))) TS_LDKNetworkUpdate_ChannelFailure_get_short_channel_id(uint64_t ptr) {
LDKNetworkUpdate *obj = (LDKNetworkUpdate*)untag_ptr(ptr);
assert(obj->tag == LDKNetworkUpdate_ChannelFailure);
- int64_t short_channel_id_conv = obj->channel_failure.short_channel_id;
+ int64_t short_channel_id_conv = obj->channel_failure.short_channel_id;
return short_channel_id_conv;
}
jboolean __attribute__((export_name("TS_LDKNetworkUpdate_ChannelFailure_get_is_permanent"))) TS_LDKNetworkUpdate_ChannelFailure_get_is_permanent(uint64_t ptr) {
LDKNetworkUpdate *obj = (LDKNetworkUpdate*)untag_ptr(ptr);
assert(obj->tag == LDKNetworkUpdate_ChannelFailure);
- jboolean is_permanent_conv = obj->channel_failure.is_permanent;
+ jboolean is_permanent_conv = obj->channel_failure.is_permanent;
return is_permanent_conv;
}
int8_tArray __attribute__((export_name("TS_LDKNetworkUpdate_NodeFailure_get_node_id"))) TS_LDKNetworkUpdate_NodeFailure_get_node_id(uint64_t ptr) {
LDKNetworkUpdate *obj = (LDKNetworkUpdate*)untag_ptr(ptr);
assert(obj->tag == LDKNetworkUpdate_NodeFailure);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->node_failure.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->node_failure.node_id.compressed_form, 33);
return node_id_arr;
}
jboolean __attribute__((export_name("TS_LDKNetworkUpdate_NodeFailure_get_is_permanent"))) TS_LDKNetworkUpdate_NodeFailure_get_is_permanent(uint64_t ptr) {
LDKNetworkUpdate *obj = (LDKNetworkUpdate*)untag_ptr(ptr);
assert(obj->tag == LDKNetworkUpdate_NodeFailure);
- jboolean is_permanent_conv = obj->node_failure.is_permanent;
+ jboolean is_permanent_conv = obj->node_failure.is_permanent;
return is_permanent_conv;
}
uint32_t __attribute__((export_name("TS_LDKCOption_NetworkUpdateZ_ty_from_ptr"))) TS_LDKCOption_NetworkUpdateZ_ty_from_ptr(uint64_t ptr) {
uint64_t __attribute__((export_name("TS_LDKCOption_NetworkUpdateZ_Some_get_some"))) TS_LDKCOption_NetworkUpdateZ_Some_get_some(uint64_t ptr) {
LDKCOption_NetworkUpdateZ *obj = (LDKCOption_NetworkUpdateZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_NetworkUpdateZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
return some_ref;
}
static inline struct LDKCOption_NetworkUpdateZ CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKUtxoResult_Sync_get_sync"))) TS_LDKUtxoResult_Sync_get_sync(uint64_t ptr) {
LDKUtxoResult *obj = (LDKUtxoResult*)untag_ptr(ptr);
assert(obj->tag == LDKUtxoResult_Sync);
- LDKCResult_TxOutUtxoLookupErrorZ* sync_conv = MALLOC(sizeof(LDKCResult_TxOutUtxoLookupErrorZ), "LDKCResult_TxOutUtxoLookupErrorZ");
- *sync_conv = obj->sync;
+ LDKCResult_TxOutUtxoLookupErrorZ* sync_conv = MALLOC(sizeof(LDKCResult_TxOutUtxoLookupErrorZ), "LDKCResult_TxOutUtxoLookupErrorZ");
+ *sync_conv = obj->sync;
*sync_conv = CResult_TxOutUtxoLookupErrorZ_clone(sync_conv);
return tag_ptr(sync_conv, true);
}
uint64_t __attribute__((export_name("TS_LDKUtxoResult_Async_get_async"))) TS_LDKUtxoResult_Async_get_async(uint64_t ptr) {
LDKUtxoResult *obj = (LDKUtxoResult*)untag_ptr(ptr);
assert(obj->tag == LDKUtxoResult_Async);
- LDKUtxoFuture async_var = obj->async;
+ LDKUtxoFuture async_var = obj->async;
uint64_t async_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(async_var);
async_ref = tag_ptr(async_var.inner, false);
FREE(j_calls);
}
}
-LDKUtxoResult get_utxo_LDKUtxoLookup_jcall(const void* this_arg, const uint8_t (* genesis_hash)[32], uint64_t short_channel_id) {
+LDKUtxoResult get_utxo_LDKUtxoLookup_jcall(const void* this_arg, const uint8_t (* chain_hash)[32], uint64_t short_channel_id) {
LDKUtxoLookup_JCalls *j_calls = (LDKUtxoLookup_JCalls*) this_arg;
- int8_tArray genesis_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(genesis_hash_arr->elems, *genesis_hash, 32);
+ int8_tArray chain_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(chain_hash_arr->elems, *chain_hash, 32);
int64_t short_channel_id_conv = short_channel_id;
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 17, (uint32_t)genesis_hash_arr, short_channel_id_conv, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 17, (uint32_t)chain_hash_arr, short_channel_id_conv, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKUtxoResult ret_conv = *(LDKUtxoResult*)(ret_ptr);
*res_ptr = LDKUtxoLookup_init(o);
return tag_ptr(res_ptr, true);
}
-uint64_t __attribute__((export_name("TS_UtxoLookup_get_utxo"))) TS_UtxoLookup_get_utxo(uint64_t this_arg, int8_tArray genesis_hash, int64_t short_channel_id) {
+uint64_t __attribute__((export_name("TS_UtxoLookup_get_utxo"))) TS_UtxoLookup_get_utxo(uint64_t this_arg, int8_tArray chain_hash, int64_t short_channel_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKUtxoLookup* this_arg_conv = (LDKUtxoLookup*)this_arg_ptr;
- uint8_t genesis_hash_arr[32];
- CHECK(genesis_hash->arr_len == 32);
- memcpy(genesis_hash_arr, genesis_hash->elems, 32); FREE(genesis_hash);
- uint8_t (*genesis_hash_ref)[32] = &genesis_hash_arr;
+ uint8_t chain_hash_arr[32];
+ CHECK(chain_hash->arr_len == 32);
+ memcpy(chain_hash_arr, chain_hash->elems, 32); FREE(chain_hash);
+ uint8_t (*chain_hash_ref)[32] = &chain_hash_arr;
LDKUtxoResult *ret_copy = MALLOC(sizeof(LDKUtxoResult), "LDKUtxoResult");
- *ret_copy = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, genesis_hash_ref, short_channel_id);
+ *ret_copy = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, chain_hash_ref, short_channel_id);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
uint64_t __attribute__((export_name("TS_LDKCOption_UtxoLookupZ_Some_get_some"))) TS_LDKCOption_UtxoLookupZ_Some_get_some(uint64_t ptr) {
LDKCOption_UtxoLookupZ *obj = (LDKCOption_UtxoLookupZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_UtxoLookupZ_Some);
- LDKUtxoLookup* some_ret = MALLOC(sizeof(LDKUtxoLookup), "LDKUtxoLookup");
- *some_ret = obj->some;
+ LDKUtxoLookup* some_ret = MALLOC(sizeof(LDKUtxoLookup), "LDKUtxoLookup");
+ *some_ret = obj->some;
// WARNING: We likely need to clone here, but no clone is available, so we just do it for Java instances
if ((*some_ret).free == LDKUtxoLookup_JCalls_free) {
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
uint64_t __attribute__((export_name("TS_LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_Some_get_some"))) TS_LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_Some_get_some(uint64_t ptr) {
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *obj = (LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_Some);
- LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* some_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
- *some_conv = obj->some;
+ LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* some_conv = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+ *some_conv = obj->some;
*some_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(some_conv);
return tag_ptr(some_conv, true);
}
uint64_t __attribute__((export_name("TS_LDKErrorAction_DisconnectPeer_get_msg"))) TS_LDKErrorAction_DisconnectPeer_get_msg(uint64_t ptr) {
LDKErrorAction *obj = (LDKErrorAction*)untag_ptr(ptr);
assert(obj->tag == LDKErrorAction_DisconnectPeer);
- LDKErrorMessage msg_var = obj->disconnect_peer.msg;
+ LDKErrorMessage msg_var = obj->disconnect_peer.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKErrorAction_DisconnectPeerWithWarning_get_msg"))) TS_LDKErrorAction_DisconnectPeerWithWarning_get_msg(uint64_t ptr) {
LDKErrorAction *obj = (LDKErrorAction*)untag_ptr(ptr);
assert(obj->tag == LDKErrorAction_DisconnectPeerWithWarning);
- LDKWarningMessage msg_var = obj->disconnect_peer_with_warning.msg;
+ LDKWarningMessage msg_var = obj->disconnect_peer_with_warning.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
uint32_t __attribute__((export_name("TS_LDKErrorAction_IgnoreAndLog_get_ignore_and_log"))) TS_LDKErrorAction_IgnoreAndLog_get_ignore_and_log(uint64_t ptr) {
LDKErrorAction *obj = (LDKErrorAction*)untag_ptr(ptr);
assert(obj->tag == LDKErrorAction_IgnoreAndLog);
- uint32_t ignore_and_log_conv = LDKLevel_to_js(obj->ignore_and_log);
+ uint32_t ignore_and_log_conv = LDKLevel_to_js(obj->ignore_and_log);
return ignore_and_log_conv;
}
uint64_t __attribute__((export_name("TS_LDKErrorAction_SendErrorMessage_get_msg"))) TS_LDKErrorAction_SendErrorMessage_get_msg(uint64_t ptr) {
LDKErrorAction *obj = (LDKErrorAction*)untag_ptr(ptr);
assert(obj->tag == LDKErrorAction_SendErrorMessage);
- LDKErrorMessage msg_var = obj->send_error_message.msg;
+ LDKErrorMessage msg_var = obj->send_error_message.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKErrorAction_SendWarningMessage_get_msg"))) TS_LDKErrorAction_SendWarningMessage_get_msg(uint64_t ptr) {
LDKErrorAction *obj = (LDKErrorAction*)untag_ptr(ptr);
assert(obj->tag == LDKErrorAction_SendWarningMessage);
- LDKWarningMessage msg_var = obj->send_warning_message.msg;
+ LDKWarningMessage msg_var = obj->send_warning_message.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
uint32_t __attribute__((export_name("TS_LDKErrorAction_SendWarningMessage_get_log_level"))) TS_LDKErrorAction_SendWarningMessage_get_log_level(uint64_t ptr) {
LDKErrorAction *obj = (LDKErrorAction*)untag_ptr(ptr);
assert(obj->tag == LDKErrorAction_SendWarningMessage);
- uint32_t log_level_conv = LDKLevel_to_js(obj->send_warning_message.log_level);
+ uint32_t log_level_conv = LDKLevel_to_js(obj->send_warning_message.log_level);
return log_level_conv;
}
uint32_t __attribute__((export_name("TS_LDKMessageSendEvent_ty_from_ptr"))) TS_LDKMessageSendEvent_ty_from_ptr(uint64_t ptr) {
case LDKMessageSendEvent_SendOpenChannelV2: return 3;
case LDKMessageSendEvent_SendFundingCreated: return 4;
case LDKMessageSendEvent_SendFundingSigned: return 5;
- case LDKMessageSendEvent_SendTxAddInput: return 6;
- case LDKMessageSendEvent_SendTxAddOutput: return 7;
- case LDKMessageSendEvent_SendTxRemoveInput: return 8;
- case LDKMessageSendEvent_SendTxRemoveOutput: return 9;
- case LDKMessageSendEvent_SendTxComplete: return 10;
- case LDKMessageSendEvent_SendTxSignatures: return 11;
- case LDKMessageSendEvent_SendTxInitRbf: return 12;
- case LDKMessageSendEvent_SendTxAckRbf: return 13;
- case LDKMessageSendEvent_SendTxAbort: return 14;
- case LDKMessageSendEvent_SendChannelReady: return 15;
- case LDKMessageSendEvent_SendAnnouncementSignatures: return 16;
- case LDKMessageSendEvent_UpdateHTLCs: return 17;
- case LDKMessageSendEvent_SendRevokeAndACK: return 18;
- case LDKMessageSendEvent_SendClosingSigned: return 19;
- case LDKMessageSendEvent_SendShutdown: return 20;
- case LDKMessageSendEvent_SendChannelReestablish: return 21;
- case LDKMessageSendEvent_SendChannelAnnouncement: return 22;
- case LDKMessageSendEvent_BroadcastChannelAnnouncement: return 23;
- case LDKMessageSendEvent_BroadcastChannelUpdate: return 24;
- case LDKMessageSendEvent_BroadcastNodeAnnouncement: return 25;
- case LDKMessageSendEvent_SendChannelUpdate: return 26;
- case LDKMessageSendEvent_HandleError: return 27;
- case LDKMessageSendEvent_SendChannelRangeQuery: return 28;
- case LDKMessageSendEvent_SendShortIdsQuery: return 29;
- case LDKMessageSendEvent_SendReplyChannelRange: return 30;
- case LDKMessageSendEvent_SendGossipTimestampFilter: return 31;
+ case LDKMessageSendEvent_SendStfu: return 6;
+ case LDKMessageSendEvent_SendSplice: return 7;
+ case LDKMessageSendEvent_SendSpliceAck: return 8;
+ case LDKMessageSendEvent_SendSpliceLocked: return 9;
+ case LDKMessageSendEvent_SendTxAddInput: return 10;
+ case LDKMessageSendEvent_SendTxAddOutput: return 11;
+ case LDKMessageSendEvent_SendTxRemoveInput: return 12;
+ case LDKMessageSendEvent_SendTxRemoveOutput: return 13;
+ case LDKMessageSendEvent_SendTxComplete: return 14;
+ case LDKMessageSendEvent_SendTxSignatures: return 15;
+ case LDKMessageSendEvent_SendTxInitRbf: return 16;
+ case LDKMessageSendEvent_SendTxAckRbf: return 17;
+ case LDKMessageSendEvent_SendTxAbort: return 18;
+ case LDKMessageSendEvent_SendChannelReady: return 19;
+ case LDKMessageSendEvent_SendAnnouncementSignatures: return 20;
+ case LDKMessageSendEvent_UpdateHTLCs: return 21;
+ case LDKMessageSendEvent_SendRevokeAndACK: return 22;
+ case LDKMessageSendEvent_SendClosingSigned: return 23;
+ case LDKMessageSendEvent_SendShutdown: return 24;
+ case LDKMessageSendEvent_SendChannelReestablish: return 25;
+ case LDKMessageSendEvent_SendChannelAnnouncement: return 26;
+ case LDKMessageSendEvent_BroadcastChannelAnnouncement: return 27;
+ case LDKMessageSendEvent_BroadcastChannelUpdate: return 28;
+ case LDKMessageSendEvent_BroadcastNodeAnnouncement: return 29;
+ case LDKMessageSendEvent_SendChannelUpdate: return 30;
+ case LDKMessageSendEvent_HandleError: return 31;
+ case LDKMessageSendEvent_SendChannelRangeQuery: return 32;
+ case LDKMessageSendEvent_SendShortIdsQuery: return 33;
+ case LDKMessageSendEvent_SendReplyChannelRange: return 34;
+ case LDKMessageSendEvent_SendGossipTimestampFilter: return 35;
default: abort();
}
}
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendAcceptChannel_get_node_id"))) TS_LDKMessageSendEvent_SendAcceptChannel_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendAcceptChannel);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_accept_channel.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_accept_channel.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendAcceptChannel_get_msg"))) TS_LDKMessageSendEvent_SendAcceptChannel_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendAcceptChannel);
- LDKAcceptChannel msg_var = obj->send_accept_channel.msg;
+ LDKAcceptChannel msg_var = obj->send_accept_channel.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendAcceptChannelV2_get_node_id"))) TS_LDKMessageSendEvent_SendAcceptChannelV2_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendAcceptChannelV2);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_accept_channel_v2.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_accept_channel_v2.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendAcceptChannelV2_get_msg"))) TS_LDKMessageSendEvent_SendAcceptChannelV2_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendAcceptChannelV2);
- LDKAcceptChannelV2 msg_var = obj->send_accept_channel_v2.msg;
+ LDKAcceptChannelV2 msg_var = obj->send_accept_channel_v2.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendOpenChannel_get_node_id"))) TS_LDKMessageSendEvent_SendOpenChannel_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendOpenChannel);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_open_channel.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_open_channel.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendOpenChannel_get_msg"))) TS_LDKMessageSendEvent_SendOpenChannel_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendOpenChannel);
- LDKOpenChannel msg_var = obj->send_open_channel.msg;
+ LDKOpenChannel msg_var = obj->send_open_channel.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendOpenChannelV2_get_node_id"))) TS_LDKMessageSendEvent_SendOpenChannelV2_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendOpenChannelV2);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_open_channel_v2.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_open_channel_v2.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendOpenChannelV2_get_msg"))) TS_LDKMessageSendEvent_SendOpenChannelV2_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendOpenChannelV2);
- LDKOpenChannelV2 msg_var = obj->send_open_channel_v2.msg;
+ LDKOpenChannelV2 msg_var = obj->send_open_channel_v2.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendFundingCreated_get_node_id"))) TS_LDKMessageSendEvent_SendFundingCreated_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendFundingCreated);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_funding_created.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_funding_created.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendFundingCreated_get_msg"))) TS_LDKMessageSendEvent_SendFundingCreated_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendFundingCreated);
- LDKFundingCreated msg_var = obj->send_funding_created.msg;
+ LDKFundingCreated msg_var = obj->send_funding_created.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendFundingSigned_get_node_id"))) TS_LDKMessageSendEvent_SendFundingSigned_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendFundingSigned);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_funding_signed.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_funding_signed.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendFundingSigned_get_msg"))) TS_LDKMessageSendEvent_SendFundingSigned_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendFundingSigned);
- LDKFundingSigned msg_var = obj->send_funding_signed.msg;
+ LDKFundingSigned msg_var = obj->send_funding_signed.msg;
+ uint64_t msg_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
+ msg_ref = tag_ptr(msg_var.inner, false);
+ return msg_ref;
+}
+int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendStfu_get_node_id"))) TS_LDKMessageSendEvent_SendStfu_get_node_id(uint64_t ptr) {
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKMessageSendEvent_SendStfu);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_stfu.node_id.compressed_form, 33);
+ return node_id_arr;
+}
+uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendStfu_get_msg"))) TS_LDKMessageSendEvent_SendStfu_get_msg(uint64_t ptr) {
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKMessageSendEvent_SendStfu);
+ LDKStfu msg_var = obj->send_stfu.msg;
+ uint64_t msg_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
+ msg_ref = tag_ptr(msg_var.inner, false);
+ return msg_ref;
+}
+int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendSplice_get_node_id"))) TS_LDKMessageSendEvent_SendSplice_get_node_id(uint64_t ptr) {
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKMessageSendEvent_SendSplice);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_splice.node_id.compressed_form, 33);
+ return node_id_arr;
+}
+uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendSplice_get_msg"))) TS_LDKMessageSendEvent_SendSplice_get_msg(uint64_t ptr) {
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKMessageSendEvent_SendSplice);
+ LDKSplice msg_var = obj->send_splice.msg;
+ uint64_t msg_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
+ msg_ref = tag_ptr(msg_var.inner, false);
+ return msg_ref;
+}
+int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendSpliceAck_get_node_id"))) TS_LDKMessageSendEvent_SendSpliceAck_get_node_id(uint64_t ptr) {
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKMessageSendEvent_SendSpliceAck);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_splice_ack.node_id.compressed_form, 33);
+ return node_id_arr;
+}
+uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendSpliceAck_get_msg"))) TS_LDKMessageSendEvent_SendSpliceAck_get_msg(uint64_t ptr) {
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKMessageSendEvent_SendSpliceAck);
+ LDKSpliceAck msg_var = obj->send_splice_ack.msg;
+ uint64_t msg_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
+ msg_ref = tag_ptr(msg_var.inner, false);
+ return msg_ref;
+}
+int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendSpliceLocked_get_node_id"))) TS_LDKMessageSendEvent_SendSpliceLocked_get_node_id(uint64_t ptr) {
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKMessageSendEvent_SendSpliceLocked);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_splice_locked.node_id.compressed_form, 33);
+ return node_id_arr;
+}
+uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendSpliceLocked_get_msg"))) TS_LDKMessageSendEvent_SendSpliceLocked_get_msg(uint64_t ptr) {
+ LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKMessageSendEvent_SendSpliceLocked);
+ LDKSpliceLocked msg_var = obj->send_splice_locked.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendTxAddInput_get_node_id"))) TS_LDKMessageSendEvent_SendTxAddInput_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxAddInput);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_tx_add_input.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_tx_add_input.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendTxAddInput_get_msg"))) TS_LDKMessageSendEvent_SendTxAddInput_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxAddInput);
- LDKTxAddInput msg_var = obj->send_tx_add_input.msg;
+ LDKTxAddInput msg_var = obj->send_tx_add_input.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendTxAddOutput_get_node_id"))) TS_LDKMessageSendEvent_SendTxAddOutput_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxAddOutput);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_tx_add_output.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_tx_add_output.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendTxAddOutput_get_msg"))) TS_LDKMessageSendEvent_SendTxAddOutput_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxAddOutput);
- LDKTxAddOutput msg_var = obj->send_tx_add_output.msg;
+ LDKTxAddOutput msg_var = obj->send_tx_add_output.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendTxRemoveInput_get_node_id"))) TS_LDKMessageSendEvent_SendTxRemoveInput_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxRemoveInput);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_tx_remove_input.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_tx_remove_input.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendTxRemoveInput_get_msg"))) TS_LDKMessageSendEvent_SendTxRemoveInput_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxRemoveInput);
- LDKTxRemoveInput msg_var = obj->send_tx_remove_input.msg;
+ LDKTxRemoveInput msg_var = obj->send_tx_remove_input.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendTxRemoveOutput_get_node_id"))) TS_LDKMessageSendEvent_SendTxRemoveOutput_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxRemoveOutput);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_tx_remove_output.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_tx_remove_output.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendTxRemoveOutput_get_msg"))) TS_LDKMessageSendEvent_SendTxRemoveOutput_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxRemoveOutput);
- LDKTxRemoveOutput msg_var = obj->send_tx_remove_output.msg;
+ LDKTxRemoveOutput msg_var = obj->send_tx_remove_output.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendTxComplete_get_node_id"))) TS_LDKMessageSendEvent_SendTxComplete_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxComplete);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_tx_complete.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_tx_complete.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendTxComplete_get_msg"))) TS_LDKMessageSendEvent_SendTxComplete_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxComplete);
- LDKTxComplete msg_var = obj->send_tx_complete.msg;
+ LDKTxComplete msg_var = obj->send_tx_complete.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendTxSignatures_get_node_id"))) TS_LDKMessageSendEvent_SendTxSignatures_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxSignatures);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_tx_signatures.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_tx_signatures.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendTxSignatures_get_msg"))) TS_LDKMessageSendEvent_SendTxSignatures_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxSignatures);
- LDKTxSignatures msg_var = obj->send_tx_signatures.msg;
+ LDKTxSignatures msg_var = obj->send_tx_signatures.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendTxInitRbf_get_node_id"))) TS_LDKMessageSendEvent_SendTxInitRbf_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxInitRbf);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_tx_init_rbf.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_tx_init_rbf.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendTxInitRbf_get_msg"))) TS_LDKMessageSendEvent_SendTxInitRbf_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxInitRbf);
- LDKTxInitRbf msg_var = obj->send_tx_init_rbf.msg;
+ LDKTxInitRbf msg_var = obj->send_tx_init_rbf.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendTxAckRbf_get_node_id"))) TS_LDKMessageSendEvent_SendTxAckRbf_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxAckRbf);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_tx_ack_rbf.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_tx_ack_rbf.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendTxAckRbf_get_msg"))) TS_LDKMessageSendEvent_SendTxAckRbf_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxAckRbf);
- LDKTxAckRbf msg_var = obj->send_tx_ack_rbf.msg;
+ LDKTxAckRbf msg_var = obj->send_tx_ack_rbf.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendTxAbort_get_node_id"))) TS_LDKMessageSendEvent_SendTxAbort_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxAbort);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_tx_abort.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_tx_abort.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendTxAbort_get_msg"))) TS_LDKMessageSendEvent_SendTxAbort_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendTxAbort);
- LDKTxAbort msg_var = obj->send_tx_abort.msg;
+ LDKTxAbort msg_var = obj->send_tx_abort.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelReady_get_node_id"))) TS_LDKMessageSendEvent_SendChannelReady_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelReady);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_channel_ready.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_channel_ready.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelReady_get_msg"))) TS_LDKMessageSendEvent_SendChannelReady_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelReady);
- LDKChannelReady msg_var = obj->send_channel_ready.msg;
+ LDKChannelReady msg_var = obj->send_channel_ready.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendAnnouncementSignatures_get_node_id"))) TS_LDKMessageSendEvent_SendAnnouncementSignatures_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendAnnouncementSignatures);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_announcement_signatures.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_announcement_signatures.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendAnnouncementSignatures_get_msg"))) TS_LDKMessageSendEvent_SendAnnouncementSignatures_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendAnnouncementSignatures);
- LDKAnnouncementSignatures msg_var = obj->send_announcement_signatures.msg;
+ LDKAnnouncementSignatures msg_var = obj->send_announcement_signatures.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_UpdateHTLCs_get_node_id"))) TS_LDKMessageSendEvent_UpdateHTLCs_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_UpdateHTLCs);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->update_htl_cs.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->update_htl_cs.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_UpdateHTLCs_get_updates"))) TS_LDKMessageSendEvent_UpdateHTLCs_get_updates(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_UpdateHTLCs);
- LDKCommitmentUpdate updates_var = obj->update_htl_cs.updates;
+ LDKCommitmentUpdate updates_var = obj->update_htl_cs.updates;
uint64_t updates_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(updates_var);
updates_ref = tag_ptr(updates_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendRevokeAndACK_get_node_id"))) TS_LDKMessageSendEvent_SendRevokeAndACK_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendRevokeAndACK);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_revoke_and_ack.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_revoke_and_ack.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendRevokeAndACK_get_msg"))) TS_LDKMessageSendEvent_SendRevokeAndACK_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendRevokeAndACK);
- LDKRevokeAndACK msg_var = obj->send_revoke_and_ack.msg;
+ LDKRevokeAndACK msg_var = obj->send_revoke_and_ack.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendClosingSigned_get_node_id"))) TS_LDKMessageSendEvent_SendClosingSigned_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendClosingSigned);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_closing_signed.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_closing_signed.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendClosingSigned_get_msg"))) TS_LDKMessageSendEvent_SendClosingSigned_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendClosingSigned);
- LDKClosingSigned msg_var = obj->send_closing_signed.msg;
+ LDKClosingSigned msg_var = obj->send_closing_signed.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendShutdown_get_node_id"))) TS_LDKMessageSendEvent_SendShutdown_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendShutdown);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_shutdown.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_shutdown.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendShutdown_get_msg"))) TS_LDKMessageSendEvent_SendShutdown_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendShutdown);
- LDKShutdown msg_var = obj->send_shutdown.msg;
+ LDKShutdown msg_var = obj->send_shutdown.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelReestablish_get_node_id"))) TS_LDKMessageSendEvent_SendChannelReestablish_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelReestablish);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_channel_reestablish.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_channel_reestablish.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelReestablish_get_msg"))) TS_LDKMessageSendEvent_SendChannelReestablish_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelReestablish);
- LDKChannelReestablish msg_var = obj->send_channel_reestablish.msg;
+ LDKChannelReestablish msg_var = obj->send_channel_reestablish.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelAnnouncement_get_node_id"))) TS_LDKMessageSendEvent_SendChannelAnnouncement_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelAnnouncement);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_channel_announcement.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_channel_announcement.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelAnnouncement_get_msg"))) TS_LDKMessageSendEvent_SendChannelAnnouncement_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelAnnouncement);
- LDKChannelAnnouncement msg_var = obj->send_channel_announcement.msg;
+ LDKChannelAnnouncement msg_var = obj->send_channel_announcement.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelAnnouncement_get_update_msg"))) TS_LDKMessageSendEvent_SendChannelAnnouncement_get_update_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelAnnouncement);
- LDKChannelUpdate update_msg_var = obj->send_channel_announcement.update_msg;
+ LDKChannelUpdate update_msg_var = obj->send_channel_announcement.update_msg;
uint64_t update_msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_msg_var);
update_msg_ref = tag_ptr(update_msg_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_BroadcastChannelAnnouncement_get_msg"))) TS_LDKMessageSendEvent_BroadcastChannelAnnouncement_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_BroadcastChannelAnnouncement);
- LDKChannelAnnouncement msg_var = obj->broadcast_channel_announcement.msg;
+ LDKChannelAnnouncement msg_var = obj->broadcast_channel_announcement.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_BroadcastChannelAnnouncement_get_update_msg"))) TS_LDKMessageSendEvent_BroadcastChannelAnnouncement_get_update_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_BroadcastChannelAnnouncement);
- LDKChannelUpdate update_msg_var = obj->broadcast_channel_announcement.update_msg;
+ LDKChannelUpdate update_msg_var = obj->broadcast_channel_announcement.update_msg;
uint64_t update_msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_msg_var);
update_msg_ref = tag_ptr(update_msg_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_BroadcastChannelUpdate_get_msg"))) TS_LDKMessageSendEvent_BroadcastChannelUpdate_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_BroadcastChannelUpdate);
- LDKChannelUpdate msg_var = obj->broadcast_channel_update.msg;
+ LDKChannelUpdate msg_var = obj->broadcast_channel_update.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_BroadcastNodeAnnouncement_get_msg"))) TS_LDKMessageSendEvent_BroadcastNodeAnnouncement_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_BroadcastNodeAnnouncement);
- LDKNodeAnnouncement msg_var = obj->broadcast_node_announcement.msg;
+ LDKNodeAnnouncement msg_var = obj->broadcast_node_announcement.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelUpdate_get_node_id"))) TS_LDKMessageSendEvent_SendChannelUpdate_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelUpdate);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_channel_update.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_channel_update.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelUpdate_get_msg"))) TS_LDKMessageSendEvent_SendChannelUpdate_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelUpdate);
- LDKChannelUpdate msg_var = obj->send_channel_update.msg;
+ LDKChannelUpdate msg_var = obj->send_channel_update.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_HandleError_get_node_id"))) TS_LDKMessageSendEvent_HandleError_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_HandleError);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->handle_error.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->handle_error.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_HandleError_get_action"))) TS_LDKMessageSendEvent_HandleError_get_action(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_HandleError);
- uint64_t action_ref = tag_ptr(&obj->handle_error.action, false);
+ uint64_t action_ref = tag_ptr(&obj->handle_error.action, false);
return action_ref;
}
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelRangeQuery_get_node_id"))) TS_LDKMessageSendEvent_SendChannelRangeQuery_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelRangeQuery);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_channel_range_query.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_channel_range_query.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendChannelRangeQuery_get_msg"))) TS_LDKMessageSendEvent_SendChannelRangeQuery_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendChannelRangeQuery);
- LDKQueryChannelRange msg_var = obj->send_channel_range_query.msg;
+ LDKQueryChannelRange msg_var = obj->send_channel_range_query.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendShortIdsQuery_get_node_id"))) TS_LDKMessageSendEvent_SendShortIdsQuery_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendShortIdsQuery);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_short_ids_query.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_short_ids_query.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendShortIdsQuery_get_msg"))) TS_LDKMessageSendEvent_SendShortIdsQuery_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendShortIdsQuery);
- LDKQueryShortChannelIds msg_var = obj->send_short_ids_query.msg;
+ LDKQueryShortChannelIds msg_var = obj->send_short_ids_query.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendReplyChannelRange_get_node_id"))) TS_LDKMessageSendEvent_SendReplyChannelRange_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendReplyChannelRange);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_reply_channel_range.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_reply_channel_range.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendReplyChannelRange_get_msg"))) TS_LDKMessageSendEvent_SendReplyChannelRange_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendReplyChannelRange);
- LDKReplyChannelRange msg_var = obj->send_reply_channel_range.msg;
+ LDKReplyChannelRange msg_var = obj->send_reply_channel_range.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKMessageSendEvent_SendGossipTimestampFilter_get_node_id"))) TS_LDKMessageSendEvent_SendGossipTimestampFilter_get_node_id(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendGossipTimestampFilter);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->send_gossip_timestamp_filter.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->send_gossip_timestamp_filter.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKMessageSendEvent_SendGossipTimestampFilter_get_msg"))) TS_LDKMessageSendEvent_SendGossipTimestampFilter_get_msg(uint64_t ptr) {
LDKMessageSendEvent *obj = (LDKMessageSendEvent*)untag_ptr(ptr);
assert(obj->tag == LDKMessageSendEvent_SendGossipTimestampFilter);
- LDKGossipTimestampFilter msg_var = obj->send_gossip_timestamp_filter.msg;
+ LDKGossipTimestampFilter msg_var = obj->send_gossip_timestamp_filter.msg;
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKSocketAddress_TcpIpV4_get_addr"))) TS_LDKSocketAddress_TcpIpV4_get_addr(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_TcpIpV4);
- int8_tArray addr_arr = init_int8_tArray(4, __LINE__);
- memcpy(addr_arr->elems, obj->tcp_ip_v4.addr.data, 4);
+ int8_tArray addr_arr = init_int8_tArray(4, __LINE__);
+ memcpy(addr_arr->elems, obj->tcp_ip_v4.addr.data, 4);
return addr_arr;
}
int16_t __attribute__((export_name("TS_LDKSocketAddress_TcpIpV4_get_port"))) TS_LDKSocketAddress_TcpIpV4_get_port(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_TcpIpV4);
- int16_t port_conv = obj->tcp_ip_v4.port;
+ int16_t port_conv = obj->tcp_ip_v4.port;
return port_conv;
}
int8_tArray __attribute__((export_name("TS_LDKSocketAddress_TcpIpV6_get_addr"))) TS_LDKSocketAddress_TcpIpV6_get_addr(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_TcpIpV6);
- int8_tArray addr_arr = init_int8_tArray(16, __LINE__);
- memcpy(addr_arr->elems, obj->tcp_ip_v6.addr.data, 16);
+ int8_tArray addr_arr = init_int8_tArray(16, __LINE__);
+ memcpy(addr_arr->elems, obj->tcp_ip_v6.addr.data, 16);
return addr_arr;
}
int16_t __attribute__((export_name("TS_LDKSocketAddress_TcpIpV6_get_port"))) TS_LDKSocketAddress_TcpIpV6_get_port(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_TcpIpV6);
- int16_t port_conv = obj->tcp_ip_v6.port;
+ int16_t port_conv = obj->tcp_ip_v6.port;
return port_conv;
}
int8_tArray __attribute__((export_name("TS_LDKSocketAddress_OnionV2_get_onion_v2"))) TS_LDKSocketAddress_OnionV2_get_onion_v2(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_OnionV2);
- int8_tArray onion_v2_arr = init_int8_tArray(12, __LINE__);
- memcpy(onion_v2_arr->elems, obj->onion_v2.data, 12);
+ int8_tArray onion_v2_arr = init_int8_tArray(12, __LINE__);
+ memcpy(onion_v2_arr->elems, obj->onion_v2.data, 12);
return onion_v2_arr;
}
int8_tArray __attribute__((export_name("TS_LDKSocketAddress_OnionV3_get_ed25519_pubkey"))) TS_LDKSocketAddress_OnionV3_get_ed25519_pubkey(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_OnionV3);
- int8_tArray ed25519_pubkey_arr = init_int8_tArray(32, __LINE__);
- memcpy(ed25519_pubkey_arr->elems, obj->onion_v3.ed25519_pubkey.data, 32);
+ int8_tArray ed25519_pubkey_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ed25519_pubkey_arr->elems, obj->onion_v3.ed25519_pubkey.data, 32);
return ed25519_pubkey_arr;
}
int16_t __attribute__((export_name("TS_LDKSocketAddress_OnionV3_get_checksum"))) TS_LDKSocketAddress_OnionV3_get_checksum(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_OnionV3);
- int16_t checksum_conv = obj->onion_v3.checksum;
+ int16_t checksum_conv = obj->onion_v3.checksum;
return checksum_conv;
}
int8_t __attribute__((export_name("TS_LDKSocketAddress_OnionV3_get_version"))) TS_LDKSocketAddress_OnionV3_get_version(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_OnionV3);
- int8_t version_conv = obj->onion_v3.version;
+ int8_t version_conv = obj->onion_v3.version;
return version_conv;
}
int16_t __attribute__((export_name("TS_LDKSocketAddress_OnionV3_get_port"))) TS_LDKSocketAddress_OnionV3_get_port(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_OnionV3);
- int16_t port_conv = obj->onion_v3.port;
+ int16_t port_conv = obj->onion_v3.port;
return port_conv;
}
uint64_t __attribute__((export_name("TS_LDKSocketAddress_Hostname_get_hostname"))) TS_LDKSocketAddress_Hostname_get_hostname(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_Hostname);
- LDKHostname hostname_var = obj->hostname.hostname;
+ LDKHostname hostname_var = obj->hostname.hostname;
uint64_t hostname_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(hostname_var);
hostname_ref = tag_ptr(hostname_var.inner, false);
int16_t __attribute__((export_name("TS_LDKSocketAddress_Hostname_get_port"))) TS_LDKSocketAddress_Hostname_get_port(uint64_t ptr) {
LDKSocketAddress *obj = (LDKSocketAddress*)untag_ptr(ptr);
assert(obj->tag == LDKSocketAddress_Hostname);
- int16_t port_conv = obj->hostname.port;
+ int16_t port_conv = obj->hostname.port;
return port_conv;
}
static inline LDKCVec_SocketAddressZ CVec_SocketAddressZ_clone(const LDKCVec_SocketAddressZ *orig) {
uint64_tArray __attribute__((export_name("TS_LDKCOption_CVec_SocketAddressZZ_Some_get_some"))) TS_LDKCOption_CVec_SocketAddressZZ_Some_get_some(uint64_t ptr) {
LDKCOption_CVec_SocketAddressZZ *obj = (LDKCOption_CVec_SocketAddressZZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_CVec_SocketAddressZZ_Some);
- LDKCVec_SocketAddressZ some_var = obj->some;
+ LDKCVec_SocketAddressZ some_var = obj->some;
uint64_tArray some_arr = NULL;
some_arr = init_uint64_tArray(some_var.datalen, __LINE__);
uint64_t *some_arr_ptr = (uint64_t*)(((uint8_t*)some_arr) + 8);
return some_arr;
}
-static inline struct LDKChannelDerivationParameters CResult_ChannelDerivationParametersDecodeErrorZ_get_ok(LDKCResult_ChannelDerivationParametersDecodeErrorZ *NONNULL_PTR owner){
- LDKChannelDerivationParameters ret = *owner->contents.result;
+static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){
+ LDKPendingHTLCInfo ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_get_ok"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_get_ok(uint64_t owner) {
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(owner);
- LDKChannelDerivationParameters ret_var = CResult_ChannelDerivationParametersDecodeErrorZ_get_ok(owner_conv);
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(uint64_t owner) {
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* owner_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(owner);
+ LDKPendingHTLCInfo ret_var = CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(owner_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKDecodeError CResult_ChannelDerivationParametersDecodeErrorZ_get_err(LDKCResult_ChannelDerivationParametersDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_get_err"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_get_err(uint64_t owner) {
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_ChannelDerivationParametersDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKHTLCDescriptor CResult_HTLCDescriptorDecodeErrorZ_get_ok(LDKCResult_HTLCDescriptorDecodeErrorZ *NONNULL_PTR owner){
- LDKHTLCDescriptor ret = *owner->contents.result;
+static inline struct LDKInboundHTLCErr CResult_PendingHTLCInfoInboundHTLCErrZ_get_err(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){
+ LDKInboundHTLCErr ret = *owner->contents.err;
ret.is_owned = false;
return ret;
}
-uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_get_ok"))) TS_CResult_HTLCDescriptorDecodeErrorZ_get_ok(uint64_t owner) {
- LDKCResult_HTLCDescriptorDecodeErrorZ* owner_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(owner);
- LDKHTLCDescriptor ret_var = CResult_HTLCDescriptorDecodeErrorZ_get_ok(owner_conv);
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_get_err"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_get_err(uint64_t owner) {
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* owner_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(owner);
+ LDKInboundHTLCErr ret_var = CResult_PendingHTLCInfoInboundHTLCErrZ_get_err(owner_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline struct LDKDecodeError CResult_HTLCDescriptorDecodeErrorZ_get_err(LDKCResult_HTLCDescriptorDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_get_err"))) TS_CResult_HTLCDescriptorDecodeErrorZ_get_err(uint64_t owner) {
- LDKCResult_HTLCDescriptorDecodeErrorZ* owner_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_HTLCDescriptorDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
static inline LDKCVec_HTLCOutputInCommitmentZ CVec_HTLCOutputInCommitmentZ_clone(const LDKCVec_HTLCOutputInCommitmentZ *orig) {
LDKCVec_HTLCOutputInCommitmentZ ret = { .data = MALLOC(sizeof(LDKHTLCOutputInCommitment) * orig->datalen, "LDKCVec_HTLCOutputInCommitmentZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
uint64_t __attribute__((export_name("TS_LDKCOption_TxOutZ_Some_get_some"))) TS_LDKCOption_TxOutZ_Some_get_some(uint64_t ptr) {
LDKCOption_TxOutZ *obj = (LDKCOption_TxOutZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_TxOutZ_Some);
- LDKTxOut* some_ref = &obj->some;
+ LDKTxOut* some_ref = &obj->some;
return tag_ptr(some_ref, false);
}
static inline LDKCVec_InputZ CVec_InputZ_clone(const LDKCVec_InputZ *orig) {
uint64_t __attribute__((export_name("TS_LDKCOption_C2Tuple_u64u16ZZ_Some_get_some"))) TS_LDKCOption_C2Tuple_u64u16ZZ_Some_get_some(uint64_t ptr) {
LDKCOption_C2Tuple_u64u16ZZ *obj = (LDKCOption_C2Tuple_u64u16ZZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_C2Tuple_u64u16ZZ_Some);
- LDKC2Tuple_u64u16Z* some_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z");
- *some_conv = obj->some;
+ LDKC2Tuple_u64u16Z* some_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z");
+ *some_conv = obj->some;
*some_conv = C2Tuple_u64u16Z_clone(some_conv);
return tag_ptr(some_conv, true);
}
uint32_t __attribute__((export_name("TS_LDKCOption_ChannelShutdownStateZ_Some_get_some"))) TS_LDKCOption_ChannelShutdownStateZ_Some_get_some(uint64_t ptr) {
LDKCOption_ChannelShutdownStateZ *obj = (LDKCOption_ChannelShutdownStateZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_ChannelShutdownStateZ_Some);
- uint32_t some_conv = LDKChannelShutdownState_to_js(obj->some);
+ uint32_t some_conv = LDKChannelShutdownState_to_js(obj->some);
return some_conv;
}
static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
int8_tArray __attribute__((export_name("TS_LDKRecentPaymentDetails_AwaitingInvoice_get_payment_id"))) TS_LDKRecentPaymentDetails_AwaitingInvoice_get_payment_id(uint64_t ptr) {
LDKRecentPaymentDetails *obj = (LDKRecentPaymentDetails*)untag_ptr(ptr);
assert(obj->tag == LDKRecentPaymentDetails_AwaitingInvoice);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->awaiting_invoice.payment_id.data, 32);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->awaiting_invoice.payment_id.data, 32);
return payment_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKRecentPaymentDetails_Pending_get_payment_id"))) TS_LDKRecentPaymentDetails_Pending_get_payment_id(uint64_t ptr) {
LDKRecentPaymentDetails *obj = (LDKRecentPaymentDetails*)untag_ptr(ptr);
assert(obj->tag == LDKRecentPaymentDetails_Pending);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->pending.payment_id.data, 32);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->pending.payment_id.data, 32);
return payment_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKRecentPaymentDetails_Pending_get_payment_hash"))) TS_LDKRecentPaymentDetails_Pending_get_payment_hash(uint64_t ptr) {
LDKRecentPaymentDetails *obj = (LDKRecentPaymentDetails*)untag_ptr(ptr);
assert(obj->tag == LDKRecentPaymentDetails_Pending);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->pending.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->pending.payment_hash.data, 32);
return payment_hash_arr;
}
int64_t __attribute__((export_name("TS_LDKRecentPaymentDetails_Pending_get_total_msat"))) TS_LDKRecentPaymentDetails_Pending_get_total_msat(uint64_t ptr) {
LDKRecentPaymentDetails *obj = (LDKRecentPaymentDetails*)untag_ptr(ptr);
assert(obj->tag == LDKRecentPaymentDetails_Pending);
- int64_t total_msat_conv = obj->pending.total_msat;
+ int64_t total_msat_conv = obj->pending.total_msat;
return total_msat_conv;
}
int8_tArray __attribute__((export_name("TS_LDKRecentPaymentDetails_Fulfilled_get_payment_id"))) TS_LDKRecentPaymentDetails_Fulfilled_get_payment_id(uint64_t ptr) {
LDKRecentPaymentDetails *obj = (LDKRecentPaymentDetails*)untag_ptr(ptr);
assert(obj->tag == LDKRecentPaymentDetails_Fulfilled);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->fulfilled.payment_id.data, 32);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->fulfilled.payment_id.data, 32);
return payment_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKRecentPaymentDetails_Fulfilled_get_payment_hash"))) TS_LDKRecentPaymentDetails_Fulfilled_get_payment_hash(uint64_t ptr) {
LDKRecentPaymentDetails *obj = (LDKRecentPaymentDetails*)untag_ptr(ptr);
assert(obj->tag == LDKRecentPaymentDetails_Fulfilled);
- uint64_t payment_hash_ref = tag_ptr(&obj->fulfilled.payment_hash, false);
+ uint64_t payment_hash_ref = tag_ptr(&obj->fulfilled.payment_hash, false);
return payment_hash_ref;
}
int8_tArray __attribute__((export_name("TS_LDKRecentPaymentDetails_Abandoned_get_payment_id"))) TS_LDKRecentPaymentDetails_Abandoned_get_payment_id(uint64_t ptr) {
LDKRecentPaymentDetails *obj = (LDKRecentPaymentDetails*)untag_ptr(ptr);
assert(obj->tag == LDKRecentPaymentDetails_Abandoned);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->abandoned.payment_id.data, 32);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->abandoned.payment_id.data, 32);
return payment_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKRecentPaymentDetails_Abandoned_get_payment_hash"))) TS_LDKRecentPaymentDetails_Abandoned_get_payment_hash(uint64_t ptr) {
LDKRecentPaymentDetails *obj = (LDKRecentPaymentDetails*)untag_ptr(ptr);
assert(obj->tag == LDKRecentPaymentDetails_Abandoned);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->abandoned.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->abandoned.payment_hash.data, 32);
return payment_hash_arr;
}
static inline LDKCVec_RecentPaymentDetailsZ CVec_RecentPaymentDetailsZ_clone(const LDKCVec_RecentPaymentDetailsZ *orig) {
uint64_t __attribute__((export_name("TS_LDKPaymentSendFailure_ParameterError_get_parameter_error"))) TS_LDKPaymentSendFailure_ParameterError_get_parameter_error(uint64_t ptr) {
LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
assert(obj->tag == LDKPaymentSendFailure_ParameterError);
- uint64_t parameter_error_ref = tag_ptr(&obj->parameter_error, false);
+ uint64_t parameter_error_ref = tag_ptr(&obj->parameter_error, false);
return parameter_error_ref;
}
uint64_tArray __attribute__((export_name("TS_LDKPaymentSendFailure_PathParameterError_get_path_parameter_error"))) TS_LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(uint64_t ptr) {
LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
assert(obj->tag == LDKPaymentSendFailure_PathParameterError);
- LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
+ LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
uint64_tArray path_parameter_error_arr = NULL;
path_parameter_error_arr = init_uint64_tArray(path_parameter_error_var.datalen, __LINE__);
uint64_t *path_parameter_error_arr_ptr = (uint64_t*)(((uint8_t*)path_parameter_error_arr) + 8);
uint64_tArray __attribute__((export_name("TS_LDKPaymentSendFailure_AllFailedResendSafe_get_all_failed_resend_safe"))) TS_LDKPaymentSendFailure_AllFailedResendSafe_get_all_failed_resend_safe(uint64_t ptr) {
LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
assert(obj->tag == LDKPaymentSendFailure_AllFailedResendSafe);
- LDKCVec_APIErrorZ all_failed_resend_safe_var = obj->all_failed_resend_safe;
+ LDKCVec_APIErrorZ all_failed_resend_safe_var = obj->all_failed_resend_safe;
uint64_tArray all_failed_resend_safe_arr = NULL;
all_failed_resend_safe_arr = init_uint64_tArray(all_failed_resend_safe_var.datalen, __LINE__);
uint64_t *all_failed_resend_safe_arr_ptr = (uint64_t*)(((uint8_t*)all_failed_resend_safe_arr) + 8);
uint64_tArray __attribute__((export_name("TS_LDKPaymentSendFailure_PartialFailure_get_results"))) TS_LDKPaymentSendFailure_PartialFailure_get_results(uint64_t ptr) {
LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
assert(obj->tag == LDKPaymentSendFailure_PartialFailure);
- LDKCVec_CResult_NoneAPIErrorZZ results_var = obj->partial_failure.results;
+ LDKCVec_CResult_NoneAPIErrorZZ results_var = obj->partial_failure.results;
uint64_tArray results_arr = NULL;
results_arr = init_uint64_tArray(results_var.datalen, __LINE__);
uint64_t *results_arr_ptr = (uint64_t*)(((uint8_t*)results_arr) + 8);
uint64_t __attribute__((export_name("TS_LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry"))) TS_LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(uint64_t ptr) {
LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
assert(obj->tag == LDKPaymentSendFailure_PartialFailure);
- LDKRouteParameters failed_paths_retry_var = obj->partial_failure.failed_paths_retry;
+ LDKRouteParameters failed_paths_retry_var = obj->partial_failure.failed_paths_retry;
uint64_t failed_paths_retry_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(failed_paths_retry_var);
failed_paths_retry_ref = tag_ptr(failed_paths_retry_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKPaymentSendFailure_PartialFailure_get_payment_id"))) TS_LDKPaymentSendFailure_PartialFailure_get_payment_id(uint64_t ptr) {
LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
assert(obj->tag == LDKPaymentSendFailure_PartialFailure);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->partial_failure.payment_id.data, 32);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->partial_failure.payment_id.data, 32);
return payment_id_arr;
}
static inline void CResult_NonePaymentSendFailureZ_get_ok(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKProbeSendFailure_SendingFailed_get_sending_failed"))) TS_LDKProbeSendFailure_SendingFailed_get_sending_failed(uint64_t ptr) {
LDKProbeSendFailure *obj = (LDKProbeSendFailure*)untag_ptr(ptr);
assert(obj->tag == LDKProbeSendFailure_SendingFailed);
- uint64_t sending_failed_ref = tag_ptr(&obj->sending_failed, false);
+ uint64_t sending_failed_ref = tag_ptr(&obj->sending_failed, false);
return sending_failed_ref;
}
static inline struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR owner){
}
return ret;
}
+uint32_t __attribute__((export_name("TS_LDKCOption_StrZ_ty_from_ptr"))) TS_LDKCOption_StrZ_ty_from_ptr(uint64_t ptr) {
+ LDKCOption_StrZ *obj = (LDKCOption_StrZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_StrZ_Some: return 0;
+ case LDKCOption_StrZ_None: return 1;
+ default: abort();
+ }
+}
+jstring __attribute__((export_name("TS_LDKCOption_StrZ_Some_get_some"))) TS_LDKCOption_StrZ_Some_get_some(uint64_t ptr) {
+ LDKCOption_StrZ *obj = (LDKCOption_StrZ*)untag_ptr(ptr);
+ assert(obj->tag == LDKCOption_StrZ_Some);
+ LDKStr some_str = obj->some;
+ jstring some_conv = str_ref_to_ts(some_str.chars, some_str.len);
+ return some_conv;
+}
+static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return *owner->contents.result;
+}
+void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+ CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv);
+}
+
+static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+uint32_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_get_err"))) TS_CResult_NoneBolt12SemanticErrorZ_get_err(uint64_t owner) {
+ LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+ uint32_t ret_conv = LDKBolt12SemanticError_to_js(CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result);
CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv);
}
+uint32_t __attribute__((export_name("TS_LDKOffersMessage_ty_from_ptr"))) TS_LDKOffersMessage_ty_from_ptr(uint64_t ptr) {
+ LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKOffersMessage_InvoiceRequest: return 0;
+ case LDKOffersMessage_Invoice: return 1;
+ case LDKOffersMessage_InvoiceError: return 2;
+ default: abort();
+ }
+}
+uint64_t __attribute__((export_name("TS_LDKOffersMessage_InvoiceRequest_get_invoice_request"))) TS_LDKOffersMessage_InvoiceRequest_get_invoice_request(uint64_t ptr) {
+ LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
+ assert(obj->tag == LDKOffersMessage_InvoiceRequest);
+ LDKInvoiceRequest invoice_request_var = obj->invoice_request;
+ uint64_t invoice_request_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var);
+ invoice_request_ref = tag_ptr(invoice_request_var.inner, false);
+ return invoice_request_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKOffersMessage_Invoice_get_invoice"))) TS_LDKOffersMessage_Invoice_get_invoice(uint64_t ptr) {
+ LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
+ assert(obj->tag == LDKOffersMessage_Invoice);
+ LDKBolt12Invoice invoice_var = obj->invoice;
+ uint64_t invoice_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var);
+ invoice_ref = tag_ptr(invoice_var.inner, false);
+ return invoice_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKOffersMessage_InvoiceError_get_invoice_error"))) TS_LDKOffersMessage_InvoiceError_get_invoice_error(uint64_t ptr) {
+ LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
+ assert(obj->tag == LDKOffersMessage_InvoiceError);
+ LDKInvoiceError invoice_error_var = obj->invoice_error;
+ uint64_t invoice_error_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_error_var);
+ invoice_error_ref = tag_ptr(invoice_error_var.inner, false);
+ return invoice_error_ref;
+}
+uint32_t __attribute__((export_name("TS_LDKCOption_OffersMessageZ_ty_from_ptr"))) TS_LDKCOption_OffersMessageZ_ty_from_ptr(uint64_t ptr) {
+ LDKCOption_OffersMessageZ *obj = (LDKCOption_OffersMessageZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_OffersMessageZ_Some: return 0;
+ case LDKCOption_OffersMessageZ_None: return 1;
+ default: abort();
+ }
+}
+uint64_t __attribute__((export_name("TS_LDKCOption_OffersMessageZ_Some_get_some"))) TS_LDKCOption_OffersMessageZ_Some_get_some(uint64_t ptr) {
+ LDKCOption_OffersMessageZ *obj = (LDKCOption_OffersMessageZ*)untag_ptr(ptr);
+ assert(obj->tag == LDKCOption_OffersMessageZ_Some);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
+ return some_ref;
+}
+uint32_t __attribute__((export_name("TS_LDKDestination_ty_from_ptr"))) TS_LDKDestination_ty_from_ptr(uint64_t ptr) {
+ LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKDestination_Node: return 0;
+ case LDKDestination_BlindedPath: return 1;
+ default: abort();
+ }
+}
+int8_tArray __attribute__((export_name("TS_LDKDestination_Node_get_node"))) TS_LDKDestination_Node_get_node(uint64_t ptr) {
+ LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
+ assert(obj->tag == LDKDestination_Node);
+ int8_tArray node_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_arr->elems, obj->node.compressed_form, 33);
+ return node_arr;
+}
+uint64_t __attribute__((export_name("TS_LDKDestination_BlindedPath_get_blinded_path"))) TS_LDKDestination_BlindedPath_get_blinded_path(uint64_t ptr) {
+ LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
+ assert(obj->tag == LDKDestination_BlindedPath);
+ LDKBlindedPath blinded_path_var = obj->blinded_path;
+ uint64_t blinded_path_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_path_var);
+ blinded_path_ref = tag_ptr(blinded_path_var.inner, false);
+ return blinded_path_ref;
+}
+static inline struct LDKOffersMessage C3Tuple_OffersMessageDestinationBlindedPathZ_get_a(LDKC3Tuple_OffersMessageDestinationBlindedPathZ *NONNULL_PTR owner){
+ return OffersMessage_clone(&owner->a);
+}
+uint64_t __attribute__((export_name("TS_C3Tuple_OffersMessageDestinationBlindedPathZ_get_a"))) TS_C3Tuple_OffersMessageDestinationBlindedPathZ_get_a(uint64_t owner) {
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ* owner_conv = (LDKC3Tuple_OffersMessageDestinationBlindedPathZ*)untag_ptr(owner);
+ LDKOffersMessage *ret_copy = MALLOC(sizeof(LDKOffersMessage), "LDKOffersMessage");
+ *ret_copy = C3Tuple_OffersMessageDestinationBlindedPathZ_get_a(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDestination C3Tuple_OffersMessageDestinationBlindedPathZ_get_b(LDKC3Tuple_OffersMessageDestinationBlindedPathZ *NONNULL_PTR owner){
+ return Destination_clone(&owner->b);
+}
+uint64_t __attribute__((export_name("TS_C3Tuple_OffersMessageDestinationBlindedPathZ_get_b"))) TS_C3Tuple_OffersMessageDestinationBlindedPathZ_get_b(uint64_t owner) {
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ* owner_conv = (LDKC3Tuple_OffersMessageDestinationBlindedPathZ*)untag_ptr(owner);
+ LDKDestination *ret_copy = MALLOC(sizeof(LDKDestination), "LDKDestination");
+ *ret_copy = C3Tuple_OffersMessageDestinationBlindedPathZ_get_b(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBlindedPath C3Tuple_OffersMessageDestinationBlindedPathZ_get_c(LDKC3Tuple_OffersMessageDestinationBlindedPathZ *NONNULL_PTR owner){
+ LDKBlindedPath ret = owner->c;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_C3Tuple_OffersMessageDestinationBlindedPathZ_get_c"))) TS_C3Tuple_OffersMessageDestinationBlindedPathZ_get_c(uint64_t owner) {
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ* owner_conv = (LDKC3Tuple_OffersMessageDestinationBlindedPathZ*)untag_ptr(owner);
+ LDKBlindedPath ret_var = C3Tuple_OffersMessageDestinationBlindedPathZ_get_c(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ CVec_C3Tuple_OffersMessageDestinationBlindedPathZZ_clone(const LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ *orig) {
+ LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OffersMessageDestinationBlindedPathZ) * orig->datalen, "LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C3Tuple_OffersMessageDestinationBlindedPathZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
static inline struct LDKCounterpartyForwardingInfo CResult_CounterpartyForwardingInfoDecodeErrorZ_get_ok(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ *NONNULL_PTR owner){
LDKCounterpartyForwardingInfo ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
+static inline struct LDKBlindedForward CResult_BlindedForwardDecodeErrorZ_get_ok(LDKCResult_BlindedForwardDecodeErrorZ *NONNULL_PTR owner){
+ LDKBlindedForward ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_BlindedForwardDecodeErrorZ_get_ok"))) TS_CResult_BlindedForwardDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_BlindedForwardDecodeErrorZ* owner_conv = (LDKCResult_BlindedForwardDecodeErrorZ*)untag_ptr(owner);
+ LDKBlindedForward ret_var = CResult_BlindedForwardDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_BlindedForwardDecodeErrorZ_get_err(LDKCResult_BlindedForwardDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_BlindedForwardDecodeErrorZ_get_err"))) TS_CResult_BlindedForwardDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_BlindedForwardDecodeErrorZ* owner_conv = (LDKCResult_BlindedForwardDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BlindedForwardDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint32_t __attribute__((export_name("TS_LDKPendingHTLCRouting_ty_from_ptr"))) TS_LDKPendingHTLCRouting_ty_from_ptr(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKPendingHTLCRouting_Forward: return 0;
+ case LDKPendingHTLCRouting_Receive: return 1;
+ case LDKPendingHTLCRouting_ReceiveKeysend: return 2;
+ default: abort();
+ }
+}
+uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Forward_get_onion_packet"))) TS_LDKPendingHTLCRouting_Forward_get_onion_packet(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_Forward);
+ LDKOnionPacket onion_packet_var = obj->forward.onion_packet;
+ uint64_t onion_packet_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(onion_packet_var);
+ onion_packet_ref = tag_ptr(onion_packet_var.inner, false);
+ return onion_packet_ref;
+}
+int64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Forward_get_short_channel_id"))) TS_LDKPendingHTLCRouting_Forward_get_short_channel_id(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_Forward);
+ int64_t short_channel_id_conv = obj->forward.short_channel_id;
+ return short_channel_id_conv;
+}
+uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Forward_get_blinded"))) TS_LDKPendingHTLCRouting_Forward_get_blinded(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_Forward);
+ LDKBlindedForward blinded_var = obj->forward.blinded;
+ uint64_t blinded_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_var);
+ blinded_ref = tag_ptr(blinded_var.inner, false);
+ return blinded_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_payment_data"))) TS_LDKPendingHTLCRouting_Receive_get_payment_data(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_Receive);
+ LDKFinalOnionHopData payment_data_var = obj->receive.payment_data;
+ uint64_t payment_data_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_var);
+ payment_data_ref = tag_ptr(payment_data_var.inner, false);
+ return payment_data_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_payment_metadata"))) TS_LDKPendingHTLCRouting_Receive_get_payment_metadata(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_Receive);
+ uint64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false);
+ return payment_metadata_ref;
+}
+int32_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry"))) TS_LDKPendingHTLCRouting_Receive_get_incoming_cltv_expiry(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_Receive);
+ int32_t incoming_cltv_expiry_conv = obj->receive.incoming_cltv_expiry;
+ return incoming_cltv_expiry_conv;
+}
+int8_tArray __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_phantom_shared_secret"))) TS_LDKPendingHTLCRouting_Receive_get_phantom_shared_secret(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_Receive);
+ int8_tArray phantom_shared_secret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(phantom_shared_secret_arr->elems, obj->receive.phantom_shared_secret.data, 32);
+ return phantom_shared_secret_arr;
+}
+uint64_tArray __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_custom_tlvs"))) TS_LDKPendingHTLCRouting_Receive_get_custom_tlvs(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_Receive);
+ LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs_var = obj->receive.custom_tlvs;
+ uint64_tArray custom_tlvs_arr = NULL;
+ custom_tlvs_arr = init_uint64_tArray(custom_tlvs_var.datalen, __LINE__);
+ uint64_t *custom_tlvs_arr_ptr = (uint64_t*)(((uint8_t*)custom_tlvs_arr) + 8);
+ for (size_t x = 0; x < custom_tlvs_var.datalen; x++) {
+ LDKC2Tuple_u64CVec_u8ZZ* custom_tlvs_conv_23_conv = MALLOC(sizeof(LDKC2Tuple_u64CVec_u8ZZ), "LDKC2Tuple_u64CVec_u8ZZ");
+ *custom_tlvs_conv_23_conv = custom_tlvs_var.data[x];
+ *custom_tlvs_conv_23_conv = C2Tuple_u64CVec_u8ZZ_clone(custom_tlvs_conv_23_conv);
+ custom_tlvs_arr_ptr[x] = tag_ptr(custom_tlvs_conv_23_conv, true);
+ }
+
+ return custom_tlvs_arr;
+}
+jboolean __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_requires_blinded_error"))) TS_LDKPendingHTLCRouting_Receive_get_requires_blinded_error(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_Receive);
+ jboolean requires_blinded_error_conv = obj->receive.requires_blinded_error;
+ return requires_blinded_error_conv;
+}
+uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_ReceiveKeysend_get_payment_data"))) TS_LDKPendingHTLCRouting_ReceiveKeysend_get_payment_data(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend);
+ LDKFinalOnionHopData payment_data_var = obj->receive_keysend.payment_data;
+ uint64_t payment_data_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_var);
+ payment_data_ref = tag_ptr(payment_data_var.inner, false);
+ return payment_data_ref;
+}
+int8_tArray __attribute__((export_name("TS_LDKPendingHTLCRouting_ReceiveKeysend_get_payment_preimage"))) TS_LDKPendingHTLCRouting_ReceiveKeysend_get_payment_preimage(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend);
+ int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_preimage_arr->elems, obj->receive_keysend.payment_preimage.data, 32);
+ return payment_preimage_arr;
+}
+uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_ReceiveKeysend_get_payment_metadata"))) TS_LDKPendingHTLCRouting_ReceiveKeysend_get_payment_metadata(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend);
+ uint64_t payment_metadata_ref = tag_ptr(&obj->receive_keysend.payment_metadata, false);
+ return payment_metadata_ref;
+}
+int32_t __attribute__((export_name("TS_LDKPendingHTLCRouting_ReceiveKeysend_get_incoming_cltv_expiry"))) TS_LDKPendingHTLCRouting_ReceiveKeysend_get_incoming_cltv_expiry(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend);
+ int32_t incoming_cltv_expiry_conv = obj->receive_keysend.incoming_cltv_expiry;
+ return incoming_cltv_expiry_conv;
+}
+uint64_tArray __attribute__((export_name("TS_LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs"))) TS_LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs(uint64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ assert(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend);
+ LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs_var = obj->receive_keysend.custom_tlvs;
+ uint64_tArray custom_tlvs_arr = NULL;
+ custom_tlvs_arr = init_uint64_tArray(custom_tlvs_var.datalen, __LINE__);
+ uint64_t *custom_tlvs_arr_ptr = (uint64_t*)(((uint8_t*)custom_tlvs_arr) + 8);
+ for (size_t x = 0; x < custom_tlvs_var.datalen; x++) {
+ LDKC2Tuple_u64CVec_u8ZZ* custom_tlvs_conv_23_conv = MALLOC(sizeof(LDKC2Tuple_u64CVec_u8ZZ), "LDKC2Tuple_u64CVec_u8ZZ");
+ *custom_tlvs_conv_23_conv = custom_tlvs_var.data[x];
+ *custom_tlvs_conv_23_conv = C2Tuple_u64CVec_u8ZZ_clone(custom_tlvs_conv_23_conv);
+ custom_tlvs_arr_ptr[x] = tag_ptr(custom_tlvs_conv_23_conv, true);
+ }
+
+ return custom_tlvs_arr;
+}
+static inline struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return PendingHTLCRouting_clone(&*owner->contents.result);
+}
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCRoutingDecodeErrorZ_get_ok"))) TS_CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* owner_conv = (LDKCResult_PendingHTLCRoutingDecodeErrorZ*)untag_ptr(owner);
+ LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
+ *ret_copy = CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_PendingHTLCRoutingDecodeErrorZ_get_err(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCRoutingDecodeErrorZ_get_err"))) TS_CResult_PendingHTLCRoutingDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* owner_conv = (LDKCResult_PendingHTLCRoutingDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PendingHTLCRoutingDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoDecodeErrorZ_get_ok(LDKCResult_PendingHTLCInfoDecodeErrorZ *NONNULL_PTR owner){
+ LDKPendingHTLCInfo ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoDecodeErrorZ_get_ok"))) TS_CResult_PendingHTLCInfoDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* owner_conv = (LDKCResult_PendingHTLCInfoDecodeErrorZ*)untag_ptr(owner);
+ LDKPendingHTLCInfo ret_var = CResult_PendingHTLCInfoDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_PendingHTLCInfoDecodeErrorZ_get_err(LDKCResult_PendingHTLCInfoDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoDecodeErrorZ_get_err"))) TS_CResult_PendingHTLCInfoDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* owner_conv = (LDKCResult_PendingHTLCInfoDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_PendingHTLCInfoDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline enum LDKBlindedFailure CResult_BlindedFailureDecodeErrorZ_get_ok(LDKCResult_BlindedFailureDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return BlindedFailure_clone(&*owner->contents.result);
+}
+uint32_t __attribute__((export_name("TS_CResult_BlindedFailureDecodeErrorZ_get_ok"))) TS_CResult_BlindedFailureDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_BlindedFailureDecodeErrorZ* owner_conv = (LDKCResult_BlindedFailureDecodeErrorZ*)untag_ptr(owner);
+ uint32_t ret_conv = LDKBlindedFailure_to_js(CResult_BlindedFailureDecodeErrorZ_get_ok(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKDecodeError CResult_BlindedFailureDecodeErrorZ_get_err(LDKCResult_BlindedFailureDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_BlindedFailureDecodeErrorZ_get_err"))) TS_CResult_BlindedFailureDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_BlindedFailureDecodeErrorZ* owner_conv = (LDKCResult_BlindedFailureDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BlindedFailureDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline enum LDKChannelShutdownState CResult_ChannelShutdownStateDecodeErrorZ_get_ok(LDKCResult_ChannelShutdownStateDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return ChannelShutdownState_clone(&*owner->contents.result);
uint64_t __attribute__((export_name("TS_LDKUnsignedGossipMessage_ChannelAnnouncement_get_channel_announcement"))) TS_LDKUnsignedGossipMessage_ChannelAnnouncement_get_channel_announcement(uint64_t ptr) {
LDKUnsignedGossipMessage *obj = (LDKUnsignedGossipMessage*)untag_ptr(ptr);
assert(obj->tag == LDKUnsignedGossipMessage_ChannelAnnouncement);
- LDKUnsignedChannelAnnouncement channel_announcement_var = obj->channel_announcement;
+ LDKUnsignedChannelAnnouncement channel_announcement_var = obj->channel_announcement;
uint64_t channel_announcement_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_announcement_var);
channel_announcement_ref = tag_ptr(channel_announcement_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKUnsignedGossipMessage_ChannelUpdate_get_channel_update"))) TS_LDKUnsignedGossipMessage_ChannelUpdate_get_channel_update(uint64_t ptr) {
LDKUnsignedGossipMessage *obj = (LDKUnsignedGossipMessage*)untag_ptr(ptr);
assert(obj->tag == LDKUnsignedGossipMessage_ChannelUpdate);
- LDKUnsignedChannelUpdate channel_update_var = obj->channel_update;
+ LDKUnsignedChannelUpdate channel_update_var = obj->channel_update;
uint64_t channel_update_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_update_var);
channel_update_ref = tag_ptr(channel_update_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKUnsignedGossipMessage_NodeAnnouncement_get_node_announcement"))) TS_LDKUnsignedGossipMessage_NodeAnnouncement_get_node_announcement(uint64_t ptr) {
LDKUnsignedGossipMessage *obj = (LDKUnsignedGossipMessage*)untag_ptr(ptr);
assert(obj->tag == LDKUnsignedGossipMessage_NodeAnnouncement);
- LDKUnsignedNodeAnnouncement node_announcement_var = obj->node_announcement;
+ LDKUnsignedNodeAnnouncement node_announcement_var = obj->node_announcement;
uint64_t node_announcement_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(node_announcement_var);
node_announcement_ref = tag_ptr(node_announcement_var.inner, false);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_CVec_u8ZNoneZ get_destination_script_LDKSignerProvider_jcall(const void* this_arg) {
+LDKCResult_CVec_u8ZNoneZ get_destination_script_LDKSignerProvider_jcall(const void* this_arg, LDKThirtyTwoBytes channel_keys_id) {
LDKSignerProvider_JCalls *j_calls = (LDKSignerProvider_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, 0, 0, 0, 0, 0, 0);
+ int8_tArray channel_keys_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(channel_keys_id_arr->elems, channel_keys_id.data, 32);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, (uint32_t)channel_keys_id_arr, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_SignerProvider_get_destination_script"))) TS_SignerProvider_get_destination_script(uint64_t this_arg) {
+uint64_t __attribute__((export_name("TS_SignerProvider_get_destination_script"))) TS_SignerProvider_get_destination_script(uint64_t this_arg, int8_tArray channel_keys_id) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKSignerProvider* this_arg_conv = (LDKSignerProvider*)this_arg_ptr;
+ LDKThirtyTwoBytes channel_keys_id_ref;
+ CHECK(channel_keys_id->arr_len == 32);
+ memcpy(channel_keys_id_ref.data, channel_keys_id->elems, 32); FREE(channel_keys_id);
LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ");
- *ret_conv = (this_arg_conv->get_destination_script)(this_arg_conv->this_arg);
+ *ret_conv = (this_arg_conv->get_destination_script)(this_arg_conv->this_arg, channel_keys_id_ref);
return tag_ptr(ret_conv, true);
}
return ret_conv;
}
+typedef struct LDKMessageRouter_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKMessageRouter_JCalls;
+static void LDKMessageRouter_JCalls_free(void* this_arg) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKCResult_OnionMessagePathNoneZ find_path_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey sender, LDKCVec_PublicKeyZ peers, LDKDestination destination) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ int8_tArray sender_arr = init_int8_tArray(33, __LINE__);
+ memcpy(sender_arr->elems, sender.compressed_form, 33);
+ LDKCVec_PublicKeyZ peers_var = peers;
+ ptrArray peers_arr = NULL;
+ peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
+ int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
+ for (size_t m = 0; m < peers_var.datalen; m++) {
+ int8_tArray peers_conv_12_arr = init_int8_tArray(33, __LINE__);
+ memcpy(peers_conv_12_arr->elems, peers_var.data[m].compressed_form, 33);
+ peers_arr_ptr[m] = peers_conv_12_arr;
+ }
+
+ FREE(peers_var.data);
+ LDKDestination *destination_copy = MALLOC(sizeof(LDKDestination), "LDKDestination");
+ *destination_copy = destination;
+ uint64_t destination_ref = tag_ptr(destination_copy, true);
+ uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 36, (uint32_t)sender_arr, (uint32_t)peers_arr, destination_ref, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_OnionMessagePathNoneZ ret_conv = *(LDKCResult_OnionMessagePathNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+LDKCResult_CVec_BlindedPathZNoneZ create_blinded_paths_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKCVec_PublicKeyZ peers) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
+ memcpy(recipient_arr->elems, recipient.compressed_form, 33);
+ LDKCVec_PublicKeyZ peers_var = peers;
+ ptrArray peers_arr = NULL;
+ peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
+ int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
+ for (size_t m = 0; m < peers_var.datalen; m++) {
+ int8_tArray peers_conv_12_arr = init_int8_tArray(33, __LINE__);
+ memcpy(peers_conv_12_arr->elems, peers_var.data[m].compressed_form, 33);
+ peers_arr_ptr[m] = peers_conv_12_arr;
+ }
+
+ FREE(peers_var.data);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 37, (uint32_t)recipient_arr, (uint32_t)peers_arr, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_BlindedPathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedPathZNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+static void LDKMessageRouter_JCalls_cloned(LDKMessageRouter* new_obj) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKMessageRouter LDKMessageRouter_init (JSValue o) {
+ LDKMessageRouter_JCalls *calls = MALLOC(sizeof(LDKMessageRouter_JCalls), "LDKMessageRouter_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKMessageRouter ret = {
+ .this_arg = (void*) calls,
+ .find_path = find_path_LDKMessageRouter_jcall,
+ .create_blinded_paths = create_blinded_paths_LDKMessageRouter_jcall,
+ .free = LDKMessageRouter_JCalls_free,
+ };
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_LDKMessageRouter_new"))) TS_LDKMessageRouter_new(JSValue o) {
+ LDKMessageRouter *res_ptr = MALLOC(sizeof(LDKMessageRouter), "LDKMessageRouter");
+ *res_ptr = LDKMessageRouter_init(o);
+ return tag_ptr(res_ptr, true);
+}
+uint64_t __attribute__((export_name("TS_MessageRouter_find_path"))) TS_MessageRouter_find_path(uint64_t this_arg, int8_tArray sender, ptrArray peers, uint64_t destination) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
+ LDKPublicKey sender_ref;
+ CHECK(sender->arr_len == 33);
+ memcpy(sender_ref.compressed_form, sender->elems, 33); FREE(sender);
+ LDKCVec_PublicKeyZ peers_constr;
+ peers_constr.datalen = peers->arr_len;
+ if (peers_constr.datalen > 0)
+ peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ peers_constr.data = NULL;
+ int8_tArray* peers_vals = (void*) peers->elems;
+ for (size_t m = 0; m < peers_constr.datalen; m++) {
+ int8_tArray peers_conv_12 = peers_vals[m];
+ LDKPublicKey peers_conv_12_ref;
+ CHECK(peers_conv_12->arr_len == 33);
+ memcpy(peers_conv_12_ref.compressed_form, peers_conv_12->elems, 33); FREE(peers_conv_12);
+ peers_constr.data[m] = peers_conv_12_ref;
+ }
+ FREE(peers);
+ void* destination_ptr = untag_ptr(destination);
+ CHECK_ACCESS(destination_ptr);
+ LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
+ destination_conv = Destination_clone((LDKDestination*)untag_ptr(destination));
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = (this_arg_conv->find_path)(this_arg_conv->this_arg, sender_ref, peers_constr, destination_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_MessageRouter_create_blinded_paths"))) TS_MessageRouter_create_blinded_paths(uint64_t this_arg, int8_tArray recipient, ptrArray peers) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
+ LDKPublicKey recipient_ref;
+ CHECK(recipient->arr_len == 33);
+ memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
+ LDKCVec_PublicKeyZ peers_constr;
+ peers_constr.datalen = peers->arr_len;
+ if (peers_constr.datalen > 0)
+ peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ peers_constr.data = NULL;
+ int8_tArray* peers_vals = (void*) peers->elems;
+ for (size_t m = 0; m < peers_constr.datalen; m++) {
+ int8_tArray peers_conv_12 = peers_vals[m];
+ LDKPublicKey peers_conv_12_ref;
+ CHECK(peers_conv_12->arr_len == 33);
+ memcpy(peers_conv_12_ref.compressed_form, peers_conv_12->elems, 33); FREE(peers_conv_12);
+ peers_constr.data[m] = peers_conv_12_ref;
+ }
+ FREE(peers);
+ LDKCResult_CVec_BlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedPathZNoneZ), "LDKCResult_CVec_BlindedPathZNoneZ");
+ *ret_conv = (this_arg_conv->create_blinded_paths)(this_arg_conv->this_arg, recipient_ref, peers_constr);
+ return tag_ptr(ret_conv, true);
+}
+
typedef struct LDKRouter_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
+ LDKMessageRouter_JCalls* MessageRouter;
} LDKRouter_JCalls;
static void LDKRouter_JCalls_free(void* this_arg) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
uint64_t inflight_htlcs_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(inflight_htlcs_var);
inflight_htlcs_ref = tag_ptr(inflight_htlcs_var.inner, inflight_htlcs_var.is_owned);
- uint64_t ret = js_invoke_function_ububuu(j_calls->instance_ptr, 36, (uint32_t)payer_arr, route_params_ref, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0, 0);
+ uint64_t ret = js_invoke_function_ububuu(j_calls->instance_ptr, 38, (uint32_t)payer_arr, route_params_ref, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
memcpy(_payment_hash_arr->elems, _payment_hash.data, 32);
int8_tArray _payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(_payment_id_arr->elems, _payment_id.data, 32);
- uint64_t ret = js_invoke_function_ububuu(j_calls->instance_ptr, 37, (uint32_t)payer_arr, route_params_ref, (uint32_t)first_hops_arr, inflight_htlcs_ref, (uint32_t)_payment_hash_arr, (uint32_t)_payment_id_arr);
+ uint64_t ret = js_invoke_function_ububuu(j_calls->instance_ptr, 39, (uint32_t)payer_arr, route_params_ref, (uint32_t)first_hops_arr, inflight_htlcs_ref, (uint32_t)_payment_hash_arr, (uint32_t)_payment_id_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
+LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ create_blinded_payment_paths_LDKRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKCVec_ChannelDetailsZ first_hops, LDKReceiveTlvs tlvs, uint64_t amount_msats) {
+ LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
+ int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
+ memcpy(recipient_arr->elems, recipient.compressed_form, 33);
+ LDKCVec_ChannelDetailsZ first_hops_var = first_hops;
+ uint64_tArray first_hops_arr = NULL;
+ first_hops_arr = init_uint64_tArray(first_hops_var.datalen, __LINE__);
+ uint64_t *first_hops_arr_ptr = (uint64_t*)(((uint8_t*)first_hops_arr) + 8);
+ for (size_t q = 0; q < first_hops_var.datalen; q++) {
+ LDKChannelDetails first_hops_conv_16_var = first_hops_var.data[q];
+ uint64_t first_hops_conv_16_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(first_hops_conv_16_var);
+ first_hops_conv_16_ref = tag_ptr(first_hops_conv_16_var.inner, first_hops_conv_16_var.is_owned);
+ first_hops_arr_ptr[q] = first_hops_conv_16_ref;
+ }
+
+ FREE(first_hops_var.data);
+ LDKReceiveTlvs tlvs_var = tlvs;
+ uint64_t tlvs_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(tlvs_var);
+ tlvs_ref = tag_ptr(tlvs_var.inner, tlvs_var.is_owned);
+ int64_t amount_msats_conv = amount_msats;
+ uint64_t ret = js_invoke_function_uubbuu(j_calls->instance_ptr, 40, (uint32_t)recipient_arr, (uint32_t)first_hops_arr, tlvs_ref, amount_msats_conv, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ret_conv = *(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
static void LDKRouter_JCalls_cloned(LDKRouter* new_obj) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+ atomic_fetch_add_explicit(&j_calls->MessageRouter->refcnt, 1, memory_order_release);
}
-static inline LDKRouter LDKRouter_init (JSValue o) {
+static inline LDKRouter LDKRouter_init (JSValue o, JSValue MessageRouter) {
LDKRouter_JCalls *calls = MALLOC(sizeof(LDKRouter_JCalls), "LDKRouter_JCalls");
atomic_init(&calls->refcnt, 1);
calls->instance_ptr = o;
.this_arg = (void*) calls,
.find_route = find_route_LDKRouter_jcall,
.find_route_with_id = find_route_with_id_LDKRouter_jcall,
+ .create_blinded_payment_paths = create_blinded_payment_paths_LDKRouter_jcall,
.free = LDKRouter_JCalls_free,
+ .MessageRouter = LDKMessageRouter_init(MessageRouter),
};
+ calls->MessageRouter = ret.MessageRouter.this_arg;
return ret;
}
-uint64_t __attribute__((export_name("TS_LDKRouter_new"))) TS_LDKRouter_new(JSValue o) {
+uint64_t __attribute__((export_name("TS_LDKRouter_new"))) TS_LDKRouter_new(JSValue o, JSValue MessageRouter) {
LDKRouter *res_ptr = MALLOC(sizeof(LDKRouter), "LDKRouter");
- *res_ptr = LDKRouter_init(o);
+ *res_ptr = LDKRouter_init(o, MessageRouter);
return tag_ptr(res_ptr, true);
}
uint64_t __attribute__((export_name("TS_Router_find_route"))) TS_Router_find_route(uint64_t this_arg, int8_tArray payer, uint64_t route_params, uint64_tArray first_hops, uint64_t inflight_htlcs) {
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_Router_create_blinded_payment_paths"))) TS_Router_create_blinded_payment_paths(uint64_t this_arg, int8_tArray recipient, uint64_tArray first_hops, uint64_t tlvs, int64_t amount_msats) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKRouter* this_arg_conv = (LDKRouter*)this_arg_ptr;
+ LDKPublicKey recipient_ref;
+ CHECK(recipient->arr_len == 33);
+ memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
+ LDKCVec_ChannelDetailsZ first_hops_constr;
+ first_hops_constr.datalen = first_hops->arr_len;
+ if (first_hops_constr.datalen > 0)
+ first_hops_constr.data = MALLOC(first_hops_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
+ else
+ first_hops_constr.data = NULL;
+ uint64_t* first_hops_vals = first_hops->elems;
+ for (size_t q = 0; q < first_hops_constr.datalen; q++) {
+ uint64_t first_hops_conv_16 = first_hops_vals[q];
+ LDKChannelDetails first_hops_conv_16_conv;
+ first_hops_conv_16_conv.inner = untag_ptr(first_hops_conv_16);
+ first_hops_conv_16_conv.is_owned = ptr_is_owned(first_hops_conv_16);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(first_hops_conv_16_conv);
+ first_hops_conv_16_conv = ChannelDetails_clone(&first_hops_conv_16_conv);
+ first_hops_constr.data[q] = first_hops_conv_16_conv;
+ }
+ FREE(first_hops);
+ LDKReceiveTlvs tlvs_conv;
+ tlvs_conv.inner = untag_ptr(tlvs);
+ tlvs_conv.is_owned = ptr_is_owned(tlvs);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(tlvs_conv);
+ tlvs_conv = ReceiveTlvs_clone(&tlvs_conv);
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ), "LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ");
+ *ret_conv = (this_arg_conv->create_blinded_payment_paths)(this_arg_conv->this_arg, recipient_ref, first_hops_constr, tlvs_conv, amount_msats);
+ return tag_ptr(ret_conv, true);
+}
+
static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesChannelManagerZ_get_a(LDKC2Tuple_ThirtyTwoBytesChannelManagerZ *NONNULL_PTR owner){
return ThirtyTwoBytes_clone(&owner->a);
}
int64_t __attribute__((export_name("TS_LDKMaxDustHTLCExposure_FixedLimitMsat_get_fixed_limit_msat"))) TS_LDKMaxDustHTLCExposure_FixedLimitMsat_get_fixed_limit_msat(uint64_t ptr) {
LDKMaxDustHTLCExposure *obj = (LDKMaxDustHTLCExposure*)untag_ptr(ptr);
assert(obj->tag == LDKMaxDustHTLCExposure_FixedLimitMsat);
- int64_t fixed_limit_msat_conv = obj->fixed_limit_msat;
+ int64_t fixed_limit_msat_conv = obj->fixed_limit_msat;
return fixed_limit_msat_conv;
}
int64_t __attribute__((export_name("TS_LDKMaxDustHTLCExposure_FeeRateMultiplier_get_fee_rate_multiplier"))) TS_LDKMaxDustHTLCExposure_FeeRateMultiplier_get_fee_rate_multiplier(uint64_t ptr) {
LDKMaxDustHTLCExposure *obj = (LDKMaxDustHTLCExposure*)untag_ptr(ptr);
assert(obj->tag == LDKMaxDustHTLCExposure_FeeRateMultiplier);
- int64_t fee_rate_multiplier_conv = obj->fee_rate_multiplier;
+ int64_t fee_rate_multiplier_conv = obj->fee_rate_multiplier;
return fee_rate_multiplier_conv;
}
static inline struct LDKMaxDustHTLCExposure CResult_MaxDustHTLCExposureDecodeErrorZ_get_ok(LDKCResult_MaxDustHTLCExposureDecodeErrorZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKCOption_MaxDustHTLCExposureZ_Some_get_some"))) TS_LDKCOption_MaxDustHTLCExposureZ_Some_get_some(uint64_t ptr) {
LDKCOption_MaxDustHTLCExposureZ *obj = (LDKCOption_MaxDustHTLCExposureZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_MaxDustHTLCExposureZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
return some_ref;
}
uint32_t __attribute__((export_name("TS_LDKCOption_APIErrorZ_ty_from_ptr"))) TS_LDKCOption_APIErrorZ_ty_from_ptr(uint64_t ptr) {
uint64_t __attribute__((export_name("TS_LDKCOption_APIErrorZ_Some_get_some"))) TS_LDKCOption_APIErrorZ_Some_get_some(uint64_t ptr) {
LDKCOption_APIErrorZ *obj = (LDKCOption_APIErrorZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_APIErrorZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
return some_ref;
}
static inline struct LDKCOption_APIErrorZ CResult_COption_APIErrorZDecodeErrorZ_get_ok(LDKCResult_COption_APIErrorZDecodeErrorZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKCOption_MonitorEventZ_Some_get_some"))) TS_LDKCOption_MonitorEventZ_Some_get_some(uint64_t ptr) {
LDKCOption_MonitorEventZ *obj = (LDKCOption_MonitorEventZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_MonitorEventZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
return some_ref;
}
static inline struct LDKCOption_MonitorEventZ CResult_COption_MonitorEventZDecodeErrorZ_get_ok(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner){
int64_t __attribute__((export_name("TS_LDKBalance_ClaimableOnChannelClose_get_amount_satoshis"))) TS_LDKBalance_ClaimableOnChannelClose_get_amount_satoshis(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_ClaimableOnChannelClose);
- int64_t amount_satoshis_conv = obj->claimable_on_channel_close.amount_satoshis;
+ int64_t amount_satoshis_conv = obj->claimable_on_channel_close.amount_satoshis;
return amount_satoshis_conv;
}
int64_t __attribute__((export_name("TS_LDKBalance_ClaimableAwaitingConfirmations_get_amount_satoshis"))) TS_LDKBalance_ClaimableAwaitingConfirmations_get_amount_satoshis(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_ClaimableAwaitingConfirmations);
- int64_t amount_satoshis_conv = obj->claimable_awaiting_confirmations.amount_satoshis;
+ int64_t amount_satoshis_conv = obj->claimable_awaiting_confirmations.amount_satoshis;
return amount_satoshis_conv;
}
int32_t __attribute__((export_name("TS_LDKBalance_ClaimableAwaitingConfirmations_get_confirmation_height"))) TS_LDKBalance_ClaimableAwaitingConfirmations_get_confirmation_height(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_ClaimableAwaitingConfirmations);
- int32_t confirmation_height_conv = obj->claimable_awaiting_confirmations.confirmation_height;
+ int32_t confirmation_height_conv = obj->claimable_awaiting_confirmations.confirmation_height;
return confirmation_height_conv;
}
int64_t __attribute__((export_name("TS_LDKBalance_ContentiousClaimable_get_amount_satoshis"))) TS_LDKBalance_ContentiousClaimable_get_amount_satoshis(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_ContentiousClaimable);
- int64_t amount_satoshis_conv = obj->contentious_claimable.amount_satoshis;
+ int64_t amount_satoshis_conv = obj->contentious_claimable.amount_satoshis;
return amount_satoshis_conv;
}
int32_t __attribute__((export_name("TS_LDKBalance_ContentiousClaimable_get_timeout_height"))) TS_LDKBalance_ContentiousClaimable_get_timeout_height(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_ContentiousClaimable);
- int32_t timeout_height_conv = obj->contentious_claimable.timeout_height;
+ int32_t timeout_height_conv = obj->contentious_claimable.timeout_height;
return timeout_height_conv;
}
int8_tArray __attribute__((export_name("TS_LDKBalance_ContentiousClaimable_get_payment_hash"))) TS_LDKBalance_ContentiousClaimable_get_payment_hash(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_ContentiousClaimable);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->contentious_claimable.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->contentious_claimable.payment_hash.data, 32);
return payment_hash_arr;
}
int8_tArray __attribute__((export_name("TS_LDKBalance_ContentiousClaimable_get_payment_preimage"))) TS_LDKBalance_ContentiousClaimable_get_payment_preimage(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_ContentiousClaimable);
- int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_preimage_arr->elems, obj->contentious_claimable.payment_preimage.data, 32);
+ int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_preimage_arr->elems, obj->contentious_claimable.payment_preimage.data, 32);
return payment_preimage_arr;
}
int64_t __attribute__((export_name("TS_LDKBalance_MaybeTimeoutClaimableHTLC_get_amount_satoshis"))) TS_LDKBalance_MaybeTimeoutClaimableHTLC_get_amount_satoshis(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_MaybeTimeoutClaimableHTLC);
- int64_t amount_satoshis_conv = obj->maybe_timeout_claimable_htlc.amount_satoshis;
+ int64_t amount_satoshis_conv = obj->maybe_timeout_claimable_htlc.amount_satoshis;
return amount_satoshis_conv;
}
int32_t __attribute__((export_name("TS_LDKBalance_MaybeTimeoutClaimableHTLC_get_claimable_height"))) TS_LDKBalance_MaybeTimeoutClaimableHTLC_get_claimable_height(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_MaybeTimeoutClaimableHTLC);
- int32_t claimable_height_conv = obj->maybe_timeout_claimable_htlc.claimable_height;
+ int32_t claimable_height_conv = obj->maybe_timeout_claimable_htlc.claimable_height;
return claimable_height_conv;
}
int8_tArray __attribute__((export_name("TS_LDKBalance_MaybeTimeoutClaimableHTLC_get_payment_hash"))) TS_LDKBalance_MaybeTimeoutClaimableHTLC_get_payment_hash(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_MaybeTimeoutClaimableHTLC);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->maybe_timeout_claimable_htlc.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->maybe_timeout_claimable_htlc.payment_hash.data, 32);
return payment_hash_arr;
}
int64_t __attribute__((export_name("TS_LDKBalance_MaybePreimageClaimableHTLC_get_amount_satoshis"))) TS_LDKBalance_MaybePreimageClaimableHTLC_get_amount_satoshis(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_MaybePreimageClaimableHTLC);
- int64_t amount_satoshis_conv = obj->maybe_preimage_claimable_htlc.amount_satoshis;
+ int64_t amount_satoshis_conv = obj->maybe_preimage_claimable_htlc.amount_satoshis;
return amount_satoshis_conv;
}
int32_t __attribute__((export_name("TS_LDKBalance_MaybePreimageClaimableHTLC_get_expiry_height"))) TS_LDKBalance_MaybePreimageClaimableHTLC_get_expiry_height(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_MaybePreimageClaimableHTLC);
- int32_t expiry_height_conv = obj->maybe_preimage_claimable_htlc.expiry_height;
+ int32_t expiry_height_conv = obj->maybe_preimage_claimable_htlc.expiry_height;
return expiry_height_conv;
}
int8_tArray __attribute__((export_name("TS_LDKBalance_MaybePreimageClaimableHTLC_get_payment_hash"))) TS_LDKBalance_MaybePreimageClaimableHTLC_get_payment_hash(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_MaybePreimageClaimableHTLC);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->maybe_preimage_claimable_htlc.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->maybe_preimage_claimable_htlc.payment_hash.data, 32);
return payment_hash_arr;
}
int64_t __attribute__((export_name("TS_LDKBalance_CounterpartyRevokedOutputClaimable_get_amount_satoshis"))) TS_LDKBalance_CounterpartyRevokedOutputClaimable_get_amount_satoshis(uint64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
assert(obj->tag == LDKBalance_CounterpartyRevokedOutputClaimable);
- int64_t amount_satoshis_conv = obj->counterparty_revoked_output_claimable.amount_satoshis;
+ int64_t amount_satoshis_conv = obj->counterparty_revoked_output_claimable.amount_satoshis;
return amount_satoshis_conv;
}
static inline LDKCVec_BalanceZ CVec_BalanceZ_clone(const LDKCVec_BalanceZ *orig) {
}
uint16_t type_id_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 38, 0, 0, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 41, 0, 0, 0, 0, 0, 0);
}
LDKStr debug_str_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 39, 0, 0, 0, 0, 0, 0);
+ jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 42, 0, 0, 0, 0, 0, 0);
LDKStr ret_conv = str_ref_to_owned_c(ret);
return ret_conv;
}
LDKCVec_u8Z write_LDKType_jcall(const void* this_arg) {
LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 40, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 43, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
}
return ret;
}
-uint32_t __attribute__((export_name("TS_LDKOffersMessage_ty_from_ptr"))) TS_LDKOffersMessage_ty_from_ptr(uint64_t ptr) {
- LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKOffersMessage_InvoiceRequest: return 0;
- case LDKOffersMessage_Invoice: return 1;
- case LDKOffersMessage_InvoiceError: return 2;
- default: abort();
- }
-}
-uint64_t __attribute__((export_name("TS_LDKOffersMessage_InvoiceRequest_get_invoice_request"))) TS_LDKOffersMessage_InvoiceRequest_get_invoice_request(uint64_t ptr) {
- LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
- assert(obj->tag == LDKOffersMessage_InvoiceRequest);
- LDKInvoiceRequest invoice_request_var = obj->invoice_request;
- uint64_t invoice_request_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var);
- invoice_request_ref = tag_ptr(invoice_request_var.inner, false);
- return invoice_request_ref;
+static inline struct LDKPublicKey C2Tuple_PublicKeyCVec_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ *NONNULL_PTR owner){
+ return owner->a;
}
-uint64_t __attribute__((export_name("TS_LDKOffersMessage_Invoice_get_invoice"))) TS_LDKOffersMessage_Invoice_get_invoice(uint64_t ptr) {
- LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
- assert(obj->tag == LDKOffersMessage_Invoice);
- LDKBolt12Invoice invoice_var = obj->invoice;
- uint64_t invoice_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var);
- invoice_ref = tag_ptr(invoice_var.inner, false);
- return invoice_ref;
+int8_tArray __attribute__((export_name("TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_get_a"))) TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_get_a(uint64_t owner) {
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCVec_SocketAddressZZ*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, C2Tuple_PublicKeyCVec_SocketAddressZZ_get_a(owner_conv).compressed_form, 33);
+ return ret_arr;
}
-uint64_t __attribute__((export_name("TS_LDKOffersMessage_InvoiceError_get_invoice_error"))) TS_LDKOffersMessage_InvoiceError_get_invoice_error(uint64_t ptr) {
- LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
- assert(obj->tag == LDKOffersMessage_InvoiceError);
- LDKInvoiceError invoice_error_var = obj->invoice_error;
- uint64_t invoice_error_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_error_var);
- invoice_error_ref = tag_ptr(invoice_error_var.inner, false);
- return invoice_error_ref;
+
+static inline struct LDKCVec_SocketAddressZ C2Tuple_PublicKeyCVec_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ *NONNULL_PTR owner){
+ return CVec_SocketAddressZ_clone(&owner->b);
}
-uint32_t __attribute__((export_name("TS_LDKCOption_OffersMessageZ_ty_from_ptr"))) TS_LDKCOption_OffersMessageZ_ty_from_ptr(uint64_t ptr) {
- LDKCOption_OffersMessageZ *obj = (LDKCOption_OffersMessageZ*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKCOption_OffersMessageZ_Some: return 0;
- case LDKCOption_OffersMessageZ_None: return 1;
- default: abort();
+uint64_tArray __attribute__((export_name("TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_get_b"))) TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_get_b(uint64_t owner) {
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCVec_SocketAddressZZ*)untag_ptr(owner);
+ LDKCVec_SocketAddressZ ret_var = C2Tuple_PublicKeyCVec_SocketAddressZZ_get_b(owner_conv);
+ uint64_tArray ret_arr = NULL;
+ ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
+ uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t p = 0; p < ret_var.datalen; p++) {
+ LDKSocketAddress *ret_conv_15_copy = MALLOC(sizeof(LDKSocketAddress), "LDKSocketAddress");
+ *ret_conv_15_copy = ret_var.data[p];
+ uint64_t ret_conv_15_ref = tag_ptr(ret_conv_15_copy, true);
+ ret_arr_ptr[p] = ret_conv_15_ref;
}
+
+ FREE(ret_var.data);
+ return ret_arr;
}
-uint64_t __attribute__((export_name("TS_LDKCOption_OffersMessageZ_Some_get_some"))) TS_LDKCOption_OffersMessageZ_Some_get_some(uint64_t ptr) {
- LDKCOption_OffersMessageZ *obj = (LDKCOption_OffersMessageZ*)untag_ptr(ptr);
- assert(obj->tag == LDKCOption_OffersMessageZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
- return some_ref;
+
+static inline LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ *orig) {
+ LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_PublicKeyCVec_SocketAddressZZ_clone(&orig->data[i]);
+ }
+ return ret;
}
-typedef struct LDKCustomOnionMessageContents_JCalls {
+typedef struct LDKOnionMessageContents_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
-} LDKCustomOnionMessageContents_JCalls;
-static void LDKCustomOnionMessageContents_JCalls_free(void* this_arg) {
- LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+} LDKOnionMessageContents_JCalls;
+static void LDKOnionMessageContents_JCalls_free(void* this_arg) {
+ LDKOnionMessageContents_JCalls *j_calls = (LDKOnionMessageContents_JCalls*) this_arg;
if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
FREE(j_calls);
}
}
-uint64_t tlv_type_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
- LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 41, 0, 0, 0, 0, 0, 0);
+uint64_t tlv_type_LDKOnionMessageContents_jcall(const void* this_arg) {
+ LDKOnionMessageContents_JCalls *j_calls = (LDKOnionMessageContents_JCalls*) this_arg;
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 44, 0, 0, 0, 0, 0, 0);
}
-LDKCVec_u8Z write_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
- LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 42, 0, 0, 0, 0, 0, 0);
+LDKCVec_u8Z write_LDKOnionMessageContents_jcall(const void* this_arg) {
+ LDKOnionMessageContents_JCalls *j_calls = (LDKOnionMessageContents_JCalls*) this_arg;
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
memcpy(ret_ref.data, ret->elems, ret_ref.datalen); FREE(ret);
return ret_ref;
}
-static void LDKCustomOnionMessageContents_JCalls_cloned(LDKCustomOnionMessageContents* new_obj) {
- LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) new_obj->this_arg;
+LDKStr debug_str_LDKOnionMessageContents_jcall(const void* this_arg) {
+ LDKOnionMessageContents_JCalls *j_calls = (LDKOnionMessageContents_JCalls*) this_arg;
+ jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 46, 0, 0, 0, 0, 0, 0);
+ LDKStr ret_conv = str_ref_to_owned_c(ret);
+ return ret_conv;
+}
+static void LDKOnionMessageContents_JCalls_cloned(LDKOnionMessageContents* new_obj) {
+ LDKOnionMessageContents_JCalls *j_calls = (LDKOnionMessageContents_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
}
-static inline LDKCustomOnionMessageContents LDKCustomOnionMessageContents_init (JSValue o) {
- LDKCustomOnionMessageContents_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageContents_JCalls), "LDKCustomOnionMessageContents_JCalls");
+static inline LDKOnionMessageContents LDKOnionMessageContents_init (JSValue o) {
+ LDKOnionMessageContents_JCalls *calls = MALLOC(sizeof(LDKOnionMessageContents_JCalls), "LDKOnionMessageContents_JCalls");
atomic_init(&calls->refcnt, 1);
calls->instance_ptr = o;
- LDKCustomOnionMessageContents ret = {
+ LDKOnionMessageContents ret = {
.this_arg = (void*) calls,
- .tlv_type = tlv_type_LDKCustomOnionMessageContents_jcall,
- .write = write_LDKCustomOnionMessageContents_jcall,
- .cloned = LDKCustomOnionMessageContents_JCalls_cloned,
- .free = LDKCustomOnionMessageContents_JCalls_free,
+ .tlv_type = tlv_type_LDKOnionMessageContents_jcall,
+ .write = write_LDKOnionMessageContents_jcall,
+ .debug_str = debug_str_LDKOnionMessageContents_jcall,
+ .cloned = LDKOnionMessageContents_JCalls_cloned,
+ .free = LDKOnionMessageContents_JCalls_free,
};
return ret;
}
-uint64_t __attribute__((export_name("TS_LDKCustomOnionMessageContents_new"))) TS_LDKCustomOnionMessageContents_new(JSValue o) {
- LDKCustomOnionMessageContents *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
- *res_ptr = LDKCustomOnionMessageContents_init(o);
+uint64_t __attribute__((export_name("TS_LDKOnionMessageContents_new"))) TS_LDKOnionMessageContents_new(JSValue o) {
+ LDKOnionMessageContents *res_ptr = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *res_ptr = LDKOnionMessageContents_init(o);
return tag_ptr(res_ptr, true);
}
-int64_t __attribute__((export_name("TS_CustomOnionMessageContents_tlv_type"))) TS_CustomOnionMessageContents_tlv_type(uint64_t this_arg) {
+int64_t __attribute__((export_name("TS_OnionMessageContents_tlv_type"))) TS_OnionMessageContents_tlv_type(uint64_t this_arg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+ LDKOnionMessageContents* this_arg_conv = (LDKOnionMessageContents*)this_arg_ptr;
int64_t ret_conv = (this_arg_conv->tlv_type)(this_arg_conv->this_arg);
return ret_conv;
}
-int8_tArray __attribute__((export_name("TS_CustomOnionMessageContents_write"))) TS_CustomOnionMessageContents_write(uint64_t this_arg) {
+int8_tArray __attribute__((export_name("TS_OnionMessageContents_write"))) TS_OnionMessageContents_write(uint64_t this_arg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+ LDKOnionMessageContents* this_arg_conv = (LDKOnionMessageContents*)this_arg_ptr;
LDKCVec_u8Z ret_var = (this_arg_conv->write)(this_arg_conv->this_arg);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
return ret_arr;
}
-uint32_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr"))) TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(uint64_t ptr) {
- LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+jstring __attribute__((export_name("TS_OnionMessageContents_debug_str"))) TS_OnionMessageContents_debug_str(uint64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKOnionMessageContents* this_arg_conv = (LDKOnionMessageContents*)this_arg_ptr;
+ LDKStr ret_str = (this_arg_conv->debug_str)(this_arg_conv->this_arg);
+ jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
+uint32_t __attribute__((export_name("TS_LDKCOption_OnionMessageContentsZ_ty_from_ptr"))) TS_LDKCOption_OnionMessageContentsZ_ty_from_ptr(uint64_t ptr) {
+ LDKCOption_OnionMessageContentsZ *obj = (LDKCOption_OnionMessageContentsZ*)untag_ptr(ptr);
switch(obj->tag) {
- case LDKCOption_CustomOnionMessageContentsZ_Some: return 0;
- case LDKCOption_CustomOnionMessageContentsZ_None: return 1;
+ case LDKCOption_OnionMessageContentsZ_Some: return 0;
+ case LDKCOption_OnionMessageContentsZ_None: return 1;
default: abort();
}
}
-uint64_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some"))) TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some(uint64_t ptr) {
- LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
- assert(obj->tag == LDKCOption_CustomOnionMessageContentsZ_Some);
- LDKCustomOnionMessageContents* some_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
- *some_ret = CustomOnionMessageContents_clone(&obj->some);
+uint64_t __attribute__((export_name("TS_LDKCOption_OnionMessageContentsZ_Some_get_some"))) TS_LDKCOption_OnionMessageContentsZ_Some_get_some(uint64_t ptr) {
+ LDKCOption_OnionMessageContentsZ *obj = (LDKCOption_OnionMessageContentsZ*)untag_ptr(ptr);
+ assert(obj->tag == LDKCOption_OnionMessageContentsZ_Some);
+ LDKOnionMessageContents* some_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *some_ret = OnionMessageContents_clone(&obj->some);
return tag_ptr(some_ret, true);
}
-static inline struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKCOption_OnionMessageContentsZ CResult_COption_OnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
- return COption_CustomOnionMessageContentsZ_clone(&*owner->contents.result);
+ return COption_OnionMessageContentsZ_clone(&*owner->contents.result);
}
-uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(uint64_t owner) {
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
- LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
- *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner_conv);
+uint64_t __attribute__((export_name("TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_get_ok"))) TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+ LDKCOption_OnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_OnionMessageContentsZ), "LDKCOption_OnionMessageContentsZ");
+ *ret_copy = CResult_COption_OnionMessageContentsZDecodeErrorZ_get_ok(owner_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-static inline struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_COption_OnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return DecodeError_clone(&*owner->contents.err);
}
-uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(uint64_t owner) {
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+uint64_t __attribute__((export_name("TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_get_err"))) TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner_conv);
+ *ret_copy = CResult_COption_OnionMessageContentsZDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKOnionMessageContents C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_a(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ *NONNULL_PTR owner){
+ return OnionMessageContents_clone(&owner->a);
+}
+uint64_t __attribute__((export_name("TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_a"))) TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_a(uint64_t owner) {
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ* owner_conv = (LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ*)untag_ptr(owner);
+ LDKOnionMessageContents* ret_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *ret_ret = C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_a(owner_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+static inline struct LDKDestination C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_b(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ *NONNULL_PTR owner){
+ return Destination_clone(&owner->b);
+}
+uint64_t __attribute__((export_name("TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_b"))) TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_b(uint64_t owner) {
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ* owner_conv = (LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ*)untag_ptr(owner);
+ LDKDestination *ret_copy = MALLOC(sizeof(LDKDestination), "LDKDestination");
+ *ret_copy = C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_b(owner_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
+static inline struct LDKBlindedPath C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_c(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ *NONNULL_PTR owner){
+ LDKBlindedPath ret = owner->c;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_c"))) TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_c(uint64_t owner) {
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ* owner_conv = (LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ*)untag_ptr(owner);
+ LDKBlindedPath ret_var = C3Tuple_OnionMessageContentsDestinationBlindedPathZ_get_c(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ_clone(const LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ *orig) {
+ LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ) * orig->datalen, "LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
uint32_t __attribute__((export_name("TS_LDKCOption_TypeZ_ty_from_ptr"))) TS_LDKCOption_TypeZ_ty_from_ptr(uint64_t ptr) {
LDKCOption_TypeZ *obj = (LDKCOption_TypeZ*)untag_ptr(ptr);
switch(obj->tag) {
uint64_t __attribute__((export_name("TS_LDKCOption_TypeZ_Some_get_some"))) TS_LDKCOption_TypeZ_Some_get_some(uint64_t ptr) {
LDKCOption_TypeZ *obj = (LDKCOption_TypeZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_TypeZ_Some);
- LDKType* some_ret = MALLOC(sizeof(LDKType), "LDKType");
- *some_ret = Type_clone(&obj->some);
+ LDKType* some_ret = MALLOC(sizeof(LDKType), "LDKType");
+ *some_ret = Type_clone(&obj->some);
return tag_ptr(some_ret, true);
}
static inline struct LDKCOption_TypeZ CResult_COption_TypeZDecodeErrorZ_get_ok(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKCOption_SocketAddressZ_Some_get_some"))) TS_LDKCOption_SocketAddressZ_Some_get_some(uint64_t ptr) {
LDKCOption_SocketAddressZ *obj = (LDKCOption_SocketAddressZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_SocketAddressZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
return some_ref;
}
static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKGraphSyncError_DecodeError_get_decode_error"))) TS_LDKGraphSyncError_DecodeError_get_decode_error(uint64_t ptr) {
LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
assert(obj->tag == LDKGraphSyncError_DecodeError);
- uint64_t decode_error_ref = tag_ptr(&obj->decode_error, false);
+ uint64_t decode_error_ref = tag_ptr(&obj->decode_error, false);
return decode_error_ref;
}
uint64_t __attribute__((export_name("TS_LDKGraphSyncError_LightningError_get_lightning_error"))) TS_LDKGraphSyncError_LightningError_get_lightning_error(uint64_t ptr) {
LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
assert(obj->tag == LDKGraphSyncError_LightningError);
- LDKLightningError lightning_error_var = obj->lightning_error;
+ LDKLightningError lightning_error_var = obj->lightning_error;
uint64_t lightning_error_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(lightning_error_var);
lightning_error_ref = tag_ptr(lightning_error_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKCOption_SecretKeyZ_Some_get_some"))) TS_LDKCOption_SecretKeyZ_Some_get_some(uint64_t ptr) {
LDKCOption_SecretKeyZ *obj = (LDKCOption_SecretKeyZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_SecretKeyZ_Some);
- int8_tArray some_arr = init_int8_tArray(32, __LINE__);
- memcpy(some_arr->elems, obj->some.bytes, 32);
+ int8_tArray some_arr = init_int8_tArray(32, __LINE__);
+ memcpy(some_arr->elems, obj->some.bytes, 32);
return some_arr;
}
static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){
int64_t __attribute__((export_name("TS_LDKCOption_i64Z_Some_get_some"))) TS_LDKCOption_i64Z_Some_get_some(uint64_t ptr) {
LDKCOption_i64Z *obj = (LDKCOption_i64Z*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_i64Z_Some);
- int64_t some_conv = obj->some;
+ int64_t some_conv = obj->some;
return some_conv;
}
static inline struct LDKSocketAddress CResult_SocketAddressDecodeErrorZ_get_ok(LDKCResult_SocketAddressDecodeErrorZ *NONNULL_PTR owner){
return ret_ref;
}
+static inline struct LDKStfu CResult_StfuDecodeErrorZ_get_ok(LDKCResult_StfuDecodeErrorZ *NONNULL_PTR owner){
+ LDKStfu ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_StfuDecodeErrorZ_get_ok"))) TS_CResult_StfuDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_StfuDecodeErrorZ* owner_conv = (LDKCResult_StfuDecodeErrorZ*)untag_ptr(owner);
+ LDKStfu ret_var = CResult_StfuDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_StfuDecodeErrorZ_get_err(LDKCResult_StfuDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_StfuDecodeErrorZ_get_err"))) TS_CResult_StfuDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_StfuDecodeErrorZ* owner_conv = (LDKCResult_StfuDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_StfuDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKSplice CResult_SpliceDecodeErrorZ_get_ok(LDKCResult_SpliceDecodeErrorZ *NONNULL_PTR owner){
+ LDKSplice ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_SpliceDecodeErrorZ_get_ok"))) TS_CResult_SpliceDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_SpliceDecodeErrorZ* owner_conv = (LDKCResult_SpliceDecodeErrorZ*)untag_ptr(owner);
+ LDKSplice ret_var = CResult_SpliceDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_SpliceDecodeErrorZ_get_err(LDKCResult_SpliceDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_SpliceDecodeErrorZ_get_err"))) TS_CResult_SpliceDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_SpliceDecodeErrorZ* owner_conv = (LDKCResult_SpliceDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_SpliceDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKSpliceAck CResult_SpliceAckDecodeErrorZ_get_ok(LDKCResult_SpliceAckDecodeErrorZ *NONNULL_PTR owner){
+ LDKSpliceAck ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_SpliceAckDecodeErrorZ_get_ok"))) TS_CResult_SpliceAckDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_SpliceAckDecodeErrorZ* owner_conv = (LDKCResult_SpliceAckDecodeErrorZ*)untag_ptr(owner);
+ LDKSpliceAck ret_var = CResult_SpliceAckDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_SpliceAckDecodeErrorZ_get_err(LDKCResult_SpliceAckDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_SpliceAckDecodeErrorZ_get_err"))) TS_CResult_SpliceAckDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_SpliceAckDecodeErrorZ* owner_conv = (LDKCResult_SpliceAckDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_SpliceAckDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKSpliceLocked CResult_SpliceLockedDecodeErrorZ_get_ok(LDKCResult_SpliceLockedDecodeErrorZ *NONNULL_PTR owner){
+ LDKSpliceLocked ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_SpliceLockedDecodeErrorZ_get_ok"))) TS_CResult_SpliceLockedDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_SpliceLockedDecodeErrorZ* owner_conv = (LDKCResult_SpliceLockedDecodeErrorZ*)untag_ptr(owner);
+ LDKSpliceLocked ret_var = CResult_SpliceLockedDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_SpliceLockedDecodeErrorZ_get_err(LDKCResult_SpliceLockedDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_SpliceLockedDecodeErrorZ_get_err"))) TS_CResult_SpliceLockedDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_SpliceLockedDecodeErrorZ* owner_conv = (LDKCResult_SpliceLockedDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_SpliceLockedDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline struct LDKTxAddInput CResult_TxAddInputDecodeErrorZ_get_ok(LDKCResult_TxAddInputDecodeErrorZ *NONNULL_PTR owner){
LDKTxAddInput ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
+static inline struct LDKOnionPacket CResult_OnionPacketDecodeErrorZ_get_ok(LDKCResult_OnionPacketDecodeErrorZ *NONNULL_PTR owner){
+ LDKOnionPacket ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_OnionPacketDecodeErrorZ_get_ok"))) TS_CResult_OnionPacketDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_OnionPacketDecodeErrorZ* owner_conv = (LDKCResult_OnionPacketDecodeErrorZ*)untag_ptr(owner);
+ LDKOnionPacket ret_var = CResult_OnionPacketDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_OnionPacketDecodeErrorZ_get_err(LDKCResult_OnionPacketDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_OnionPacketDecodeErrorZ_get_err"))) TS_CResult_OnionPacketDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_OnionPacketDecodeErrorZ* owner_conv = (LDKCResult_OnionPacketDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_OnionPacketDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline struct LDKUpdateAddHTLC CResult_UpdateAddHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner){
LDKUpdateAddHTLC ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
+static inline struct LDKFinalOnionHopData CResult_FinalOnionHopDataDecodeErrorZ_get_ok(LDKCResult_FinalOnionHopDataDecodeErrorZ *NONNULL_PTR owner){
+ LDKFinalOnionHopData ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_FinalOnionHopDataDecodeErrorZ_get_ok"))) TS_CResult_FinalOnionHopDataDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* owner_conv = (LDKCResult_FinalOnionHopDataDecodeErrorZ*)untag_ptr(owner);
+ LDKFinalOnionHopData ret_var = CResult_FinalOnionHopDataDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_FinalOnionHopDataDecodeErrorZ_get_err(LDKCResult_FinalOnionHopDataDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_FinalOnionHopDataDecodeErrorZ_get_err"))) TS_CResult_FinalOnionHopDataDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* owner_conv = (LDKCResult_FinalOnionHopDataDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_FinalOnionHopDataDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline struct LDKPing CResult_PingDecodeErrorZ_get_ok(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner){
LDKPing ret = *owner->contents.result;
ret.is_owned = false;
uint32_t __attribute__((export_name("TS_LDKSignOrCreationError_CreationError_get_creation_error"))) TS_LDKSignOrCreationError_CreationError_get_creation_error(uint64_t ptr) {
LDKSignOrCreationError *obj = (LDKSignOrCreationError*)untag_ptr(ptr);
assert(obj->tag == LDKSignOrCreationError_CreationError);
- uint32_t creation_error_conv = LDKCreationError_to_js(obj->creation_error);
+ uint32_t creation_error_conv = LDKCreationError_to_js(obj->creation_error);
return creation_error_conv;
}
static inline struct LDKBolt11Invoice CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner){
uint32_t __attribute__((export_name("TS_LDKCOption_HTLCClaimZ_Some_get_some"))) TS_LDKCOption_HTLCClaimZ_Some_get_some(uint64_t ptr) {
LDKCOption_HTLCClaimZ *obj = (LDKCOption_HTLCClaimZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_HTLCClaimZ_Some);
- uint32_t some_conv = LDKHTLCClaim_to_js(obj->some);
+ uint32_t some_conv = LDKHTLCClaim_to_js(obj->some);
return some_conv;
}
static inline struct LDKCounterpartyCommitmentSecrets CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_ok(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ *NONNULL_PTR owner){
uint32_t __attribute__((export_name("TS_LDKCOption_usizeZ_Some_get_some"))) TS_LDKCOption_usizeZ_Some_get_some(uint64_t ptr) {
LDKCOption_usizeZ *obj = (LDKCOption_usizeZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_usizeZ_Some);
- uint32_t some_conv = obj->some;
+ uint32_t some_conv = obj->some;
return some_conv;
}
static inline struct LDKShutdownScript CResult_ShutdownScriptDecodeErrorZ_get_ok(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKPaymentPurpose_InvoicePayment_get_payment_preimage"))) TS_LDKPaymentPurpose_InvoicePayment_get_payment_preimage(uint64_t ptr) {
LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr);
assert(obj->tag == LDKPaymentPurpose_InvoicePayment);
- uint64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false);
+ uint64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false);
return payment_preimage_ref;
}
int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_InvoicePayment_get_payment_secret"))) TS_LDKPaymentPurpose_InvoicePayment_get_payment_secret(uint64_t ptr) {
LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr);
assert(obj->tag == LDKPaymentPurpose_InvoicePayment);
- int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_secret_arr->elems, obj->invoice_payment.payment_secret.data, 32);
+ int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_secret_arr->elems, obj->invoice_payment.payment_secret.data, 32);
return payment_secret_arr;
}
int8_tArray __attribute__((export_name("TS_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment"))) TS_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(uint64_t ptr) {
LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr);
assert(obj->tag == LDKPaymentPurpose_SpontaneousPayment);
- int8_tArray spontaneous_payment_arr = init_int8_tArray(32, __LINE__);
- memcpy(spontaneous_payment_arr->elems, obj->spontaneous_payment.data, 32);
+ int8_tArray spontaneous_payment_arr = init_int8_tArray(32, __LINE__);
+ memcpy(spontaneous_payment_arr->elems, obj->spontaneous_payment.data, 32);
return spontaneous_payment_arr;
}
static inline struct LDKPaymentPurpose CResult_PaymentPurposeDecodeErrorZ_get_ok(LDKCResult_PaymentPurposeDecodeErrorZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKPathFailure_InitialSend_get_err"))) TS_LDKPathFailure_InitialSend_get_err(uint64_t ptr) {
LDKPathFailure *obj = (LDKPathFailure*)untag_ptr(ptr);
assert(obj->tag == LDKPathFailure_InitialSend);
- uint64_t err_ref = tag_ptr(&obj->initial_send.err, false);
+ uint64_t err_ref = tag_ptr(&obj->initial_send.err, false);
return err_ref;
}
uint64_t __attribute__((export_name("TS_LDKPathFailure_OnPath_get_network_update"))) TS_LDKPathFailure_OnPath_get_network_update(uint64_t ptr) {
LDKPathFailure *obj = (LDKPathFailure*)untag_ptr(ptr);
assert(obj->tag == LDKPathFailure_OnPath);
- uint64_t network_update_ref = tag_ptr(&obj->on_path.network_update, false);
+ uint64_t network_update_ref = tag_ptr(&obj->on_path.network_update, false);
return network_update_ref;
}
uint32_t __attribute__((export_name("TS_LDKCOption_PathFailureZ_ty_from_ptr"))) TS_LDKCOption_PathFailureZ_ty_from_ptr(uint64_t ptr) {
uint64_t __attribute__((export_name("TS_LDKCOption_PathFailureZ_Some_get_some"))) TS_LDKCOption_PathFailureZ_Some_get_some(uint64_t ptr) {
LDKCOption_PathFailureZ *obj = (LDKCOption_PathFailureZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_PathFailureZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
return some_ref;
}
static inline struct LDKCOption_PathFailureZ CResult_COption_PathFailureZDecodeErrorZ_get_ok(LDKCResult_COption_PathFailureZDecodeErrorZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg"))) TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(uint64_t ptr) {
LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
assert(obj->tag == LDKClosureReason_CounterpartyForceClosed);
- LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
+ LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
uint64_t peer_msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var);
peer_msg_ref = tag_ptr(peer_msg_var.inner, false);
jstring __attribute__((export_name("TS_LDKClosureReason_ProcessingError_get_err"))) TS_LDKClosureReason_ProcessingError_get_err(uint64_t ptr) {
LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
assert(obj->tag == LDKClosureReason_ProcessingError);
- LDKStr err_str = obj->processing_error.err;
+ LDKStr err_str = obj->processing_error.err;
jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len);
return err_conv;
}
uint64_t __attribute__((export_name("TS_LDKCOption_ClosureReasonZ_Some_get_some"))) TS_LDKCOption_ClosureReasonZ_Some_get_some(uint64_t ptr) {
LDKCOption_ClosureReasonZ *obj = (LDKCOption_ClosureReasonZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_ClosureReasonZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
return some_ref;
}
static inline struct LDKCOption_ClosureReasonZ CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner){
int8_tArray __attribute__((export_name("TS_LDKHTLCDestination_NextHopChannel_get_node_id"))) TS_LDKHTLCDestination_NextHopChannel_get_node_id(uint64_t ptr) {
LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr);
assert(obj->tag == LDKHTLCDestination_NextHopChannel);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->next_hop_channel.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->next_hop_channel.node_id.compressed_form, 33);
return node_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKHTLCDestination_NextHopChannel_get_channel_id"))) TS_LDKHTLCDestination_NextHopChannel_get_channel_id(uint64_t ptr) {
LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr);
assert(obj->tag == LDKHTLCDestination_NextHopChannel);
- int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(channel_id_arr->elems, obj->next_hop_channel.channel_id.data, 32);
+ int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(channel_id_arr->elems, obj->next_hop_channel.channel_id.data, 32);
return channel_id_arr;
}
int64_t __attribute__((export_name("TS_LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid"))) TS_LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid(uint64_t ptr) {
LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr);
assert(obj->tag == LDKHTLCDestination_UnknownNextHop);
- int64_t requested_forward_scid_conv = obj->unknown_next_hop.requested_forward_scid;
+ int64_t requested_forward_scid_conv = obj->unknown_next_hop.requested_forward_scid;
return requested_forward_scid_conv;
}
int64_t __attribute__((export_name("TS_LDKHTLCDestination_InvalidForward_get_requested_forward_scid"))) TS_LDKHTLCDestination_InvalidForward_get_requested_forward_scid(uint64_t ptr) {
LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr);
assert(obj->tag == LDKHTLCDestination_InvalidForward);
- int64_t requested_forward_scid_conv = obj->invalid_forward.requested_forward_scid;
+ int64_t requested_forward_scid_conv = obj->invalid_forward.requested_forward_scid;
return requested_forward_scid_conv;
}
int8_tArray __attribute__((export_name("TS_LDKHTLCDestination_FailedPayment_get_payment_hash"))) TS_LDKHTLCDestination_FailedPayment_get_payment_hash(uint64_t ptr) {
LDKHTLCDestination *obj = (LDKHTLCDestination*)untag_ptr(ptr);
assert(obj->tag == LDKHTLCDestination_FailedPayment);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->failed_payment.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->failed_payment.payment_hash.data, 32);
return payment_hash_arr;
}
uint32_t __attribute__((export_name("TS_LDKCOption_HTLCDestinationZ_ty_from_ptr"))) TS_LDKCOption_HTLCDestinationZ_ty_from_ptr(uint64_t ptr) {
uint64_t __attribute__((export_name("TS_LDKCOption_HTLCDestinationZ_Some_get_some"))) TS_LDKCOption_HTLCDestinationZ_Some_get_some(uint64_t ptr) {
LDKCOption_HTLCDestinationZ *obj = (LDKCOption_HTLCDestinationZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_HTLCDestinationZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
return some_ref;
}
static inline struct LDKCOption_HTLCDestinationZ CResult_COption_HTLCDestinationZDecodeErrorZ_get_ok(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR owner){
int8_tArray __attribute__((export_name("TS_LDKCOption_U128Z_Some_get_some"))) TS_LDKCOption_U128Z_Some_get_some(uint64_t ptr) {
LDKCOption_U128Z *obj = (LDKCOption_U128Z*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_U128Z_Some);
- int8_tArray some_arr = init_int8_tArray(16, __LINE__);
- memcpy(some_arr->elems, obj->some.le_bytes, 16);
+ int8_tArray some_arr = init_int8_tArray(16, __LINE__);
+ memcpy(some_arr->elems, obj->some.le_bytes, 16);
return some_arr;
}
static inline LDKCVec_ClaimedHTLCZ CVec_ClaimedHTLCZ_clone(const LDKCVec_ClaimedHTLCZ *orig) {
uint32_t __attribute__((export_name("TS_LDKCOption_PaymentFailureReasonZ_Some_get_some"))) TS_LDKCOption_PaymentFailureReasonZ_Some_get_some(uint64_t ptr) {
LDKCOption_PaymentFailureReasonZ *obj = (LDKCOption_PaymentFailureReasonZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_PaymentFailureReasonZ_Some);
- uint32_t some_conv = LDKPaymentFailureReason_to_js(obj->some);
+ uint32_t some_conv = LDKPaymentFailureReason_to_js(obj->some);
return some_conv;
}
uint32_t __attribute__((export_name("TS_LDKBumpTransactionEvent_ty_from_ptr"))) TS_LDKBumpTransactionEvent_ty_from_ptr(uint64_t ptr) {
int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_claim_id"))) TS_LDKBumpTransactionEvent_ChannelClose_get_claim_id(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_ChannelClose);
- int8_tArray claim_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(claim_id_arr->elems, obj->channel_close.claim_id.data, 32);
+ int8_tArray claim_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(claim_id_arr->elems, obj->channel_close.claim_id.data, 32);
return claim_id_arr;
}
int32_t __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_package_target_feerate_sat_per_1000_weight"))) TS_LDKBumpTransactionEvent_ChannelClose_get_package_target_feerate_sat_per_1000_weight(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_ChannelClose);
- int32_t package_target_feerate_sat_per_1000_weight_conv = obj->channel_close.package_target_feerate_sat_per_1000_weight;
+ int32_t package_target_feerate_sat_per_1000_weight_conv = obj->channel_close.package_target_feerate_sat_per_1000_weight;
return package_target_feerate_sat_per_1000_weight_conv;
}
int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_commitment_tx"))) TS_LDKBumpTransactionEvent_ChannelClose_get_commitment_tx(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_ChannelClose);
- LDKTransaction commitment_tx_var = obj->channel_close.commitment_tx;
+ LDKTransaction commitment_tx_var = obj->channel_close.commitment_tx;
int8_tArray commitment_tx_arr = init_int8_tArray(commitment_tx_var.datalen, __LINE__);
memcpy(commitment_tx_arr->elems, commitment_tx_var.data, commitment_tx_var.datalen);
return commitment_tx_arr;
int64_t __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_commitment_tx_fee_satoshis"))) TS_LDKBumpTransactionEvent_ChannelClose_get_commitment_tx_fee_satoshis(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_ChannelClose);
- int64_t commitment_tx_fee_satoshis_conv = obj->channel_close.commitment_tx_fee_satoshis;
+ int64_t commitment_tx_fee_satoshis_conv = obj->channel_close.commitment_tx_fee_satoshis;
return commitment_tx_fee_satoshis_conv;
}
uint64_t __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_anchor_descriptor"))) TS_LDKBumpTransactionEvent_ChannelClose_get_anchor_descriptor(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_ChannelClose);
- LDKAnchorDescriptor anchor_descriptor_var = obj->channel_close.anchor_descriptor;
+ LDKAnchorDescriptor anchor_descriptor_var = obj->channel_close.anchor_descriptor;
uint64_t anchor_descriptor_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(anchor_descriptor_var);
anchor_descriptor_ref = tag_ptr(anchor_descriptor_var.inner, false);
uint64_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_ChannelClose_get_pending_htlcs"))) TS_LDKBumpTransactionEvent_ChannelClose_get_pending_htlcs(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_ChannelClose);
- LDKCVec_HTLCOutputInCommitmentZ pending_htlcs_var = obj->channel_close.pending_htlcs;
+ LDKCVec_HTLCOutputInCommitmentZ pending_htlcs_var = obj->channel_close.pending_htlcs;
uint64_tArray pending_htlcs_arr = NULL;
pending_htlcs_arr = init_uint64_tArray(pending_htlcs_var.datalen, __LINE__);
uint64_t *pending_htlcs_arr_ptr = (uint64_t*)(((uint8_t*)pending_htlcs_arr) + 8);
int8_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_claim_id"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_claim_id(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution);
- int8_tArray claim_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(claim_id_arr->elems, obj->htlc_resolution.claim_id.data, 32);
+ int8_tArray claim_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(claim_id_arr->elems, obj->htlc_resolution.claim_id.data, 32);
return claim_id_arr;
}
int32_t __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_target_feerate_sat_per_1000_weight"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_target_feerate_sat_per_1000_weight(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution);
- int32_t target_feerate_sat_per_1000_weight_conv = obj->htlc_resolution.target_feerate_sat_per_1000_weight;
+ int32_t target_feerate_sat_per_1000_weight_conv = obj->htlc_resolution.target_feerate_sat_per_1000_weight;
return target_feerate_sat_per_1000_weight_conv;
}
uint64_tArray __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_htlc_descriptors"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_htlc_descriptors(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution);
- LDKCVec_HTLCDescriptorZ htlc_descriptors_var = obj->htlc_resolution.htlc_descriptors;
+ LDKCVec_HTLCDescriptorZ htlc_descriptors_var = obj->htlc_resolution.htlc_descriptors;
uint64_tArray htlc_descriptors_arr = NULL;
htlc_descriptors_arr = init_uint64_tArray(htlc_descriptors_var.datalen, __LINE__);
uint64_t *htlc_descriptors_arr_ptr = (uint64_t*)(((uint8_t*)htlc_descriptors_arr) + 8);
int32_t __attribute__((export_name("TS_LDKBumpTransactionEvent_HTLCResolution_get_tx_lock_time"))) TS_LDKBumpTransactionEvent_HTLCResolution_get_tx_lock_time(uint64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
assert(obj->tag == LDKBumpTransactionEvent_HTLCResolution);
- int32_t tx_lock_time_conv = obj->htlc_resolution.tx_lock_time;
+ int32_t tx_lock_time_conv = obj->htlc_resolution.tx_lock_time;
return tx_lock_time_conv;
}
uint32_t __attribute__((export_name("TS_LDKEvent_ty_from_ptr"))) TS_LDKEvent_ty_from_ptr(uint64_t ptr) {
case LDKEvent_FundingGenerationReady: return 0;
case LDKEvent_PaymentClaimable: return 1;
case LDKEvent_PaymentClaimed: return 2;
- case LDKEvent_PaymentSent: return 3;
- case LDKEvent_PaymentFailed: return 4;
- case LDKEvent_PaymentPathSuccessful: return 5;
- case LDKEvent_PaymentPathFailed: return 6;
- case LDKEvent_ProbeSuccessful: return 7;
- case LDKEvent_ProbeFailed: return 8;
- case LDKEvent_PendingHTLCsForwardable: return 9;
- case LDKEvent_HTLCIntercepted: return 10;
- case LDKEvent_SpendableOutputs: return 11;
- case LDKEvent_PaymentForwarded: return 12;
- case LDKEvent_ChannelPending: return 13;
- case LDKEvent_ChannelReady: return 14;
- case LDKEvent_ChannelClosed: return 15;
- case LDKEvent_DiscardFunding: return 16;
- case LDKEvent_OpenChannelRequest: return 17;
- case LDKEvent_HTLCHandlingFailed: return 18;
- case LDKEvent_BumpTransaction: return 19;
+ case LDKEvent_ConnectionNeeded: return 3;
+ case LDKEvent_InvoiceRequestFailed: return 4;
+ case LDKEvent_PaymentSent: return 5;
+ case LDKEvent_PaymentFailed: return 6;
+ case LDKEvent_PaymentPathSuccessful: return 7;
+ case LDKEvent_PaymentPathFailed: return 8;
+ case LDKEvent_ProbeSuccessful: return 9;
+ case LDKEvent_ProbeFailed: return 10;
+ case LDKEvent_PendingHTLCsForwardable: return 11;
+ case LDKEvent_HTLCIntercepted: return 12;
+ case LDKEvent_SpendableOutputs: return 13;
+ case LDKEvent_PaymentForwarded: return 14;
+ case LDKEvent_ChannelPending: return 15;
+ case LDKEvent_ChannelReady: return 16;
+ case LDKEvent_ChannelClosed: return 17;
+ case LDKEvent_DiscardFunding: return 18;
+ case LDKEvent_OpenChannelRequest: return 19;
+ case LDKEvent_HTLCHandlingFailed: return 20;
+ case LDKEvent_BumpTransaction: return 21;
default: abort();
}
}
int8_tArray __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id"))) TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_FundingGenerationReady);
- int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(temporary_channel_id_arr->elems, obj->funding_generation_ready.temporary_channel_id.data, 32);
+ int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(temporary_channel_id_arr->elems, obj->funding_generation_ready.temporary_channel_id.data, 32);
return temporary_channel_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_counterparty_node_id"))) TS_LDKEvent_FundingGenerationReady_get_counterparty_node_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_FundingGenerationReady);
- int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(counterparty_node_id_arr->elems, obj->funding_generation_ready.counterparty_node_id.compressed_form, 33);
+ int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(counterparty_node_id_arr->elems, obj->funding_generation_ready.counterparty_node_id.compressed_form, 33);
return counterparty_node_id_arr;
}
int64_t __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_channel_value_satoshis"))) TS_LDKEvent_FundingGenerationReady_get_channel_value_satoshis(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_FundingGenerationReady);
- int64_t channel_value_satoshis_conv = obj->funding_generation_ready.channel_value_satoshis;
+ int64_t channel_value_satoshis_conv = obj->funding_generation_ready.channel_value_satoshis;
return channel_value_satoshis_conv;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_output_script"))) TS_LDKEvent_FundingGenerationReady_get_output_script(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_FundingGenerationReady);
- LDKCVec_u8Z output_script_var = obj->funding_generation_ready.output_script;
+ LDKCVec_u8Z output_script_var = obj->funding_generation_ready.output_script;
int8_tArray output_script_arr = init_int8_tArray(output_script_var.datalen, __LINE__);
memcpy(output_script_arr->elems, output_script_var.data, output_script_var.datalen);
return output_script_arr;
int8_tArray __attribute__((export_name("TS_LDKEvent_FundingGenerationReady_get_user_channel_id"))) TS_LDKEvent_FundingGenerationReady_get_user_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_FundingGenerationReady);
- int8_tArray user_channel_id_arr = init_int8_tArray(16, __LINE__);
- memcpy(user_channel_id_arr->elems, obj->funding_generation_ready.user_channel_id.le_bytes, 16);
+ int8_tArray user_channel_id_arr = init_int8_tArray(16, __LINE__);
+ memcpy(user_channel_id_arr->elems, obj->funding_generation_ready.user_channel_id.le_bytes, 16);
return user_channel_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_receiver_node_id"))) TS_LDKEvent_PaymentClaimable_get_receiver_node_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimable);
- int8_tArray receiver_node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(receiver_node_id_arr->elems, obj->payment_claimable.receiver_node_id.compressed_form, 33);
+ int8_tArray receiver_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(receiver_node_id_arr->elems, obj->payment_claimable.receiver_node_id.compressed_form, 33);
return receiver_node_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_payment_hash"))) TS_LDKEvent_PaymentClaimable_get_payment_hash(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimable);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->payment_claimable.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->payment_claimable.payment_hash.data, 32);
return payment_hash_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_onion_fields"))) TS_LDKEvent_PaymentClaimable_get_onion_fields(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimable);
- LDKRecipientOnionFields onion_fields_var = obj->payment_claimable.onion_fields;
+ LDKRecipientOnionFields onion_fields_var = obj->payment_claimable.onion_fields;
uint64_t onion_fields_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(onion_fields_var);
onion_fields_ref = tag_ptr(onion_fields_var.inner, false);
int64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_amount_msat"))) TS_LDKEvent_PaymentClaimable_get_amount_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimable);
- int64_t amount_msat_conv = obj->payment_claimable.amount_msat;
+ int64_t amount_msat_conv = obj->payment_claimable.amount_msat;
return amount_msat_conv;
}
int64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_counterparty_skimmed_fee_msat"))) TS_LDKEvent_PaymentClaimable_get_counterparty_skimmed_fee_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimable);
- int64_t counterparty_skimmed_fee_msat_conv = obj->payment_claimable.counterparty_skimmed_fee_msat;
+ int64_t counterparty_skimmed_fee_msat_conv = obj->payment_claimable.counterparty_skimmed_fee_msat;
return counterparty_skimmed_fee_msat_conv;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_purpose"))) TS_LDKEvent_PaymentClaimable_get_purpose(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimable);
- uint64_t purpose_ref = tag_ptr(&obj->payment_claimable.purpose, false);
+ uint64_t purpose_ref = tag_ptr(&obj->payment_claimable.purpose, false);
return purpose_ref;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_via_channel_id"))) TS_LDKEvent_PaymentClaimable_get_via_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimable);
- uint64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false);
+ uint64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false);
return via_channel_id_ref;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_via_user_channel_id"))) TS_LDKEvent_PaymentClaimable_get_via_user_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimable);
- uint64_t via_user_channel_id_ref = tag_ptr(&obj->payment_claimable.via_user_channel_id, false);
+ uint64_t via_user_channel_id_ref = tag_ptr(&obj->payment_claimable.via_user_channel_id, false);
return via_user_channel_id_ref;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimable_get_claim_deadline"))) TS_LDKEvent_PaymentClaimable_get_claim_deadline(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimable);
- uint64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false);
+ uint64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false);
return claim_deadline_ref;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentClaimed_get_receiver_node_id"))) TS_LDKEvent_PaymentClaimed_get_receiver_node_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimed);
- int8_tArray receiver_node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(receiver_node_id_arr->elems, obj->payment_claimed.receiver_node_id.compressed_form, 33);
+ int8_tArray receiver_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(receiver_node_id_arr->elems, obj->payment_claimed.receiver_node_id.compressed_form, 33);
return receiver_node_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentClaimed_get_payment_hash"))) TS_LDKEvent_PaymentClaimed_get_payment_hash(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimed);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->payment_claimed.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->payment_claimed.payment_hash.data, 32);
return payment_hash_arr;
}
int64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimed_get_amount_msat"))) TS_LDKEvent_PaymentClaimed_get_amount_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimed);
- int64_t amount_msat_conv = obj->payment_claimed.amount_msat;
+ int64_t amount_msat_conv = obj->payment_claimed.amount_msat;
return amount_msat_conv;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimed_get_purpose"))) TS_LDKEvent_PaymentClaimed_get_purpose(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimed);
- uint64_t purpose_ref = tag_ptr(&obj->payment_claimed.purpose, false);
+ uint64_t purpose_ref = tag_ptr(&obj->payment_claimed.purpose, false);
return purpose_ref;
}
uint64_tArray __attribute__((export_name("TS_LDKEvent_PaymentClaimed_get_htlcs"))) TS_LDKEvent_PaymentClaimed_get_htlcs(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimed);
- LDKCVec_ClaimedHTLCZ htlcs_var = obj->payment_claimed.htlcs;
+ LDKCVec_ClaimedHTLCZ htlcs_var = obj->payment_claimed.htlcs;
uint64_tArray htlcs_arr = NULL;
htlcs_arr = init_uint64_tArray(htlcs_var.datalen, __LINE__);
uint64_t *htlcs_arr_ptr = (uint64_t*)(((uint8_t*)htlcs_arr) + 8);
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentClaimed_get_sender_intended_total_msat"))) TS_LDKEvent_PaymentClaimed_get_sender_intended_total_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentClaimed);
- uint64_t sender_intended_total_msat_ref = tag_ptr(&obj->payment_claimed.sender_intended_total_msat, false);
+ uint64_t sender_intended_total_msat_ref = tag_ptr(&obj->payment_claimed.sender_intended_total_msat, false);
return sender_intended_total_msat_ref;
}
+int8_tArray __attribute__((export_name("TS_LDKEvent_ConnectionNeeded_get_node_id"))) TS_LDKEvent_ConnectionNeeded_get_node_id(uint64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKEvent_ConnectionNeeded);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->connection_needed.node_id.compressed_form, 33);
+ return node_id_arr;
+}
+uint64_tArray __attribute__((export_name("TS_LDKEvent_ConnectionNeeded_get_addresses"))) TS_LDKEvent_ConnectionNeeded_get_addresses(uint64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKEvent_ConnectionNeeded);
+ LDKCVec_SocketAddressZ addresses_var = obj->connection_needed.addresses;
+ uint64_tArray addresses_arr = NULL;
+ addresses_arr = init_uint64_tArray(addresses_var.datalen, __LINE__);
+ uint64_t *addresses_arr_ptr = (uint64_t*)(((uint8_t*)addresses_arr) + 8);
+ for (size_t p = 0; p < addresses_var.datalen; p++) {
+ uint64_t addresses_conv_15_ref = tag_ptr(&addresses_var.data[p], false);
+ addresses_arr_ptr[p] = addresses_conv_15_ref;
+ }
+
+ return addresses_arr;
+}
+int8_tArray __attribute__((export_name("TS_LDKEvent_InvoiceRequestFailed_get_payment_id"))) TS_LDKEvent_InvoiceRequestFailed_get_payment_id(uint64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKEvent_InvoiceRequestFailed);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->invoice_request_failed.payment_id.data, 32);
+ return payment_id_arr;
+}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentSent_get_payment_id"))) TS_LDKEvent_PaymentSent_get_payment_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentSent);
- uint64_t payment_id_ref = tag_ptr(&obj->payment_sent.payment_id, false);
+ uint64_t payment_id_ref = tag_ptr(&obj->payment_sent.payment_id, false);
return payment_id_ref;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentSent_get_payment_preimage"))) TS_LDKEvent_PaymentSent_get_payment_preimage(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentSent);
- int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_preimage_arr->elems, obj->payment_sent.payment_preimage.data, 32);
+ int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_preimage_arr->elems, obj->payment_sent.payment_preimage.data, 32);
return payment_preimage_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentSent_get_payment_hash"))) TS_LDKEvent_PaymentSent_get_payment_hash(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentSent);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->payment_sent.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->payment_sent.payment_hash.data, 32);
return payment_hash_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentSent_get_fee_paid_msat"))) TS_LDKEvent_PaymentSent_get_fee_paid_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentSent);
- uint64_t fee_paid_msat_ref = tag_ptr(&obj->payment_sent.fee_paid_msat, false);
+ uint64_t fee_paid_msat_ref = tag_ptr(&obj->payment_sent.fee_paid_msat, false);
return fee_paid_msat_ref;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentFailed_get_payment_id"))) TS_LDKEvent_PaymentFailed_get_payment_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentFailed);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->payment_failed.payment_id.data, 32);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->payment_failed.payment_id.data, 32);
return payment_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentFailed_get_payment_hash"))) TS_LDKEvent_PaymentFailed_get_payment_hash(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentFailed);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->payment_failed.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->payment_failed.payment_hash.data, 32);
return payment_hash_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentFailed_get_reason"))) TS_LDKEvent_PaymentFailed_get_reason(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentFailed);
- uint64_t reason_ref = tag_ptr(&obj->payment_failed.reason, false);
+ uint64_t reason_ref = tag_ptr(&obj->payment_failed.reason, false);
return reason_ref;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentPathSuccessful_get_payment_id"))) TS_LDKEvent_PaymentPathSuccessful_get_payment_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentPathSuccessful);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->payment_path_successful.payment_id.data, 32);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->payment_path_successful.payment_id.data, 32);
return payment_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentPathSuccessful_get_payment_hash"))) TS_LDKEvent_PaymentPathSuccessful_get_payment_hash(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentPathSuccessful);
- uint64_t payment_hash_ref = tag_ptr(&obj->payment_path_successful.payment_hash, false);
+ uint64_t payment_hash_ref = tag_ptr(&obj->payment_path_successful.payment_hash, false);
return payment_hash_ref;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentPathSuccessful_get_path"))) TS_LDKEvent_PaymentPathSuccessful_get_path(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentPathSuccessful);
- LDKPath path_var = obj->payment_path_successful.path;
+ LDKPath path_var = obj->payment_path_successful.path;
uint64_t path_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentPathFailed_get_payment_id"))) TS_LDKEvent_PaymentPathFailed_get_payment_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentPathFailed);
- uint64_t payment_id_ref = tag_ptr(&obj->payment_path_failed.payment_id, false);
+ uint64_t payment_id_ref = tag_ptr(&obj->payment_path_failed.payment_id, false);
return payment_id_ref;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_PaymentPathFailed_get_payment_hash"))) TS_LDKEvent_PaymentPathFailed_get_payment_hash(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentPathFailed);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->payment_path_failed.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->payment_path_failed.payment_hash.data, 32);
return payment_hash_arr;
}
jboolean __attribute__((export_name("TS_LDKEvent_PaymentPathFailed_get_payment_failed_permanently"))) TS_LDKEvent_PaymentPathFailed_get_payment_failed_permanently(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentPathFailed);
- jboolean payment_failed_permanently_conv = obj->payment_path_failed.payment_failed_permanently;
+ jboolean payment_failed_permanently_conv = obj->payment_path_failed.payment_failed_permanently;
return payment_failed_permanently_conv;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentPathFailed_get_failure"))) TS_LDKEvent_PaymentPathFailed_get_failure(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentPathFailed);
- uint64_t failure_ref = tag_ptr(&obj->payment_path_failed.failure, false);
+ uint64_t failure_ref = tag_ptr(&obj->payment_path_failed.failure, false);
return failure_ref;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentPathFailed_get_path"))) TS_LDKEvent_PaymentPathFailed_get_path(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentPathFailed);
- LDKPath path_var = obj->payment_path_failed.path;
+ LDKPath path_var = obj->payment_path_failed.path;
uint64_t path_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentPathFailed_get_short_channel_id"))) TS_LDKEvent_PaymentPathFailed_get_short_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentPathFailed);
- uint64_t short_channel_id_ref = tag_ptr(&obj->payment_path_failed.short_channel_id, false);
+ uint64_t short_channel_id_ref = tag_ptr(&obj->payment_path_failed.short_channel_id, false);
return short_channel_id_ref;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ProbeSuccessful_get_payment_id"))) TS_LDKEvent_ProbeSuccessful_get_payment_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ProbeSuccessful);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->probe_successful.payment_id.data, 32);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->probe_successful.payment_id.data, 32);
return payment_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ProbeSuccessful_get_payment_hash"))) TS_LDKEvent_ProbeSuccessful_get_payment_hash(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ProbeSuccessful);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->probe_successful.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->probe_successful.payment_hash.data, 32);
return payment_hash_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_ProbeSuccessful_get_path"))) TS_LDKEvent_ProbeSuccessful_get_path(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ProbeSuccessful);
- LDKPath path_var = obj->probe_successful.path;
+ LDKPath path_var = obj->probe_successful.path;
uint64_t path_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKEvent_ProbeFailed_get_payment_id"))) TS_LDKEvent_ProbeFailed_get_payment_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ProbeFailed);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->probe_failed.payment_id.data, 32);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->probe_failed.payment_id.data, 32);
return payment_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ProbeFailed_get_payment_hash"))) TS_LDKEvent_ProbeFailed_get_payment_hash(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ProbeFailed);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->probe_failed.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->probe_failed.payment_hash.data, 32);
return payment_hash_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_ProbeFailed_get_path"))) TS_LDKEvent_ProbeFailed_get_path(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ProbeFailed);
- LDKPath path_var = obj->probe_failed.path;
+ LDKPath path_var = obj->probe_failed.path;
uint64_t path_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKEvent_ProbeFailed_get_short_channel_id"))) TS_LDKEvent_ProbeFailed_get_short_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ProbeFailed);
- uint64_t short_channel_id_ref = tag_ptr(&obj->probe_failed.short_channel_id, false);
+ uint64_t short_channel_id_ref = tag_ptr(&obj->probe_failed.short_channel_id, false);
return short_channel_id_ref;
}
int64_t __attribute__((export_name("TS_LDKEvent_PendingHTLCsForwardable_get_time_forwardable"))) TS_LDKEvent_PendingHTLCsForwardable_get_time_forwardable(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PendingHTLCsForwardable);
- int64_t time_forwardable_conv = obj->pending_htl_cs_forwardable.time_forwardable;
+ int64_t time_forwardable_conv = obj->pending_htl_cs_forwardable.time_forwardable;
return time_forwardable_conv;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_HTLCIntercepted_get_intercept_id"))) TS_LDKEvent_HTLCIntercepted_get_intercept_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_HTLCIntercepted);
- int8_tArray intercept_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(intercept_id_arr->elems, obj->htlc_intercepted.intercept_id.data, 32);
+ int8_tArray intercept_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(intercept_id_arr->elems, obj->htlc_intercepted.intercept_id.data, 32);
return intercept_id_arr;
}
int64_t __attribute__((export_name("TS_LDKEvent_HTLCIntercepted_get_requested_next_hop_scid"))) TS_LDKEvent_HTLCIntercepted_get_requested_next_hop_scid(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_HTLCIntercepted);
- int64_t requested_next_hop_scid_conv = obj->htlc_intercepted.requested_next_hop_scid;
+ int64_t requested_next_hop_scid_conv = obj->htlc_intercepted.requested_next_hop_scid;
return requested_next_hop_scid_conv;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_HTLCIntercepted_get_payment_hash"))) TS_LDKEvent_HTLCIntercepted_get_payment_hash(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_HTLCIntercepted);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->htlc_intercepted.payment_hash.data, 32);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->htlc_intercepted.payment_hash.data, 32);
return payment_hash_arr;
}
int64_t __attribute__((export_name("TS_LDKEvent_HTLCIntercepted_get_inbound_amount_msat"))) TS_LDKEvent_HTLCIntercepted_get_inbound_amount_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_HTLCIntercepted);
- int64_t inbound_amount_msat_conv = obj->htlc_intercepted.inbound_amount_msat;
+ int64_t inbound_amount_msat_conv = obj->htlc_intercepted.inbound_amount_msat;
return inbound_amount_msat_conv;
}
int64_t __attribute__((export_name("TS_LDKEvent_HTLCIntercepted_get_expected_outbound_amount_msat"))) TS_LDKEvent_HTLCIntercepted_get_expected_outbound_amount_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_HTLCIntercepted);
- int64_t expected_outbound_amount_msat_conv = obj->htlc_intercepted.expected_outbound_amount_msat;
+ int64_t expected_outbound_amount_msat_conv = obj->htlc_intercepted.expected_outbound_amount_msat;
return expected_outbound_amount_msat_conv;
}
uint64_tArray __attribute__((export_name("TS_LDKEvent_SpendableOutputs_get_outputs"))) TS_LDKEvent_SpendableOutputs_get_outputs(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_SpendableOutputs);
- LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
+ LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
uint64_tArray outputs_arr = NULL;
outputs_arr = init_uint64_tArray(outputs_var.datalen, __LINE__);
uint64_t *outputs_arr_ptr = (uint64_t*)(((uint8_t*)outputs_arr) + 8);
uint64_t __attribute__((export_name("TS_LDKEvent_SpendableOutputs_get_channel_id"))) TS_LDKEvent_SpendableOutputs_get_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_SpendableOutputs);
- uint64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false);
+ uint64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false);
return channel_id_ref;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_prev_channel_id"))) TS_LDKEvent_PaymentForwarded_get_prev_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentForwarded);
- uint64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false);
+ uint64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false);
return prev_channel_id_ref;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_next_channel_id"))) TS_LDKEvent_PaymentForwarded_get_next_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentForwarded);
- uint64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false);
+ uint64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false);
return next_channel_id_ref;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_fee_earned_msat"))) TS_LDKEvent_PaymentForwarded_get_fee_earned_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentForwarded);
- uint64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false);
+ uint64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false);
return fee_earned_msat_ref;
}
jboolean __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx"))) TS_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentForwarded);
- jboolean claim_from_onchain_tx_conv = obj->payment_forwarded.claim_from_onchain_tx;
+ jboolean claim_from_onchain_tx_conv = obj->payment_forwarded.claim_from_onchain_tx;
return claim_from_onchain_tx_conv;
}
uint64_t __attribute__((export_name("TS_LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat"))) TS_LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_PaymentForwarded);
- uint64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false);
+ uint64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false);
return outbound_amount_forwarded_msat_ref;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_channel_id"))) TS_LDKEvent_ChannelPending_get_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelPending);
- int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(channel_id_arr->elems, obj->channel_pending.channel_id.data, 32);
+ int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(channel_id_arr->elems, obj->channel_pending.channel_id.data, 32);
return channel_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_user_channel_id"))) TS_LDKEvent_ChannelPending_get_user_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelPending);
- int8_tArray user_channel_id_arr = init_int8_tArray(16, __LINE__);
- memcpy(user_channel_id_arr->elems, obj->channel_pending.user_channel_id.le_bytes, 16);
+ int8_tArray user_channel_id_arr = init_int8_tArray(16, __LINE__);
+ memcpy(user_channel_id_arr->elems, obj->channel_pending.user_channel_id.le_bytes, 16);
return user_channel_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_former_temporary_channel_id"))) TS_LDKEvent_ChannelPending_get_former_temporary_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelPending);
- uint64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false);
+ uint64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false);
return former_temporary_channel_id_ref;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelPending_get_counterparty_node_id"))) TS_LDKEvent_ChannelPending_get_counterparty_node_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelPending);
- int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(counterparty_node_id_arr->elems, obj->channel_pending.counterparty_node_id.compressed_form, 33);
+ int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(counterparty_node_id_arr->elems, obj->channel_pending.counterparty_node_id.compressed_form, 33);
return counterparty_node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_ChannelPending_get_funding_txo"))) TS_LDKEvent_ChannelPending_get_funding_txo(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelPending);
- LDKOutPoint funding_txo_var = obj->channel_pending.funding_txo;
+ LDKOutPoint funding_txo_var = obj->channel_pending.funding_txo;
uint64_t funding_txo_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelReady_get_channel_id"))) TS_LDKEvent_ChannelReady_get_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelReady);
- int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(channel_id_arr->elems, obj->channel_ready.channel_id.data, 32);
+ int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(channel_id_arr->elems, obj->channel_ready.channel_id.data, 32);
return channel_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelReady_get_user_channel_id"))) TS_LDKEvent_ChannelReady_get_user_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelReady);
- int8_tArray user_channel_id_arr = init_int8_tArray(16, __LINE__);
- memcpy(user_channel_id_arr->elems, obj->channel_ready.user_channel_id.le_bytes, 16);
+ int8_tArray user_channel_id_arr = init_int8_tArray(16, __LINE__);
+ memcpy(user_channel_id_arr->elems, obj->channel_ready.user_channel_id.le_bytes, 16);
return user_channel_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelReady_get_counterparty_node_id"))) TS_LDKEvent_ChannelReady_get_counterparty_node_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelReady);
- int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(counterparty_node_id_arr->elems, obj->channel_ready.counterparty_node_id.compressed_form, 33);
+ int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(counterparty_node_id_arr->elems, obj->channel_ready.counterparty_node_id.compressed_form, 33);
return counterparty_node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_ChannelReady_get_channel_type"))) TS_LDKEvent_ChannelReady_get_channel_type(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelReady);
- LDKChannelTypeFeatures channel_type_var = obj->channel_ready.channel_type;
+ LDKChannelTypeFeatures channel_type_var = obj->channel_ready.channel_type;
uint64_t channel_type_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
channel_type_ref = tag_ptr(channel_type_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_channel_id"))) TS_LDKEvent_ChannelClosed_get_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelClosed);
- int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(channel_id_arr->elems, obj->channel_closed.channel_id.data, 32);
+ int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(channel_id_arr->elems, obj->channel_closed.channel_id.data, 32);
return channel_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_user_channel_id"))) TS_LDKEvent_ChannelClosed_get_user_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelClosed);
- int8_tArray user_channel_id_arr = init_int8_tArray(16, __LINE__);
- memcpy(user_channel_id_arr->elems, obj->channel_closed.user_channel_id.le_bytes, 16);
+ int8_tArray user_channel_id_arr = init_int8_tArray(16, __LINE__);
+ memcpy(user_channel_id_arr->elems, obj->channel_closed.user_channel_id.le_bytes, 16);
return user_channel_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_reason"))) TS_LDKEvent_ChannelClosed_get_reason(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelClosed);
- uint64_t reason_ref = tag_ptr(&obj->channel_closed.reason, false);
+ uint64_t reason_ref = tag_ptr(&obj->channel_closed.reason, false);
return reason_ref;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_counterparty_node_id"))) TS_LDKEvent_ChannelClosed_get_counterparty_node_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelClosed);
- int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(counterparty_node_id_arr->elems, obj->channel_closed.counterparty_node_id.compressed_form, 33);
+ int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(counterparty_node_id_arr->elems, obj->channel_closed.counterparty_node_id.compressed_form, 33);
return counterparty_node_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_channel_capacity_sats"))) TS_LDKEvent_ChannelClosed_get_channel_capacity_sats(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_ChannelClosed);
- uint64_t channel_capacity_sats_ref = tag_ptr(&obj->channel_closed.channel_capacity_sats, false);
+ uint64_t channel_capacity_sats_ref = tag_ptr(&obj->channel_closed.channel_capacity_sats, false);
return channel_capacity_sats_ref;
}
+uint64_t __attribute__((export_name("TS_LDKEvent_ChannelClosed_get_channel_funding_txo"))) TS_LDKEvent_ChannelClosed_get_channel_funding_txo(uint64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ assert(obj->tag == LDKEvent_ChannelClosed);
+ LDKOutPoint channel_funding_txo_var = obj->channel_closed.channel_funding_txo;
+ uint64_t channel_funding_txo_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_var);
+ channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false);
+ return channel_funding_txo_ref;
+}
int8_tArray __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_channel_id"))) TS_LDKEvent_DiscardFunding_get_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_DiscardFunding);
- int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(channel_id_arr->elems, obj->discard_funding.channel_id.data, 32);
+ int8_tArray channel_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(channel_id_arr->elems, obj->discard_funding.channel_id.data, 32);
return channel_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_DiscardFunding_get_transaction"))) TS_LDKEvent_DiscardFunding_get_transaction(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_DiscardFunding);
- LDKTransaction transaction_var = obj->discard_funding.transaction;
+ LDKTransaction transaction_var = obj->discard_funding.transaction;
int8_tArray transaction_arr = init_int8_tArray(transaction_var.datalen, __LINE__);
memcpy(transaction_arr->elems, transaction_var.data, transaction_var.datalen);
return transaction_arr;
int8_tArray __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id"))) TS_LDKEvent_OpenChannelRequest_get_temporary_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_OpenChannelRequest);
- int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(temporary_channel_id_arr->elems, obj->open_channel_request.temporary_channel_id.data, 32);
+ int8_tArray temporary_channel_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(temporary_channel_id_arr->elems, obj->open_channel_request.temporary_channel_id.data, 32);
return temporary_channel_id_arr;
}
int8_tArray __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_counterparty_node_id"))) TS_LDKEvent_OpenChannelRequest_get_counterparty_node_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_OpenChannelRequest);
- int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(counterparty_node_id_arr->elems, obj->open_channel_request.counterparty_node_id.compressed_form, 33);
+ int8_tArray counterparty_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(counterparty_node_id_arr->elems, obj->open_channel_request.counterparty_node_id.compressed_form, 33);
return counterparty_node_id_arr;
}
int64_t __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_funding_satoshis"))) TS_LDKEvent_OpenChannelRequest_get_funding_satoshis(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_OpenChannelRequest);
- int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis;
+ int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis;
return funding_satoshis_conv;
}
int64_t __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_push_msat"))) TS_LDKEvent_OpenChannelRequest_get_push_msat(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_OpenChannelRequest);
- int64_t push_msat_conv = obj->open_channel_request.push_msat;
+ int64_t push_msat_conv = obj->open_channel_request.push_msat;
return push_msat_conv;
}
uint64_t __attribute__((export_name("TS_LDKEvent_OpenChannelRequest_get_channel_type"))) TS_LDKEvent_OpenChannelRequest_get_channel_type(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_OpenChannelRequest);
- LDKChannelTypeFeatures channel_type_var = obj->open_channel_request.channel_type;
+ LDKChannelTypeFeatures channel_type_var = obj->open_channel_request.channel_type;
uint64_t channel_type_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
channel_type_ref = tag_ptr(channel_type_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id"))) TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_HTLCHandlingFailed);
- int8_tArray prev_channel_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(prev_channel_id_arr->elems, obj->htlc_handling_failed.prev_channel_id.data, 32);
+ int8_tArray prev_channel_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(prev_channel_id_arr->elems, obj->htlc_handling_failed.prev_channel_id.data, 32);
return prev_channel_id_arr;
}
uint64_t __attribute__((export_name("TS_LDKEvent_HTLCHandlingFailed_get_failed_next_destination"))) TS_LDKEvent_HTLCHandlingFailed_get_failed_next_destination(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_HTLCHandlingFailed);
- uint64_t failed_next_destination_ref = tag_ptr(&obj->htlc_handling_failed.failed_next_destination, false);
+ uint64_t failed_next_destination_ref = tag_ptr(&obj->htlc_handling_failed.failed_next_destination, false);
return failed_next_destination_ref;
}
uint64_t __attribute__((export_name("TS_LDKEvent_BumpTransaction_get_bump_transaction"))) TS_LDKEvent_BumpTransaction_get_bump_transaction(uint64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
assert(obj->tag == LDKEvent_BumpTransaction);
- uint64_t bump_transaction_ref = tag_ptr(&obj->bump_transaction, false);
+ uint64_t bump_transaction_ref = tag_ptr(&obj->bump_transaction, false);
return bump_transaction_ref;
}
uint32_t __attribute__((export_name("TS_LDKCOption_EventZ_ty_from_ptr"))) TS_LDKCOption_EventZ_ty_from_ptr(uint64_t ptr) {
uint64_t __attribute__((export_name("TS_LDKCOption_EventZ_Some_get_some"))) TS_LDKCOption_EventZ_Some_get_some(uint64_t ptr) {
LDKCOption_EventZ *obj = (LDKCOption_EventZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_EventZ_Some);
- uint64_t some_ref = tag_ptr(&obj->some, false);
+ uint64_t some_ref = tag_ptr(&obj->some, false);
return some_ref;
}
static inline struct LDKCOption_EventZ CResult_COption_EventZDecodeErrorZ_get_ok(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner){
uint64_t __attribute__((export_name("TS_LDKBolt11ParseError_Bech32Error_get_bech32_error"))) TS_LDKBolt11ParseError_Bech32Error_get_bech32_error(uint64_t ptr) {
LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
assert(obj->tag == LDKBolt11ParseError_Bech32Error);
- uint64_t bech32_error_ref = tag_ptr(&obj->bech32_error, false);
+ uint64_t bech32_error_ref = tag_ptr(&obj->bech32_error, false);
return bech32_error_ref;
}
int32_t __attribute__((export_name("TS_LDKBolt11ParseError_ParseAmountError_get_parse_amount_error"))) TS_LDKBolt11ParseError_ParseAmountError_get_parse_amount_error(uint64_t ptr) {
LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
assert(obj->tag == LDKBolt11ParseError_ParseAmountError);
- /*obj->parse_amount_error*/
+ /*obj->parse_amount_error*/
return 0;
}
uint32_t __attribute__((export_name("TS_LDKBolt11ParseError_MalformedSignature_get_malformed_signature"))) TS_LDKBolt11ParseError_MalformedSignature_get_malformed_signature(uint64_t ptr) {
LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
assert(obj->tag == LDKBolt11ParseError_MalformedSignature);
- uint32_t malformed_signature_conv = LDKSecp256k1Error_to_js(obj->malformed_signature);
+ uint32_t malformed_signature_conv = LDKSecp256k1Error_to_js(obj->malformed_signature);
return malformed_signature_conv;
}
int32_t __attribute__((export_name("TS_LDKBolt11ParseError_DescriptionDecodeError_get_description_decode_error"))) TS_LDKBolt11ParseError_DescriptionDecodeError_get_description_decode_error(uint64_t ptr) {
LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
assert(obj->tag == LDKBolt11ParseError_DescriptionDecodeError);
- /*obj->description_decode_error*/
+ /*obj->description_decode_error*/
return 0;
}
jstring __attribute__((export_name("TS_LDKBolt11ParseError_InvalidSliceLength_get_invalid_slice_length"))) TS_LDKBolt11ParseError_InvalidSliceLength_get_invalid_slice_length(uint64_t ptr) {
LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
assert(obj->tag == LDKBolt11ParseError_InvalidSliceLength);
- LDKStr invalid_slice_length_str = obj->invalid_slice_length;
+ LDKStr invalid_slice_length_str = obj->invalid_slice_length;
jstring invalid_slice_length_conv = str_ref_to_ts(invalid_slice_length_str.chars, invalid_slice_length_str.len);
return invalid_slice_length_conv;
}
uint64_t __attribute__((export_name("TS_LDKParseOrSemanticError_ParseError_get_parse_error"))) TS_LDKParseOrSemanticError_ParseError_get_parse_error(uint64_t ptr) {
LDKParseOrSemanticError *obj = (LDKParseOrSemanticError*)untag_ptr(ptr);
assert(obj->tag == LDKParseOrSemanticError_ParseError);
- uint64_t parse_error_ref = tag_ptr(&obj->parse_error, false);
+ uint64_t parse_error_ref = tag_ptr(&obj->parse_error, false);
return parse_error_ref;
}
uint32_t __attribute__((export_name("TS_LDKParseOrSemanticError_SemanticError_get_semantic_error"))) TS_LDKParseOrSemanticError_SemanticError_get_semantic_error(uint64_t ptr) {
LDKParseOrSemanticError *obj = (LDKParseOrSemanticError*)untag_ptr(ptr);
assert(obj->tag == LDKParseOrSemanticError_SemanticError);
- uint32_t semantic_error_conv = LDKBolt11SemanticError_to_js(obj->semantic_error);
+ uint32_t semantic_error_conv = LDKBolt11SemanticError_to_js(obj->semantic_error);
return semantic_error_conv;
}
static inline struct LDKBolt11Invoice CResult_Bolt11InvoiceParseOrSemanticErrorZ_get_ok(LDKCResult_Bolt11InvoiceParseOrSemanticErrorZ *NONNULL_PTR owner){
return ret_ref;
}
-static inline struct LDKReceiveTlvs CResult_ReceiveTlvsDecodeErrorZ_get_ok(LDKCResult_ReceiveTlvsDecodeErrorZ *NONNULL_PTR owner){
- LDKReceiveTlvs ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
+static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){
+ return ThirtyTwoBytes_clone(&owner->a);
}
-uint64_t __attribute__((export_name("TS_CResult_ReceiveTlvsDecodeErrorZ_get_ok"))) TS_CResult_ReceiveTlvsDecodeErrorZ_get_ok(uint64_t owner) {
- LDKCResult_ReceiveTlvsDecodeErrorZ* owner_conv = (LDKCResult_ReceiveTlvsDecodeErrorZ*)untag_ptr(owner);
- LDKReceiveTlvs ret_var = CResult_ReceiveTlvsDecodeErrorZ_get_ok(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+int8_tArray __attribute__((export_name("TS_C2Tuple__u832u16Z_get_a"))) TS_C2Tuple__u832u16Z_get_a(uint64_t owner) {
+ LDKC2Tuple__u832u16Z* owner_conv = (LDKC2Tuple__u832u16Z*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, C2Tuple__u832u16Z_get_a(owner_conv).data, 32);
+ return ret_arr;
}
-static inline struct LDKDecodeError CResult_ReceiveTlvsDecodeErrorZ_get_err(LDKCResult_ReceiveTlvsDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
+static inline uint16_t C2Tuple__u832u16Z_get_b(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){
+ return owner->b;
}
-uint64_t __attribute__((export_name("TS_CResult_ReceiveTlvsDecodeErrorZ_get_err"))) TS_CResult_ReceiveTlvsDecodeErrorZ_get_err(uint64_t owner) {
- LDKCResult_ReceiveTlvsDecodeErrorZ* owner_conv = (LDKCResult_ReceiveTlvsDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_ReceiveTlvsDecodeErrorZ_get_err(owner_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+int16_t __attribute__((export_name("TS_C2Tuple__u832u16Z_get_b"))) TS_C2Tuple__u832u16Z_get_b(uint64_t owner) {
+ LDKC2Tuple__u832u16Z* owner_conv = (LDKC2Tuple__u832u16Z*)untag_ptr(owner);
+ int16_t ret_conv = C2Tuple__u832u16Z_get_b(owner_conv);
+ return ret_conv;
}
static inline struct LDKPaymentRelay CResult_PaymentRelayDecodeErrorZ_get_ok(LDKCResult_PaymentRelayDecodeErrorZ *NONNULL_PTR owner){
return ret_ref;
}
-uint32_t __attribute__((export_name("TS_LDKPaymentError_ty_from_ptr"))) TS_LDKPaymentError_ty_from_ptr(uint64_t ptr) {
- LDKPaymentError *obj = (LDKPaymentError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKPaymentError_Invoice: return 0;
- case LDKPaymentError_Sending: return 1;
- default: abort();
- }
-}
-jstring __attribute__((export_name("TS_LDKPaymentError_Invoice_get_invoice"))) TS_LDKPaymentError_Invoice_get_invoice(uint64_t ptr) {
- LDKPaymentError *obj = (LDKPaymentError*)untag_ptr(ptr);
- assert(obj->tag == LDKPaymentError_Invoice);
- LDKStr invoice_str = obj->invoice;
- jstring invoice_conv = str_ref_to_ts(invoice_str.chars, invoice_str.len);
- return invoice_conv;
-}
-uint32_t __attribute__((export_name("TS_LDKPaymentError_Sending_get_sending"))) TS_LDKPaymentError_Sending_get_sending(uint64_t ptr) {
- LDKPaymentError *obj = (LDKPaymentError*)untag_ptr(ptr);
- assert(obj->tag == LDKPaymentError_Sending);
- uint32_t sending_conv = LDKRetryableSendFailure_to_js(obj->sending);
- return sending_conv;
-}
-static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesPaymentErrorZ_get_ok(LDKCResult_ThirtyTwoBytesPaymentErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return ThirtyTwoBytes_clone(&*owner->contents.result);
+static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+ return ThirtyTwoBytes_clone(&owner->a);
}
-int8_tArray __attribute__((export_name("TS_CResult_ThirtyTwoBytesPaymentErrorZ_get_ok"))) TS_CResult_ThirtyTwoBytesPaymentErrorZ_get_ok(uint64_t owner) {
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesPaymentErrorZ*)untag_ptr(owner);
+int8_tArray __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(uint64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, CResult_ThirtyTwoBytesPaymentErrorZ_get_ok(owner_conv).data, 32);
+ memcpy(ret_arr->elems, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data, 32);
return ret_arr;
}
-static inline struct LDKPaymentError CResult_ThirtyTwoBytesPaymentErrorZ_get_err(LDKCResult_ThirtyTwoBytesPaymentErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return PaymentError_clone(&*owner->contents.err);
+static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+ LDKRecipientOnionFields ret = owner->b;
+ ret.is_owned = false;
+ return ret;
}
-uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesPaymentErrorZ_get_err"))) TS_CResult_ThirtyTwoBytesPaymentErrorZ_get_err(uint64_t owner) {
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesPaymentErrorZ*)untag_ptr(owner);
- LDKPaymentError *ret_copy = MALLOC(sizeof(LDKPaymentError), "LDKPaymentError");
- *ret_copy = CResult_ThirtyTwoBytesPaymentErrorZ_get_err(owner_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
+uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(uint64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+ LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline void CResult_NonePaymentErrorZ_get_ok(LDKCResult_NonePaymentErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-void __attribute__((export_name("TS_CResult_NonePaymentErrorZ_get_ok"))) TS_CResult_NonePaymentErrorZ_get_ok(uint64_t owner) {
- LDKCResult_NonePaymentErrorZ* owner_conv = (LDKCResult_NonePaymentErrorZ*)untag_ptr(owner);
- CResult_NonePaymentErrorZ_get_ok(owner_conv);
-}
-
-static inline struct LDKPaymentError CResult_NonePaymentErrorZ_get_err(LDKCResult_NonePaymentErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return PaymentError_clone(&*owner->contents.err);
+static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+ LDKRouteParameters ret = owner->c;
+ ret.is_owned = false;
+ return ret;
}
-uint64_t __attribute__((export_name("TS_CResult_NonePaymentErrorZ_get_err"))) TS_CResult_NonePaymentErrorZ_get_err(uint64_t owner) {
- LDKCResult_NonePaymentErrorZ* owner_conv = (LDKCResult_NonePaymentErrorZ*)untag_ptr(owner);
- LDKPaymentError *ret_copy = MALLOC(sizeof(LDKPaymentError), "LDKPaymentError");
- *ret_copy = CResult_NonePaymentErrorZ_get_err(owner_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
+uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(uint64_t owner) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+ LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-uint32_t __attribute__((export_name("TS_LDKProbingError_ty_from_ptr"))) TS_LDKProbingError_ty_from_ptr(uint64_t ptr) {
- LDKProbingError *obj = (LDKProbingError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKProbingError_Invoice: return 0;
- case LDKProbingError_Sending: return 1;
- default: abort();
- }
-}
-jstring __attribute__((export_name("TS_LDKProbingError_Invoice_get_invoice"))) TS_LDKProbingError_Invoice_get_invoice(uint64_t ptr) {
- LDKProbingError *obj = (LDKProbingError*)untag_ptr(ptr);
- assert(obj->tag == LDKProbingError_Invoice);
- LDKStr invoice_str = obj->invoice;
- jstring invoice_conv = str_ref_to_ts(invoice_str.chars, invoice_str.len);
- return invoice_conv;
-}
-uint64_t __attribute__((export_name("TS_LDKProbingError_Sending_get_sending"))) TS_LDKProbingError_Sending_get_sending(uint64_t ptr) {
- LDKProbingError *obj = (LDKProbingError*)untag_ptr(ptr);
- assert(obj->tag == LDKProbingError_Sending);
- uint64_t sending_ref = tag_ptr(&obj->sending, false);
- return sending_ref;
-}
-static inline struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_get_ok(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ *NONNULL_PTR owner){
+static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
- return CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ_clone(&*owner->contents.result);
+ return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result);
}
-uint64_tArray __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_get_ok"))) TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_get_ok(uint64_t owner) {
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* owner_conv = (LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ*)untag_ptr(owner);
- LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ ret_var = CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_get_ok(owner_conv);
- uint64_tArray ret_arr = NULL;
- ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
- uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8);
- for (size_t o = 0; o < ret_var.datalen; o++) {
- LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ), "LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ");
- *ret_conv_40_conv = ret_var.data[o];
- ret_arr_ptr[o] = tag_ptr(ret_conv_40_conv, true);
- }
-
- FREE(ret_var.data);
- return ret_arr;
+uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
+ *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv);
+ return tag_ptr(ret_conv, true);
}
-static inline struct LDKProbingError CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_get_err(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ *NONNULL_PTR owner){
+static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return ProbingError_clone(&*owner->contents.err);
+ return *owner->contents.err;
}
-uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_get_err"))) TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_get_err(uint64_t owner) {
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* owner_conv = (LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ*)untag_ptr(owner);
- LDKProbingError *ret_copy = MALLOC(sizeof(LDKProbingError), "LDKProbingError");
- *ret_copy = CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_get_err(owner_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+void __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(uint64_t owner) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv);
}
static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){
return ret_conv;
}
-static inline struct LDKOnionMessagePath CResult_OnionMessagePathNoneZ_get_ok(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
- LDKOnionMessagePath ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-uint64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_get_ok"))) TS_CResult_OnionMessagePathNoneZ_get_ok(uint64_t owner) {
- LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
- LDKOnionMessagePath ret_var = CResult_OnionMessagePathNoneZ_get_ok(owner_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline void CResult_OnionMessagePathNoneZ_get_err(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-void __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_get_err"))) TS_CResult_OnionMessagePathNoneZ_get_err(uint64_t owner) {
- LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
- CResult_OnionMessagePathNoneZ_get_err(owner_conv);
-}
-
-static inline struct LDKPublicKey C2Tuple_PublicKeyOnionMessageZ_get_a(LDKC2Tuple_PublicKeyOnionMessageZ *NONNULL_PTR owner){
+static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){
return owner->a;
}
-int8_tArray __attribute__((export_name("TS_C2Tuple_PublicKeyOnionMessageZ_get_a"))) TS_C2Tuple_PublicKeyOnionMessageZ_get_a(uint64_t owner) {
- LDKC2Tuple_PublicKeyOnionMessageZ* owner_conv = (LDKC2Tuple_PublicKeyOnionMessageZ*)untag_ptr(owner);
+int8_tArray __attribute__((export_name("TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a"))) TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(uint64_t owner) {
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ* owner_conv = (LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ*)untag_ptr(owner);
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, C2Tuple_PublicKeyOnionMessageZ_get_a(owner_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(owner_conv).compressed_form, 33);
return ret_arr;
}
-static inline struct LDKOnionMessage C2Tuple_PublicKeyOnionMessageZ_get_b(LDKC2Tuple_PublicKeyOnionMessageZ *NONNULL_PTR owner){
+static inline struct LDKOnionMessage C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_b(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){
LDKOnionMessage ret = owner->b;
ret.is_owned = false;
return ret;
}
-uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyOnionMessageZ_get_b"))) TS_C2Tuple_PublicKeyOnionMessageZ_get_b(uint64_t owner) {
- LDKC2Tuple_PublicKeyOnionMessageZ* owner_conv = (LDKC2Tuple_PublicKeyOnionMessageZ*)untag_ptr(owner);
- LDKOnionMessage ret_var = C2Tuple_PublicKeyOnionMessageZ_get_b(owner_conv);
+uint64_t __attribute__((export_name("TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_b"))) TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_b(uint64_t owner) {
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ* owner_conv = (LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ*)untag_ptr(owner);
+ LDKOnionMessage ret_var = C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_b(owner_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
+static inline struct LDKCOption_CVec_SocketAddressZZ C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_c(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){
+ return COption_CVec_SocketAddressZZ_clone(&owner->c);
+}
+uint64_t __attribute__((export_name("TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_c"))) TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_c(uint64_t owner) {
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ* owner_conv = (LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ*)untag_ptr(owner);
+ LDKCOption_CVec_SocketAddressZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_SocketAddressZZ), "LDKCOption_CVec_SocketAddressZZ");
+ *ret_copy = C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_c(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
uint32_t __attribute__((export_name("TS_LDKSendError_ty_from_ptr"))) TS_LDKSendError_ty_from_ptr(uint64_t ptr) {
LDKSendError *obj = (LDKSendError*)untag_ptr(ptr);
switch(obj->tag) {
case LDKSendError_TooBigPacket: return 1;
case LDKSendError_TooFewBlindedHops: return 2;
case LDKSendError_InvalidFirstHop: return 3;
- case LDKSendError_InvalidMessage: return 4;
- case LDKSendError_BufferFull: return 5;
- case LDKSendError_GetNodeIdFailed: return 6;
- case LDKSendError_BlindedPathAdvanceFailed: return 7;
+ case LDKSendError_PathNotFound: return 4;
+ case LDKSendError_InvalidMessage: return 5;
+ case LDKSendError_BufferFull: return 6;
+ case LDKSendError_GetNodeIdFailed: return 7;
+ case LDKSendError_BlindedPathAdvanceFailed: return 8;
default: abort();
}
}
uint32_t __attribute__((export_name("TS_LDKSendError_Secp256k1_get_secp256k1"))) TS_LDKSendError_Secp256k1_get_secp256k1(uint64_t ptr) {
LDKSendError *obj = (LDKSendError*)untag_ptr(ptr);
assert(obj->tag == LDKSendError_Secp256k1);
- uint32_t secp256k1_conv = LDKSecp256k1Error_to_js(obj->secp256k1);
+ uint32_t secp256k1_conv = LDKSecp256k1Error_to_js(obj->secp256k1);
return secp256k1_conv;
}
-static inline struct LDKC2Tuple_PublicKeyOnionMessageZ CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_get_ok(LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ *NONNULL_PTR owner){
+int8_tArray __attribute__((export_name("TS_LDKSendError_InvalidFirstHop_get_invalid_first_hop"))) TS_LDKSendError_InvalidFirstHop_get_invalid_first_hop(uint64_t ptr) {
+ LDKSendError *obj = (LDKSendError*)untag_ptr(ptr);
+ assert(obj->tag == LDKSendError_InvalidFirstHop);
+ int8_tArray invalid_first_hop_arr = init_int8_tArray(33, __LINE__);
+ memcpy(invalid_first_hop_arr->elems, obj->invalid_first_hop.compressed_form, 33);
+ return invalid_first_hop_arr;
+}
+static inline struct LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_ok(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
- return C2Tuple_PublicKeyOnionMessageZ_clone(&*owner->contents.result);
+ return C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone(&*owner->contents.result);
}
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_get_ok"))) TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_get_ok(uint64_t owner) {
- LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ* owner_conv = (LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ*)untag_ptr(owner);
- LDKC2Tuple_PublicKeyOnionMessageZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyOnionMessageZ), "LDKC2Tuple_PublicKeyOnionMessageZ");
- *ret_conv = CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_get_ok(owner_conv);
+uint64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_ok"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* owner_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(owner);
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ), "LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ");
+ *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_ok(owner_conv);
return tag_ptr(ret_conv, true);
}
-static inline struct LDKSendError CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_get_err(LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ *NONNULL_PTR owner){
+static inline struct LDKSendError CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return SendError_clone(&*owner->contents.err);
}
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_get_err"))) TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_get_err(uint64_t owner) {
- LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ* owner_conv = (LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ*)untag_ptr(owner);
+uint64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(uint64_t owner) {
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* owner_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(owner);
LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
- *ret_copy = CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_get_err(owner_conv);
+ *ret_copy = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(owner_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-static inline void CResult_NoneSendErrorZ_get_ok(LDKCResult_NoneSendErrorZ *NONNULL_PTR owner){
+uint32_t __attribute__((export_name("TS_LDKParsedOnionMessageContents_ty_from_ptr"))) TS_LDKParsedOnionMessageContents_ty_from_ptr(uint64_t ptr) {
+ LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKParsedOnionMessageContents_Offers: return 0;
+ case LDKParsedOnionMessageContents_Custom: return 1;
+ default: abort();
+ }
+}
+uint64_t __attribute__((export_name("TS_LDKParsedOnionMessageContents_Offers_get_offers"))) TS_LDKParsedOnionMessageContents_Offers_get_offers(uint64_t ptr) {
+ LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr);
+ assert(obj->tag == LDKParsedOnionMessageContents_Offers);
+ uint64_t offers_ref = tag_ptr(&obj->offers, false);
+ return offers_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKParsedOnionMessageContents_Custom_get_custom"))) TS_LDKParsedOnionMessageContents_Custom_get_custom(uint64_t ptr) {
+ LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr);
+ assert(obj->tag == LDKParsedOnionMessageContents_Custom);
+ LDKOnionMessageContents* custom_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *custom_ret = OnionMessageContents_clone(&obj->custom);
+ return tag_ptr(custom_ret, true);
+}
+uint32_t __attribute__((export_name("TS_LDKPeeledOnion_ty_from_ptr"))) TS_LDKPeeledOnion_ty_from_ptr(uint64_t ptr) {
+ LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKPeeledOnion_Forward: return 0;
+ case LDKPeeledOnion_Receive: return 1;
+ default: abort();
+ }
+}
+int8_tArray __attribute__((export_name("TS_LDKPeeledOnion_Forward_get__0"))) TS_LDKPeeledOnion_Forward_get__0(uint64_t ptr) {
+ LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
+ assert(obj->tag == LDKPeeledOnion_Forward);
+ int8_tArray _0_arr = init_int8_tArray(33, __LINE__);
+ memcpy(_0_arr->elems, obj->forward._0.compressed_form, 33);
+ return _0_arr;
+}
+uint64_t __attribute__((export_name("TS_LDKPeeledOnion_Forward_get__1"))) TS_LDKPeeledOnion_Forward_get__1(uint64_t ptr) {
+ LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
+ assert(obj->tag == LDKPeeledOnion_Forward);
+ LDKOnionMessage _1_var = obj->forward._1;
+ uint64_t _1_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_1_var);
+ _1_ref = tag_ptr(_1_var.inner, false);
+ return _1_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKPeeledOnion_Receive_get__0"))) TS_LDKPeeledOnion_Receive_get__0(uint64_t ptr) {
+ LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
+ assert(obj->tag == LDKPeeledOnion_Receive);
+ uint64_t _0_ref = tag_ptr(&obj->receive._0, false);
+ return _0_ref;
+}
+int8_tArray __attribute__((export_name("TS_LDKPeeledOnion_Receive_get__1"))) TS_LDKPeeledOnion_Receive_get__1(uint64_t ptr) {
+ LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
+ assert(obj->tag == LDKPeeledOnion_Receive);
+ int8_tArray _1_arr = init_int8_tArray(32, __LINE__);
+ memcpy(_1_arr->elems, obj->receive._1.data, 32);
+ return _1_arr;
+}
+uint64_t __attribute__((export_name("TS_LDKPeeledOnion_Receive_get__2"))) TS_LDKPeeledOnion_Receive_get__2(uint64_t ptr) {
+ LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
+ assert(obj->tag == LDKPeeledOnion_Receive);
+ LDKBlindedPath _2_var = obj->receive._2;
+ uint64_t _2_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_2_var);
+ _2_ref = tag_ptr(_2_var.inner, false);
+ return _2_ref;
+}
+static inline struct LDKPeeledOnion CResult_PeeledOnionNoneZ_get_ok(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
- return *owner->contents.result;
+ return PeeledOnion_clone(&*owner->contents.result);
}
-void __attribute__((export_name("TS_CResult_NoneSendErrorZ_get_ok"))) TS_CResult_NoneSendErrorZ_get_ok(uint64_t owner) {
- LDKCResult_NoneSendErrorZ* owner_conv = (LDKCResult_NoneSendErrorZ*)untag_ptr(owner);
- CResult_NoneSendErrorZ_get_ok(owner_conv);
+uint64_t __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_get_ok"))) TS_CResult_PeeledOnionNoneZ_get_ok(uint64_t owner) {
+ LDKCResult_PeeledOnionNoneZ* owner_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(owner);
+ LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion");
+ *ret_copy = CResult_PeeledOnionNoneZ_get_ok(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline void CResult_PeeledOnionNoneZ_get_err(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_get_err"))) TS_CResult_PeeledOnionNoneZ_get_err(uint64_t owner) {
+ LDKCResult_PeeledOnionNoneZ* owner_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(owner);
+ CResult_PeeledOnionNoneZ_get_err(owner_conv);
+}
+
+uint32_t __attribute__((export_name("TS_LDKSendSuccess_ty_from_ptr"))) TS_LDKSendSuccess_ty_from_ptr(uint64_t ptr) {
+ LDKSendSuccess *obj = (LDKSendSuccess*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKSendSuccess_Buffered: return 0;
+ case LDKSendSuccess_BufferedAwaitingConnection: return 1;
+ default: abort();
+ }
+}
+int8_tArray __attribute__((export_name("TS_LDKSendSuccess_BufferedAwaitingConnection_get_buffered_awaiting_connection"))) TS_LDKSendSuccess_BufferedAwaitingConnection_get_buffered_awaiting_connection(uint64_t ptr) {
+ LDKSendSuccess *obj = (LDKSendSuccess*)untag_ptr(ptr);
+ assert(obj->tag == LDKSendSuccess_BufferedAwaitingConnection);
+ int8_tArray buffered_awaiting_connection_arr = init_int8_tArray(33, __LINE__);
+ memcpy(buffered_awaiting_connection_arr->elems, obj->buffered_awaiting_connection.compressed_form, 33);
+ return buffered_awaiting_connection_arr;
+}
+static inline struct LDKSendSuccess CResult_SendSuccessSendErrorZ_get_ok(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return SendSuccess_clone(&*owner->contents.result);
+}
+uint64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_get_ok"))) TS_CResult_SendSuccessSendErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_SendSuccessSendErrorZ* owner_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(owner);
+ LDKSendSuccess *ret_copy = MALLOC(sizeof(LDKSendSuccess), "LDKSendSuccess");
+ *ret_copy = CResult_SendSuccessSendErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-static inline struct LDKSendError CResult_NoneSendErrorZ_get_err(LDKCResult_NoneSendErrorZ *NONNULL_PTR owner){
+static inline struct LDKSendError CResult_SendSuccessSendErrorZ_get_err(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return SendError_clone(&*owner->contents.err);
}
-uint64_t __attribute__((export_name("TS_CResult_NoneSendErrorZ_get_err"))) TS_CResult_NoneSendErrorZ_get_err(uint64_t owner) {
- LDKCResult_NoneSendErrorZ* owner_conv = (LDKCResult_NoneSendErrorZ*)untag_ptr(owner);
+uint64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_get_err"))) TS_CResult_SendSuccessSendErrorZ_get_err(uint64_t owner) {
+ LDKCResult_SendSuccessSendErrorZ* owner_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(owner);
LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
- *ret_copy = CResult_NoneSendErrorZ_get_err(owner_conv);
+ *ret_copy = CResult_SendSuccessSendErrorZ_get_err(owner_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_get_err(owner_conv);
}
+static inline LDKCVec_ForwardNodeZ CVec_ForwardNodeZ_clone(const LDKCVec_ForwardNodeZ *orig) {
+ LDKCVec_ForwardNodeZ ret = { .data = MALLOC(sizeof(LDKForwardNode) * orig->datalen, "LDKCVec_ForwardNodeZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = ForwardNode_clone(&orig->data[i]);
+ }
+ return ret;
+}
static inline struct LDKBlindedPath CResult_BlindedPathDecodeErrorZ_get_ok(LDKCResult_BlindedPathDecodeErrorZ *NONNULL_PTR owner){
LDKBlindedPath ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
+static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+ LDKDelayedPaymentBasepoint ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+ LDKDelayedPaymentKey ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+ LDKHtlcBasepoint ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_ok"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_get_err"))) TS_CResult_HtlcBasepointDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+ LDKHtlcKey ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_ok"))) TS_CResult_HtlcKeyDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_get_err"))) TS_CResult_HtlcKeyDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+ LDKRevocationBasepoint ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_ok"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_get_err"))) TS_CResult_RevocationBasepointDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+ LDKRevocationKey ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_ok"))) TS_CResult_RevocationKeyDecodeErrorZ_get_ok(uint64_t owner) {
+ LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_get_err"))) TS_CResult_RevocationKeyDecodeErrorZ_get_err(uint64_t owner) {
+ LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
typedef struct LDKFilter_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
LDKu8slice script_pubkey_var = script_pubkey;
int8_tArray script_pubkey_arr = init_int8_tArray(script_pubkey_var.datalen, __LINE__);
memcpy(script_pubkey_arr->elems, script_pubkey_var.data, script_pubkey_var.datalen);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 43, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 47, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
}
void register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
uint64_t output_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(output_var);
output_ref = tag_ptr(output_var.inner, output_var.is_owned);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 44, output_ref, 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 48, output_ref, 0, 0, 0, 0, 0);
}
static void LDKFilter_JCalls_cloned(LDKFilter* new_obj) {
LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) new_obj->this_arg;
uint64_t __attribute__((export_name("TS_LDKCOption_FilterZ_Some_get_some"))) TS_LDKCOption_FilterZ_Some_get_some(uint64_t ptr) {
LDKCOption_FilterZ *obj = (LDKCOption_FilterZ*)untag_ptr(ptr);
assert(obj->tag == LDKCOption_FilterZ_Some);
- LDKFilter* some_ret = MALLOC(sizeof(LDKFilter), "LDKFilter");
- *some_ret = obj->some;
+ LDKFilter* some_ret = MALLOC(sizeof(LDKFilter), "LDKFilter");
+ *some_ret = obj->some;
// WARNING: We likely need to clone here, but no clone is available, so we just do it for Java instances
if ((*some_ret).free == LDKFilter_JCalls_free) {
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKStr key_str = key;
jstring key_conv = str_ref_to_ts(key_str.chars, key_str.len);
Str_free(key_str);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, primary_namespace_conv, secondary_namespace_conv, key_conv, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, primary_namespace_conv, secondary_namespace_conv, key_conv, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_u8ZIOErrorZ ret_conv = *(LDKCResult_CVec_u8ZIOErrorZ*)(ret_ptr);
LDKu8slice buf_var = buf;
int8_tArray buf_arr = init_int8_tArray(buf_var.datalen, __LINE__);
memcpy(buf_arr->elems, buf_var.data, buf_var.datalen);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 46, primary_namespace_conv, secondary_namespace_conv, key_conv, (uint32_t)buf_arr, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, primary_namespace_conv, secondary_namespace_conv, key_conv, (uint32_t)buf_arr, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
jstring key_conv = str_ref_to_ts(key_str.chars, key_str.len);
Str_free(key_str);
jboolean lazy_conv = lazy;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 47, primary_namespace_conv, secondary_namespace_conv, key_conv, lazy_conv, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, primary_namespace_conv, secondary_namespace_conv, key_conv, lazy_conv, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
LDKStr secondary_namespace_str = secondary_namespace;
jstring secondary_namespace_conv = str_ref_to_ts(secondary_namespace_str.chars, secondary_namespace_str.len);
Str_free(secondary_namespace_str);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 48, primary_namespace_conv, secondary_namespace_conv, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, primary_namespace_conv, secondary_namespace_conv, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_StrZIOErrorZ ret_conv = *(LDKCResult_CVec_StrZIOErrorZ*)(ret_ptr);
return tag_ptr(ret_conv, true);
}
+uint32_t __attribute__((export_name("TS_LDKCandidateRouteHop_ty_from_ptr"))) TS_LDKCandidateRouteHop_ty_from_ptr(uint64_t ptr) {
+ LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCandidateRouteHop_FirstHop: return 0;
+ case LDKCandidateRouteHop_PublicHop: return 1;
+ case LDKCandidateRouteHop_PrivateHop: return 2;
+ case LDKCandidateRouteHop_Blinded: return 3;
+ case LDKCandidateRouteHop_OneHopBlinded: return 4;
+ default: abort();
+ }
+}
+uint64_t __attribute__((export_name("TS_LDKCandidateRouteHop_FirstHop_get_first_hop"))) TS_LDKCandidateRouteHop_FirstHop_get_first_hop(uint64_t ptr) {
+ LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr);
+ assert(obj->tag == LDKCandidateRouteHop_FirstHop);
+ LDKFirstHopCandidate first_hop_var = obj->first_hop;
+ uint64_t first_hop_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(first_hop_var);
+ first_hop_ref = tag_ptr(first_hop_var.inner, false);
+ return first_hop_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKCandidateRouteHop_PublicHop_get_public_hop"))) TS_LDKCandidateRouteHop_PublicHop_get_public_hop(uint64_t ptr) {
+ LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr);
+ assert(obj->tag == LDKCandidateRouteHop_PublicHop);
+ LDKPublicHopCandidate public_hop_var = obj->public_hop;
+ uint64_t public_hop_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(public_hop_var);
+ public_hop_ref = tag_ptr(public_hop_var.inner, false);
+ return public_hop_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKCandidateRouteHop_PrivateHop_get_private_hop"))) TS_LDKCandidateRouteHop_PrivateHop_get_private_hop(uint64_t ptr) {
+ LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr);
+ assert(obj->tag == LDKCandidateRouteHop_PrivateHop);
+ LDKPrivateHopCandidate private_hop_var = obj->private_hop;
+ uint64_t private_hop_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(private_hop_var);
+ private_hop_ref = tag_ptr(private_hop_var.inner, false);
+ return private_hop_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKCandidateRouteHop_Blinded_get_blinded"))) TS_LDKCandidateRouteHop_Blinded_get_blinded(uint64_t ptr) {
+ LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr);
+ assert(obj->tag == LDKCandidateRouteHop_Blinded);
+ LDKBlindedPathCandidate blinded_var = obj->blinded;
+ uint64_t blinded_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_var);
+ blinded_ref = tag_ptr(blinded_var.inner, false);
+ return blinded_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKCandidateRouteHop_OneHopBlinded_get_one_hop_blinded"))) TS_LDKCandidateRouteHop_OneHopBlinded_get_one_hop_blinded(uint64_t ptr) {
+ LDKCandidateRouteHop *obj = (LDKCandidateRouteHop*)untag_ptr(ptr);
+ assert(obj->tag == LDKCandidateRouteHop_OneHopBlinded);
+ LDKOneHopBlindedPathCandidate one_hop_blinded_var = obj->one_hop_blinded;
+ uint64_t one_hop_blinded_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(one_hop_blinded_var);
+ one_hop_blinded_ref = tag_ptr(one_hop_blinded_var.inner, false);
+ return one_hop_blinded_ref;
+}
typedef struct LDKScoreLookUp_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
FREE(j_calls);
}
}
-uint64_t channel_penalty_msat_LDKScoreLookUp_jcall(const void* this_arg, uint64_t short_channel_id, const LDKNodeId * source, const LDKNodeId * target, LDKChannelUsage usage, const LDKProbabilisticScoringFeeParameters * score_params) {
+uint64_t channel_penalty_msat_LDKScoreLookUp_jcall(const void* this_arg, const LDKCandidateRouteHop * candidate, LDKChannelUsage usage, const LDKProbabilisticScoringFeeParameters * score_params) {
LDKScoreLookUp_JCalls *j_calls = (LDKScoreLookUp_JCalls*) this_arg;
- int64_t short_channel_id_conv = short_channel_id;
- LDKNodeId source_var = *source;
- uint64_t source_ref = 0;
- source_var = NodeId_clone(&source_var);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(source_var);
- source_ref = tag_ptr(source_var.inner, source_var.is_owned);
- LDKNodeId target_var = *target;
- uint64_t target_ref = 0;
- target_var = NodeId_clone(&target_var);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(target_var);
- target_ref = tag_ptr(target_var.inner, target_var.is_owned);
+ LDKCandidateRouteHop *ret_candidate = MALLOC(sizeof(LDKCandidateRouteHop), "LDKCandidateRouteHop ret conversion");
+ *ret_candidate = CandidateRouteHop_clone(candidate);
+ uint64_t ref_candidate = tag_ptr(ret_candidate, true);
LDKChannelUsage usage_var = usage;
uint64_t usage_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(usage_var);
score_params_var = ProbabilisticScoringFeeParameters_clone(&score_params_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(score_params_var);
score_params_ref = tag_ptr(score_params_var.inner, score_params_var.is_owned);
- return js_invoke_function_bbbbbu(j_calls->instance_ptr, 49, short_channel_id_conv, source_ref, target_ref, usage_ref, score_params_ref, 0);
+ return js_invoke_function_bbbuuu(j_calls->instance_ptr, 53, ref_candidate, usage_ref, score_params_ref, 0, 0, 0);
}
static void LDKScoreLookUp_JCalls_cloned(LDKScoreLookUp* new_obj) {
LDKScoreLookUp_JCalls *j_calls = (LDKScoreLookUp_JCalls*) new_obj->this_arg;
*res_ptr = LDKScoreLookUp_init(o);
return tag_ptr(res_ptr, true);
}
-int64_t __attribute__((export_name("TS_ScoreLookUp_channel_penalty_msat"))) TS_ScoreLookUp_channel_penalty_msat(uint64_t this_arg, int64_t short_channel_id, uint64_t source, uint64_t target, uint64_t usage, uint64_t score_params) {
+int64_t __attribute__((export_name("TS_ScoreLookUp_channel_penalty_msat"))) TS_ScoreLookUp_channel_penalty_msat(uint64_t this_arg, uint64_t candidate, uint64_t usage, uint64_t score_params) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKScoreLookUp* this_arg_conv = (LDKScoreLookUp*)this_arg_ptr;
- LDKNodeId source_conv;
- source_conv.inner = untag_ptr(source);
- source_conv.is_owned = ptr_is_owned(source);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(source_conv);
- source_conv.is_owned = false;
- LDKNodeId target_conv;
- target_conv.inner = untag_ptr(target);
- target_conv.is_owned = ptr_is_owned(target);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(target_conv);
- target_conv.is_owned = false;
+ LDKCandidateRouteHop* candidate_conv = (LDKCandidateRouteHop*)untag_ptr(candidate);
LDKChannelUsage usage_conv;
usage_conv.inner = untag_ptr(usage);
usage_conv.is_owned = ptr_is_owned(usage);
score_params_conv.is_owned = ptr_is_owned(score_params);
CHECK_INNER_FIELD_ACCESS_OR_NULL(score_params_conv);
score_params_conv.is_owned = false;
- int64_t ret_conv = (this_arg_conv->channel_penalty_msat)(this_arg_conv->this_arg, short_channel_id, &source_conv, &target_conv, usage_conv, &score_params_conv);
+ int64_t ret_conv = (this_arg_conv->channel_penalty_msat)(this_arg_conv->this_arg, candidate_conv, usage_conv, &score_params_conv);
return ret_conv;
}
FREE(j_calls);
}
}
-void payment_path_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t short_channel_id) {
+void payment_path_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t short_channel_id, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
LDKPath path_var = *path;
uint64_t path_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_bbuuuu(j_calls->instance_ptr, 50, path_ref, short_channel_id_conv, 0, 0, 0, 0);
+ int64_t duration_since_epoch_conv = duration_since_epoch;
+ js_invoke_function_bbbuuu(j_calls->instance_ptr, 54, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0);
}
-void payment_path_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path) {
+void payment_path_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
LDKPath path_var = *path;
uint64_t path_ref = 0;
path_var = Path_clone(&path_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 51, path_ref, 0, 0, 0, 0, 0);
+ int64_t duration_since_epoch_conv = duration_since_epoch;
+ js_invoke_function_bbuuuu(j_calls->instance_ptr, 55, path_ref, duration_since_epoch_conv, 0, 0, 0, 0);
}
-void probe_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t short_channel_id) {
+void probe_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t short_channel_id, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
LDKPath path_var = *path;
uint64_t path_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t short_channel_id_conv = short_channel_id;
- js_invoke_function_bbuuuu(j_calls->instance_ptr, 52, path_ref, short_channel_id_conv, 0, 0, 0, 0);
+ int64_t duration_since_epoch_conv = duration_since_epoch;
+ js_invoke_function_bbbuuu(j_calls->instance_ptr, 56, path_ref, short_channel_id_conv, duration_since_epoch_conv, 0, 0, 0);
}
-void probe_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path) {
+void probe_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
LDKPath path_var = *path;
uint64_t path_ref = 0;
path_var = Path_clone(&path_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 53, path_ref, 0, 0, 0, 0, 0);
+ int64_t duration_since_epoch_conv = duration_since_epoch;
+ js_invoke_function_bbuuuu(j_calls->instance_ptr, 57, path_ref, duration_since_epoch_conv, 0, 0, 0, 0);
+}
+void time_passed_LDKScoreUpdate_jcall(void* this_arg, uint64_t duration_since_epoch) {
+ LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
+ int64_t duration_since_epoch_conv = duration_since_epoch;
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 58, duration_since_epoch_conv, 0, 0, 0, 0, 0);
}
static void LDKScoreUpdate_JCalls_cloned(LDKScoreUpdate* new_obj) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) new_obj->this_arg;
.payment_path_successful = payment_path_successful_LDKScoreUpdate_jcall,
.probe_failed = probe_failed_LDKScoreUpdate_jcall,
.probe_successful = probe_successful_LDKScoreUpdate_jcall,
+ .time_passed = time_passed_LDKScoreUpdate_jcall,
.free = LDKScoreUpdate_JCalls_free,
};
return ret;
*res_ptr = LDKScoreUpdate_init(o);
return tag_ptr(res_ptr, true);
}
-void __attribute__((export_name("TS_ScoreUpdate_payment_path_failed"))) TS_ScoreUpdate_payment_path_failed(uint64_t this_arg, uint64_t path, int64_t short_channel_id) {
+void __attribute__((export_name("TS_ScoreUpdate_payment_path_failed"))) TS_ScoreUpdate_payment_path_failed(uint64_t this_arg, uint64_t path, int64_t short_channel_id, int64_t duration_since_epoch) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKScoreUpdate* this_arg_conv = (LDKScoreUpdate*)this_arg_ptr;
path_conv.is_owned = ptr_is_owned(path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
path_conv.is_owned = false;
- (this_arg_conv->payment_path_failed)(this_arg_conv->this_arg, &path_conv, short_channel_id);
+ (this_arg_conv->payment_path_failed)(this_arg_conv->this_arg, &path_conv, short_channel_id, duration_since_epoch);
}
-void __attribute__((export_name("TS_ScoreUpdate_payment_path_successful"))) TS_ScoreUpdate_payment_path_successful(uint64_t this_arg, uint64_t path) {
+void __attribute__((export_name("TS_ScoreUpdate_payment_path_successful"))) TS_ScoreUpdate_payment_path_successful(uint64_t this_arg, uint64_t path, int64_t duration_since_epoch) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKScoreUpdate* this_arg_conv = (LDKScoreUpdate*)this_arg_ptr;
path_conv.is_owned = ptr_is_owned(path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
path_conv.is_owned = false;
- (this_arg_conv->payment_path_successful)(this_arg_conv->this_arg, &path_conv);
+ (this_arg_conv->payment_path_successful)(this_arg_conv->this_arg, &path_conv, duration_since_epoch);
}
-void __attribute__((export_name("TS_ScoreUpdate_probe_failed"))) TS_ScoreUpdate_probe_failed(uint64_t this_arg, uint64_t path, int64_t short_channel_id) {
+void __attribute__((export_name("TS_ScoreUpdate_probe_failed"))) TS_ScoreUpdate_probe_failed(uint64_t this_arg, uint64_t path, int64_t short_channel_id, int64_t duration_since_epoch) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKScoreUpdate* this_arg_conv = (LDKScoreUpdate*)this_arg_ptr;
path_conv.is_owned = ptr_is_owned(path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
path_conv.is_owned = false;
- (this_arg_conv->probe_failed)(this_arg_conv->this_arg, &path_conv, short_channel_id);
+ (this_arg_conv->probe_failed)(this_arg_conv->this_arg, &path_conv, short_channel_id, duration_since_epoch);
}
-void __attribute__((export_name("TS_ScoreUpdate_probe_successful"))) TS_ScoreUpdate_probe_successful(uint64_t this_arg, uint64_t path) {
+void __attribute__((export_name("TS_ScoreUpdate_probe_successful"))) TS_ScoreUpdate_probe_successful(uint64_t this_arg, uint64_t path, int64_t duration_since_epoch) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKScoreUpdate* this_arg_conv = (LDKScoreUpdate*)this_arg_ptr;
path_conv.is_owned = ptr_is_owned(path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
path_conv.is_owned = false;
- (this_arg_conv->probe_successful)(this_arg_conv->this_arg, &path_conv);
+ (this_arg_conv->probe_successful)(this_arg_conv->this_arg, &path_conv, duration_since_epoch);
+}
+
+void __attribute__((export_name("TS_ScoreUpdate_time_passed"))) TS_ScoreUpdate_time_passed(uint64_t this_arg, int64_t duration_since_epoch) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKScoreUpdate* this_arg_conv = (LDKScoreUpdate*)this_arg_ptr;
+ (this_arg_conv->time_passed)(this_arg_conv->this_arg, duration_since_epoch);
}
typedef struct LDKLockableScore_JCalls {
}
LDKScoreLookUp read_lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 59, 0, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKScoreLookUp ret_conv = *(LDKScoreLookUp*)(ret_ptr);
}
LDKScoreUpdate write_lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 60, 0, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKScoreUpdate ret_conv = *(LDKScoreUpdate*)(ret_ptr);
}
LDKCVec_u8Z write_LDKWriteableScore_jcall(const void* this_arg) {
LDKWriteableScore_JCalls *j_calls = (LDKWriteableScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
// WARNING: we may need a move here but no clone is available for LDKChannelManager
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var);
channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 57, channel_manager_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 62, channel_manager_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
// WARNING: we may need a move here but no clone is available for LDKNetworkGraph
CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var);
network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 58, network_graph_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 63, network_graph_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg;
// WARNING: This object doesn't live past this scope, needs clone!
uint64_t ret_scorer = tag_ptr(scorer, false);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 59, ret_scorer, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 64, ret_scorer, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
uint64_t update_id_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
- uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 60, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
+ uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 65, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
uint64_t update_id_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
- uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 61, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
+ uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 66, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
return ret_conv;
}
}
void call_LDKFutureCallback_jcall(const void* this_arg) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 62, 0, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 67, 0, 0, 0, 0, 0, 0);
}
static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 63, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 68, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
}
void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__);
memcpy(block_arr->elems, block_var.data, block_var.datalen);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 64, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 69, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
}
void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 65, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 70, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
}
static void LDKListen_JCalls_cloned(LDKListen* new_obj) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 66, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 71, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
}
void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray txid_arr = init_int8_tArray(32, __LINE__);
memcpy(txid_arr->elems, *txid, 32);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 67, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 72, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
}
void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 68, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 73, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
}
-LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
+LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 69, 0, 0, 0, 0, 0, 0);
- LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ ret_constr;
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 74, 0, 0, 0, 0, 0, 0);
+ LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
- ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ), "LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ Elements");
+ ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ), "LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ Elements");
else
ret_constr.data = NULL;
uint64_t* ret_vals = ret->elems;
- for (size_t x = 0; x < ret_constr.datalen; x++) {
- uint64_t ret_conv_49 = ret_vals[x];
- void* ret_conv_49_ptr = untag_ptr(ret_conv_49);
- CHECK_ACCESS(ret_conv_49_ptr);
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ ret_conv_49_conv = *(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ*)(ret_conv_49_ptr);
- FREE(untag_ptr(ret_conv_49));
- ret_constr.data[x] = ret_conv_49_conv;
+ for (size_t c = 0; c < ret_constr.datalen; c++) {
+ uint64_t ret_conv_54 = ret_vals[c];
+ void* ret_conv_54_ptr = untag_ptr(ret_conv_54);
+ CHECK_ACCESS(ret_conv_54_ptr);
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ ret_conv_54_conv = *(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ*)(ret_conv_54_ptr);
+ FREE(untag_ptr(ret_conv_54));
+ ret_constr.data[c] = ret_conv_54_conv;
}
FREE(ret);
return ret_constr;
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKConfirm* this_arg_conv = (LDKConfirm*)this_arg_ptr;
- LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ ret_var = (this_arg_conv->get_relevant_txids)(this_arg_conv->this_arg);
+ LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret_var = (this_arg_conv->get_relevant_txids)(this_arg_conv->this_arg);
uint64_tArray ret_arr = NULL;
ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ* ret_conv_49_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ), "LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ");
- *ret_conv_49_conv = ret_var.data[x];
- ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true);
+ for (size_t c = 0; c < ret_var.datalen; c++) {
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* ret_conv_54_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ), "LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ");
+ *ret_conv_54_conv = ret_var.data[c];
+ ret_arr_ptr[c] = tag_ptr(ret_conv_54_conv, true);
}
FREE(ret_var.data);
LDKEvent *event_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
*event_copy = event;
uint64_t event_ref = tag_ptr(event_copy, true);
- js_invoke_function_buuuuu(j_calls->instance_ptr, 70, event_ref, 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 75, event_ref, 0, 0, 0, 0, 0);
}
static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) {
LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg;
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler");
*handler_ret = handler;
- js_invoke_function_buuuuu(j_calls->instance_ptr, 71, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
+ js_invoke_function_buuuuu(j_calls->instance_ptr, 76, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
}
static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) {
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg;
uint64_t __attribute__((export_name("TS_LDKFailureCode_InvalidOnionPayload_get_invalid_onion_payload"))) TS_LDKFailureCode_InvalidOnionPayload_get_invalid_onion_payload(uint64_t ptr) {
LDKFailureCode *obj = (LDKFailureCode*)untag_ptr(ptr);
assert(obj->tag == LDKFailureCode_InvalidOnionPayload);
- uint64_t invalid_onion_payload_ref = tag_ptr(&obj->invalid_onion_payload, false);
+ uint64_t invalid_onion_payload_ref = tag_ptr(&obj->invalid_onion_payload, false);
return invalid_onion_payload_ref;
}
typedef struct LDKMessageSendEventsProvider_JCalls {
}
LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) {
LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 72, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 77, 0, 0, 0, 0, 0, 0);
LDKCVec_MessageSendEventZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
msg_var = OpenChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKOpenChannelV2 * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = OpenChannelV2_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannel * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AcceptChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 75, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannelV2 * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AcceptChannelV2_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 76, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingCreated_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 77, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelReady_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = Shutdown_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ClosingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 86, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+}
+void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKStfu * msg) {
+ LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
+ LDKStfu msg_var = *msg;
+ uint64_t msg_ref = 0;
+ msg_var = Stfu_clone(&msg_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
+ msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+}
+void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) {
+ LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
+ LDKSplice msg_var = *msg;
+ uint64_t msg_ref = 0;
+ msg_var = Splice_clone(&msg_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
+ msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+}
+void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) {
+ LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
+ LDKSpliceAck msg_var = *msg;
+ uint64_t msg_ref = 0;
+ msg_var = SpliceAck_clone(&msg_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
+ msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+}
+void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) {
+ LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
+ LDKSpliceLocked msg_var = *msg;
+ uint64_t msg_ref = 0;
+ msg_var = SpliceLocked_clone(&msg_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
+ msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 90, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAddInput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_tx_add_output_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddOutput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAddOutput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 92, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_tx_remove_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxRemoveInput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxRemoveInput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 84, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_tx_remove_output_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxRemoveOutput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxRemoveOutput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_tx_complete_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxComplete * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxComplete_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 86, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_tx_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxSignatures_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 96, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_tx_init_rbf_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxInitRbf * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxInitRbf_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 97, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_tx_ack_rbf_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAckRbf * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAckRbf_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 98, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_tx_abort_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAbort * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAbort_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 90, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 99, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateAddHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 100, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFulfillHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 92, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 101, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 102, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailMalformedHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 103, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = CommitmentSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 104, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = RevokeAndACK_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 96, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 105, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFee_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 97, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 106, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AnnouncementSignatures_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 98, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 107, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void peer_disconnected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 99, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 108, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
}
LDKCResult_NoneNoneZ peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg, bool inbound) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 100, (uint32_t)their_node_id_arr, msg_ref, inbound_conv, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 109, (uint32_t)their_node_id_arr, msg_ref, inbound_conv, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
msg_var = ChannelReestablish_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 101, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 110, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 102, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 111, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ErrorMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 103, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 112, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
}
LDKNodeFeatures provided_node_features_LDKChannelMessageHandler_jcall(const void* this_arg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 104, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 113, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 105, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 114, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
return ret_conv;
}
-LDKCOption_CVec_ThirtyTwoBytesZZ get_genesis_hashes_LDKChannelMessageHandler_jcall(const void* this_arg) {
+LDKCOption_CVec_ThirtyTwoBytesZZ get_chain_hashes_LDKChannelMessageHandler_jcall(const void* this_arg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 106, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 115, 0, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_CVec_ThirtyTwoBytesZZ ret_conv = *(LDKCOption_CVec_ThirtyTwoBytesZZ*)(ret_ptr);
.handle_channel_ready = handle_channel_ready_LDKChannelMessageHandler_jcall,
.handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall,
.handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall,
+ .handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall,
+ .handle_splice = handle_splice_LDKChannelMessageHandler_jcall,
+ .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall,
+ .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall,
.handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall,
.handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall,
.handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall,
.handle_error = handle_error_LDKChannelMessageHandler_jcall,
.provided_node_features = provided_node_features_LDKChannelMessageHandler_jcall,
.provided_init_features = provided_init_features_LDKChannelMessageHandler_jcall,
- .get_genesis_hashes = get_genesis_hashes_LDKChannelMessageHandler_jcall,
+ .get_chain_hashes = get_chain_hashes_LDKChannelMessageHandler_jcall,
.free = LDKChannelMessageHandler_JCalls_free,
.MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
};
(this_arg_conv->handle_closing_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
}
+void __attribute__((export_name("TS_ChannelMessageHandler_handle_stfu"))) TS_ChannelMessageHandler_handle_stfu(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
+ LDKStfu msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv.is_owned = false;
+ (this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void __attribute__((export_name("TS_ChannelMessageHandler_handle_splice"))) TS_ChannelMessageHandler_handle_splice(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
+ LDKSplice msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv.is_owned = false;
+ (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void __attribute__((export_name("TS_ChannelMessageHandler_handle_splice_ack"))) TS_ChannelMessageHandler_handle_splice_ack(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
+ LDKSpliceAck msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv.is_owned = false;
+ (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void __attribute__((export_name("TS_ChannelMessageHandler_handle_splice_locked"))) TS_ChannelMessageHandler_handle_splice_locked(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
+ LDKSpliceLocked msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv.is_owned = false;
+ (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
void __attribute__((export_name("TS_ChannelMessageHandler_handle_tx_add_input"))) TS_ChannelMessageHandler_handle_tx_add_input(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ChannelMessageHandler_get_genesis_hashes"))) TS_ChannelMessageHandler_get_genesis_hashes(uint64_t this_arg) {
+uint64_t __attribute__((export_name("TS_ChannelMessageHandler_get_chain_hashes"))) TS_ChannelMessageHandler_get_chain_hashes(uint64_t this_arg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
LDKCOption_CVec_ThirtyTwoBytesZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_ThirtyTwoBytesZZ), "LDKCOption_CVec_ThirtyTwoBytesZZ");
- *ret_copy = (this_arg_conv->get_genesis_hashes)(this_arg_conv->this_arg);
+ *ret_copy = (this_arg_conv->get_chain_hashes)(this_arg_conv->this_arg);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
+typedef struct LDKOffersMessageHandler_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKOffersMessageHandler_JCalls;
+static void LDKOffersMessageHandler_JCalls_free(void* this_arg) {
+ LDKOffersMessageHandler_JCalls *j_calls = (LDKOffersMessageHandler_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKCOption_OffersMessageZ handle_message_LDKOffersMessageHandler_jcall(const void* this_arg, LDKOffersMessage message) {
+ LDKOffersMessageHandler_JCalls *j_calls = (LDKOffersMessageHandler_JCalls*) this_arg;
+ LDKOffersMessage *message_copy = MALLOC(sizeof(LDKOffersMessage), "LDKOffersMessage");
+ *message_copy = message;
+ uint64_t message_ref = tag_ptr(message_copy, true);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 116, message_ref, 0, 0, 0, 0, 0);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCOption_OffersMessageZ ret_conv = *(LDKCOption_OffersMessageZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ release_pending_messages_LDKOffersMessageHandler_jcall(const void* this_arg) {
+ LDKOffersMessageHandler_JCalls *j_calls = (LDKOffersMessageHandler_JCalls*) this_arg;
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 117, 0, 0, 0, 0, 0, 0);
+ LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ ret_constr;
+ ret_constr.datalen = ret->arr_len;
+ if (ret_constr.datalen > 0)
+ ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OffersMessageDestinationBlindedPathZ), "LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ Elements");
+ else
+ ret_constr.data = NULL;
+ uint64_t* ret_vals = ret->elems;
+ for (size_t x = 0; x < ret_constr.datalen; x++) {
+ uint64_t ret_conv_49 = ret_vals[x];
+ void* ret_conv_49_ptr = untag_ptr(ret_conv_49);
+ CHECK_ACCESS(ret_conv_49_ptr);
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ ret_conv_49_conv = *(LDKC3Tuple_OffersMessageDestinationBlindedPathZ*)(ret_conv_49_ptr);
+ FREE(untag_ptr(ret_conv_49));
+ ret_constr.data[x] = ret_conv_49_conv;
+ }
+ FREE(ret);
+ return ret_constr;
+}
+static void LDKOffersMessageHandler_JCalls_cloned(LDKOffersMessageHandler* new_obj) {
+ LDKOffersMessageHandler_JCalls *j_calls = (LDKOffersMessageHandler_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKOffersMessageHandler LDKOffersMessageHandler_init (JSValue o) {
+ LDKOffersMessageHandler_JCalls *calls = MALLOC(sizeof(LDKOffersMessageHandler_JCalls), "LDKOffersMessageHandler_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKOffersMessageHandler ret = {
+ .this_arg = (void*) calls,
+ .handle_message = handle_message_LDKOffersMessageHandler_jcall,
+ .release_pending_messages = release_pending_messages_LDKOffersMessageHandler_jcall,
+ .free = LDKOffersMessageHandler_JCalls_free,
+ };
+ return ret;
+}
+uint64_t __attribute__((export_name("TS_LDKOffersMessageHandler_new"))) TS_LDKOffersMessageHandler_new(JSValue o) {
+ LDKOffersMessageHandler *res_ptr = MALLOC(sizeof(LDKOffersMessageHandler), "LDKOffersMessageHandler");
+ *res_ptr = LDKOffersMessageHandler_init(o);
+ return tag_ptr(res_ptr, true);
+}
+uint64_t __attribute__((export_name("TS_OffersMessageHandler_handle_message"))) TS_OffersMessageHandler_handle_message(uint64_t this_arg, uint64_t message) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKOffersMessageHandler* this_arg_conv = (LDKOffersMessageHandler*)this_arg_ptr;
+ void* message_ptr = untag_ptr(message);
+ CHECK_ACCESS(message_ptr);
+ LDKOffersMessage message_conv = *(LDKOffersMessage*)(message_ptr);
+ message_conv = OffersMessage_clone((LDKOffersMessage*)untag_ptr(message));
+ LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
+ *ret_copy = (this_arg_conv->handle_message)(this_arg_conv->this_arg, message_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_tArray __attribute__((export_name("TS_OffersMessageHandler_release_pending_messages"))) TS_OffersMessageHandler_release_pending_messages(uint64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKOffersMessageHandler* this_arg_conv = (LDKOffersMessageHandler*)this_arg_ptr;
+ LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ ret_var = (this_arg_conv->release_pending_messages)(this_arg_conv->this_arg);
+ uint64_tArray ret_arr = NULL;
+ ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
+ uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t x = 0; x < ret_var.datalen; x++) {
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OffersMessageDestinationBlindedPathZ), "LDKC3Tuple_OffersMessageDestinationBlindedPathZ");
+ *ret_conv_49_conv = ret_var.data[x];
+ ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
typedef struct LDKRoutingMessageHandler_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
msg_var = NodeAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 107, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 118, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
msg_var = ChannelAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 108, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 119, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 109, msg_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 120, msg_ref, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int64_t starting_point_conv = starting_point;
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 110, starting_point_conv, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 121, starting_point_conv, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr);
uint64_t starting_point_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(starting_point_var);
starting_point_ref = tag_ptr(starting_point_var.inner, starting_point_var.is_owned);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 111, starting_point_ref, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 122, starting_point_ref, 0, 0, 0, 0, 0);
LDKNodeAnnouncement ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 112, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 123, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 113, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 124, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 114, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 125, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 115, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 126, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
uint64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 116, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 127, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
bool processing_queue_high_LDKRoutingMessageHandler_jcall(const void* this_arg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 117, 0, 0, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 128, 0, 0, 0, 0, 0, 0);
}
LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 118, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 129, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 119, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 130, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
return ret_ref;
}
-typedef struct LDKOnionMessageProvider_JCalls {
- atomic_size_t refcnt;
- uint32_t instance_ptr;
-} LDKOnionMessageProvider_JCalls;
-static void LDKOnionMessageProvider_JCalls_free(void* this_arg) {
- LDKOnionMessageProvider_JCalls *j_calls = (LDKOnionMessageProvider_JCalls*) this_arg;
- if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
- FREE(j_calls);
- }
-}
-LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageProvider_jcall(const void* this_arg, LDKPublicKey peer_node_id) {
- LDKOnionMessageProvider_JCalls *j_calls = (LDKOnionMessageProvider_JCalls*) this_arg;
- int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 120, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
- LDKOnionMessage ret_conv;
- ret_conv.inner = untag_ptr(ret);
- ret_conv.is_owned = ptr_is_owned(ret);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
- return ret_conv;
-}
-static void LDKOnionMessageProvider_JCalls_cloned(LDKOnionMessageProvider* new_obj) {
- LDKOnionMessageProvider_JCalls *j_calls = (LDKOnionMessageProvider_JCalls*) new_obj->this_arg;
- atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-}
-static inline LDKOnionMessageProvider LDKOnionMessageProvider_init (JSValue o) {
- LDKOnionMessageProvider_JCalls *calls = MALLOC(sizeof(LDKOnionMessageProvider_JCalls), "LDKOnionMessageProvider_JCalls");
- atomic_init(&calls->refcnt, 1);
- calls->instance_ptr = o;
-
- LDKOnionMessageProvider ret = {
- .this_arg = (void*) calls,
- .next_onion_message_for_peer = next_onion_message_for_peer_LDKOnionMessageProvider_jcall,
- .free = LDKOnionMessageProvider_JCalls_free,
- };
- return ret;
-}
-uint64_t __attribute__((export_name("TS_LDKOnionMessageProvider_new"))) TS_LDKOnionMessageProvider_new(JSValue o) {
- LDKOnionMessageProvider *res_ptr = MALLOC(sizeof(LDKOnionMessageProvider), "LDKOnionMessageProvider");
- *res_ptr = LDKOnionMessageProvider_init(o);
- return tag_ptr(res_ptr, true);
-}
-uint64_t __attribute__((export_name("TS_OnionMessageProvider_next_onion_message_for_peer"))) TS_OnionMessageProvider_next_onion_message_for_peer(uint64_t this_arg, int8_tArray peer_node_id) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKOnionMessageProvider* this_arg_conv = (LDKOnionMessageProvider*)this_arg_ptr;
- LDKPublicKey peer_node_id_ref;
- CHECK(peer_node_id->arr_len == 33);
- memcpy(peer_node_id_ref.compressed_form, peer_node_id->elems, 33); FREE(peer_node_id);
- LDKOnionMessage ret_var = (this_arg_conv->next_onion_message_for_peer)(this_arg_conv->this_arg, peer_node_id_ref);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
typedef struct LDKOnionMessageHandler_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
- LDKOnionMessageProvider_JCalls* OnionMessageProvider;
} LDKOnionMessageHandler_JCalls;
static void LDKOnionMessageHandler_JCalls_free(void* this_arg) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
FREE(j_calls);
}
}
+LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ get_and_clear_connections_needed_LDKOnionMessageHandler_jcall(const void* this_arg) {
+ LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 131, 0, 0, 0, 0, 0, 0);
+ LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ ret_constr;
+ ret_constr.datalen = ret->arr_len;
+ if (ret_constr.datalen > 0)
+ ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ Elements");
+ else
+ ret_constr.data = NULL;
+ uint64_t* ret_vals = ret->elems;
+ for (size_t o = 0; o < ret_constr.datalen; o++) {
+ uint64_t ret_conv_40 = ret_vals[o];
+ void* ret_conv_40_ptr = untag_ptr(ret_conv_40);
+ CHECK_ACCESS(ret_conv_40_ptr);
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ ret_conv_40_conv = *(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ*)(ret_conv_40_ptr);
+ FREE(untag_ptr(ret_conv_40));
+ ret_constr.data[o] = ret_conv_40_conv;
+ }
+ FREE(ret);
+ return ret_constr;
+}
void handle_onion_message_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey peer_node_id, const LDKOnionMessage * msg) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__);
msg_var = OnionMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_ubuuuu(j_calls->instance_ptr, 121, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
+ js_invoke_function_ubuuuu(j_calls->instance_ptr, 132, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
+}
+LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey peer_node_id) {
+ LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
+ int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 133, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
+ LDKOnionMessage ret_conv;
+ ret_conv.inner = untag_ptr(ret);
+ ret_conv.is_owned = ptr_is_owned(ret);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
+ return ret_conv;
}
LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init, bool inbound) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 122, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0);
+ uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 134, (uint32_t)their_node_id_arr, init_ref, inbound_conv, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 123, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 135, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+}
+void timer_tick_occurred_LDKOnionMessageHandler_jcall(const void* this_arg) {
+ LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 136, 0, 0, 0, 0, 0, 0);
}
LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 124, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 137, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 125, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 138, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
static void LDKOnionMessageHandler_JCalls_cloned(LDKOnionMessageHandler* new_obj) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
- atomic_fetch_add_explicit(&j_calls->OnionMessageProvider->refcnt, 1, memory_order_release);
}
-static inline LDKOnionMessageHandler LDKOnionMessageHandler_init (JSValue o, JSValue OnionMessageProvider) {
+static inline LDKOnionMessageHandler LDKOnionMessageHandler_init (JSValue o) {
LDKOnionMessageHandler_JCalls *calls = MALLOC(sizeof(LDKOnionMessageHandler_JCalls), "LDKOnionMessageHandler_JCalls");
atomic_init(&calls->refcnt, 1);
calls->instance_ptr = o;
LDKOnionMessageHandler ret = {
.this_arg = (void*) calls,
+ .get_and_clear_connections_needed = get_and_clear_connections_needed_LDKOnionMessageHandler_jcall,
.handle_onion_message = handle_onion_message_LDKOnionMessageHandler_jcall,
+ .next_onion_message_for_peer = next_onion_message_for_peer_LDKOnionMessageHandler_jcall,
.peer_connected = peer_connected_LDKOnionMessageHandler_jcall,
.peer_disconnected = peer_disconnected_LDKOnionMessageHandler_jcall,
+ .timer_tick_occurred = timer_tick_occurred_LDKOnionMessageHandler_jcall,
.provided_node_features = provided_node_features_LDKOnionMessageHandler_jcall,
.provided_init_features = provided_init_features_LDKOnionMessageHandler_jcall,
.free = LDKOnionMessageHandler_JCalls_free,
- .OnionMessageProvider = LDKOnionMessageProvider_init(OnionMessageProvider),
};
- calls->OnionMessageProvider = ret.OnionMessageProvider.this_arg;
return ret;
}
-uint64_t __attribute__((export_name("TS_LDKOnionMessageHandler_new"))) TS_LDKOnionMessageHandler_new(JSValue o, JSValue OnionMessageProvider) {
+uint64_t __attribute__((export_name("TS_LDKOnionMessageHandler_new"))) TS_LDKOnionMessageHandler_new(JSValue o) {
LDKOnionMessageHandler *res_ptr = MALLOC(sizeof(LDKOnionMessageHandler), "LDKOnionMessageHandler");
- *res_ptr = LDKOnionMessageHandler_init(o, OnionMessageProvider);
+ *res_ptr = LDKOnionMessageHandler_init(o);
return tag_ptr(res_ptr, true);
}
+uint64_tArray __attribute__((export_name("TS_OnionMessageHandler_get_and_clear_connections_needed"))) TS_OnionMessageHandler_get_and_clear_connections_needed(uint64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKOnionMessageHandler* this_arg_conv = (LDKOnionMessageHandler*)this_arg_ptr;
+ LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ ret_var = (this_arg_conv->get_and_clear_connections_needed)(this_arg_conv->this_arg);
+ uint64_tArray ret_arr = NULL;
+ ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
+ uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t o = 0; o < ret_var.datalen; o++) {
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ* ret_conv_40_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ), "LDKC2Tuple_PublicKeyCVec_SocketAddressZZ");
+ *ret_conv_40_conv = ret_var.data[o];
+ ret_arr_ptr[o] = tag_ptr(ret_conv_40_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_OnionMessageHandler_handle_onion_message"))) TS_OnionMessageHandler_handle_onion_message(uint64_t this_arg, int8_tArray peer_node_id, uint64_t msg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
(this_arg_conv->handle_onion_message)(this_arg_conv->this_arg, peer_node_id_ref, &msg_conv);
}
+uint64_t __attribute__((export_name("TS_OnionMessageHandler_next_onion_message_for_peer"))) TS_OnionMessageHandler_next_onion_message_for_peer(uint64_t this_arg, int8_tArray peer_node_id) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKOnionMessageHandler* this_arg_conv = (LDKOnionMessageHandler*)this_arg_ptr;
+ LDKPublicKey peer_node_id_ref;
+ CHECK(peer_node_id->arr_len == 33);
+ memcpy(peer_node_id_ref.compressed_form, peer_node_id->elems, 33); FREE(peer_node_id);
+ LDKOnionMessage ret_var = (this_arg_conv->next_onion_message_for_peer)(this_arg_conv->this_arg, peer_node_id_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
uint64_t __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_OnionMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init, jboolean inbound) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
(this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref);
}
+void __attribute__((export_name("TS_OnionMessageHandler_timer_tick_occurred"))) TS_OnionMessageHandler_timer_tick_occurred(uint64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKOnionMessageHandler* this_arg_conv = (LDKOnionMessageHandler*)this_arg_ptr;
+ (this_arg_conv->timer_tick_occurred)(this_arg_conv->this_arg);
+}
+
uint64_t __attribute__((export_name("TS_OnionMessageHandler_provided_node_features"))) TS_OnionMessageHandler_provided_node_features(uint64_t this_arg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 126, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 139, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr);
*msg_ret = msg;
int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 127, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 140, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 128, 0, 0, 0, 0, 0, 0);
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 141, 0, 0, 0, 0, 0, 0);
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
}
LDKNodeFeatures provided_node_features_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 129, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 142, 0, 0, 0, 0, 0, 0);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 130, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 143, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
return ret_ref;
}
-typedef struct LDKOffersMessageHandler_JCalls {
- atomic_size_t refcnt;
- uint32_t instance_ptr;
-} LDKOffersMessageHandler_JCalls;
-static void LDKOffersMessageHandler_JCalls_free(void* this_arg) {
- LDKOffersMessageHandler_JCalls *j_calls = (LDKOffersMessageHandler_JCalls*) this_arg;
- if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
- FREE(j_calls);
- }
-}
-LDKCOption_OffersMessageZ handle_message_LDKOffersMessageHandler_jcall(const void* this_arg, LDKOffersMessage message) {
- LDKOffersMessageHandler_JCalls *j_calls = (LDKOffersMessageHandler_JCalls*) this_arg;
- LDKOffersMessage *message_copy = MALLOC(sizeof(LDKOffersMessage), "LDKOffersMessage");
- *message_copy = message;
- uint64_t message_ref = tag_ptr(message_copy, true);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 131, message_ref, 0, 0, 0, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCOption_OffersMessageZ ret_conv = *(LDKCOption_OffersMessageZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
-static void LDKOffersMessageHandler_JCalls_cloned(LDKOffersMessageHandler* new_obj) {
- LDKOffersMessageHandler_JCalls *j_calls = (LDKOffersMessageHandler_JCalls*) new_obj->this_arg;
- atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-}
-static inline LDKOffersMessageHandler LDKOffersMessageHandler_init (JSValue o) {
- LDKOffersMessageHandler_JCalls *calls = MALLOC(sizeof(LDKOffersMessageHandler_JCalls), "LDKOffersMessageHandler_JCalls");
- atomic_init(&calls->refcnt, 1);
- calls->instance_ptr = o;
-
- LDKOffersMessageHandler ret = {
- .this_arg = (void*) calls,
- .handle_message = handle_message_LDKOffersMessageHandler_jcall,
- .free = LDKOffersMessageHandler_JCalls_free,
- };
- return ret;
-}
-uint64_t __attribute__((export_name("TS_LDKOffersMessageHandler_new"))) TS_LDKOffersMessageHandler_new(JSValue o) {
- LDKOffersMessageHandler *res_ptr = MALLOC(sizeof(LDKOffersMessageHandler), "LDKOffersMessageHandler");
- *res_ptr = LDKOffersMessageHandler_init(o);
- return tag_ptr(res_ptr, true);
-}
-uint64_t __attribute__((export_name("TS_OffersMessageHandler_handle_message"))) TS_OffersMessageHandler_handle_message(uint64_t this_arg, uint64_t message) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKOffersMessageHandler* this_arg_conv = (LDKOffersMessageHandler*)this_arg_ptr;
- void* message_ptr = untag_ptr(message);
- CHECK_ACCESS(message_ptr);
- LDKOffersMessage message_conv = *(LDKOffersMessage*)(message_ptr);
- message_conv = OffersMessage_clone((LDKOffersMessage*)untag_ptr(message));
- LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
- *ret_copy = (this_arg_conv->handle_message)(this_arg_conv->this_arg, message_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
typedef struct LDKCustomOnionMessageHandler_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
FREE(j_calls);
}
}
-LDKCOption_CustomOnionMessageContentsZ handle_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, LDKCustomOnionMessageContents msg) {
+LDKCOption_OnionMessageContentsZ handle_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, LDKOnionMessageContents msg) {
LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
- LDKCustomOnionMessageContents* msg_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+ LDKOnionMessageContents* msg_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
*msg_ret = msg;
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 132, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 144, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
- LDKCOption_CustomOnionMessageContentsZ ret_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(ret_ptr);
+ LDKCOption_OnionMessageContentsZ ret_conv = *(LDKCOption_OnionMessageContentsZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, uint64_t message_type, LDKu8slice buffer) {
+LDKCResult_COption_OnionMessageContentsZDecodeErrorZ read_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, uint64_t message_type, LDKu8slice buffer) {
LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
int64_t message_type_conv = message_type;
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 133, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 145, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(ret_ptr);
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
+LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ release_pending_custom_messages_LDKCustomOnionMessageHandler_jcall(const void* this_arg) {
+ LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+ uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 146, 0, 0, 0, 0, 0, 0);
+ LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ ret_constr;
+ ret_constr.datalen = ret->arr_len;
+ if (ret_constr.datalen > 0)
+ ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ), "LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ Elements");
+ else
+ ret_constr.data = NULL;
+ uint64_t* ret_vals = ret->elems;
+ for (size_t e = 0; e < ret_constr.datalen; e++) {
+ uint64_t ret_conv_56 = ret_vals[e];
+ void* ret_conv_56_ptr = untag_ptr(ret_conv_56);
+ CHECK_ACCESS(ret_conv_56_ptr);
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ ret_conv_56_conv = *(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ*)(ret_conv_56_ptr);
+ FREE(untag_ptr(ret_conv_56));
+ ret_constr.data[e] = ret_conv_56_conv;
+ }
+ FREE(ret);
+ return ret_constr;
+}
static void LDKCustomOnionMessageHandler_JCalls_cloned(LDKCustomOnionMessageHandler* new_obj) {
LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
.this_arg = (void*) calls,
.handle_custom_message = handle_custom_message_LDKCustomOnionMessageHandler_jcall,
.read_custom_message = read_custom_message_LDKCustomOnionMessageHandler_jcall,
+ .release_pending_custom_messages = release_pending_custom_messages_LDKCustomOnionMessageHandler_jcall,
.free = LDKCustomOnionMessageHandler_JCalls_free,
};
return ret;
LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
void* msg_ptr = untag_ptr(msg);
CHECK_ACCESS(msg_ptr);
- LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
- if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+ LDKOnionMessageContents msg_conv = *(LDKOnionMessageContents*)(msg_ptr);
+ if (msg_conv.free == LDKOnionMessageContents_JCalls_free) {
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+ LDKOnionMessageContents_JCalls_cloned(&msg_conv);
}
- LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+ LDKCOption_OnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_OnionMessageContentsZ), "LDKCOption_OnionMessageContentsZ");
*ret_copy = (this_arg_conv->handle_custom_message)(this_arg_conv->this_arg, msg_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
LDKu8slice buffer_ref;
buffer_ref.datalen = buffer->arr_len;
buffer_ref.data = buffer->elems;
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_OnionMessageContentsZDecodeErrorZ");
*ret_conv = (this_arg_conv->read_custom_message)(this_arg_conv->this_arg, message_type, buffer_ref);
FREE(buffer);
return tag_ptr(ret_conv, true);
}
+uint64_tArray __attribute__((export_name("TS_CustomOnionMessageHandler_release_pending_custom_messages"))) TS_CustomOnionMessageHandler_release_pending_custom_messages(uint64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+ LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ ret_var = (this_arg_conv->release_pending_custom_messages)(this_arg_conv->this_arg);
+ uint64_tArray ret_arr = NULL;
+ ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
+ uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t e = 0; e < ret_var.datalen; e++) {
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ* ret_conv_56_conv = MALLOC(sizeof(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ), "LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ");
+ *ret_conv_56_conv = ret_var.data[e];
+ ret_arr_ptr[e] = tag_ptr(ret_conv_56_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
typedef struct LDKSocketDescriptor_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__);
memcpy(data_arr->elems, data_var.data, data_var.datalen);
jboolean resume_read_conv = resume_read;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 134, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 147, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
}
void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- js_invoke_function_uuuuuu(j_calls->instance_ptr, 135, 0, 0, 0, 0, 0, 0);
+ js_invoke_function_uuuuuu(j_calls->instance_ptr, 148, 0, 0, 0, 0, 0, 0);
}
bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
*other_arg_clone = SocketDescriptor_clone(other_arg);
- return js_invoke_function_buuuuu(j_calls->instance_ptr, 136, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
+ return js_invoke_function_buuuuu(j_calls->instance_ptr, 149, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
}
uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- return js_invoke_function_uuuuuu(j_calls->instance_ptr, 137, 0, 0, 0, 0, 0, 0);
+ return js_invoke_function_uuuuuu(j_calls->instance_ptr, 150, 0, 0, 0, 0, 0, 0);
}
static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg;
int64_t __attribute__((export_name("TS_LDKEffectiveCapacity_ExactLiquidity_get_liquidity_msat"))) TS_LDKEffectiveCapacity_ExactLiquidity_get_liquidity_msat(uint64_t ptr) {
LDKEffectiveCapacity *obj = (LDKEffectiveCapacity*)untag_ptr(ptr);
assert(obj->tag == LDKEffectiveCapacity_ExactLiquidity);
- int64_t liquidity_msat_conv = obj->exact_liquidity.liquidity_msat;
+ int64_t liquidity_msat_conv = obj->exact_liquidity.liquidity_msat;
return liquidity_msat_conv;
}
int64_t __attribute__((export_name("TS_LDKEffectiveCapacity_AdvertisedMaxHTLC_get_amount_msat"))) TS_LDKEffectiveCapacity_AdvertisedMaxHTLC_get_amount_msat(uint64_t ptr) {
LDKEffectiveCapacity *obj = (LDKEffectiveCapacity*)untag_ptr(ptr);
assert(obj->tag == LDKEffectiveCapacity_AdvertisedMaxHTLC);
- int64_t amount_msat_conv = obj->advertised_max_htlc.amount_msat;
+ int64_t amount_msat_conv = obj->advertised_max_htlc.amount_msat;
return amount_msat_conv;
}
int64_t __attribute__((export_name("TS_LDKEffectiveCapacity_Total_get_capacity_msat"))) TS_LDKEffectiveCapacity_Total_get_capacity_msat(uint64_t ptr) {
LDKEffectiveCapacity *obj = (LDKEffectiveCapacity*)untag_ptr(ptr);
assert(obj->tag == LDKEffectiveCapacity_Total);
- int64_t capacity_msat_conv = obj->total.capacity_msat;
+ int64_t capacity_msat_conv = obj->total.capacity_msat;
return capacity_msat_conv;
}
int64_t __attribute__((export_name("TS_LDKEffectiveCapacity_Total_get_htlc_maximum_msat"))) TS_LDKEffectiveCapacity_Total_get_htlc_maximum_msat(uint64_t ptr) {
LDKEffectiveCapacity *obj = (LDKEffectiveCapacity*)untag_ptr(ptr);
assert(obj->tag == LDKEffectiveCapacity_Total);
- int64_t htlc_maximum_msat_conv = obj->total.htlc_maximum_msat;
+ int64_t htlc_maximum_msat_conv = obj->total.htlc_maximum_msat;
return htlc_maximum_msat_conv;
}
int64_t __attribute__((export_name("TS_LDKEffectiveCapacity_HintMaxHTLC_get_amount_msat"))) TS_LDKEffectiveCapacity_HintMaxHTLC_get_amount_msat(uint64_t ptr) {
LDKEffectiveCapacity *obj = (LDKEffectiveCapacity*)untag_ptr(ptr);
assert(obj->tag == LDKEffectiveCapacity_HintMaxHTLC);
- int64_t amount_msat_conv = obj->hint_max_htlc.amount_msat;
+ int64_t amount_msat_conv = obj->hint_max_htlc.amount_msat;
return amount_msat_conv;
}
uint32_t __attribute__((export_name("TS_LDKPayee_ty_from_ptr"))) TS_LDKPayee_ty_from_ptr(uint64_t ptr) {
uint64_tArray __attribute__((export_name("TS_LDKPayee_Blinded_get_route_hints"))) TS_LDKPayee_Blinded_get_route_hints(uint64_t ptr) {
LDKPayee *obj = (LDKPayee*)untag_ptr(ptr);
assert(obj->tag == LDKPayee_Blinded);
- LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ route_hints_var = obj->blinded.route_hints;
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ route_hints_var = obj->blinded.route_hints;
uint64_tArray route_hints_arr = NULL;
route_hints_arr = init_uint64_tArray(route_hints_var.datalen, __LINE__);
uint64_t *route_hints_arr_ptr = (uint64_t*)(((uint8_t*)route_hints_arr) + 8);
uint64_t __attribute__((export_name("TS_LDKPayee_Blinded_get_features"))) TS_LDKPayee_Blinded_get_features(uint64_t ptr) {
LDKPayee *obj = (LDKPayee*)untag_ptr(ptr);
assert(obj->tag == LDKPayee_Blinded);
- LDKBolt12InvoiceFeatures features_var = obj->blinded.features;
+ LDKBolt12InvoiceFeatures features_var = obj->blinded.features;
uint64_t features_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(features_var);
features_ref = tag_ptr(features_var.inner, false);
int8_tArray __attribute__((export_name("TS_LDKPayee_Clear_get_node_id"))) TS_LDKPayee_Clear_get_node_id(uint64_t ptr) {
LDKPayee *obj = (LDKPayee*)untag_ptr(ptr);
assert(obj->tag == LDKPayee_Clear);
- int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_id_arr->elems, obj->clear.node_id.compressed_form, 33);
+ int8_tArray node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_id_arr->elems, obj->clear.node_id.compressed_form, 33);
return node_id_arr;
}
uint64_tArray __attribute__((export_name("TS_LDKPayee_Clear_get_route_hints"))) TS_LDKPayee_Clear_get_route_hints(uint64_t ptr) {
LDKPayee *obj = (LDKPayee*)untag_ptr(ptr);
assert(obj->tag == LDKPayee_Clear);
- LDKCVec_RouteHintZ route_hints_var = obj->clear.route_hints;
+ LDKCVec_RouteHintZ route_hints_var = obj->clear.route_hints;
uint64_tArray route_hints_arr = NULL;
route_hints_arr = init_uint64_tArray(route_hints_var.datalen, __LINE__);
uint64_t *route_hints_arr_ptr = (uint64_t*)(((uint8_t*)route_hints_arr) + 8);
uint64_t __attribute__((export_name("TS_LDKPayee_Clear_get_features"))) TS_LDKPayee_Clear_get_features(uint64_t ptr) {
LDKPayee *obj = (LDKPayee*)untag_ptr(ptr);
assert(obj->tag == LDKPayee_Clear);
- LDKBolt11InvoiceFeatures features_var = obj->clear.features;
+ LDKBolt11InvoiceFeatures features_var = obj->clear.features;
uint64_t features_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(features_var);
features_ref = tag_ptr(features_var.inner, false);
int32_t __attribute__((export_name("TS_LDKPayee_Clear_get_final_cltv_expiry_delta"))) TS_LDKPayee_Clear_get_final_cltv_expiry_delta(uint64_t ptr) {
LDKPayee *obj = (LDKPayee*)untag_ptr(ptr);
assert(obj->tag == LDKPayee_Clear);
- int32_t final_cltv_expiry_delta_conv = obj->clear.final_cltv_expiry_delta;
+ int32_t final_cltv_expiry_delta_conv = obj->clear.final_cltv_expiry_delta;
return final_cltv_expiry_delta_conv;
}
typedef struct LDKScore_JCalls {
}
LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 138, 0, 0, 0, 0, 0, 0);
+ int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 151, 0, 0, 0, 0, 0, 0);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
return ret_arr;
}
-uint32_t __attribute__((export_name("TS_LDKDestination_ty_from_ptr"))) TS_LDKDestination_ty_from_ptr(uint64_t ptr) {
- LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKDestination_Node: return 0;
- case LDKDestination_BlindedPath: return 1;
- default: abort();
- }
-}
-int8_tArray __attribute__((export_name("TS_LDKDestination_Node_get_node"))) TS_LDKDestination_Node_get_node(uint64_t ptr) {
- LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
- assert(obj->tag == LDKDestination_Node);
- int8_tArray node_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_arr->elems, obj->node.compressed_form, 33);
- return node_arr;
-}
-uint64_t __attribute__((export_name("TS_LDKDestination_BlindedPath_get_blinded_path"))) TS_LDKDestination_BlindedPath_get_blinded_path(uint64_t ptr) {
- LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
- assert(obj->tag == LDKDestination_BlindedPath);
- LDKBlindedPath blinded_path_var = obj->blinded_path;
- uint64_t blinded_path_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_path_var);
- blinded_path_ref = tag_ptr(blinded_path_var.inner, false);
- return blinded_path_ref;
-}
-typedef struct LDKMessageRouter_JCalls {
- atomic_size_t refcnt;
- uint32_t instance_ptr;
-} LDKMessageRouter_JCalls;
-static void LDKMessageRouter_JCalls_free(void* this_arg) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
- FREE(j_calls);
- }
-}
-LDKCResult_OnionMessagePathNoneZ find_path_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey sender, LDKCVec_PublicKeyZ peers, LDKDestination destination) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- int8_tArray sender_arr = init_int8_tArray(33, __LINE__);
- memcpy(sender_arr->elems, sender.compressed_form, 33);
- LDKCVec_PublicKeyZ peers_var = peers;
- ptrArray peers_arr = NULL;
- peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
- int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
- for (size_t m = 0; m < peers_var.datalen; m++) {
- int8_tArray peers_conv_12_arr = init_int8_tArray(33, __LINE__);
- memcpy(peers_conv_12_arr->elems, peers_var.data[m].compressed_form, 33);
- peers_arr_ptr[m] = peers_conv_12_arr;
- }
-
- FREE(peers_var.data);
- LDKDestination *destination_copy = MALLOC(sizeof(LDKDestination), "LDKDestination");
- *destination_copy = destination;
- uint64_t destination_ref = tag_ptr(destination_copy, true);
- uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 139, (uint32_t)sender_arr, (uint32_t)peers_arr, destination_ref, 0, 0, 0);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_OnionMessagePathNoneZ ret_conv = *(LDKCResult_OnionMessagePathNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
-static void LDKMessageRouter_JCalls_cloned(LDKMessageRouter* new_obj) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) new_obj->this_arg;
- atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-}
-static inline LDKMessageRouter LDKMessageRouter_init (JSValue o) {
- LDKMessageRouter_JCalls *calls = MALLOC(sizeof(LDKMessageRouter_JCalls), "LDKMessageRouter_JCalls");
- atomic_init(&calls->refcnt, 1);
- calls->instance_ptr = o;
-
- LDKMessageRouter ret = {
- .this_arg = (void*) calls,
- .find_path = find_path_LDKMessageRouter_jcall,
- .free = LDKMessageRouter_JCalls_free,
- };
- return ret;
-}
-uint64_t __attribute__((export_name("TS_LDKMessageRouter_new"))) TS_LDKMessageRouter_new(JSValue o) {
- LDKMessageRouter *res_ptr = MALLOC(sizeof(LDKMessageRouter), "LDKMessageRouter");
- *res_ptr = LDKMessageRouter_init(o);
- return tag_ptr(res_ptr, true);
-}
-uint64_t __attribute__((export_name("TS_MessageRouter_find_path"))) TS_MessageRouter_find_path(uint64_t this_arg, int8_tArray sender, ptrArray peers, uint64_t destination) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
- LDKPublicKey sender_ref;
- CHECK(sender->arr_len == 33);
- memcpy(sender_ref.compressed_form, sender->elems, 33); FREE(sender);
- LDKCVec_PublicKeyZ peers_constr;
- peers_constr.datalen = peers->arr_len;
- if (peers_constr.datalen > 0)
- peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
- else
- peers_constr.data = NULL;
- int8_tArray* peers_vals = (void*) peers->elems;
- for (size_t m = 0; m < peers_constr.datalen; m++) {
- int8_tArray peers_conv_12 = peers_vals[m];
- LDKPublicKey peers_conv_12_ref;
- CHECK(peers_conv_12->arr_len == 33);
- memcpy(peers_conv_12_ref.compressed_form, peers_conv_12->elems, 33); FREE(peers_conv_12);
- peers_constr.data[m] = peers_conv_12_ref;
- }
- FREE(peers);
- void* destination_ptr = untag_ptr(destination);
- CHECK_ACCESS(destination_ptr);
- LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
- destination_conv = Destination_clone((LDKDestination*)untag_ptr(destination));
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = (this_arg_conv->find_path)(this_arg_conv->this_arg, sender_ref, peers_constr, destination_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint32_t __attribute__((export_name("TS_LDKOnionMessageContents_ty_from_ptr"))) TS_LDKOnionMessageContents_ty_from_ptr(uint64_t ptr) {
- LDKOnionMessageContents *obj = (LDKOnionMessageContents*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKOnionMessageContents_Offers: return 0;
- case LDKOnionMessageContents_Custom: return 1;
- default: abort();
- }
-}
-uint64_t __attribute__((export_name("TS_LDKOnionMessageContents_Offers_get_offers"))) TS_LDKOnionMessageContents_Offers_get_offers(uint64_t ptr) {
- LDKOnionMessageContents *obj = (LDKOnionMessageContents*)untag_ptr(ptr);
- assert(obj->tag == LDKOnionMessageContents_Offers);
- uint64_t offers_ref = tag_ptr(&obj->offers, false);
- return offers_ref;
-}
-uint64_t __attribute__((export_name("TS_LDKOnionMessageContents_Custom_get_custom"))) TS_LDKOnionMessageContents_Custom_get_custom(uint64_t ptr) {
- LDKOnionMessageContents *obj = (LDKOnionMessageContents*)untag_ptr(ptr);
- assert(obj->tag == LDKOnionMessageContents_Custom);
- LDKCustomOnionMessageContents* custom_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
- *custom_ret = CustomOnionMessageContents_clone(&obj->custom);
- return tag_ptr(custom_ret, true);
-}
typedef struct LDKCoinSelectionSource_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
FREE(must_pay_to_var.data);
int32_t target_feerate_sat_per_1000_weight_conv = target_feerate_sat_per_1000_weight;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 140, (uint32_t)claim_id_arr, (uint32_t)must_spend_arr, (uint32_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 152, (uint32_t)claim_id_arr, (uint32_t)must_spend_arr, (uint32_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CoinSelectionNoneZ ret_conv = *(LDKCResult_CoinSelectionNoneZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_TransactionNoneZ sign_tx_LDKCoinSelectionSource_jcall(const void* this_arg, LDKTransaction tx) {
+LDKCResult_TransactionNoneZ sign_psbt_LDKCoinSelectionSource_jcall(const void* this_arg, LDKCVec_u8Z psbt) {
LDKCoinSelectionSource_JCalls *j_calls = (LDKCoinSelectionSource_JCalls*) this_arg;
- LDKTransaction tx_var = tx;
- int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
- memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
- Transaction_free(tx_var);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 141, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
+ LDKCVec_u8Z psbt_var = psbt;
+ int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__);
+ memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen);
+ CVec_u8Z_free(psbt_var);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 153, (uint32_t)psbt_arr, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
LDKCoinSelectionSource ret = {
.this_arg = (void*) calls,
.select_confirmed_utxos = select_confirmed_utxos_LDKCoinSelectionSource_jcall,
- .sign_tx = sign_tx_LDKCoinSelectionSource_jcall,
+ .sign_psbt = sign_psbt_LDKCoinSelectionSource_jcall,
.free = LDKCoinSelectionSource_JCalls_free,
};
return ret;
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CoinSelectionSource_sign_tx"))) TS_CoinSelectionSource_sign_tx(uint64_t this_arg, int8_tArray tx) {
+uint64_t __attribute__((export_name("TS_CoinSelectionSource_sign_psbt"))) TS_CoinSelectionSource_sign_psbt(uint64_t this_arg, int8_tArray psbt) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKCoinSelectionSource* this_arg_conv = (LDKCoinSelectionSource*)this_arg_ptr;
- LDKTransaction tx_ref;
- tx_ref.datalen = tx->arr_len;
- tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
- memcpy(tx_ref.data, tx->elems, tx_ref.datalen); FREE(tx);
- tx_ref.data_is_owned = true;
+ LDKCVec_u8Z psbt_ref;
+ psbt_ref.datalen = psbt->arr_len;
+ psbt_ref.data = MALLOC(psbt_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(psbt_ref.data, psbt->elems, psbt_ref.datalen); FREE(psbt);
LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = (this_arg_conv->sign_tx)(this_arg_conv->this_arg, tx_ref);
+ *ret_conv = (this_arg_conv->sign_psbt)(this_arg_conv->this_arg, psbt_ref);
return tag_ptr(ret_conv, true);
}
}
LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void* this_arg) {
LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 142, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 154, 0, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_UtxoZNoneZ ret_conv = *(LDKCResult_CVec_UtxoZNoneZ*)(ret_ptr);
}
LDKCResult_CVec_u8ZNoneZ get_change_script_LDKWalletSource_jcall(const void* this_arg) {
LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 143, 0, 0, 0, 0, 0, 0);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 155, 0, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_TransactionNoneZ sign_tx_LDKWalletSource_jcall(const void* this_arg, LDKTransaction tx) {
+LDKCResult_TransactionNoneZ sign_psbt_LDKWalletSource_jcall(const void* this_arg, LDKCVec_u8Z psbt) {
LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg;
- LDKTransaction tx_var = tx;
- int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
- memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
- Transaction_free(tx_var);
- uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 144, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
+ LDKCVec_u8Z psbt_var = psbt;
+ int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__);
+ memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen);
+ CVec_u8Z_free(psbt_var);
+ uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 156, (uint32_t)psbt_arr, 0, 0, 0, 0, 0);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
.this_arg = (void*) calls,
.list_confirmed_utxos = list_confirmed_utxos_LDKWalletSource_jcall,
.get_change_script = get_change_script_LDKWalletSource_jcall,
- .sign_tx = sign_tx_LDKWalletSource_jcall,
+ .sign_psbt = sign_psbt_LDKWalletSource_jcall,
.free = LDKWalletSource_JCalls_free,
};
return ret;
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_WalletSource_sign_tx"))) TS_WalletSource_sign_tx(uint64_t this_arg, int8_tArray tx) {
+uint64_t __attribute__((export_name("TS_WalletSource_sign_psbt"))) TS_WalletSource_sign_psbt(uint64_t this_arg, int8_tArray psbt) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKWalletSource* this_arg_conv = (LDKWalletSource*)this_arg_ptr;
- LDKTransaction tx_ref;
- tx_ref.datalen = tx->arr_len;
- tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
- memcpy(tx_ref.data, tx->elems, tx_ref.datalen); FREE(tx);
- tx_ref.data_is_owned = true;
+ LDKCVec_u8Z psbt_ref;
+ psbt_ref.datalen = psbt->arr_len;
+ psbt_ref.data = MALLOC(psbt_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(psbt_ref.data, psbt->elems, psbt_ref.datalen); FREE(psbt);
LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
- *ret_conv = (this_arg_conv->sign_tx)(this_arg_conv->this_arg, tx_ref);
+ *ret_conv = (this_arg_conv->sign_psbt)(this_arg_conv->this_arg, psbt_ref);
return tag_ptr(ret_conv, true);
}
uint64_t __attribute__((export_name("TS_LDKGossipSync_P2P_get_p2p"))) TS_LDKGossipSync_P2P_get_p2p(uint64_t ptr) {
LDKGossipSync *obj = (LDKGossipSync*)untag_ptr(ptr);
assert(obj->tag == LDKGossipSync_P2P);
- LDKP2PGossipSync p2p_var = obj->p2p;
+ LDKP2PGossipSync p2p_var = obj->p2p;
uint64_t p2p_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(p2p_var);
p2p_ref = tag_ptr(p2p_var.inner, false);
uint64_t __attribute__((export_name("TS_LDKGossipSync_Rapid_get_rapid"))) TS_LDKGossipSync_Rapid_get_rapid(uint64_t ptr) {
LDKGossipSync *obj = (LDKGossipSync*)untag_ptr(ptr);
assert(obj->tag == LDKGossipSync_Rapid);
- LDKRapidGossipSync rapid_var = obj->rapid;
+ LDKRapidGossipSync rapid_var = obj->rapid;
uint64_t rapid_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(rapid_var);
rapid_ref = tag_ptr(rapid_var.inner, false);
int8_t __attribute__((export_name("TS_LDKFallback_SegWitProgram_get_version"))) TS_LDKFallback_SegWitProgram_get_version(uint64_t ptr) {
LDKFallback *obj = (LDKFallback*)untag_ptr(ptr);
assert(obj->tag == LDKFallback_SegWitProgram);
- uint8_t version_val = obj->seg_wit_program.version._0;
+ uint8_t version_val = obj->seg_wit_program.version._0;
return version_val;
}
int8_tArray __attribute__((export_name("TS_LDKFallback_SegWitProgram_get_program"))) TS_LDKFallback_SegWitProgram_get_program(uint64_t ptr) {
LDKFallback *obj = (LDKFallback*)untag_ptr(ptr);
assert(obj->tag == LDKFallback_SegWitProgram);
- LDKCVec_u8Z program_var = obj->seg_wit_program.program;
+ LDKCVec_u8Z program_var = obj->seg_wit_program.program;
int8_tArray program_arr = init_int8_tArray(program_var.datalen, __LINE__);
memcpy(program_arr->elems, program_var.data, program_var.datalen);
return program_arr;
int8_tArray __attribute__((export_name("TS_LDKFallback_PubKeyHash_get_pub_key_hash"))) TS_LDKFallback_PubKeyHash_get_pub_key_hash(uint64_t ptr) {
LDKFallback *obj = (LDKFallback*)untag_ptr(ptr);
assert(obj->tag == LDKFallback_PubKeyHash);
- int8_tArray pub_key_hash_arr = init_int8_tArray(20, __LINE__);
- memcpy(pub_key_hash_arr->elems, obj->pub_key_hash.data, 20);
+ int8_tArray pub_key_hash_arr = init_int8_tArray(20, __LINE__);
+ memcpy(pub_key_hash_arr->elems, obj->pub_key_hash.data, 20);
return pub_key_hash_arr;
}
int8_tArray __attribute__((export_name("TS_LDKFallback_ScriptHash_get_script_hash"))) TS_LDKFallback_ScriptHash_get_script_hash(uint64_t ptr) {
LDKFallback *obj = (LDKFallback*)untag_ptr(ptr);
assert(obj->tag == LDKFallback_ScriptHash);
- int8_tArray script_hash_arr = init_int8_tArray(20, __LINE__);
- memcpy(script_hash_arr->elems, obj->script_hash.data, 20);
+ int8_tArray script_hash_arr = init_int8_tArray(20, __LINE__);
+ memcpy(script_hash_arr->elems, obj->script_hash.data, 20);
return script_hash_arr;
}
jstring __attribute__((export_name("TS__ldk_get_compiled_version"))) TS__ldk_get_compiled_version() {
return ret_arr;
}
+uint64_t __attribute__((export_name("TS_WitnessProgram_new"))) TS_WitnessProgram_new(int8_t version, int8_tArray program) {
+
+ LDKCVec_u8Z program_ref;
+ program_ref.datalen = program->arr_len;
+ program_ref.data = MALLOC(program_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(program_ref.data, program->elems, program_ref.datalen); FREE(program);
+ LDKWitnessProgram* ret_ref = MALLOC(sizeof(LDKWitnessProgram), "LDKWitnessProgram");
+ *ret_ref = WitnessProgram_new((LDKWitnessVersion){ ._0 = version }, program_ref);
+ return tag_ptr(ret_ref, true);
+}
+
+int8_t __attribute__((export_name("TS_WitnessProgram_get_version"))) TS_WitnessProgram_get_version(uint64_t prog) {
+ LDKWitnessProgram* prog_conv = (LDKWitnessProgram*)untag_ptr(prog);
+ uint8_t ret_val = WitnessProgram_get_version(prog_conv)._0;
+ return ret_val;
+}
+
+int8_tArray __attribute__((export_name("TS_WitnessProgram_get_program"))) TS_WitnessProgram_get_program(uint64_t prog) {
+ LDKWitnessProgram* prog_conv = (LDKWitnessProgram*)untag_ptr(prog);
+ LDKu8slice ret_var = WitnessProgram_get_program(prog_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ return ret_arr;
+}
+
+static inline uint64_t WitnessProgram_clone_ptr(LDKWitnessProgram *NONNULL_PTR arg) {
+ LDKWitnessProgram* ret_ref = MALLOC(sizeof(LDKWitnessProgram), "LDKWitnessProgram");
+ *ret_ref = WitnessProgram_clone(arg);
+ return tag_ptr(ret_ref, true);
+}
+int64_t __attribute__((export_name("TS_WitnessProgram_clone_ptr"))) TS_WitnessProgram_clone_ptr(uint64_t arg) {
+ LDKWitnessProgram* arg_conv = (LDKWitnessProgram*)untag_ptr(arg);
+ int64_t ret_conv = WitnessProgram_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_WitnessProgram_clone"))) TS_WitnessProgram_clone(uint64_t orig) {
+ LDKWitnessProgram* orig_conv = (LDKWitnessProgram*)untag_ptr(orig);
+ LDKWitnessProgram* ret_ref = MALLOC(sizeof(LDKWitnessProgram), "LDKWitnessProgram");
+ *ret_ref = WitnessProgram_clone(orig_conv);
+ return tag_ptr(ret_ref, true);
+}
+
+void __attribute__((export_name("TS_WitnessProgram_free"))) TS_WitnessProgram_free(uint64_t o) {
+ if (!ptr_is_owned(o)) return;
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKWitnessProgram o_conv = *(LDKWitnessProgram*)(o_ptr);
+ FREE(untag_ptr(o));
+ WitnessProgram_free(o_conv);
+}
+
uint64_t __attribute__((export_name("TS_BigEndianScalar_new"))) TS_BigEndianScalar_new(int8_tArray big_endian_bytes) {
LDKThirtyTwoBytes big_endian_bytes_ref;
CHECK(big_endian_bytes->arr_len == 32);
Witness_free(_res_ref);
}
-void __attribute__((export_name("TS_TxIn_free"))) TS_TxIn_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKTxIn _res_conv = *(LDKTxIn*)(_res_ptr);
- FREE(untag_ptr(_res));
- TxIn_free(_res_conv);
-}
-
uint64_t __attribute__((export_name("TS_TxIn_new"))) TS_TxIn_new(int8_tArray witness, int8_tArray script_sig, int32_t sequence, int8_tArray previous_txid, int32_t previous_vout) {
LDKWitness witness_ref;
witness_ref.datalen = witness->arr_len;
return tag_ptr(ret_ref, true);
}
+int8_tArray __attribute__((export_name("TS_TxIn_get_witness"))) TS_TxIn_get_witness(uint64_t txin) {
+ LDKTxIn* txin_conv = (LDKTxIn*)untag_ptr(txin);
+ LDKWitness ret_var = TxIn_get_witness(txin_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ Witness_free(ret_var);
+ return ret_arr;
+}
+
+int8_tArray __attribute__((export_name("TS_TxIn_get_script_sig"))) TS_TxIn_get_script_sig(uint64_t txin) {
+ LDKTxIn* txin_conv = (LDKTxIn*)untag_ptr(txin);
+ LDKu8slice ret_var = TxIn_get_script_sig(txin_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ return ret_arr;
+}
+
+int32_t __attribute__((export_name("TS_TxIn_get_sequence"))) TS_TxIn_get_sequence(uint64_t txin) {
+ LDKTxIn* txin_conv = (LDKTxIn*)untag_ptr(txin);
+ int32_t ret_conv = TxIn_get_sequence(txin_conv);
+ return ret_conv;
+}
+
+int8_tArray __attribute__((export_name("TS_TxIn_get_previous_txid"))) TS_TxIn_get_previous_txid(uint64_t txin) {
+ LDKTxIn* txin_conv = (LDKTxIn*)untag_ptr(txin);
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, TxIn_get_previous_txid(txin_conv).data, 32);
+ return ret_arr;
+}
+
+int32_t __attribute__((export_name("TS_TxIn_get_previous_vout"))) TS_TxIn_get_previous_vout(uint64_t txin) {
+ LDKTxIn* txin_conv = (LDKTxIn*)untag_ptr(txin);
+ int32_t ret_conv = TxIn_get_previous_vout(txin_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_TxIn_free"))) TS_TxIn_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKTxIn _res_conv = *(LDKTxIn*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ TxIn_free(_res_conv);
+}
+
uint64_t __attribute__((export_name("TS_TxOut_new"))) TS_TxOut_new(int8_tArray script_pubkey, int64_t value) {
LDKCVec_u8Z script_pubkey_ref;
script_pubkey_ref.datalen = script_pubkey->arr_len;
return tag_ptr(ret_ref, true);
}
+int8_tArray __attribute__((export_name("TS_TxOut_get_script_pubkey"))) TS_TxOut_get_script_pubkey(uint64_t txout) {
+ LDKTxOut* txout_conv = (LDKTxOut*)untag_ptr(txout);
+ LDKu8slice ret_var = TxOut_get_script_pubkey(txout_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ return ret_arr;
+}
+
+int64_t __attribute__((export_name("TS_TxOut_get_value"))) TS_TxOut_get_value(uint64_t txout) {
+ LDKTxOut* txout_conv = (LDKTxOut*)untag_ptr(txout);
+ int64_t ret_conv = TxOut_get_value(txout_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_TxOut_free"))) TS_TxOut_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
return ret_ref;
}
-static inline uint64_t C2Tuple_CVec_u8ZusizeZ_clone_ptr(LDKC2Tuple_CVec_u8ZusizeZ *NONNULL_PTR arg) {
- LDKC2Tuple_CVec_u8ZusizeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_u8ZusizeZ), "LDKC2Tuple_CVec_u8ZusizeZ");
- *ret_conv = C2Tuple_CVec_u8ZusizeZ_clone(arg);
+static inline uint64_t C2Tuple_CVec_u8Zu64Z_clone_ptr(LDKC2Tuple_CVec_u8Zu64Z *NONNULL_PTR arg) {
+ LDKC2Tuple_CVec_u8Zu64Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_u8Zu64Z), "LDKC2Tuple_CVec_u8Zu64Z");
+ *ret_conv = C2Tuple_CVec_u8Zu64Z_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_C2Tuple_CVec_u8ZusizeZ_clone_ptr"))) TS_C2Tuple_CVec_u8ZusizeZ_clone_ptr(uint64_t arg) {
- LDKC2Tuple_CVec_u8ZusizeZ* arg_conv = (LDKC2Tuple_CVec_u8ZusizeZ*)untag_ptr(arg);
- int64_t ret_conv = C2Tuple_CVec_u8ZusizeZ_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_C2Tuple_CVec_u8Zu64Z_clone_ptr"))) TS_C2Tuple_CVec_u8Zu64Z_clone_ptr(uint64_t arg) {
+ LDKC2Tuple_CVec_u8Zu64Z* arg_conv = (LDKC2Tuple_CVec_u8Zu64Z*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_CVec_u8Zu64Z_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_C2Tuple_CVec_u8ZusizeZ_clone"))) TS_C2Tuple_CVec_u8ZusizeZ_clone(uint64_t orig) {
- LDKC2Tuple_CVec_u8ZusizeZ* orig_conv = (LDKC2Tuple_CVec_u8ZusizeZ*)untag_ptr(orig);
- LDKC2Tuple_CVec_u8ZusizeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_u8ZusizeZ), "LDKC2Tuple_CVec_u8ZusizeZ");
- *ret_conv = C2Tuple_CVec_u8ZusizeZ_clone(orig_conv);
+uint64_t __attribute__((export_name("TS_C2Tuple_CVec_u8Zu64Z_clone"))) TS_C2Tuple_CVec_u8Zu64Z_clone(uint64_t orig) {
+ LDKC2Tuple_CVec_u8Zu64Z* orig_conv = (LDKC2Tuple_CVec_u8Zu64Z*)untag_ptr(orig);
+ LDKC2Tuple_CVec_u8Zu64Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_u8Zu64Z), "LDKC2Tuple_CVec_u8Zu64Z");
+ *ret_conv = C2Tuple_CVec_u8Zu64Z_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_C2Tuple_CVec_u8ZusizeZ_new"))) TS_C2Tuple_CVec_u8ZusizeZ_new(int8_tArray a, uint32_t b) {
+uint64_t __attribute__((export_name("TS_C2Tuple_CVec_u8Zu64Z_new"))) TS_C2Tuple_CVec_u8Zu64Z_new(int8_tArray a, int64_t b) {
LDKCVec_u8Z a_ref;
a_ref.datalen = a->arr_len;
a_ref.data = MALLOC(a_ref.datalen, "LDKCVec_u8Z Bytes");
memcpy(a_ref.data, a->elems, a_ref.datalen); FREE(a);
- LDKC2Tuple_CVec_u8ZusizeZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_u8ZusizeZ), "LDKC2Tuple_CVec_u8ZusizeZ");
- *ret_conv = C2Tuple_CVec_u8ZusizeZ_new(a_ref, b);
+ LDKC2Tuple_CVec_u8Zu64Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_u8Zu64Z), "LDKC2Tuple_CVec_u8Zu64Z");
+ *ret_conv = C2Tuple_CVec_u8Zu64Z_new(a_ref, b);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_C2Tuple_CVec_u8ZusizeZ_free"))) TS_C2Tuple_CVec_u8ZusizeZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_C2Tuple_CVec_u8Zu64Z_free"))) TS_C2Tuple_CVec_u8Zu64Z_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKC2Tuple_CVec_u8ZusizeZ _res_conv = *(LDKC2Tuple_CVec_u8ZusizeZ*)(_res_ptr);
+ LDKC2Tuple_CVec_u8Zu64Z _res_conv = *(LDKC2Tuple_CVec_u8Zu64Z*)(_res_ptr);
FREE(untag_ptr(_res));
- C2Tuple_CVec_u8ZusizeZ_free(_res_conv);
+ C2Tuple_CVec_u8Zu64Z_free(_res_conv);
}
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_ok"))) TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_ok(uint64_t o) {
+uint64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok"))) TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
- LDKC2Tuple_CVec_u8ZusizeZ o_conv = *(LDKC2Tuple_CVec_u8ZusizeZ*)(o_ptr);
- o_conv = C2Tuple_CVec_u8ZusizeZ_clone((LDKC2Tuple_CVec_u8ZusizeZ*)untag_ptr(o));
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ), "LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ");
- *ret_conv = CResult_C2Tuple_CVec_u8ZusizeZNoneZ_ok(o_conv);
+ LDKC2Tuple_CVec_u8Zu64Z o_conv = *(LDKC2Tuple_CVec_u8Zu64Z*)(o_ptr);
+ o_conv = C2Tuple_CVec_u8Zu64Z_clone((LDKC2Tuple_CVec_u8Zu64Z*)untag_ptr(o));
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ), "LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ");
+ *ret_conv = CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_err"))) TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_err() {
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ), "LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ");
- *ret_conv = CResult_C2Tuple_CVec_u8ZusizeZNoneZ_err();
+uint64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_err"))) TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_err() {
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ), "LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ");
+ *ret_conv = CResult_C2Tuple_CVec_u8Zu64ZNoneZ_err();
return tag_ptr(ret_conv, true);
}
-jboolean __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_is_ok"))) TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_is_ok(uint64_t o) {
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* o_conv = (LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_C2Tuple_CVec_u8ZusizeZNoneZ_is_ok(o_conv);
+jboolean __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_is_ok"))) TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_is_ok(uint64_t o) {
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* o_conv = (LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C2Tuple_CVec_u8Zu64ZNoneZ_is_ok(o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_free"))) TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free"))) TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ _res_conv = *(LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ*)(_res_ptr);
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ _res_conv = *(LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_C2Tuple_CVec_u8ZusizeZNoneZ_free(_res_conv);
+ CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free(_res_conv);
}
-static inline uint64_t CResult_C2Tuple_CVec_u8ZusizeZNoneZ_clone_ptr(LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ *NONNULL_PTR arg) {
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ), "LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ");
- *ret_conv = CResult_C2Tuple_CVec_u8ZusizeZNoneZ_clone(arg);
+static inline uint64_t CResult_C2Tuple_CVec_u8Zu64ZNoneZ_clone_ptr(LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ *NONNULL_PTR arg) {
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ), "LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ");
+ *ret_conv = CResult_C2Tuple_CVec_u8Zu64ZNoneZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_clone_ptr"))) TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_clone_ptr(uint64_t arg) {
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* arg_conv = (LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_C2Tuple_CVec_u8ZusizeZNoneZ_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_clone_ptr"))) TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* arg_conv = (LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_C2Tuple_CVec_u8Zu64ZNoneZ_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_clone"))) TS_CResult_C2Tuple_CVec_u8ZusizeZNoneZ_clone(uint64_t orig) {
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* orig_conv = (LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ*)untag_ptr(orig);
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ), "LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ");
- *ret_conv = CResult_C2Tuple_CVec_u8ZusizeZNoneZ_clone(orig_conv);
+uint64_t __attribute__((export_name("TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_clone"))) TS_CResult_C2Tuple_CVec_u8Zu64ZNoneZ_clone(uint64_t orig) {
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* orig_conv = (LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ*)untag_ptr(orig);
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ), "LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ");
+ *ret_conv = CResult_C2Tuple_CVec_u8Zu64ZNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_ok"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_ok(uint64_t o) {
+ LDKChannelDerivationParameters o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = ChannelDerivationParameters_clone(&o_conv);
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
+ *ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_err"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
+ *ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_is_ok"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* o_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_free"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ _res_conv = *(LDKCResult_ChannelDerivationParametersDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ChannelDerivationParametersDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ChannelDerivationParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelDerivationParametersDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
+ *ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_clone_ptr"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* arg_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_clone"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* orig_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
+ *ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_ok"))) TS_CResult_HTLCDescriptorDecodeErrorZ_ok(uint64_t o) {
+ LDKHTLCDescriptor o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = HTLCDescriptor_clone(&o_conv);
+ LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
+ *ret_conv = CResult_HTLCDescriptorDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_err"))) TS_CResult_HTLCDescriptorDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
+ *ret_conv = CResult_HTLCDescriptorDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_is_ok"))) TS_CResult_HTLCDescriptorDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_HTLCDescriptorDecodeErrorZ* o_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_HTLCDescriptorDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_free"))) TS_CResult_HTLCDescriptorDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_HTLCDescriptorDecodeErrorZ _res_conv = *(LDKCResult_HTLCDescriptorDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_HTLCDescriptorDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_HTLCDescriptorDecodeErrorZ_clone_ptr(LDKCResult_HTLCDescriptorDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
+ *ret_conv = CResult_HTLCDescriptorDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_clone_ptr"))) TS_CResult_HTLCDescriptorDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_HTLCDescriptorDecodeErrorZ* arg_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_HTLCDescriptorDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_clone"))) TS_CResult_HTLCDescriptorDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_HTLCDescriptorDecodeErrorZ* orig_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
+ *ret_conv = CResult_HTLCDescriptorDecodeErrorZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_CVec_ECDSASignatureZ_free"))) TS_CVec_ECDSASignatureZ_free(ptrArray _res) {
- LDKCVec_ECDSASignatureZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKECDSASignature), "LDKCVec_ECDSASignatureZ Elements");
- else
- _res_constr.data = NULL;
- int8_tArray* _res_vals = (void*) _res->elems;
- for (size_t m = 0; m < _res_constr.datalen; m++) {
- int8_tArray _res_conv_12 = _res_vals[m];
- LDKECDSASignature _res_conv_12_ref;
- CHECK(_res_conv_12->arr_len == 64);
- memcpy(_res_conv_12_ref.compact_form, _res_conv_12->elems, 64); FREE(_res_conv_12);
- _res_constr.data[m] = _res_conv_12_ref;
- }
- FREE(_res);
- CVec_ECDSASignatureZ_free(_res_constr);
-}
-
-static inline uint64_t C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone_ptr(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR arg) {
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ), "LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ");
- *ret_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone_ptr"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone_ptr(uint64_t arg) {
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* arg_conv = (LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(arg);
- int64_t ret_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone(uint64_t orig) {
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* orig_conv = (LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(orig);
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ), "LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ");
- *ret_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_new"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_new(int8_tArray a, ptrArray b) {
- LDKECDSASignature a_ref;
- CHECK(a->arr_len == 64);
- memcpy(a_ref.compact_form, a->elems, 64); FREE(a);
- LDKCVec_ECDSASignatureZ b_constr;
- b_constr.datalen = b->arr_len;
- if (b_constr.datalen > 0)
- b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKECDSASignature), "LDKCVec_ECDSASignatureZ Elements");
- else
- b_constr.data = NULL;
- int8_tArray* b_vals = (void*) b->elems;
- for (size_t m = 0; m < b_constr.datalen; m++) {
- int8_tArray b_conv_12 = b_vals[m];
- LDKECDSASignature b_conv_12_ref;
- CHECK(b_conv_12->arr_len == 64);
- memcpy(b_conv_12_ref.compact_form, b_conv_12->elems, 64); FREE(b_conv_12);
- b_constr.data[m] = b_conv_12_ref;
- }
- FREE(b);
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ), "LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ");
- *ret_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_new(a_ref, b_constr);
- return tag_ptr(ret_conv, true);
-}
-
-void __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_free"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ _res_conv = *(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_free(_res_conv);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(uint64_t o) {
- void* o_ptr = untag_ptr(o);
- CHECK_ACCESS(o_ptr);
- LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ o_conv = *(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)(o_ptr);
- o_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone((LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(o));
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
- *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_err"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_err() {
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
- *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-jboolean __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok(uint64_t o) {
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* o_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ _res_conv = *(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone_ptr(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ *NONNULL_PTR arg) {
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
- *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone_ptr"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone_ptr(uint64_t arg) {
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* arg_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone(uint64_t orig) {
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* orig_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(orig);
- LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
- *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_ok"))) TS_CResult_ECDSASignatureNoneZ_ok(int8_tArray o) {
- LDKECDSASignature o_ref;
- CHECK(o->arr_len == 64);
- memcpy(o_ref.compact_form, o->elems, 64); FREE(o);
- LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
- *ret_conv = CResult_ECDSASignatureNoneZ_ok(o_ref);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_err"))) TS_CResult_ECDSASignatureNoneZ_err() {
- LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
- *ret_conv = CResult_ECDSASignatureNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-jboolean __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_is_ok"))) TS_CResult_ECDSASignatureNoneZ_is_ok(uint64_t o) {
- LDKCResult_ECDSASignatureNoneZ* o_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ECDSASignatureNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_free"))) TS_CResult_ECDSASignatureNoneZ_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_ECDSASignatureNoneZ _res_conv = *(LDKCResult_ECDSASignatureNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_ECDSASignatureNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_ECDSASignatureNoneZ_clone_ptr(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR arg) {
- LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
- *ret_conv = CResult_ECDSASignatureNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_clone_ptr"))) TS_CResult_ECDSASignatureNoneZ_clone_ptr(uint64_t arg) {
- LDKCResult_ECDSASignatureNoneZ* arg_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ECDSASignatureNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_clone"))) TS_CResult_ECDSASignatureNoneZ_clone(uint64_t orig) {
- LDKCResult_ECDSASignatureNoneZ* orig_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(orig);
- LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
- *ret_conv = CResult_ECDSASignatureNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
uint64_t __attribute__((export_name("TS_CResult_PublicKeyNoneZ_ok"))) TS_CResult_PublicKeyNoneZ_ok(int8_tArray o) {
LDKPublicKey o_ref;
CHECK(o->arr_len == 33);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_ok"))) TS_CResult_ECDSASignatureNoneZ_ok(int8_tArray o) {
+ LDKECDSASignature o_ref;
+ CHECK(o->arr_len == 64);
+ memcpy(o_ref.compact_form, o->elems, 64); FREE(o);
+ LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
+ *ret_conv = CResult_ECDSASignatureNoneZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_err"))) TS_CResult_ECDSASignatureNoneZ_err() {
+ LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
+ *ret_conv = CResult_ECDSASignatureNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_is_ok"))) TS_CResult_ECDSASignatureNoneZ_is_ok(uint64_t o) {
+ LDKCResult_ECDSASignatureNoneZ* o_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ECDSASignatureNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_free"))) TS_CResult_ECDSASignatureNoneZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ECDSASignatureNoneZ _res_conv = *(LDKCResult_ECDSASignatureNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ECDSASignatureNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ECDSASignatureNoneZ_clone_ptr(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR arg) {
+ LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
+ *ret_conv = CResult_ECDSASignatureNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_clone_ptr"))) TS_CResult_ECDSASignatureNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_ECDSASignatureNoneZ* arg_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ECDSASignatureNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_ECDSASignatureNoneZ_clone"))) TS_CResult_ECDSASignatureNoneZ_clone(uint64_t orig) {
+ LDKCResult_ECDSASignatureNoneZ* orig_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(orig);
+ LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
+ *ret_conv = CResult_ECDSASignatureNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok"))) TS_CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return ret_ref;
}
-void __attribute__((export_name("TS_CVec_CVec_u8ZZ_free"))) TS_CVec_CVec_u8ZZ_free(ptrArray _res) {
- LDKCVec_CVec_u8ZZ _res_constr;
+uint64_t __attribute__((export_name("TS_CResult_WitnessNoneZ_ok"))) TS_CResult_WitnessNoneZ_ok(int8_tArray o) {
+ LDKWitness o_ref;
+ o_ref.datalen = o->arr_len;
+ o_ref.data = MALLOC(o_ref.datalen, "LDKWitness Bytes");
+ memcpy(o_ref.data, o->elems, o_ref.datalen); FREE(o);
+ o_ref.data_is_owned = true;
+ LDKCResult_WitnessNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_WitnessNoneZ), "LDKCResult_WitnessNoneZ");
+ *ret_conv = CResult_WitnessNoneZ_ok(o_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_WitnessNoneZ_err"))) TS_CResult_WitnessNoneZ_err() {
+ LDKCResult_WitnessNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_WitnessNoneZ), "LDKCResult_WitnessNoneZ");
+ *ret_conv = CResult_WitnessNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_WitnessNoneZ_is_ok"))) TS_CResult_WitnessNoneZ_is_ok(uint64_t o) {
+ LDKCResult_WitnessNoneZ* o_conv = (LDKCResult_WitnessNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_WitnessNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_WitnessNoneZ_free"))) TS_CResult_WitnessNoneZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_WitnessNoneZ _res_conv = *(LDKCResult_WitnessNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_WitnessNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_WitnessNoneZ_clone_ptr(LDKCResult_WitnessNoneZ *NONNULL_PTR arg) {
+ LDKCResult_WitnessNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_WitnessNoneZ), "LDKCResult_WitnessNoneZ");
+ *ret_conv = CResult_WitnessNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_WitnessNoneZ_clone_ptr"))) TS_CResult_WitnessNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_WitnessNoneZ* arg_conv = (LDKCResult_WitnessNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_WitnessNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_WitnessNoneZ_clone"))) TS_CResult_WitnessNoneZ_clone(uint64_t orig) {
+ LDKCResult_WitnessNoneZ* orig_conv = (LDKCResult_WitnessNoneZ*)untag_ptr(orig);
+ LDKCResult_WitnessNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_WitnessNoneZ), "LDKCResult_WitnessNoneZ");
+ *ret_conv = CResult_WitnessNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_CVec_ECDSASignatureZ_free"))) TS_CVec_ECDSASignatureZ_free(ptrArray _res) {
+ LDKCVec_ECDSASignatureZ _res_constr;
_res_constr.datalen = _res->arr_len;
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_u8Z), "LDKCVec_CVec_u8ZZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKECDSASignature), "LDKCVec_ECDSASignatureZ Elements");
else
_res_constr.data = NULL;
int8_tArray* _res_vals = (void*) _res->elems;
for (size_t m = 0; m < _res_constr.datalen; m++) {
int8_tArray _res_conv_12 = _res_vals[m];
- LDKCVec_u8Z _res_conv_12_ref;
- _res_conv_12_ref.datalen = _res_conv_12->arr_len;
- _res_conv_12_ref.data = MALLOC(_res_conv_12_ref.datalen, "LDKCVec_u8Z Bytes");
- memcpy(_res_conv_12_ref.data, _res_conv_12->elems, _res_conv_12_ref.datalen); FREE(_res_conv_12);
+ LDKECDSASignature _res_conv_12_ref;
+ CHECK(_res_conv_12->arr_len == 64);
+ memcpy(_res_conv_12_ref.compact_form, _res_conv_12->elems, 64); FREE(_res_conv_12);
_res_constr.data[m] = _res_conv_12_ref;
}
FREE(_res);
- CVec_CVec_u8ZZ_free(_res_constr);
+ CVec_ECDSASignatureZ_free(_res_constr);
}
-uint64_t __attribute__((export_name("TS_CResult_CVec_CVec_u8ZZNoneZ_ok"))) TS_CResult_CVec_CVec_u8ZZNoneZ_ok(ptrArray o) {
- LDKCVec_CVec_u8ZZ o_constr;
- o_constr.datalen = o->arr_len;
- if (o_constr.datalen > 0)
- o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKCVec_u8Z), "LDKCVec_CVec_u8ZZ Elements");
+static inline uint64_t C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone_ptr(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR arg) {
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ), "LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ");
+ *ret_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone_ptr"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone_ptr(uint64_t arg) {
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* arg_conv = (LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone(uint64_t orig) {
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* orig_conv = (LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(orig);
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ), "LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ");
+ *ret_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_new"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_new(int8_tArray a, ptrArray b) {
+ LDKECDSASignature a_ref;
+ CHECK(a->arr_len == 64);
+ memcpy(a_ref.compact_form, a->elems, 64); FREE(a);
+ LDKCVec_ECDSASignatureZ b_constr;
+ b_constr.datalen = b->arr_len;
+ if (b_constr.datalen > 0)
+ b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKECDSASignature), "LDKCVec_ECDSASignatureZ Elements");
else
- o_constr.data = NULL;
- int8_tArray* o_vals = (void*) o->elems;
- for (size_t m = 0; m < o_constr.datalen; m++) {
- int8_tArray o_conv_12 = o_vals[m];
- LDKCVec_u8Z o_conv_12_ref;
- o_conv_12_ref.datalen = o_conv_12->arr_len;
- o_conv_12_ref.data = MALLOC(o_conv_12_ref.datalen, "LDKCVec_u8Z Bytes");
- memcpy(o_conv_12_ref.data, o_conv_12->elems, o_conv_12_ref.datalen); FREE(o_conv_12);
- o_constr.data[m] = o_conv_12_ref;
+ b_constr.data = NULL;
+ int8_tArray* b_vals = (void*) b->elems;
+ for (size_t m = 0; m < b_constr.datalen; m++) {
+ int8_tArray b_conv_12 = b_vals[m];
+ LDKECDSASignature b_conv_12_ref;
+ CHECK(b_conv_12->arr_len == 64);
+ memcpy(b_conv_12_ref.compact_form, b_conv_12->elems, 64); FREE(b_conv_12);
+ b_constr.data[m] = b_conv_12_ref;
}
- FREE(o);
- LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
- *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_ok(o_constr);
+ FREE(b);
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ), "LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ");
+ *ret_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_new(a_ref, b_constr);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_CVec_CVec_u8ZZNoneZ_err"))) TS_CResult_CVec_CVec_u8ZZNoneZ_err() {
- LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
- *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_err();
+void __attribute__((export_name("TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_free"))) TS_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ _res_conv = *(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_free(_res_conv);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ o_conv = *(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)(o_ptr);
+ o_conv = C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone((LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ*)untag_ptr(o));
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
+ *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-jboolean __attribute__((export_name("TS_CResult_CVec_CVec_u8ZZNoneZ_is_ok"))) TS_CResult_CVec_CVec_u8ZZNoneZ_is_ok(uint64_t o) {
- LDKCResult_CVec_CVec_u8ZZNoneZ* o_conv = (LDKCResult_CVec_CVec_u8ZZNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_CVec_CVec_u8ZZNoneZ_is_ok(o_conv);
+uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_err"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_err() {
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
+ *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok(uint64_t o) {
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* o_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok(o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_CResult_CVec_CVec_u8ZZNoneZ_free"))) TS_CResult_CVec_CVec_u8ZZNoneZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_CVec_CVec_u8ZZNoneZ _res_conv = *(LDKCResult_CVec_CVec_u8ZZNoneZ*)(_res_ptr);
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ _res_conv = *(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_CVec_CVec_u8ZZNoneZ_free(_res_conv);
+ CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(_res_conv);
}
-static inline uint64_t CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR arg) {
- LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
- *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_clone(arg);
+static inline uint64_t CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone_ptr(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ *NONNULL_PTR arg) {
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
+ *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_CResult_CVec_CVec_u8ZZNoneZ_clone_ptr"))) TS_CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(uint64_t arg) {
- LDKCResult_CVec_CVec_u8ZZNoneZ* arg_conv = (LDKCResult_CVec_CVec_u8ZZNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone_ptr"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* arg_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_CResult_CVec_CVec_u8ZZNoneZ_clone"))) TS_CResult_CVec_CVec_u8ZZNoneZ_clone(uint64_t orig) {
- LDKCResult_CVec_CVec_u8ZZNoneZ* orig_conv = (LDKCResult_CVec_CVec_u8ZZNoneZ*)untag_ptr(orig);
- LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
- *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_clone(orig_conv);
+uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone"))) TS_CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone(uint64_t orig) {
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* orig_conv = (LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ*)untag_ptr(orig);
+ LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ), "LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ");
+ *ret_conv = CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
+static inline uint64_t C2Tuple_BlindedPayInfoBlindedPathZ_clone_ptr(LDKC2Tuple_BlindedPayInfoBlindedPathZ *NONNULL_PTR arg) {
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKC2Tuple_BlindedPayInfoBlindedPathZ");
+ *ret_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_clone_ptr"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_clone_ptr(uint64_t arg) {
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ* arg_conv = (LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_clone"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_clone(uint64_t orig) {
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ* orig_conv = (LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(orig);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKC2Tuple_BlindedPayInfoBlindedPathZ");
+ *ret_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_new"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_new(uint64_t a, uint64_t b) {
+ LDKBlindedPayInfo a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = BlindedPayInfo_clone(&a_conv);
+ LDKBlindedPath b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv = BlindedPath_clone(&b_conv);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKC2Tuple_BlindedPayInfoBlindedPathZ");
+ *ret_conv = C2Tuple_BlindedPayInfoBlindedPathZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_free"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ _res_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_BlindedPayInfoBlindedPathZ_free(_res_conv);
+}
+
+void __attribute__((export_name("TS_CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_free"))) TS_CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_free(uint64_tArray _res) {
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ _res_constr.data = NULL;
+ uint64_t* _res_vals = _res->elems;
+ for (size_t l = 0; l < _res_constr.datalen; l++) {
+ uint64_t _res_conv_37 = _res_vals[l];
+ void* _res_conv_37_ptr = untag_ptr(_res_conv_37);
+ CHECK_ACCESS(_res_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ _res_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(_res_conv_37_ptr);
+ FREE(untag_ptr(_res_conv_37));
+ _res_constr.data[l] = _res_conv_37_conv;
+ }
+ FREE(_res);
+ CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_free(_res_constr);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok"))) TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(uint64_tArray o) {
+ LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ o_constr;
+ o_constr.datalen = o->arr_len;
+ if (o_constr.datalen > 0)
+ o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+ else
+ o_constr.data = NULL;
+ uint64_t* o_vals = o->elems;
+ for (size_t l = 0; l < o_constr.datalen; l++) {
+ uint64_t o_conv_37 = o_vals[l];
+ void* o_conv_37_ptr = untag_ptr(o_conv_37);
+ CHECK_ACCESS(o_conv_37_ptr);
+ LDKC2Tuple_BlindedPayInfoBlindedPathZ o_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(o_conv_37_ptr);
+ o_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(o_conv_37));
+ o_constr.data[l] = o_conv_37_conv;
+ }
+ FREE(o);
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ), "LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ");
+ *ret_conv = CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(o_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_err"))) TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_err() {
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ), "LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ");
+ *ret_conv = CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_is_ok"))) TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_is_ok(uint64_t o) {
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* o_conv = (LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free"))) TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ _res_conv = *(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_clone_ptr(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ *NONNULL_PTR arg) {
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ), "LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ");
+ *ret_conv = CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_clone_ptr"))) TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* arg_conv = (LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_clone"))) TS_CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_clone(uint64_t orig) {
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* orig_conv = (LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ*)untag_ptr(orig);
+ LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ), "LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ");
+ *ret_conv = CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_CVec_PublicKeyZ_free"))) TS_CVec_PublicKeyZ_free(ptrArray _res) {
+ LDKCVec_PublicKeyZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ _res_constr.data = NULL;
+ int8_tArray* _res_vals = (void*) _res->elems;
+ for (size_t m = 0; m < _res_constr.datalen; m++) {
+ int8_tArray _res_conv_12 = _res_vals[m];
+ LDKPublicKey _res_conv_12_ref;
+ CHECK(_res_conv_12->arr_len == 33);
+ memcpy(_res_conv_12_ref.compressed_form, _res_conv_12->elems, 33); FREE(_res_conv_12);
+ _res_constr.data[m] = _res_conv_12_ref;
+ }
+ FREE(_res);
+ CVec_PublicKeyZ_free(_res_constr);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_ok"))) TS_CResult_OnionMessagePathNoneZ_ok(uint64_t o) {
+ LDKOnionMessagePath o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = OnionMessagePath_clone(&o_conv);
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_err"))) TS_CResult_OnionMessagePathNoneZ_err() {
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_is_ok"))) TS_CResult_OnionMessagePathNoneZ_is_ok(uint64_t o) {
+ LDKCResult_OnionMessagePathNoneZ* o_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OnionMessagePathNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_free"))) TS_CResult_OnionMessagePathNoneZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OnionMessagePathNoneZ _res_conv = *(LDKCResult_OnionMessagePathNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OnionMessagePathNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OnionMessagePathNoneZ_clone_ptr(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR arg) {
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_clone_ptr"))) TS_CResult_OnionMessagePathNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_OnionMessagePathNoneZ* arg_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OnionMessagePathNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_clone"))) TS_CResult_OnionMessagePathNoneZ_clone(uint64_t orig) {
+ LDKCResult_OnionMessagePathNoneZ* orig_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(orig);
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_CVec_BlindedPathZNoneZ_ok"))) TS_CResult_CVec_BlindedPathZNoneZ_ok(uint64_tArray o) {
+ LDKCVec_BlindedPathZ o_constr;
+ o_constr.datalen = o->arr_len;
+ if (o_constr.datalen > 0)
+ o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKBlindedPath), "LDKCVec_BlindedPathZ Elements");
+ else
+ o_constr.data = NULL;
+ uint64_t* o_vals = o->elems;
+ for (size_t n = 0; n < o_constr.datalen; n++) {
+ uint64_t o_conv_13 = o_vals[n];
+ LDKBlindedPath o_conv_13_conv;
+ o_conv_13_conv.inner = untag_ptr(o_conv_13);
+ o_conv_13_conv.is_owned = ptr_is_owned(o_conv_13);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv_13_conv);
+ o_conv_13_conv = BlindedPath_clone(&o_conv_13_conv);
+ o_constr.data[n] = o_conv_13_conv;
+ }
+ FREE(o);
+ LDKCResult_CVec_BlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedPathZNoneZ), "LDKCResult_CVec_BlindedPathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedPathZNoneZ_ok(o_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_CVec_BlindedPathZNoneZ_err"))) TS_CResult_CVec_BlindedPathZNoneZ_err() {
+ LDKCResult_CVec_BlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedPathZNoneZ), "LDKCResult_CVec_BlindedPathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedPathZNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_CVec_BlindedPathZNoneZ_is_ok"))) TS_CResult_CVec_BlindedPathZNoneZ_is_ok(uint64_t o) {
+ LDKCResult_CVec_BlindedPathZNoneZ* o_conv = (LDKCResult_CVec_BlindedPathZNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_CVec_BlindedPathZNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_CVec_BlindedPathZNoneZ_free"))) TS_CResult_CVec_BlindedPathZNoneZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_CVec_BlindedPathZNoneZ _res_conv = *(LDKCResult_CVec_BlindedPathZNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_CVec_BlindedPathZNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_CVec_BlindedPathZNoneZ_clone_ptr(LDKCResult_CVec_BlindedPathZNoneZ *NONNULL_PTR arg) {
+ LDKCResult_CVec_BlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedPathZNoneZ), "LDKCResult_CVec_BlindedPathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedPathZNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_CVec_BlindedPathZNoneZ_clone_ptr"))) TS_CResult_CVec_BlindedPathZNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_CVec_BlindedPathZNoneZ* arg_conv = (LDKCResult_CVec_BlindedPathZNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_CVec_BlindedPathZNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_CVec_BlindedPathZNoneZ_clone"))) TS_CResult_CVec_BlindedPathZNoneZ_clone(uint64_t orig) {
+ LDKCResult_CVec_BlindedPathZNoneZ* orig_conv = (LDKCResult_CVec_BlindedPathZNoneZ*)untag_ptr(orig);
+ LDKCResult_CVec_BlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedPathZNoneZ), "LDKCResult_CVec_BlindedPathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedPathZNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_ok"))) TS_CResult_InFlightHtlcsDecodeErrorZ_ok(uint64_t o) {
LDKInFlightHtlcs o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
-static inline uint64_t C2Tuple_BlindedPayInfoBlindedPathZ_clone_ptr(LDKC2Tuple_BlindedPayInfoBlindedPathZ *NONNULL_PTR arg) {
- LDKC2Tuple_BlindedPayInfoBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKC2Tuple_BlindedPayInfoBlindedPathZ");
- *ret_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_clone_ptr"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_clone_ptr(uint64_t arg) {
- LDKC2Tuple_BlindedPayInfoBlindedPathZ* arg_conv = (LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(arg);
- int64_t ret_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_clone"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_clone(uint64_t orig) {
- LDKC2Tuple_BlindedPayInfoBlindedPathZ* orig_conv = (LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(orig);
- LDKC2Tuple_BlindedPayInfoBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKC2Tuple_BlindedPayInfoBlindedPathZ");
- *ret_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_new"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_new(uint64_t a, uint64_t b) {
- LDKBlindedPayInfo a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv = BlindedPayInfo_clone(&a_conv);
- LDKBlindedPath b_conv;
- b_conv.inner = untag_ptr(b);
- b_conv.is_owned = ptr_is_owned(b);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
- b_conv = BlindedPath_clone(&b_conv);
- LDKC2Tuple_BlindedPayInfoBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKC2Tuple_BlindedPayInfoBlindedPathZ");
- *ret_conv = C2Tuple_BlindedPayInfoBlindedPathZ_new(a_conv, b_conv);
- return tag_ptr(ret_conv, true);
-}
-
-void __attribute__((export_name("TS_C2Tuple_BlindedPayInfoBlindedPathZ_free"))) TS_C2Tuple_BlindedPayInfoBlindedPathZ_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKC2Tuple_BlindedPayInfoBlindedPathZ _res_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- C2Tuple_BlindedPayInfoBlindedPathZ_free(_res_conv);
-}
-
-void __attribute__((export_name("TS_CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_free"))) TS_CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_free(uint64_tArray _res) {
- LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
- else
- _res_constr.data = NULL;
- uint64_t* _res_vals = _res->elems;
- for (size_t l = 0; l < _res_constr.datalen; l++) {
- uint64_t _res_conv_37 = _res_vals[l];
- void* _res_conv_37_ptr = untag_ptr(_res_conv_37);
- CHECK_ACCESS(_res_conv_37_ptr);
- LDKC2Tuple_BlindedPayInfoBlindedPathZ _res_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(_res_conv_37_ptr);
- FREE(untag_ptr(_res_conv_37));
- _res_constr.data[l] = _res_conv_37_conv;
- }
- FREE(_res);
- CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_free(_res_constr);
-}
-
void __attribute__((export_name("TS_CVec_RouteHintZ_free"))) TS_CVec_RouteHintZ_free(uint64_tArray _res) {
LDKCVec_RouteHintZ _res_constr;
_res_constr.datalen = _res->arr_len;
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_CVec_PublicKeyZ_free"))) TS_CVec_PublicKeyZ_free(ptrArray _res) {
- LDKCVec_PublicKeyZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
- else
- _res_constr.data = NULL;
- int8_tArray* _res_vals = (void*) _res->elems;
- for (size_t m = 0; m < _res_constr.datalen; m++) {
- int8_tArray _res_conv_12 = _res_vals[m];
- LDKPublicKey _res_conv_12_ref;
- CHECK(_res_conv_12->arr_len == 33);
- memcpy(_res_conv_12_ref.compressed_form, _res_conv_12->elems, 33); FREE(_res_conv_12);
- _res_constr.data[m] = _res_conv_12_ref;
- }
- FREE(_res);
- CVec_PublicKeyZ_free(_res_constr);
-}
-
uint64_t __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_ok"))) TS_CResult_FixedPenaltyScorerDecodeErrorZ_ok(uint64_t o) {
LDKFixedPenaltyScorer o_conv;
o_conv.inner = untag_ptr(o);
CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
}
-static inline uint64_t C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ *NONNULL_PTR arg) {
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ), "LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ");
- *ret_conv = C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone(arg);
+static inline uint64_t C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ *NONNULL_PTR arg) {
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ), "LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ");
+ *ret_conv = C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone_ptr"))) TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone_ptr(uint64_t arg) {
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ*)untag_ptr(arg);
- int64_t ret_conv = C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone_ptr"))) TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone_ptr(uint64_t arg) {
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ*)untag_ptr(arg);
+ int64_t ret_conv = C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone"))) TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone(uint64_t orig) {
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ*)untag_ptr(orig);
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ), "LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ");
- *ret_conv = C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_clone(orig_conv);
+uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone"))) TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone(uint64_t orig) {
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ*)untag_ptr(orig);
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ), "LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ");
+ *ret_conv = C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_new"))) TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_new(int8_tArray a, uint64_t b) {
+uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_new"))) TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_new(int8_tArray a, int32_t b, uint64_t c) {
LDKThirtyTwoBytes a_ref;
CHECK(a->arr_len == 32);
memcpy(a_ref.data, a->elems, 32); FREE(a);
- void* b_ptr = untag_ptr(b);
- CHECK_ACCESS(b_ptr);
- LDKCOption_ThirtyTwoBytesZ b_conv = *(LDKCOption_ThirtyTwoBytesZ*)(b_ptr);
- b_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(b));
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ), "LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ");
- *ret_conv = C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_new(a_ref, b_conv);
+ void* c_ptr = untag_ptr(c);
+ CHECK_ACCESS(c_ptr);
+ LDKCOption_ThirtyTwoBytesZ c_conv = *(LDKCOption_ThirtyTwoBytesZ*)(c_ptr);
+ c_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(c));
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ), "LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ");
+ *ret_conv = C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_new(a_ref, b, c_conv);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_free"))) TS_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_free"))) TS_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ*)(_res_ptr);
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ*)(_res_ptr);
FREE(untag_ptr(_res));
- C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ_free(_res_conv);
+ C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_free(_res_conv);
}
-void __attribute__((export_name("TS_CVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ_free"))) TS_CVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ_free(uint64_tArray _res) {
- LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ _res_constr;
+void __attribute__((export_name("TS_CVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ_free"))) TS_CVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ_free(uint64_tArray _res) {
+ LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ _res_constr;
_res_constr.datalen = _res->arr_len;
if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ), "LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ Elements");
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ), "LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ Elements");
else
_res_constr.data = NULL;
uint64_t* _res_vals = _res->elems;
- for (size_t x = 0; x < _res_constr.datalen; x++) {
- uint64_t _res_conv_49 = _res_vals[x];
- void* _res_conv_49_ptr = untag_ptr(_res_conv_49);
- CHECK_ACCESS(_res_conv_49_ptr);
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ _res_conv_49_conv = *(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ*)(_res_conv_49_ptr);
- FREE(untag_ptr(_res_conv_49));
- _res_constr.data[x] = _res_conv_49_conv;
+ for (size_t c = 0; c < _res_constr.datalen; c++) {
+ uint64_t _res_conv_54 = _res_vals[c];
+ void* _res_conv_54_ptr = untag_ptr(_res_conv_54);
+ CHECK_ACCESS(_res_conv_54_ptr);
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ _res_conv_54_conv = *(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ*)(_res_conv_54_ptr);
+ FREE(untag_ptr(_res_conv_54));
+ _res_constr.data[c] = _res_conv_54_conv;
}
FREE(_res);
- CVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ_free(_res_constr);
+ CVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ_free(_res_constr);
}
uint64_t __attribute__((export_name("TS_CResult_ChannelMonitorUpdateStatusNoneZ_ok"))) TS_CResult_ChannelMonitorUpdateStatusNoneZ_ok(uint32_t o) {
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_ok"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_ok(uint64_t o) {
- LDKChannelDerivationParameters o_conv;
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_ok"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_ok(uint64_t o) {
+ LDKPendingHTLCInfo o_conv;
o_conv.inner = untag_ptr(o);
o_conv.is_owned = ptr_is_owned(o);
CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
- o_conv = ChannelDerivationParameters_clone(&o_conv);
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
- *ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_ok(o_conv);
+ o_conv = PendingHTLCInfo_clone(&o_conv);
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+ *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_err"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_err(uint64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
- e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
- *ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_is_ok"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_is_ok(uint64_t o) {
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* o_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_free"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_ChannelDerivationParametersDecodeErrorZ _res_conv = *(LDKCResult_ChannelDerivationParametersDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_ChannelDerivationParametersDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_ChannelDerivationParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelDerivationParametersDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
- *ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_clone_ptr"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_clone_ptr(uint64_t arg) {
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* arg_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CResult_ChannelDerivationParametersDecodeErrorZ_clone"))) TS_CResult_ChannelDerivationParametersDecodeErrorZ_clone(uint64_t orig) {
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* orig_conv = (LDKCResult_ChannelDerivationParametersDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
- *ret_conv = CResult_ChannelDerivationParametersDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_ok"))) TS_CResult_HTLCDescriptorDecodeErrorZ_ok(uint64_t o) {
- LDKHTLCDescriptor o_conv;
- o_conv.inner = untag_ptr(o);
- o_conv.is_owned = ptr_is_owned(o);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
- o_conv = HTLCDescriptor_clone(&o_conv);
- LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
- *ret_conv = CResult_HTLCDescriptorDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_err"))) TS_CResult_HTLCDescriptorDecodeErrorZ_err(uint64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
- e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
- LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
- *ret_conv = CResult_HTLCDescriptorDecodeErrorZ_err(e_conv);
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_err"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_err(uint64_t e) {
+ LDKInboundHTLCErr e_conv;
+ e_conv.inner = untag_ptr(e);
+ e_conv.is_owned = ptr_is_owned(e);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
+ // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr
+
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+ *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_is_ok"))) TS_CResult_HTLCDescriptorDecodeErrorZ_is_ok(uint64_t o) {
- LDKCResult_HTLCDescriptorDecodeErrorZ* o_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_HTLCDescriptorDecodeErrorZ_is_ok(o_conv);
+jboolean __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(uint64_t o) {
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* o_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_free"))) TS_CResult_HTLCDescriptorDecodeErrorZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_CResult_PendingHTLCInfoInboundHTLCErrZ_free"))) TS_CResult_PendingHTLCInfoInboundHTLCErrZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_HTLCDescriptorDecodeErrorZ _res_conv = *(LDKCResult_HTLCDescriptorDecodeErrorZ*)(_res_ptr);
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ _res_conv = *(LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_HTLCDescriptorDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_HTLCDescriptorDecodeErrorZ_clone_ptr(LDKCResult_HTLCDescriptorDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
- *ret_conv = CResult_HTLCDescriptorDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_clone_ptr"))) TS_CResult_HTLCDescriptorDecodeErrorZ_clone_ptr(uint64_t arg) {
- LDKCResult_HTLCDescriptorDecodeErrorZ* arg_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_HTLCDescriptorDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CResult_HTLCDescriptorDecodeErrorZ_clone"))) TS_CResult_HTLCDescriptorDecodeErrorZ_clone(uint64_t orig) {
- LDKCResult_HTLCDescriptorDecodeErrorZ* orig_conv = (LDKCResult_HTLCDescriptorDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
- *ret_conv = CResult_HTLCDescriptorDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
+ CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv);
}
void __attribute__((export_name("TS_CVec_HTLCOutputInCommitmentZ_free"))) TS_CVec_HTLCOutputInCommitmentZ_free(uint64_tArray _res) {
CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr);
}
+uint64_t __attribute__((export_name("TS_COption_StrZ_some"))) TS_COption_StrZ_some(jstring o) {
+ LDKStr o_conv = str_ref_to_owned_c(o);
+ LDKCOption_StrZ *ret_copy = MALLOC(sizeof(LDKCOption_StrZ), "LDKCOption_StrZ");
+ *ret_copy = COption_StrZ_some(o_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_COption_StrZ_none"))) TS_COption_StrZ_none() {
+ LDKCOption_StrZ *ret_copy = MALLOC(sizeof(LDKCOption_StrZ), "LDKCOption_StrZ");
+ *ret_copy = COption_StrZ_none();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_COption_StrZ_free"))) TS_COption_StrZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_StrZ _res_conv = *(LDKCOption_StrZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_StrZ_free(_res_conv);
+}
+
+static inline uint64_t COption_StrZ_clone_ptr(LDKCOption_StrZ *NONNULL_PTR arg) {
+ LDKCOption_StrZ *ret_copy = MALLOC(sizeof(LDKCOption_StrZ), "LDKCOption_StrZ");
+ *ret_copy = COption_StrZ_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_COption_StrZ_clone_ptr"))) TS_COption_StrZ_clone_ptr(uint64_t arg) {
+ LDKCOption_StrZ* arg_conv = (LDKCOption_StrZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_StrZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_COption_StrZ_clone"))) TS_COption_StrZ_clone(uint64_t orig) {
+ LDKCOption_StrZ* orig_conv = (LDKCOption_StrZ*)untag_ptr(orig);
+ LDKCOption_StrZ *ret_copy = MALLOC(sizeof(LDKCOption_StrZ), "LDKCOption_StrZ");
+ *ret_copy = COption_StrZ_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_ok() {
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok();
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_err"))) TS_CResult_NoneBolt12SemanticErrorZ_err(uint32_t e) {
+ LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_js(e);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_is_ok"))) TS_CResult_NoneBolt12SemanticErrorZ_is_ok(uint64_t o) {
+ LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_free"))) TS_CResult_NoneBolt12SemanticErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_NoneBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) {
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr"))) TS_CResult_NoneBolt12SemanticErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_NoneBolt12SemanticErrorZ_clone"))) TS_CResult_NoneBolt12SemanticErrorZ_clone(uint64_t orig) {
+ LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig);
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok"))) TS_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_COption_OffersMessageZ_some"))) TS_COption_OffersMessageZ_some(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKOffersMessage o_conv = *(LDKOffersMessage*)(o_ptr);
+ o_conv = OffersMessage_clone((LDKOffersMessage*)untag_ptr(o));
+ LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
+ *ret_copy = COption_OffersMessageZ_some(o_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_COption_OffersMessageZ_none"))) TS_COption_OffersMessageZ_none() {
+ LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
+ *ret_copy = COption_OffersMessageZ_none();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_COption_OffersMessageZ_free"))) TS_COption_OffersMessageZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_OffersMessageZ _res_conv = *(LDKCOption_OffersMessageZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_OffersMessageZ_free(_res_conv);
+}
+
+static inline uint64_t COption_OffersMessageZ_clone_ptr(LDKCOption_OffersMessageZ *NONNULL_PTR arg) {
+ LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
+ *ret_copy = COption_OffersMessageZ_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_COption_OffersMessageZ_clone_ptr"))) TS_COption_OffersMessageZ_clone_ptr(uint64_t arg) {
+ LDKCOption_OffersMessageZ* arg_conv = (LDKCOption_OffersMessageZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_OffersMessageZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_COption_OffersMessageZ_clone"))) TS_COption_OffersMessageZ_clone(uint64_t orig) {
+ LDKCOption_OffersMessageZ* orig_conv = (LDKCOption_OffersMessageZ*)untag_ptr(orig);
+ LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
+ *ret_copy = COption_OffersMessageZ_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline uint64_t C3Tuple_OffersMessageDestinationBlindedPathZ_clone_ptr(LDKC3Tuple_OffersMessageDestinationBlindedPathZ *NONNULL_PTR arg) {
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OffersMessageDestinationBlindedPathZ), "LDKC3Tuple_OffersMessageDestinationBlindedPathZ");
+ *ret_conv = C3Tuple_OffersMessageDestinationBlindedPathZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_C3Tuple_OffersMessageDestinationBlindedPathZ_clone_ptr"))) TS_C3Tuple_OffersMessageDestinationBlindedPathZ_clone_ptr(uint64_t arg) {
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ* arg_conv = (LDKC3Tuple_OffersMessageDestinationBlindedPathZ*)untag_ptr(arg);
+ int64_t ret_conv = C3Tuple_OffersMessageDestinationBlindedPathZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_C3Tuple_OffersMessageDestinationBlindedPathZ_clone"))) TS_C3Tuple_OffersMessageDestinationBlindedPathZ_clone(uint64_t orig) {
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ* orig_conv = (LDKC3Tuple_OffersMessageDestinationBlindedPathZ*)untag_ptr(orig);
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OffersMessageDestinationBlindedPathZ), "LDKC3Tuple_OffersMessageDestinationBlindedPathZ");
+ *ret_conv = C3Tuple_OffersMessageDestinationBlindedPathZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_C3Tuple_OffersMessageDestinationBlindedPathZ_new"))) TS_C3Tuple_OffersMessageDestinationBlindedPathZ_new(uint64_t a, uint64_t b, uint64_t c) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKOffersMessage a_conv = *(LDKOffersMessage*)(a_ptr);
+ a_conv = OffersMessage_clone((LDKOffersMessage*)untag_ptr(a));
+ void* b_ptr = untag_ptr(b);
+ CHECK_ACCESS(b_ptr);
+ LDKDestination b_conv = *(LDKDestination*)(b_ptr);
+ b_conv = Destination_clone((LDKDestination*)untag_ptr(b));
+ LDKBlindedPath c_conv;
+ c_conv.inner = untag_ptr(c);
+ c_conv.is_owned = ptr_is_owned(c);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv);
+ c_conv = BlindedPath_clone(&c_conv);
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OffersMessageDestinationBlindedPathZ), "LDKC3Tuple_OffersMessageDestinationBlindedPathZ");
+ *ret_conv = C3Tuple_OffersMessageDestinationBlindedPathZ_new(a_conv, b_conv, c_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_C3Tuple_OffersMessageDestinationBlindedPathZ_free"))) TS_C3Tuple_OffersMessageDestinationBlindedPathZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ _res_conv = *(LDKC3Tuple_OffersMessageDestinationBlindedPathZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C3Tuple_OffersMessageDestinationBlindedPathZ_free(_res_conv);
+}
+
+void __attribute__((export_name("TS_CVec_C3Tuple_OffersMessageDestinationBlindedPathZZ_free"))) TS_CVec_C3Tuple_OffersMessageDestinationBlindedPathZZ_free(uint64_tArray _res) {
+ LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OffersMessageDestinationBlindedPathZ), "LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ Elements");
+ else
+ _res_constr.data = NULL;
+ uint64_t* _res_vals = _res->elems;
+ for (size_t x = 0; x < _res_constr.datalen; x++) {
+ uint64_t _res_conv_49 = _res_vals[x];
+ void* _res_conv_49_ptr = untag_ptr(_res_conv_49);
+ CHECK_ACCESS(_res_conv_49_ptr);
+ LDKC3Tuple_OffersMessageDestinationBlindedPathZ _res_conv_49_conv = *(LDKC3Tuple_OffersMessageDestinationBlindedPathZ*)(_res_conv_49_ptr);
+ FREE(untag_ptr(_res_conv_49));
+ _res_constr.data[x] = _res_conv_49_conv;
+ }
+ FREE(_res);
+ CVec_C3Tuple_OffersMessageDestinationBlindedPathZZ_free(_res_constr);
+}
+
uint64_t __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_ok"))) TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(uint64_t o) {
LDKCounterpartyForwardingInfo o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_CResult_BlindedForwardDecodeErrorZ_ok"))) TS_CResult_BlindedForwardDecodeErrorZ_ok(uint64_t o) {
+ LDKBlindedForward o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = BlindedForward_clone(&o_conv);
+ LDKCResult_BlindedForwardDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedForwardDecodeErrorZ), "LDKCResult_BlindedForwardDecodeErrorZ");
+ *ret_conv = CResult_BlindedForwardDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_BlindedForwardDecodeErrorZ_err"))) TS_CResult_BlindedForwardDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_BlindedForwardDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedForwardDecodeErrorZ), "LDKCResult_BlindedForwardDecodeErrorZ");
+ *ret_conv = CResult_BlindedForwardDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_BlindedForwardDecodeErrorZ_is_ok"))) TS_CResult_BlindedForwardDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_BlindedForwardDecodeErrorZ* o_conv = (LDKCResult_BlindedForwardDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_BlindedForwardDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_BlindedForwardDecodeErrorZ_free"))) TS_CResult_BlindedForwardDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_BlindedForwardDecodeErrorZ _res_conv = *(LDKCResult_BlindedForwardDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_BlindedForwardDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_BlindedForwardDecodeErrorZ_clone_ptr(LDKCResult_BlindedForwardDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_BlindedForwardDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedForwardDecodeErrorZ), "LDKCResult_BlindedForwardDecodeErrorZ");
+ *ret_conv = CResult_BlindedForwardDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_BlindedForwardDecodeErrorZ_clone_ptr"))) TS_CResult_BlindedForwardDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_BlindedForwardDecodeErrorZ* arg_conv = (LDKCResult_BlindedForwardDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_BlindedForwardDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_BlindedForwardDecodeErrorZ_clone"))) TS_CResult_BlindedForwardDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_BlindedForwardDecodeErrorZ* orig_conv = (LDKCResult_BlindedForwardDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_BlindedForwardDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedForwardDecodeErrorZ), "LDKCResult_BlindedForwardDecodeErrorZ");
+ *ret_conv = CResult_BlindedForwardDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCRoutingDecodeErrorZ_ok"))) TS_CResult_PendingHTLCRoutingDecodeErrorZ_ok(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKPendingHTLCRouting o_conv = *(LDKPendingHTLCRouting*)(o_ptr);
+ o_conv = PendingHTLCRouting_clone((LDKPendingHTLCRouting*)untag_ptr(o));
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCRoutingDecodeErrorZ), "LDKCResult_PendingHTLCRoutingDecodeErrorZ");
+ *ret_conv = CResult_PendingHTLCRoutingDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCRoutingDecodeErrorZ_err"))) TS_CResult_PendingHTLCRoutingDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCRoutingDecodeErrorZ), "LDKCResult_PendingHTLCRoutingDecodeErrorZ");
+ *ret_conv = CResult_PendingHTLCRoutingDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_PendingHTLCRoutingDecodeErrorZ_is_ok"))) TS_CResult_PendingHTLCRoutingDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* o_conv = (LDKCResult_PendingHTLCRoutingDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PendingHTLCRoutingDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_PendingHTLCRoutingDecodeErrorZ_free"))) TS_CResult_PendingHTLCRoutingDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ _res_conv = *(LDKCResult_PendingHTLCRoutingDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_PendingHTLCRoutingDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PendingHTLCRoutingDecodeErrorZ_clone_ptr(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCRoutingDecodeErrorZ), "LDKCResult_PendingHTLCRoutingDecodeErrorZ");
+ *ret_conv = CResult_PendingHTLCRoutingDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_PendingHTLCRoutingDecodeErrorZ_clone_ptr"))) TS_CResult_PendingHTLCRoutingDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* arg_conv = (LDKCResult_PendingHTLCRoutingDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PendingHTLCRoutingDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCRoutingDecodeErrorZ_clone"))) TS_CResult_PendingHTLCRoutingDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* orig_conv = (LDKCResult_PendingHTLCRoutingDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCRoutingDecodeErrorZ), "LDKCResult_PendingHTLCRoutingDecodeErrorZ");
+ *ret_conv = CResult_PendingHTLCRoutingDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoDecodeErrorZ_ok"))) TS_CResult_PendingHTLCInfoDecodeErrorZ_ok(uint64_t o) {
+ LDKPendingHTLCInfo o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = PendingHTLCInfo_clone(&o_conv);
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoDecodeErrorZ), "LDKCResult_PendingHTLCInfoDecodeErrorZ");
+ *ret_conv = CResult_PendingHTLCInfoDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoDecodeErrorZ_err"))) TS_CResult_PendingHTLCInfoDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoDecodeErrorZ), "LDKCResult_PendingHTLCInfoDecodeErrorZ");
+ *ret_conv = CResult_PendingHTLCInfoDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_PendingHTLCInfoDecodeErrorZ_is_ok"))) TS_CResult_PendingHTLCInfoDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* o_conv = (LDKCResult_PendingHTLCInfoDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PendingHTLCInfoDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_PendingHTLCInfoDecodeErrorZ_free"))) TS_CResult_PendingHTLCInfoDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_PendingHTLCInfoDecodeErrorZ _res_conv = *(LDKCResult_PendingHTLCInfoDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_PendingHTLCInfoDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PendingHTLCInfoDecodeErrorZ_clone_ptr(LDKCResult_PendingHTLCInfoDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoDecodeErrorZ), "LDKCResult_PendingHTLCInfoDecodeErrorZ");
+ *ret_conv = CResult_PendingHTLCInfoDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoDecodeErrorZ_clone_ptr"))) TS_CResult_PendingHTLCInfoDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* arg_conv = (LDKCResult_PendingHTLCInfoDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_PendingHTLCInfoDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PendingHTLCInfoDecodeErrorZ_clone"))) TS_CResult_PendingHTLCInfoDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* orig_conv = (LDKCResult_PendingHTLCInfoDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoDecodeErrorZ), "LDKCResult_PendingHTLCInfoDecodeErrorZ");
+ *ret_conv = CResult_PendingHTLCInfoDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_BlindedFailureDecodeErrorZ_ok"))) TS_CResult_BlindedFailureDecodeErrorZ_ok(uint32_t o) {
+ LDKBlindedFailure o_conv = LDKBlindedFailure_from_js(o);
+ LDKCResult_BlindedFailureDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedFailureDecodeErrorZ), "LDKCResult_BlindedFailureDecodeErrorZ");
+ *ret_conv = CResult_BlindedFailureDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_BlindedFailureDecodeErrorZ_err"))) TS_CResult_BlindedFailureDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_BlindedFailureDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedFailureDecodeErrorZ), "LDKCResult_BlindedFailureDecodeErrorZ");
+ *ret_conv = CResult_BlindedFailureDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_BlindedFailureDecodeErrorZ_is_ok"))) TS_CResult_BlindedFailureDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_BlindedFailureDecodeErrorZ* o_conv = (LDKCResult_BlindedFailureDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_BlindedFailureDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_BlindedFailureDecodeErrorZ_free"))) TS_CResult_BlindedFailureDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_BlindedFailureDecodeErrorZ _res_conv = *(LDKCResult_BlindedFailureDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_BlindedFailureDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_BlindedFailureDecodeErrorZ_clone_ptr(LDKCResult_BlindedFailureDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_BlindedFailureDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedFailureDecodeErrorZ), "LDKCResult_BlindedFailureDecodeErrorZ");
+ *ret_conv = CResult_BlindedFailureDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_BlindedFailureDecodeErrorZ_clone_ptr"))) TS_CResult_BlindedFailureDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_BlindedFailureDecodeErrorZ* arg_conv = (LDKCResult_BlindedFailureDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_BlindedFailureDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_BlindedFailureDecodeErrorZ_clone"))) TS_CResult_BlindedFailureDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_BlindedFailureDecodeErrorZ* orig_conv = (LDKCResult_BlindedFailureDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_BlindedFailureDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedFailureDecodeErrorZ), "LDKCResult_BlindedFailureDecodeErrorZ");
+ *ret_conv = CResult_BlindedFailureDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_CResult_ChannelShutdownStateDecodeErrorZ_ok"))) TS_CResult_ChannelShutdownStateDecodeErrorZ_ok(uint32_t o) {
LDKChannelShutdownState o_conv = LDKChannelShutdownState_from_js(o);
LDKCResult_ChannelShutdownStateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelShutdownStateDecodeErrorZ), "LDKCResult_ChannelShutdownStateDecodeErrorZ");
CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
}
-uint64_t __attribute__((export_name("TS_COption_OffersMessageZ_some"))) TS_COption_OffersMessageZ_some(uint64_t o) {
- void* o_ptr = untag_ptr(o);
- CHECK_ACCESS(o_ptr);
- LDKOffersMessage o_conv = *(LDKOffersMessage*)(o_ptr);
- o_conv = OffersMessage_clone((LDKOffersMessage*)untag_ptr(o));
- LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
- *ret_copy = COption_OffersMessageZ_some(o_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+static inline uint64_t C2Tuple_PublicKeyCVec_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ *NONNULL_PTR arg) {
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ), "LDKC2Tuple_PublicKeyCVec_SocketAddressZZ");
+ *ret_conv = C2Tuple_PublicKeyCVec_SocketAddressZZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_clone_ptr"))) TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_clone_ptr(uint64_t arg) {
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCVec_SocketAddressZZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_PublicKeyCVec_SocketAddressZZ_clone_ptr(arg_conv);
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_COption_OffersMessageZ_none"))) TS_COption_OffersMessageZ_none() {
- LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
- *ret_copy = COption_OffersMessageZ_none();
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_clone"))) TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_clone(uint64_t orig) {
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCVec_SocketAddressZZ*)untag_ptr(orig);
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ), "LDKC2Tuple_PublicKeyCVec_SocketAddressZZ");
+ *ret_conv = C2Tuple_PublicKeyCVec_SocketAddressZZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_COption_OffersMessageZ_free"))) TS_COption_OffersMessageZ_free(uint64_t _res) {
+uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_new"))) TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_new(int8_tArray a, uint64_tArray b) {
+ LDKPublicKey a_ref;
+ CHECK(a->arr_len == 33);
+ memcpy(a_ref.compressed_form, a->elems, 33); FREE(a);
+ LDKCVec_SocketAddressZ b_constr;
+ b_constr.datalen = b->arr_len;
+ if (b_constr.datalen > 0)
+ b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements");
+ else
+ b_constr.data = NULL;
+ uint64_t* b_vals = b->elems;
+ for (size_t p = 0; p < b_constr.datalen; p++) {
+ uint64_t b_conv_15 = b_vals[p];
+ void* b_conv_15_ptr = untag_ptr(b_conv_15);
+ CHECK_ACCESS(b_conv_15_ptr);
+ LDKSocketAddress b_conv_15_conv = *(LDKSocketAddress*)(b_conv_15_ptr);
+ b_conv_15_conv = SocketAddress_clone((LDKSocketAddress*)untag_ptr(b_conv_15));
+ b_constr.data[p] = b_conv_15_conv;
+ }
+ FREE(b);
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ), "LDKC2Tuple_PublicKeyCVec_SocketAddressZZ");
+ *ret_conv = C2Tuple_PublicKeyCVec_SocketAddressZZ_new(a_ref, b_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_free"))) TS_C2Tuple_PublicKeyCVec_SocketAddressZZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCOption_OffersMessageZ _res_conv = *(LDKCOption_OffersMessageZ*)(_res_ptr);
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ*)(_res_ptr);
FREE(untag_ptr(_res));
- COption_OffersMessageZ_free(_res_conv);
-}
-
-static inline uint64_t COption_OffersMessageZ_clone_ptr(LDKCOption_OffersMessageZ *NONNULL_PTR arg) {
- LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
- *ret_copy = COption_OffersMessageZ_clone(arg);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t __attribute__((export_name("TS_COption_OffersMessageZ_clone_ptr"))) TS_COption_OffersMessageZ_clone_ptr(uint64_t arg) {
- LDKCOption_OffersMessageZ* arg_conv = (LDKCOption_OffersMessageZ*)untag_ptr(arg);
- int64_t ret_conv = COption_OffersMessageZ_clone_ptr(arg_conv);
- return ret_conv;
+ C2Tuple_PublicKeyCVec_SocketAddressZZ_free(_res_conv);
}
-uint64_t __attribute__((export_name("TS_COption_OffersMessageZ_clone"))) TS_COption_OffersMessageZ_clone(uint64_t orig) {
- LDKCOption_OffersMessageZ* orig_conv = (LDKCOption_OffersMessageZ*)untag_ptr(orig);
- LDKCOption_OffersMessageZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersMessageZ), "LDKCOption_OffersMessageZ");
- *ret_copy = COption_OffersMessageZ_clone(orig_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+void __attribute__((export_name("TS_CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ_free"))) TS_CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ_free(uint64_tArray _res) {
+ LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ Elements");
+ else
+ _res_constr.data = NULL;
+ uint64_t* _res_vals = _res->elems;
+ for (size_t o = 0; o < _res_constr.datalen; o++) {
+ uint64_t _res_conv_40 = _res_vals[o];
+ void* _res_conv_40_ptr = untag_ptr(_res_conv_40);
+ CHECK_ACCESS(_res_conv_40_ptr);
+ LDKC2Tuple_PublicKeyCVec_SocketAddressZZ _res_conv_40_conv = *(LDKC2Tuple_PublicKeyCVec_SocketAddressZZ*)(_res_conv_40_ptr);
+ FREE(untag_ptr(_res_conv_40));
+ _res_constr.data[o] = _res_conv_40_conv;
+ }
+ FREE(_res);
+ CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ_free(_res_constr);
}
-uint64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_some"))) TS_COption_CustomOnionMessageContentsZ_some(uint64_t o) {
+uint64_t __attribute__((export_name("TS_COption_OnionMessageContentsZ_some"))) TS_COption_OnionMessageContentsZ_some(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
- LDKCustomOnionMessageContents o_conv = *(LDKCustomOnionMessageContents*)(o_ptr);
- if (o_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+ LDKOnionMessageContents o_conv = *(LDKOnionMessageContents*)(o_ptr);
+ if (o_conv.free == LDKOnionMessageContents_JCalls_free) {
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKCustomOnionMessageContents_JCalls_cloned(&o_conv);
+ LDKOnionMessageContents_JCalls_cloned(&o_conv);
}
- LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
- *ret_copy = COption_CustomOnionMessageContentsZ_some(o_conv);
+ LDKCOption_OnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_OnionMessageContentsZ), "LDKCOption_OnionMessageContentsZ");
+ *ret_copy = COption_OnionMessageContentsZ_some(o_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_none"))) TS_COption_CustomOnionMessageContentsZ_none() {
- LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
- *ret_copy = COption_CustomOnionMessageContentsZ_none();
+uint64_t __attribute__((export_name("TS_COption_OnionMessageContentsZ_none"))) TS_COption_OnionMessageContentsZ_none() {
+ LDKCOption_OnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_OnionMessageContentsZ), "LDKCOption_OnionMessageContentsZ");
+ *ret_copy = COption_OnionMessageContentsZ_none();
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_free"))) TS_COption_CustomOnionMessageContentsZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_COption_OnionMessageContentsZ_free"))) TS_COption_OnionMessageContentsZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCOption_CustomOnionMessageContentsZ _res_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(_res_ptr);
+ LDKCOption_OnionMessageContentsZ _res_conv = *(LDKCOption_OnionMessageContentsZ*)(_res_ptr);
FREE(untag_ptr(_res));
- COption_CustomOnionMessageContentsZ_free(_res_conv);
+ COption_OnionMessageContentsZ_free(_res_conv);
}
-static inline uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg) {
- LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
- *ret_copy = COption_CustomOnionMessageContentsZ_clone(arg);
+static inline uint64_t COption_OnionMessageContentsZ_clone_ptr(LDKCOption_OnionMessageContentsZ *NONNULL_PTR arg) {
+ LDKCOption_OnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_OnionMessageContentsZ), "LDKCOption_OnionMessageContentsZ");
+ *ret_copy = COption_OnionMessageContentsZ_clone(arg);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone_ptr"))) TS_COption_CustomOnionMessageContentsZ_clone_ptr(uint64_t arg) {
- LDKCOption_CustomOnionMessageContentsZ* arg_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(arg);
- int64_t ret_conv = COption_CustomOnionMessageContentsZ_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_COption_OnionMessageContentsZ_clone_ptr"))) TS_COption_OnionMessageContentsZ_clone_ptr(uint64_t arg) {
+ LDKCOption_OnionMessageContentsZ* arg_conv = (LDKCOption_OnionMessageContentsZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_OnionMessageContentsZ_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone"))) TS_COption_CustomOnionMessageContentsZ_clone(uint64_t orig) {
- LDKCOption_CustomOnionMessageContentsZ* orig_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(orig);
- LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
- *ret_copy = COption_CustomOnionMessageContentsZ_clone(orig_conv);
+uint64_t __attribute__((export_name("TS_COption_OnionMessageContentsZ_clone"))) TS_COption_OnionMessageContentsZ_clone(uint64_t orig) {
+ LDKCOption_OnionMessageContentsZ* orig_conv = (LDKCOption_OnionMessageContentsZ*)untag_ptr(orig);
+ LDKCOption_OnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_OnionMessageContentsZ), "LDKCOption_OnionMessageContentsZ");
+ *ret_copy = COption_OnionMessageContentsZ_clone(orig_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(uint64_t o) {
+uint64_t __attribute__((export_name("TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_ok"))) TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_ok(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
- LDKCOption_CustomOnionMessageContentsZ o_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(o_ptr);
- o_conv = COption_CustomOnionMessageContentsZ_clone((LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(o));
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
- *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o_conv);
+ LDKCOption_OnionMessageContentsZ o_conv = *(LDKCOption_OnionMessageContentsZ*)(o_ptr);
+ o_conv = COption_OnionMessageContentsZ_clone((LDKCOption_OnionMessageContentsZ*)untag_ptr(o));
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_OnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_OnionMessageContentsZDecodeErrorZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(uint64_t e) {
+uint64_t __attribute__((export_name("TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_err"))) TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_err(uint64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
- *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e_conv);
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_OnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_OnionMessageContentsZDecodeErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(uint64_t o) {
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* o_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o_conv);
+jboolean __attribute__((export_name("TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_is_ok"))) TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* o_conv = (LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_COption_OnionMessageContentsZDecodeErrorZ_is_ok(o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_free"))) TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(_res_ptr);
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ _res_conv = *(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res_conv);
+ CResult_COption_OnionMessageContentsZDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_COption_OnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_OnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_OnionMessageContentsZDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_clone_ptr"))) TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* arg_conv = (LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_COption_OnionMessageContentsZDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
}
-static inline uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
- *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(arg);
+uint64_t __attribute__((export_name("TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_clone"))) TS_CResult_COption_OnionMessageContentsZDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* orig_conv = (LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_COption_OnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_OnionMessageContentsZDecodeErrorZ");
+ *ret_conv = CResult_COption_OnionMessageContentsZDecodeErrorZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(uint64_t arg) {
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* arg_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg_conv);
+
+static inline uint64_t C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone_ptr(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ *NONNULL_PTR arg) {
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ), "LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ");
+ *ret_conv = C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone_ptr"))) TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone_ptr(uint64_t arg) {
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ* arg_conv = (LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ*)untag_ptr(arg);
+ int64_t ret_conv = C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(uint64_t orig) {
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* orig_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
- *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig_conv);
+uint64_t __attribute__((export_name("TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone"))) TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone(uint64_t orig) {
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ* orig_conv = (LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ*)untag_ptr(orig);
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ), "LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ");
+ *ret_conv = C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new"))) TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(uint64_t a, uint64_t b, uint64_t c) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKOnionMessageContents a_conv = *(LDKOnionMessageContents*)(a_ptr);
+ if (a_conv.free == LDKOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOnionMessageContents_JCalls_cloned(&a_conv);
+ }
+ void* b_ptr = untag_ptr(b);
+ CHECK_ACCESS(b_ptr);
+ LDKDestination b_conv = *(LDKDestination*)(b_ptr);
+ b_conv = Destination_clone((LDKDestination*)untag_ptr(b));
+ LDKBlindedPath c_conv;
+ c_conv.inner = untag_ptr(c);
+ c_conv.is_owned = ptr_is_owned(c);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv);
+ c_conv = BlindedPath_clone(&c_conv);
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ), "LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ");
+ *ret_conv = C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a_conv, b_conv, c_conv);
return tag_ptr(ret_conv, true);
}
+void __attribute__((export_name("TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_free"))) TS_C3Tuple_OnionMessageContentsDestinationBlindedPathZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ _res_conv = *(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C3Tuple_OnionMessageContentsDestinationBlindedPathZ_free(_res_conv);
+}
+
+void __attribute__((export_name("TS_CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ_free"))) TS_CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ_free(uint64_tArray _res) {
+ LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ), "LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ Elements");
+ else
+ _res_constr.data = NULL;
+ uint64_t* _res_vals = _res->elems;
+ for (size_t e = 0; e < _res_constr.datalen; e++) {
+ uint64_t _res_conv_56 = _res_vals[e];
+ void* _res_conv_56_ptr = untag_ptr(_res_conv_56);
+ CHECK_ACCESS(_res_conv_56_ptr);
+ LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ _res_conv_56_conv = *(LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ*)(_res_conv_56_ptr);
+ FREE(untag_ptr(_res_conv_56));
+ _res_constr.data[e] = _res_conv_56_conv;
+ }
+ FREE(_res);
+ CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ_free(_res_constr);
+}
+
uint64_t __attribute__((export_name("TS_COption_TypeZ_some"))) TS_COption_TypeZ_some(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_CResult_StfuDecodeErrorZ_ok"))) TS_CResult_StfuDecodeErrorZ_ok(uint64_t o) {
+ LDKStfu o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Stfu_clone(&o_conv);
+ LDKCResult_StfuDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StfuDecodeErrorZ), "LDKCResult_StfuDecodeErrorZ");
+ *ret_conv = CResult_StfuDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_StfuDecodeErrorZ_err"))) TS_CResult_StfuDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_StfuDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StfuDecodeErrorZ), "LDKCResult_StfuDecodeErrorZ");
+ *ret_conv = CResult_StfuDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_StfuDecodeErrorZ_is_ok"))) TS_CResult_StfuDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_StfuDecodeErrorZ* o_conv = (LDKCResult_StfuDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_StfuDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_StfuDecodeErrorZ_free"))) TS_CResult_StfuDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_StfuDecodeErrorZ _res_conv = *(LDKCResult_StfuDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_StfuDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_StfuDecodeErrorZ_clone_ptr(LDKCResult_StfuDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_StfuDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StfuDecodeErrorZ), "LDKCResult_StfuDecodeErrorZ");
+ *ret_conv = CResult_StfuDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_StfuDecodeErrorZ_clone_ptr"))) TS_CResult_StfuDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_StfuDecodeErrorZ* arg_conv = (LDKCResult_StfuDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_StfuDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_StfuDecodeErrorZ_clone"))) TS_CResult_StfuDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_StfuDecodeErrorZ* orig_conv = (LDKCResult_StfuDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_StfuDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StfuDecodeErrorZ), "LDKCResult_StfuDecodeErrorZ");
+ *ret_conv = CResult_StfuDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_SpliceDecodeErrorZ_ok"))) TS_CResult_SpliceDecodeErrorZ_ok(uint64_t o) {
+ LDKSplice o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = Splice_clone(&o_conv);
+ LDKCResult_SpliceDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceDecodeErrorZ), "LDKCResult_SpliceDecodeErrorZ");
+ *ret_conv = CResult_SpliceDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_SpliceDecodeErrorZ_err"))) TS_CResult_SpliceDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_SpliceDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceDecodeErrorZ), "LDKCResult_SpliceDecodeErrorZ");
+ *ret_conv = CResult_SpliceDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_SpliceDecodeErrorZ_is_ok"))) TS_CResult_SpliceDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_SpliceDecodeErrorZ* o_conv = (LDKCResult_SpliceDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_SpliceDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_SpliceDecodeErrorZ_free"))) TS_CResult_SpliceDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_SpliceDecodeErrorZ _res_conv = *(LDKCResult_SpliceDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_SpliceDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_SpliceDecodeErrorZ_clone_ptr(LDKCResult_SpliceDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_SpliceDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceDecodeErrorZ), "LDKCResult_SpliceDecodeErrorZ");
+ *ret_conv = CResult_SpliceDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_SpliceDecodeErrorZ_clone_ptr"))) TS_CResult_SpliceDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_SpliceDecodeErrorZ* arg_conv = (LDKCResult_SpliceDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_SpliceDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_SpliceDecodeErrorZ_clone"))) TS_CResult_SpliceDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_SpliceDecodeErrorZ* orig_conv = (LDKCResult_SpliceDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_SpliceDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceDecodeErrorZ), "LDKCResult_SpliceDecodeErrorZ");
+ *ret_conv = CResult_SpliceDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_SpliceAckDecodeErrorZ_ok"))) TS_CResult_SpliceAckDecodeErrorZ_ok(uint64_t o) {
+ LDKSpliceAck o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = SpliceAck_clone(&o_conv);
+ LDKCResult_SpliceAckDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceAckDecodeErrorZ), "LDKCResult_SpliceAckDecodeErrorZ");
+ *ret_conv = CResult_SpliceAckDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_SpliceAckDecodeErrorZ_err"))) TS_CResult_SpliceAckDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_SpliceAckDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceAckDecodeErrorZ), "LDKCResult_SpliceAckDecodeErrorZ");
+ *ret_conv = CResult_SpliceAckDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_SpliceAckDecodeErrorZ_is_ok"))) TS_CResult_SpliceAckDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_SpliceAckDecodeErrorZ* o_conv = (LDKCResult_SpliceAckDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_SpliceAckDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_SpliceAckDecodeErrorZ_free"))) TS_CResult_SpliceAckDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_SpliceAckDecodeErrorZ _res_conv = *(LDKCResult_SpliceAckDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_SpliceAckDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_SpliceAckDecodeErrorZ_clone_ptr(LDKCResult_SpliceAckDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_SpliceAckDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceAckDecodeErrorZ), "LDKCResult_SpliceAckDecodeErrorZ");
+ *ret_conv = CResult_SpliceAckDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_SpliceAckDecodeErrorZ_clone_ptr"))) TS_CResult_SpliceAckDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_SpliceAckDecodeErrorZ* arg_conv = (LDKCResult_SpliceAckDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_SpliceAckDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_SpliceAckDecodeErrorZ_clone"))) TS_CResult_SpliceAckDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_SpliceAckDecodeErrorZ* orig_conv = (LDKCResult_SpliceAckDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_SpliceAckDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceAckDecodeErrorZ), "LDKCResult_SpliceAckDecodeErrorZ");
+ *ret_conv = CResult_SpliceAckDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_SpliceLockedDecodeErrorZ_ok"))) TS_CResult_SpliceLockedDecodeErrorZ_ok(uint64_t o) {
+ LDKSpliceLocked o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = SpliceLocked_clone(&o_conv);
+ LDKCResult_SpliceLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceLockedDecodeErrorZ), "LDKCResult_SpliceLockedDecodeErrorZ");
+ *ret_conv = CResult_SpliceLockedDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_SpliceLockedDecodeErrorZ_err"))) TS_CResult_SpliceLockedDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_SpliceLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceLockedDecodeErrorZ), "LDKCResult_SpliceLockedDecodeErrorZ");
+ *ret_conv = CResult_SpliceLockedDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_SpliceLockedDecodeErrorZ_is_ok"))) TS_CResult_SpliceLockedDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_SpliceLockedDecodeErrorZ* o_conv = (LDKCResult_SpliceLockedDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_SpliceLockedDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_SpliceLockedDecodeErrorZ_free"))) TS_CResult_SpliceLockedDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_SpliceLockedDecodeErrorZ _res_conv = *(LDKCResult_SpliceLockedDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_SpliceLockedDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_SpliceLockedDecodeErrorZ_clone_ptr(LDKCResult_SpliceLockedDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_SpliceLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceLockedDecodeErrorZ), "LDKCResult_SpliceLockedDecodeErrorZ");
+ *ret_conv = CResult_SpliceLockedDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_SpliceLockedDecodeErrorZ_clone_ptr"))) TS_CResult_SpliceLockedDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_SpliceLockedDecodeErrorZ* arg_conv = (LDKCResult_SpliceLockedDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_SpliceLockedDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_SpliceLockedDecodeErrorZ_clone"))) TS_CResult_SpliceLockedDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_SpliceLockedDecodeErrorZ* orig_conv = (LDKCResult_SpliceLockedDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_SpliceLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceLockedDecodeErrorZ), "LDKCResult_SpliceLockedDecodeErrorZ");
+ *ret_conv = CResult_SpliceLockedDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_CResult_TxAddInputDecodeErrorZ_ok"))) TS_CResult_TxAddInputDecodeErrorZ_ok(uint64_t o) {
LDKTxAddInput o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_CResult_OnionPacketDecodeErrorZ_ok"))) TS_CResult_OnionPacketDecodeErrorZ_ok(uint64_t o) {
+ LDKOnionPacket o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = OnionPacket_clone(&o_conv);
+ LDKCResult_OnionPacketDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionPacketDecodeErrorZ), "LDKCResult_OnionPacketDecodeErrorZ");
+ *ret_conv = CResult_OnionPacketDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_OnionPacketDecodeErrorZ_err"))) TS_CResult_OnionPacketDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_OnionPacketDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionPacketDecodeErrorZ), "LDKCResult_OnionPacketDecodeErrorZ");
+ *ret_conv = CResult_OnionPacketDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_OnionPacketDecodeErrorZ_is_ok"))) TS_CResult_OnionPacketDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_OnionPacketDecodeErrorZ* o_conv = (LDKCResult_OnionPacketDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OnionPacketDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_OnionPacketDecodeErrorZ_free"))) TS_CResult_OnionPacketDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OnionPacketDecodeErrorZ _res_conv = *(LDKCResult_OnionPacketDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OnionPacketDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OnionPacketDecodeErrorZ_clone_ptr(LDKCResult_OnionPacketDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_OnionPacketDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionPacketDecodeErrorZ), "LDKCResult_OnionPacketDecodeErrorZ");
+ *ret_conv = CResult_OnionPacketDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_OnionPacketDecodeErrorZ_clone_ptr"))) TS_CResult_OnionPacketDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_OnionPacketDecodeErrorZ* arg_conv = (LDKCResult_OnionPacketDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OnionPacketDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_OnionPacketDecodeErrorZ_clone"))) TS_CResult_OnionPacketDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_OnionPacketDecodeErrorZ* orig_conv = (LDKCResult_OnionPacketDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_OnionPacketDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionPacketDecodeErrorZ), "LDKCResult_OnionPacketDecodeErrorZ");
+ *ret_conv = CResult_OnionPacketDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_ok"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_ok(uint64_t o) {
LDKUpdateAddHTLC o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_CResult_FinalOnionHopDataDecodeErrorZ_ok"))) TS_CResult_FinalOnionHopDataDecodeErrorZ_ok(uint64_t o) {
+ LDKFinalOnionHopData o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = FinalOnionHopData_clone(&o_conv);
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FinalOnionHopDataDecodeErrorZ), "LDKCResult_FinalOnionHopDataDecodeErrorZ");
+ *ret_conv = CResult_FinalOnionHopDataDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_FinalOnionHopDataDecodeErrorZ_err"))) TS_CResult_FinalOnionHopDataDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FinalOnionHopDataDecodeErrorZ), "LDKCResult_FinalOnionHopDataDecodeErrorZ");
+ *ret_conv = CResult_FinalOnionHopDataDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_FinalOnionHopDataDecodeErrorZ_is_ok"))) TS_CResult_FinalOnionHopDataDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* o_conv = (LDKCResult_FinalOnionHopDataDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_FinalOnionHopDataDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_FinalOnionHopDataDecodeErrorZ_free"))) TS_CResult_FinalOnionHopDataDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_FinalOnionHopDataDecodeErrorZ _res_conv = *(LDKCResult_FinalOnionHopDataDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_FinalOnionHopDataDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_FinalOnionHopDataDecodeErrorZ_clone_ptr(LDKCResult_FinalOnionHopDataDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FinalOnionHopDataDecodeErrorZ), "LDKCResult_FinalOnionHopDataDecodeErrorZ");
+ *ret_conv = CResult_FinalOnionHopDataDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_FinalOnionHopDataDecodeErrorZ_clone_ptr"))) TS_CResult_FinalOnionHopDataDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* arg_conv = (LDKCResult_FinalOnionHopDataDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_FinalOnionHopDataDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_FinalOnionHopDataDecodeErrorZ_clone"))) TS_CResult_FinalOnionHopDataDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* orig_conv = (LDKCResult_FinalOnionHopDataDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FinalOnionHopDataDecodeErrorZ), "LDKCResult_FinalOnionHopDataDecodeErrorZ");
+ *ret_conv = CResult_FinalOnionHopDataDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_CResult_PingDecodeErrorZ_ok"))) TS_CResult_PingDecodeErrorZ_ok(uint64_t o) {
LDKPing o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_ReceiveTlvsDecodeErrorZ_ok"))) TS_CResult_ReceiveTlvsDecodeErrorZ_ok(uint64_t o) {
- LDKReceiveTlvs o_conv;
- o_conv.inner = untag_ptr(o);
- o_conv.is_owned = ptr_is_owned(o);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
- o_conv = ReceiveTlvs_clone(&o_conv);
- LDKCResult_ReceiveTlvsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReceiveTlvsDecodeErrorZ), "LDKCResult_ReceiveTlvsDecodeErrorZ");
- *ret_conv = CResult_ReceiveTlvsDecodeErrorZ_ok(o_conv);
+static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) {
+ LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z");
+ *ret_conv = C2Tuple__u832u16Z_clone(arg);
return tag_ptr(ret_conv, true);
}
+int64_t __attribute__((export_name("TS_C2Tuple__u832u16Z_clone_ptr"))) TS_C2Tuple__u832u16Z_clone_ptr(uint64_t arg) {
+ LDKC2Tuple__u832u16Z* arg_conv = (LDKC2Tuple__u832u16Z*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple__u832u16Z_clone_ptr(arg_conv);
+ return ret_conv;
+}
-uint64_t __attribute__((export_name("TS_CResult_ReceiveTlvsDecodeErrorZ_err"))) TS_CResult_ReceiveTlvsDecodeErrorZ_err(uint64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
- e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
- LDKCResult_ReceiveTlvsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReceiveTlvsDecodeErrorZ), "LDKCResult_ReceiveTlvsDecodeErrorZ");
- *ret_conv = CResult_ReceiveTlvsDecodeErrorZ_err(e_conv);
+uint64_t __attribute__((export_name("TS_C2Tuple__u832u16Z_clone"))) TS_C2Tuple__u832u16Z_clone(uint64_t orig) {
+ LDKC2Tuple__u832u16Z* orig_conv = (LDKC2Tuple__u832u16Z*)untag_ptr(orig);
+ LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z");
+ *ret_conv = C2Tuple__u832u16Z_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-jboolean __attribute__((export_name("TS_CResult_ReceiveTlvsDecodeErrorZ_is_ok"))) TS_CResult_ReceiveTlvsDecodeErrorZ_is_ok(uint64_t o) {
- LDKCResult_ReceiveTlvsDecodeErrorZ* o_conv = (LDKCResult_ReceiveTlvsDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ReceiveTlvsDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_C2Tuple__u832u16Z_new"))) TS_C2Tuple__u832u16Z_new(int8_tArray a, int16_t b) {
+ LDKThirtyTwoBytes a_ref;
+ CHECK(a->arr_len == 32);
+ memcpy(a_ref.data, a->elems, 32); FREE(a);
+ LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z");
+ *ret_conv = C2Tuple__u832u16Z_new(a_ref, b);
+ return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_CResult_ReceiveTlvsDecodeErrorZ_free"))) TS_CResult_ReceiveTlvsDecodeErrorZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_C2Tuple__u832u16Z_free"))) TS_C2Tuple__u832u16Z_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_ReceiveTlvsDecodeErrorZ _res_conv = *(LDKCResult_ReceiveTlvsDecodeErrorZ*)(_res_ptr);
+ LDKC2Tuple__u832u16Z _res_conv = *(LDKC2Tuple__u832u16Z*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_ReceiveTlvsDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_ReceiveTlvsDecodeErrorZ_clone_ptr(LDKCResult_ReceiveTlvsDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_ReceiveTlvsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReceiveTlvsDecodeErrorZ), "LDKCResult_ReceiveTlvsDecodeErrorZ");
- *ret_conv = CResult_ReceiveTlvsDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_CResult_ReceiveTlvsDecodeErrorZ_clone_ptr"))) TS_CResult_ReceiveTlvsDecodeErrorZ_clone_ptr(uint64_t arg) {
- LDKCResult_ReceiveTlvsDecodeErrorZ* arg_conv = (LDKCResult_ReceiveTlvsDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ReceiveTlvsDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CResult_ReceiveTlvsDecodeErrorZ_clone"))) TS_CResult_ReceiveTlvsDecodeErrorZ_clone(uint64_t orig) {
- LDKCResult_ReceiveTlvsDecodeErrorZ* orig_conv = (LDKCResult_ReceiveTlvsDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_ReceiveTlvsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReceiveTlvsDecodeErrorZ), "LDKCResult_ReceiveTlvsDecodeErrorZ");
- *ret_conv = CResult_ReceiveTlvsDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
+ C2Tuple__u832u16Z_free(_res_conv);
}
uint64_t __attribute__((export_name("TS_CResult_PaymentRelayDecodeErrorZ_ok"))) TS_CResult_PaymentRelayDecodeErrorZ_ok(uint64_t o) {
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesPaymentErrorZ_ok"))) TS_CResult_ThirtyTwoBytesPaymentErrorZ_ok(int8_tArray o) {
- LDKThirtyTwoBytes o_ref;
- CHECK(o->arr_len == 32);
- memcpy(o_ref.data, o->elems, 32); FREE(o);
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentErrorZ), "LDKCResult_ThirtyTwoBytesPaymentErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentErrorZ_ok(o_ref);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesPaymentErrorZ_err"))) TS_CResult_ThirtyTwoBytesPaymentErrorZ_err(uint64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKPaymentError e_conv = *(LDKPaymentError*)(e_ptr);
- e_conv = PaymentError_clone((LDKPaymentError*)untag_ptr(e));
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentErrorZ), "LDKCResult_ThirtyTwoBytesPaymentErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean __attribute__((export_name("TS_CResult_ThirtyTwoBytesPaymentErrorZ_is_ok"))) TS_CResult_ThirtyTwoBytesPaymentErrorZ_is_ok(uint64_t o) {
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesPaymentErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ThirtyTwoBytesPaymentErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_CResult_ThirtyTwoBytesPaymentErrorZ_free"))) TS_CResult_ThirtyTwoBytesPaymentErrorZ_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_ThirtyTwoBytesPaymentErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesPaymentErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_ThirtyTwoBytesPaymentErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_ThirtyTwoBytesPaymentErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesPaymentErrorZ *NONNULL_PTR arg) {
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentErrorZ), "LDKCResult_ThirtyTwoBytesPaymentErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentErrorZ_clone(arg);
+static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
+ *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesPaymentErrorZ_clone_ptr"))) TS_CResult_ThirtyTwoBytesPaymentErrorZ_clone_ptr(uint64_t arg) {
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesPaymentErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ThirtyTwoBytesPaymentErrorZ_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(uint64_t arg) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* arg_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(arg);
+ int64_t ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_CResult_ThirtyTwoBytesPaymentErrorZ_clone"))) TS_CResult_ThirtyTwoBytesPaymentErrorZ_clone(uint64_t orig) {
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesPaymentErrorZ*)untag_ptr(orig);
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentErrorZ), "LDKCResult_ThirtyTwoBytesPaymentErrorZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_NonePaymentErrorZ_ok"))) TS_CResult_NonePaymentErrorZ_ok() {
- LDKCResult_NonePaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentErrorZ), "LDKCResult_NonePaymentErrorZ");
- *ret_conv = CResult_NonePaymentErrorZ_ok();
+uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(uint64_t orig) {
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* orig_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(orig);
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
+ *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_NonePaymentErrorZ_err"))) TS_CResult_NonePaymentErrorZ_err(uint64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKPaymentError e_conv = *(LDKPaymentError*)(e_ptr);
- e_conv = PaymentError_clone((LDKPaymentError*)untag_ptr(e));
- LDKCResult_NonePaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentErrorZ), "LDKCResult_NonePaymentErrorZ");
- *ret_conv = CResult_NonePaymentErrorZ_err(e_conv);
+uint64_t __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(int8_tArray a, uint64_t b, uint64_t c) {
+ LDKThirtyTwoBytes a_ref;
+ CHECK(a->arr_len == 32);
+ memcpy(a_ref.data, a->elems, 32); FREE(a);
+ LDKRecipientOnionFields b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv = RecipientOnionFields_clone(&b_conv);
+ LDKRouteParameters c_conv;
+ c_conv.inner = untag_ptr(c);
+ c_conv.is_owned = ptr_is_owned(c);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv);
+ c_conv = RouteParameters_clone(&c_conv);
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
+ *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(a_ref, b_conv, c_conv);
return tag_ptr(ret_conv, true);
}
-jboolean __attribute__((export_name("TS_CResult_NonePaymentErrorZ_is_ok"))) TS_CResult_NonePaymentErrorZ_is_ok(uint64_t o) {
- LDKCResult_NonePaymentErrorZ* o_conv = (LDKCResult_NonePaymentErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NonePaymentErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_CResult_NonePaymentErrorZ_free"))) TS_CResult_NonePaymentErrorZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free"))) TS_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_NonePaymentErrorZ _res_conv = *(LDKCResult_NonePaymentErrorZ*)(_res_ptr);
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_NonePaymentErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NonePaymentErrorZ_clone_ptr(LDKCResult_NonePaymentErrorZ *NONNULL_PTR arg) {
- LDKCResult_NonePaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentErrorZ), "LDKCResult_NonePaymentErrorZ");
- *ret_conv = CResult_NonePaymentErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_CResult_NonePaymentErrorZ_clone_ptr"))) TS_CResult_NonePaymentErrorZ_clone_ptr(uint64_t arg) {
- LDKCResult_NonePaymentErrorZ* arg_conv = (LDKCResult_NonePaymentErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NonePaymentErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CResult_NonePaymentErrorZ_clone"))) TS_CResult_NonePaymentErrorZ_clone(uint64_t orig) {
- LDKCResult_NonePaymentErrorZ* orig_conv = (LDKCResult_NonePaymentErrorZ*)untag_ptr(orig);
- LDKCResult_NonePaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentErrorZ), "LDKCResult_NonePaymentErrorZ");
- *ret_conv = CResult_NonePaymentErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
+ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(_res_conv);
}
-uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_ok"))) TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_ok(uint64_tArray o) {
- LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ o_constr;
- o_constr.datalen = o->arr_len;
- if (o_constr.datalen > 0)
- o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ), "LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ Elements");
- else
- o_constr.data = NULL;
- uint64_t* o_vals = o->elems;
- for (size_t o = 0; o < o_constr.datalen; o++) {
- uint64_t o_conv_40 = o_vals[o];
- void* o_conv_40_ptr = untag_ptr(o_conv_40);
- CHECK_ACCESS(o_conv_40_ptr);
- LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o_conv_40_conv = *(LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ*)(o_conv_40_ptr);
- o_conv_40_conv = C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone((LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ*)untag_ptr(o_conv_40));
- o_constr.data[o] = o_conv_40_conv;
- }
- FREE(o);
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ), "LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ");
- *ret_conv = CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_ok(o_constr);
+uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o_conv = *(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)(o_ptr);
+ o_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone((LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(o));
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ");
+ *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_err"))) TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_err(uint64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKProbingError e_conv = *(LDKProbingError*)(e_ptr);
- e_conv = ProbingError_clone((LDKProbingError*)untag_ptr(e));
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ), "LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ");
- *ret_conv = CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_err(e_conv);
+uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err() {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ");
+ *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err();
return tag_ptr(ret_conv, true);
}
-jboolean __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_is_ok"))) TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_is_ok(uint64_t o) {
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* o_conv = (LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_is_ok(o_conv);
+jboolean __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(uint64_t o) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* o_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_free"))) TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ _res_conv = *(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ*)(_res_ptr);
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res_conv = *(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_free(_res_conv);
+ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(_res_conv);
}
-static inline uint64_t CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_clone_ptr(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ *NONNULL_PTR arg) {
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ), "LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ");
- *ret_conv = CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_clone(arg);
+static inline uint64_t CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR arg) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ");
+ *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_clone_ptr"))) TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_clone_ptr(uint64_t arg) {
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* arg_conv = (LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(uint64_t arg) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* arg_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_clone"))) TS_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_clone(uint64_t orig) {
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* orig_conv = (LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ*)untag_ptr(orig);
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ), "LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ");
- *ret_conv = CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ_clone(orig_conv);
+uint64_t __attribute__((export_name("TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone"))) TS_CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(uint64_t orig) {
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* orig_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(orig);
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ");
+ *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_ok"))) TS_CResult_OnionMessagePathNoneZ_ok(uint64_t o) {
- LDKOnionMessagePath o_conv;
- o_conv.inner = untag_ptr(o);
- o_conv.is_owned = ptr_is_owned(o);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
- o_conv = OnionMessagePath_clone(&o_conv);
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_err"))) TS_CResult_OnionMessagePathNoneZ_err() {
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-jboolean __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_is_ok"))) TS_CResult_OnionMessagePathNoneZ_is_ok(uint64_t o) {
- LDKCResult_OnionMessagePathNoneZ* o_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_OnionMessagePathNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_free"))) TS_CResult_OnionMessagePathNoneZ_free(uint64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_OnionMessagePathNoneZ _res_conv = *(LDKCResult_OnionMessagePathNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_OnionMessagePathNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_OnionMessagePathNoneZ_clone_ptr(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR arg) {
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_clone_ptr"))) TS_CResult_OnionMessagePathNoneZ_clone_ptr(uint64_t arg) {
- LDKCResult_OnionMessagePathNoneZ* arg_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_OnionMessagePathNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CResult_OnionMessagePathNoneZ_clone"))) TS_CResult_OnionMessagePathNoneZ_clone(uint64_t orig) {
- LDKCResult_OnionMessagePathNoneZ* orig_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(orig);
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-static inline uint64_t C2Tuple_PublicKeyOnionMessageZ_clone_ptr(LDKC2Tuple_PublicKeyOnionMessageZ *NONNULL_PTR arg) {
- LDKC2Tuple_PublicKeyOnionMessageZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyOnionMessageZ), "LDKC2Tuple_PublicKeyOnionMessageZ");
- *ret_conv = C2Tuple_PublicKeyOnionMessageZ_clone(arg);
+static inline uint64_t C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone_ptr(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR arg) {
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ), "LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ");
+ *ret_conv = C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_C2Tuple_PublicKeyOnionMessageZ_clone_ptr"))) TS_C2Tuple_PublicKeyOnionMessageZ_clone_ptr(uint64_t arg) {
- LDKC2Tuple_PublicKeyOnionMessageZ* arg_conv = (LDKC2Tuple_PublicKeyOnionMessageZ*)untag_ptr(arg);
- int64_t ret_conv = C2Tuple_PublicKeyOnionMessageZ_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone_ptr"))) TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone_ptr(uint64_t arg) {
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ* arg_conv = (LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ*)untag_ptr(arg);
+ int64_t ret_conv = C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyOnionMessageZ_clone"))) TS_C2Tuple_PublicKeyOnionMessageZ_clone(uint64_t orig) {
- LDKC2Tuple_PublicKeyOnionMessageZ* orig_conv = (LDKC2Tuple_PublicKeyOnionMessageZ*)untag_ptr(orig);
- LDKC2Tuple_PublicKeyOnionMessageZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyOnionMessageZ), "LDKC2Tuple_PublicKeyOnionMessageZ");
- *ret_conv = C2Tuple_PublicKeyOnionMessageZ_clone(orig_conv);
+uint64_t __attribute__((export_name("TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone"))) TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone(uint64_t orig) {
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ* orig_conv = (LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ*)untag_ptr(orig);
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ), "LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ");
+ *ret_conv = C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_C2Tuple_PublicKeyOnionMessageZ_new"))) TS_C2Tuple_PublicKeyOnionMessageZ_new(int8_tArray a, uint64_t b) {
+uint64_t __attribute__((export_name("TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new"))) TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(int8_tArray a, uint64_t b, uint64_t c) {
LDKPublicKey a_ref;
CHECK(a->arr_len == 33);
memcpy(a_ref.compressed_form, a->elems, 33); FREE(a);
b_conv.is_owned = ptr_is_owned(b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
b_conv = OnionMessage_clone(&b_conv);
- LDKC2Tuple_PublicKeyOnionMessageZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyOnionMessageZ), "LDKC2Tuple_PublicKeyOnionMessageZ");
- *ret_conv = C2Tuple_PublicKeyOnionMessageZ_new(a_ref, b_conv);
+ void* c_ptr = untag_ptr(c);
+ CHECK_ACCESS(c_ptr);
+ LDKCOption_CVec_SocketAddressZZ c_conv = *(LDKCOption_CVec_SocketAddressZZ*)(c_ptr);
+ c_conv = COption_CVec_SocketAddressZZ_clone((LDKCOption_CVec_SocketAddressZZ*)untag_ptr(c));
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ), "LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ");
+ *ret_conv = C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(a_ref, b_conv, c_conv);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_C2Tuple_PublicKeyOnionMessageZ_free"))) TS_C2Tuple_PublicKeyOnionMessageZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_free"))) TS_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKC2Tuple_PublicKeyOnionMessageZ _res_conv = *(LDKC2Tuple_PublicKeyOnionMessageZ*)(_res_ptr);
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ _res_conv = *(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ*)(_res_ptr);
FREE(untag_ptr(_res));
- C2Tuple_PublicKeyOnionMessageZ_free(_res_conv);
+ C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_free(_res_conv);
}
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_ok"))) TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_ok(uint64_t o) {
+uint64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
- LDKC2Tuple_PublicKeyOnionMessageZ o_conv = *(LDKC2Tuple_PublicKeyOnionMessageZ*)(o_ptr);
- o_conv = C2Tuple_PublicKeyOnionMessageZ_clone((LDKC2Tuple_PublicKeyOnionMessageZ*)untag_ptr(o));
- LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ), "LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ");
- *ret_conv = CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_ok(o_conv);
+ LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ o_conv = *(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ*)(o_ptr);
+ o_conv = C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone((LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ*)untag_ptr(o));
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+ *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_err"))) TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_err(uint64_t e) {
+uint64_t __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_err"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_err(uint64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
LDKSendError e_conv = *(LDKSendError*)(e_ptr);
e_conv = SendError_clone((LDKSendError*)untag_ptr(e));
- LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ), "LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ");
- *ret_conv = CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_err(e_conv);
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+ *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(uint64_t o) {
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* o_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free"))) TS_CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ _res_conv = *(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_ok"))) TS_CResult_PeeledOnionNoneZ_ok(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKPeeledOnion o_conv = *(LDKPeeledOnion*)(o_ptr);
+ o_conv = PeeledOnion_clone((LDKPeeledOnion*)untag_ptr(o));
+ LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+ *ret_conv = CResult_PeeledOnionNoneZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_err"))) TS_CResult_PeeledOnionNoneZ_err() {
+ LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+ *ret_conv = CResult_PeeledOnionNoneZ_err();
return tag_ptr(ret_conv, true);
}
-jboolean __attribute__((export_name("TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_is_ok"))) TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_is_ok(uint64_t o) {
- LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ* o_conv = (LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_is_ok(o_conv);
+jboolean __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_is_ok"))) TS_CResult_PeeledOnionNoneZ_is_ok(uint64_t o) {
+ LDKCResult_PeeledOnionNoneZ* o_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_PeeledOnionNoneZ_is_ok(o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_free"))) TS_CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_CResult_PeeledOnionNoneZ_free"))) TS_CResult_PeeledOnionNoneZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ _res_conv = *(LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ*)(_res_ptr);
+ LDKCResult_PeeledOnionNoneZ _res_conv = *(LDKCResult_PeeledOnionNoneZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ_free(_res_conv);
+ CResult_PeeledOnionNoneZ_free(_res_conv);
}
-uint64_t __attribute__((export_name("TS_CResult_NoneSendErrorZ_ok"))) TS_CResult_NoneSendErrorZ_ok() {
- LDKCResult_NoneSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneSendErrorZ), "LDKCResult_NoneSendErrorZ");
- *ret_conv = CResult_NoneSendErrorZ_ok();
+uint64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_ok"))) TS_CResult_SendSuccessSendErrorZ_ok(uint64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKSendSuccess o_conv = *(LDKSendSuccess*)(o_ptr);
+ o_conv = SendSuccess_clone((LDKSendSuccess*)untag_ptr(o));
+ LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+ *ret_conv = CResult_SendSuccessSendErrorZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_CResult_NoneSendErrorZ_err"))) TS_CResult_NoneSendErrorZ_err(uint64_t e) {
+uint64_t __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_err"))) TS_CResult_SendSuccessSendErrorZ_err(uint64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
LDKSendError e_conv = *(LDKSendError*)(e_ptr);
e_conv = SendError_clone((LDKSendError*)untag_ptr(e));
- LDKCResult_NoneSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneSendErrorZ), "LDKCResult_NoneSendErrorZ");
- *ret_conv = CResult_NoneSendErrorZ_err(e_conv);
+ LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+ *ret_conv = CResult_SendSuccessSendErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean __attribute__((export_name("TS_CResult_NoneSendErrorZ_is_ok"))) TS_CResult_NoneSendErrorZ_is_ok(uint64_t o) {
- LDKCResult_NoneSendErrorZ* o_conv = (LDKCResult_NoneSendErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NoneSendErrorZ_is_ok(o_conv);
+jboolean __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_is_ok"))) TS_CResult_SendSuccessSendErrorZ_is_ok(uint64_t o) {
+ LDKCResult_SendSuccessSendErrorZ* o_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_SendSuccessSendErrorZ_is_ok(o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_CResult_NoneSendErrorZ_free"))) TS_CResult_NoneSendErrorZ_free(uint64_t _res) {
+void __attribute__((export_name("TS_CResult_SendSuccessSendErrorZ_free"))) TS_CResult_SendSuccessSendErrorZ_free(uint64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_NoneSendErrorZ _res_conv = *(LDKCResult_NoneSendErrorZ*)(_res_ptr);
+ LDKCResult_SendSuccessSendErrorZ _res_conv = *(LDKCResult_SendSuccessSendErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_NoneSendErrorZ_free(_res_conv);
+ CResult_SendSuccessSendErrorZ_free(_res_conv);
}
uint64_t __attribute__((export_name("TS_CResult_BlindedPathNoneZ_ok"))) TS_CResult_BlindedPathNoneZ_ok(uint64_t o) {
return tag_ptr(ret_conv, true);
}
+void __attribute__((export_name("TS_CVec_ForwardNodeZ_free"))) TS_CVec_ForwardNodeZ_free(uint64_tArray _res) {
+ LDKCVec_ForwardNodeZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKForwardNode), "LDKCVec_ForwardNodeZ Elements");
+ else
+ _res_constr.data = NULL;
+ uint64_t* _res_vals = _res->elems;
+ for (size_t n = 0; n < _res_constr.datalen; n++) {
+ uint64_t _res_conv_13 = _res_vals[n];
+ LDKForwardNode _res_conv_13_conv;
+ _res_conv_13_conv.inner = untag_ptr(_res_conv_13);
+ _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv);
+ _res_constr.data[n] = _res_conv_13_conv;
+ }
+ FREE(_res);
+ CVec_ForwardNodeZ_free(_res_constr);
+}
+
uint64_t __attribute__((export_name("TS_CResult_BlindedPathDecodeErrorZ_ok"))) TS_CResult_BlindedPathDecodeErrorZ_ok(uint64_t o) {
LDKBlindedPath o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_ok"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_ok(uint64_t o) {
+ LDKDelayedPaymentBasepoint o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = DelayedPaymentBasepoint_clone(&o_conv);
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentBasepointDecodeErrorZ), "LDKCResult_DelayedPaymentBasepointDecodeErrorZ");
+ *ret_conv = CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_err"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentBasepointDecodeErrorZ), "LDKCResult_DelayedPaymentBasepointDecodeErrorZ");
+ *ret_conv = CResult_DelayedPaymentBasepointDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_is_ok"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* o_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_DelayedPaymentBasepointDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_free"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ _res_conv = *(LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_DelayedPaymentBasepointDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_DelayedPaymentBasepointDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentBasepointDecodeErrorZ), "LDKCResult_DelayedPaymentBasepointDecodeErrorZ");
+ *ret_conv = CResult_DelayedPaymentBasepointDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_clone_ptr"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* arg_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_DelayedPaymentBasepointDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentBasepointDecodeErrorZ_clone"))) TS_CResult_DelayedPaymentBasepointDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* orig_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentBasepointDecodeErrorZ), "LDKCResult_DelayedPaymentBasepointDecodeErrorZ");
+ *ret_conv = CResult_DelayedPaymentBasepointDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_ok"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_ok(uint64_t o) {
+ LDKDelayedPaymentKey o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = DelayedPaymentKey_clone(&o_conv);
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentKeyDecodeErrorZ), "LDKCResult_DelayedPaymentKeyDecodeErrorZ");
+ *ret_conv = CResult_DelayedPaymentKeyDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_err"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentKeyDecodeErrorZ), "LDKCResult_DelayedPaymentKeyDecodeErrorZ");
+ *ret_conv = CResult_DelayedPaymentKeyDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_is_ok"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* o_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_DelayedPaymentKeyDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_free"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ _res_conv = *(LDKCResult_DelayedPaymentKeyDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_DelayedPaymentKeyDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_DelayedPaymentKeyDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentKeyDecodeErrorZ), "LDKCResult_DelayedPaymentKeyDecodeErrorZ");
+ *ret_conv = CResult_DelayedPaymentKeyDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_clone_ptr"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* arg_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_DelayedPaymentKeyDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_DelayedPaymentKeyDecodeErrorZ_clone"))) TS_CResult_DelayedPaymentKeyDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* orig_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentKeyDecodeErrorZ), "LDKCResult_DelayedPaymentKeyDecodeErrorZ");
+ *ret_conv = CResult_DelayedPaymentKeyDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_ok"))) TS_CResult_HtlcBasepointDecodeErrorZ_ok(uint64_t o) {
+ LDKHtlcBasepoint o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = HtlcBasepoint_clone(&o_conv);
+ LDKCResult_HtlcBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcBasepointDecodeErrorZ), "LDKCResult_HtlcBasepointDecodeErrorZ");
+ *ret_conv = CResult_HtlcBasepointDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_err"))) TS_CResult_HtlcBasepointDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_HtlcBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcBasepointDecodeErrorZ), "LDKCResult_HtlcBasepointDecodeErrorZ");
+ *ret_conv = CResult_HtlcBasepointDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_is_ok"))) TS_CResult_HtlcBasepointDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* o_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_HtlcBasepointDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_free"))) TS_CResult_HtlcBasepointDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_HtlcBasepointDecodeErrorZ _res_conv = *(LDKCResult_HtlcBasepointDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_HtlcBasepointDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_HtlcBasepointDecodeErrorZ_clone_ptr(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcBasepointDecodeErrorZ), "LDKCResult_HtlcBasepointDecodeErrorZ");
+ *ret_conv = CResult_HtlcBasepointDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_clone_ptr"))) TS_CResult_HtlcBasepointDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* arg_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_HtlcBasepointDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_HtlcBasepointDecodeErrorZ_clone"))) TS_CResult_HtlcBasepointDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_HtlcBasepointDecodeErrorZ* orig_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_HtlcBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcBasepointDecodeErrorZ), "LDKCResult_HtlcBasepointDecodeErrorZ");
+ *ret_conv = CResult_HtlcBasepointDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_ok"))) TS_CResult_HtlcKeyDecodeErrorZ_ok(uint64_t o) {
+ LDKHtlcKey o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = HtlcKey_clone(&o_conv);
+ LDKCResult_HtlcKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcKeyDecodeErrorZ), "LDKCResult_HtlcKeyDecodeErrorZ");
+ *ret_conv = CResult_HtlcKeyDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_err"))) TS_CResult_HtlcKeyDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_HtlcKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcKeyDecodeErrorZ), "LDKCResult_HtlcKeyDecodeErrorZ");
+ *ret_conv = CResult_HtlcKeyDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_is_ok"))) TS_CResult_HtlcKeyDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_HtlcKeyDecodeErrorZ* o_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_HtlcKeyDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_free"))) TS_CResult_HtlcKeyDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_HtlcKeyDecodeErrorZ _res_conv = *(LDKCResult_HtlcKeyDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_HtlcKeyDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_HtlcKeyDecodeErrorZ_clone_ptr(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_HtlcKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcKeyDecodeErrorZ), "LDKCResult_HtlcKeyDecodeErrorZ");
+ *ret_conv = CResult_HtlcKeyDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_clone_ptr"))) TS_CResult_HtlcKeyDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_HtlcKeyDecodeErrorZ* arg_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_HtlcKeyDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_HtlcKeyDecodeErrorZ_clone"))) TS_CResult_HtlcKeyDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_HtlcKeyDecodeErrorZ* orig_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_HtlcKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcKeyDecodeErrorZ), "LDKCResult_HtlcKeyDecodeErrorZ");
+ *ret_conv = CResult_HtlcKeyDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_ok"))) TS_CResult_RevocationBasepointDecodeErrorZ_ok(uint64_t o) {
+ LDKRevocationBasepoint o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = RevocationBasepoint_clone(&o_conv);
+ LDKCResult_RevocationBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationBasepointDecodeErrorZ), "LDKCResult_RevocationBasepointDecodeErrorZ");
+ *ret_conv = CResult_RevocationBasepointDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_err"))) TS_CResult_RevocationBasepointDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_RevocationBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationBasepointDecodeErrorZ), "LDKCResult_RevocationBasepointDecodeErrorZ");
+ *ret_conv = CResult_RevocationBasepointDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_is_ok"))) TS_CResult_RevocationBasepointDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* o_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_RevocationBasepointDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_free"))) TS_CResult_RevocationBasepointDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_RevocationBasepointDecodeErrorZ _res_conv = *(LDKCResult_RevocationBasepointDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_RevocationBasepointDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RevocationBasepointDecodeErrorZ_clone_ptr(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationBasepointDecodeErrorZ), "LDKCResult_RevocationBasepointDecodeErrorZ");
+ *ret_conv = CResult_RevocationBasepointDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_clone_ptr"))) TS_CResult_RevocationBasepointDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* arg_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_RevocationBasepointDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_RevocationBasepointDecodeErrorZ_clone"))) TS_CResult_RevocationBasepointDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_RevocationBasepointDecodeErrorZ* orig_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_RevocationBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationBasepointDecodeErrorZ), "LDKCResult_RevocationBasepointDecodeErrorZ");
+ *ret_conv = CResult_RevocationBasepointDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_ok"))) TS_CResult_RevocationKeyDecodeErrorZ_ok(uint64_t o) {
+ LDKRevocationKey o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv = RevocationKey_clone(&o_conv);
+ LDKCResult_RevocationKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationKeyDecodeErrorZ), "LDKCResult_RevocationKeyDecodeErrorZ");
+ *ret_conv = CResult_RevocationKeyDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_err"))) TS_CResult_RevocationKeyDecodeErrorZ_err(uint64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+ e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+ LDKCResult_RevocationKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationKeyDecodeErrorZ), "LDKCResult_RevocationKeyDecodeErrorZ");
+ *ret_conv = CResult_RevocationKeyDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_is_ok"))) TS_CResult_RevocationKeyDecodeErrorZ_is_ok(uint64_t o) {
+ LDKCResult_RevocationKeyDecodeErrorZ* o_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_RevocationKeyDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_free"))) TS_CResult_RevocationKeyDecodeErrorZ_free(uint64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_RevocationKeyDecodeErrorZ _res_conv = *(LDKCResult_RevocationKeyDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_RevocationKeyDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RevocationKeyDecodeErrorZ_clone_ptr(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_RevocationKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationKeyDecodeErrorZ), "LDKCResult_RevocationKeyDecodeErrorZ");
+ *ret_conv = CResult_RevocationKeyDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_clone_ptr"))) TS_CResult_RevocationKeyDecodeErrorZ_clone_ptr(uint64_t arg) {
+ LDKCResult_RevocationKeyDecodeErrorZ* arg_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_RevocationKeyDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CResult_RevocationKeyDecodeErrorZ_clone"))) TS_CResult_RevocationKeyDecodeErrorZ_clone(uint64_t orig) {
+ LDKCResult_RevocationKeyDecodeErrorZ* orig_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_RevocationKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationKeyDecodeErrorZ), "LDKCResult_RevocationKeyDecodeErrorZ");
+ *ret_conv = CResult_RevocationKeyDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_COption_FilterZ_some"))) TS_COption_FilterZ_some(uint64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_Hostname_hash"))) TS_Hostname_hash(uint64_t o) {
+ LDKHostname o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Hostname_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_Hostname_eq"))) TS_Hostname_eq(uint64_t a, uint64_t b) {
LDKHostname a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TransactionU16LenLimited_hash"))) TS_TransactionU16LenLimited_hash(uint64_t o) {
+ LDKTransactionU16LenLimited o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TransactionU16LenLimited_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TransactionU16LenLimited_eq"))) TS_TransactionU16LenLimited_eq(uint64_t a, uint64_t b) {
LDKTransactionU16LenLimited a_conv;
a_conv.inner = untag_ptr(a);
return ret_conv;
}
+int64_t __attribute__((export_name("TS_UntrustedString_hash"))) TS_UntrustedString_hash(uint64_t o) {
+ LDKUntrustedString o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = UntrustedString_hash(&o_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_UntrustedString_write"))) TS_UntrustedString_write(uint64_t obj) {
LDKUntrustedString obj_conv;
obj_conv.inner = untag_ptr(obj);
Record_set_level(&this_ptr_conv, val_conv);
}
+int8_tArray __attribute__((export_name("TS_Record_get_peer_id"))) TS_Record_get_peer_id(uint64_t this_ptr) {
+ LDKRecord this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, Record_get_peer_id(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_Record_set_peer_id"))) TS_Record_set_peer_id(uint64_t this_ptr, int8_tArray val) {
+ LDKRecord this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ Record_set_peer_id(&this_ptr_conv, val_ref);
+}
+
+uint64_t __attribute__((export_name("TS_Record_get_channel_id"))) TS_Record_get_channel_id(uint64_t this_ptr) {
+ LDKRecord this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ");
+ *ret_copy = Record_get_channel_id(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_Record_set_channel_id"))) TS_Record_set_channel_id(uint64_t this_ptr, uint64_t val) {
+ LDKRecord this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr);
+ val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val));
+ Record_set_channel_id(&this_ptr_conv, val_conv);
+}
+
jstring __attribute__((export_name("TS_Record_get_args"))) TS_Record_get_args(uint64_t this_ptr) {
LDKRecord this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
Record_set_line(&this_ptr_conv, val);
}
+uint64_t __attribute__((export_name("TS_Record_new"))) TS_Record_new(uint32_t level_arg, int8_tArray peer_id_arg, uint64_t channel_id_arg, jstring args_arg, jstring module_path_arg, jstring file_arg, int32_t line_arg) {
+ LDKLevel level_arg_conv = LDKLevel_from_js(level_arg);
+ LDKPublicKey peer_id_arg_ref;
+ CHECK(peer_id_arg->arr_len == 33);
+ memcpy(peer_id_arg_ref.compressed_form, peer_id_arg->elems, 33); FREE(peer_id_arg);
+ void* channel_id_arg_ptr = untag_ptr(channel_id_arg);
+ CHECK_ACCESS(channel_id_arg_ptr);
+ LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr);
+ channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg));
+ LDKStr args_arg_conv = str_ref_to_owned_c(args_arg);
+ LDKStr module_path_arg_conv = str_ref_to_owned_c(module_path_arg);
+ LDKStr file_arg_conv = str_ref_to_owned_c(file_arg);
+ LDKRecord ret_var = Record_new(level_arg_conv, peer_id_arg_ref, channel_id_arg_conv, args_arg_conv, module_path_arg_conv, file_arg_conv, line_arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
static inline uint64_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg) {
LDKRecord ret_var = Record_clone(arg);
uint64_t ret_ref = 0;
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKu8slice ret_var = WatchedOutput_get_script_pubkey(&this_ptr_conv);
+ LDKCVec_u8Z ret_var = WatchedOutput_get_script_pubkey(&this_ptr_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
return ret_arr;
}
return ret_conv;
}
-uint32_t __attribute__((export_name("TS_ConfirmationTarget_mempool_minimum"))) TS_ConfirmationTarget_mempool_minimum() {
- uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_mempool_minimum());
+uint32_t __attribute__((export_name("TS_ConfirmationTarget_on_chain_sweep"))) TS_ConfirmationTarget_on_chain_sweep() {
+ uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_on_chain_sweep());
+ return ret_conv;
+}
+
+uint32_t __attribute__((export_name("TS_ConfirmationTarget_min_allowed_anchor_channel_remote_fee"))) TS_ConfirmationTarget_min_allowed_anchor_channel_remote_fee() {
+ uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_min_allowed_anchor_channel_remote_fee());
+ return ret_conv;
+}
+
+uint32_t __attribute__((export_name("TS_ConfirmationTarget_min_allowed_non_anchor_channel_remote_fee"))) TS_ConfirmationTarget_min_allowed_non_anchor_channel_remote_fee() {
+ uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_min_allowed_non_anchor_channel_remote_fee());
return ret_conv;
}
-uint32_t __attribute__((export_name("TS_ConfirmationTarget_background"))) TS_ConfirmationTarget_background() {
- uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_background());
+uint32_t __attribute__((export_name("TS_ConfirmationTarget_anchor_channel_fee"))) TS_ConfirmationTarget_anchor_channel_fee() {
+ uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_anchor_channel_fee());
return ret_conv;
}
-uint32_t __attribute__((export_name("TS_ConfirmationTarget_normal"))) TS_ConfirmationTarget_normal() {
- uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_normal());
+uint32_t __attribute__((export_name("TS_ConfirmationTarget_non_anchor_channel_fee"))) TS_ConfirmationTarget_non_anchor_channel_fee() {
+ uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_non_anchor_channel_fee());
return ret_conv;
}
-uint32_t __attribute__((export_name("TS_ConfirmationTarget_high_priority"))) TS_ConfirmationTarget_high_priority() {
- uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_high_priority());
+uint32_t __attribute__((export_name("TS_ConfirmationTarget_channel_close_minimum"))) TS_ConfirmationTarget_channel_close_minimum() {
+ uint32_t ret_conv = LDKConfirmationTarget_to_js(ConfirmationTarget_channel_close_minimum());
return ret_conv;
}
return ret_arr;
}
-void __attribute__((export_name("TS_ChannelMonitor_load_outputs_to_watch"))) TS_ChannelMonitor_load_outputs_to_watch(uint64_t this_arg, uint64_t filter) {
+void __attribute__((export_name("TS_ChannelMonitor_load_outputs_to_watch"))) TS_ChannelMonitor_load_outputs_to_watch(uint64_t this_arg, uint64_t filter, uint64_t logger) {
LDKChannelMonitor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
void* filter_ptr = untag_ptr(filter);
if (ptr_is_owned(filter)) { CHECK_ACCESS(filter_ptr); }
LDKFilter* filter_conv = (LDKFilter*)filter_ptr;
- ChannelMonitor_load_outputs_to_watch(&this_arg_conv, filter_conv);
+ void* logger_ptr = untag_ptr(logger);
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+ ChannelMonitor_load_outputs_to_watch(&this_arg_conv, filter_conv, logger_conv);
}
uint64_tArray __attribute__((export_name("TS_ChannelMonitor_get_and_clear_pending_monitor_events"))) TS_ChannelMonitor_get_and_clear_pending_monitor_events(uint64_t this_arg) {
LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
}
void* logger_ptr = untag_ptr(logger);
- CHECK_ACCESS(logger_ptr);
- LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_cloned(&logger_conv);
- }
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint64_tArray ret_arr = NULL;
ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
}
void* logger_ptr = untag_ptr(logger);
- CHECK_ACCESS(logger_ptr);
- LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_cloned(&logger_conv);
- }
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
ChannelMonitor_block_disconnected(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
}
LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
}
void* logger_ptr = untag_ptr(logger);
- CHECK_ACCESS(logger_ptr);
- LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_cloned(&logger_conv);
- }
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_transactions_confirmed(&this_arg_conv, header_ref, txdata_constr, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint64_tArray ret_arr = NULL;
ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
}
void* logger_ptr = untag_ptr(logger);
- CHECK_ACCESS(logger_ptr);
- LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_cloned(&logger_conv);
- }
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
ChannelMonitor_transaction_unconfirmed(&this_arg_conv, txid_ref, broadcaster_conv, fee_estimator_conv, logger_conv);
}
LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
}
void* logger_ptr = untag_ptr(logger);
- CHECK_ACCESS(logger_ptr);
- LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_cloned(&logger_conv);
- }
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ret_var = ChannelMonitor_best_block_updated(&this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv);
uint64_tArray ret_arr = NULL;
ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ ret_var = ChannelMonitor_get_relevant_txids(&this_arg_conv);
+ LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret_var = ChannelMonitor_get_relevant_txids(&this_arg_conv);
uint64_tArray ret_arr = NULL;
ret_arr = init_uint64_tArray(ret_var.datalen, __LINE__);
uint64_t *ret_arr_ptr = (uint64_t*)(((uint8_t*)ret_arr) + 8);
- for (size_t x = 0; x < ret_var.datalen; x++) {
- LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ* ret_conv_49_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ), "LDKC2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ");
- *ret_conv_49_conv = ret_var.data[x];
- ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true);
+ for (size_t c = 0; c < ret_var.datalen; c++) {
+ LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ* ret_conv_54_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ), "LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ");
+ *ret_conv_54_conv = ret_var.data[c];
+ ret_arr_ptr[c] = tag_ptr(ret_conv_54_conv, true);
}
FREE(ret_var.data);
LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
}
void* logger_ptr = untag_ptr(logger);
- CHECK_ACCESS(logger_ptr);
- LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_cloned(&logger_conv);
- }
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
}
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_FailureCode_free"))) TS_FailureCode_free(uint64_t this_ptr) {
+void __attribute__((export_name("TS_InboundHTLCErr_free"))) TS_InboundHTLCErr_free(uint64_t this_obj) {
+ LDKInboundHTLCErr this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ InboundHTLCErr_free(this_obj_conv);
+}
+
+int16_t __attribute__((export_name("TS_InboundHTLCErr_get_err_code"))) TS_InboundHTLCErr_get_err_code(uint64_t this_ptr) {
+ LDKInboundHTLCErr this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int16_t ret_conv = InboundHTLCErr_get_err_code(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_InboundHTLCErr_set_err_code"))) TS_InboundHTLCErr_set_err_code(uint64_t this_ptr, int16_t val) {
+ LDKInboundHTLCErr this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ InboundHTLCErr_set_err_code(&this_ptr_conv, val);
+}
+
+int8_tArray __attribute__((export_name("TS_InboundHTLCErr_get_err_data"))) TS_InboundHTLCErr_get_err_data(uint64_t this_ptr) {
+ LDKInboundHTLCErr this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = InboundHTLCErr_get_err_data(&this_ptr_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_InboundHTLCErr_set_err_data"))) TS_InboundHTLCErr_set_err_data(uint64_t this_ptr, int8_tArray val) {
+ LDKInboundHTLCErr this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u8Z val_ref;
+ val_ref.datalen = val->arr_len;
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val);
+ InboundHTLCErr_set_err_data(&this_ptr_conv, val_ref);
+}
+
+jstring __attribute__((export_name("TS_InboundHTLCErr_get_msg"))) TS_InboundHTLCErr_get_msg(uint64_t this_ptr) {
+ LDKInboundHTLCErr this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKStr ret_str = InboundHTLCErr_get_msg(&this_ptr_conv);
+ jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_InboundHTLCErr_set_msg"))) TS_InboundHTLCErr_set_msg(uint64_t this_ptr, jstring val) {
+ LDKInboundHTLCErr this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKStr val_conv = str_ref_to_owned_c(val);
+ InboundHTLCErr_set_msg(&this_ptr_conv, val_conv);
+}
+
+uint64_t __attribute__((export_name("TS_InboundHTLCErr_new"))) TS_InboundHTLCErr_new(int16_t err_code_arg, int8_tArray err_data_arg, jstring msg_arg) {
+ LDKCVec_u8Z err_data_arg_ref;
+ err_data_arg_ref.datalen = err_data_arg->arr_len;
+ err_data_arg_ref.data = MALLOC(err_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(err_data_arg_ref.data, err_data_arg->elems, err_data_arg_ref.datalen); FREE(err_data_arg);
+ LDKStr msg_arg_conv = str_ref_to_owned_c(msg_arg);
+ LDKInboundHTLCErr ret_var = InboundHTLCErr_new(err_code_arg, err_data_arg_ref, msg_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_peel_payment_onion"))) TS_peel_payment_onion(uint64_t msg, uint64_t node_signer, uint64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) {
+ LDKUpdateAddHTLC msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv.is_owned = false;
+ void* node_signer_ptr = untag_ptr(node_signer);
+ if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); }
+ LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr;
+ void* logger_ptr = untag_ptr(logger);
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+ LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+ *ret_conv = peel_payment_onion(&msg_conv, node_signer_conv, logger_conv, cur_height, accept_mpp_keysend, allow_skimmed_fees);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_PendingHTLCRouting_free"))) TS_PendingHTLCRouting_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
CHECK_ACCESS(this_ptr_ptr);
- LDKFailureCode this_ptr_conv = *(LDKFailureCode*)(this_ptr_ptr);
+ LDKPendingHTLCRouting this_ptr_conv = *(LDKPendingHTLCRouting*)(this_ptr_ptr);
FREE(untag_ptr(this_ptr));
- FailureCode_free(this_ptr_conv);
+ PendingHTLCRouting_free(this_ptr_conv);
}
-static inline uint64_t FailureCode_clone_ptr(LDKFailureCode *NONNULL_PTR arg) {
- LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
- *ret_copy = FailureCode_clone(arg);
+static inline uint64_t PendingHTLCRouting_clone_ptr(LDKPendingHTLCRouting *NONNULL_PTR arg) {
+ LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
+ *ret_copy = PendingHTLCRouting_clone(arg);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_FailureCode_clone_ptr"))) TS_FailureCode_clone_ptr(uint64_t arg) {
- LDKFailureCode* arg_conv = (LDKFailureCode*)untag_ptr(arg);
- int64_t ret_conv = FailureCode_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_PendingHTLCRouting_clone_ptr"))) TS_PendingHTLCRouting_clone_ptr(uint64_t arg) {
+ LDKPendingHTLCRouting* arg_conv = (LDKPendingHTLCRouting*)untag_ptr(arg);
+ int64_t ret_conv = PendingHTLCRouting_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_FailureCode_clone"))) TS_FailureCode_clone(uint64_t orig) {
- LDKFailureCode* orig_conv = (LDKFailureCode*)untag_ptr(orig);
- LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
- *ret_copy = FailureCode_clone(orig_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_FailureCode_temporary_node_failure"))) TS_FailureCode_temporary_node_failure() {
- LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
- *ret_copy = FailureCode_temporary_node_failure();
+uint64_t __attribute__((export_name("TS_PendingHTLCRouting_clone"))) TS_PendingHTLCRouting_clone(uint64_t orig) {
+ LDKPendingHTLCRouting* orig_conv = (LDKPendingHTLCRouting*)untag_ptr(orig);
+ LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
+ *ret_copy = PendingHTLCRouting_clone(orig_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_FailureCode_required_node_feature_missing"))) TS_FailureCode_required_node_feature_missing() {
- LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
- *ret_copy = FailureCode_required_node_feature_missing();
+uint64_t __attribute__((export_name("TS_PendingHTLCRouting_forward"))) TS_PendingHTLCRouting_forward(uint64_t onion_packet, int64_t short_channel_id, uint64_t blinded) {
+ LDKOnionPacket onion_packet_conv;
+ onion_packet_conv.inner = untag_ptr(onion_packet);
+ onion_packet_conv.is_owned = ptr_is_owned(onion_packet);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(onion_packet_conv);
+ onion_packet_conv = OnionPacket_clone(&onion_packet_conv);
+ LDKBlindedForward blinded_conv;
+ blinded_conv.inner = untag_ptr(blinded);
+ blinded_conv.is_owned = ptr_is_owned(blinded);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_conv);
+ blinded_conv = BlindedForward_clone(&blinded_conv);
+ LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
+ *ret_copy = PendingHTLCRouting_forward(onion_packet_conv, short_channel_id, blinded_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_FailureCode_incorrect_or_unknown_payment_details"))) TS_FailureCode_incorrect_or_unknown_payment_details() {
- LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
- *ret_copy = FailureCode_incorrect_or_unknown_payment_details();
+uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive"))) TS_PendingHTLCRouting_receive(uint64_t payment_data, uint64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, uint64_tArray custom_tlvs, jboolean requires_blinded_error) {
+ LDKFinalOnionHopData payment_data_conv;
+ payment_data_conv.inner = untag_ptr(payment_data);
+ payment_data_conv.is_owned = ptr_is_owned(payment_data);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_conv);
+ payment_data_conv = FinalOnionHopData_clone(&payment_data_conv);
+ void* payment_metadata_ptr = untag_ptr(payment_metadata);
+ CHECK_ACCESS(payment_metadata_ptr);
+ LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr);
+ payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata));
+ LDKThirtyTwoBytes phantom_shared_secret_ref;
+ CHECK(phantom_shared_secret->arr_len == 32);
+ memcpy(phantom_shared_secret_ref.data, phantom_shared_secret->elems, 32); FREE(phantom_shared_secret);
+ LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs_constr;
+ custom_tlvs_constr.datalen = custom_tlvs->arr_len;
+ if (custom_tlvs_constr.datalen > 0)
+ custom_tlvs_constr.data = MALLOC(custom_tlvs_constr.datalen * sizeof(LDKC2Tuple_u64CVec_u8ZZ), "LDKCVec_C2Tuple_u64CVec_u8ZZZ Elements");
+ else
+ custom_tlvs_constr.data = NULL;
+ uint64_t* custom_tlvs_vals = custom_tlvs->elems;
+ for (size_t x = 0; x < custom_tlvs_constr.datalen; x++) {
+ uint64_t custom_tlvs_conv_23 = custom_tlvs_vals[x];
+ void* custom_tlvs_conv_23_ptr = untag_ptr(custom_tlvs_conv_23);
+ CHECK_ACCESS(custom_tlvs_conv_23_ptr);
+ LDKC2Tuple_u64CVec_u8ZZ custom_tlvs_conv_23_conv = *(LDKC2Tuple_u64CVec_u8ZZ*)(custom_tlvs_conv_23_ptr);
+ custom_tlvs_conv_23_conv = C2Tuple_u64CVec_u8ZZ_clone((LDKC2Tuple_u64CVec_u8ZZ*)untag_ptr(custom_tlvs_conv_23));
+ custom_tlvs_constr.data[x] = custom_tlvs_conv_23_conv;
+ }
+ FREE(custom_tlvs);
+ LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
+ *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_FailureCode_invalid_onion_payload"))) TS_FailureCode_invalid_onion_payload(uint64_t a) {
- void* a_ptr = untag_ptr(a);
- CHECK_ACCESS(a_ptr);
- LDKCOption_C2Tuple_u64u16ZZ a_conv = *(LDKCOption_C2Tuple_u64u16ZZ*)(a_ptr);
- a_conv = COption_C2Tuple_u64u16ZZ_clone((LDKCOption_C2Tuple_u64u16ZZ*)untag_ptr(a));
- LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
- *ret_copy = FailureCode_invalid_onion_payload(a_conv);
+uint64_t __attribute__((export_name("TS_PendingHTLCRouting_receive_keysend"))) TS_PendingHTLCRouting_receive_keysend(uint64_t payment_data, int8_tArray payment_preimage, uint64_t payment_metadata, int32_t incoming_cltv_expiry, uint64_tArray custom_tlvs) {
+ LDKFinalOnionHopData payment_data_conv;
+ payment_data_conv.inner = untag_ptr(payment_data);
+ payment_data_conv.is_owned = ptr_is_owned(payment_data);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_conv);
+ payment_data_conv = FinalOnionHopData_clone(&payment_data_conv);
+ LDKThirtyTwoBytes payment_preimage_ref;
+ CHECK(payment_preimage->arr_len == 32);
+ memcpy(payment_preimage_ref.data, payment_preimage->elems, 32); FREE(payment_preimage);
+ void* payment_metadata_ptr = untag_ptr(payment_metadata);
+ CHECK_ACCESS(payment_metadata_ptr);
+ LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr);
+ payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata));
+ LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs_constr;
+ custom_tlvs_constr.datalen = custom_tlvs->arr_len;
+ if (custom_tlvs_constr.datalen > 0)
+ custom_tlvs_constr.data = MALLOC(custom_tlvs_constr.datalen * sizeof(LDKC2Tuple_u64CVec_u8ZZ), "LDKCVec_C2Tuple_u64CVec_u8ZZZ Elements");
+ else
+ custom_tlvs_constr.data = NULL;
+ uint64_t* custom_tlvs_vals = custom_tlvs->elems;
+ for (size_t x = 0; x < custom_tlvs_constr.datalen; x++) {
+ uint64_t custom_tlvs_conv_23 = custom_tlvs_vals[x];
+ void* custom_tlvs_conv_23_ptr = untag_ptr(custom_tlvs_conv_23);
+ CHECK_ACCESS(custom_tlvs_conv_23_ptr);
+ LDKC2Tuple_u64CVec_u8ZZ custom_tlvs_conv_23_conv = *(LDKC2Tuple_u64CVec_u8ZZ*)(custom_tlvs_conv_23_ptr);
+ custom_tlvs_conv_23_conv = C2Tuple_u64CVec_u8ZZ_clone((LDKC2Tuple_u64CVec_u8ZZ*)untag_ptr(custom_tlvs_conv_23));
+ custom_tlvs_constr.data[x] = custom_tlvs_conv_23_conv;
+ }
+ FREE(custom_tlvs);
+ LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
+ *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void __attribute__((export_name("TS_ChannelManager_free"))) TS_ChannelManager_free(uint64_t this_obj) {
- LDKChannelManager this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- ChannelManager_free(this_obj_conv);
-}
-
-void __attribute__((export_name("TS_ChainParameters_free"))) TS_ChainParameters_free(uint64_t this_obj) {
- LDKChainParameters this_obj_conv;
+void __attribute__((export_name("TS_BlindedForward_free"))) TS_BlindedForward_free(uint64_t this_obj) {
+ LDKBlindedForward this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- ChainParameters_free(this_obj_conv);
+ BlindedForward_free(this_obj_conv);
}
-uint32_t __attribute__((export_name("TS_ChainParameters_get_network"))) TS_ChainParameters_get_network(uint64_t this_ptr) {
- LDKChainParameters this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_BlindedForward_get_inbound_blinding_point"))) TS_BlindedForward_get_inbound_blinding_point(uint64_t this_ptr) {
+ LDKBlindedForward this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- uint32_t ret_conv = LDKNetwork_to_js(ChainParameters_get_network(&this_ptr_conv));
- return ret_conv;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, BlindedForward_get_inbound_blinding_point(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
}
-void __attribute__((export_name("TS_ChainParameters_set_network"))) TS_ChainParameters_set_network(uint64_t this_ptr, uint32_t val) {
- LDKChainParameters this_ptr_conv;
+void __attribute__((export_name("TS_BlindedForward_set_inbound_blinding_point"))) TS_BlindedForward_set_inbound_blinding_point(uint64_t this_ptr, int8_tArray val) {
+ LDKBlindedForward this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKNetwork val_conv = LDKNetwork_from_js(val);
- ChainParameters_set_network(&this_ptr_conv, val_conv);
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ BlindedForward_set_inbound_blinding_point(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_ChainParameters_get_best_block"))) TS_ChainParameters_get_best_block(uint64_t this_ptr) {
- LDKChainParameters this_ptr_conv;
+uint32_t __attribute__((export_name("TS_BlindedForward_get_failure"))) TS_BlindedForward_get_failure(uint64_t this_ptr) {
+ LDKBlindedForward this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKBestBlock ret_var = ChainParameters_get_best_block(&this_ptr_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+ uint32_t ret_conv = LDKBlindedFailure_to_js(BlindedForward_get_failure(&this_ptr_conv));
+ return ret_conv;
}
-void __attribute__((export_name("TS_ChainParameters_set_best_block"))) TS_ChainParameters_set_best_block(uint64_t this_ptr, uint64_t val) {
- LDKChainParameters this_ptr_conv;
+void __attribute__((export_name("TS_BlindedForward_set_failure"))) TS_BlindedForward_set_failure(uint64_t this_ptr, uint32_t val) {
+ LDKBlindedForward this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKBestBlock val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = BestBlock_clone(&val_conv);
- ChainParameters_set_best_block(&this_ptr_conv, val_conv);
+ LDKBlindedFailure val_conv = LDKBlindedFailure_from_js(val);
+ BlindedForward_set_failure(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_ChainParameters_new"))) TS_ChainParameters_new(uint32_t network_arg, uint64_t best_block_arg) {
- LDKNetwork network_arg_conv = LDKNetwork_from_js(network_arg);
- LDKBestBlock best_block_arg_conv;
- best_block_arg_conv.inner = untag_ptr(best_block_arg);
- best_block_arg_conv.is_owned = ptr_is_owned(best_block_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_arg_conv);
- best_block_arg_conv = BestBlock_clone(&best_block_arg_conv);
- LDKChainParameters ret_var = ChainParameters_new(network_arg_conv, best_block_arg_conv);
+uint64_t __attribute__((export_name("TS_BlindedForward_new"))) TS_BlindedForward_new(int8_tArray inbound_blinding_point_arg, uint32_t failure_arg) {
+ LDKPublicKey inbound_blinding_point_arg_ref;
+ CHECK(inbound_blinding_point_arg->arr_len == 33);
+ memcpy(inbound_blinding_point_arg_ref.compressed_form, inbound_blinding_point_arg->elems, 33); FREE(inbound_blinding_point_arg);
+ LDKBlindedFailure failure_arg_conv = LDKBlindedFailure_from_js(failure_arg);
+ LDKBlindedForward ret_var = BlindedForward_new(inbound_blinding_point_arg_ref, failure_arg_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t ChainParameters_clone_ptr(LDKChainParameters *NONNULL_PTR arg) {
- LDKChainParameters ret_var = ChainParameters_clone(arg);
+static inline uint64_t BlindedForward_clone_ptr(LDKBlindedForward *NONNULL_PTR arg) {
+ LDKBlindedForward ret_var = BlindedForward_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_ChainParameters_clone_ptr"))) TS_ChainParameters_clone_ptr(uint64_t arg) {
- LDKChainParameters arg_conv;
+int64_t __attribute__((export_name("TS_BlindedForward_clone_ptr"))) TS_BlindedForward_clone_ptr(uint64_t arg) {
+ LDKBlindedForward arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = ChainParameters_clone_ptr(&arg_conv);
+ int64_t ret_conv = BlindedForward_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_ChainParameters_clone"))) TS_ChainParameters_clone(uint64_t orig) {
- LDKChainParameters orig_conv;
+uint64_t __attribute__((export_name("TS_BlindedForward_clone"))) TS_BlindedForward_clone(uint64_t orig) {
+ LDKBlindedForward orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKChainParameters ret_var = ChainParameters_clone(&orig_conv);
+ LDKBlindedForward ret_var = BlindedForward_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-void __attribute__((export_name("TS_CounterpartyForwardingInfo_free"))) TS_CounterpartyForwardingInfo_free(uint64_t this_obj) {
- LDKCounterpartyForwardingInfo this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- CounterpartyForwardingInfo_free(this_obj_conv);
+int64_t __attribute__((export_name("TS_BlindedForward_hash"))) TS_BlindedForward_hash(uint64_t o) {
+ LDKBlindedForward o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = BlindedForward_hash(&o_conv);
+ return ret_conv;
}
-int32_t __attribute__((export_name("TS_CounterpartyForwardingInfo_get_fee_base_msat"))) TS_CounterpartyForwardingInfo_get_fee_base_msat(uint64_t this_ptr) {
- LDKCounterpartyForwardingInfo this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int32_t ret_conv = CounterpartyForwardingInfo_get_fee_base_msat(&this_ptr_conv);
+jboolean __attribute__((export_name("TS_BlindedForward_eq"))) TS_BlindedForward_eq(uint64_t a, uint64_t b) {
+ LDKBlindedForward a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKBlindedForward b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = BlindedForward_eq(&a_conv, &b_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_CounterpartyForwardingInfo_set_fee_base_msat"))) TS_CounterpartyForwardingInfo_set_fee_base_msat(uint64_t this_ptr, int32_t val) {
- LDKCounterpartyForwardingInfo this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- CounterpartyForwardingInfo_set_fee_base_msat(&this_ptr_conv, val);
+void __attribute__((export_name("TS_PendingHTLCInfo_free"))) TS_PendingHTLCInfo_free(uint64_t this_obj) {
+ LDKPendingHTLCInfo this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ PendingHTLCInfo_free(this_obj_conv);
}
-int32_t __attribute__((export_name("TS_CounterpartyForwardingInfo_get_fee_proportional_millionths"))) TS_CounterpartyForwardingInfo_get_fee_proportional_millionths(uint64_t this_ptr) {
- LDKCounterpartyForwardingInfo this_ptr_conv;
+uint64_t __attribute__((export_name("TS_PendingHTLCInfo_get_routing"))) TS_PendingHTLCInfo_get_routing(uint64_t this_ptr) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int32_t ret_conv = CounterpartyForwardingInfo_get_fee_proportional_millionths(&this_ptr_conv);
- return ret_conv;
+ LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
+ *ret_copy = PendingHTLCInfo_get_routing(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-void __attribute__((export_name("TS_CounterpartyForwardingInfo_set_fee_proportional_millionths"))) TS_CounterpartyForwardingInfo_set_fee_proportional_millionths(uint64_t this_ptr, int32_t val) {
- LDKCounterpartyForwardingInfo this_ptr_conv;
+void __attribute__((export_name("TS_PendingHTLCInfo_set_routing"))) TS_PendingHTLCInfo_set_routing(uint64_t this_ptr, uint64_t val) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- CounterpartyForwardingInfo_set_fee_proportional_millionths(&this_ptr_conv, val);
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKPendingHTLCRouting val_conv = *(LDKPendingHTLCRouting*)(val_ptr);
+ val_conv = PendingHTLCRouting_clone((LDKPendingHTLCRouting*)untag_ptr(val));
+ PendingHTLCInfo_set_routing(&this_ptr_conv, val_conv);
}
-int16_t __attribute__((export_name("TS_CounterpartyForwardingInfo_get_cltv_expiry_delta"))) TS_CounterpartyForwardingInfo_get_cltv_expiry_delta(uint64_t this_ptr) {
- LDKCounterpartyForwardingInfo this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_PendingHTLCInfo_get_incoming_shared_secret"))) TS_PendingHTLCInfo_get_incoming_shared_secret(uint64_t this_ptr) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = CounterpartyForwardingInfo_get_cltv_expiry_delta(&this_ptr_conv);
- return ret_conv;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *PendingHTLCInfo_get_incoming_shared_secret(&this_ptr_conv), 32);
+ return ret_arr;
}
-void __attribute__((export_name("TS_CounterpartyForwardingInfo_set_cltv_expiry_delta"))) TS_CounterpartyForwardingInfo_set_cltv_expiry_delta(uint64_t this_ptr, int16_t val) {
- LDKCounterpartyForwardingInfo this_ptr_conv;
+void __attribute__((export_name("TS_PendingHTLCInfo_set_incoming_shared_secret"))) TS_PendingHTLCInfo_set_incoming_shared_secret(uint64_t this_ptr, int8_tArray val) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- CounterpartyForwardingInfo_set_cltv_expiry_delta(&this_ptr_conv, val);
-}
-
-uint64_t __attribute__((export_name("TS_CounterpartyForwardingInfo_new"))) TS_CounterpartyForwardingInfo_new(int32_t fee_base_msat_arg, int32_t fee_proportional_millionths_arg, int16_t cltv_expiry_delta_arg) {
- LDKCounterpartyForwardingInfo ret_var = CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline uint64_t CounterpartyForwardingInfo_clone_ptr(LDKCounterpartyForwardingInfo *NONNULL_PTR arg) {
- LDKCounterpartyForwardingInfo ret_var = CounterpartyForwardingInfo_clone(arg);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-int64_t __attribute__((export_name("TS_CounterpartyForwardingInfo_clone_ptr"))) TS_CounterpartyForwardingInfo_clone_ptr(uint64_t arg) {
- LDKCounterpartyForwardingInfo arg_conv;
- arg_conv.inner = untag_ptr(arg);
- arg_conv.is_owned = ptr_is_owned(arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
- arg_conv.is_owned = false;
- int64_t ret_conv = CounterpartyForwardingInfo_clone_ptr(&arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_CounterpartyForwardingInfo_clone"))) TS_CounterpartyForwardingInfo_clone(uint64_t orig) {
- LDKCounterpartyForwardingInfo orig_conv;
- orig_conv.inner = untag_ptr(orig);
- orig_conv.is_owned = ptr_is_owned(orig);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
- orig_conv.is_owned = false;
- LDKCounterpartyForwardingInfo ret_var = CounterpartyForwardingInfo_clone(&orig_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-void __attribute__((export_name("TS_ChannelCounterparty_free"))) TS_ChannelCounterparty_free(uint64_t this_obj) {
- LDKChannelCounterparty this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- ChannelCounterparty_free(this_obj_conv);
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ PendingHTLCInfo_set_incoming_shared_secret(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_ChannelCounterparty_get_node_id"))) TS_ChannelCounterparty_get_node_id(uint64_t this_ptr) {
- LDKChannelCounterparty this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_PendingHTLCInfo_get_payment_hash"))) TS_PendingHTLCInfo_get_payment_hash(uint64_t this_ptr) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, ChannelCounterparty_get_node_id(&this_ptr_conv).compressed_form, 33);
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *PendingHTLCInfo_get_payment_hash(&this_ptr_conv), 32);
return ret_arr;
}
-void __attribute__((export_name("TS_ChannelCounterparty_set_node_id"))) TS_ChannelCounterparty_set_node_id(uint64_t this_ptr, int8_tArray val) {
- LDKChannelCounterparty this_ptr_conv;
+void __attribute__((export_name("TS_PendingHTLCInfo_set_payment_hash"))) TS_PendingHTLCInfo_set_payment_hash(uint64_t this_ptr, int8_tArray val) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- ChannelCounterparty_set_node_id(&this_ptr_conv, val_ref);
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ PendingHTLCInfo_set_payment_hash(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_ChannelCounterparty_get_features"))) TS_ChannelCounterparty_get_features(uint64_t this_ptr) {
- LDKChannelCounterparty this_ptr_conv;
+uint64_t __attribute__((export_name("TS_PendingHTLCInfo_get_incoming_amt_msat"))) TS_PendingHTLCInfo_get_incoming_amt_msat(uint64_t this_ptr) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKInitFeatures ret_var = ChannelCounterparty_get_features(&this_ptr_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = PendingHTLCInfo_get_incoming_amt_msat(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void __attribute__((export_name("TS_ChannelCounterparty_set_features"))) TS_ChannelCounterparty_set_features(uint64_t this_ptr, uint64_t val) {
- LDKChannelCounterparty this_ptr_conv;
+void __attribute__((export_name("TS_PendingHTLCInfo_set_incoming_amt_msat"))) TS_PendingHTLCInfo_set_incoming_amt_msat(uint64_t this_ptr, uint64_t val) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKInitFeatures val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = InitFeatures_clone(&val_conv);
- ChannelCounterparty_set_features(&this_ptr_conv, val_conv);
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr);
+ val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val));
+ PendingHTLCInfo_set_incoming_amt_msat(&this_ptr_conv, val_conv);
}
-int64_t __attribute__((export_name("TS_ChannelCounterparty_get_unspendable_punishment_reserve"))) TS_ChannelCounterparty_get_unspendable_punishment_reserve(uint64_t this_ptr) {
- LDKChannelCounterparty this_ptr_conv;
+int64_t __attribute__((export_name("TS_PendingHTLCInfo_get_outgoing_amt_msat"))) TS_PendingHTLCInfo_get_outgoing_amt_msat(uint64_t this_ptr) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = ChannelCounterparty_get_unspendable_punishment_reserve(&this_ptr_conv);
+ int64_t ret_conv = PendingHTLCInfo_get_outgoing_amt_msat(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_ChannelCounterparty_set_unspendable_punishment_reserve"))) TS_ChannelCounterparty_set_unspendable_punishment_reserve(uint64_t this_ptr, int64_t val) {
- LDKChannelCounterparty this_ptr_conv;
+void __attribute__((export_name("TS_PendingHTLCInfo_set_outgoing_amt_msat"))) TS_PendingHTLCInfo_set_outgoing_amt_msat(uint64_t this_ptr, int64_t val) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ChannelCounterparty_set_unspendable_punishment_reserve(&this_ptr_conv, val);
+ PendingHTLCInfo_set_outgoing_amt_msat(&this_ptr_conv, val);
}
-uint64_t __attribute__((export_name("TS_ChannelCounterparty_get_forwarding_info"))) TS_ChannelCounterparty_get_forwarding_info(uint64_t this_ptr) {
- LDKChannelCounterparty this_ptr_conv;
+int32_t __attribute__((export_name("TS_PendingHTLCInfo_get_outgoing_cltv_value"))) TS_PendingHTLCInfo_get_outgoing_cltv_value(uint64_t this_ptr) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKCounterpartyForwardingInfo ret_var = ChannelCounterparty_get_forwarding_info(&this_ptr_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+ int32_t ret_conv = PendingHTLCInfo_get_outgoing_cltv_value(&this_ptr_conv);
+ return ret_conv;
}
-void __attribute__((export_name("TS_ChannelCounterparty_set_forwarding_info"))) TS_ChannelCounterparty_set_forwarding_info(uint64_t this_ptr, uint64_t val) {
- LDKChannelCounterparty this_ptr_conv;
+void __attribute__((export_name("TS_PendingHTLCInfo_set_outgoing_cltv_value"))) TS_PendingHTLCInfo_set_outgoing_cltv_value(uint64_t this_ptr, int32_t val) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKCounterpartyForwardingInfo val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = CounterpartyForwardingInfo_clone(&val_conv);
- ChannelCounterparty_set_forwarding_info(&this_ptr_conv, val_conv);
+ PendingHTLCInfo_set_outgoing_cltv_value(&this_ptr_conv, val);
}
-uint64_t __attribute__((export_name("TS_ChannelCounterparty_get_outbound_htlc_minimum_msat"))) TS_ChannelCounterparty_get_outbound_htlc_minimum_msat(uint64_t this_ptr) {
- LDKChannelCounterparty this_ptr_conv;
+uint64_t __attribute__((export_name("TS_PendingHTLCInfo_get_skimmed_fee_msat"))) TS_PendingHTLCInfo_get_skimmed_fee_msat(uint64_t this_ptr) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
- *ret_copy = ChannelCounterparty_get_outbound_htlc_minimum_msat(&this_ptr_conv);
+ *ret_copy = PendingHTLCInfo_get_skimmed_fee_msat(&this_ptr_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void __attribute__((export_name("TS_ChannelCounterparty_set_outbound_htlc_minimum_msat"))) TS_ChannelCounterparty_set_outbound_htlc_minimum_msat(uint64_t this_ptr, uint64_t val) {
- LDKChannelCounterparty this_ptr_conv;
+void __attribute__((export_name("TS_PendingHTLCInfo_set_skimmed_fee_msat"))) TS_PendingHTLCInfo_set_skimmed_fee_msat(uint64_t this_ptr, uint64_t val) {
+ LDKPendingHTLCInfo this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
CHECK_ACCESS(val_ptr);
LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr);
val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val));
- ChannelCounterparty_set_outbound_htlc_minimum_msat(&this_ptr_conv, val_conv);
+ PendingHTLCInfo_set_skimmed_fee_msat(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_ChannelCounterparty_get_outbound_htlc_maximum_msat"))) TS_ChannelCounterparty_get_outbound_htlc_maximum_msat(uint64_t this_ptr) {
- LDKChannelCounterparty this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
- *ret_copy = ChannelCounterparty_get_outbound_htlc_maximum_msat(&this_ptr_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
+uint64_t __attribute__((export_name("TS_PendingHTLCInfo_new"))) TS_PendingHTLCInfo_new(uint64_t routing_arg, int8_tArray incoming_shared_secret_arg, int8_tArray payment_hash_arg, uint64_t incoming_amt_msat_arg, int64_t outgoing_amt_msat_arg, int32_t outgoing_cltv_value_arg, uint64_t skimmed_fee_msat_arg) {
+ void* routing_arg_ptr = untag_ptr(routing_arg);
+ CHECK_ACCESS(routing_arg_ptr);
+ LDKPendingHTLCRouting routing_arg_conv = *(LDKPendingHTLCRouting*)(routing_arg_ptr);
+ routing_arg_conv = PendingHTLCRouting_clone((LDKPendingHTLCRouting*)untag_ptr(routing_arg));
+ LDKThirtyTwoBytes incoming_shared_secret_arg_ref;
+ CHECK(incoming_shared_secret_arg->arr_len == 32);
+ memcpy(incoming_shared_secret_arg_ref.data, incoming_shared_secret_arg->elems, 32); FREE(incoming_shared_secret_arg);
+ LDKThirtyTwoBytes payment_hash_arg_ref;
+ CHECK(payment_hash_arg->arr_len == 32);
+ memcpy(payment_hash_arg_ref.data, payment_hash_arg->elems, 32); FREE(payment_hash_arg);
+ void* incoming_amt_msat_arg_ptr = untag_ptr(incoming_amt_msat_arg);
+ CHECK_ACCESS(incoming_amt_msat_arg_ptr);
+ LDKCOption_u64Z incoming_amt_msat_arg_conv = *(LDKCOption_u64Z*)(incoming_amt_msat_arg_ptr);
+ incoming_amt_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(incoming_amt_msat_arg));
+ void* skimmed_fee_msat_arg_ptr = untag_ptr(skimmed_fee_msat_arg);
+ CHECK_ACCESS(skimmed_fee_msat_arg_ptr);
+ LDKCOption_u64Z skimmed_fee_msat_arg_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_arg_ptr);
+ skimmed_fee_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat_arg));
+ LDKPendingHTLCInfo ret_var = PendingHTLCInfo_new(routing_arg_conv, incoming_shared_secret_arg_ref, payment_hash_arg_ref, incoming_amt_msat_arg_conv, outgoing_amt_msat_arg, outgoing_cltv_value_arg, skimmed_fee_msat_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-void __attribute__((export_name("TS_ChannelCounterparty_set_outbound_htlc_maximum_msat"))) TS_ChannelCounterparty_set_outbound_htlc_maximum_msat(uint64_t this_ptr, uint64_t val) {
+static inline uint64_t PendingHTLCInfo_clone_ptr(LDKPendingHTLCInfo *NONNULL_PTR arg) {
+ LDKPendingHTLCInfo ret_var = PendingHTLCInfo_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_PendingHTLCInfo_clone_ptr"))) TS_PendingHTLCInfo_clone_ptr(uint64_t arg) {
+ LDKPendingHTLCInfo arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = PendingHTLCInfo_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_PendingHTLCInfo_clone"))) TS_PendingHTLCInfo_clone(uint64_t orig) {
+ LDKPendingHTLCInfo orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKPendingHTLCInfo ret_var = PendingHTLCInfo_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint32_t __attribute__((export_name("TS_BlindedFailure_clone"))) TS_BlindedFailure_clone(uint64_t orig) {
+ LDKBlindedFailure* orig_conv = (LDKBlindedFailure*)untag_ptr(orig);
+ uint32_t ret_conv = LDKBlindedFailure_to_js(BlindedFailure_clone(orig_conv));
+ return ret_conv;
+}
+
+uint32_t __attribute__((export_name("TS_BlindedFailure_from_introduction_node"))) TS_BlindedFailure_from_introduction_node() {
+ uint32_t ret_conv = LDKBlindedFailure_to_js(BlindedFailure_from_introduction_node());
+ return ret_conv;
+}
+
+uint32_t __attribute__((export_name("TS_BlindedFailure_from_blinded_node"))) TS_BlindedFailure_from_blinded_node() {
+ uint32_t ret_conv = LDKBlindedFailure_to_js(BlindedFailure_from_blinded_node());
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_BlindedFailure_hash"))) TS_BlindedFailure_hash(uint64_t o) {
+ LDKBlindedFailure* o_conv = (LDKBlindedFailure*)untag_ptr(o);
+ int64_t ret_conv = BlindedFailure_hash(o_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_BlindedFailure_eq"))) TS_BlindedFailure_eq(uint64_t a, uint64_t b) {
+ LDKBlindedFailure* a_conv = (LDKBlindedFailure*)untag_ptr(a);
+ LDKBlindedFailure* b_conv = (LDKBlindedFailure*)untag_ptr(b);
+ jboolean ret_conv = BlindedFailure_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_FailureCode_free"))) TS_FailureCode_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKFailureCode this_ptr_conv = *(LDKFailureCode*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ FailureCode_free(this_ptr_conv);
+}
+
+static inline uint64_t FailureCode_clone_ptr(LDKFailureCode *NONNULL_PTR arg) {
+ LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
+ *ret_copy = FailureCode_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_FailureCode_clone_ptr"))) TS_FailureCode_clone_ptr(uint64_t arg) {
+ LDKFailureCode* arg_conv = (LDKFailureCode*)untag_ptr(arg);
+ int64_t ret_conv = FailureCode_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_FailureCode_clone"))) TS_FailureCode_clone(uint64_t orig) {
+ LDKFailureCode* orig_conv = (LDKFailureCode*)untag_ptr(orig);
+ LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
+ *ret_copy = FailureCode_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_FailureCode_temporary_node_failure"))) TS_FailureCode_temporary_node_failure() {
+ LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
+ *ret_copy = FailureCode_temporary_node_failure();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_FailureCode_required_node_feature_missing"))) TS_FailureCode_required_node_feature_missing() {
+ LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
+ *ret_copy = FailureCode_required_node_feature_missing();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_FailureCode_incorrect_or_unknown_payment_details"))) TS_FailureCode_incorrect_or_unknown_payment_details() {
+ LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
+ *ret_copy = FailureCode_incorrect_or_unknown_payment_details();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_FailureCode_invalid_onion_payload"))) TS_FailureCode_invalid_onion_payload(uint64_t a) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKCOption_C2Tuple_u64u16ZZ a_conv = *(LDKCOption_C2Tuple_u64u16ZZ*)(a_ptr);
+ a_conv = COption_C2Tuple_u64u16ZZ_clone((LDKCOption_C2Tuple_u64u16ZZ*)untag_ptr(a));
+ LDKFailureCode *ret_copy = MALLOC(sizeof(LDKFailureCode), "LDKFailureCode");
+ *ret_copy = FailureCode_invalid_onion_payload(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_ChannelManager_free"))) TS_ChannelManager_free(uint64_t this_obj) {
+ LDKChannelManager this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ChannelManager_free(this_obj_conv);
+}
+
+void __attribute__((export_name("TS_ChainParameters_free"))) TS_ChainParameters_free(uint64_t this_obj) {
+ LDKChainParameters this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ChainParameters_free(this_obj_conv);
+}
+
+uint32_t __attribute__((export_name("TS_ChainParameters_get_network"))) TS_ChainParameters_get_network(uint64_t this_ptr) {
+ LDKChainParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ uint32_t ret_conv = LDKNetwork_to_js(ChainParameters_get_network(&this_ptr_conv));
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ChainParameters_set_network"))) TS_ChainParameters_set_network(uint64_t this_ptr, uint32_t val) {
+ LDKChainParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKNetwork val_conv = LDKNetwork_from_js(val);
+ ChainParameters_set_network(&this_ptr_conv, val_conv);
+}
+
+uint64_t __attribute__((export_name("TS_ChainParameters_get_best_block"))) TS_ChainParameters_get_best_block(uint64_t this_ptr) {
+ LDKChainParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKBestBlock ret_var = ChainParameters_get_best_block(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_ChainParameters_set_best_block"))) TS_ChainParameters_set_best_block(uint64_t this_ptr, uint64_t val) {
+ LDKChainParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKBestBlock val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = BestBlock_clone(&val_conv);
+ ChainParameters_set_best_block(&this_ptr_conv, val_conv);
+}
+
+uint64_t __attribute__((export_name("TS_ChainParameters_new"))) TS_ChainParameters_new(uint32_t network_arg, uint64_t best_block_arg) {
+ LDKNetwork network_arg_conv = LDKNetwork_from_js(network_arg);
+ LDKBestBlock best_block_arg_conv;
+ best_block_arg_conv.inner = untag_ptr(best_block_arg);
+ best_block_arg_conv.is_owned = ptr_is_owned(best_block_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_arg_conv);
+ best_block_arg_conv = BestBlock_clone(&best_block_arg_conv);
+ LDKChainParameters ret_var = ChainParameters_new(network_arg_conv, best_block_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t ChainParameters_clone_ptr(LDKChainParameters *NONNULL_PTR arg) {
+ LDKChainParameters ret_var = ChainParameters_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_ChainParameters_clone_ptr"))) TS_ChainParameters_clone_ptr(uint64_t arg) {
+ LDKChainParameters arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = ChainParameters_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_ChainParameters_clone"))) TS_ChainParameters_clone(uint64_t orig) {
+ LDKChainParameters orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKChainParameters ret_var = ChainParameters_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_CounterpartyForwardingInfo_free"))) TS_CounterpartyForwardingInfo_free(uint64_t this_obj) {
+ LDKCounterpartyForwardingInfo this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ CounterpartyForwardingInfo_free(this_obj_conv);
+}
+
+int32_t __attribute__((export_name("TS_CounterpartyForwardingInfo_get_fee_base_msat"))) TS_CounterpartyForwardingInfo_get_fee_base_msat(uint64_t this_ptr) {
+ LDKCounterpartyForwardingInfo this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int32_t ret_conv = CounterpartyForwardingInfo_get_fee_base_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CounterpartyForwardingInfo_set_fee_base_msat"))) TS_CounterpartyForwardingInfo_set_fee_base_msat(uint64_t this_ptr, int32_t val) {
+ LDKCounterpartyForwardingInfo this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ CounterpartyForwardingInfo_set_fee_base_msat(&this_ptr_conv, val);
+}
+
+int32_t __attribute__((export_name("TS_CounterpartyForwardingInfo_get_fee_proportional_millionths"))) TS_CounterpartyForwardingInfo_get_fee_proportional_millionths(uint64_t this_ptr) {
+ LDKCounterpartyForwardingInfo this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int32_t ret_conv = CounterpartyForwardingInfo_get_fee_proportional_millionths(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CounterpartyForwardingInfo_set_fee_proportional_millionths"))) TS_CounterpartyForwardingInfo_set_fee_proportional_millionths(uint64_t this_ptr, int32_t val) {
+ LDKCounterpartyForwardingInfo this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ CounterpartyForwardingInfo_set_fee_proportional_millionths(&this_ptr_conv, val);
+}
+
+int16_t __attribute__((export_name("TS_CounterpartyForwardingInfo_get_cltv_expiry_delta"))) TS_CounterpartyForwardingInfo_get_cltv_expiry_delta(uint64_t this_ptr) {
+ LDKCounterpartyForwardingInfo this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int16_t ret_conv = CounterpartyForwardingInfo_get_cltv_expiry_delta(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_CounterpartyForwardingInfo_set_cltv_expiry_delta"))) TS_CounterpartyForwardingInfo_set_cltv_expiry_delta(uint64_t this_ptr, int16_t val) {
+ LDKCounterpartyForwardingInfo this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ CounterpartyForwardingInfo_set_cltv_expiry_delta(&this_ptr_conv, val);
+}
+
+uint64_t __attribute__((export_name("TS_CounterpartyForwardingInfo_new"))) TS_CounterpartyForwardingInfo_new(int32_t fee_base_msat_arg, int32_t fee_proportional_millionths_arg, int16_t cltv_expiry_delta_arg) {
+ LDKCounterpartyForwardingInfo ret_var = CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t CounterpartyForwardingInfo_clone_ptr(LDKCounterpartyForwardingInfo *NONNULL_PTR arg) {
+ LDKCounterpartyForwardingInfo ret_var = CounterpartyForwardingInfo_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_CounterpartyForwardingInfo_clone_ptr"))) TS_CounterpartyForwardingInfo_clone_ptr(uint64_t arg) {
+ LDKCounterpartyForwardingInfo arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = CounterpartyForwardingInfo_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CounterpartyForwardingInfo_clone"))) TS_CounterpartyForwardingInfo_clone(uint64_t orig) {
+ LDKCounterpartyForwardingInfo orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKCounterpartyForwardingInfo ret_var = CounterpartyForwardingInfo_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_ChannelCounterparty_free"))) TS_ChannelCounterparty_free(uint64_t this_obj) {
+ LDKChannelCounterparty this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ChannelCounterparty_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_ChannelCounterparty_get_node_id"))) TS_ChannelCounterparty_get_node_id(uint64_t this_ptr) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, ChannelCounterparty_get_node_id(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_ChannelCounterparty_set_node_id"))) TS_ChannelCounterparty_set_node_id(uint64_t this_ptr, int8_tArray val) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ ChannelCounterparty_set_node_id(&this_ptr_conv, val_ref);
+}
+
+uint64_t __attribute__((export_name("TS_ChannelCounterparty_get_features"))) TS_ChannelCounterparty_get_features(uint64_t this_ptr) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInitFeatures ret_var = ChannelCounterparty_get_features(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_ChannelCounterparty_set_features"))) TS_ChannelCounterparty_set_features(uint64_t this_ptr, uint64_t val) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKInitFeatures val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = InitFeatures_clone(&val_conv);
+ ChannelCounterparty_set_features(&this_ptr_conv, val_conv);
+}
+
+int64_t __attribute__((export_name("TS_ChannelCounterparty_get_unspendable_punishment_reserve"))) TS_ChannelCounterparty_get_unspendable_punishment_reserve(uint64_t this_ptr) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ChannelCounterparty_get_unspendable_punishment_reserve(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ChannelCounterparty_set_unspendable_punishment_reserve"))) TS_ChannelCounterparty_set_unspendable_punishment_reserve(uint64_t this_ptr, int64_t val) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ChannelCounterparty_set_unspendable_punishment_reserve(&this_ptr_conv, val);
+}
+
+uint64_t __attribute__((export_name("TS_ChannelCounterparty_get_forwarding_info"))) TS_ChannelCounterparty_get_forwarding_info(uint64_t this_ptr) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCounterpartyForwardingInfo ret_var = ChannelCounterparty_get_forwarding_info(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_ChannelCounterparty_set_forwarding_info"))) TS_ChannelCounterparty_set_forwarding_info(uint64_t this_ptr, uint64_t val) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCounterpartyForwardingInfo val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = CounterpartyForwardingInfo_clone(&val_conv);
+ ChannelCounterparty_set_forwarding_info(&this_ptr_conv, val_conv);
+}
+
+uint64_t __attribute__((export_name("TS_ChannelCounterparty_get_outbound_htlc_minimum_msat"))) TS_ChannelCounterparty_get_outbound_htlc_minimum_msat(uint64_t this_ptr) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = ChannelCounterparty_get_outbound_htlc_minimum_msat(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_ChannelCounterparty_set_outbound_htlc_minimum_msat"))) TS_ChannelCounterparty_set_outbound_htlc_minimum_msat(uint64_t this_ptr, uint64_t val) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr);
+ val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val));
+ ChannelCounterparty_set_outbound_htlc_minimum_msat(&this_ptr_conv, val_conv);
+}
+
+uint64_t __attribute__((export_name("TS_ChannelCounterparty_get_outbound_htlc_maximum_msat"))) TS_ChannelCounterparty_get_outbound_htlc_maximum_msat(uint64_t this_ptr) {
+ LDKChannelCounterparty this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = ChannelCounterparty_get_outbound_htlc_maximum_msat(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_ChannelCounterparty_set_outbound_htlc_maximum_msat"))) TS_ChannelCounterparty_set_outbound_htlc_maximum_msat(uint64_t this_ptr, uint64_t val) {
LDKChannelCounterparty this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ChannelManager_create_channel"))) TS_ChannelManager_create_channel(uint64_t this_arg, int8_tArray their_network_key, int64_t channel_value_satoshis, int64_t push_msat, int8_tArray user_channel_id, uint64_t override_config) {
+uint64_t __attribute__((export_name("TS_ChannelManager_create_channel"))) TS_ChannelManager_create_channel(uint64_t this_arg, int8_tArray their_network_key, int64_t channel_value_satoshis, int64_t push_msat, int8_tArray user_channel_id, uint64_t temporary_channel_id, uint64_t override_config) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
LDKU128 user_channel_id_ref;
CHECK(user_channel_id->arr_len == 16);
memcpy(user_channel_id_ref.le_bytes, user_channel_id->elems, 16); FREE(user_channel_id);
+ void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id);
+ CHECK_ACCESS(temporary_channel_id_ptr);
+ LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr);
+ temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id));
LDKUserConfig override_config_conv;
override_config_conv.inner = untag_ptr(override_config);
override_config_conv.is_owned = ptr_is_owned(override_config);
CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv);
override_config_conv = UserConfig_clone(&override_config_conv);
LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
- *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, override_config_conv);
+ *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_ChannelManager_pay_for_offer"))) TS_ChannelManager_pay_for_offer(uint64_t this_arg, uint64_t offer, uint64_t quantity, uint64_t amount_msats, uint64_t payer_note, int8_tArray payment_id, uint64_t retry_strategy, uint64_t max_total_routing_fee_msat) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKOffer offer_conv;
+ offer_conv.inner = untag_ptr(offer);
+ offer_conv.is_owned = ptr_is_owned(offer);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_conv);
+ offer_conv.is_owned = false;
+ void* quantity_ptr = untag_ptr(quantity);
+ CHECK_ACCESS(quantity_ptr);
+ LDKCOption_u64Z quantity_conv = *(LDKCOption_u64Z*)(quantity_ptr);
+ quantity_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity));
+ void* amount_msats_ptr = untag_ptr(amount_msats);
+ CHECK_ACCESS(amount_msats_ptr);
+ LDKCOption_u64Z amount_msats_conv = *(LDKCOption_u64Z*)(amount_msats_ptr);
+ amount_msats_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amount_msats));
+ void* payer_note_ptr = untag_ptr(payer_note);
+ CHECK_ACCESS(payer_note_ptr);
+ LDKCOption_StrZ payer_note_conv = *(LDKCOption_StrZ*)(payer_note_ptr);
+ payer_note_conv = COption_StrZ_clone((LDKCOption_StrZ*)untag_ptr(payer_note));
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK(payment_id->arr_len == 32);
+ memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
+ void* retry_strategy_ptr = untag_ptr(retry_strategy);
+ CHECK_ACCESS(retry_strategy_ptr);
+ LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
+ retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
+ void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat);
+ CHECK_ACCESS(max_total_routing_fee_msat_ptr);
+ LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr);
+ max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat));
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = ChannelManager_pay_for_offer(&this_arg_conv, &offer_conv, quantity_conv, amount_msats_conv, payer_note_conv, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_ChannelManager_request_refund_payment"))) TS_ChannelManager_request_refund_payment(uint64_t this_arg, uint64_t refund) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKRefund refund_conv;
+ refund_conv.inner = untag_ptr(refund);
+ refund_conv.is_owned = ptr_is_owned(refund);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv);
+ refund_conv.is_owned = false;
+ LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+ *ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_ChannelManager_create_inbound_payment"))) TS_ChannelManager_create_inbound_payment(uint64_t this_arg, uint64_t min_value_msat, int32_t invoice_expiry_delta_secs, uint64_t min_final_cltv_expiry_delta) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return tag_ptr(ret_ret, true);
}
+uint64_t __attribute__((export_name("TS_ChannelManager_as_OffersMessageHandler"))) TS_ChannelManager_as_OffersMessageHandler(uint64_t this_arg) {
+ LDKChannelManager this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKOffersMessageHandler* ret_ret = MALLOC(sizeof(LDKOffersMessageHandler), "LDKOffersMessageHandler");
+ *ret_ret = ChannelManager_as_OffersMessageHandler(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
uint64_t __attribute__((export_name("TS_provided_init_features"))) TS_provided_init_features(uint64_t config) {
LDKUserConfig config_conv;
config_conv.inner = untag_ptr(config);
return tag_ptr(ret_conv, true);
}
+int8_tArray __attribute__((export_name("TS_BlindedForward_write"))) TS_BlindedForward_write(uint64_t obj) {
+ LDKBlindedForward obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = BlindedForward_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_BlindedForward_read"))) TS_BlindedForward_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_BlindedForwardDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedForwardDecodeErrorZ), "LDKCResult_BlindedForwardDecodeErrorZ");
+ *ret_conv = BlindedForward_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray __attribute__((export_name("TS_PendingHTLCRouting_write"))) TS_PendingHTLCRouting_write(uint64_t obj) {
+ LDKPendingHTLCRouting* obj_conv = (LDKPendingHTLCRouting*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = PendingHTLCRouting_write(obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_PendingHTLCRouting_read"))) TS_PendingHTLCRouting_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_PendingHTLCRoutingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCRoutingDecodeErrorZ), "LDKCResult_PendingHTLCRoutingDecodeErrorZ");
+ *ret_conv = PendingHTLCRouting_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray __attribute__((export_name("TS_PendingHTLCInfo_write"))) TS_PendingHTLCInfo_write(uint64_t obj) {
+ LDKPendingHTLCInfo obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = PendingHTLCInfo_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_PendingHTLCInfo_read"))) TS_PendingHTLCInfo_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_PendingHTLCInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoDecodeErrorZ), "LDKCResult_PendingHTLCInfoDecodeErrorZ");
+ *ret_conv = PendingHTLCInfo_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray __attribute__((export_name("TS_BlindedFailure_write"))) TS_BlindedFailure_write(uint64_t obj) {
+ LDKBlindedFailure* obj_conv = (LDKBlindedFailure*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = BlindedFailure_write(obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_BlindedFailure_read"))) TS_BlindedFailure_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_BlindedFailureDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedFailureDecodeErrorZ), "LDKCResult_BlindedFailureDecodeErrorZ");
+ *ret_conv = BlindedFailure_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
int8_tArray __attribute__((export_name("TS_ChannelManager_write"))) TS_ChannelManager_write(uint64_t obj) {
LDKChannelManager obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_ExpandedKey_free"))) TS_ExpandedKey_free(uint64_t this_obj) {
- LDKExpandedKey this_obj_conv;
+void __attribute__((export_name("TS_DelayedPaymentBasepoint_free"))) TS_DelayedPaymentBasepoint_free(uint64_t this_obj) {
+ LDKDelayedPaymentBasepoint this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- ExpandedKey_free(this_obj_conv);
-}
-
-uint64_t __attribute__((export_name("TS_ExpandedKey_new"))) TS_ExpandedKey_new(int8_tArray key_material) {
- uint8_t key_material_arr[32];
- CHECK(key_material->arr_len == 32);
- memcpy(key_material_arr, key_material->elems, 32); FREE(key_material);
- uint8_t (*key_material_ref)[32] = &key_material_arr;
- LDKExpandedKey ret_var = ExpandedKey_new(key_material_ref);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_create"))) TS_create(uint64_t keys, uint64_t min_value_msat, int32_t invoice_expiry_delta_secs, uint64_t entropy_source, int64_t current_time, uint64_t min_final_cltv_expiry_delta) {
- LDKExpandedKey keys_conv;
- keys_conv.inner = untag_ptr(keys);
- keys_conv.is_owned = ptr_is_owned(keys);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(keys_conv);
- keys_conv.is_owned = false;
- void* min_value_msat_ptr = untag_ptr(min_value_msat);
- CHECK_ACCESS(min_value_msat_ptr);
- LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(min_value_msat_ptr);
- min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(min_value_msat));
- void* entropy_source_ptr = untag_ptr(entropy_source);
- if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
- LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
- void* min_final_cltv_expiry_delta_ptr = untag_ptr(min_final_cltv_expiry_delta);
- CHECK_ACCESS(min_final_cltv_expiry_delta_ptr);
- LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
- min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ");
- *ret_conv = create(&keys_conv, min_value_msat_conv, invoice_expiry_delta_secs, entropy_source_conv, current_time, min_final_cltv_expiry_delta_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_create_from_hash"))) TS_create_from_hash(uint64_t keys, uint64_t min_value_msat, int8_tArray payment_hash, int32_t invoice_expiry_delta_secs, int64_t current_time, uint64_t min_final_cltv_expiry_delta) {
- LDKExpandedKey keys_conv;
- keys_conv.inner = untag_ptr(keys);
- keys_conv.is_owned = ptr_is_owned(keys);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(keys_conv);
- keys_conv.is_owned = false;
- void* min_value_msat_ptr = untag_ptr(min_value_msat);
- CHECK_ACCESS(min_value_msat_ptr);
- LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(min_value_msat_ptr);
- min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(min_value_msat));
- LDKThirtyTwoBytes payment_hash_ref;
- CHECK(payment_hash->arr_len == 32);
- memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
- void* min_final_cltv_expiry_delta_ptr = untag_ptr(min_final_cltv_expiry_delta);
- CHECK_ACCESS(min_final_cltv_expiry_delta_ptr);
- LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
- min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
- LDKCResult_ThirtyTwoBytesNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesNoneZ), "LDKCResult_ThirtyTwoBytesNoneZ");
- *ret_conv = create_from_hash(&keys_conv, min_value_msat_conv, payment_hash_ref, invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta_conv);
- return tag_ptr(ret_conv, true);
+ DelayedPaymentBasepoint_free(this_obj_conv);
}
-void __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKDecodeError this_ptr_conv = *(LDKDecodeError*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- DecodeError_free(this_ptr_conv);
+int8_tArray __attribute__((export_name("TS_DelayedPaymentBasepoint_get_a"))) TS_DelayedPaymentBasepoint_get_a(uint64_t this_ptr) {
+ LDKDelayedPaymentBasepoint this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, DelayedPaymentBasepoint_get_a(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
}
-static inline uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg) {
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = DecodeError_clone(arg);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t __attribute__((export_name("TS_DecodeError_clone_ptr"))) TS_DecodeError_clone_ptr(uint64_t arg) {
- LDKDecodeError* arg_conv = (LDKDecodeError*)untag_ptr(arg);
- int64_t ret_conv = DecodeError_clone_ptr(arg_conv);
- return ret_conv;
+void __attribute__((export_name("TS_DelayedPaymentBasepoint_set_a"))) TS_DelayedPaymentBasepoint_set_a(uint64_t this_ptr, int8_tArray val) {
+ LDKDelayedPaymentBasepoint this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ DelayedPaymentBasepoint_set_a(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_DecodeError_clone"))) TS_DecodeError_clone(uint64_t orig) {
- LDKDecodeError* orig_conv = (LDKDecodeError*)untag_ptr(orig);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = DecodeError_clone(orig_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
+uint64_t __attribute__((export_name("TS_DelayedPaymentBasepoint_new"))) TS_DelayedPaymentBasepoint_new(int8_tArray a_arg) {
+ LDKPublicKey a_arg_ref;
+ CHECK(a_arg->arr_len == 33);
+ memcpy(a_arg_ref.compressed_form, a_arg->elems, 33); FREE(a_arg);
+ LDKDelayedPaymentBasepoint ret_var = DelayedPaymentBasepoint_new(a_arg_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_DecodeError_unknown_version"))) TS_DecodeError_unknown_version() {
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = DecodeError_unknown_version();
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+jboolean __attribute__((export_name("TS_DelayedPaymentBasepoint_eq"))) TS_DelayedPaymentBasepoint_eq(uint64_t a, uint64_t b) {
+ LDKDelayedPaymentBasepoint a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKDelayedPaymentBasepoint b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = DelayedPaymentBasepoint_eq(&a_conv, &b_conv);
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_DecodeError_unknown_required_feature"))) TS_DecodeError_unknown_required_feature() {
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = DecodeError_unknown_required_feature();
- uint64_t ret_ref = tag_ptr(ret_copy, true);
+static inline uint64_t DelayedPaymentBasepoint_clone_ptr(LDKDelayedPaymentBasepoint *NONNULL_PTR arg) {
+ LDKDelayedPaymentBasepoint ret_var = DelayedPaymentBasepoint_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-
-uint64_t __attribute__((export_name("TS_DecodeError_invalid_value"))) TS_DecodeError_invalid_value() {
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = DecodeError_invalid_value();
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+int64_t __attribute__((export_name("TS_DelayedPaymentBasepoint_clone_ptr"))) TS_DelayedPaymentBasepoint_clone_ptr(uint64_t arg) {
+ LDKDelayedPaymentBasepoint arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = DelayedPaymentBasepoint_clone_ptr(&arg_conv);
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_DecodeError_short_read"))) TS_DecodeError_short_read() {
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = DecodeError_short_read();
- uint64_t ret_ref = tag_ptr(ret_copy, true);
+uint64_t __attribute__((export_name("TS_DelayedPaymentBasepoint_clone"))) TS_DelayedPaymentBasepoint_clone(uint64_t orig) {
+ LDKDelayedPaymentBasepoint orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKDelayedPaymentBasepoint ret_var = DelayedPaymentBasepoint_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_DecodeError_bad_length_descriptor"))) TS_DecodeError_bad_length_descriptor() {
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = DecodeError_bad_length_descriptor();
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+int64_t __attribute__((export_name("TS_DelayedPaymentBasepoint_hash"))) TS_DelayedPaymentBasepoint_hash(uint64_t o) {
+ LDKDelayedPaymentBasepoint o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = DelayedPaymentBasepoint_hash(&o_conv);
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_DecodeError_io"))) TS_DecodeError_io(uint32_t a) {
- LDKIOError a_conv = LDKIOError_from_js(a);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = DecodeError_io(a_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+int8_tArray __attribute__((export_name("TS_DelayedPaymentBasepoint_to_public_key"))) TS_DelayedPaymentBasepoint_to_public_key(uint64_t this_arg) {
+ LDKDelayedPaymentBasepoint this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, DelayedPaymentBasepoint_to_public_key(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
}
-uint64_t __attribute__((export_name("TS_DecodeError_unsupported_compression"))) TS_DecodeError_unsupported_compression() {
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = DecodeError_unsupported_compression();
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+int8_tArray __attribute__((export_name("TS_DelayedPaymentBasepoint_write"))) TS_DelayedPaymentBasepoint_write(uint64_t obj) {
+ LDKDelayedPaymentBasepoint obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = DelayedPaymentBasepoint_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
-jboolean __attribute__((export_name("TS_DecodeError_eq"))) TS_DecodeError_eq(uint64_t a, uint64_t b) {
- LDKDecodeError* a_conv = (LDKDecodeError*)untag_ptr(a);
- LDKDecodeError* b_conv = (LDKDecodeError*)untag_ptr(b);
- jboolean ret_conv = DecodeError_eq(a_conv, b_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_DelayedPaymentBasepoint_read"))) TS_DelayedPaymentBasepoint_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_DelayedPaymentBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentBasepointDecodeErrorZ), "LDKCResult_DelayedPaymentBasepointDecodeErrorZ");
+ *ret_conv = DelayedPaymentBasepoint_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_Init_free"))) TS_Init_free(uint64_t this_obj) {
- LDKInit this_obj_conv;
+void __attribute__((export_name("TS_DelayedPaymentKey_free"))) TS_DelayedPaymentKey_free(uint64_t this_obj) {
+ LDKDelayedPaymentKey this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- Init_free(this_obj_conv);
-}
-
-uint64_t __attribute__((export_name("TS_Init_get_features"))) TS_Init_get_features(uint64_t this_ptr) {
- LDKInit this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKInitFeatures ret_var = Init_get_features(&this_ptr_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-void __attribute__((export_name("TS_Init_set_features"))) TS_Init_set_features(uint64_t this_ptr, uint64_t val) {
- LDKInit this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKInitFeatures val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = InitFeatures_clone(&val_conv);
- Init_set_features(&this_ptr_conv, val_conv);
-}
-
-uint64_t __attribute__((export_name("TS_Init_get_networks"))) TS_Init_get_networks(uint64_t this_ptr) {
- LDKInit this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKCOption_CVec_ThirtyTwoBytesZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_ThirtyTwoBytesZZ), "LDKCOption_CVec_ThirtyTwoBytesZZ");
- *ret_copy = Init_get_networks(&this_ptr_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-void __attribute__((export_name("TS_Init_set_networks"))) TS_Init_set_networks(uint64_t this_ptr, uint64_t val) {
- LDKInit this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_CVec_ThirtyTwoBytesZZ val_conv = *(LDKCOption_CVec_ThirtyTwoBytesZZ*)(val_ptr);
- val_conv = COption_CVec_ThirtyTwoBytesZZ_clone((LDKCOption_CVec_ThirtyTwoBytesZZ*)untag_ptr(val));
- Init_set_networks(&this_ptr_conv, val_conv);
+ DelayedPaymentKey_free(this_obj_conv);
}
-uint64_t __attribute__((export_name("TS_Init_get_remote_network_address"))) TS_Init_get_remote_network_address(uint64_t this_ptr) {
- LDKInit this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_DelayedPaymentKey_get_a"))) TS_DelayedPaymentKey_get_a(uint64_t this_ptr) {
+ LDKDelayedPaymentKey this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
- *ret_copy = Init_get_remote_network_address(&this_ptr_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, DelayedPaymentKey_get_a(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
}
-void __attribute__((export_name("TS_Init_set_remote_network_address"))) TS_Init_set_remote_network_address(uint64_t this_ptr, uint64_t val) {
- LDKInit this_ptr_conv;
+void __attribute__((export_name("TS_DelayedPaymentKey_set_a"))) TS_DelayedPaymentKey_set_a(uint64_t this_ptr, int8_tArray val) {
+ LDKDelayedPaymentKey this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr);
- val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val));
- Init_set_remote_network_address(&this_ptr_conv, val_conv);
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ DelayedPaymentKey_set_a(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_Init_new"))) TS_Init_new(uint64_t features_arg, uint64_t networks_arg, uint64_t remote_network_address_arg) {
- LDKInitFeatures features_arg_conv;
- features_arg_conv.inner = untag_ptr(features_arg);
- features_arg_conv.is_owned = ptr_is_owned(features_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv);
- features_arg_conv = InitFeatures_clone(&features_arg_conv);
- void* networks_arg_ptr = untag_ptr(networks_arg);
- CHECK_ACCESS(networks_arg_ptr);
- LDKCOption_CVec_ThirtyTwoBytesZZ networks_arg_conv = *(LDKCOption_CVec_ThirtyTwoBytesZZ*)(networks_arg_ptr);
- networks_arg_conv = COption_CVec_ThirtyTwoBytesZZ_clone((LDKCOption_CVec_ThirtyTwoBytesZZ*)untag_ptr(networks_arg));
- void* remote_network_address_arg_ptr = untag_ptr(remote_network_address_arg);
- CHECK_ACCESS(remote_network_address_arg_ptr);
- LDKCOption_SocketAddressZ remote_network_address_arg_conv = *(LDKCOption_SocketAddressZ*)(remote_network_address_arg_ptr);
- LDKInit ret_var = Init_new(features_arg_conv, networks_arg_conv, remote_network_address_arg_conv);
+uint64_t __attribute__((export_name("TS_DelayedPaymentKey_new"))) TS_DelayedPaymentKey_new(int8_tArray a_arg) {
+ LDKPublicKey a_arg_ref;
+ CHECK(a_arg->arr_len == 33);
+ memcpy(a_arg_ref.compressed_form, a_arg->elems, 33); FREE(a_arg);
+ LDKDelayedPaymentKey ret_var = DelayedPaymentKey_new(a_arg_ref);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t Init_clone_ptr(LDKInit *NONNULL_PTR arg) {
- LDKInit ret_var = Init_clone(arg);
+jboolean __attribute__((export_name("TS_DelayedPaymentKey_eq"))) TS_DelayedPaymentKey_eq(uint64_t a, uint64_t b) {
+ LDKDelayedPaymentKey a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKDelayedPaymentKey b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = DelayedPaymentKey_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+static inline uint64_t DelayedPaymentKey_clone_ptr(LDKDelayedPaymentKey *NONNULL_PTR arg) {
+ LDKDelayedPaymentKey ret_var = DelayedPaymentKey_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_Init_clone_ptr"))) TS_Init_clone_ptr(uint64_t arg) {
- LDKInit arg_conv;
+int64_t __attribute__((export_name("TS_DelayedPaymentKey_clone_ptr"))) TS_DelayedPaymentKey_clone_ptr(uint64_t arg) {
+ LDKDelayedPaymentKey arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = Init_clone_ptr(&arg_conv);
+ int64_t ret_conv = DelayedPaymentKey_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_Init_clone"))) TS_Init_clone(uint64_t orig) {
- LDKInit orig_conv;
+uint64_t __attribute__((export_name("TS_DelayedPaymentKey_clone"))) TS_DelayedPaymentKey_clone(uint64_t orig) {
+ LDKDelayedPaymentKey orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKInit ret_var = Init_clone(&orig_conv);
+ LDKDelayedPaymentKey ret_var = DelayedPaymentKey_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-jboolean __attribute__((export_name("TS_Init_eq"))) TS_Init_eq(uint64_t a, uint64_t b) {
- LDKInit a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv.is_owned = false;
- LDKInit b_conv;
- b_conv.inner = untag_ptr(b);
- b_conv.is_owned = ptr_is_owned(b);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
- b_conv.is_owned = false;
- jboolean ret_conv = Init_eq(&a_conv, &b_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_DelayedPaymentKey_from_basepoint"))) TS_DelayedPaymentKey_from_basepoint(uint64_t countersignatory_basepoint, int8_tArray per_commitment_point) {
+ LDKDelayedPaymentBasepoint countersignatory_basepoint_conv;
+ countersignatory_basepoint_conv.inner = untag_ptr(countersignatory_basepoint);
+ countersignatory_basepoint_conv.is_owned = ptr_is_owned(countersignatory_basepoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(countersignatory_basepoint_conv);
+ countersignatory_basepoint_conv.is_owned = false;
+ LDKPublicKey per_commitment_point_ref;
+ CHECK(per_commitment_point->arr_len == 33);
+ memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point);
+ LDKDelayedPaymentKey ret_var = DelayedPaymentKey_from_basepoint(&countersignatory_basepoint_conv, per_commitment_point_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_ErrorMessage_free"))) TS_ErrorMessage_free(uint64_t this_obj) {
- LDKErrorMessage this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- ErrorMessage_free(this_obj_conv);
+uint64_t __attribute__((export_name("TS_DelayedPaymentKey_from_secret_key"))) TS_DelayedPaymentKey_from_secret_key(int8_tArray sk) {
+ uint8_t sk_arr[32];
+ CHECK(sk->arr_len == 32);
+ memcpy(sk_arr, sk->elems, 32); FREE(sk);
+ uint8_t (*sk_ref)[32] = &sk_arr;
+ LDKDelayedPaymentKey ret_var = DelayedPaymentKey_from_secret_key(sk_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-int8_tArray __attribute__((export_name("TS_ErrorMessage_get_channel_id"))) TS_ErrorMessage_get_channel_id(uint64_t this_ptr) {
- LDKErrorMessage this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *ErrorMessage_get_channel_id(&this_ptr_conv), 32);
+int8_tArray __attribute__((export_name("TS_DelayedPaymentKey_to_public_key"))) TS_DelayedPaymentKey_to_public_key(uint64_t this_arg) {
+ LDKDelayedPaymentKey this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, DelayedPaymentKey_to_public_key(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_ErrorMessage_set_channel_id"))) TS_ErrorMessage_set_channel_id(uint64_t this_ptr, int8_tArray val) {
- LDKErrorMessage this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- ErrorMessage_set_channel_id(&this_ptr_conv, val_ref);
+int8_tArray __attribute__((export_name("TS_DelayedPaymentKey_write"))) TS_DelayedPaymentKey_write(uint64_t obj) {
+ LDKDelayedPaymentKey obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = DelayedPaymentKey_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
-jstring __attribute__((export_name("TS_ErrorMessage_get_data"))) TS_ErrorMessage_get_data(uint64_t this_ptr) {
- LDKErrorMessage this_ptr_conv;
+uint64_t __attribute__((export_name("TS_DelayedPaymentKey_read"))) TS_DelayedPaymentKey_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_DelayedPaymentKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentKeyDecodeErrorZ), "LDKCResult_DelayedPaymentKeyDecodeErrorZ");
+ *ret_conv = DelayedPaymentKey_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_HtlcBasepoint_free"))) TS_HtlcBasepoint_free(uint64_t this_obj) {
+ LDKHtlcBasepoint this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ HtlcBasepoint_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_HtlcBasepoint_get_a"))) TS_HtlcBasepoint_get_a(uint64_t this_ptr) {
+ LDKHtlcBasepoint this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKStr ret_str = ErrorMessage_get_data(&this_ptr_conv);
- jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len);
- Str_free(ret_str);
- return ret_conv;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, HtlcBasepoint_get_a(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
}
-void __attribute__((export_name("TS_ErrorMessage_set_data"))) TS_ErrorMessage_set_data(uint64_t this_ptr, jstring val) {
- LDKErrorMessage this_ptr_conv;
+void __attribute__((export_name("TS_HtlcBasepoint_set_a"))) TS_HtlcBasepoint_set_a(uint64_t this_ptr, int8_tArray val) {
+ LDKHtlcBasepoint this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKStr val_conv = str_ref_to_owned_c(val);
- ErrorMessage_set_data(&this_ptr_conv, val_conv);
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ HtlcBasepoint_set_a(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_ErrorMessage_new"))) TS_ErrorMessage_new(int8_tArray channel_id_arg, jstring data_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK(channel_id_arg->arr_len == 32);
- memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
- LDKStr data_arg_conv = str_ref_to_owned_c(data_arg);
- LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv);
+uint64_t __attribute__((export_name("TS_HtlcBasepoint_new"))) TS_HtlcBasepoint_new(int8_tArray a_arg) {
+ LDKPublicKey a_arg_ref;
+ CHECK(a_arg->arr_len == 33);
+ memcpy(a_arg_ref.compressed_form, a_arg->elems, 33); FREE(a_arg);
+ LDKHtlcBasepoint ret_var = HtlcBasepoint_new(a_arg_ref);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg) {
- LDKErrorMessage ret_var = ErrorMessage_clone(arg);
+jboolean __attribute__((export_name("TS_HtlcBasepoint_eq"))) TS_HtlcBasepoint_eq(uint64_t a, uint64_t b) {
+ LDKHtlcBasepoint a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKHtlcBasepoint b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = HtlcBasepoint_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+static inline uint64_t HtlcBasepoint_clone_ptr(LDKHtlcBasepoint *NONNULL_PTR arg) {
+ LDKHtlcBasepoint ret_var = HtlcBasepoint_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_ErrorMessage_clone_ptr"))) TS_ErrorMessage_clone_ptr(uint64_t arg) {
- LDKErrorMessage arg_conv;
+int64_t __attribute__((export_name("TS_HtlcBasepoint_clone_ptr"))) TS_HtlcBasepoint_clone_ptr(uint64_t arg) {
+ LDKHtlcBasepoint arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = ErrorMessage_clone_ptr(&arg_conv);
+ int64_t ret_conv = HtlcBasepoint_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_ErrorMessage_clone"))) TS_ErrorMessage_clone(uint64_t orig) {
- LDKErrorMessage orig_conv;
+uint64_t __attribute__((export_name("TS_HtlcBasepoint_clone"))) TS_HtlcBasepoint_clone(uint64_t orig) {
+ LDKHtlcBasepoint orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
+ LDKHtlcBasepoint ret_var = HtlcBasepoint_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-jboolean __attribute__((export_name("TS_ErrorMessage_eq"))) TS_ErrorMessage_eq(uint64_t a, uint64_t b) {
- LDKErrorMessage a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv.is_owned = false;
- LDKErrorMessage b_conv;
- b_conv.inner = untag_ptr(b);
- b_conv.is_owned = ptr_is_owned(b);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
- b_conv.is_owned = false;
- jboolean ret_conv = ErrorMessage_eq(&a_conv, &b_conv);
+int64_t __attribute__((export_name("TS_HtlcBasepoint_hash"))) TS_HtlcBasepoint_hash(uint64_t o) {
+ LDKHtlcBasepoint o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = HtlcBasepoint_hash(&o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_WarningMessage_free"))) TS_WarningMessage_free(uint64_t this_obj) {
- LDKWarningMessage this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- WarningMessage_free(this_obj_conv);
+int8_tArray __attribute__((export_name("TS_HtlcBasepoint_to_public_key"))) TS_HtlcBasepoint_to_public_key(uint64_t this_arg) {
+ LDKHtlcBasepoint this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, HtlcBasepoint_to_public_key(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
}
-int8_tArray __attribute__((export_name("TS_WarningMessage_get_channel_id"))) TS_WarningMessage_get_channel_id(uint64_t this_ptr) {
- LDKWarningMessage this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *WarningMessage_get_channel_id(&this_ptr_conv), 32);
+int8_tArray __attribute__((export_name("TS_HtlcBasepoint_write"))) TS_HtlcBasepoint_write(uint64_t obj) {
+ LDKHtlcBasepoint obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = HtlcBasepoint_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
return ret_arr;
}
-void __attribute__((export_name("TS_WarningMessage_set_channel_id"))) TS_WarningMessage_set_channel_id(uint64_t this_ptr, int8_tArray val) {
- LDKWarningMessage this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- WarningMessage_set_channel_id(&this_ptr_conv, val_ref);
+uint64_t __attribute__((export_name("TS_HtlcBasepoint_read"))) TS_HtlcBasepoint_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_HtlcBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcBasepointDecodeErrorZ), "LDKCResult_HtlcBasepointDecodeErrorZ");
+ *ret_conv = HtlcBasepoint_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
}
-jstring __attribute__((export_name("TS_WarningMessage_get_data"))) TS_WarningMessage_get_data(uint64_t this_ptr) {
- LDKWarningMessage this_ptr_conv;
+void __attribute__((export_name("TS_HtlcKey_free"))) TS_HtlcKey_free(uint64_t this_obj) {
+ LDKHtlcKey this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ HtlcKey_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_HtlcKey_get_a"))) TS_HtlcKey_get_a(uint64_t this_ptr) {
+ LDKHtlcKey this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKStr ret_str = WarningMessage_get_data(&this_ptr_conv);
- jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len);
- Str_free(ret_str);
- return ret_conv;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, HtlcKey_get_a(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
}
-void __attribute__((export_name("TS_WarningMessage_set_data"))) TS_WarningMessage_set_data(uint64_t this_ptr, jstring val) {
- LDKWarningMessage this_ptr_conv;
+void __attribute__((export_name("TS_HtlcKey_set_a"))) TS_HtlcKey_set_a(uint64_t this_ptr, int8_tArray val) {
+ LDKHtlcKey this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKStr val_conv = str_ref_to_owned_c(val);
- WarningMessage_set_data(&this_ptr_conv, val_conv);
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ HtlcKey_set_a(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_WarningMessage_new"))) TS_WarningMessage_new(int8_tArray channel_id_arg, jstring data_arg) {
- LDKThirtyTwoBytes channel_id_arg_ref;
- CHECK(channel_id_arg->arr_len == 32);
- memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
- LDKStr data_arg_conv = str_ref_to_owned_c(data_arg);
- LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv);
+uint64_t __attribute__((export_name("TS_HtlcKey_new"))) TS_HtlcKey_new(int8_tArray a_arg) {
+ LDKPublicKey a_arg_ref;
+ CHECK(a_arg->arr_len == 33);
+ memcpy(a_arg_ref.compressed_form, a_arg->elems, 33); FREE(a_arg);
+ LDKHtlcKey ret_var = HtlcKey_new(a_arg_ref);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t WarningMessage_clone_ptr(LDKWarningMessage *NONNULL_PTR arg) {
- LDKWarningMessage ret_var = WarningMessage_clone(arg);
+jboolean __attribute__((export_name("TS_HtlcKey_eq"))) TS_HtlcKey_eq(uint64_t a, uint64_t b) {
+ LDKHtlcKey a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKHtlcKey b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = HtlcKey_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+static inline uint64_t HtlcKey_clone_ptr(LDKHtlcKey *NONNULL_PTR arg) {
+ LDKHtlcKey ret_var = HtlcKey_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_WarningMessage_clone_ptr"))) TS_WarningMessage_clone_ptr(uint64_t arg) {
- LDKWarningMessage arg_conv;
+int64_t __attribute__((export_name("TS_HtlcKey_clone_ptr"))) TS_HtlcKey_clone_ptr(uint64_t arg) {
+ LDKHtlcKey arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = WarningMessage_clone_ptr(&arg_conv);
+ int64_t ret_conv = HtlcKey_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_WarningMessage_clone"))) TS_WarningMessage_clone(uint64_t orig) {
- LDKWarningMessage orig_conv;
+uint64_t __attribute__((export_name("TS_HtlcKey_clone"))) TS_HtlcKey_clone(uint64_t orig) {
+ LDKHtlcKey orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKWarningMessage ret_var = WarningMessage_clone(&orig_conv);
+ LDKHtlcKey ret_var = HtlcKey_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-jboolean __attribute__((export_name("TS_WarningMessage_eq"))) TS_WarningMessage_eq(uint64_t a, uint64_t b) {
- LDKWarningMessage a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv.is_owned = false;
- LDKWarningMessage b_conv;
- b_conv.inner = untag_ptr(b);
- b_conv.is_owned = ptr_is_owned(b);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
- b_conv.is_owned = false;
- jboolean ret_conv = WarningMessage_eq(&a_conv, &b_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_HtlcKey_from_basepoint"))) TS_HtlcKey_from_basepoint(uint64_t countersignatory_basepoint, int8_tArray per_commitment_point) {
+ LDKHtlcBasepoint countersignatory_basepoint_conv;
+ countersignatory_basepoint_conv.inner = untag_ptr(countersignatory_basepoint);
+ countersignatory_basepoint_conv.is_owned = ptr_is_owned(countersignatory_basepoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(countersignatory_basepoint_conv);
+ countersignatory_basepoint_conv.is_owned = false;
+ LDKPublicKey per_commitment_point_ref;
+ CHECK(per_commitment_point->arr_len == 33);
+ memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point);
+ LDKHtlcKey ret_var = HtlcKey_from_basepoint(&countersignatory_basepoint_conv, per_commitment_point_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_Ping_free"))) TS_Ping_free(uint64_t this_obj) {
- LDKPing this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- Ping_free(this_obj_conv);
+uint64_t __attribute__((export_name("TS_HtlcKey_from_secret_key"))) TS_HtlcKey_from_secret_key(int8_tArray sk) {
+ uint8_t sk_arr[32];
+ CHECK(sk->arr_len == 32);
+ memcpy(sk_arr, sk->elems, 32); FREE(sk);
+ uint8_t (*sk_ref)[32] = &sk_arr;
+ LDKHtlcKey ret_var = HtlcKey_from_secret_key(sk_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-int16_t __attribute__((export_name("TS_Ping_get_ponglen"))) TS_Ping_get_ponglen(uint64_t this_ptr) {
- LDKPing this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = Ping_get_ponglen(&this_ptr_conv);
- return ret_conv;
+int8_tArray __attribute__((export_name("TS_HtlcKey_to_public_key"))) TS_HtlcKey_to_public_key(uint64_t this_arg) {
+ LDKHtlcKey this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, HtlcKey_to_public_key(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
}
-void __attribute__((export_name("TS_Ping_set_ponglen"))) TS_Ping_set_ponglen(uint64_t this_ptr, int16_t val) {
- LDKPing this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- Ping_set_ponglen(&this_ptr_conv, val);
+int8_tArray __attribute__((export_name("TS_HtlcKey_write"))) TS_HtlcKey_write(uint64_t obj) {
+ LDKHtlcKey obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = HtlcKey_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
-int16_t __attribute__((export_name("TS_Ping_get_byteslen"))) TS_Ping_get_byteslen(uint64_t this_ptr) {
- LDKPing this_ptr_conv;
+uint64_t __attribute__((export_name("TS_HtlcKey_read"))) TS_HtlcKey_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_HtlcKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HtlcKeyDecodeErrorZ), "LDKCResult_HtlcKeyDecodeErrorZ");
+ *ret_conv = HtlcKey_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_RevocationBasepoint_free"))) TS_RevocationBasepoint_free(uint64_t this_obj) {
+ LDKRevocationBasepoint this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ RevocationBasepoint_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_RevocationBasepoint_get_a"))) TS_RevocationBasepoint_get_a(uint64_t this_ptr) {
+ LDKRevocationBasepoint this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = Ping_get_byteslen(&this_ptr_conv);
- return ret_conv;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, RevocationBasepoint_get_a(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
}
-void __attribute__((export_name("TS_Ping_set_byteslen"))) TS_Ping_set_byteslen(uint64_t this_ptr, int16_t val) {
- LDKPing this_ptr_conv;
+void __attribute__((export_name("TS_RevocationBasepoint_set_a"))) TS_RevocationBasepoint_set_a(uint64_t this_ptr, int8_tArray val) {
+ LDKRevocationBasepoint this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- Ping_set_byteslen(&this_ptr_conv, val);
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ RevocationBasepoint_set_a(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_Ping_new"))) TS_Ping_new(int16_t ponglen_arg, int16_t byteslen_arg) {
- LDKPing ret_var = Ping_new(ponglen_arg, byteslen_arg);
+uint64_t __attribute__((export_name("TS_RevocationBasepoint_new"))) TS_RevocationBasepoint_new(int8_tArray a_arg) {
+ LDKPublicKey a_arg_ref;
+ CHECK(a_arg->arr_len == 33);
+ memcpy(a_arg_ref.compressed_form, a_arg->elems, 33); FREE(a_arg);
+ LDKRevocationBasepoint ret_var = RevocationBasepoint_new(a_arg_ref);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t Ping_clone_ptr(LDKPing *NONNULL_PTR arg) {
- LDKPing ret_var = Ping_clone(arg);
+jboolean __attribute__((export_name("TS_RevocationBasepoint_eq"))) TS_RevocationBasepoint_eq(uint64_t a, uint64_t b) {
+ LDKRevocationBasepoint a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKRevocationBasepoint b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = RevocationBasepoint_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+static inline uint64_t RevocationBasepoint_clone_ptr(LDKRevocationBasepoint *NONNULL_PTR arg) {
+ LDKRevocationBasepoint ret_var = RevocationBasepoint_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_Ping_clone_ptr"))) TS_Ping_clone_ptr(uint64_t arg) {
- LDKPing arg_conv;
+int64_t __attribute__((export_name("TS_RevocationBasepoint_clone_ptr"))) TS_RevocationBasepoint_clone_ptr(uint64_t arg) {
+ LDKRevocationBasepoint arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = Ping_clone_ptr(&arg_conv);
+ int64_t ret_conv = RevocationBasepoint_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_Ping_clone"))) TS_Ping_clone(uint64_t orig) {
- LDKPing orig_conv;
+uint64_t __attribute__((export_name("TS_RevocationBasepoint_clone"))) TS_RevocationBasepoint_clone(uint64_t orig) {
+ LDKRevocationBasepoint orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKPing ret_var = Ping_clone(&orig_conv);
+ LDKRevocationBasepoint ret_var = RevocationBasepoint_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-jboolean __attribute__((export_name("TS_Ping_eq"))) TS_Ping_eq(uint64_t a, uint64_t b) {
- LDKPing a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv.is_owned = false;
- LDKPing b_conv;
- b_conv.inner = untag_ptr(b);
- b_conv.is_owned = ptr_is_owned(b);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
- b_conv.is_owned = false;
- jboolean ret_conv = Ping_eq(&a_conv, &b_conv);
+int64_t __attribute__((export_name("TS_RevocationBasepoint_hash"))) TS_RevocationBasepoint_hash(uint64_t o) {
+ LDKRevocationBasepoint o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = RevocationBasepoint_hash(&o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_Pong_free"))) TS_Pong_free(uint64_t this_obj) {
- LDKPong this_obj_conv;
+int8_tArray __attribute__((export_name("TS_RevocationBasepoint_to_public_key"))) TS_RevocationBasepoint_to_public_key(uint64_t this_arg) {
+ LDKRevocationBasepoint this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, RevocationBasepoint_to_public_key(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+int8_tArray __attribute__((export_name("TS_RevocationBasepoint_write"))) TS_RevocationBasepoint_write(uint64_t obj) {
+ LDKRevocationBasepoint obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = RevocationBasepoint_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_RevocationBasepoint_read"))) TS_RevocationBasepoint_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_RevocationBasepointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationBasepointDecodeErrorZ), "LDKCResult_RevocationBasepointDecodeErrorZ");
+ *ret_conv = RevocationBasepoint_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_RevocationKey_free"))) TS_RevocationKey_free(uint64_t this_obj) {
+ LDKRevocationKey this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- Pong_free(this_obj_conv);
+ RevocationKey_free(this_obj_conv);
}
-int16_t __attribute__((export_name("TS_Pong_get_byteslen"))) TS_Pong_get_byteslen(uint64_t this_ptr) {
- LDKPong this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_RevocationKey_get_a"))) TS_RevocationKey_get_a(uint64_t this_ptr) {
+ LDKRevocationKey this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = Pong_get_byteslen(&this_ptr_conv);
- return ret_conv;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, RevocationKey_get_a(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
}
-void __attribute__((export_name("TS_Pong_set_byteslen"))) TS_Pong_set_byteslen(uint64_t this_ptr, int16_t val) {
- LDKPong this_ptr_conv;
+void __attribute__((export_name("TS_RevocationKey_set_a"))) TS_RevocationKey_set_a(uint64_t this_ptr, int8_tArray val) {
+ LDKRevocationKey this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- Pong_set_byteslen(&this_ptr_conv, val);
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ RevocationKey_set_a(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_Pong_new"))) TS_Pong_new(int16_t byteslen_arg) {
- LDKPong ret_var = Pong_new(byteslen_arg);
+uint64_t __attribute__((export_name("TS_RevocationKey_new"))) TS_RevocationKey_new(int8_tArray a_arg) {
+ LDKPublicKey a_arg_ref;
+ CHECK(a_arg->arr_len == 33);
+ memcpy(a_arg_ref.compressed_form, a_arg->elems, 33); FREE(a_arg);
+ LDKRevocationKey ret_var = RevocationKey_new(a_arg_ref);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t Pong_clone_ptr(LDKPong *NONNULL_PTR arg) {
- LDKPong ret_var = Pong_clone(arg);
+jboolean __attribute__((export_name("TS_RevocationKey_eq"))) TS_RevocationKey_eq(uint64_t a, uint64_t b) {
+ LDKRevocationKey a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKRevocationKey b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = RevocationKey_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+static inline uint64_t RevocationKey_clone_ptr(LDKRevocationKey *NONNULL_PTR arg) {
+ LDKRevocationKey ret_var = RevocationKey_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_Pong_clone_ptr"))) TS_Pong_clone_ptr(uint64_t arg) {
- LDKPong arg_conv;
+int64_t __attribute__((export_name("TS_RevocationKey_clone_ptr"))) TS_RevocationKey_clone_ptr(uint64_t arg) {
+ LDKRevocationKey arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = Pong_clone_ptr(&arg_conv);
+ int64_t ret_conv = RevocationKey_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_Pong_clone"))) TS_Pong_clone(uint64_t orig) {
- LDKPong orig_conv;
+uint64_t __attribute__((export_name("TS_RevocationKey_clone"))) TS_RevocationKey_clone(uint64_t orig) {
+ LDKRevocationKey orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKPong ret_var = Pong_clone(&orig_conv);
+ LDKRevocationKey ret_var = RevocationKey_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-jboolean __attribute__((export_name("TS_Pong_eq"))) TS_Pong_eq(uint64_t a, uint64_t b) {
- LDKPong a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv.is_owned = false;
- LDKPong b_conv;
- b_conv.inner = untag_ptr(b);
- b_conv.is_owned = ptr_is_owned(b);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
- b_conv.is_owned = false;
- jboolean ret_conv = Pong_eq(&a_conv, &b_conv);
+int64_t __attribute__((export_name("TS_RevocationKey_hash"))) TS_RevocationKey_hash(uint64_t o) {
+ LDKRevocationKey o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = RevocationKey_hash(&o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) {
- LDKOpenChannel this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- OpenChannel_free(this_obj_conv);
+uint64_t __attribute__((export_name("TS_RevocationKey_from_basepoint"))) TS_RevocationKey_from_basepoint(uint64_t countersignatory_basepoint, int8_tArray per_commitment_point) {
+ LDKRevocationBasepoint countersignatory_basepoint_conv;
+ countersignatory_basepoint_conv.inner = untag_ptr(countersignatory_basepoint);
+ countersignatory_basepoint_conv.is_owned = ptr_is_owned(countersignatory_basepoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(countersignatory_basepoint_conv);
+ countersignatory_basepoint_conv.is_owned = false;
+ LDKPublicKey per_commitment_point_ref;
+ CHECK(per_commitment_point->arr_len == 33);
+ memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point);
+ LDKRevocationKey ret_var = RevocationKey_from_basepoint(&countersignatory_basepoint_conv, per_commitment_point_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-int8_tArray __attribute__((export_name("TS_OpenChannel_get_chain_hash"))) TS_OpenChannel_get_chain_hash(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *OpenChannel_get_chain_hash(&this_ptr_conv), 32);
+int8_tArray __attribute__((export_name("TS_RevocationKey_to_public_key"))) TS_RevocationKey_to_public_key(uint64_t this_arg) {
+ LDKRevocationKey this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, RevocationKey_to_public_key(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannel_set_chain_hash"))) TS_OpenChannel_set_chain_hash(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- OpenChannel_set_chain_hash(&this_ptr_conv, val_ref);
-}
-
-int8_tArray __attribute__((export_name("TS_OpenChannel_get_temporary_channel_id"))) TS_OpenChannel_get_temporary_channel_id(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *OpenChannel_get_temporary_channel_id(&this_ptr_conv), 32);
+int8_tArray __attribute__((export_name("TS_RevocationKey_write"))) TS_RevocationKey_write(uint64_t obj) {
+ LDKRevocationKey obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = RevocationKey_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannel_set_temporary_channel_id"))) TS_OpenChannel_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
+uint64_t __attribute__((export_name("TS_RevocationKey_read"))) TS_RevocationKey_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_RevocationKeyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevocationKeyDecodeErrorZ), "LDKCResult_RevocationKeyDecodeErrorZ");
+ *ret_conv = RevocationKey_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_OpenChannel_get_funding_satoshis"))) TS_OpenChannel_get_funding_satoshis(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv);
- return ret_conv;
+void __attribute__((export_name("TS_ExpandedKey_free"))) TS_ExpandedKey_free(uint64_t this_obj) {
+ LDKExpandedKey this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ExpandedKey_free(this_obj_conv);
}
-void __attribute__((export_name("TS_OpenChannel_set_funding_satoshis"))) TS_OpenChannel_set_funding_satoshis(uint64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_funding_satoshis(&this_ptr_conv, val);
+uint64_t __attribute__((export_name("TS_ExpandedKey_new"))) TS_ExpandedKey_new(int8_tArray key_material) {
+ uint8_t key_material_arr[32];
+ CHECK(key_material->arr_len == 32);
+ memcpy(key_material_arr, key_material->elems, 32); FREE(key_material);
+ uint8_t (*key_material_ref)[32] = &key_material_arr;
+ LDKExpandedKey ret_var = ExpandedKey_new(key_material_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-int64_t __attribute__((export_name("TS_OpenChannel_get_push_msat"))) TS_OpenChannel_get_push_msat(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_create"))) TS_create(uint64_t keys, uint64_t min_value_msat, int32_t invoice_expiry_delta_secs, uint64_t entropy_source, int64_t current_time, uint64_t min_final_cltv_expiry_delta) {
+ LDKExpandedKey keys_conv;
+ keys_conv.inner = untag_ptr(keys);
+ keys_conv.is_owned = ptr_is_owned(keys);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(keys_conv);
+ keys_conv.is_owned = false;
+ void* min_value_msat_ptr = untag_ptr(min_value_msat);
+ CHECK_ACCESS(min_value_msat_ptr);
+ LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(min_value_msat_ptr);
+ min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(min_value_msat));
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+ LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ void* min_final_cltv_expiry_delta_ptr = untag_ptr(min_final_cltv_expiry_delta);
+ CHECK_ACCESS(min_final_cltv_expiry_delta_ptr);
+ LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
+ min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ");
+ *ret_conv = create(&keys_conv, min_value_msat_conv, invoice_expiry_delta_secs, entropy_source_conv, current_time, min_final_cltv_expiry_delta_conv);
+ return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_OpenChannel_set_push_msat"))) TS_OpenChannel_set_push_msat(uint64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_push_msat(&this_ptr_conv, val);
+uint64_t __attribute__((export_name("TS_create_from_hash"))) TS_create_from_hash(uint64_t keys, uint64_t min_value_msat, int8_tArray payment_hash, int32_t invoice_expiry_delta_secs, int64_t current_time, uint64_t min_final_cltv_expiry_delta) {
+ LDKExpandedKey keys_conv;
+ keys_conv.inner = untag_ptr(keys);
+ keys_conv.is_owned = ptr_is_owned(keys);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(keys_conv);
+ keys_conv.is_owned = false;
+ void* min_value_msat_ptr = untag_ptr(min_value_msat);
+ CHECK_ACCESS(min_value_msat_ptr);
+ LDKCOption_u64Z min_value_msat_conv = *(LDKCOption_u64Z*)(min_value_msat_ptr);
+ min_value_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(min_value_msat));
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK(payment_hash->arr_len == 32);
+ memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
+ void* min_final_cltv_expiry_delta_ptr = untag_ptr(min_final_cltv_expiry_delta);
+ CHECK_ACCESS(min_final_cltv_expiry_delta_ptr);
+ LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
+ min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
+ LDKCResult_ThirtyTwoBytesNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesNoneZ), "LDKCResult_ThirtyTwoBytesNoneZ");
+ *ret_conv = create_from_hash(&keys_conv, min_value_msat_conv, payment_hash_ref, invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta_conv);
+ return tag_ptr(ret_conv, true);
}
-int64_t __attribute__((export_name("TS_OpenChannel_get_dust_limit_satoshis"))) TS_OpenChannel_get_dust_limit_satoshis(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv);
- return ret_conv;
+void __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKDecodeError this_ptr_conv = *(LDKDecodeError*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ DecodeError_free(this_ptr_conv);
}
-void __attribute__((export_name("TS_OpenChannel_set_dust_limit_satoshis"))) TS_OpenChannel_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+static inline uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg) {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-
-int64_t __attribute__((export_name("TS_OpenChannel_get_max_htlc_value_in_flight_msat"))) TS_OpenChannel_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+int64_t __attribute__((export_name("TS_DecodeError_clone_ptr"))) TS_DecodeError_clone_ptr(uint64_t arg) {
+ LDKDecodeError* arg_conv = (LDKDecodeError*)untag_ptr(arg);
+ int64_t ret_conv = DecodeError_clone_ptr(arg_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannel_set_max_htlc_value_in_flight_msat"))) TS_OpenChannel_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
-}
-
-int64_t __attribute__((export_name("TS_OpenChannel_get_channel_reserve_satoshis"))) TS_OpenChannel_get_channel_reserve_satoshis(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_DecodeError_clone"))) TS_DecodeError_clone(uint64_t orig) {
+ LDKDecodeError* orig_conv = (LDKDecodeError*)untag_ptr(orig);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-void __attribute__((export_name("TS_OpenChannel_set_channel_reserve_satoshis"))) TS_OpenChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+uint64_t __attribute__((export_name("TS_DecodeError_unknown_version"))) TS_DecodeError_unknown_version() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_unknown_version();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-int64_t __attribute__((export_name("TS_OpenChannel_get_htlc_minimum_msat"))) TS_OpenChannel_get_htlc_minimum_msat(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_DecodeError_unknown_required_feature"))) TS_DecodeError_unknown_required_feature() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_unknown_required_feature();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-void __attribute__((export_name("TS_OpenChannel_set_htlc_minimum_msat"))) TS_OpenChannel_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+uint64_t __attribute__((export_name("TS_DecodeError_invalid_value"))) TS_DecodeError_invalid_value() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_invalid_value();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-int32_t __attribute__((export_name("TS_OpenChannel_get_feerate_per_kw"))) TS_OpenChannel_get_feerate_per_kw(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_DecodeError_short_read"))) TS_DecodeError_short_read() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_short_read();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-void __attribute__((export_name("TS_OpenChannel_set_feerate_per_kw"))) TS_OpenChannel_set_feerate_per_kw(uint64_t this_ptr, int32_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_feerate_per_kw(&this_ptr_conv, val);
+uint64_t __attribute__((export_name("TS_DecodeError_bad_length_descriptor"))) TS_DecodeError_bad_length_descriptor() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_bad_length_descriptor();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-int16_t __attribute__((export_name("TS_OpenChannel_get_to_self_delay"))) TS_OpenChannel_get_to_self_delay(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_DecodeError_io"))) TS_DecodeError_io(uint32_t a) {
+ LDKIOError a_conv = LDKIOError_from_js(a);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_io(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-void __attribute__((export_name("TS_OpenChannel_set_to_self_delay"))) TS_OpenChannel_set_to_self_delay(uint64_t this_ptr, int16_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_to_self_delay(&this_ptr_conv, val);
+uint64_t __attribute__((export_name("TS_DecodeError_unsupported_compression"))) TS_DecodeError_unsupported_compression() {
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = DecodeError_unsupported_compression();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-int16_t __attribute__((export_name("TS_OpenChannel_get_max_accepted_htlcs"))) TS_OpenChannel_get_max_accepted_htlcs(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv);
+int64_t __attribute__((export_name("TS_DecodeError_hash"))) TS_DecodeError_hash(uint64_t o) {
+ LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o);
+ int64_t ret_conv = DecodeError_hash(o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannel_set_max_accepted_htlcs"))) TS_OpenChannel_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
+jboolean __attribute__((export_name("TS_DecodeError_eq"))) TS_DecodeError_eq(uint64_t a, uint64_t b) {
+ LDKDecodeError* a_conv = (LDKDecodeError*)untag_ptr(a);
+ LDKDecodeError* b_conv = (LDKDecodeError*)untag_ptr(b);
+ jboolean ret_conv = DecodeError_eq(a_conv, b_conv);
+ return ret_conv;
}
-int8_tArray __attribute__((export_name("TS_OpenChannel_get_funding_pubkey"))) TS_OpenChannel_get_funding_pubkey(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+void __attribute__((export_name("TS_Init_free"))) TS_Init_free(uint64_t this_obj) {
+ LDKInit this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Init_free(this_obj_conv);
}
-void __attribute__((export_name("TS_OpenChannel_set_funding_pubkey"))) TS_OpenChannel_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+uint64_t __attribute__((export_name("TS_Init_get_features"))) TS_Init_get_features(uint64_t this_ptr) {
+ LDKInit this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+ LDKInitFeatures ret_var = Init_get_features(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-int8_tArray __attribute__((export_name("TS_OpenChannel_get_revocation_basepoint"))) TS_OpenChannel_get_revocation_basepoint(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+void __attribute__((export_name("TS_Init_set_features"))) TS_Init_set_features(uint64_t this_ptr, uint64_t val) {
+ LDKInit this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ LDKInitFeatures val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = InitFeatures_clone(&val_conv);
+ Init_set_features(&this_ptr_conv, val_conv);
}
-void __attribute__((export_name("TS_OpenChannel_set_revocation_basepoint"))) TS_OpenChannel_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+uint64_t __attribute__((export_name("TS_Init_get_networks"))) TS_Init_get_networks(uint64_t this_ptr) {
+ LDKInit this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+ LDKCOption_CVec_ThirtyTwoBytesZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_ThirtyTwoBytesZZ), "LDKCOption_CVec_ThirtyTwoBytesZZ");
+ *ret_copy = Init_get_networks(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-int8_tArray __attribute__((export_name("TS_OpenChannel_get_payment_point"))) TS_OpenChannel_get_payment_point(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+void __attribute__((export_name("TS_Init_set_networks"))) TS_Init_set_networks(uint64_t this_ptr, uint64_t val) {
+ LDKInit this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_CVec_ThirtyTwoBytesZZ val_conv = *(LDKCOption_CVec_ThirtyTwoBytesZZ*)(val_ptr);
+ val_conv = COption_CVec_ThirtyTwoBytesZZ_clone((LDKCOption_CVec_ThirtyTwoBytesZZ*)untag_ptr(val));
+ Init_set_networks(&this_ptr_conv, val_conv);
}
-void __attribute__((export_name("TS_OpenChannel_set_payment_point"))) TS_OpenChannel_set_payment_point(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
+uint64_t __attribute__((export_name("TS_Init_get_remote_network_address"))) TS_Init_get_remote_network_address(uint64_t this_ptr) {
+ LDKInit this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannel_set_payment_point(&this_ptr_conv, val_ref);
+ LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
+ *ret_copy = Init_get_remote_network_address(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-int8_tArray __attribute__((export_name("TS_OpenChannel_get_delayed_payment_basepoint"))) TS_OpenChannel_get_delayed_payment_basepoint(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+void __attribute__((export_name("TS_Init_set_remote_network_address"))) TS_Init_set_remote_network_address(uint64_t this_ptr, uint64_t val) {
+ LDKInit this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr);
+ val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val));
+ Init_set_remote_network_address(&this_ptr_conv, val_conv);
}
-void __attribute__((export_name("TS_OpenChannel_set_delayed_payment_basepoint"))) TS_OpenChannel_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+uint64_t __attribute__((export_name("TS_Init_new"))) TS_Init_new(uint64_t features_arg, uint64_t networks_arg, uint64_t remote_network_address_arg) {
+ LDKInitFeatures features_arg_conv;
+ features_arg_conv.inner = untag_ptr(features_arg);
+ features_arg_conv.is_owned = ptr_is_owned(features_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv);
+ features_arg_conv = InitFeatures_clone(&features_arg_conv);
+ void* networks_arg_ptr = untag_ptr(networks_arg);
+ CHECK_ACCESS(networks_arg_ptr);
+ LDKCOption_CVec_ThirtyTwoBytesZZ networks_arg_conv = *(LDKCOption_CVec_ThirtyTwoBytesZZ*)(networks_arg_ptr);
+ networks_arg_conv = COption_CVec_ThirtyTwoBytesZZ_clone((LDKCOption_CVec_ThirtyTwoBytesZZ*)untag_ptr(networks_arg));
+ void* remote_network_address_arg_ptr = untag_ptr(remote_network_address_arg);
+ CHECK_ACCESS(remote_network_address_arg_ptr);
+ LDKCOption_SocketAddressZ remote_network_address_arg_conv = *(LDKCOption_SocketAddressZ*)(remote_network_address_arg_ptr);
+ LDKInit ret_var = Init_new(features_arg_conv, networks_arg_conv, remote_network_address_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-int8_tArray __attribute__((export_name("TS_OpenChannel_get_htlc_basepoint"))) TS_OpenChannel_get_htlc_basepoint(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+static inline uint64_t Init_clone_ptr(LDKInit *NONNULL_PTR arg) {
+ LDKInit ret_var = Init_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-
-void __attribute__((export_name("TS_OpenChannel_set_htlc_basepoint"))) TS_OpenChannel_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+int64_t __attribute__((export_name("TS_Init_clone_ptr"))) TS_Init_clone_ptr(uint64_t arg) {
+ LDKInit arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = Init_clone_ptr(&arg_conv);
+ return ret_conv;
}
-int8_tArray __attribute__((export_name("TS_OpenChannel_get_first_per_commitment_point"))) TS_OpenChannel_get_first_per_commitment_point(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+uint64_t __attribute__((export_name("TS_Init_clone"))) TS_Init_clone(uint64_t orig) {
+ LDKInit orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKInit ret_var = Init_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_OpenChannel_set_first_per_commitment_point"))) TS_OpenChannel_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+int64_t __attribute__((export_name("TS_Init_hash"))) TS_Init_hash(uint64_t o) {
+ LDKInit o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Init_hash(&o_conv);
+ return ret_conv;
}
-int8_t __attribute__((export_name("TS_OpenChannel_get_channel_flags"))) TS_OpenChannel_get_channel_flags(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv);
+jboolean __attribute__((export_name("TS_Init_eq"))) TS_Init_eq(uint64_t a, uint64_t b) {
+ LDKInit a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKInit b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Init_eq(&a_conv, &b_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannel_set_channel_flags"))) TS_OpenChannel_set_channel_flags(uint64_t this_ptr, int8_t val) {
- LDKOpenChannel this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- OpenChannel_set_channel_flags(&this_ptr_conv, val);
+void __attribute__((export_name("TS_ErrorMessage_free"))) TS_ErrorMessage_free(uint64_t this_obj) {
+ LDKErrorMessage this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ErrorMessage_free(this_obj_conv);
}
-uint64_t __attribute__((export_name("TS_OpenChannel_get_shutdown_scriptpubkey"))) TS_OpenChannel_get_shutdown_scriptpubkey(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_ErrorMessage_get_channel_id"))) TS_ErrorMessage_get_channel_id(uint64_t this_ptr) {
+ LDKErrorMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *ErrorMessage_get_channel_id(&this_ptr_conv), 32);
+ return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannel_set_shutdown_scriptpubkey"))) TS_OpenChannel_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) {
- LDKOpenChannel this_ptr_conv;
+void __attribute__((export_name("TS_ErrorMessage_set_channel_id"))) TS_ErrorMessage_set_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKErrorMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
- val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ ErrorMessage_set_channel_id(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_OpenChannel_get_channel_type"))) TS_OpenChannel_get_channel_type(uint64_t this_ptr) {
- LDKOpenChannel this_ptr_conv;
+jstring __attribute__((export_name("TS_ErrorMessage_get_data"))) TS_ErrorMessage_get_data(uint64_t this_ptr) {
+ LDKErrorMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+ LDKStr ret_str = ErrorMessage_get_data(&this_ptr_conv);
+ jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannel_set_channel_type"))) TS_OpenChannel_set_channel_type(uint64_t this_ptr, uint64_t val) {
- LDKOpenChannel this_ptr_conv;
+void __attribute__((export_name("TS_ErrorMessage_set_data"))) TS_ErrorMessage_set_data(uint64_t this_ptr, jstring val) {
+ LDKErrorMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = ChannelTypeFeatures_clone(&val_conv);
- OpenChannel_set_channel_type(&this_ptr_conv, val_conv);
+ LDKStr val_conv = str_ref_to_owned_c(val);
+ ErrorMessage_set_data(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_OpenChannel_new"))) TS_OpenChannel_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) {
- LDKThirtyTwoBytes chain_hash_arg_ref;
- CHECK(chain_hash_arg->arr_len == 32);
- memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg);
- LDKThirtyTwoBytes temporary_channel_id_arg_ref;
- CHECK(temporary_channel_id_arg->arr_len == 32);
- memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg);
- LDKPublicKey funding_pubkey_arg_ref;
- CHECK(funding_pubkey_arg->arr_len == 33);
- memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg);
- LDKPublicKey revocation_basepoint_arg_ref;
- CHECK(revocation_basepoint_arg->arr_len == 33);
- memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg);
- LDKPublicKey payment_point_arg_ref;
- CHECK(payment_point_arg->arr_len == 33);
- memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg);
- LDKPublicKey delayed_payment_basepoint_arg_ref;
- CHECK(delayed_payment_basepoint_arg->arr_len == 33);
- memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg);
- LDKPublicKey htlc_basepoint_arg_ref;
- CHECK(htlc_basepoint_arg->arr_len == 33);
- memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg);
- LDKPublicKey first_per_commitment_point_arg_ref;
- CHECK(first_per_commitment_point_arg->arr_len == 33);
- memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg);
- void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
- CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
- LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
- shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
- LDKChannelTypeFeatures channel_type_arg_conv;
- channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
- channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
- channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
- LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+uint64_t __attribute__((export_name("TS_ErrorMessage_new"))) TS_ErrorMessage_new(int8_tArray channel_id_arg, jstring data_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ CHECK(channel_id_arg->arr_len == 32);
+ memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
+ LDKStr data_arg_conv = str_ref_to_owned_c(data_arg);
+ LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg) {
- LDKOpenChannel ret_var = OpenChannel_clone(arg);
+static inline uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg) {
+ LDKErrorMessage ret_var = ErrorMessage_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_OpenChannel_clone_ptr"))) TS_OpenChannel_clone_ptr(uint64_t arg) {
- LDKOpenChannel arg_conv;
+int64_t __attribute__((export_name("TS_ErrorMessage_clone_ptr"))) TS_ErrorMessage_clone_ptr(uint64_t arg) {
+ LDKErrorMessage arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = OpenChannel_clone_ptr(&arg_conv);
+ int64_t ret_conv = ErrorMessage_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_OpenChannel_clone"))) TS_OpenChannel_clone(uint64_t orig) {
- LDKOpenChannel orig_conv;
+uint64_t __attribute__((export_name("TS_ErrorMessage_clone"))) TS_ErrorMessage_clone(uint64_t orig) {
+ LDKErrorMessage orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
+ LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-jboolean __attribute__((export_name("TS_OpenChannel_eq"))) TS_OpenChannel_eq(uint64_t a, uint64_t b) {
- LDKOpenChannel a_conv;
+int64_t __attribute__((export_name("TS_ErrorMessage_hash"))) TS_ErrorMessage_hash(uint64_t o) {
+ LDKErrorMessage o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ErrorMessage_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_ErrorMessage_eq"))) TS_ErrorMessage_eq(uint64_t a, uint64_t b) {
+ LDKErrorMessage a_conv;
a_conv.inner = untag_ptr(a);
a_conv.is_owned = ptr_is_owned(a);
CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
a_conv.is_owned = false;
- LDKOpenChannel b_conv;
+ LDKErrorMessage b_conv;
b_conv.inner = untag_ptr(b);
b_conv.is_owned = ptr_is_owned(b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
b_conv.is_owned = false;
- jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv);
+ jboolean ret_conv = ErrorMessage_eq(&a_conv, &b_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_free"))) TS_OpenChannelV2_free(uint64_t this_obj) {
- LDKOpenChannelV2 this_obj_conv;
+void __attribute__((export_name("TS_WarningMessage_free"))) TS_WarningMessage_free(uint64_t this_obj) {
+ LDKWarningMessage this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- OpenChannelV2_free(this_obj_conv);
+ WarningMessage_free(this_obj_conv);
}
-int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_chain_hash"))) TS_OpenChannelV2_get_chain_hash(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_WarningMessage_get_channel_id"))) TS_WarningMessage_get_channel_id(uint64_t this_ptr) {
+ LDKWarningMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *OpenChannelV2_get_chain_hash(&this_ptr_conv), 32);
+ memcpy(ret_arr->elems, *WarningMessage_get_channel_id(&this_ptr_conv), 32);
return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_chain_hash"))) TS_OpenChannelV2_set_chain_hash(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_WarningMessage_set_channel_id"))) TS_WarningMessage_set_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKWarningMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKThirtyTwoBytes val_ref;
CHECK(val->arr_len == 32);
memcpy(val_ref.data, val->elems, 32); FREE(val);
- OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref);
-}
-
-int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_temporary_channel_id"))) TS_OpenChannelV2_get_temporary_channel_id(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv), 32);
- return ret_arr;
+ WarningMessage_set_channel_id(&this_ptr_conv, val_ref);
}
-void __attribute__((export_name("TS_OpenChannelV2_set_temporary_channel_id"))) TS_OpenChannelV2_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
+jstring __attribute__((export_name("TS_WarningMessage_get_data"))) TS_WarningMessage_get_data(uint64_t this_ptr) {
+ LDKWarningMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ LDKStr ret_str = WarningMessage_get_data(&this_ptr_conv);
+ jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
}
-int32_t __attribute__((export_name("TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_WarningMessage_set_data"))) TS_WarningMessage_set_data(uint64_t this_ptr, jstring val) {
+ LDKWarningMessage this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int32_t ret_conv = OpenChannelV2_get_funding_feerate_sat_per_1000_weight(&this_ptr_conv);
- return ret_conv;
+ LDKStr val_conv = str_ref_to_owned_c(val);
+ WarningMessage_set_data(&this_ptr_conv, val_conv);
}
-void __attribute__((export_name("TS_OpenChannelV2_set_funding_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_set_funding_feerate_sat_per_1000_weight(uint64_t this_ptr, int32_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+uint64_t __attribute__((export_name("TS_WarningMessage_new"))) TS_WarningMessage_new(int8_tArray channel_id_arg, jstring data_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ CHECK(channel_id_arg->arr_len == 32);
+ memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
+ LDKStr data_arg_conv = str_ref_to_owned_c(data_arg);
+ LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t WarningMessage_clone_ptr(LDKWarningMessage *NONNULL_PTR arg) {
+ LDKWarningMessage ret_var = WarningMessage_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_WarningMessage_clone_ptr"))) TS_WarningMessage_clone_ptr(uint64_t arg) {
+ LDKWarningMessage arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = WarningMessage_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_WarningMessage_clone"))) TS_WarningMessage_clone(uint64_t orig) {
+ LDKWarningMessage orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKWarningMessage ret_var = WarningMessage_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+int64_t __attribute__((export_name("TS_WarningMessage_hash"))) TS_WarningMessage_hash(uint64_t o) {
+ LDKWarningMessage o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = WarningMessage_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_WarningMessage_eq"))) TS_WarningMessage_eq(uint64_t a, uint64_t b) {
+ LDKWarningMessage a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKWarningMessage b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = WarningMessage_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_Ping_free"))) TS_Ping_free(uint64_t this_obj) {
+ LDKPing this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Ping_free(this_obj_conv);
+}
+
+int16_t __attribute__((export_name("TS_Ping_get_ponglen"))) TS_Ping_get_ponglen(uint64_t this_ptr) {
+ LDKPing this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val);
+ int16_t ret_conv = Ping_get_ponglen(&this_ptr_conv);
+ return ret_conv;
}
-int32_t __attribute__((export_name("TS_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_Ping_set_ponglen"))) TS_Ping_set_ponglen(uint64_t this_ptr, int16_t val) {
+ LDKPing this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
+ Ping_set_ponglen(&this_ptr_conv, val);
+}
+
+int16_t __attribute__((export_name("TS_Ping_get_byteslen"))) TS_Ping_get_byteslen(uint64_t this_ptr) {
+ LDKPing this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int16_t ret_conv = Ping_get_byteslen(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr, int32_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_Ping_set_byteslen"))) TS_Ping_set_byteslen(uint64_t this_ptr, int16_t val) {
+ LDKPing this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
+ Ping_set_byteslen(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_OpenChannelV2_get_funding_satoshis"))) TS_OpenChannelV2_get_funding_satoshis(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+uint64_t __attribute__((export_name("TS_Ping_new"))) TS_Ping_new(int16_t ponglen_arg, int16_t byteslen_arg) {
+ LDKPing ret_var = Ping_new(ponglen_arg, byteslen_arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t Ping_clone_ptr(LDKPing *NONNULL_PTR arg) {
+ LDKPing ret_var = Ping_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_Ping_clone_ptr"))) TS_Ping_clone_ptr(uint64_t arg) {
+ LDKPing arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = Ping_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_Ping_clone"))) TS_Ping_clone(uint64_t orig) {
+ LDKPing orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKPing ret_var = Ping_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+int64_t __attribute__((export_name("TS_Ping_hash"))) TS_Ping_hash(uint64_t o) {
+ LDKPing o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Ping_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_Ping_eq"))) TS_Ping_eq(uint64_t a, uint64_t b) {
+ LDKPing a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKPing b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Ping_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_Pong_free"))) TS_Pong_free(uint64_t this_obj) {
+ LDKPong this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Pong_free(this_obj_conv);
+}
+
+int16_t __attribute__((export_name("TS_Pong_get_byteslen"))) TS_Pong_get_byteslen(uint64_t this_ptr) {
+ LDKPong this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv);
+ int16_t ret_conv = Pong_get_byteslen(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_funding_satoshis"))) TS_OpenChannelV2_set_funding_satoshis(uint64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_Pong_set_byteslen"))) TS_Pong_set_byteslen(uint64_t this_ptr, int16_t val) {
+ LDKPong this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val);
+ Pong_set_byteslen(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_OpenChannelV2_get_dust_limit_satoshis"))) TS_OpenChannelV2_get_dust_limit_satoshis(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+uint64_t __attribute__((export_name("TS_Pong_new"))) TS_Pong_new(int16_t byteslen_arg) {
+ LDKPong ret_var = Pong_new(byteslen_arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t Pong_clone_ptr(LDKPong *NONNULL_PTR arg) {
+ LDKPong ret_var = Pong_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_Pong_clone_ptr"))) TS_Pong_clone_ptr(uint64_t arg) {
+ LDKPong arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = Pong_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_Pong_clone"))) TS_Pong_clone(uint64_t orig) {
+ LDKPong orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKPong ret_var = Pong_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+int64_t __attribute__((export_name("TS_Pong_hash"))) TS_Pong_hash(uint64_t o) {
+ LDKPong o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Pong_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_Pong_eq"))) TS_Pong_eq(uint64_t a, uint64_t b) {
+ LDKPong a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKPong b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Pong_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) {
+ LDKOpenChannel this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OpenChannel_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_OpenChannel_get_chain_hash"))) TS_OpenChannel_get_chain_hash(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *OpenChannel_get_chain_hash(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_OpenChannel_set_chain_hash"))) TS_OpenChannel_set_chain_hash(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ OpenChannel_set_chain_hash(&this_ptr_conv, val_ref);
+}
+
+int8_tArray __attribute__((export_name("TS_OpenChannel_get_temporary_channel_id"))) TS_OpenChannel_get_temporary_channel_id(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *OpenChannel_get_temporary_channel_id(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_OpenChannel_set_temporary_channel_id"))) TS_OpenChannel_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
+}
+
+int64_t __attribute__((export_name("TS_OpenChannel_get_funding_satoshis"))) TS_OpenChannel_get_funding_satoshis(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_dust_limit_satoshis"))) TS_OpenChannelV2_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_funding_satoshis"))) TS_OpenChannel_set_funding_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
+ OpenChannel_set_funding_satoshis(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_OpenChannelV2_get_max_htlc_value_in_flight_msat"))) TS_OpenChannelV2_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int64_t __attribute__((export_name("TS_OpenChannel_get_push_msat"))) TS_OpenChannel_get_push_msat(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+ int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_max_htlc_value_in_flight_msat"))) TS_OpenChannelV2_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_push_msat"))) TS_OpenChannel_set_push_msat(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+ OpenChannel_set_push_msat(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_OpenChannelV2_get_htlc_minimum_msat"))) TS_OpenChannelV2_get_htlc_minimum_msat(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int64_t __attribute__((export_name("TS_OpenChannel_get_dust_limit_satoshis"))) TS_OpenChannel_get_dust_limit_satoshis(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
+ int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_htlc_minimum_msat"))) TS_OpenChannelV2_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_dust_limit_satoshis"))) TS_OpenChannel_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
+ OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
}
-int16_t __attribute__((export_name("TS_OpenChannelV2_get_to_self_delay"))) TS_OpenChannelV2_get_to_self_delay(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int64_t __attribute__((export_name("TS_OpenChannel_get_max_htlc_value_in_flight_msat"))) TS_OpenChannel_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv);
+ int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_to_self_delay"))) TS_OpenChannelV2_set_to_self_delay(uint64_t this_ptr, int16_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_max_htlc_value_in_flight_msat"))) TS_OpenChannel_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_to_self_delay(&this_ptr_conv, val);
+ OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
}
-int16_t __attribute__((export_name("TS_OpenChannelV2_get_max_accepted_htlcs"))) TS_OpenChannelV2_get_max_accepted_htlcs(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int64_t __attribute__((export_name("TS_OpenChannel_get_channel_reserve_satoshis"))) TS_OpenChannel_get_channel_reserve_satoshis(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
+ int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_max_accepted_htlcs"))) TS_OpenChannelV2_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_channel_reserve_satoshis"))) TS_OpenChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
+ OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
}
-int32_t __attribute__((export_name("TS_OpenChannelV2_get_locktime"))) TS_OpenChannelV2_get_locktime(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int64_t __attribute__((export_name("TS_OpenChannel_get_htlc_minimum_msat"))) TS_OpenChannel_get_htlc_minimum_msat(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int32_t ret_conv = OpenChannelV2_get_locktime(&this_ptr_conv);
+ int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_locktime"))) TS_OpenChannelV2_set_locktime(uint64_t this_ptr, int32_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_htlc_minimum_msat"))) TS_OpenChannel_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_locktime(&this_ptr_conv, val);
+ OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
}
-int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_funding_pubkey"))) TS_OpenChannelV2_get_funding_pubkey(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int32_t __attribute__((export_name("TS_OpenChannel_get_feerate_per_kw"))) TS_OpenChannel_get_feerate_per_kw(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv);
+ return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_funding_pubkey"))) TS_OpenChannelV2_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_feerate_per_kw"))) TS_OpenChannel_set_feerate_per_kw(uint64_t this_ptr, int32_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
+ OpenChannel_set_feerate_per_kw(&this_ptr_conv, val);
}
-int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_revocation_basepoint"))) TS_OpenChannelV2_get_revocation_basepoint(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int16_t __attribute__((export_name("TS_OpenChannel_get_to_self_delay"))) TS_OpenChannel_get_to_self_delay(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_OpenChannel_set_to_self_delay"))) TS_OpenChannel_set_to_self_delay(uint64_t this_ptr, int16_t val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OpenChannel_set_to_self_delay(&this_ptr_conv, val);
+}
+
+int16_t __attribute__((export_name("TS_OpenChannel_get_max_accepted_htlcs"))) TS_OpenChannel_get_max_accepted_htlcs(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_OpenChannel_set_max_accepted_htlcs"))) TS_OpenChannel_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) {
+ LDKOpenChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
+}
+
+int8_tArray __attribute__((export_name("TS_OpenChannel_get_funding_pubkey"))) TS_OpenChannel_get_funding_pubkey(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_revocation_basepoint"))) TS_OpenChannelV2_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_funding_pubkey"))) TS_OpenChannel_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
+ OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_payment_basepoint"))) TS_OpenChannelV2_get_payment_basepoint(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannel_get_revocation_basepoint"))) TS_OpenChannel_get_revocation_basepoint(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_payment_basepoint"))) TS_OpenChannelV2_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_revocation_basepoint"))) TS_OpenChannel_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
+ OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_delayed_payment_basepoint"))) TS_OpenChannelV2_get_delayed_payment_basepoint(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannel_get_payment_point"))) TS_OpenChannel_get_payment_point(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_delayed_payment_basepoint"))) TS_OpenChannelV2_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_payment_point"))) TS_OpenChannel_set_payment_point(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+ OpenChannel_set_payment_point(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_htlc_basepoint"))) TS_OpenChannelV2_get_htlc_basepoint(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannel_get_delayed_payment_basepoint"))) TS_OpenChannel_get_delayed_payment_basepoint(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_htlc_basepoint"))) TS_OpenChannelV2_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_delayed_payment_basepoint"))) TS_OpenChannel_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
+ OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_first_per_commitment_point"))) TS_OpenChannelV2_get_first_per_commitment_point(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannel_get_htlc_basepoint"))) TS_OpenChannel_get_htlc_basepoint(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_first_per_commitment_point"))) TS_OpenChannelV2_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_htlc_basepoint"))) TS_OpenChannel_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+ OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_second_per_commitment_point"))) TS_OpenChannelV2_get_second_per_commitment_point(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannel_get_first_per_commitment_point"))) TS_OpenChannel_get_first_per_commitment_point(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, OpenChannelV2_get_second_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_second_per_commitment_point"))) TS_OpenChannelV2_set_second_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_first_per_commitment_point"))) TS_OpenChannel_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
+ OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
}
-int8_t __attribute__((export_name("TS_OpenChannelV2_get_channel_flags"))) TS_OpenChannelV2_get_channel_flags(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+int8_t __attribute__((export_name("TS_OpenChannel_get_channel_flags"))) TS_OpenChannel_get_channel_flags(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv);
+ int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_channel_flags"))) TS_OpenChannelV2_set_channel_flags(uint64_t this_ptr, int8_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_channel_flags"))) TS_OpenChannel_set_channel_flags(uint64_t this_ptr, int8_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- OpenChannelV2_set_channel_flags(&this_ptr_conv, val);
+ OpenChannel_set_channel_flags(&this_ptr_conv, val);
}
-uint64_t __attribute__((export_name("TS_OpenChannelV2_get_shutdown_scriptpubkey"))) TS_OpenChannelV2_get_shutdown_scriptpubkey(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+uint64_t __attribute__((export_name("TS_OpenChannel_get_shutdown_scriptpubkey"))) TS_OpenChannel_get_shutdown_scriptpubkey(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
+ *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_shutdown_scriptpubkey"))) TS_OpenChannelV2_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_shutdown_scriptpubkey"))) TS_OpenChannel_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
CHECK_ACCESS(val_ptr);
LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+ OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_OpenChannelV2_get_channel_type"))) TS_OpenChannelV2_get_channel_type(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
+uint64_t __attribute__((export_name("TS_OpenChannel_get_channel_type"))) TS_OpenChannel_get_channel_type(uint64_t this_ptr) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv);
+ LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-void __attribute__((export_name("TS_OpenChannelV2_set_channel_type"))) TS_OpenChannelV2_set_channel_type(uint64_t this_ptr, uint64_t val) {
- LDKOpenChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannel_set_channel_type"))) TS_OpenChannel_set_channel_type(uint64_t this_ptr, uint64_t val) {
+ LDKOpenChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
val_conv = ChannelTypeFeatures_clone(&val_conv);
- OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv);
-}
-
-uint32_t __attribute__((export_name("TS_OpenChannelV2_get_require_confirmed_inputs"))) TS_OpenChannelV2_get_require_confirmed_inputs(uint64_t this_ptr) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- uint32_t ret_conv = LDKCOption_NoneZ_to_js(OpenChannelV2_get_require_confirmed_inputs(&this_ptr_conv));
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_OpenChannelV2_set_require_confirmed_inputs"))) TS_OpenChannelV2_set_require_confirmed_inputs(uint64_t this_ptr, uint32_t val) {
- LDKOpenChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKCOption_NoneZ val_conv = LDKCOption_NoneZ_from_js(val);
- OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
+ OpenChannel_set_channel_type(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_OpenChannelV2_new"))) TS_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg, uint32_t require_confirmed_inputs_arg) {
+uint64_t __attribute__((export_name("TS_OpenChannel_new"))) TS_OpenChannel_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) {
LDKThirtyTwoBytes chain_hash_arg_ref;
CHECK(chain_hash_arg->arr_len == 32);
memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg);
LDKPublicKey revocation_basepoint_arg_ref;
CHECK(revocation_basepoint_arg->arr_len == 33);
memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg);
- LDKPublicKey payment_basepoint_arg_ref;
- CHECK(payment_basepoint_arg->arr_len == 33);
- memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg);
+ LDKPublicKey payment_point_arg_ref;
+ CHECK(payment_point_arg->arr_len == 33);
+ memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg);
LDKPublicKey delayed_payment_basepoint_arg_ref;
CHECK(delayed_payment_basepoint_arg->arr_len == 33);
memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg);
LDKPublicKey first_per_commitment_point_arg_ref;
CHECK(first_per_commitment_point_arg->arr_len == 33);
memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg);
- LDKPublicKey second_per_commitment_point_arg_ref;
- CHECK(second_per_commitment_point_arg->arr_len == 33);
- memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg);
void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
- LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_js(require_confirmed_inputs_arg);
- LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
+ LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t OpenChannelV2_clone_ptr(LDKOpenChannelV2 *NONNULL_PTR arg) {
- LDKOpenChannelV2 ret_var = OpenChannelV2_clone(arg);
+static inline uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg) {
+ LDKOpenChannel ret_var = OpenChannel_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_OpenChannelV2_clone_ptr"))) TS_OpenChannelV2_clone_ptr(uint64_t arg) {
- LDKOpenChannelV2 arg_conv;
+int64_t __attribute__((export_name("TS_OpenChannel_clone_ptr"))) TS_OpenChannel_clone_ptr(uint64_t arg) {
+ LDKOpenChannel arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = OpenChannelV2_clone_ptr(&arg_conv);
+ int64_t ret_conv = OpenChannel_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_OpenChannelV2_clone"))) TS_OpenChannelV2_clone(uint64_t orig) {
- LDKOpenChannelV2 orig_conv;
+uint64_t __attribute__((export_name("TS_OpenChannel_clone"))) TS_OpenChannel_clone(uint64_t orig) {
+ LDKOpenChannel orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKOpenChannelV2 ret_var = OpenChannelV2_clone(&orig_conv);
+ LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-jboolean __attribute__((export_name("TS_OpenChannelV2_eq"))) TS_OpenChannelV2_eq(uint64_t a, uint64_t b) {
- LDKOpenChannelV2 a_conv;
+int64_t __attribute__((export_name("TS_OpenChannel_hash"))) TS_OpenChannel_hash(uint64_t o) {
+ LDKOpenChannel o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = OpenChannel_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_OpenChannel_eq"))) TS_OpenChannel_eq(uint64_t a, uint64_t b) {
+ LDKOpenChannel a_conv;
a_conv.inner = untag_ptr(a);
a_conv.is_owned = ptr_is_owned(a);
CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
a_conv.is_owned = false;
- LDKOpenChannelV2 b_conv;
+ LDKOpenChannel b_conv;
b_conv.inner = untag_ptr(b);
b_conv.is_owned = ptr_is_owned(b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
b_conv.is_owned = false;
- jboolean ret_conv = OpenChannelV2_eq(&a_conv, &b_conv);
+ jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) {
- LDKAcceptChannel this_obj_conv;
+void __attribute__((export_name("TS_OpenChannelV2_free"))) TS_OpenChannelV2_free(uint64_t this_obj) {
+ LDKOpenChannelV2 this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- AcceptChannel_free(this_obj_conv);
+ OpenChannelV2_free(this_obj_conv);
}
-int8_tArray __attribute__((export_name("TS_AcceptChannel_get_temporary_channel_id"))) TS_AcceptChannel_get_temporary_channel_id(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_chain_hash"))) TS_OpenChannelV2_get_chain_hash(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv), 32);
+ memcpy(ret_arr->elems, *OpenChannelV2_get_chain_hash(&this_ptr_conv), 32);
return ret_arr;
}
-void __attribute__((export_name("TS_AcceptChannel_set_temporary_channel_id"))) TS_AcceptChannel_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_chain_hash"))) TS_OpenChannelV2_set_chain_hash(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKThirtyTwoBytes val_ref;
CHECK(val->arr_len == 32);
memcpy(val_ref.data, val->elems, 32); FREE(val);
- AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref);
}
-int64_t __attribute__((export_name("TS_AcceptChannel_get_dust_limit_satoshis"))) TS_AcceptChannel_get_dust_limit_satoshis(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_temporary_channel_id"))) TS_OpenChannelV2_get_temporary_channel_id(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv);
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_OpenChannelV2_set_temporary_channel_id"))) TS_OpenChannelV2_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+}
+
+int32_t __attribute__((export_name("TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_get_funding_feerate_sat_per_1000_weight(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int32_t ret_conv = OpenChannelV2_get_funding_feerate_sat_per_1000_weight(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannel_set_dust_limit_satoshis"))) TS_AcceptChannel_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_funding_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_set_funding_feerate_sat_per_1000_weight(uint64_t this_ptr, int32_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+ OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_AcceptChannel_get_max_htlc_value_in_flight_msat"))) TS_AcceptChannel_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int32_t __attribute__((export_name("TS_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+ int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannel_set_max_htlc_value_in_flight_msat"))) TS_AcceptChannel_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight"))) TS_OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(uint64_t this_ptr, int32_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+ OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_AcceptChannel_get_channel_reserve_satoshis"))) TS_AcceptChannel_get_channel_reserve_satoshis(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int64_t __attribute__((export_name("TS_OpenChannelV2_get_funding_satoshis"))) TS_OpenChannelV2_get_funding_satoshis(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+ int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannel_set_channel_reserve_satoshis"))) TS_AcceptChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_funding_satoshis"))) TS_OpenChannelV2_set_funding_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+ OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_AcceptChannel_get_htlc_minimum_msat"))) TS_AcceptChannel_get_htlc_minimum_msat(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int64_t __attribute__((export_name("TS_OpenChannelV2_get_dust_limit_satoshis"))) TS_OpenChannelV2_get_dust_limit_satoshis(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv);
+ int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannel_set_htlc_minimum_msat"))) TS_AcceptChannel_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_dust_limit_satoshis"))) TS_OpenChannelV2_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+ OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
}
-int32_t __attribute__((export_name("TS_AcceptChannel_get_minimum_depth"))) TS_AcceptChannel_get_minimum_depth(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int64_t __attribute__((export_name("TS_OpenChannelV2_get_max_htlc_value_in_flight_msat"))) TS_OpenChannelV2_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv);
+ int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannel_set_minimum_depth"))) TS_AcceptChannel_set_minimum_depth(uint64_t this_ptr, int32_t val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_max_htlc_value_in_flight_msat"))) TS_OpenChannelV2_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_minimum_depth(&this_ptr_conv, val);
+ OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
}
-int16_t __attribute__((export_name("TS_AcceptChannel_get_to_self_delay"))) TS_AcceptChannel_get_to_self_delay(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int64_t __attribute__((export_name("TS_OpenChannelV2_get_htlc_minimum_msat"))) TS_OpenChannelV2_get_htlc_minimum_msat(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv);
+ int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannel_set_to_self_delay"))) TS_AcceptChannel_set_to_self_delay(uint64_t this_ptr, int16_t val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_htlc_minimum_msat"))) TS_OpenChannelV2_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_to_self_delay(&this_ptr_conv, val);
+ OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
}
-int16_t __attribute__((export_name("TS_AcceptChannel_get_max_accepted_htlcs"))) TS_AcceptChannel_get_max_accepted_htlcs(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int16_t __attribute__((export_name("TS_OpenChannelV2_get_to_self_delay"))) TS_OpenChannelV2_get_to_self_delay(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv);
+ int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannel_set_max_accepted_htlcs"))) TS_AcceptChannel_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_to_self_delay"))) TS_OpenChannelV2_set_to_self_delay(uint64_t this_ptr, int16_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
+ OpenChannelV2_set_to_self_delay(&this_ptr_conv, val);
}
-int8_tArray __attribute__((export_name("TS_AcceptChannel_get_funding_pubkey"))) TS_AcceptChannel_get_funding_pubkey(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int16_t __attribute__((export_name("TS_OpenChannelV2_get_max_accepted_htlcs"))) TS_OpenChannelV2_get_max_accepted_htlcs(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_OpenChannelV2_set_max_accepted_htlcs"))) TS_OpenChannelV2_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
+}
+
+int32_t __attribute__((export_name("TS_OpenChannelV2_get_locktime"))) TS_OpenChannelV2_get_locktime(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int32_t ret_conv = OpenChannelV2_get_locktime(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_OpenChannelV2_set_locktime"))) TS_OpenChannelV2_set_locktime(uint64_t this_ptr, int32_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OpenChannelV2_set_locktime(&this_ptr_conv, val);
+}
+
+int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_funding_pubkey"))) TS_OpenChannelV2_get_funding_pubkey(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_AcceptChannel_set_funding_pubkey"))) TS_AcceptChannel_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_funding_pubkey"))) TS_OpenChannelV2_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+ OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_AcceptChannel_get_revocation_basepoint"))) TS_AcceptChannel_get_revocation_basepoint(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_revocation_basepoint"))) TS_OpenChannelV2_get_revocation_basepoint(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_AcceptChannel_set_revocation_basepoint"))) TS_AcceptChannel_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_revocation_basepoint"))) TS_OpenChannelV2_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+ OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_AcceptChannel_get_payment_point"))) TS_AcceptChannel_get_payment_point(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_payment_basepoint"))) TS_OpenChannelV2_get_payment_basepoint(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_AcceptChannel_set_payment_point"))) TS_AcceptChannel_set_payment_point(uint64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_payment_basepoint"))) TS_OpenChannelV2_set_payment_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- AcceptChannel_set_payment_point(&this_ptr_conv, val_ref);
+ OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_AcceptChannel_get_delayed_payment_basepoint"))) TS_AcceptChannel_get_delayed_payment_basepoint(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_delayed_payment_basepoint"))) TS_OpenChannelV2_get_delayed_payment_basepoint(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_AcceptChannel_set_delayed_payment_basepoint"))) TS_AcceptChannel_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_delayed_payment_basepoint"))) TS_OpenChannelV2_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+ OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_AcceptChannel_get_htlc_basepoint"))) TS_AcceptChannel_get_htlc_basepoint(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_htlc_basepoint"))) TS_OpenChannelV2_get_htlc_basepoint(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_AcceptChannel_set_htlc_basepoint"))) TS_AcceptChannel_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_htlc_basepoint"))) TS_OpenChannelV2_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+ OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_AcceptChannel_get_first_per_commitment_point"))) TS_AcceptChannel_get_first_per_commitment_point(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_first_per_commitment_point"))) TS_OpenChannelV2_get_first_per_commitment_point(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_AcceptChannel_set_first_per_commitment_point"))) TS_AcceptChannel_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_first_per_commitment_point"))) TS_OpenChannelV2_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+ OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
}
-uint64_t __attribute__((export_name("TS_AcceptChannel_get_shutdown_scriptpubkey"))) TS_AcceptChannel_get_shutdown_scriptpubkey(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_OpenChannelV2_get_second_per_commitment_point"))) TS_OpenChannelV2_get_second_per_commitment_point(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, OpenChannelV2_get_second_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_OpenChannelV2_set_second_per_commitment_point"))) TS_OpenChannelV2_set_second_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
+}
+
+int8_t __attribute__((export_name("TS_OpenChannelV2_get_channel_flags"))) TS_OpenChannelV2_get_channel_flags(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_OpenChannelV2_set_channel_flags"))) TS_OpenChannelV2_set_channel_flags(uint64_t this_ptr, int8_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OpenChannelV2_set_channel_flags(&this_ptr_conv, val);
+}
+
+uint64_t __attribute__((export_name("TS_OpenChannelV2_get_shutdown_scriptpubkey"))) TS_OpenChannelV2_get_shutdown_scriptpubkey(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+ *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void __attribute__((export_name("TS_AcceptChannel_set_shutdown_scriptpubkey"))) TS_AcceptChannel_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_shutdown_scriptpubkey"))) TS_OpenChannelV2_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
CHECK_ACCESS(val_ptr);
LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
- AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+ OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_AcceptChannel_get_channel_type"))) TS_AcceptChannel_get_channel_type(uint64_t this_ptr) {
- LDKAcceptChannel this_ptr_conv;
+uint64_t __attribute__((export_name("TS_OpenChannelV2_get_channel_type"))) TS_OpenChannelV2_get_channel_type(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv);
+ LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-void __attribute__((export_name("TS_AcceptChannel_set_channel_type"))) TS_AcceptChannel_set_channel_type(uint64_t this_ptr, uint64_t val) {
- LDKAcceptChannel this_ptr_conv;
+void __attribute__((export_name("TS_OpenChannelV2_set_channel_type"))) TS_OpenChannelV2_set_channel_type(uint64_t this_ptr, uint64_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
val_conv = ChannelTypeFeatures_clone(&val_conv);
- AcceptChannel_set_channel_type(&this_ptr_conv, val_conv);
+ OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_AcceptChannel_new"))) TS_AcceptChannel_new(int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) {
+uint32_t __attribute__((export_name("TS_OpenChannelV2_get_require_confirmed_inputs"))) TS_OpenChannelV2_get_require_confirmed_inputs(uint64_t this_ptr) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ uint32_t ret_conv = LDKCOption_NoneZ_to_js(OpenChannelV2_get_require_confirmed_inputs(&this_ptr_conv));
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_OpenChannelV2_set_require_confirmed_inputs"))) TS_OpenChannelV2_set_require_confirmed_inputs(uint64_t this_ptr, uint32_t val) {
+ LDKOpenChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_NoneZ val_conv = LDKCOption_NoneZ_from_js(val);
+ OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
+}
+
+uint64_t __attribute__((export_name("TS_OpenChannelV2_new"))) TS_OpenChannelV2_new(int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg, uint32_t require_confirmed_inputs_arg) {
+ LDKThirtyTwoBytes chain_hash_arg_ref;
+ CHECK(chain_hash_arg->arr_len == 32);
+ memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg);
LDKThirtyTwoBytes temporary_channel_id_arg_ref;
CHECK(temporary_channel_id_arg->arr_len == 32);
memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg);
LDKPublicKey revocation_basepoint_arg_ref;
CHECK(revocation_basepoint_arg->arr_len == 33);
memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg);
- LDKPublicKey payment_point_arg_ref;
- CHECK(payment_point_arg->arr_len == 33);
- memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg);
+ LDKPublicKey payment_basepoint_arg_ref;
+ CHECK(payment_basepoint_arg->arr_len == 33);
+ memcpy(payment_basepoint_arg_ref.compressed_form, payment_basepoint_arg->elems, 33); FREE(payment_basepoint_arg);
LDKPublicKey delayed_payment_basepoint_arg_ref;
CHECK(delayed_payment_basepoint_arg->arr_len == 33);
memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg);
LDKPublicKey first_per_commitment_point_arg_ref;
CHECK(first_per_commitment_point_arg->arr_len == 33);
memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg);
+ LDKPublicKey second_per_commitment_point_arg_ref;
+ CHECK(second_per_commitment_point_arg->arr_len == 33);
+ memcpy(second_per_commitment_point_arg_ref.compressed_form, second_per_commitment_point_arg->elems, 33); FREE(second_per_commitment_point_arg);
void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
- LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_js(require_confirmed_inputs_arg);
+ LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg) {
- LDKAcceptChannel ret_var = AcceptChannel_clone(arg);
+static inline uint64_t OpenChannelV2_clone_ptr(LDKOpenChannelV2 *NONNULL_PTR arg) {
+ LDKOpenChannelV2 ret_var = OpenChannelV2_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_AcceptChannel_clone_ptr"))) TS_AcceptChannel_clone_ptr(uint64_t arg) {
- LDKAcceptChannel arg_conv;
+int64_t __attribute__((export_name("TS_OpenChannelV2_clone_ptr"))) TS_OpenChannelV2_clone_ptr(uint64_t arg) {
+ LDKOpenChannelV2 arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = AcceptChannel_clone_ptr(&arg_conv);
+ int64_t ret_conv = OpenChannelV2_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_AcceptChannel_clone"))) TS_AcceptChannel_clone(uint64_t orig) {
- LDKAcceptChannel orig_conv;
+uint64_t __attribute__((export_name("TS_OpenChannelV2_clone"))) TS_OpenChannelV2_clone(uint64_t orig) {
+ LDKOpenChannelV2 orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
+ LDKOpenChannelV2 ret_var = OpenChannelV2_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-jboolean __attribute__((export_name("TS_AcceptChannel_eq"))) TS_AcceptChannel_eq(uint64_t a, uint64_t b) {
- LDKAcceptChannel a_conv;
+int64_t __attribute__((export_name("TS_OpenChannelV2_hash"))) TS_OpenChannelV2_hash(uint64_t o) {
+ LDKOpenChannelV2 o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = OpenChannelV2_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_OpenChannelV2_eq"))) TS_OpenChannelV2_eq(uint64_t a, uint64_t b) {
+ LDKOpenChannelV2 a_conv;
a_conv.inner = untag_ptr(a);
a_conv.is_owned = ptr_is_owned(a);
CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
a_conv.is_owned = false;
- LDKAcceptChannel b_conv;
+ LDKOpenChannelV2 b_conv;
b_conv.inner = untag_ptr(b);
b_conv.is_owned = ptr_is_owned(b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
b_conv.is_owned = false;
- jboolean ret_conv = AcceptChannel_eq(&a_conv, &b_conv);
+ jboolean ret_conv = OpenChannelV2_eq(&a_conv, &b_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannelV2_free"))) TS_AcceptChannelV2_free(uint64_t this_obj) {
- LDKAcceptChannelV2 this_obj_conv;
+void __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) {
+ LDKAcceptChannel this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- AcceptChannelV2_free(this_obj_conv);
+ AcceptChannel_free(this_obj_conv);
}
-int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_temporary_channel_id"))) TS_AcceptChannelV2_get_temporary_channel_id(uint64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_AcceptChannel_get_temporary_channel_id"))) TS_AcceptChannel_get_temporary_channel_id(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv), 32);
+ memcpy(ret_arr->elems, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv), 32);
return ret_arr;
}
-void __attribute__((export_name("TS_AcceptChannelV2_set_temporary_channel_id"))) TS_AcceptChannelV2_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) {
- LDKAcceptChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_AcceptChannel_set_temporary_channel_id"))) TS_AcceptChannel_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKAcceptChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKThirtyTwoBytes val_ref;
CHECK(val->arr_len == 32);
memcpy(val_ref.data, val->elems, 32); FREE(val);
- AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+ AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
}
-int64_t __attribute__((export_name("TS_AcceptChannelV2_get_funding_satoshis"))) TS_AcceptChannelV2_get_funding_satoshis(uint64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
+int64_t __attribute__((export_name("TS_AcceptChannel_get_dust_limit_satoshis"))) TS_AcceptChannel_get_dust_limit_satoshis(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannelV2_get_funding_satoshis(&this_ptr_conv);
+ int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannelV2_set_funding_satoshis"))) TS_AcceptChannelV2_set_funding_satoshis(uint64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_AcceptChannel_set_dust_limit_satoshis"))) TS_AcceptChannel_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKAcceptChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val);
+ AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_AcceptChannelV2_get_dust_limit_satoshis"))) TS_AcceptChannelV2_get_dust_limit_satoshis(uint64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
+int64_t __attribute__((export_name("TS_AcceptChannel_get_max_htlc_value_in_flight_msat"))) TS_AcceptChannel_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
+ int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannelV2_set_dust_limit_satoshis"))) TS_AcceptChannelV2_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_AcceptChannel_set_max_htlc_value_in_flight_msat"))) TS_AcceptChannel_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) {
+ LDKAcceptChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
+ AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_AcceptChannelV2_get_max_htlc_value_in_flight_msat"))) TS_AcceptChannelV2_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
+int64_t __attribute__((export_name("TS_AcceptChannel_get_channel_reserve_satoshis"))) TS_AcceptChannel_get_channel_reserve_satoshis(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+ int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_AcceptChannelV2_set_max_htlc_value_in_flight_msat"))) TS_AcceptChannelV2_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) {
- LDKAcceptChannelV2 this_ptr_conv;
+void __attribute__((export_name("TS_AcceptChannel_set_channel_reserve_satoshis"))) TS_AcceptChannel_set_channel_reserve_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKAcceptChannel this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+ AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_AcceptChannelV2_get_htlc_minimum_msat"))) TS_AcceptChannelV2_get_htlc_minimum_msat(uint64_t this_ptr) {
- LDKAcceptChannelV2 this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
+int64_t __attribute__((export_name("TS_AcceptChannel_get_htlc_minimum_msat"))) TS_AcceptChannel_get_htlc_minimum_msat(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_htlc_minimum_msat"))) TS_AcceptChannel_set_htlc_minimum_msat(uint64_t this_ptr, int64_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+}
+
+int32_t __attribute__((export_name("TS_AcceptChannel_get_minimum_depth"))) TS_AcceptChannel_get_minimum_depth(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_minimum_depth"))) TS_AcceptChannel_set_minimum_depth(uint64_t this_ptr, int32_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ AcceptChannel_set_minimum_depth(&this_ptr_conv, val);
+}
+
+int16_t __attribute__((export_name("TS_AcceptChannel_get_to_self_delay"))) TS_AcceptChannel_get_to_self_delay(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_to_self_delay"))) TS_AcceptChannel_set_to_self_delay(uint64_t this_ptr, int16_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ AcceptChannel_set_to_self_delay(&this_ptr_conv, val);
+}
+
+int16_t __attribute__((export_name("TS_AcceptChannel_get_max_accepted_htlcs"))) TS_AcceptChannel_get_max_accepted_htlcs(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_max_accepted_htlcs"))) TS_AcceptChannel_set_max_accepted_htlcs(uint64_t this_ptr, int16_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
+}
+
+int8_tArray __attribute__((export_name("TS_AcceptChannel_get_funding_pubkey"))) TS_AcceptChannel_get_funding_pubkey(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_funding_pubkey"))) TS_AcceptChannel_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+}
+
+int8_tArray __attribute__((export_name("TS_AcceptChannel_get_revocation_basepoint"))) TS_AcceptChannel_get_revocation_basepoint(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_revocation_basepoint"))) TS_AcceptChannel_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+}
+
+int8_tArray __attribute__((export_name("TS_AcceptChannel_get_payment_point"))) TS_AcceptChannel_get_payment_point(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_payment_point"))) TS_AcceptChannel_set_payment_point(uint64_t this_ptr, int8_tArray val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ AcceptChannel_set_payment_point(&this_ptr_conv, val_ref);
+}
+
+int8_tArray __attribute__((export_name("TS_AcceptChannel_get_delayed_payment_basepoint"))) TS_AcceptChannel_get_delayed_payment_basepoint(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_delayed_payment_basepoint"))) TS_AcceptChannel_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+}
+
+int8_tArray __attribute__((export_name("TS_AcceptChannel_get_htlc_basepoint"))) TS_AcceptChannel_get_htlc_basepoint(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_htlc_basepoint"))) TS_AcceptChannel_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+}
+
+int8_tArray __attribute__((export_name("TS_AcceptChannel_get_first_per_commitment_point"))) TS_AcceptChannel_get_first_per_commitment_point(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_first_per_commitment_point"))) TS_AcceptChannel_set_first_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+}
+
+uint64_t __attribute__((export_name("TS_AcceptChannel_get_shutdown_scriptpubkey"))) TS_AcceptChannel_get_shutdown_scriptpubkey(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
+ *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_shutdown_scriptpubkey"))) TS_AcceptChannel_set_shutdown_scriptpubkey(uint64_t this_ptr, uint64_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
+ val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
+ AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+}
+
+uint64_t __attribute__((export_name("TS_AcceptChannel_get_channel_type"))) TS_AcceptChannel_get_channel_type(uint64_t this_ptr) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_AcceptChannel_set_channel_type"))) TS_AcceptChannel_set_channel_type(uint64_t this_ptr, uint64_t val) {
+ LDKAcceptChannel this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelTypeFeatures val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelTypeFeatures_clone(&val_conv);
+ AcceptChannel_set_channel_type(&this_ptr_conv, val_conv);
+}
+
+uint64_t __attribute__((export_name("TS_AcceptChannel_new"))) TS_AcceptChannel_new(int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, uint64_t shutdown_scriptpubkey_arg, uint64_t channel_type_arg) {
+ LDKThirtyTwoBytes temporary_channel_id_arg_ref;
+ CHECK(temporary_channel_id_arg->arr_len == 32);
+ memcpy(temporary_channel_id_arg_ref.data, temporary_channel_id_arg->elems, 32); FREE(temporary_channel_id_arg);
+ LDKPublicKey funding_pubkey_arg_ref;
+ CHECK(funding_pubkey_arg->arr_len == 33);
+ memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg);
+ LDKPublicKey revocation_basepoint_arg_ref;
+ CHECK(revocation_basepoint_arg->arr_len == 33);
+ memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg);
+ LDKPublicKey payment_point_arg_ref;
+ CHECK(payment_point_arg->arr_len == 33);
+ memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg);
+ LDKPublicKey delayed_payment_basepoint_arg_ref;
+ CHECK(delayed_payment_basepoint_arg->arr_len == 33);
+ memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg);
+ LDKPublicKey htlc_basepoint_arg_ref;
+ CHECK(htlc_basepoint_arg->arr_len == 33);
+ memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg);
+ LDKPublicKey first_per_commitment_point_arg_ref;
+ CHECK(first_per_commitment_point_arg->arr_len == 33);
+ memcpy(first_per_commitment_point_arg_ref.compressed_form, first_per_commitment_point_arg->elems, 33); FREE(first_per_commitment_point_arg);
+ void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
+ CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
+ LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
+ shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
+ LDKChannelTypeFeatures channel_type_arg_conv;
+ channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
+ channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
+ channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
+ LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg) {
+ LDKAcceptChannel ret_var = AcceptChannel_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_AcceptChannel_clone_ptr"))) TS_AcceptChannel_clone_ptr(uint64_t arg) {
+ LDKAcceptChannel arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = AcceptChannel_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_AcceptChannel_clone"))) TS_AcceptChannel_clone(uint64_t orig) {
+ LDKAcceptChannel orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+int64_t __attribute__((export_name("TS_AcceptChannel_hash"))) TS_AcceptChannel_hash(uint64_t o) {
+ LDKAcceptChannel o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = AcceptChannel_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_AcceptChannel_eq"))) TS_AcceptChannel_eq(uint64_t a, uint64_t b) {
+ LDKAcceptChannel a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKAcceptChannel b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = AcceptChannel_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_AcceptChannelV2_free"))) TS_AcceptChannelV2_free(uint64_t this_obj) {
+ LDKAcceptChannelV2 this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ AcceptChannelV2_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_AcceptChannelV2_get_temporary_channel_id"))) TS_AcceptChannelV2_get_temporary_channel_id(uint64_t this_ptr) {
+ LDKAcceptChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_AcceptChannelV2_set_temporary_channel_id"))) TS_AcceptChannelV2_set_temporary_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKAcceptChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+}
+
+int64_t __attribute__((export_name("TS_AcceptChannelV2_get_funding_satoshis"))) TS_AcceptChannelV2_get_funding_satoshis(uint64_t this_ptr) {
+ LDKAcceptChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = AcceptChannelV2_get_funding_satoshis(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_AcceptChannelV2_set_funding_satoshis"))) TS_AcceptChannelV2_set_funding_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKAcceptChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_AcceptChannelV2_get_dust_limit_satoshis"))) TS_AcceptChannelV2_get_dust_limit_satoshis(uint64_t this_ptr) {
+ LDKAcceptChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_AcceptChannelV2_set_dust_limit_satoshis"))) TS_AcceptChannelV2_set_dust_limit_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKAcceptChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_AcceptChannelV2_get_max_htlc_value_in_flight_msat"))) TS_AcceptChannelV2_get_max_htlc_value_in_flight_msat(uint64_t this_ptr) {
+ LDKAcceptChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_AcceptChannelV2_set_max_htlc_value_in_flight_msat"))) TS_AcceptChannelV2_set_max_htlc_value_in_flight_msat(uint64_t this_ptr, int64_t val) {
+ LDKAcceptChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_AcceptChannelV2_get_htlc_minimum_msat"))) TS_AcceptChannelV2_get_htlc_minimum_msat(uint64_t this_ptr) {
+ LDKAcceptChannelV2 this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
return ret_ref;
}
+int64_t __attribute__((export_name("TS_AcceptChannelV2_hash"))) TS_AcceptChannelV2_hash(uint64_t o) {
+ LDKAcceptChannelV2 o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = AcceptChannelV2_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_AcceptChannelV2_eq"))) TS_AcceptChannelV2_eq(uint64_t a, uint64_t b) {
LDKAcceptChannelV2 a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_FundingCreated_hash"))) TS_FundingCreated_hash(uint64_t o) {
+ LDKFundingCreated o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = FundingCreated_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_FundingCreated_eq"))) TS_FundingCreated_eq(uint64_t a, uint64_t b) {
LDKFundingCreated a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_FundingSigned_hash"))) TS_FundingSigned_hash(uint64_t o) {
+ LDKFundingSigned o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = FundingSigned_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_FundingSigned_eq"))) TS_FundingSigned_eq(uint64_t a, uint64_t b) {
LDKFundingSigned a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_ChannelReady_hash"))) TS_ChannelReady_hash(uint64_t o) {
+ LDKChannelReady o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ChannelReady_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_ChannelReady_eq"))) TS_ChannelReady_eq(uint64_t a, uint64_t b) {
LDKChannelReady a_conv;
a_conv.inner = untag_ptr(a);
return ret_conv;
}
-void __attribute__((export_name("TS_TxAddInput_free"))) TS_TxAddInput_free(uint64_t this_obj) {
- LDKTxAddInput this_obj_conv;
+void __attribute__((export_name("TS_Stfu_free"))) TS_Stfu_free(uint64_t this_obj) {
+ LDKStfu this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- TxAddInput_free(this_obj_conv);
+ Stfu_free(this_obj_conv);
}
-int8_tArray __attribute__((export_name("TS_TxAddInput_get_channel_id"))) TS_TxAddInput_get_channel_id(uint64_t this_ptr) {
- LDKTxAddInput this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_Stfu_get_channel_id"))) TS_Stfu_get_channel_id(uint64_t this_ptr) {
+ LDKStfu this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *TxAddInput_get_channel_id(&this_ptr_conv), 32);
+ memcpy(ret_arr->elems, *Stfu_get_channel_id(&this_ptr_conv), 32);
return ret_arr;
}
-void __attribute__((export_name("TS_TxAddInput_set_channel_id"))) TS_TxAddInput_set_channel_id(uint64_t this_ptr, int8_tArray val) {
- LDKTxAddInput this_ptr_conv;
+void __attribute__((export_name("TS_Stfu_set_channel_id"))) TS_Stfu_set_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKStfu this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKThirtyTwoBytes val_ref;
CHECK(val->arr_len == 32);
memcpy(val_ref.data, val->elems, 32); FREE(val);
- TxAddInput_set_channel_id(&this_ptr_conv, val_ref);
+ Stfu_set_channel_id(&this_ptr_conv, val_ref);
}
-int64_t __attribute__((export_name("TS_TxAddInput_get_serial_id"))) TS_TxAddInput_get_serial_id(uint64_t this_ptr) {
- LDKTxAddInput this_ptr_conv;
+int8_t __attribute__((export_name("TS_Stfu_get_initiator"))) TS_Stfu_get_initiator(uint64_t this_ptr) {
+ LDKStfu this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = TxAddInput_get_serial_id(&this_ptr_conv);
+ int8_t ret_conv = Stfu_get_initiator(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_TxAddInput_set_serial_id"))) TS_TxAddInput_set_serial_id(uint64_t this_ptr, int64_t val) {
- LDKTxAddInput this_ptr_conv;
+void __attribute__((export_name("TS_Stfu_set_initiator"))) TS_Stfu_set_initiator(uint64_t this_ptr, int8_t val) {
+ LDKStfu this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- TxAddInput_set_serial_id(&this_ptr_conv, val);
+ Stfu_set_initiator(&this_ptr_conv, val);
}
-uint64_t __attribute__((export_name("TS_TxAddInput_get_prevtx"))) TS_TxAddInput_get_prevtx(uint64_t this_ptr) {
- LDKTxAddInput this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKTransactionU16LenLimited ret_var = TxAddInput_get_prevtx(&this_ptr_conv);
+uint64_t __attribute__((export_name("TS_Stfu_new"))) TS_Stfu_new(int8_tArray channel_id_arg, int8_t initiator_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ CHECK(channel_id_arg->arr_len == 32);
+ memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
+ LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-void __attribute__((export_name("TS_TxAddInput_set_prevtx"))) TS_TxAddInput_set_prevtx(uint64_t this_ptr, uint64_t val) {
- LDKTxAddInput this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKTransactionU16LenLimited val_conv;
+static inline uint64_t Stfu_clone_ptr(LDKStfu *NONNULL_PTR arg) {
+ LDKStfu ret_var = Stfu_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_Stfu_clone_ptr"))) TS_Stfu_clone_ptr(uint64_t arg) {
+ LDKStfu arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = Stfu_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_Stfu_clone"))) TS_Stfu_clone(uint64_t orig) {
+ LDKStfu orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKStfu ret_var = Stfu_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+jboolean __attribute__((export_name("TS_Stfu_eq"))) TS_Stfu_eq(uint64_t a, uint64_t b) {
+ LDKStfu a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKStfu b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Stfu_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_Splice_free"))) TS_Splice_free(uint64_t this_obj) {
+ LDKSplice this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ Splice_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_Splice_get_channel_id"))) TS_Splice_get_channel_id(uint64_t this_ptr) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *Splice_get_channel_id(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_Splice_set_channel_id"))) TS_Splice_set_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ Splice_set_channel_id(&this_ptr_conv, val_ref);
+}
+
+int8_tArray __attribute__((export_name("TS_Splice_get_chain_hash"))) TS_Splice_get_chain_hash(uint64_t this_ptr) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *Splice_get_chain_hash(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_Splice_set_chain_hash"))) TS_Splice_set_chain_hash(uint64_t this_ptr, int8_tArray val) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ Splice_set_chain_hash(&this_ptr_conv, val_ref);
+}
+
+int64_t __attribute__((export_name("TS_Splice_get_relative_satoshis"))) TS_Splice_get_relative_satoshis(uint64_t this_ptr) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = Splice_get_relative_satoshis(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_Splice_set_relative_satoshis"))) TS_Splice_set_relative_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ Splice_set_relative_satoshis(&this_ptr_conv, val);
+}
+
+int32_t __attribute__((export_name("TS_Splice_get_funding_feerate_perkw"))) TS_Splice_get_funding_feerate_perkw(uint64_t this_ptr) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int32_t ret_conv = Splice_get_funding_feerate_perkw(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_Splice_set_funding_feerate_perkw"))) TS_Splice_set_funding_feerate_perkw(uint64_t this_ptr, int32_t val) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ Splice_set_funding_feerate_perkw(&this_ptr_conv, val);
+}
+
+int32_t __attribute__((export_name("TS_Splice_get_locktime"))) TS_Splice_get_locktime(uint64_t this_ptr) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int32_t ret_conv = Splice_get_locktime(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_Splice_set_locktime"))) TS_Splice_set_locktime(uint64_t this_ptr, int32_t val) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ Splice_set_locktime(&this_ptr_conv, val);
+}
+
+int8_tArray __attribute__((export_name("TS_Splice_get_funding_pubkey"))) TS_Splice_get_funding_pubkey(uint64_t this_ptr) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, Splice_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_Splice_set_funding_pubkey"))) TS_Splice_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) {
+ LDKSplice this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ Splice_set_funding_pubkey(&this_ptr_conv, val_ref);
+}
+
+uint64_t __attribute__((export_name("TS_Splice_new"))) TS_Splice_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ CHECK(channel_id_arg->arr_len == 32);
+ memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
+ LDKThirtyTwoBytes chain_hash_arg_ref;
+ CHECK(chain_hash_arg->arr_len == 32);
+ memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg);
+ LDKPublicKey funding_pubkey_arg_ref;
+ CHECK(funding_pubkey_arg->arr_len == 33);
+ memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg);
+ LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t Splice_clone_ptr(LDKSplice *NONNULL_PTR arg) {
+ LDKSplice ret_var = Splice_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_Splice_clone_ptr"))) TS_Splice_clone_ptr(uint64_t arg) {
+ LDKSplice arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = Splice_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_Splice_clone"))) TS_Splice_clone(uint64_t orig) {
+ LDKSplice orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKSplice ret_var = Splice_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+jboolean __attribute__((export_name("TS_Splice_eq"))) TS_Splice_eq(uint64_t a, uint64_t b) {
+ LDKSplice a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKSplice b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = Splice_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_SpliceAck_free"))) TS_SpliceAck_free(uint64_t this_obj) {
+ LDKSpliceAck this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ SpliceAck_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_SpliceAck_get_channel_id"))) TS_SpliceAck_get_channel_id(uint64_t this_ptr) {
+ LDKSpliceAck this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *SpliceAck_get_channel_id(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_SpliceAck_set_channel_id"))) TS_SpliceAck_set_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKSpliceAck this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ SpliceAck_set_channel_id(&this_ptr_conv, val_ref);
+}
+
+int8_tArray __attribute__((export_name("TS_SpliceAck_get_chain_hash"))) TS_SpliceAck_get_chain_hash(uint64_t this_ptr) {
+ LDKSpliceAck this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *SpliceAck_get_chain_hash(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_SpliceAck_set_chain_hash"))) TS_SpliceAck_set_chain_hash(uint64_t this_ptr, int8_tArray val) {
+ LDKSpliceAck this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ SpliceAck_set_chain_hash(&this_ptr_conv, val_ref);
+}
+
+int64_t __attribute__((export_name("TS_SpliceAck_get_relative_satoshis"))) TS_SpliceAck_get_relative_satoshis(uint64_t this_ptr) {
+ LDKSpliceAck this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = SpliceAck_get_relative_satoshis(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_SpliceAck_set_relative_satoshis"))) TS_SpliceAck_set_relative_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKSpliceAck this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ SpliceAck_set_relative_satoshis(&this_ptr_conv, val);
+}
+
+int8_tArray __attribute__((export_name("TS_SpliceAck_get_funding_pubkey"))) TS_SpliceAck_get_funding_pubkey(uint64_t this_ptr) {
+ LDKSpliceAck this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, SpliceAck_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_SpliceAck_set_funding_pubkey"))) TS_SpliceAck_set_funding_pubkey(uint64_t this_ptr, int8_tArray val) {
+ LDKSpliceAck this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref);
+}
+
+uint64_t __attribute__((export_name("TS_SpliceAck_new"))) TS_SpliceAck_new(int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ CHECK(channel_id_arg->arr_len == 32);
+ memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
+ LDKThirtyTwoBytes chain_hash_arg_ref;
+ CHECK(chain_hash_arg->arr_len == 32);
+ memcpy(chain_hash_arg_ref.data, chain_hash_arg->elems, 32); FREE(chain_hash_arg);
+ LDKPublicKey funding_pubkey_arg_ref;
+ CHECK(funding_pubkey_arg->arr_len == 33);
+ memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg);
+ LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t SpliceAck_clone_ptr(LDKSpliceAck *NONNULL_PTR arg) {
+ LDKSpliceAck ret_var = SpliceAck_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_SpliceAck_clone_ptr"))) TS_SpliceAck_clone_ptr(uint64_t arg) {
+ LDKSpliceAck arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = SpliceAck_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_SpliceAck_clone"))) TS_SpliceAck_clone(uint64_t orig) {
+ LDKSpliceAck orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKSpliceAck ret_var = SpliceAck_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+jboolean __attribute__((export_name("TS_SpliceAck_eq"))) TS_SpliceAck_eq(uint64_t a, uint64_t b) {
+ LDKSpliceAck a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKSpliceAck b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = SpliceAck_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_SpliceLocked_free"))) TS_SpliceLocked_free(uint64_t this_obj) {
+ LDKSpliceLocked this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ SpliceLocked_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_SpliceLocked_get_channel_id"))) TS_SpliceLocked_get_channel_id(uint64_t this_ptr) {
+ LDKSpliceLocked this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *SpliceLocked_get_channel_id(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_SpliceLocked_set_channel_id"))) TS_SpliceLocked_set_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKSpliceLocked this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ SpliceLocked_set_channel_id(&this_ptr_conv, val_ref);
+}
+
+uint64_t __attribute__((export_name("TS_SpliceLocked_new"))) TS_SpliceLocked_new(int8_tArray channel_id_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ CHECK(channel_id_arg->arr_len == 32);
+ memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
+ LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t SpliceLocked_clone_ptr(LDKSpliceLocked *NONNULL_PTR arg) {
+ LDKSpliceLocked ret_var = SpliceLocked_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_SpliceLocked_clone_ptr"))) TS_SpliceLocked_clone_ptr(uint64_t arg) {
+ LDKSpliceLocked arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = SpliceLocked_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_SpliceLocked_clone"))) TS_SpliceLocked_clone(uint64_t orig) {
+ LDKSpliceLocked orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKSpliceLocked ret_var = SpliceLocked_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+jboolean __attribute__((export_name("TS_SpliceLocked_eq"))) TS_SpliceLocked_eq(uint64_t a, uint64_t b) {
+ LDKSpliceLocked a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKSpliceLocked b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = SpliceLocked_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_TxAddInput_free"))) TS_TxAddInput_free(uint64_t this_obj) {
+ LDKTxAddInput this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ TxAddInput_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_TxAddInput_get_channel_id"))) TS_TxAddInput_get_channel_id(uint64_t this_ptr) {
+ LDKTxAddInput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *TxAddInput_get_channel_id(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_TxAddInput_set_channel_id"))) TS_TxAddInput_set_channel_id(uint64_t this_ptr, int8_tArray val) {
+ LDKTxAddInput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ TxAddInput_set_channel_id(&this_ptr_conv, val_ref);
+}
+
+int64_t __attribute__((export_name("TS_TxAddInput_get_serial_id"))) TS_TxAddInput_get_serial_id(uint64_t this_ptr) {
+ LDKTxAddInput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = TxAddInput_get_serial_id(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_TxAddInput_set_serial_id"))) TS_TxAddInput_set_serial_id(uint64_t this_ptr, int64_t val) {
+ LDKTxAddInput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ TxAddInput_set_serial_id(&this_ptr_conv, val);
+}
+
+uint64_t __attribute__((export_name("TS_TxAddInput_get_prevtx"))) TS_TxAddInput_get_prevtx(uint64_t this_ptr) {
+ LDKTxAddInput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKTransactionU16LenLimited ret_var = TxAddInput_get_prevtx(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_TxAddInput_set_prevtx"))) TS_TxAddInput_set_prevtx(uint64_t this_ptr, uint64_t val) {
+ LDKTxAddInput this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKTransactionU16LenLimited val_conv;
val_conv.inner = untag_ptr(val);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TxAddInput_hash"))) TS_TxAddInput_hash(uint64_t o) {
+ LDKTxAddInput o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TxAddInput_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TxAddInput_eq"))) TS_TxAddInput_eq(uint64_t a, uint64_t b) {
LDKTxAddInput a_conv;
a_conv.inner = untag_ptr(a);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKu8slice ret_var = TxAddOutput_get_script(&this_ptr_conv);
+ LDKCVec_u8Z ret_var = TxAddOutput_get_script(&this_ptr_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
return ret_arr;
}
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TxAddOutput_hash"))) TS_TxAddOutput_hash(uint64_t o) {
+ LDKTxAddOutput o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TxAddOutput_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TxAddOutput_eq"))) TS_TxAddOutput_eq(uint64_t a, uint64_t b) {
LDKTxAddOutput a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TxRemoveInput_hash"))) TS_TxRemoveInput_hash(uint64_t o) {
+ LDKTxRemoveInput o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TxRemoveInput_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TxRemoveInput_eq"))) TS_TxRemoveInput_eq(uint64_t a, uint64_t b) {
LDKTxRemoveInput a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TxRemoveOutput_hash"))) TS_TxRemoveOutput_hash(uint64_t o) {
+ LDKTxRemoveOutput o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TxRemoveOutput_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TxRemoveOutput_eq"))) TS_TxRemoveOutput_eq(uint64_t a, uint64_t b) {
LDKTxRemoveOutput a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TxComplete_hash"))) TS_TxComplete_hash(uint64_t o) {
+ LDKTxComplete o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TxComplete_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TxComplete_eq"))) TS_TxComplete_eq(uint64_t a, uint64_t b) {
LDKTxComplete a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TxSignatures_hash"))) TS_TxSignatures_hash(uint64_t o) {
+ LDKTxSignatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TxSignatures_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TxSignatures_eq"))) TS_TxSignatures_eq(uint64_t a, uint64_t b) {
LDKTxSignatures a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TxInitRbf_hash"))) TS_TxInitRbf_hash(uint64_t o) {
+ LDKTxInitRbf o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TxInitRbf_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TxInitRbf_eq"))) TS_TxInitRbf_eq(uint64_t a, uint64_t b) {
LDKTxInitRbf a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TxAckRbf_hash"))) TS_TxAckRbf_hash(uint64_t o) {
+ LDKTxAckRbf o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TxAckRbf_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TxAckRbf_eq"))) TS_TxAckRbf_eq(uint64_t a, uint64_t b) {
LDKTxAckRbf a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_TxAbort_hash"))) TS_TxAbort_hash(uint64_t o) {
+ LDKTxAbort o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = TxAbort_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_TxAbort_eq"))) TS_TxAbort_eq(uint64_t a, uint64_t b) {
LDKTxAbort a_conv;
a_conv.inner = untag_ptr(a);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKu8slice ret_var = Shutdown_get_scriptpubkey(&this_ptr_conv);
+ LDKCVec_u8Z ret_var = Shutdown_get_scriptpubkey(&this_ptr_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
return ret_arr;
}
return ret_ref;
}
+int64_t __attribute__((export_name("TS_Shutdown_hash"))) TS_Shutdown_hash(uint64_t o) {
+ LDKShutdown o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Shutdown_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_Shutdown_eq"))) TS_Shutdown_eq(uint64_t a, uint64_t b) {
LDKShutdown a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_ClosingSignedFeeRange_hash"))) TS_ClosingSignedFeeRange_hash(uint64_t o) {
+ LDKClosingSignedFeeRange o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ClosingSignedFeeRange_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_ClosingSignedFeeRange_eq"))) TS_ClosingSignedFeeRange_eq(uint64_t a, uint64_t b) {
LDKClosingSignedFeeRange a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_ClosingSigned_hash"))) TS_ClosingSigned_hash(uint64_t o) {
+ LDKClosingSigned o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ClosingSigned_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_ClosingSigned_eq"))) TS_ClosingSigned_eq(uint64_t a, uint64_t b) {
LDKClosingSigned a_conv;
a_conv.inner = untag_ptr(a);
UpdateAddHTLC_set_skimmed_fee_msat(&this_ptr_conv, val_conv);
}
+uint64_t __attribute__((export_name("TS_UpdateAddHTLC_get_onion_routing_packet"))) TS_UpdateAddHTLC_get_onion_routing_packet(uint64_t this_ptr) {
+ LDKUpdateAddHTLC this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOnionPacket ret_var = UpdateAddHTLC_get_onion_routing_packet(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_UpdateAddHTLC_set_onion_routing_packet"))) TS_UpdateAddHTLC_set_onion_routing_packet(uint64_t this_ptr, uint64_t val) {
+ LDKUpdateAddHTLC this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOnionPacket val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = OnionPacket_clone(&val_conv);
+ UpdateAddHTLC_set_onion_routing_packet(&this_ptr_conv, val_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_UpdateAddHTLC_get_blinding_point"))) TS_UpdateAddHTLC_get_blinding_point(uint64_t this_ptr) {
+ LDKUpdateAddHTLC this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, UpdateAddHTLC_get_blinding_point(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_UpdateAddHTLC_set_blinding_point"))) TS_UpdateAddHTLC_set_blinding_point(uint64_t this_ptr, int8_tArray val) {
+ LDKUpdateAddHTLC this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref);
+}
+
+uint64_t __attribute__((export_name("TS_UpdateAddHTLC_new"))) TS_UpdateAddHTLC_new(int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, uint64_t skimmed_fee_msat_arg, uint64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) {
+ LDKThirtyTwoBytes channel_id_arg_ref;
+ CHECK(channel_id_arg->arr_len == 32);
+ memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
+ LDKThirtyTwoBytes payment_hash_arg_ref;
+ CHECK(payment_hash_arg->arr_len == 32);
+ memcpy(payment_hash_arg_ref.data, payment_hash_arg->elems, 32); FREE(payment_hash_arg);
+ void* skimmed_fee_msat_arg_ptr = untag_ptr(skimmed_fee_msat_arg);
+ CHECK_ACCESS(skimmed_fee_msat_arg_ptr);
+ LDKCOption_u64Z skimmed_fee_msat_arg_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_arg_ptr);
+ skimmed_fee_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat_arg));
+ LDKOnionPacket onion_routing_packet_arg_conv;
+ onion_routing_packet_arg_conv.inner = untag_ptr(onion_routing_packet_arg);
+ onion_routing_packet_arg_conv.is_owned = ptr_is_owned(onion_routing_packet_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(onion_routing_packet_arg_conv);
+ onion_routing_packet_arg_conv = OnionPacket_clone(&onion_routing_packet_arg_conv);
+ LDKPublicKey blinding_point_arg_ref;
+ CHECK(blinding_point_arg->arr_len == 33);
+ memcpy(blinding_point_arg_ref.compressed_form, blinding_point_arg->elems, 33); FREE(blinding_point_arg);
+ LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
static inline uint64_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg) {
LDKUpdateAddHTLC ret_var = UpdateAddHTLC_clone(arg);
uint64_t ret_ref = 0;
return ret_ref;
}
+int64_t __attribute__((export_name("TS_UpdateAddHTLC_hash"))) TS_UpdateAddHTLC_hash(uint64_t o) {
+ LDKUpdateAddHTLC o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = UpdateAddHTLC_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_UpdateAddHTLC_eq"))) TS_UpdateAddHTLC_eq(uint64_t a, uint64_t b) {
LDKUpdateAddHTLC a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_OnionMessage_hash"))) TS_OnionMessage_hash(uint64_t o) {
+ LDKOnionMessage o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = OnionMessage_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_OnionMessage_eq"))) TS_OnionMessage_eq(uint64_t a, uint64_t b) {
LDKOnionMessage a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_UpdateFulfillHTLC_hash"))) TS_UpdateFulfillHTLC_hash(uint64_t o) {
+ LDKUpdateFulfillHTLC o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = UpdateFulfillHTLC_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_UpdateFulfillHTLC_eq"))) TS_UpdateFulfillHTLC_eq(uint64_t a, uint64_t b) {
LDKUpdateFulfillHTLC a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_UpdateFailHTLC_hash"))) TS_UpdateFailHTLC_hash(uint64_t o) {
+ LDKUpdateFailHTLC o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = UpdateFailHTLC_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_UpdateFailHTLC_eq"))) TS_UpdateFailHTLC_eq(uint64_t a, uint64_t b) {
LDKUpdateFailHTLC a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_UpdateFailMalformedHTLC_hash"))) TS_UpdateFailMalformedHTLC_hash(uint64_t o) {
+ LDKUpdateFailMalformedHTLC o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = UpdateFailMalformedHTLC_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_UpdateFailMalformedHTLC_eq"))) TS_UpdateFailMalformedHTLC_eq(uint64_t a, uint64_t b) {
LDKUpdateFailMalformedHTLC a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_CommitmentSigned_hash"))) TS_CommitmentSigned_hash(uint64_t o) {
+ LDKCommitmentSigned o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = CommitmentSigned_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_CommitmentSigned_eq"))) TS_CommitmentSigned_eq(uint64_t a, uint64_t b) {
LDKCommitmentSigned a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_RevokeAndACK_hash"))) TS_RevokeAndACK_hash(uint64_t o) {
+ LDKRevokeAndACK o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = RevokeAndACK_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_RevokeAndACK_eq"))) TS_RevokeAndACK_eq(uint64_t a, uint64_t b) {
LDKRevokeAndACK a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_UpdateFee_hash"))) TS_UpdateFee_hash(uint64_t o) {
+ LDKUpdateFee o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = UpdateFee_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_UpdateFee_eq"))) TS_UpdateFee_eq(uint64_t a, uint64_t b) {
LDKUpdateFee a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_ChannelReestablish_hash"))) TS_ChannelReestablish_hash(uint64_t o) {
+ LDKChannelReestablish o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ChannelReestablish_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_ChannelReestablish_eq"))) TS_ChannelReestablish_eq(uint64_t a, uint64_t b) {
LDKChannelReestablish a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_AnnouncementSignatures_hash"))) TS_AnnouncementSignatures_hash(uint64_t o) {
+ LDKAnnouncementSignatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = AnnouncementSignatures_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_AnnouncementSignatures_eq"))) TS_AnnouncementSignatures_eq(uint64_t a, uint64_t b) {
LDKAnnouncementSignatures a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_SocketAddress_hash"))) TS_SocketAddress_hash(uint64_t o) {
+ LDKSocketAddress* o_conv = (LDKSocketAddress*)untag_ptr(o);
+ int64_t ret_conv = SocketAddress_hash(o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_SocketAddress_eq"))) TS_SocketAddress_eq(uint64_t a, uint64_t b) {
LDKSocketAddress* a_conv = (LDKSocketAddress*)untag_ptr(a);
LDKSocketAddress* b_conv = (LDKSocketAddress*)untag_ptr(b);
return ret_conv;
}
+int64_t __attribute__((export_name("TS_SocketAddressParseError_hash"))) TS_SocketAddressParseError_hash(uint64_t o) {
+ LDKSocketAddressParseError* o_conv = (LDKSocketAddressParseError*)untag_ptr(o);
+ int64_t ret_conv = SocketAddressParseError_hash(o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_SocketAddressParseError_eq"))) TS_SocketAddressParseError_eq(uint64_t a, uint64_t b) {
LDKSocketAddressParseError* a_conv = (LDKSocketAddressParseError*)untag_ptr(a);
LDKSocketAddressParseError* b_conv = (LDKSocketAddressParseError*)untag_ptr(b);
return tag_ptr(ret_conv, true);
}
+jstring __attribute__((export_name("TS_SocketAddress_to_str"))) TS_SocketAddress_to_str(uint64_t o) {
+ LDKSocketAddress* o_conv = (LDKSocketAddress*)untag_ptr(o);
+ LDKStr ret_str = SocketAddress_to_str(o_conv);
+ jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_UnsignedGossipMessage_free"))) TS_UnsignedGossipMessage_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_UnsignedNodeAnnouncement_hash"))) TS_UnsignedNodeAnnouncement_hash(uint64_t o) {
+ LDKUnsignedNodeAnnouncement o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = UnsignedNodeAnnouncement_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_UnsignedNodeAnnouncement_eq"))) TS_UnsignedNodeAnnouncement_eq(uint64_t a, uint64_t b) {
LDKUnsignedNodeAnnouncement a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_NodeAnnouncement_hash"))) TS_NodeAnnouncement_hash(uint64_t o) {
+ LDKNodeAnnouncement o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = NodeAnnouncement_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_NodeAnnouncement_eq"))) TS_NodeAnnouncement_eq(uint64_t a, uint64_t b) {
LDKNodeAnnouncement a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_UnsignedChannelAnnouncement_hash"))) TS_UnsignedChannelAnnouncement_hash(uint64_t o) {
+ LDKUnsignedChannelAnnouncement o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = UnsignedChannelAnnouncement_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_UnsignedChannelAnnouncement_eq"))) TS_UnsignedChannelAnnouncement_eq(uint64_t a, uint64_t b) {
LDKUnsignedChannelAnnouncement a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_ChannelAnnouncement_hash"))) TS_ChannelAnnouncement_hash(uint64_t o) {
+ LDKChannelAnnouncement o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ChannelAnnouncement_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_ChannelAnnouncement_eq"))) TS_ChannelAnnouncement_eq(uint64_t a, uint64_t b) {
LDKChannelAnnouncement a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_UnsignedChannelUpdate_hash"))) TS_UnsignedChannelUpdate_hash(uint64_t o) {
+ LDKUnsignedChannelUpdate o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = UnsignedChannelUpdate_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_UnsignedChannelUpdate_eq"))) TS_UnsignedChannelUpdate_eq(uint64_t a, uint64_t b) {
LDKUnsignedChannelUpdate a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_ChannelUpdate_hash"))) TS_ChannelUpdate_hash(uint64_t o) {
+ LDKChannelUpdate o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ChannelUpdate_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_ChannelUpdate_eq"))) TS_ChannelUpdate_eq(uint64_t a, uint64_t b) {
LDKChannelUpdate a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_QueryChannelRange_hash"))) TS_QueryChannelRange_hash(uint64_t o) {
+ LDKQueryChannelRange o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = QueryChannelRange_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_QueryChannelRange_eq"))) TS_QueryChannelRange_eq(uint64_t a, uint64_t b) {
LDKQueryChannelRange a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_ReplyChannelRange_hash"))) TS_ReplyChannelRange_hash(uint64_t o) {
+ LDKReplyChannelRange o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ReplyChannelRange_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_ReplyChannelRange_eq"))) TS_ReplyChannelRange_eq(uint64_t a, uint64_t b) {
LDKReplyChannelRange a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_QueryShortChannelIds_hash"))) TS_QueryShortChannelIds_hash(uint64_t o) {
+ LDKQueryShortChannelIds o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = QueryShortChannelIds_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_QueryShortChannelIds_eq"))) TS_QueryShortChannelIds_eq(uint64_t a, uint64_t b) {
LDKQueryShortChannelIds a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_ReplyShortChannelIdsEnd_hash"))) TS_ReplyShortChannelIdsEnd_hash(uint64_t o) {
+ LDKReplyShortChannelIdsEnd o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ReplyShortChannelIdsEnd_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_ReplyShortChannelIdsEnd_eq"))) TS_ReplyShortChannelIdsEnd_eq(uint64_t a, uint64_t b) {
LDKReplyShortChannelIdsEnd a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_GossipTimestampFilter_hash"))) TS_GossipTimestampFilter_hash(uint64_t o) {
+ LDKGossipTimestampFilter o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = GossipTimestampFilter_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_GossipTimestampFilter_eq"))) TS_GossipTimestampFilter_eq(uint64_t a, uint64_t b) {
LDKGossipTimestampFilter a_conv;
a_conv.inner = untag_ptr(a);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_ErrorAction_hash"))) TS_ErrorAction_hash(uint64_t o) {
+ LDKErrorAction* o_conv = (LDKErrorAction*)untag_ptr(o);
+ int64_t ret_conv = ErrorAction_hash(o_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_LightningError_free"))) TS_LightningError_free(uint64_t this_obj) {
LDKLightningError this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_CommitmentUpdate_hash"))) TS_CommitmentUpdate_hash(uint64_t o) {
+ LDKCommitmentUpdate o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = CommitmentUpdate_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_CommitmentUpdate_eq"))) TS_CommitmentUpdate_eq(uint64_t a, uint64_t b) {
LDKCommitmentUpdate a_conv;
a_conv.inner = untag_ptr(a);
OnionMessageHandler_free(this_ptr_conv);
}
+void __attribute__((export_name("TS_FinalOnionHopData_free"))) TS_FinalOnionHopData_free(uint64_t this_obj) {
+ LDKFinalOnionHopData this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ FinalOnionHopData_free(this_obj_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_FinalOnionHopData_get_payment_secret"))) TS_FinalOnionHopData_get_payment_secret(uint64_t this_ptr) {
+ LDKFinalOnionHopData this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *FinalOnionHopData_get_payment_secret(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_FinalOnionHopData_set_payment_secret"))) TS_FinalOnionHopData_set_payment_secret(uint64_t this_ptr, int8_tArray val) {
+ LDKFinalOnionHopData this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ FinalOnionHopData_set_payment_secret(&this_ptr_conv, val_ref);
+}
+
+int64_t __attribute__((export_name("TS_FinalOnionHopData_get_total_msat"))) TS_FinalOnionHopData_get_total_msat(uint64_t this_ptr) {
+ LDKFinalOnionHopData this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = FinalOnionHopData_get_total_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_FinalOnionHopData_set_total_msat"))) TS_FinalOnionHopData_set_total_msat(uint64_t this_ptr, int64_t val) {
+ LDKFinalOnionHopData this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ FinalOnionHopData_set_total_msat(&this_ptr_conv, val);
+}
+
+uint64_t __attribute__((export_name("TS_FinalOnionHopData_new"))) TS_FinalOnionHopData_new(int8_tArray payment_secret_arg, int64_t total_msat_arg) {
+ LDKThirtyTwoBytes payment_secret_arg_ref;
+ CHECK(payment_secret_arg->arr_len == 32);
+ memcpy(payment_secret_arg_ref.data, payment_secret_arg->elems, 32); FREE(payment_secret_arg);
+ LDKFinalOnionHopData ret_var = FinalOnionHopData_new(payment_secret_arg_ref, total_msat_arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t FinalOnionHopData_clone_ptr(LDKFinalOnionHopData *NONNULL_PTR arg) {
+ LDKFinalOnionHopData ret_var = FinalOnionHopData_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_FinalOnionHopData_clone_ptr"))) TS_FinalOnionHopData_clone_ptr(uint64_t arg) {
+ LDKFinalOnionHopData arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = FinalOnionHopData_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_FinalOnionHopData_clone"))) TS_FinalOnionHopData_clone(uint64_t orig) {
+ LDKFinalOnionHopData orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKFinalOnionHopData ret_var = FinalOnionHopData_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_OnionPacket_free"))) TS_OnionPacket_free(uint64_t this_obj) {
+ LDKOnionPacket this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OnionPacket_free(this_obj_conv);
+}
+
+int8_t __attribute__((export_name("TS_OnionPacket_get_version"))) TS_OnionPacket_get_version(uint64_t this_ptr) {
+ LDKOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_t ret_conv = OnionPacket_get_version(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_OnionPacket_set_version"))) TS_OnionPacket_set_version(uint64_t this_ptr, int8_t val) {
+ LDKOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ OnionPacket_set_version(&this_ptr_conv, val);
+}
+
+uint64_t __attribute__((export_name("TS_OnionPacket_get_public_key"))) TS_OnionPacket_get_public_key(uint64_t this_ptr) {
+ LDKOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+ *ret_conv = OnionPacket_get_public_key(&this_ptr_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_OnionPacket_set_public_key"))) TS_OnionPacket_set_public_key(uint64_t this_ptr, uint64_t val) {
+ LDKOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCResult_PublicKeySecp256k1ErrorZ val_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(val_ptr);
+ val_conv = CResult_PublicKeySecp256k1ErrorZ_clone((LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(val));
+ OnionPacket_set_public_key(&this_ptr_conv, val_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_OnionPacket_get_hmac"))) TS_OnionPacket_get_hmac(uint64_t this_ptr) {
+ LDKOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *OnionPacket_get_hmac(&this_ptr_conv), 32);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_OnionPacket_set_hmac"))) TS_OnionPacket_set_hmac(uint64_t this_ptr, int8_tArray val) {
+ LDKOnionPacket this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ OnionPacket_set_hmac(&this_ptr_conv, val_ref);
+}
+
+static inline uint64_t OnionPacket_clone_ptr(LDKOnionPacket *NONNULL_PTR arg) {
+ LDKOnionPacket ret_var = OnionPacket_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_OnionPacket_clone_ptr"))) TS_OnionPacket_clone_ptr(uint64_t arg) {
+ LDKOnionPacket arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = OnionPacket_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_OnionPacket_clone"))) TS_OnionPacket_clone(uint64_t orig) {
+ LDKOnionPacket orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKOnionPacket ret_var = OnionPacket_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+int64_t __attribute__((export_name("TS_OnionPacket_hash"))) TS_OnionPacket_hash(uint64_t o) {
+ LDKOnionPacket o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = OnionPacket_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_OnionPacket_eq"))) TS_OnionPacket_eq(uint64_t a, uint64_t b) {
+ LDKOnionPacket a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKOnionPacket b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = OnionPacket_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int8_tArray __attribute__((export_name("TS_AcceptChannel_write"))) TS_AcceptChannel_write(uint64_t obj) {
LDKAcceptChannel obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
+int8_tArray __attribute__((export_name("TS_Stfu_write"))) TS_Stfu_write(uint64_t obj) {
+ LDKStfu obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = Stfu_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_Stfu_read"))) TS_Stfu_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_StfuDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StfuDecodeErrorZ), "LDKCResult_StfuDecodeErrorZ");
+ *ret_conv = Stfu_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray __attribute__((export_name("TS_Splice_write"))) TS_Splice_write(uint64_t obj) {
+ LDKSplice obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = Splice_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_Splice_read"))) TS_Splice_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_SpliceDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceDecodeErrorZ), "LDKCResult_SpliceDecodeErrorZ");
+ *ret_conv = Splice_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray __attribute__((export_name("TS_SpliceAck_write"))) TS_SpliceAck_write(uint64_t obj) {
+ LDKSpliceAck obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = SpliceAck_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_SpliceAck_read"))) TS_SpliceAck_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_SpliceAckDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceAckDecodeErrorZ), "LDKCResult_SpliceAckDecodeErrorZ");
+ *ret_conv = SpliceAck_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray __attribute__((export_name("TS_SpliceLocked_write"))) TS_SpliceLocked_write(uint64_t obj) {
+ LDKSpliceLocked obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = SpliceLocked_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_SpliceLocked_read"))) TS_SpliceLocked_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_SpliceLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpliceLockedDecodeErrorZ), "LDKCResult_SpliceLockedDecodeErrorZ");
+ *ret_conv = SpliceLocked_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
int8_tArray __attribute__((export_name("TS_TxAddInput_write"))) TS_TxAddInput_write(uint64_t obj) {
LDKTxAddInput obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
+int8_tArray __attribute__((export_name("TS_OnionPacket_write"))) TS_OnionPacket_write(uint64_t obj) {
+ LDKOnionPacket obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = OnionPacket_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_OnionPacket_read"))) TS_OnionPacket_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_OnionPacketDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionPacketDecodeErrorZ), "LDKCResult_OnionPacketDecodeErrorZ");
+ *ret_conv = OnionPacket_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
int8_tArray __attribute__((export_name("TS_UpdateAddHTLC_write"))) TS_UpdateAddHTLC_write(uint64_t obj) {
LDKUpdateAddHTLC obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_arr;
}
+int8_tArray __attribute__((export_name("TS_FinalOnionHopData_write"))) TS_FinalOnionHopData_write(uint64_t obj) {
+ LDKFinalOnionHopData obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = FinalOnionHopData_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_FinalOnionHopData_read"))) TS_FinalOnionHopData_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_FinalOnionHopDataDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FinalOnionHopDataDecodeErrorZ), "LDKCResult_FinalOnionHopDataDecodeErrorZ");
+ *ret_conv = FinalOnionHopData_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
int8_tArray __attribute__((export_name("TS_Ping_write"))) TS_Ping_write(uint64_t obj) {
LDKPing obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_MessageSendEventsProvider"))) TS_IgnoringMessageHandler_as_MessageSendEventsProvider(uint64_t this_arg) {
+uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_EventsProvider"))) TS_IgnoringMessageHandler_as_EventsProvider(uint64_t this_arg) {
LDKIgnoringMessageHandler this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKMessageSendEventsProvider* ret_ret = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
- *ret_ret = IgnoringMessageHandler_as_MessageSendEventsProvider(&this_arg_conv);
+ LDKEventsProvider* ret_ret = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
+ *ret_ret = IgnoringMessageHandler_as_EventsProvider(&this_arg_conv);
return tag_ptr(ret_ret, true);
}
-uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_RoutingMessageHandler"))) TS_IgnoringMessageHandler_as_RoutingMessageHandler(uint64_t this_arg) {
+uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_MessageSendEventsProvider"))) TS_IgnoringMessageHandler_as_MessageSendEventsProvider(uint64_t this_arg) {
LDKIgnoringMessageHandler this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKRoutingMessageHandler* ret_ret = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
- *ret_ret = IgnoringMessageHandler_as_RoutingMessageHandler(&this_arg_conv);
+ LDKMessageSendEventsProvider* ret_ret = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
+ *ret_ret = IgnoringMessageHandler_as_MessageSendEventsProvider(&this_arg_conv);
return tag_ptr(ret_ret, true);
}
-uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_OnionMessageProvider"))) TS_IgnoringMessageHandler_as_OnionMessageProvider(uint64_t this_arg) {
+uint64_t __attribute__((export_name("TS_IgnoringMessageHandler_as_RoutingMessageHandler"))) TS_IgnoringMessageHandler_as_RoutingMessageHandler(uint64_t this_arg) {
LDKIgnoringMessageHandler this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKOnionMessageProvider* ret_ret = MALLOC(sizeof(LDKOnionMessageProvider), "LDKOnionMessageProvider");
- *ret_ret = IgnoringMessageHandler_as_OnionMessageProvider(&this_arg_conv);
+ LDKRoutingMessageHandler* ret_ret = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
+ *ret_ret = IgnoringMessageHandler_as_RoutingMessageHandler(&this_arg_conv);
return tag_ptr(ret_ret, true);
}
return ret_arr;
}
-int8_tArray __attribute__((export_name("TS_derive_public_key"))) TS_derive_public_key(int8_tArray per_commitment_point, int8_tArray base_point) {
- LDKPublicKey per_commitment_point_ref;
- CHECK(per_commitment_point->arr_len == 33);
- memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point);
- LDKPublicKey base_point_ref;
- CHECK(base_point->arr_len == 33);
- memcpy(base_point_ref.compressed_form, base_point->elems, 33); FREE(base_point);
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, derive_public_key(per_commitment_point_ref, base_point_ref).compressed_form, 33);
- return ret_arr;
-}
-
int8_tArray __attribute__((export_name("TS_derive_private_revocation_key"))) TS_derive_private_revocation_key(int8_tArray per_commitment_secret, int8_tArray countersignatory_revocation_base_secret) {
uint8_t per_commitment_secret_arr[32];
CHECK(per_commitment_secret->arr_len == 32);
return ret_arr;
}
-int8_tArray __attribute__((export_name("TS_derive_public_revocation_key"))) TS_derive_public_revocation_key(int8_tArray per_commitment_point, int8_tArray countersignatory_revocation_base_point) {
- LDKPublicKey per_commitment_point_ref;
- CHECK(per_commitment_point->arr_len == 33);
- memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point);
- LDKPublicKey countersignatory_revocation_base_point_ref;
- CHECK(countersignatory_revocation_base_point->arr_len == 33);
- memcpy(countersignatory_revocation_base_point_ref.compressed_form, countersignatory_revocation_base_point->elems, 33); FREE(countersignatory_revocation_base_point);
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, derive_public_revocation_key(per_commitment_point_ref, countersignatory_revocation_base_point_ref).compressed_form, 33);
- return ret_arr;
-}
-
void __attribute__((export_name("TS_TxCreationKeys_free"))) TS_TxCreationKeys_free(uint64_t this_obj) {
LDKTxCreationKeys this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
TxCreationKeys_set_per_commitment_point(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_TxCreationKeys_get_revocation_key"))) TS_TxCreationKeys_get_revocation_key(uint64_t this_ptr) {
+uint64_t __attribute__((export_name("TS_TxCreationKeys_get_revocation_key"))) TS_TxCreationKeys_get_revocation_key(uint64_t this_ptr) {
LDKTxCreationKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, TxCreationKeys_get_revocation_key(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ LDKRevocationKey ret_var = TxCreationKeys_get_revocation_key(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_TxCreationKeys_set_revocation_key"))) TS_TxCreationKeys_set_revocation_key(uint64_t this_ptr, int8_tArray val) {
+void __attribute__((export_name("TS_TxCreationKeys_set_revocation_key"))) TS_TxCreationKeys_set_revocation_key(uint64_t this_ptr, uint64_t val) {
LDKTxCreationKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- TxCreationKeys_set_revocation_key(&this_ptr_conv, val_ref);
+ LDKRevocationKey val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = RevocationKey_clone(&val_conv);
+ TxCreationKeys_set_revocation_key(&this_ptr_conv, val_conv);
}
-int8_tArray __attribute__((export_name("TS_TxCreationKeys_get_broadcaster_htlc_key"))) TS_TxCreationKeys_get_broadcaster_htlc_key(uint64_t this_ptr) {
+uint64_t __attribute__((export_name("TS_TxCreationKeys_get_broadcaster_htlc_key"))) TS_TxCreationKeys_get_broadcaster_htlc_key(uint64_t this_ptr) {
LDKTxCreationKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, TxCreationKeys_get_broadcaster_htlc_key(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ LDKHtlcKey ret_var = TxCreationKeys_get_broadcaster_htlc_key(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_TxCreationKeys_set_broadcaster_htlc_key"))) TS_TxCreationKeys_set_broadcaster_htlc_key(uint64_t this_ptr, int8_tArray val) {
+void __attribute__((export_name("TS_TxCreationKeys_set_broadcaster_htlc_key"))) TS_TxCreationKeys_set_broadcaster_htlc_key(uint64_t this_ptr, uint64_t val) {
LDKTxCreationKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- TxCreationKeys_set_broadcaster_htlc_key(&this_ptr_conv, val_ref);
+ LDKHtlcKey val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = HtlcKey_clone(&val_conv);
+ TxCreationKeys_set_broadcaster_htlc_key(&this_ptr_conv, val_conv);
}
-int8_tArray __attribute__((export_name("TS_TxCreationKeys_get_countersignatory_htlc_key"))) TS_TxCreationKeys_get_countersignatory_htlc_key(uint64_t this_ptr) {
+uint64_t __attribute__((export_name("TS_TxCreationKeys_get_countersignatory_htlc_key"))) TS_TxCreationKeys_get_countersignatory_htlc_key(uint64_t this_ptr) {
LDKTxCreationKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, TxCreationKeys_get_countersignatory_htlc_key(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ LDKHtlcKey ret_var = TxCreationKeys_get_countersignatory_htlc_key(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_TxCreationKeys_set_countersignatory_htlc_key"))) TS_TxCreationKeys_set_countersignatory_htlc_key(uint64_t this_ptr, int8_tArray val) {
+void __attribute__((export_name("TS_TxCreationKeys_set_countersignatory_htlc_key"))) TS_TxCreationKeys_set_countersignatory_htlc_key(uint64_t this_ptr, uint64_t val) {
LDKTxCreationKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- TxCreationKeys_set_countersignatory_htlc_key(&this_ptr_conv, val_ref);
+ LDKHtlcKey val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = HtlcKey_clone(&val_conv);
+ TxCreationKeys_set_countersignatory_htlc_key(&this_ptr_conv, val_conv);
}
-int8_tArray __attribute__((export_name("TS_TxCreationKeys_get_broadcaster_delayed_payment_key"))) TS_TxCreationKeys_get_broadcaster_delayed_payment_key(uint64_t this_ptr) {
+uint64_t __attribute__((export_name("TS_TxCreationKeys_get_broadcaster_delayed_payment_key"))) TS_TxCreationKeys_get_broadcaster_delayed_payment_key(uint64_t this_ptr) {
LDKTxCreationKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, TxCreationKeys_get_broadcaster_delayed_payment_key(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ LDKDelayedPaymentKey ret_var = TxCreationKeys_get_broadcaster_delayed_payment_key(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_TxCreationKeys_set_broadcaster_delayed_payment_key"))) TS_TxCreationKeys_set_broadcaster_delayed_payment_key(uint64_t this_ptr, int8_tArray val) {
+void __attribute__((export_name("TS_TxCreationKeys_set_broadcaster_delayed_payment_key"))) TS_TxCreationKeys_set_broadcaster_delayed_payment_key(uint64_t this_ptr, uint64_t val) {
LDKTxCreationKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- TxCreationKeys_set_broadcaster_delayed_payment_key(&this_ptr_conv, val_ref);
+ LDKDelayedPaymentKey val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = DelayedPaymentKey_clone(&val_conv);
+ TxCreationKeys_set_broadcaster_delayed_payment_key(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_TxCreationKeys_new"))) TS_TxCreationKeys_new(int8_tArray per_commitment_point_arg, int8_tArray revocation_key_arg, int8_tArray broadcaster_htlc_key_arg, int8_tArray countersignatory_htlc_key_arg, int8_tArray broadcaster_delayed_payment_key_arg) {
+uint64_t __attribute__((export_name("TS_TxCreationKeys_new"))) TS_TxCreationKeys_new(int8_tArray per_commitment_point_arg, uint64_t revocation_key_arg, uint64_t broadcaster_htlc_key_arg, uint64_t countersignatory_htlc_key_arg, uint64_t broadcaster_delayed_payment_key_arg) {
LDKPublicKey per_commitment_point_arg_ref;
CHECK(per_commitment_point_arg->arr_len == 33);
memcpy(per_commitment_point_arg_ref.compressed_form, per_commitment_point_arg->elems, 33); FREE(per_commitment_point_arg);
- LDKPublicKey revocation_key_arg_ref;
- CHECK(revocation_key_arg->arr_len == 33);
- memcpy(revocation_key_arg_ref.compressed_form, revocation_key_arg->elems, 33); FREE(revocation_key_arg);
- LDKPublicKey broadcaster_htlc_key_arg_ref;
- CHECK(broadcaster_htlc_key_arg->arr_len == 33);
- memcpy(broadcaster_htlc_key_arg_ref.compressed_form, broadcaster_htlc_key_arg->elems, 33); FREE(broadcaster_htlc_key_arg);
- LDKPublicKey countersignatory_htlc_key_arg_ref;
- CHECK(countersignatory_htlc_key_arg->arr_len == 33);
- memcpy(countersignatory_htlc_key_arg_ref.compressed_form, countersignatory_htlc_key_arg->elems, 33); FREE(countersignatory_htlc_key_arg);
- LDKPublicKey broadcaster_delayed_payment_key_arg_ref;
- CHECK(broadcaster_delayed_payment_key_arg->arr_len == 33);
- memcpy(broadcaster_delayed_payment_key_arg_ref.compressed_form, broadcaster_delayed_payment_key_arg->elems, 33); FREE(broadcaster_delayed_payment_key_arg);
- LDKTxCreationKeys ret_var = TxCreationKeys_new(per_commitment_point_arg_ref, revocation_key_arg_ref, broadcaster_htlc_key_arg_ref, countersignatory_htlc_key_arg_ref, broadcaster_delayed_payment_key_arg_ref);
+ LDKRevocationKey revocation_key_arg_conv;
+ revocation_key_arg_conv.inner = untag_ptr(revocation_key_arg);
+ revocation_key_arg_conv.is_owned = ptr_is_owned(revocation_key_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(revocation_key_arg_conv);
+ revocation_key_arg_conv = RevocationKey_clone(&revocation_key_arg_conv);
+ LDKHtlcKey broadcaster_htlc_key_arg_conv;
+ broadcaster_htlc_key_arg_conv.inner = untag_ptr(broadcaster_htlc_key_arg);
+ broadcaster_htlc_key_arg_conv.is_owned = ptr_is_owned(broadcaster_htlc_key_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(broadcaster_htlc_key_arg_conv);
+ broadcaster_htlc_key_arg_conv = HtlcKey_clone(&broadcaster_htlc_key_arg_conv);
+ LDKHtlcKey countersignatory_htlc_key_arg_conv;
+ countersignatory_htlc_key_arg_conv.inner = untag_ptr(countersignatory_htlc_key_arg);
+ countersignatory_htlc_key_arg_conv.is_owned = ptr_is_owned(countersignatory_htlc_key_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(countersignatory_htlc_key_arg_conv);
+ countersignatory_htlc_key_arg_conv = HtlcKey_clone(&countersignatory_htlc_key_arg_conv);
+ LDKDelayedPaymentKey broadcaster_delayed_payment_key_arg_conv;
+ broadcaster_delayed_payment_key_arg_conv.inner = untag_ptr(broadcaster_delayed_payment_key_arg);
+ broadcaster_delayed_payment_key_arg_conv.is_owned = ptr_is_owned(broadcaster_delayed_payment_key_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(broadcaster_delayed_payment_key_arg_conv);
+ broadcaster_delayed_payment_key_arg_conv = DelayedPaymentKey_clone(&broadcaster_delayed_payment_key_arg_conv);
+ LDKTxCreationKeys ret_var = TxCreationKeys_new(per_commitment_point_arg_ref, revocation_key_arg_conv, broadcaster_htlc_key_arg_conv, countersignatory_htlc_key_arg_conv, broadcaster_delayed_payment_key_arg_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
ChannelPublicKeys_set_funding_pubkey(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_ChannelPublicKeys_get_revocation_basepoint"))) TS_ChannelPublicKeys_get_revocation_basepoint(uint64_t this_ptr) {
+uint64_t __attribute__((export_name("TS_ChannelPublicKeys_get_revocation_basepoint"))) TS_ChannelPublicKeys_get_revocation_basepoint(uint64_t this_ptr) {
LDKChannelPublicKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, ChannelPublicKeys_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ LDKRevocationBasepoint ret_var = ChannelPublicKeys_get_revocation_basepoint(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_ChannelPublicKeys_set_revocation_basepoint"))) TS_ChannelPublicKeys_set_revocation_basepoint(uint64_t this_ptr, int8_tArray val) {
+void __attribute__((export_name("TS_ChannelPublicKeys_set_revocation_basepoint"))) TS_ChannelPublicKeys_set_revocation_basepoint(uint64_t this_ptr, uint64_t val) {
LDKChannelPublicKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- ChannelPublicKeys_set_revocation_basepoint(&this_ptr_conv, val_ref);
+ LDKRevocationBasepoint val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = RevocationBasepoint_clone(&val_conv);
+ ChannelPublicKeys_set_revocation_basepoint(&this_ptr_conv, val_conv);
}
int8_tArray __attribute__((export_name("TS_ChannelPublicKeys_get_payment_point"))) TS_ChannelPublicKeys_get_payment_point(uint64_t this_ptr) {
ChannelPublicKeys_set_payment_point(&this_ptr_conv, val_ref);
}
-int8_tArray __attribute__((export_name("TS_ChannelPublicKeys_get_delayed_payment_basepoint"))) TS_ChannelPublicKeys_get_delayed_payment_basepoint(uint64_t this_ptr) {
+uint64_t __attribute__((export_name("TS_ChannelPublicKeys_get_delayed_payment_basepoint"))) TS_ChannelPublicKeys_get_delayed_payment_basepoint(uint64_t this_ptr) {
LDKChannelPublicKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, ChannelPublicKeys_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ LDKDelayedPaymentBasepoint ret_var = ChannelPublicKeys_get_delayed_payment_basepoint(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_ChannelPublicKeys_set_delayed_payment_basepoint"))) TS_ChannelPublicKeys_set_delayed_payment_basepoint(uint64_t this_ptr, int8_tArray val) {
+void __attribute__((export_name("TS_ChannelPublicKeys_set_delayed_payment_basepoint"))) TS_ChannelPublicKeys_set_delayed_payment_basepoint(uint64_t this_ptr, uint64_t val) {
LDKChannelPublicKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- ChannelPublicKeys_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+ LDKDelayedPaymentBasepoint val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = DelayedPaymentBasepoint_clone(&val_conv);
+ ChannelPublicKeys_set_delayed_payment_basepoint(&this_ptr_conv, val_conv);
}
-int8_tArray __attribute__((export_name("TS_ChannelPublicKeys_get_htlc_basepoint"))) TS_ChannelPublicKeys_get_htlc_basepoint(uint64_t this_ptr) {
+uint64_t __attribute__((export_name("TS_ChannelPublicKeys_get_htlc_basepoint"))) TS_ChannelPublicKeys_get_htlc_basepoint(uint64_t this_ptr) {
LDKChannelPublicKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, ChannelPublicKeys_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ LDKHtlcBasepoint ret_var = ChannelPublicKeys_get_htlc_basepoint(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_ChannelPublicKeys_set_htlc_basepoint"))) TS_ChannelPublicKeys_set_htlc_basepoint(uint64_t this_ptr, int8_tArray val) {
+void __attribute__((export_name("TS_ChannelPublicKeys_set_htlc_basepoint"))) TS_ChannelPublicKeys_set_htlc_basepoint(uint64_t this_ptr, uint64_t val) {
LDKChannelPublicKeys this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- ChannelPublicKeys_set_htlc_basepoint(&this_ptr_conv, val_ref);
+ LDKHtlcBasepoint val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = HtlcBasepoint_clone(&val_conv);
+ ChannelPublicKeys_set_htlc_basepoint(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_ChannelPublicKeys_new"))) TS_ChannelPublicKeys_new(int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg) {
+uint64_t __attribute__((export_name("TS_ChannelPublicKeys_new"))) TS_ChannelPublicKeys_new(int8_tArray funding_pubkey_arg, uint64_t revocation_basepoint_arg, int8_tArray payment_point_arg, uint64_t delayed_payment_basepoint_arg, uint64_t htlc_basepoint_arg) {
LDKPublicKey funding_pubkey_arg_ref;
CHECK(funding_pubkey_arg->arr_len == 33);
memcpy(funding_pubkey_arg_ref.compressed_form, funding_pubkey_arg->elems, 33); FREE(funding_pubkey_arg);
- LDKPublicKey revocation_basepoint_arg_ref;
- CHECK(revocation_basepoint_arg->arr_len == 33);
- memcpy(revocation_basepoint_arg_ref.compressed_form, revocation_basepoint_arg->elems, 33); FREE(revocation_basepoint_arg);
+ LDKRevocationBasepoint revocation_basepoint_arg_conv;
+ revocation_basepoint_arg_conv.inner = untag_ptr(revocation_basepoint_arg);
+ revocation_basepoint_arg_conv.is_owned = ptr_is_owned(revocation_basepoint_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(revocation_basepoint_arg_conv);
+ revocation_basepoint_arg_conv = RevocationBasepoint_clone(&revocation_basepoint_arg_conv);
LDKPublicKey payment_point_arg_ref;
CHECK(payment_point_arg->arr_len == 33);
memcpy(payment_point_arg_ref.compressed_form, payment_point_arg->elems, 33); FREE(payment_point_arg);
- LDKPublicKey delayed_payment_basepoint_arg_ref;
- CHECK(delayed_payment_basepoint_arg->arr_len == 33);
- memcpy(delayed_payment_basepoint_arg_ref.compressed_form, delayed_payment_basepoint_arg->elems, 33); FREE(delayed_payment_basepoint_arg);
- LDKPublicKey htlc_basepoint_arg_ref;
- CHECK(htlc_basepoint_arg->arr_len == 33);
- memcpy(htlc_basepoint_arg_ref.compressed_form, htlc_basepoint_arg->elems, 33); FREE(htlc_basepoint_arg);
- LDKChannelPublicKeys ret_var = ChannelPublicKeys_new(funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref);
+ LDKDelayedPaymentBasepoint delayed_payment_basepoint_arg_conv;
+ delayed_payment_basepoint_arg_conv.inner = untag_ptr(delayed_payment_basepoint_arg);
+ delayed_payment_basepoint_arg_conv.is_owned = ptr_is_owned(delayed_payment_basepoint_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(delayed_payment_basepoint_arg_conv);
+ delayed_payment_basepoint_arg_conv = DelayedPaymentBasepoint_clone(&delayed_payment_basepoint_arg_conv);
+ LDKHtlcBasepoint htlc_basepoint_arg_conv;
+ htlc_basepoint_arg_conv.inner = untag_ptr(htlc_basepoint_arg);
+ htlc_basepoint_arg_conv.is_owned = ptr_is_owned(htlc_basepoint_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_basepoint_arg_conv);
+ htlc_basepoint_arg_conv = HtlcBasepoint_clone(&htlc_basepoint_arg_conv);
+ LDKChannelPublicKeys ret_var = ChannelPublicKeys_new(funding_pubkey_arg_ref, revocation_basepoint_arg_conv, payment_point_arg_ref, delayed_payment_basepoint_arg_conv, htlc_basepoint_arg_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_TxCreationKeys_derive_new"))) TS_TxCreationKeys_derive_new(int8_tArray per_commitment_point, int8_tArray broadcaster_delayed_payment_base, int8_tArray broadcaster_htlc_base, int8_tArray countersignatory_revocation_base, int8_tArray countersignatory_htlc_base) {
+uint64_t __attribute__((export_name("TS_TxCreationKeys_derive_new"))) TS_TxCreationKeys_derive_new(int8_tArray per_commitment_point, uint64_t broadcaster_delayed_payment_base, uint64_t broadcaster_htlc_base, uint64_t countersignatory_revocation_base, uint64_t countersignatory_htlc_base) {
LDKPublicKey per_commitment_point_ref;
CHECK(per_commitment_point->arr_len == 33);
memcpy(per_commitment_point_ref.compressed_form, per_commitment_point->elems, 33); FREE(per_commitment_point);
- LDKPublicKey broadcaster_delayed_payment_base_ref;
- CHECK(broadcaster_delayed_payment_base->arr_len == 33);
- memcpy(broadcaster_delayed_payment_base_ref.compressed_form, broadcaster_delayed_payment_base->elems, 33); FREE(broadcaster_delayed_payment_base);
- LDKPublicKey broadcaster_htlc_base_ref;
- CHECK(broadcaster_htlc_base->arr_len == 33);
- memcpy(broadcaster_htlc_base_ref.compressed_form, broadcaster_htlc_base->elems, 33); FREE(broadcaster_htlc_base);
- LDKPublicKey countersignatory_revocation_base_ref;
- CHECK(countersignatory_revocation_base->arr_len == 33);
- memcpy(countersignatory_revocation_base_ref.compressed_form, countersignatory_revocation_base->elems, 33); FREE(countersignatory_revocation_base);
- LDKPublicKey countersignatory_htlc_base_ref;
- CHECK(countersignatory_htlc_base->arr_len == 33);
- memcpy(countersignatory_htlc_base_ref.compressed_form, countersignatory_htlc_base->elems, 33); FREE(countersignatory_htlc_base);
- LDKTxCreationKeys ret_var = TxCreationKeys_derive_new(per_commitment_point_ref, broadcaster_delayed_payment_base_ref, broadcaster_htlc_base_ref, countersignatory_revocation_base_ref, countersignatory_htlc_base_ref);
+ LDKDelayedPaymentBasepoint broadcaster_delayed_payment_base_conv;
+ broadcaster_delayed_payment_base_conv.inner = untag_ptr(broadcaster_delayed_payment_base);
+ broadcaster_delayed_payment_base_conv.is_owned = ptr_is_owned(broadcaster_delayed_payment_base);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(broadcaster_delayed_payment_base_conv);
+ broadcaster_delayed_payment_base_conv.is_owned = false;
+ LDKHtlcBasepoint broadcaster_htlc_base_conv;
+ broadcaster_htlc_base_conv.inner = untag_ptr(broadcaster_htlc_base);
+ broadcaster_htlc_base_conv.is_owned = ptr_is_owned(broadcaster_htlc_base);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(broadcaster_htlc_base_conv);
+ broadcaster_htlc_base_conv.is_owned = false;
+ LDKRevocationBasepoint countersignatory_revocation_base_conv;
+ countersignatory_revocation_base_conv.inner = untag_ptr(countersignatory_revocation_base);
+ countersignatory_revocation_base_conv.is_owned = ptr_is_owned(countersignatory_revocation_base);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(countersignatory_revocation_base_conv);
+ countersignatory_revocation_base_conv.is_owned = false;
+ LDKHtlcBasepoint countersignatory_htlc_base_conv;
+ countersignatory_htlc_base_conv.inner = untag_ptr(countersignatory_htlc_base);
+ countersignatory_htlc_base_conv.is_owned = ptr_is_owned(countersignatory_htlc_base);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(countersignatory_htlc_base_conv);
+ countersignatory_htlc_base_conv.is_owned = false;
+ LDKTxCreationKeys ret_var = TxCreationKeys_derive_new(per_commitment_point_ref, &broadcaster_delayed_payment_base_conv, &broadcaster_htlc_base_conv, &countersignatory_revocation_base_conv, &countersignatory_htlc_base_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int8_tArray __attribute__((export_name("TS_get_revokeable_redeemscript"))) TS_get_revokeable_redeemscript(int8_tArray revocation_key, int16_t contest_delay, int8_tArray broadcaster_delayed_payment_key) {
- LDKPublicKey revocation_key_ref;
- CHECK(revocation_key->arr_len == 33);
- memcpy(revocation_key_ref.compressed_form, revocation_key->elems, 33); FREE(revocation_key);
- LDKPublicKey broadcaster_delayed_payment_key_ref;
- CHECK(broadcaster_delayed_payment_key->arr_len == 33);
- memcpy(broadcaster_delayed_payment_key_ref.compressed_form, broadcaster_delayed_payment_key->elems, 33); FREE(broadcaster_delayed_payment_key);
- LDKCVec_u8Z ret_var = get_revokeable_redeemscript(revocation_key_ref, contest_delay, broadcaster_delayed_payment_key_ref);
+int8_tArray __attribute__((export_name("TS_get_revokeable_redeemscript"))) TS_get_revokeable_redeemscript(uint64_t revocation_key, int16_t contest_delay, uint64_t broadcaster_delayed_payment_key) {
+ LDKRevocationKey revocation_key_conv;
+ revocation_key_conv.inner = untag_ptr(revocation_key);
+ revocation_key_conv.is_owned = ptr_is_owned(revocation_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(revocation_key_conv);
+ revocation_key_conv.is_owned = false;
+ LDKDelayedPaymentKey broadcaster_delayed_payment_key_conv;
+ broadcaster_delayed_payment_key_conv.inner = untag_ptr(broadcaster_delayed_payment_key);
+ broadcaster_delayed_payment_key_conv.is_owned = ptr_is_owned(broadcaster_delayed_payment_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(broadcaster_delayed_payment_key_conv);
+ broadcaster_delayed_payment_key_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = get_revokeable_redeemscript(&revocation_key_conv, contest_delay, &broadcaster_delayed_payment_key_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
CVec_u8Z_free(ret_var);
return ret_arr;
}
-int8_tArray __attribute__((export_name("TS_build_htlc_transaction"))) TS_build_htlc_transaction(int8_tArray commitment_txid, int32_t feerate_per_kw, int16_t contest_delay, uint64_t htlc, uint64_t channel_type_features, int8_tArray broadcaster_delayed_payment_key, int8_tArray revocation_key) {
+int8_tArray __attribute__((export_name("TS_build_htlc_transaction"))) TS_build_htlc_transaction(int8_tArray commitment_txid, int32_t feerate_per_kw, int16_t contest_delay, uint64_t htlc, uint64_t channel_type_features, uint64_t broadcaster_delayed_payment_key, uint64_t revocation_key) {
uint8_t commitment_txid_arr[32];
CHECK(commitment_txid->arr_len == 32);
memcpy(commitment_txid_arr, commitment_txid->elems, 32); FREE(commitment_txid);
channel_type_features_conv.is_owned = ptr_is_owned(channel_type_features);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_features_conv);
channel_type_features_conv.is_owned = false;
- LDKPublicKey broadcaster_delayed_payment_key_ref;
- CHECK(broadcaster_delayed_payment_key->arr_len == 33);
- memcpy(broadcaster_delayed_payment_key_ref.compressed_form, broadcaster_delayed_payment_key->elems, 33); FREE(broadcaster_delayed_payment_key);
- LDKPublicKey revocation_key_ref;
- CHECK(revocation_key->arr_len == 33);
- memcpy(revocation_key_ref.compressed_form, revocation_key->elems, 33); FREE(revocation_key);
- LDKTransaction ret_var = build_htlc_transaction(commitment_txid_ref, feerate_per_kw, contest_delay, &htlc_conv, &channel_type_features_conv, broadcaster_delayed_payment_key_ref, revocation_key_ref);
+ LDKDelayedPaymentKey broadcaster_delayed_payment_key_conv;
+ broadcaster_delayed_payment_key_conv.inner = untag_ptr(broadcaster_delayed_payment_key);
+ broadcaster_delayed_payment_key_conv.is_owned = ptr_is_owned(broadcaster_delayed_payment_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(broadcaster_delayed_payment_key_conv);
+ broadcaster_delayed_payment_key_conv.is_owned = false;
+ LDKRevocationKey revocation_key_conv;
+ revocation_key_conv.inner = untag_ptr(revocation_key);
+ revocation_key_conv.is_owned = ptr_is_owned(revocation_key);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(revocation_key_conv);
+ revocation_key_conv.is_owned = false;
+ LDKTransaction ret_var = build_htlc_transaction(commitment_txid_ref, feerate_per_kw, contest_delay, &htlc_conv, &channel_type_features_conv, &broadcaster_delayed_payment_key_conv, &revocation_key_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
Transaction_free(ret_var);
return ret_conv;
}
+int8_tArray __attribute__((export_name("TS_CommitmentTransaction_per_commitment_point"))) TS_CommitmentTransaction_per_commitment_point(uint64_t this_arg) {
+ LDKCommitmentTransaction this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, CommitmentTransaction_per_commitment_point(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
+}
+
int64_t __attribute__((export_name("TS_CommitmentTransaction_to_broadcaster_value_sat"))) TS_CommitmentTransaction_to_broadcaster_value_sat(uint64_t this_arg) {
LDKCommitmentTransaction this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_InitFeatures_hash"))) TS_InitFeatures_hash(uint64_t o) {
+ LDKInitFeatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = InitFeatures_hash(&o_conv);
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_NodeFeatures_hash"))) TS_NodeFeatures_hash(uint64_t o) {
+ LDKNodeFeatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = NodeFeatures_hash(&o_conv);
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_ChannelFeatures_hash"))) TS_ChannelFeatures_hash(uint64_t o) {
+ LDKChannelFeatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ChannelFeatures_hash(&o_conv);
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_Bolt11InvoiceFeatures_hash"))) TS_Bolt11InvoiceFeatures_hash(uint64_t o) {
+ LDKBolt11InvoiceFeatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Bolt11InvoiceFeatures_hash(&o_conv);
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_OfferFeatures_hash"))) TS_OfferFeatures_hash(uint64_t o) {
+ LDKOfferFeatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = OfferFeatures_hash(&o_conv);
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_InvoiceRequestFeatures_hash"))) TS_InvoiceRequestFeatures_hash(uint64_t o) {
+ LDKInvoiceRequestFeatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = InvoiceRequestFeatures_hash(&o_conv);
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_Bolt12InvoiceFeatures_hash"))) TS_Bolt12InvoiceFeatures_hash(uint64_t o) {
+ LDKBolt12InvoiceFeatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Bolt12InvoiceFeatures_hash(&o_conv);
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_BlindedHopFeatures_hash"))) TS_BlindedHopFeatures_hash(uint64_t o) {
+ LDKBlindedHopFeatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = BlindedHopFeatures_hash(&o_conv);
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_ChannelTypeFeatures_hash"))) TS_ChannelTypeFeatures_hash(uint64_t o) {
+ LDKChannelTypeFeatures o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = ChannelTypeFeatures_hash(&o_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_InitFeatures_free"))) TS_InitFeatures_free(uint64_t this_obj) {
LDKInitFeatures this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_conv;
}
+void __attribute__((export_name("TS_InitFeatures_set_route_blinding_optional"))) TS_InitFeatures_set_route_blinding_optional(uint64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ InitFeatures_set_route_blinding_optional(&this_arg_conv);
+}
+
+void __attribute__((export_name("TS_InitFeatures_set_route_blinding_required"))) TS_InitFeatures_set_route_blinding_required(uint64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ InitFeatures_set_route_blinding_required(&this_arg_conv);
+}
+
+jboolean __attribute__((export_name("TS_InitFeatures_supports_route_blinding"))) TS_InitFeatures_supports_route_blinding(uint64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = InitFeatures_supports_route_blinding(&this_arg_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_NodeFeatures_set_route_blinding_optional"))) TS_NodeFeatures_set_route_blinding_optional(uint64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ NodeFeatures_set_route_blinding_optional(&this_arg_conv);
+}
+
+void __attribute__((export_name("TS_NodeFeatures_set_route_blinding_required"))) TS_NodeFeatures_set_route_blinding_required(uint64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ NodeFeatures_set_route_blinding_required(&this_arg_conv);
+}
+
+jboolean __attribute__((export_name("TS_NodeFeatures_supports_route_blinding"))) TS_NodeFeatures_supports_route_blinding(uint64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = NodeFeatures_supports_route_blinding(&this_arg_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_InitFeatures_requires_route_blinding"))) TS_InitFeatures_requires_route_blinding(uint64_t this_arg) {
+ LDKInitFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = InitFeatures_requires_route_blinding(&this_arg_conv);
+ return ret_conv;
+}
+
+jboolean __attribute__((export_name("TS_NodeFeatures_requires_route_blinding"))) TS_NodeFeatures_requires_route_blinding(uint64_t this_arg) {
+ LDKNodeFeatures this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = NodeFeatures_requires_route_blinding(&this_arg_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_InitFeatures_set_shutdown_any_segwit_optional"))) TS_InitFeatures_set_shutdown_any_segwit_optional(uint64_t this_arg) {
LDKInitFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKu8slice ret_var = InvalidShutdownScript_get_script(&this_ptr_conv);
+ LDKCVec_u8Z ret_var = InvalidShutdownScript_get_script(&this_ptr_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
return ret_arr;
}
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ShutdownScript_new_witness_program"))) TS_ShutdownScript_new_witness_program(int8_t version, int8_tArray program) {
-
- LDKu8slice program_ref;
- program_ref.datalen = program->arr_len;
- program_ref.data = program->elems;
+uint64_t __attribute__((export_name("TS_ShutdownScript_new_witness_program"))) TS_ShutdownScript_new_witness_program(uint64_t witness_program) {
+ void* witness_program_ptr = untag_ptr(witness_program);
+ CHECK_ACCESS(witness_program_ptr);
+ LDKWitnessProgram witness_program_conv = *(LDKWitnessProgram*)(witness_program_ptr);
+ witness_program_conv = WitnessProgram_clone((LDKWitnessProgram*)untag_ptr(witness_program));
LDKCResult_ShutdownScriptInvalidShutdownScriptZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownScriptInvalidShutdownScriptZ), "LDKCResult_ShutdownScriptInvalidShutdownScriptZ");
- *ret_conv = ShutdownScript_new_witness_program((LDKWitnessVersion){ ._0 = version }, program_ref);
- FREE(program);
+ *ret_conv = ShutdownScript_new_witness_program(witness_program_conv);
return tag_ptr(ret_conv, true);
}
return ret_conv;
}
+jboolean __attribute__((export_name("TS_Offer_is_expired_no_std"))) TS_Offer_is_expired_no_std(uint64_t this_arg, int64_t duration_since_epoch) {
+ LDKOffer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = Offer_is_expired_no_std(&this_arg_conv, duration_since_epoch);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_Offer_is_valid_quantity"))) TS_Offer_is_valid_quantity(uint64_t this_arg, int64_t quantity) {
LDKOffer this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+uint64_t __attribute__((export_name("TS_InvoiceError_from_string"))) TS_InvoiceError_from_string(jstring s) {
+ LDKStr s_conv = str_ref_to_owned_c(s);
+ LDKInvoiceError ret_var = InvoiceError_from_string(s_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
int8_tArray __attribute__((export_name("TS_InvoiceError_write"))) TS_InvoiceError_write(uint64_t obj) {
LDKInvoiceError obj_conv;
obj_conv.inner = untag_ptr(obj);
TaggedHash_free(this_obj_conv);
}
+static inline uint64_t TaggedHash_clone_ptr(LDKTaggedHash *NONNULL_PTR arg) {
+ LDKTaggedHash ret_var = TaggedHash_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_TaggedHash_clone_ptr"))) TS_TaggedHash_clone_ptr(uint64_t arg) {
+ LDKTaggedHash arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = TaggedHash_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_TaggedHash_clone"))) TS_TaggedHash_clone(uint64_t orig) {
+ LDKTaggedHash orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKTaggedHash ret_var = TaggedHash_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+int8_tArray __attribute__((export_name("TS_TaggedHash_as_digest"))) TS_TaggedHash_as_digest(uint64_t this_arg) {
+ LDKTaggedHash this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *TaggedHash_as_digest(&this_arg_conv), 32);
+ return ret_arr;
+}
+
+jstring __attribute__((export_name("TS_TaggedHash_tag"))) TS_TaggedHash_tag(uint64_t this_arg) {
+ LDKTaggedHash this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKStr ret_str = TaggedHash_tag(&this_arg_conv);
+ jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
+int8_tArray __attribute__((export_name("TS_TaggedHash_merkle_root"))) TS_TaggedHash_merkle_root(uint64_t this_arg) {
+ LDKTaggedHash this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, TaggedHash_merkle_root(&this_arg_conv).data, 32);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_Bolt12ParseError_free"))) TS_Bolt12ParseError_free(uint64_t this_obj) {
LDKBolt12ParseError this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_conv;
}
+uint32_t __attribute__((export_name("TS_Bolt12SemanticError_duplicate_payment_id"))) TS_Bolt12SemanticError_duplicate_payment_id() {
+ uint32_t ret_conv = LDKBolt12SemanticError_to_js(Bolt12SemanticError_duplicate_payment_id());
+ return ret_conv;
+}
+
uint32_t __attribute__((export_name("TS_Bolt12SemanticError_missing_paths"))) TS_Bolt12SemanticError_missing_paths() {
uint32_t ret_conv = LDKBolt12SemanticError_to_js(Bolt12SemanticError_missing_paths());
return ret_conv;
return ret_ref;
}
+jboolean __attribute__((export_name("TS_Refund_is_expired_no_std"))) TS_Refund_is_expired_no_std(uint64_t this_arg, int64_t duration_since_epoch) {
+ LDKRefund this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ jboolean ret_conv = Refund_is_expired_no_std(&this_arg_conv, duration_since_epoch);
+ return ret_conv;
+}
+
uint64_t __attribute__((export_name("TS_Refund_issuer"))) TS_Refund_issuer(uint64_t this_arg) {
LDKRefund this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_arr;
}
+int8_tArray __attribute__((export_name("TS_NodeId_as_array"))) TS_NodeId_as_array(uint64_t this_arg) {
+ LDKNodeId this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, *NodeId_as_array(&this_arg_conv), 33);
+ return ret_arr;
+}
+
uint64_t __attribute__((export_name("TS_NodeId_as_pubkey"))) TS_NodeId_as_pubkey(uint64_t this_arg) {
LDKNodeId this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
NetworkGraph_handle_network_update(&this_arg_conv, network_update_conv);
}
-int8_tArray __attribute__((export_name("TS_NetworkGraph_get_genesis_hash"))) TS_NetworkGraph_get_genesis_hash(uint64_t this_arg) {
+int8_tArray __attribute__((export_name("TS_NetworkGraph_get_chain_hash"))) TS_NetworkGraph_get_chain_hash(uint64_t this_arg) {
LDKNetworkGraph this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, NetworkGraph_get_genesis_hash(&this_arg_conv).data, 32);
+ memcpy(ret_arr->elems, NetworkGraph_get_chain_hash(&this_arg_conv).data, 32);
return ret_arr;
}
return ret_ref;
}
-int64_t __attribute__((export_name("TS_DirectedChannelInfo_htlc_maximum_msat"))) TS_DirectedChannelInfo_htlc_maximum_msat(uint64_t this_arg) {
- LDKDirectedChannelInfo this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- int64_t ret_conv = DirectedChannelInfo_htlc_maximum_msat(&this_arg_conv);
- return ret_conv;
-}
-
uint64_t __attribute__((export_name("TS_DirectedChannelInfo_effective_capacity"))) TS_DirectedChannelInfo_effective_capacity(uint64_t this_arg) {
LDKDirectedChannelInfo this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_NodeAlias_hash"))) TS_NodeAlias_hash(uint64_t o) {
+ LDKNodeAlias o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = NodeAlias_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_NodeAlias_eq"))) TS_NodeAlias_eq(uint64_t a, uint64_t b) {
LDKNodeAlias a_conv;
a_conv.inner = untag_ptr(a);
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_NetworkGraph_verify_channel_update"))) TS_NetworkGraph_verify_channel_update(uint64_t this_arg, uint64_t msg) {
+ LDKNetworkGraph this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKChannelUpdate msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv.is_owned = false;
+ LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+ *ret_conv = NetworkGraph_verify_channel_update(&this_arg_conv, &msg_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_ReadOnlyNetworkGraph_channel"))) TS_ReadOnlyNetworkGraph_channel(uint64_t this_arg, int64_t short_channel_id) {
LDKReadOnlyNetworkGraph this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
DefaultRouter_free(this_obj_conv);
}
-uint64_t __attribute__((export_name("TS_DefaultRouter_new"))) TS_DefaultRouter_new(uint64_t network_graph, uint64_t logger, int8_tArray random_seed_bytes, uint64_t scorer, uint64_t score_params) {
+uint64_t __attribute__((export_name("TS_DefaultRouter_new"))) TS_DefaultRouter_new(uint64_t network_graph, uint64_t logger, uint64_t entropy_source, uint64_t scorer, uint64_t score_params) {
LDKNetworkGraph network_graph_conv;
network_graph_conv.inner = untag_ptr(network_graph);
network_graph_conv.is_owned = ptr_is_owned(network_graph);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKLogger_JCalls_cloned(&logger_conv);
}
- LDKThirtyTwoBytes random_seed_bytes_ref;
- CHECK(random_seed_bytes->arr_len == 32);
- memcpy(random_seed_bytes_ref.data, random_seed_bytes->elems, 32); FREE(random_seed_bytes);
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
void* scorer_ptr = untag_ptr(scorer);
CHECK_ACCESS(scorer_ptr);
LDKLockableScore scorer_conv = *(LDKLockableScore*)(scorer_ptr);
score_params_conv.is_owned = ptr_is_owned(score_params);
CHECK_INNER_FIELD_ACCESS_OR_NULL(score_params_conv);
score_params_conv = ProbabilisticScoringFeeParameters_clone(&score_params_conv);
- LDKDefaultRouter ret_var = DefaultRouter_new(&network_graph_conv, logger_conv, random_seed_bytes_ref, scorer_conv, score_params_conv);
+ LDKDefaultRouter ret_var = DefaultRouter_new(&network_graph_conv, logger_conv, entropy_source_conv, scorer_conv, score_params_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return tag_ptr(ret_ret, true);
}
+uint64_t __attribute__((export_name("TS_DefaultRouter_as_MessageRouter"))) TS_DefaultRouter_as_MessageRouter(uint64_t this_arg) {
+ LDKDefaultRouter this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKMessageRouter* ret_ret = MALLOC(sizeof(LDKMessageRouter), "LDKMessageRouter");
+ *ret_ret = DefaultRouter_as_MessageRouter(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
void __attribute__((export_name("TS_Router_free"))) TS_Router_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
PaymentParameters_set_previously_failed_channels(&this_ptr_conv, val_constr);
}
-uint64_t __attribute__((export_name("TS_PaymentParameters_new"))) TS_PaymentParameters_new(uint64_t payee_arg, uint64_t expiry_time_arg, int32_t max_total_cltv_expiry_delta_arg, int8_t max_path_count_arg, int8_t max_channel_saturation_power_of_half_arg, int64_tArray previously_failed_channels_arg) {
+int64_tArray __attribute__((export_name("TS_PaymentParameters_get_previously_failed_blinded_path_idxs"))) TS_PaymentParameters_get_previously_failed_blinded_path_idxs(uint64_t this_ptr) {
+ LDKPaymentParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u64Z ret_var = PaymentParameters_get_previously_failed_blinded_path_idxs(&this_ptr_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t i = 0; i < ret_var.datalen; i++) {
+ int64_t ret_conv_8_conv = ret_var.data[i];
+ ret_arr_ptr[i] = ret_conv_8_conv;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_PaymentParameters_set_previously_failed_blinded_path_idxs"))) TS_PaymentParameters_set_previously_failed_blinded_path_idxs(uint64_t this_ptr, int64_tArray val) {
+ LDKPaymentParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCVec_u64Z val_constr;
+ val_constr.datalen = val->arr_len;
+ if (val_constr.datalen > 0)
+ val_constr.data = MALLOC(val_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
+ else
+ val_constr.data = NULL;
+ int64_t* val_vals = val->elems;
+ for (size_t i = 0; i < val_constr.datalen; i++) {
+ int64_t val_conv_8 = val_vals[i];
+ val_constr.data[i] = val_conv_8;
+ }
+ FREE(val);
+ PaymentParameters_set_previously_failed_blinded_path_idxs(&this_ptr_conv, val_constr);
+}
+
+uint64_t __attribute__((export_name("TS_PaymentParameters_new"))) TS_PaymentParameters_new(uint64_t payee_arg, uint64_t expiry_time_arg, int32_t max_total_cltv_expiry_delta_arg, int8_t max_path_count_arg, int8_t max_channel_saturation_power_of_half_arg, int64_tArray previously_failed_channels_arg, int64_tArray previously_failed_blinded_path_idxs_arg) {
void* payee_arg_ptr = untag_ptr(payee_arg);
CHECK_ACCESS(payee_arg_ptr);
LDKPayee payee_arg_conv = *(LDKPayee*)(payee_arg_ptr);
previously_failed_channels_arg_constr.data[i] = previously_failed_channels_arg_conv_8;
}
FREE(previously_failed_channels_arg);
- LDKPaymentParameters ret_var = PaymentParameters_new(payee_arg_conv, expiry_time_arg_conv, max_total_cltv_expiry_delta_arg, max_path_count_arg, max_channel_saturation_power_of_half_arg, previously_failed_channels_arg_constr);
+ LDKCVec_u64Z previously_failed_blinded_path_idxs_arg_constr;
+ previously_failed_blinded_path_idxs_arg_constr.datalen = previously_failed_blinded_path_idxs_arg->arr_len;
+ if (previously_failed_blinded_path_idxs_arg_constr.datalen > 0)
+ previously_failed_blinded_path_idxs_arg_constr.data = MALLOC(previously_failed_blinded_path_idxs_arg_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
+ else
+ previously_failed_blinded_path_idxs_arg_constr.data = NULL;
+ int64_t* previously_failed_blinded_path_idxs_arg_vals = previously_failed_blinded_path_idxs_arg->elems;
+ for (size_t i = 0; i < previously_failed_blinded_path_idxs_arg_constr.datalen; i++) {
+ int64_t previously_failed_blinded_path_idxs_arg_conv_8 = previously_failed_blinded_path_idxs_arg_vals[i];
+ previously_failed_blinded_path_idxs_arg_constr.data[i] = previously_failed_blinded_path_idxs_arg_conv_8;
+ }
+ FREE(previously_failed_blinded_path_idxs_arg);
+ LDKPaymentParameters ret_var = PaymentParameters_new(payee_arg_conv, expiry_time_arg_conv, max_total_cltv_expiry_delta_arg, max_path_count_arg, max_channel_saturation_power_of_half_arg, previously_failed_channels_arg_constr, previously_failed_blinded_path_idxs_arg_constr);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return tag_ptr(ret_conv, true);
}
+void __attribute__((export_name("TS_FirstHopCandidate_free"))) TS_FirstHopCandidate_free(uint64_t this_obj) {
+ LDKFirstHopCandidate this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ FirstHopCandidate_free(this_obj_conv);
+}
+
+static inline uint64_t FirstHopCandidate_clone_ptr(LDKFirstHopCandidate *NONNULL_PTR arg) {
+ LDKFirstHopCandidate ret_var = FirstHopCandidate_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_FirstHopCandidate_clone_ptr"))) TS_FirstHopCandidate_clone_ptr(uint64_t arg) {
+ LDKFirstHopCandidate arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = FirstHopCandidate_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_FirstHopCandidate_clone"))) TS_FirstHopCandidate_clone(uint64_t orig) {
+ LDKFirstHopCandidate orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKFirstHopCandidate ret_var = FirstHopCandidate_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_PublicHopCandidate_free"))) TS_PublicHopCandidate_free(uint64_t this_obj) {
+ LDKPublicHopCandidate this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ PublicHopCandidate_free(this_obj_conv);
+}
+
+int64_t __attribute__((export_name("TS_PublicHopCandidate_get_short_channel_id"))) TS_PublicHopCandidate_get_short_channel_id(uint64_t this_ptr) {
+ LDKPublicHopCandidate this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = PublicHopCandidate_get_short_channel_id(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_PublicHopCandidate_set_short_channel_id"))) TS_PublicHopCandidate_set_short_channel_id(uint64_t this_ptr, int64_t val) {
+ LDKPublicHopCandidate this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ PublicHopCandidate_set_short_channel_id(&this_ptr_conv, val);
+}
+
+static inline uint64_t PublicHopCandidate_clone_ptr(LDKPublicHopCandidate *NONNULL_PTR arg) {
+ LDKPublicHopCandidate ret_var = PublicHopCandidate_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_PublicHopCandidate_clone_ptr"))) TS_PublicHopCandidate_clone_ptr(uint64_t arg) {
+ LDKPublicHopCandidate arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = PublicHopCandidate_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_PublicHopCandidate_clone"))) TS_PublicHopCandidate_clone(uint64_t orig) {
+ LDKPublicHopCandidate orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKPublicHopCandidate ret_var = PublicHopCandidate_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_PrivateHopCandidate_free"))) TS_PrivateHopCandidate_free(uint64_t this_obj) {
+ LDKPrivateHopCandidate this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ PrivateHopCandidate_free(this_obj_conv);
+}
+
+static inline uint64_t PrivateHopCandidate_clone_ptr(LDKPrivateHopCandidate *NONNULL_PTR arg) {
+ LDKPrivateHopCandidate ret_var = PrivateHopCandidate_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_PrivateHopCandidate_clone_ptr"))) TS_PrivateHopCandidate_clone_ptr(uint64_t arg) {
+ LDKPrivateHopCandidate arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = PrivateHopCandidate_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_PrivateHopCandidate_clone"))) TS_PrivateHopCandidate_clone(uint64_t orig) {
+ LDKPrivateHopCandidate orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKPrivateHopCandidate ret_var = PrivateHopCandidate_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_BlindedPathCandidate_free"))) TS_BlindedPathCandidate_free(uint64_t this_obj) {
+ LDKBlindedPathCandidate this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ BlindedPathCandidate_free(this_obj_conv);
+}
+
+static inline uint64_t BlindedPathCandidate_clone_ptr(LDKBlindedPathCandidate *NONNULL_PTR arg) {
+ LDKBlindedPathCandidate ret_var = BlindedPathCandidate_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_BlindedPathCandidate_clone_ptr"))) TS_BlindedPathCandidate_clone_ptr(uint64_t arg) {
+ LDKBlindedPathCandidate arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = BlindedPathCandidate_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_BlindedPathCandidate_clone"))) TS_BlindedPathCandidate_clone(uint64_t orig) {
+ LDKBlindedPathCandidate orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKBlindedPathCandidate ret_var = BlindedPathCandidate_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_OneHopBlindedPathCandidate_free"))) TS_OneHopBlindedPathCandidate_free(uint64_t this_obj) {
+ LDKOneHopBlindedPathCandidate this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ OneHopBlindedPathCandidate_free(this_obj_conv);
+}
+
+static inline uint64_t OneHopBlindedPathCandidate_clone_ptr(LDKOneHopBlindedPathCandidate *NONNULL_PTR arg) {
+ LDKOneHopBlindedPathCandidate ret_var = OneHopBlindedPathCandidate_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_OneHopBlindedPathCandidate_clone_ptr"))) TS_OneHopBlindedPathCandidate_clone_ptr(uint64_t arg) {
+ LDKOneHopBlindedPathCandidate arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = OneHopBlindedPathCandidate_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_OneHopBlindedPathCandidate_clone"))) TS_OneHopBlindedPathCandidate_clone(uint64_t orig) {
+ LDKOneHopBlindedPathCandidate orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKOneHopBlindedPathCandidate ret_var = OneHopBlindedPathCandidate_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_CandidateRouteHop_free"))) TS_CandidateRouteHop_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKCandidateRouteHop this_ptr_conv = *(LDKCandidateRouteHop*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ CandidateRouteHop_free(this_ptr_conv);
+}
+
+static inline uint64_t CandidateRouteHop_clone_ptr(LDKCandidateRouteHop *NONNULL_PTR arg) {
+ LDKCandidateRouteHop *ret_copy = MALLOC(sizeof(LDKCandidateRouteHop), "LDKCandidateRouteHop");
+ *ret_copy = CandidateRouteHop_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_CandidateRouteHop_clone_ptr"))) TS_CandidateRouteHop_clone_ptr(uint64_t arg) {
+ LDKCandidateRouteHop* arg_conv = (LDKCandidateRouteHop*)untag_ptr(arg);
+ int64_t ret_conv = CandidateRouteHop_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_clone"))) TS_CandidateRouteHop_clone(uint64_t orig) {
+ LDKCandidateRouteHop* orig_conv = (LDKCandidateRouteHop*)untag_ptr(orig);
+ LDKCandidateRouteHop *ret_copy = MALLOC(sizeof(LDKCandidateRouteHop), "LDKCandidateRouteHop");
+ *ret_copy = CandidateRouteHop_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_first_hop"))) TS_CandidateRouteHop_first_hop(uint64_t a) {
+ LDKFirstHopCandidate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = FirstHopCandidate_clone(&a_conv);
+ LDKCandidateRouteHop *ret_copy = MALLOC(sizeof(LDKCandidateRouteHop), "LDKCandidateRouteHop");
+ *ret_copy = CandidateRouteHop_first_hop(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_public_hop"))) TS_CandidateRouteHop_public_hop(uint64_t a) {
+ LDKPublicHopCandidate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = PublicHopCandidate_clone(&a_conv);
+ LDKCandidateRouteHop *ret_copy = MALLOC(sizeof(LDKCandidateRouteHop), "LDKCandidateRouteHop");
+ *ret_copy = CandidateRouteHop_public_hop(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_private_hop"))) TS_CandidateRouteHop_private_hop(uint64_t a) {
+ LDKPrivateHopCandidate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = PrivateHopCandidate_clone(&a_conv);
+ LDKCandidateRouteHop *ret_copy = MALLOC(sizeof(LDKCandidateRouteHop), "LDKCandidateRouteHop");
+ *ret_copy = CandidateRouteHop_private_hop(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_blinded"))) TS_CandidateRouteHop_blinded(uint64_t a) {
+ LDKBlindedPathCandidate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = BlindedPathCandidate_clone(&a_conv);
+ LDKCandidateRouteHop *ret_copy = MALLOC(sizeof(LDKCandidateRouteHop), "LDKCandidateRouteHop");
+ *ret_copy = CandidateRouteHop_blinded(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_one_hop_blinded"))) TS_CandidateRouteHop_one_hop_blinded(uint64_t a) {
+ LDKOneHopBlindedPathCandidate a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = OneHopBlindedPathCandidate_clone(&a_conv);
+ LDKCandidateRouteHop *ret_copy = MALLOC(sizeof(LDKCandidateRouteHop), "LDKCandidateRouteHop");
+ *ret_copy = CandidateRouteHop_one_hop_blinded(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_globally_unique_short_channel_id"))) TS_CandidateRouteHop_globally_unique_short_channel_id(uint64_t this_arg) {
+ LDKCandidateRouteHop* this_arg_conv = (LDKCandidateRouteHop*)untag_ptr(this_arg);
+ LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+ *ret_copy = CandidateRouteHop_globally_unique_short_channel_id(this_arg_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int32_t __attribute__((export_name("TS_CandidateRouteHop_cltv_expiry_delta"))) TS_CandidateRouteHop_cltv_expiry_delta(uint64_t this_arg) {
+ LDKCandidateRouteHop* this_arg_conv = (LDKCandidateRouteHop*)untag_ptr(this_arg);
+ int32_t ret_conv = CandidateRouteHop_cltv_expiry_delta(this_arg_conv);
+ return ret_conv;
+}
+
+int64_t __attribute__((export_name("TS_CandidateRouteHop_htlc_minimum_msat"))) TS_CandidateRouteHop_htlc_minimum_msat(uint64_t this_arg) {
+ LDKCandidateRouteHop* this_arg_conv = (LDKCandidateRouteHop*)untag_ptr(this_arg);
+ int64_t ret_conv = CandidateRouteHop_htlc_minimum_msat(this_arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_fees"))) TS_CandidateRouteHop_fees(uint64_t this_arg) {
+ LDKCandidateRouteHop* this_arg_conv = (LDKCandidateRouteHop*)untag_ptr(this_arg);
+ LDKRoutingFees ret_var = CandidateRouteHop_fees(this_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_source"))) TS_CandidateRouteHop_source(uint64_t this_arg) {
+ LDKCandidateRouteHop* this_arg_conv = (LDKCandidateRouteHop*)untag_ptr(this_arg);
+ LDKNodeId ret_var = CandidateRouteHop_source(this_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_CandidateRouteHop_target"))) TS_CandidateRouteHop_target(uint64_t this_arg) {
+ LDKCandidateRouteHop* this_arg_conv = (LDKCandidateRouteHop*)untag_ptr(this_arg);
+ LDKNodeId ret_var = CandidateRouteHop_target(this_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
uint64_t __attribute__((export_name("TS_find_route"))) TS_find_route(int8_tArray our_node_pubkey, uint64_t route_params, uint64_t network_graph, uint64_tArray first_hops, uint64_t logger, uint64_t scorer, uint64_t score_params, int8_tArray random_seed_bytes) {
LDKPublicKey our_node_pubkey_ref;
CHECK(our_node_pubkey->arr_len == 33);
ProbabilisticScoringFeeParameters_set_base_penalty_amount_multiplier_msat(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat(uint64_t this_ptr) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_anti_probing_penalty_msat"))) TS_ProbabilisticScoringFeeParameters_get_anti_probing_penalty_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringFeeParameters_get_anti_probing_penalty_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_anti_probing_penalty_msat"))) TS_ProbabilisticScoringFeeParameters_set_anti_probing_penalty_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_set_anti_probing_penalty_msat(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_considered_impossible_penalty_msat"))) TS_ProbabilisticScoringFeeParameters_get_considered_impossible_penalty_msat(uint64_t this_ptr) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringFeeParameters_get_considered_impossible_penalty_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_considered_impossible_penalty_msat"))) TS_ProbabilisticScoringFeeParameters_set_considered_impossible_penalty_msat(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_set_considered_impossible_penalty_msat(&this_ptr_conv, val);
+}
+
+jboolean __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_linear_success_probability"))) TS_ProbabilisticScoringFeeParameters_get_linear_success_probability(uint64_t this_ptr) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ jboolean ret_conv = ProbabilisticScoringFeeParameters_get_linear_success_probability(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_linear_success_probability"))) TS_ProbabilisticScoringFeeParameters_set_linear_success_probability(uint64_t this_ptr, jboolean val) {
+ LDKProbabilisticScoringFeeParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_set_linear_success_probability(&this_ptr_conv, val);
+}
+
+static inline uint64_t ProbabilisticScoringFeeParameters_clone_ptr(LDKProbabilisticScoringFeeParameters *NONNULL_PTR arg) {
+ LDKProbabilisticScoringFeeParameters ret_var = ProbabilisticScoringFeeParameters_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_clone_ptr"))) TS_ProbabilisticScoringFeeParameters_clone_ptr(uint64_t arg) {
+ LDKProbabilisticScoringFeeParameters arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringFeeParameters_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_clone"))) TS_ProbabilisticScoringFeeParameters_clone(uint64_t orig) {
+ LDKProbabilisticScoringFeeParameters orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKProbabilisticScoringFeeParameters ret_var = ProbabilisticScoringFeeParameters_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_default"))) TS_ProbabilisticScoringFeeParameters_default() {
+ LDKProbabilisticScoringFeeParameters ret_var = ProbabilisticScoringFeeParameters_default();
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_add_banned"))) TS_ProbabilisticScoringFeeParameters_add_banned(uint64_t this_arg, uint64_t node_id) {
+ LDKProbabilisticScoringFeeParameters this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId node_id_conv;
+ node_id_conv.inner = untag_ptr(node_id);
+ node_id_conv.is_owned = ptr_is_owned(node_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_conv);
+ node_id_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_add_banned(&this_arg_conv, &node_id_conv);
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_add_banned_from_list"))) TS_ProbabilisticScoringFeeParameters_add_banned_from_list(uint64_t this_arg, uint64_tArray node_ids) {
+ LDKProbabilisticScoringFeeParameters this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_NodeIdZ node_ids_constr;
+ node_ids_constr.datalen = node_ids->arr_len;
+ if (node_ids_constr.datalen > 0)
+ node_ids_constr.data = MALLOC(node_ids_constr.datalen * sizeof(LDKNodeId), "LDKCVec_NodeIdZ Elements");
+ else
+ node_ids_constr.data = NULL;
+ uint64_t* node_ids_vals = node_ids->elems;
+ for (size_t i = 0; i < node_ids_constr.datalen; i++) {
+ uint64_t node_ids_conv_8 = node_ids_vals[i];
+ LDKNodeId node_ids_conv_8_conv;
+ node_ids_conv_8_conv.inner = untag_ptr(node_ids_conv_8);
+ node_ids_conv_8_conv.is_owned = ptr_is_owned(node_ids_conv_8);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(node_ids_conv_8_conv);
+ node_ids_conv_8_conv = NodeId_clone(&node_ids_conv_8_conv);
+ node_ids_constr.data[i] = node_ids_conv_8_conv;
+ }
+ FREE(node_ids);
+ ProbabilisticScoringFeeParameters_add_banned_from_list(&this_arg_conv, node_ids_constr);
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_remove_banned"))) TS_ProbabilisticScoringFeeParameters_remove_banned(uint64_t this_arg, uint64_t node_id) {
+ LDKProbabilisticScoringFeeParameters this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId node_id_conv;
+ node_id_conv.inner = untag_ptr(node_id);
+ node_id_conv.is_owned = ptr_is_owned(node_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_conv);
+ node_id_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_remove_banned(&this_arg_conv, &node_id_conv);
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_manual_penalty"))) TS_ProbabilisticScoringFeeParameters_set_manual_penalty(uint64_t this_arg, uint64_t node_id, int64_t penalty) {
+ LDKProbabilisticScoringFeeParameters this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId node_id_conv;
+ node_id_conv.inner = untag_ptr(node_id);
+ node_id_conv.is_owned = ptr_is_owned(node_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_conv);
+ node_id_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_set_manual_penalty(&this_arg_conv, &node_id_conv, penalty);
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_remove_manual_penalty"))) TS_ProbabilisticScoringFeeParameters_remove_manual_penalty(uint64_t this_arg, uint64_t node_id) {
+ LDKProbabilisticScoringFeeParameters this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId node_id_conv;
+ node_id_conv.inner = untag_ptr(node_id);
+ node_id_conv.is_owned = ptr_is_owned(node_id);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_conv);
+ node_id_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_remove_manual_penalty(&this_arg_conv, &node_id_conv);
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_clear_manual_penalties"))) TS_ProbabilisticScoringFeeParameters_clear_manual_penalties(uint64_t this_arg) {
+ LDKProbabilisticScoringFeeParameters this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ ProbabilisticScoringFeeParameters_clear_manual_penalties(&this_arg_conv);
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_free"))) TS_ProbabilisticScoringDecayParameters_free(uint64_t this_obj) {
+ LDKProbabilisticScoringDecayParameters this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ProbabilisticScoringDecayParameters_free(this_obj_conv);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_get_historical_no_updates_half_life"))) TS_ProbabilisticScoringDecayParameters_get_historical_no_updates_half_life(uint64_t this_ptr) {
+ LDKProbabilisticScoringDecayParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringDecayParameters_get_historical_no_updates_half_life(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_set_historical_no_updates_half_life"))) TS_ProbabilisticScoringDecayParameters_set_historical_no_updates_half_life(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringDecayParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringDecayParameters_set_historical_no_updates_half_life(&this_ptr_conv, val);
+}
+
+int64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_get_liquidity_offset_half_life"))) TS_ProbabilisticScoringDecayParameters_get_liquidity_offset_half_life(uint64_t this_ptr) {
+ LDKProbabilisticScoringDecayParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringDecayParameters_get_liquidity_offset_half_life(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_set_liquidity_offset_half_life"))) TS_ProbabilisticScoringDecayParameters_set_liquidity_offset_half_life(uint64_t this_ptr, int64_t val) {
+ LDKProbabilisticScoringDecayParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ProbabilisticScoringDecayParameters_set_liquidity_offset_half_life(&this_ptr_conv, val);
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_new"))) TS_ProbabilisticScoringDecayParameters_new(int64_t historical_no_updates_half_life_arg, int64_t liquidity_offset_half_life_arg) {
+ LDKProbabilisticScoringDecayParameters ret_var = ProbabilisticScoringDecayParameters_new(historical_no_updates_half_life_arg, liquidity_offset_half_life_arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+static inline uint64_t ProbabilisticScoringDecayParameters_clone_ptr(LDKProbabilisticScoringDecayParameters *NONNULL_PTR arg) {
+ LDKProbabilisticScoringDecayParameters ret_var = ProbabilisticScoringDecayParameters_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_clone_ptr"))) TS_ProbabilisticScoringDecayParameters_clone_ptr(uint64_t arg) {
+ LDKProbabilisticScoringDecayParameters arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = ProbabilisticScoringDecayParameters_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_clone"))) TS_ProbabilisticScoringDecayParameters_clone(uint64_t orig) {
+ LDKProbabilisticScoringDecayParameters orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKProbabilisticScoringDecayParameters ret_var = ProbabilisticScoringDecayParameters_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_default"))) TS_ProbabilisticScoringDecayParameters_default() {
+ LDKProbabilisticScoringDecayParameters ret_var = ProbabilisticScoringDecayParameters_default();
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScorer_new"))) TS_ProbabilisticScorer_new(uint64_t decay_params, uint64_t network_graph, uint64_t logger) {
+ LDKProbabilisticScoringDecayParameters decay_params_conv;
+ decay_params_conv.inner = untag_ptr(decay_params);
+ decay_params_conv.is_owned = ptr_is_owned(decay_params);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(decay_params_conv);
+ decay_params_conv = ProbabilisticScoringDecayParameters_clone(&decay_params_conv);
+ LDKNetworkGraph network_graph_conv;
+ network_graph_conv.inner = untag_ptr(network_graph);
+ network_graph_conv.is_owned = ptr_is_owned(network_graph);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ network_graph_conv.is_owned = false;
+ void* logger_ptr = untag_ptr(logger);
+ CHECK_ACCESS(logger_ptr);
+ LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+ if (logger_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&logger_conv);
+ }
+ LDKProbabilisticScorer ret_var = ProbabilisticScorer_new(decay_params_conv, &network_graph_conv, logger_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_ProbabilisticScorer_debug_log_liquidity_stats"))) TS_ProbabilisticScorer_debug_log_liquidity_stats(uint64_t this_arg) {
+ LDKProbabilisticScorer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ ProbabilisticScorer_debug_log_liquidity_stats(&this_arg_conv);
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScorer_estimated_channel_liquidity_range"))) TS_ProbabilisticScorer_estimated_channel_liquidity_range(uint64_t this_arg, int64_t scid, uint64_t target) {
+ LDKProbabilisticScorer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId target_conv;
+ target_conv.inner = untag_ptr(target);
+ target_conv.is_owned = ptr_is_owned(target);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(target_conv);
+ target_conv.is_owned = false;
+ LDKCOption_C2Tuple_u64u64ZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_u64u64ZZ), "LDKCOption_C2Tuple_u64u64ZZ");
+ *ret_copy = ProbabilisticScorer_estimated_channel_liquidity_range(&this_arg_conv, scid, &target_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities"))) TS_ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(uint64_t this_arg, int64_t scid, uint64_t target) {
+ LDKProbabilisticScorer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId target_conv;
+ target_conv.inner = untag_ptr(target);
+ target_conv.is_owned = ptr_is_owned(target);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(target_conv);
+ target_conv.is_owned = false;
+ LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ), "LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ");
+ *ret_copy = ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(&this_arg_conv, scid, &target_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScorer_historical_estimated_payment_success_probability"))) TS_ProbabilisticScorer_historical_estimated_payment_success_probability(uint64_t this_arg, int64_t scid, uint64_t target, int64_t amount_msat, uint64_t params) {
+ LDKProbabilisticScorer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKNodeId target_conv;
+ target_conv.inner = untag_ptr(target);
+ target_conv.is_owned = ptr_is_owned(target);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(target_conv);
+ target_conv.is_owned = false;
+ LDKProbabilisticScoringFeeParameters params_conv;
+ params_conv.inner = untag_ptr(params);
+ params_conv.is_owned = ptr_is_owned(params);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
+ params_conv.is_owned = false;
+ LDKCOption_f64Z *ret_copy = MALLOC(sizeof(LDKCOption_f64Z), "LDKCOption_f64Z");
+ *ret_copy = ProbabilisticScorer_historical_estimated_payment_success_probability(&this_arg_conv, scid, &target_conv, amount_msat, ¶ms_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScorer_as_ScoreLookUp"))) TS_ProbabilisticScorer_as_ScoreLookUp(uint64_t this_arg) {
+ LDKProbabilisticScorer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKScoreLookUp* ret_ret = MALLOC(sizeof(LDKScoreLookUp), "LDKScoreLookUp");
+ *ret_ret = ProbabilisticScorer_as_ScoreLookUp(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScorer_as_ScoreUpdate"))) TS_ProbabilisticScorer_as_ScoreUpdate(uint64_t this_arg) {
+ LDKProbabilisticScorer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKScoreUpdate* ret_ret = MALLOC(sizeof(LDKScoreUpdate), "LDKScoreUpdate");
+ *ret_ret = ProbabilisticScorer_as_ScoreUpdate(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScorer_as_Score"))) TS_ProbabilisticScorer_as_Score(uint64_t this_arg) {
+ LDKProbabilisticScorer this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKScore* ret_ret = MALLOC(sizeof(LDKScore), "LDKScore");
+ *ret_ret = ProbabilisticScorer_as_Score(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+int8_tArray __attribute__((export_name("TS_ProbabilisticScorer_write"))) TS_ProbabilisticScorer_write(uint64_t obj) {
+ LDKProbabilisticScorer obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = ProbabilisticScorer_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+uint64_t __attribute__((export_name("TS_ProbabilisticScorer_read"))) TS_ProbabilisticScorer_read(int8_tArray ser, uint64_t arg_a, uint64_t arg_b, uint64_t arg_c) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKProbabilisticScoringDecayParameters arg_a_conv;
+ arg_a_conv.inner = untag_ptr(arg_a);
+ arg_a_conv.is_owned = ptr_is_owned(arg_a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_a_conv);
+ arg_a_conv = ProbabilisticScoringDecayParameters_clone(&arg_a_conv);
+ LDKNetworkGraph arg_b_conv;
+ arg_b_conv.inner = untag_ptr(arg_b);
+ arg_b_conv.is_owned = ptr_is_owned(arg_b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_b_conv);
+ arg_b_conv.is_owned = false;
+ void* arg_c_ptr = untag_ptr(arg_c);
+ CHECK_ACCESS(arg_c_ptr);
+ LDKLogger arg_c_conv = *(LDKLogger*)(arg_c_ptr);
+ if (arg_c_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&arg_c_conv);
+ }
+ LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
+ *ret_conv = ProbabilisticScorer_read(ser_ref, arg_a_conv, &arg_b_conv, arg_c_conv);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_free"))) TS_DelayedPaymentOutputDescriptor_free(uint64_t this_obj) {
+ LDKDelayedPaymentOutputDescriptor this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ DelayedPaymentOutputDescriptor_free(this_obj_conv);
+}
+
+uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_outpoint"))) TS_DelayedPaymentOutputDescriptor_get_outpoint(uint64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat(&this_ptr_conv);
- return ret_conv;
+ LDKOutPoint ret_var = DelayedPaymentOutputDescriptor_get_outpoint(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat(uint64_t this_ptr, int64_t val) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_outpoint"))) TS_DelayedPaymentOutputDescriptor_set_outpoint(uint64_t this_ptr, uint64_t val) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+ LDKOutPoint val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = OutPoint_clone(&val_conv);
+ DelayedPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_per_commitment_point"))) TS_DelayedPaymentOutputDescriptor_get_per_commitment_point(uint64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
- return ret_conv;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, DelayedPaymentOutputDescriptor_get_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+ return ret_arr;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr, int64_t val) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_per_commitment_point"))) TS_DelayedPaymentOutputDescriptor_set_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ DelayedPaymentOutputDescriptor_set_per_commitment_point(&this_ptr_conv, val_ref);
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+int16_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_to_self_delay"))) TS_DelayedPaymentOutputDescriptor_get_to_self_delay(uint64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv);
+ int16_t ret_conv = DelayedPaymentOutputDescriptor_get_to_self_delay(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr, int64_t val) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_to_self_delay"))) TS_DelayedPaymentOutputDescriptor_set_to_self_delay(uint64_t this_ptr, int16_t val) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+ DelayedPaymentOutputDescriptor_set_to_self_delay(&this_ptr_conv, val);
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_output"))) TS_DelayedPaymentOutputDescriptor_get_output(uint64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
- return ret_conv;
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = DelayedPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return tag_ptr(ret_ref, true);
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr, int64_t val) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_output"))) TS_DelayedPaymentOutputDescriptor_set_output(uint64_t this_ptr, uint64_t val) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKTxOut val_conv = *(LDKTxOut*)(val_ptr);
+ val_conv = TxOut_clone((LDKTxOut*)untag_ptr(val));
+ DelayedPaymentOutputDescriptor_set_output(&this_ptr_conv, val_conv);
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_anti_probing_penalty_msat"))) TS_ProbabilisticScoringFeeParameters_get_anti_probing_penalty_msat(uint64_t this_ptr) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_revocation_pubkey"))) TS_DelayedPaymentOutputDescriptor_get_revocation_pubkey(uint64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringFeeParameters_get_anti_probing_penalty_msat(&this_ptr_conv);
- return ret_conv;
+ LDKRevocationKey ret_var = DelayedPaymentOutputDescriptor_get_revocation_pubkey(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_anti_probing_penalty_msat"))) TS_ProbabilisticScoringFeeParameters_set_anti_probing_penalty_msat(uint64_t this_ptr, int64_t val) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_revocation_pubkey"))) TS_DelayedPaymentOutputDescriptor_set_revocation_pubkey(uint64_t this_ptr, uint64_t val) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_set_anti_probing_penalty_msat(&this_ptr_conv, val);
+ LDKRevocationKey val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = RevocationKey_clone(&val_conv);
+ DelayedPaymentOutputDescriptor_set_revocation_pubkey(&this_ptr_conv, val_conv);
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_considered_impossible_penalty_msat"))) TS_ProbabilisticScoringFeeParameters_get_considered_impossible_penalty_msat(uint64_t this_ptr) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_channel_keys_id"))) TS_DelayedPaymentOutputDescriptor_get_channel_keys_id(uint64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringFeeParameters_get_considered_impossible_penalty_msat(&this_ptr_conv);
- return ret_conv;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *DelayedPaymentOutputDescriptor_get_channel_keys_id(&this_ptr_conv), 32);
+ return ret_arr;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_considered_impossible_penalty_msat"))) TS_ProbabilisticScoringFeeParameters_set_considered_impossible_penalty_msat(uint64_t this_ptr, int64_t val) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_channel_keys_id"))) TS_DelayedPaymentOutputDescriptor_set_channel_keys_id(uint64_t this_ptr, int8_tArray val) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_set_considered_impossible_penalty_msat(&this_ptr_conv, val);
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ DelayedPaymentOutputDescriptor_set_channel_keys_id(&this_ptr_conv, val_ref);
}
-jboolean __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_get_linear_success_probability"))) TS_ProbabilisticScoringFeeParameters_get_linear_success_probability(uint64_t this_ptr) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+int64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_channel_value_satoshis"))) TS_DelayedPaymentOutputDescriptor_get_channel_value_satoshis(uint64_t this_ptr) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- jboolean ret_conv = ProbabilisticScoringFeeParameters_get_linear_success_probability(&this_ptr_conv);
+ int64_t ret_conv = DelayedPaymentOutputDescriptor_get_channel_value_satoshis(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_linear_success_probability"))) TS_ProbabilisticScoringFeeParameters_set_linear_success_probability(uint64_t this_ptr, jboolean val) {
- LDKProbabilisticScoringFeeParameters this_ptr_conv;
+void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis"))) TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKDelayedPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_set_linear_success_probability(&this_ptr_conv, val);
+ DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
}
-static inline uint64_t ProbabilisticScoringFeeParameters_clone_ptr(LDKProbabilisticScoringFeeParameters *NONNULL_PTR arg) {
- LDKProbabilisticScoringFeeParameters ret_var = ProbabilisticScoringFeeParameters_clone(arg);
+uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_new"))) TS_DelayedPaymentOutputDescriptor_new(uint64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, uint64_t output_arg, uint64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
+ LDKOutPoint outpoint_arg_conv;
+ outpoint_arg_conv.inner = untag_ptr(outpoint_arg);
+ outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_arg_conv);
+ outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+ LDKPublicKey per_commitment_point_arg_ref;
+ CHECK(per_commitment_point_arg->arr_len == 33);
+ memcpy(per_commitment_point_arg_ref.compressed_form, per_commitment_point_arg->elems, 33); FREE(per_commitment_point_arg);
+ void* output_arg_ptr = untag_ptr(output_arg);
+ CHECK_ACCESS(output_arg_ptr);
+ LDKTxOut output_arg_conv = *(LDKTxOut*)(output_arg_ptr);
+ output_arg_conv = TxOut_clone((LDKTxOut*)untag_ptr(output_arg));
+ LDKRevocationKey revocation_pubkey_arg_conv;
+ revocation_pubkey_arg_conv.inner = untag_ptr(revocation_pubkey_arg);
+ revocation_pubkey_arg_conv.is_owned = ptr_is_owned(revocation_pubkey_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(revocation_pubkey_arg_conv);
+ revocation_pubkey_arg_conv = RevocationKey_clone(&revocation_pubkey_arg_conv);
+ LDKThirtyTwoBytes channel_keys_id_arg_ref;
+ CHECK(channel_keys_id_arg->arr_len == 32);
+ memcpy(channel_keys_id_arg_ref.data, channel_keys_id_arg->elems, 32); FREE(channel_keys_id_arg);
+ LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_clone_ptr"))) TS_ProbabilisticScoringFeeParameters_clone_ptr(uint64_t arg) {
- LDKProbabilisticScoringFeeParameters arg_conv;
+
+static inline uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg) {
+ LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_clone(arg);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_clone_ptr"))) TS_DelayedPaymentOutputDescriptor_clone_ptr(uint64_t arg) {
+ LDKDelayedPaymentOutputDescriptor arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringFeeParameters_clone_ptr(&arg_conv);
+ int64_t ret_conv = DelayedPaymentOutputDescriptor_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_clone"))) TS_ProbabilisticScoringFeeParameters_clone(uint64_t orig) {
- LDKProbabilisticScoringFeeParameters orig_conv;
+uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_clone"))) TS_DelayedPaymentOutputDescriptor_clone(uint64_t orig) {
+ LDKDelayedPaymentOutputDescriptor orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKProbabilisticScoringFeeParameters ret_var = ProbabilisticScoringFeeParameters_clone(&orig_conv);
+ LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_default"))) TS_ProbabilisticScoringFeeParameters_default() {
- LDKProbabilisticScoringFeeParameters ret_var = ProbabilisticScoringFeeParameters_default();
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+int64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_hash"))) TS_DelayedPaymentOutputDescriptor_hash(uint64_t o) {
+ LDKDelayedPaymentOutputDescriptor o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = DelayedPaymentOutputDescriptor_hash(&o_conv);
+ return ret_conv;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_add_banned"))) TS_ProbabilisticScoringFeeParameters_add_banned(uint64_t this_arg, uint64_t node_id) {
- LDKProbabilisticScoringFeeParameters this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKNodeId node_id_conv;
- node_id_conv.inner = untag_ptr(node_id);
- node_id_conv.is_owned = ptr_is_owned(node_id);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_conv);
- node_id_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_add_banned(&this_arg_conv, &node_id_conv);
+jboolean __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_eq"))) TS_DelayedPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKDelayedPaymentOutputDescriptor a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKDelayedPaymentOutputDescriptor b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = DelayedPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+ return ret_conv;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_add_banned_from_list"))) TS_ProbabilisticScoringFeeParameters_add_banned_from_list(uint64_t this_arg, uint64_tArray node_ids) {
- LDKProbabilisticScoringFeeParameters this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKCVec_NodeIdZ node_ids_constr;
- node_ids_constr.datalen = node_ids->arr_len;
- if (node_ids_constr.datalen > 0)
- node_ids_constr.data = MALLOC(node_ids_constr.datalen * sizeof(LDKNodeId), "LDKCVec_NodeIdZ Elements");
- else
- node_ids_constr.data = NULL;
- uint64_t* node_ids_vals = node_ids->elems;
- for (size_t i = 0; i < node_ids_constr.datalen; i++) {
- uint64_t node_ids_conv_8 = node_ids_vals[i];
- LDKNodeId node_ids_conv_8_conv;
- node_ids_conv_8_conv.inner = untag_ptr(node_ids_conv_8);
- node_ids_conv_8_conv.is_owned = ptr_is_owned(node_ids_conv_8);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(node_ids_conv_8_conv);
- node_ids_conv_8_conv = NodeId_clone(&node_ids_conv_8_conv);
- node_ids_constr.data[i] = node_ids_conv_8_conv;
- }
- FREE(node_ids);
- ProbabilisticScoringFeeParameters_add_banned_from_list(&this_arg_conv, node_ids_constr);
+int8_tArray __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_write"))) TS_DelayedPaymentOutputDescriptor_write(uint64_t obj) {
+ LDKDelayedPaymentOutputDescriptor obj_conv;
+ obj_conv.inner = untag_ptr(obj);
+ obj_conv.is_owned = ptr_is_owned(obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+ obj_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = DelayedPaymentOutputDescriptor_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_remove_banned"))) TS_ProbabilisticScoringFeeParameters_remove_banned(uint64_t this_arg, uint64_t node_id) {
- LDKProbabilisticScoringFeeParameters this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKNodeId node_id_conv;
- node_id_conv.inner = untag_ptr(node_id);
- node_id_conv.is_owned = ptr_is_owned(node_id);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_conv);
- node_id_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_remove_banned(&this_arg_conv, &node_id_conv);
+uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_read"))) TS_DelayedPaymentOutputDescriptor_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ");
+ *ret_conv = DelayedPaymentOutputDescriptor_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_set_manual_penalty"))) TS_ProbabilisticScoringFeeParameters_set_manual_penalty(uint64_t this_arg, uint64_t node_id, int64_t penalty) {
- LDKProbabilisticScoringFeeParameters this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKNodeId node_id_conv;
- node_id_conv.inner = untag_ptr(node_id);
- node_id_conv.is_owned = ptr_is_owned(node_id);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_conv);
- node_id_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_set_manual_penalty(&this_arg_conv, &node_id_conv, penalty);
+void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_free"))) TS_StaticPaymentOutputDescriptor_free(uint64_t this_obj) {
+ LDKStaticPaymentOutputDescriptor this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ StaticPaymentOutputDescriptor_free(this_obj_conv);
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_remove_manual_penalty"))) TS_ProbabilisticScoringFeeParameters_remove_manual_penalty(uint64_t this_arg, uint64_t node_id) {
- LDKProbabilisticScoringFeeParameters this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKNodeId node_id_conv;
- node_id_conv.inner = untag_ptr(node_id);
- node_id_conv.is_owned = ptr_is_owned(node_id);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_conv);
- node_id_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_remove_manual_penalty(&this_arg_conv, &node_id_conv);
+uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_outpoint"))) TS_StaticPaymentOutputDescriptor_get_outpoint(uint64_t this_ptr) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOutPoint ret_var = StaticPaymentOutputDescriptor_get_outpoint(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_ProbabilisticScoringFeeParameters_clear_manual_penalties"))) TS_ProbabilisticScoringFeeParameters_clear_manual_penalties(uint64_t this_arg) {
- LDKProbabilisticScoringFeeParameters this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- ProbabilisticScoringFeeParameters_clear_manual_penalties(&this_arg_conv);
+void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_outpoint"))) TS_StaticPaymentOutputDescriptor_set_outpoint(uint64_t this_ptr, uint64_t val) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKOutPoint val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = OutPoint_clone(&val_conv);
+ StaticPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
}
-void __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_free"))) TS_ProbabilisticScoringDecayParameters_free(uint64_t this_obj) {
- LDKProbabilisticScoringDecayParameters this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- ProbabilisticScoringDecayParameters_free(this_obj_conv);
+uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_output"))) TS_StaticPaymentOutputDescriptor_get_output(uint64_t this_ptr) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = StaticPaymentOutputDescriptor_get_output(&this_ptr_conv);
+ return tag_ptr(ret_ref, true);
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_get_historical_no_updates_half_life"))) TS_ProbabilisticScoringDecayParameters_get_historical_no_updates_half_life(uint64_t this_ptr) {
- LDKProbabilisticScoringDecayParameters this_ptr_conv;
+void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_output"))) TS_StaticPaymentOutputDescriptor_set_output(uint64_t this_ptr, uint64_t val) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringDecayParameters_get_historical_no_updates_half_life(&this_ptr_conv);
- return ret_conv;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKTxOut val_conv = *(LDKTxOut*)(val_ptr);
+ val_conv = TxOut_clone((LDKTxOut*)untag_ptr(val));
+ StaticPaymentOutputDescriptor_set_output(&this_ptr_conv, val_conv);
}
-void __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_set_historical_no_updates_half_life"))) TS_ProbabilisticScoringDecayParameters_set_historical_no_updates_half_life(uint64_t this_ptr, int64_t val) {
- LDKProbabilisticScoringDecayParameters this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_channel_keys_id"))) TS_StaticPaymentOutputDescriptor_get_channel_keys_id(uint64_t this_ptr) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ProbabilisticScoringDecayParameters_set_historical_no_updates_half_life(&this_ptr_conv, val);
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, *StaticPaymentOutputDescriptor_get_channel_keys_id(&this_ptr_conv), 32);
+ return ret_arr;
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_get_liquidity_offset_half_life"))) TS_ProbabilisticScoringDecayParameters_get_liquidity_offset_half_life(uint64_t this_ptr) {
- LDKProbabilisticScoringDecayParameters this_ptr_conv;
+void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_channel_keys_id"))) TS_StaticPaymentOutputDescriptor_set_channel_keys_id(uint64_t this_ptr, int8_tArray val) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringDecayParameters_get_liquidity_offset_half_life(&this_ptr_conv);
- return ret_conv;
+ LDKThirtyTwoBytes val_ref;
+ CHECK(val->arr_len == 32);
+ memcpy(val_ref.data, val->elems, 32); FREE(val);
+ StaticPaymentOutputDescriptor_set_channel_keys_id(&this_ptr_conv, val_ref);
}
-void __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_set_liquidity_offset_half_life"))) TS_ProbabilisticScoringDecayParameters_set_liquidity_offset_half_life(uint64_t this_ptr, int64_t val) {
- LDKProbabilisticScoringDecayParameters this_ptr_conv;
+int64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_channel_value_satoshis"))) TS_StaticPaymentOutputDescriptor_get_channel_value_satoshis(uint64_t this_ptr) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- ProbabilisticScoringDecayParameters_set_liquidity_offset_half_life(&this_ptr_conv, val);
+ int64_t ret_conv = StaticPaymentOutputDescriptor_get_channel_value_satoshis(&this_ptr_conv);
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_new"))) TS_ProbabilisticScoringDecayParameters_new(int64_t historical_no_updates_half_life_arg, int64_t liquidity_offset_half_life_arg) {
- LDKProbabilisticScoringDecayParameters ret_var = ProbabilisticScoringDecayParameters_new(historical_no_updates_half_life_arg, liquidity_offset_half_life_arg);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_channel_value_satoshis"))) TS_StaticPaymentOutputDescriptor_set_channel_value_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ StaticPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
}
-static inline uint64_t ProbabilisticScoringDecayParameters_clone_ptr(LDKProbabilisticScoringDecayParameters *NONNULL_PTR arg) {
- LDKProbabilisticScoringDecayParameters ret_var = ProbabilisticScoringDecayParameters_clone(arg);
+uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_channel_transaction_parameters"))) TS_StaticPaymentOutputDescriptor_get_channel_transaction_parameters(uint64_t this_ptr) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelTransactionParameters ret_var = StaticPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_clone_ptr"))) TS_ProbabilisticScoringDecayParameters_clone_ptr(uint64_t arg) {
- LDKProbabilisticScoringDecayParameters arg_conv;
- arg_conv.inner = untag_ptr(arg);
- arg_conv.is_owned = ptr_is_owned(arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
- arg_conv.is_owned = false;
- int64_t ret_conv = ProbabilisticScoringDecayParameters_clone_ptr(&arg_conv);
- return ret_conv;
-}
-uint64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_clone"))) TS_ProbabilisticScoringDecayParameters_clone(uint64_t orig) {
- LDKProbabilisticScoringDecayParameters orig_conv;
- orig_conv.inner = untag_ptr(orig);
- orig_conv.is_owned = ptr_is_owned(orig);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
- orig_conv.is_owned = false;
- LDKProbabilisticScoringDecayParameters ret_var = ProbabilisticScoringDecayParameters_clone(&orig_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
+void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_channel_transaction_parameters"))) TS_StaticPaymentOutputDescriptor_set_channel_transaction_parameters(uint64_t this_ptr, uint64_t val) {
+ LDKStaticPaymentOutputDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKChannelTransactionParameters val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelTransactionParameters_clone(&val_conv);
+ StaticPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScoringDecayParameters_default"))) TS_ProbabilisticScoringDecayParameters_default() {
- LDKProbabilisticScoringDecayParameters ret_var = ProbabilisticScoringDecayParameters_default();
+uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_new"))) TS_StaticPaymentOutputDescriptor_new(uint64_t outpoint_arg, uint64_t output_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, uint64_t channel_transaction_parameters_arg) {
+ LDKOutPoint outpoint_arg_conv;
+ outpoint_arg_conv.inner = untag_ptr(outpoint_arg);
+ outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_arg_conv);
+ outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+ void* output_arg_ptr = untag_ptr(output_arg);
+ CHECK_ACCESS(output_arg_ptr);
+ LDKTxOut output_arg_conv = *(LDKTxOut*)(output_arg_ptr);
+ output_arg_conv = TxOut_clone((LDKTxOut*)untag_ptr(output_arg));
+ LDKThirtyTwoBytes channel_keys_id_arg_ref;
+ CHECK(channel_keys_id_arg->arr_len == 32);
+ memcpy(channel_keys_id_arg_ref.data, channel_keys_id_arg->elems, 32); FREE(channel_keys_id_arg);
+ LDKChannelTransactionParameters channel_transaction_parameters_arg_conv;
+ channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg);
+ channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv);
+ channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv);
+ LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_new(outpoint_arg_conv, output_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScorer_new"))) TS_ProbabilisticScorer_new(uint64_t decay_params, uint64_t network_graph, uint64_t logger) {
- LDKProbabilisticScoringDecayParameters decay_params_conv;
- decay_params_conv.inner = untag_ptr(decay_params);
- decay_params_conv.is_owned = ptr_is_owned(decay_params);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(decay_params_conv);
- decay_params_conv = ProbabilisticScoringDecayParameters_clone(&decay_params_conv);
- LDKNetworkGraph network_graph_conv;
- network_graph_conv.inner = untag_ptr(network_graph);
- network_graph_conv.is_owned = ptr_is_owned(network_graph);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
- network_graph_conv.is_owned = false;
- void* logger_ptr = untag_ptr(logger);
- CHECK_ACCESS(logger_ptr);
- LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
- if (logger_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_cloned(&logger_conv);
- }
- LDKProbabilisticScorer ret_var = ProbabilisticScorer_new(decay_params_conv, &network_graph_conv, logger_conv);
+static inline uint64_t StaticPaymentOutputDescriptor_clone_ptr(LDKStaticPaymentOutputDescriptor *NONNULL_PTR arg) {
+ LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-
-void __attribute__((export_name("TS_ProbabilisticScorer_debug_log_liquidity_stats"))) TS_ProbabilisticScorer_debug_log_liquidity_stats(uint64_t this_arg) {
- LDKProbabilisticScorer this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- ProbabilisticScorer_debug_log_liquidity_stats(&this_arg_conv);
-}
-
-uint64_t __attribute__((export_name("TS_ProbabilisticScorer_estimated_channel_liquidity_range"))) TS_ProbabilisticScorer_estimated_channel_liquidity_range(uint64_t this_arg, int64_t scid, uint64_t target) {
- LDKProbabilisticScorer this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKNodeId target_conv;
- target_conv.inner = untag_ptr(target);
- target_conv.is_owned = ptr_is_owned(target);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(target_conv);
- target_conv.is_owned = false;
- LDKCOption_C2Tuple_u64u64ZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_u64u64ZZ), "LDKCOption_C2Tuple_u64u64ZZ");
- *ret_copy = ProbabilisticScorer_estimated_channel_liquidity_range(&this_arg_conv, scid, &target_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities"))) TS_ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(uint64_t this_arg, int64_t scid, uint64_t target) {
- LDKProbabilisticScorer this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKNodeId target_conv;
- target_conv.inner = untag_ptr(target);
- target_conv.is_owned = ptr_is_owned(target);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(target_conv);
- target_conv.is_owned = false;
- LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ), "LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ");
- *ret_copy = ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(&this_arg_conv, scid, &target_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+int64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_clone_ptr"))) TS_StaticPaymentOutputDescriptor_clone_ptr(uint64_t arg) {
+ LDKStaticPaymentOutputDescriptor arg_conv;
+ arg_conv.inner = untag_ptr(arg);
+ arg_conv.is_owned = ptr_is_owned(arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+ arg_conv.is_owned = false;
+ int64_t ret_conv = StaticPaymentOutputDescriptor_clone_ptr(&arg_conv);
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScorer_historical_estimated_payment_success_probability"))) TS_ProbabilisticScorer_historical_estimated_payment_success_probability(uint64_t this_arg, int64_t scid, uint64_t target, int64_t amount_msat, uint64_t params) {
- LDKProbabilisticScorer this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKNodeId target_conv;
- target_conv.inner = untag_ptr(target);
- target_conv.is_owned = ptr_is_owned(target);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(target_conv);
- target_conv.is_owned = false;
- LDKProbabilisticScoringFeeParameters params_conv;
- params_conv.inner = untag_ptr(params);
- params_conv.is_owned = ptr_is_owned(params);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
- params_conv.is_owned = false;
- LDKCOption_f64Z *ret_copy = MALLOC(sizeof(LDKCOption_f64Z), "LDKCOption_f64Z");
- *ret_copy = ProbabilisticScorer_historical_estimated_payment_success_probability(&this_arg_conv, scid, &target_conv, amount_msat, ¶ms_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
+uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_clone"))) TS_StaticPaymentOutputDescriptor_clone(uint64_t orig) {
+ LDKStaticPaymentOutputDescriptor orig_conv;
+ orig_conv.inner = untag_ptr(orig);
+ orig_conv.is_owned = ptr_is_owned(orig);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+ orig_conv.is_owned = false;
+ LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_clone(&orig_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScorer_as_ScoreLookUp"))) TS_ProbabilisticScorer_as_ScoreLookUp(uint64_t this_arg) {
- LDKProbabilisticScorer this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKScoreLookUp* ret_ret = MALLOC(sizeof(LDKScoreLookUp), "LDKScoreLookUp");
- *ret_ret = ProbabilisticScorer_as_ScoreLookUp(&this_arg_conv);
- return tag_ptr(ret_ret, true);
+int64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_hash"))) TS_StaticPaymentOutputDescriptor_hash(uint64_t o) {
+ LDKStaticPaymentOutputDescriptor o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = StaticPaymentOutputDescriptor_hash(&o_conv);
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScorer_as_ScoreUpdate"))) TS_ProbabilisticScorer_as_ScoreUpdate(uint64_t this_arg) {
- LDKProbabilisticScorer this_arg_conv;
+jboolean __attribute__((export_name("TS_StaticPaymentOutputDescriptor_eq"))) TS_StaticPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKStaticPaymentOutputDescriptor a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv.is_owned = false;
+ LDKStaticPaymentOutputDescriptor b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv.is_owned = false;
+ jboolean ret_conv = StaticPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_witness_script"))) TS_StaticPaymentOutputDescriptor_witness_script(uint64_t this_arg) {
+ LDKStaticPaymentOutputDescriptor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKScoreUpdate* ret_ret = MALLOC(sizeof(LDKScoreUpdate), "LDKScoreUpdate");
- *ret_ret = ProbabilisticScorer_as_ScoreUpdate(&this_arg_conv);
- return tag_ptr(ret_ret, true);
+ LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
+ *ret_copy = StaticPaymentOutputDescriptor_witness_script(&this_arg_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScorer_as_Score"))) TS_ProbabilisticScorer_as_Score(uint64_t this_arg) {
- LDKProbabilisticScorer this_arg_conv;
+int64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_max_witness_length"))) TS_StaticPaymentOutputDescriptor_max_witness_length(uint64_t this_arg) {
+ LDKStaticPaymentOutputDescriptor this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKScore* ret_ret = MALLOC(sizeof(LDKScore), "LDKScore");
- *ret_ret = ProbabilisticScorer_as_Score(&this_arg_conv);
- return tag_ptr(ret_ret, true);
+ int64_t ret_conv = StaticPaymentOutputDescriptor_max_witness_length(&this_arg_conv);
+ return ret_conv;
}
-int8_tArray __attribute__((export_name("TS_ProbabilisticScorer_write"))) TS_ProbabilisticScorer_write(uint64_t obj) {
- LDKProbabilisticScorer obj_conv;
+int8_tArray __attribute__((export_name("TS_StaticPaymentOutputDescriptor_write"))) TS_StaticPaymentOutputDescriptor_write(uint64_t obj) {
+ LDKStaticPaymentOutputDescriptor obj_conv;
obj_conv.inner = untag_ptr(obj);
obj_conv.is_owned = ptr_is_owned(obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
obj_conv.is_owned = false;
- LDKCVec_u8Z ret_var = ProbabilisticScorer_write(&obj_conv);
+ LDKCVec_u8Z ret_var = StaticPaymentOutputDescriptor_write(&obj_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
CVec_u8Z_free(ret_var);
return ret_arr;
}
-uint64_t __attribute__((export_name("TS_ProbabilisticScorer_read"))) TS_ProbabilisticScorer_read(int8_tArray ser, uint64_t arg_a, uint64_t arg_b, uint64_t arg_c) {
+uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_read"))) TS_StaticPaymentOutputDescriptor_read(int8_tArray ser) {
LDKu8slice ser_ref;
ser_ref.datalen = ser->arr_len;
ser_ref.data = ser->elems;
- LDKProbabilisticScoringDecayParameters arg_a_conv;
- arg_a_conv.inner = untag_ptr(arg_a);
- arg_a_conv.is_owned = ptr_is_owned(arg_a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_a_conv);
- arg_a_conv = ProbabilisticScoringDecayParameters_clone(&arg_a_conv);
- LDKNetworkGraph arg_b_conv;
- arg_b_conv.inner = untag_ptr(arg_b);
- arg_b_conv.is_owned = ptr_is_owned(arg_b);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_b_conv);
- arg_b_conv.is_owned = false;
- void* arg_c_ptr = untag_ptr(arg_c);
- CHECK_ACCESS(arg_c_ptr);
- LDKLogger arg_c_conv = *(LDKLogger*)(arg_c_ptr);
- if (arg_c_conv.free == LDKLogger_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKLogger_JCalls_cloned(&arg_c_conv);
- }
- LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
- *ret_conv = ProbabilisticScorer_read(ser_ref, arg_a_conv, &arg_b_conv, arg_c_conv);
+ LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ");
+ *ret_conv = StaticPaymentOutputDescriptor_read(ser_ref);
FREE(ser);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_free"))) TS_DelayedPaymentOutputDescriptor_free(uint64_t this_obj) {
- LDKDelayedPaymentOutputDescriptor this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- DelayedPaymentOutputDescriptor_free(this_obj_conv);
+void __attribute__((export_name("TS_SpendableOutputDescriptor_free"))) TS_SpendableOutputDescriptor_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSpendableOutputDescriptor this_ptr_conv = *(LDKSpendableOutputDescriptor*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SpendableOutputDescriptor_free(this_ptr_conv);
}
-uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_outpoint"))) TS_DelayedPaymentOutputDescriptor_get_outpoint(uint64_t this_ptr) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKOutPoint ret_var = DelayedPaymentOutputDescriptor_get_outpoint(&this_ptr_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+static inline uint64_t SpendableOutputDescriptor_clone_ptr(LDKSpendableOutputDescriptor *NONNULL_PTR arg) {
+ LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+ *ret_copy = SpendableOutputDescriptor_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
+int64_t __attribute__((export_name("TS_SpendableOutputDescriptor_clone_ptr"))) TS_SpendableOutputDescriptor_clone_ptr(uint64_t arg) {
+ LDKSpendableOutputDescriptor* arg_conv = (LDKSpendableOutputDescriptor*)untag_ptr(arg);
+ int64_t ret_conv = SpendableOutputDescriptor_clone_ptr(arg_conv);
+ return ret_conv;
+}
-void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_outpoint"))) TS_DelayedPaymentOutputDescriptor_set_outpoint(uint64_t this_ptr, uint64_t val) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKOutPoint val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = OutPoint_clone(&val_conv);
- DelayedPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
+uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_clone"))) TS_SpendableOutputDescriptor_clone(uint64_t orig) {
+ LDKSpendableOutputDescriptor* orig_conv = (LDKSpendableOutputDescriptor*)untag_ptr(orig);
+ LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+ *ret_copy = SpendableOutputDescriptor_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-int8_tArray __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_per_commitment_point"))) TS_DelayedPaymentOutputDescriptor_get_per_commitment_point(uint64_t this_ptr) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, DelayedPaymentOutputDescriptor_get_per_commitment_point(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_static_output"))) TS_SpendableOutputDescriptor_static_output(uint64_t outpoint, uint64_t output, int8_tArray channel_keys_id) {
+ LDKOutPoint outpoint_conv;
+ outpoint_conv.inner = untag_ptr(outpoint);
+ outpoint_conv.is_owned = ptr_is_owned(outpoint);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
+ outpoint_conv = OutPoint_clone(&outpoint_conv);
+ void* output_ptr = untag_ptr(output);
+ CHECK_ACCESS(output_ptr);
+ LDKTxOut output_conv = *(LDKTxOut*)(output_ptr);
+ output_conv = TxOut_clone((LDKTxOut*)untag_ptr(output));
+ LDKThirtyTwoBytes channel_keys_id_ref;
+ CHECK(channel_keys_id->arr_len == 32);
+ memcpy(channel_keys_id_ref.data, channel_keys_id->elems, 32); FREE(channel_keys_id);
+ LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+ *ret_copy = SpendableOutputDescriptor_static_output(outpoint_conv, output_conv, channel_keys_id_ref);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_per_commitment_point"))) TS_DelayedPaymentOutputDescriptor_set_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- DelayedPaymentOutputDescriptor_set_per_commitment_point(&this_ptr_conv, val_ref);
+uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_delayed_payment_output"))) TS_SpendableOutputDescriptor_delayed_payment_output(uint64_t a) {
+ LDKDelayedPaymentOutputDescriptor a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = DelayedPaymentOutputDescriptor_clone(&a_conv);
+ LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+ *ret_copy = SpendableOutputDescriptor_delayed_payment_output(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
}
-int16_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_to_self_delay"))) TS_DelayedPaymentOutputDescriptor_get_to_self_delay(uint64_t this_ptr) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int16_t ret_conv = DelayedPaymentOutputDescriptor_get_to_self_delay(&this_ptr_conv);
+uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_static_payment_output"))) TS_SpendableOutputDescriptor_static_payment_output(uint64_t a) {
+ LDKStaticPaymentOutputDescriptor a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = StaticPaymentOutputDescriptor_clone(&a_conv);
+ LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+ *ret_copy = SpendableOutputDescriptor_static_payment_output(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t __attribute__((export_name("TS_SpendableOutputDescriptor_hash"))) TS_SpendableOutputDescriptor_hash(uint64_t o) {
+ LDKSpendableOutputDescriptor* o_conv = (LDKSpendableOutputDescriptor*)untag_ptr(o);
+ int64_t ret_conv = SpendableOutputDescriptor_hash(o_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_to_self_delay"))) TS_DelayedPaymentOutputDescriptor_set_to_self_delay(uint64_t this_ptr, int16_t val) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- DelayedPaymentOutputDescriptor_set_to_self_delay(&this_ptr_conv, val);
+jboolean __attribute__((export_name("TS_SpendableOutputDescriptor_eq"))) TS_SpendableOutputDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKSpendableOutputDescriptor* a_conv = (LDKSpendableOutputDescriptor*)untag_ptr(a);
+ LDKSpendableOutputDescriptor* b_conv = (LDKSpendableOutputDescriptor*)untag_ptr(b);
+ jboolean ret_conv = SpendableOutputDescriptor_eq(a_conv, b_conv);
+ return ret_conv;
}
-uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_output"))) TS_DelayedPaymentOutputDescriptor_get_output(uint64_t this_ptr) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
- *ret_ref = DelayedPaymentOutputDescriptor_get_output(&this_ptr_conv);
- return tag_ptr(ret_ref, true);
+int8_tArray __attribute__((export_name("TS_SpendableOutputDescriptor_write"))) TS_SpendableOutputDescriptor_write(uint64_t obj) {
+ LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = SpendableOutputDescriptor_write(obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
}
-void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_output"))) TS_DelayedPaymentOutputDescriptor_set_output(uint64_t this_ptr, uint64_t val) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKTxOut val_conv = *(LDKTxOut*)(val_ptr);
- val_conv = TxOut_clone((LDKTxOut*)untag_ptr(val));
- DelayedPaymentOutputDescriptor_set_output(&this_ptr_conv, val_conv);
+uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_read"))) TS_SpendableOutputDescriptor_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_SpendableOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ), "LDKCResult_SpendableOutputDescriptorDecodeErrorZ");
+ *ret_conv = SpendableOutputDescriptor_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
}
-int8_tArray __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_revocation_pubkey"))) TS_DelayedPaymentOutputDescriptor_get_revocation_pubkey(uint64_t this_ptr) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_create_spendable_outputs_psbt"))) TS_SpendableOutputDescriptor_create_spendable_outputs_psbt(uint64_tArray descriptors, uint64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, uint64_t locktime) {
+ LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
+ descriptors_constr.datalen = descriptors->arr_len;
+ if (descriptors_constr.datalen > 0)
+ descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+ else
+ descriptors_constr.data = NULL;
+ uint64_t* descriptors_vals = descriptors->elems;
+ for (size_t b = 0; b < descriptors_constr.datalen; b++) {
+ uint64_t descriptors_conv_27 = descriptors_vals[b];
+ void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
+ CHECK_ACCESS(descriptors_conv_27_ptr);
+ LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
+ descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
+ descriptors_constr.data[b] = descriptors_conv_27_conv;
+ }
+ FREE(descriptors);
+ LDKCVec_TxOutZ outputs_constr;
+ outputs_constr.datalen = outputs->arr_len;
+ if (outputs_constr.datalen > 0)
+ outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
+ else
+ outputs_constr.data = NULL;
+ uint64_t* outputs_vals = outputs->elems;
+ for (size_t h = 0; h < outputs_constr.datalen; h++) {
+ uint64_t outputs_conv_7 = outputs_vals[h];
+ void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
+ CHECK_ACCESS(outputs_conv_7_ptr);
+ LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
+ outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
+ outputs_constr.data[h] = outputs_conv_7_conv;
+ }
+ FREE(outputs);
+ LDKCVec_u8Z change_destination_script_ref;
+ change_destination_script_ref.datalen = change_destination_script->arr_len;
+ change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script);
+ void* locktime_ptr = untag_ptr(locktime);
+ CHECK_ACCESS(locktime_ptr);
+ LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
+ locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
+ LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ), "LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ");
+ *ret_conv = SpendableOutputDescriptor_create_spendable_outputs_psbt(descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void __attribute__((export_name("TS_ChannelDerivationParameters_free"))) TS_ChannelDerivationParameters_free(uint64_t this_obj) {
+ LDKChannelDerivationParameters this_obj_conv;
+ this_obj_conv.inner = untag_ptr(this_obj);
+ this_obj_conv.is_owned = ptr_is_owned(this_obj);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+ ChannelDerivationParameters_free(this_obj_conv);
+}
+
+int64_t __attribute__((export_name("TS_ChannelDerivationParameters_get_value_satoshis"))) TS_ChannelDerivationParameters_get_value_satoshis(uint64_t this_ptr) {
+ LDKChannelDerivationParameters this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, DelayedPaymentOutputDescriptor_get_revocation_pubkey(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
+ int64_t ret_conv = ChannelDerivationParameters_get_value_satoshis(&this_ptr_conv);
+ return ret_conv;
}
-void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_revocation_pubkey"))) TS_DelayedPaymentOutputDescriptor_set_revocation_pubkey(uint64_t this_ptr, int8_tArray val) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+void __attribute__((export_name("TS_ChannelDerivationParameters_set_value_satoshis"))) TS_ChannelDerivationParameters_set_value_satoshis(uint64_t this_ptr, int64_t val) {
+ LDKChannelDerivationParameters this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- DelayedPaymentOutputDescriptor_set_revocation_pubkey(&this_ptr_conv, val_ref);
+ ChannelDerivationParameters_set_value_satoshis(&this_ptr_conv, val);
}
-int8_tArray __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_channel_keys_id"))) TS_DelayedPaymentOutputDescriptor_get_channel_keys_id(uint64_t this_ptr) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_ChannelDerivationParameters_get_keys_id"))) TS_ChannelDerivationParameters_get_keys_id(uint64_t this_ptr) {
+ LDKChannelDerivationParameters this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *DelayedPaymentOutputDescriptor_get_channel_keys_id(&this_ptr_conv), 32);
+ memcpy(ret_arr->elems, *ChannelDerivationParameters_get_keys_id(&this_ptr_conv), 32);
return ret_arr;
}
-void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_channel_keys_id"))) TS_DelayedPaymentOutputDescriptor_set_channel_keys_id(uint64_t this_ptr, int8_tArray val) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+void __attribute__((export_name("TS_ChannelDerivationParameters_set_keys_id"))) TS_ChannelDerivationParameters_set_keys_id(uint64_t this_ptr, int8_tArray val) {
+ LDKChannelDerivationParameters this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKThirtyTwoBytes val_ref;
CHECK(val->arr_len == 32);
memcpy(val_ref.data, val->elems, 32); FREE(val);
- DelayedPaymentOutputDescriptor_set_channel_keys_id(&this_ptr_conv, val_ref);
+ ChannelDerivationParameters_set_keys_id(&this_ptr_conv, val_ref);
}
-int64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_get_channel_value_satoshis"))) TS_DelayedPaymentOutputDescriptor_get_channel_value_satoshis(uint64_t this_ptr) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+uint64_t __attribute__((export_name("TS_ChannelDerivationParameters_get_transaction_parameters"))) TS_ChannelDerivationParameters_get_transaction_parameters(uint64_t this_ptr) {
+ LDKChannelDerivationParameters this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = DelayedPaymentOutputDescriptor_get_channel_value_satoshis(&this_ptr_conv);
- return ret_conv;
+ LDKChannelTransactionParameters ret_var = ChannelDerivationParameters_get_transaction_parameters(&this_ptr_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
}
-void __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis"))) TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(uint64_t this_ptr, int64_t val) {
- LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+void __attribute__((export_name("TS_ChannelDerivationParameters_set_transaction_parameters"))) TS_ChannelDerivationParameters_set_transaction_parameters(uint64_t this_ptr, uint64_t val) {
+ LDKChannelDerivationParameters this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
+ LDKChannelTransactionParameters val_conv;
+ val_conv.inner = untag_ptr(val);
+ val_conv.is_owned = ptr_is_owned(val);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+ val_conv = ChannelTransactionParameters_clone(&val_conv);
+ ChannelDerivationParameters_set_transaction_parameters(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_new"))) TS_DelayedPaymentOutputDescriptor_new(uint64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, uint64_t output_arg, int8_tArray revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
- LDKOutPoint outpoint_arg_conv;
- outpoint_arg_conv.inner = untag_ptr(outpoint_arg);
- outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_arg_conv);
- outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
- LDKPublicKey per_commitment_point_arg_ref;
- CHECK(per_commitment_point_arg->arr_len == 33);
- memcpy(per_commitment_point_arg_ref.compressed_form, per_commitment_point_arg->elems, 33); FREE(per_commitment_point_arg);
- void* output_arg_ptr = untag_ptr(output_arg);
- CHECK_ACCESS(output_arg_ptr);
- LDKTxOut output_arg_conv = *(LDKTxOut*)(output_arg_ptr);
- output_arg_conv = TxOut_clone((LDKTxOut*)untag_ptr(output_arg));
- LDKPublicKey revocation_pubkey_arg_ref;
- CHECK(revocation_pubkey_arg->arr_len == 33);
- memcpy(revocation_pubkey_arg_ref.compressed_form, revocation_pubkey_arg->elems, 33); FREE(revocation_pubkey_arg);
- LDKThirtyTwoBytes channel_keys_id_arg_ref;
- CHECK(channel_keys_id_arg->arr_len == 32);
- memcpy(channel_keys_id_arg_ref.data, channel_keys_id_arg->elems, 32); FREE(channel_keys_id_arg);
- LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_ref, channel_keys_id_arg_ref, channel_value_satoshis_arg);
+uint64_t __attribute__((export_name("TS_ChannelDerivationParameters_new"))) TS_ChannelDerivationParameters_new(int64_t value_satoshis_arg, int8_tArray keys_id_arg, uint64_t transaction_parameters_arg) {
+ LDKThirtyTwoBytes keys_id_arg_ref;
+ CHECK(keys_id_arg->arr_len == 32);
+ memcpy(keys_id_arg_ref.data, keys_id_arg->elems, 32); FREE(keys_id_arg);
+ LDKChannelTransactionParameters transaction_parameters_arg_conv;
+ transaction_parameters_arg_conv.inner = untag_ptr(transaction_parameters_arg);
+ transaction_parameters_arg_conv.is_owned = ptr_is_owned(transaction_parameters_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(transaction_parameters_arg_conv);
+ transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&transaction_parameters_arg_conv);
+ LDKChannelDerivationParameters ret_var = ChannelDerivationParameters_new(value_satoshis_arg, keys_id_arg_ref, transaction_parameters_arg_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-static inline uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg) {
- LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_clone(arg);
+static inline uint64_t ChannelDerivationParameters_clone_ptr(LDKChannelDerivationParameters *NONNULL_PTR arg) {
+ LDKChannelDerivationParameters ret_var = ChannelDerivationParameters_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_clone_ptr"))) TS_DelayedPaymentOutputDescriptor_clone_ptr(uint64_t arg) {
- LDKDelayedPaymentOutputDescriptor arg_conv;
+int64_t __attribute__((export_name("TS_ChannelDerivationParameters_clone_ptr"))) TS_ChannelDerivationParameters_clone_ptr(uint64_t arg) {
+ LDKChannelDerivationParameters arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = DelayedPaymentOutputDescriptor_clone_ptr(&arg_conv);
+ int64_t ret_conv = ChannelDerivationParameters_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_clone"))) TS_DelayedPaymentOutputDescriptor_clone(uint64_t orig) {
- LDKDelayedPaymentOutputDescriptor orig_conv;
+uint64_t __attribute__((export_name("TS_ChannelDerivationParameters_clone"))) TS_ChannelDerivationParameters_clone(uint64_t orig) {
+ LDKChannelDerivationParameters orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_clone(&orig_conv);
+ LDKChannelDerivationParameters ret_var = ChannelDerivationParameters_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_hash"))) TS_DelayedPaymentOutputDescriptor_hash(uint64_t o) {
- LDKDelayedPaymentOutputDescriptor o_conv;
- o_conv.inner = untag_ptr(o);
- o_conv.is_owned = ptr_is_owned(o);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
- o_conv.is_owned = false;
- int64_t ret_conv = DelayedPaymentOutputDescriptor_hash(&o_conv);
- return ret_conv;
-}
-
-jboolean __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_eq"))) TS_DelayedPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
- LDKDelayedPaymentOutputDescriptor a_conv;
+jboolean __attribute__((export_name("TS_ChannelDerivationParameters_eq"))) TS_ChannelDerivationParameters_eq(uint64_t a, uint64_t b) {
+ LDKChannelDerivationParameters a_conv;
a_conv.inner = untag_ptr(a);
a_conv.is_owned = ptr_is_owned(a);
CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
a_conv.is_owned = false;
- LDKDelayedPaymentOutputDescriptor b_conv;
+ LDKChannelDerivationParameters b_conv;
b_conv.inner = untag_ptr(b);
b_conv.is_owned = ptr_is_owned(b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
b_conv.is_owned = false;
- jboolean ret_conv = DelayedPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+ jboolean ret_conv = ChannelDerivationParameters_eq(&a_conv, &b_conv);
return ret_conv;
}
-int8_tArray __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_write"))) TS_DelayedPaymentOutputDescriptor_write(uint64_t obj) {
- LDKDelayedPaymentOutputDescriptor obj_conv;
+int8_tArray __attribute__((export_name("TS_ChannelDerivationParameters_write"))) TS_ChannelDerivationParameters_write(uint64_t obj) {
+ LDKChannelDerivationParameters obj_conv;
obj_conv.inner = untag_ptr(obj);
obj_conv.is_owned = ptr_is_owned(obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
obj_conv.is_owned = false;
- LDKCVec_u8Z ret_var = DelayedPaymentOutputDescriptor_write(&obj_conv);
+ LDKCVec_u8Z ret_var = ChannelDerivationParameters_write(&obj_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
CVec_u8Z_free(ret_var);
return ret_arr;
}
-uint64_t __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_read"))) TS_DelayedPaymentOutputDescriptor_read(int8_tArray ser) {
+uint64_t __attribute__((export_name("TS_ChannelDerivationParameters_read"))) TS_ChannelDerivationParameters_read(int8_tArray ser) {
LDKu8slice ser_ref;
ser_ref.datalen = ser->arr_len;
ser_ref.data = ser->elems;
- LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ");
- *ret_conv = DelayedPaymentOutputDescriptor_read(ser_ref);
+ LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
+ *ret_conv = ChannelDerivationParameters_read(ser_ref);
FREE(ser);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_free"))) TS_StaticPaymentOutputDescriptor_free(uint64_t this_obj) {
- LDKStaticPaymentOutputDescriptor this_obj_conv;
+void __attribute__((export_name("TS_HTLCDescriptor_free"))) TS_HTLCDescriptor_free(uint64_t this_obj) {
+ LDKHTLCDescriptor this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
this_obj_conv.is_owned = ptr_is_owned(this_obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- StaticPaymentOutputDescriptor_free(this_obj_conv);
+ HTLCDescriptor_free(this_obj_conv);
}
-uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_outpoint"))) TS_StaticPaymentOutputDescriptor_get_outpoint(uint64_t this_ptr) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_get_channel_derivation_parameters"))) TS_HTLCDescriptor_get_channel_derivation_parameters(uint64_t this_ptr) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKOutPoint ret_var = StaticPaymentOutputDescriptor_get_outpoint(&this_ptr_conv);
+ LDKChannelDerivationParameters ret_var = HTLCDescriptor_get_channel_derivation_parameters(&this_ptr_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_outpoint"))) TS_StaticPaymentOutputDescriptor_set_outpoint(uint64_t this_ptr, uint64_t val) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+void __attribute__((export_name("TS_HTLCDescriptor_set_channel_derivation_parameters"))) TS_HTLCDescriptor_set_channel_derivation_parameters(uint64_t this_ptr, uint64_t val) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKOutPoint val_conv;
+ LDKChannelDerivationParameters val_conv;
val_conv.inner = untag_ptr(val);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = OutPoint_clone(&val_conv);
- StaticPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
+ val_conv = ChannelDerivationParameters_clone(&val_conv);
+ HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_output"))) TS_StaticPaymentOutputDescriptor_get_output(uint64_t this_ptr) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+int64_t __attribute__((export_name("TS_HTLCDescriptor_get_per_commitment_number"))) TS_HTLCDescriptor_get_per_commitment_number(uint64_t this_ptr) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
- *ret_ref = StaticPaymentOutputDescriptor_get_output(&this_ptr_conv);
- return tag_ptr(ret_ref, true);
+ int64_t ret_conv = HTLCDescriptor_get_per_commitment_number(&this_ptr_conv);
+ return ret_conv;
}
-void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_output"))) TS_StaticPaymentOutputDescriptor_set_output(uint64_t this_ptr, uint64_t val) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+void __attribute__((export_name("TS_HTLCDescriptor_set_per_commitment_number"))) TS_HTLCDescriptor_set_per_commitment_number(uint64_t this_ptr, int64_t val) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKTxOut val_conv = *(LDKTxOut*)(val_ptr);
- val_conv = TxOut_clone((LDKTxOut*)untag_ptr(val));
- StaticPaymentOutputDescriptor_set_output(&this_ptr_conv, val_conv);
+ HTLCDescriptor_set_per_commitment_number(&this_ptr_conv, val);
}
-int8_tArray __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_channel_keys_id"))) TS_StaticPaymentOutputDescriptor_get_channel_keys_id(uint64_t this_ptr) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+int8_tArray __attribute__((export_name("TS_HTLCDescriptor_get_per_commitment_point"))) TS_HTLCDescriptor_get_per_commitment_point(uint64_t this_ptr) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *StaticPaymentOutputDescriptor_get_channel_keys_id(&this_ptr_conv), 32);
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, HTLCDescriptor_get_per_commitment_point(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_channel_keys_id"))) TS_StaticPaymentOutputDescriptor_set_channel_keys_id(uint64_t this_ptr, int8_tArray val) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+void __attribute__((export_name("TS_HTLCDescriptor_set_per_commitment_point"))) TS_HTLCDescriptor_set_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- StaticPaymentOutputDescriptor_set_channel_keys_id(&this_ptr_conv, val_ref);
+ LDKPublicKey val_ref;
+ CHECK(val->arr_len == 33);
+ memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
+ HTLCDescriptor_set_per_commitment_point(&this_ptr_conv, val_ref);
}
-
-int64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_channel_value_satoshis"))) TS_StaticPaymentOutputDescriptor_get_channel_value_satoshis(uint64_t this_ptr) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+
+int32_t __attribute__((export_name("TS_HTLCDescriptor_get_feerate_per_kw"))) TS_HTLCDescriptor_get_feerate_per_kw(uint64_t this_ptr) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- int64_t ret_conv = StaticPaymentOutputDescriptor_get_channel_value_satoshis(&this_ptr_conv);
+ int32_t ret_conv = HTLCDescriptor_get_feerate_per_kw(&this_ptr_conv);
return ret_conv;
}
-void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_channel_value_satoshis"))) TS_StaticPaymentOutputDescriptor_set_channel_value_satoshis(uint64_t this_ptr, int64_t val) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+void __attribute__((export_name("TS_HTLCDescriptor_set_feerate_per_kw"))) TS_HTLCDescriptor_set_feerate_per_kw(uint64_t this_ptr, int32_t val) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- StaticPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
+ HTLCDescriptor_set_feerate_per_kw(&this_ptr_conv, val);
}
-uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_get_channel_transaction_parameters"))) TS_StaticPaymentOutputDescriptor_get_channel_transaction_parameters(uint64_t this_ptr) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_get_htlc"))) TS_HTLCDescriptor_get_htlc(uint64_t this_ptr) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTransactionParameters ret_var = StaticPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv);
+ LDKHTLCOutputInCommitment ret_var = HTLCDescriptor_get_htlc(&this_ptr_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-void __attribute__((export_name("TS_StaticPaymentOutputDescriptor_set_channel_transaction_parameters"))) TS_StaticPaymentOutputDescriptor_set_channel_transaction_parameters(uint64_t this_ptr, uint64_t val) {
- LDKStaticPaymentOutputDescriptor this_ptr_conv;
+void __attribute__((export_name("TS_HTLCDescriptor_set_htlc"))) TS_HTLCDescriptor_set_htlc(uint64_t this_ptr, uint64_t val) {
+ LDKHTLCDescriptor this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKChannelTransactionParameters val_conv;
+ LDKHTLCOutputInCommitment val_conv;
val_conv.inner = untag_ptr(val);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = ChannelTransactionParameters_clone(&val_conv);
- StaticPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv);
+ val_conv = HTLCOutputInCommitment_clone(&val_conv);
+ HTLCDescriptor_set_htlc(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_new"))) TS_StaticPaymentOutputDescriptor_new(uint64_t outpoint_arg, uint64_t output_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, uint64_t channel_transaction_parameters_arg) {
- LDKOutPoint outpoint_arg_conv;
- outpoint_arg_conv.inner = untag_ptr(outpoint_arg);
- outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_arg_conv);
- outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
- void* output_arg_ptr = untag_ptr(output_arg);
- CHECK_ACCESS(output_arg_ptr);
- LDKTxOut output_arg_conv = *(LDKTxOut*)(output_arg_ptr);
- output_arg_conv = TxOut_clone((LDKTxOut*)untag_ptr(output_arg));
- LDKThirtyTwoBytes channel_keys_id_arg_ref;
- CHECK(channel_keys_id_arg->arr_len == 32);
- memcpy(channel_keys_id_arg_ref.data, channel_keys_id_arg->elems, 32); FREE(channel_keys_id_arg);
- LDKChannelTransactionParameters channel_transaction_parameters_arg_conv;
- channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg);
- channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv);
- channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv);
- LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_new(outpoint_arg_conv, output_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_get_preimage"))) TS_HTLCDescriptor_get_preimage(uint64_t this_ptr) {
+ LDKHTLCDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ");
+ *ret_copy = HTLCDescriptor_get_preimage(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-static inline uint64_t StaticPaymentOutputDescriptor_clone_ptr(LDKStaticPaymentOutputDescriptor *NONNULL_PTR arg) {
- LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_clone(arg);
+void __attribute__((export_name("TS_HTLCDescriptor_set_preimage"))) TS_HTLCDescriptor_set_preimage(uint64_t this_ptr, uint64_t val) {
+ LDKHTLCDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr);
+ val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val));
+ HTLCDescriptor_set_preimage(&this_ptr_conv, val_conv);
+}
+
+int8_tArray __attribute__((export_name("TS_HTLCDescriptor_get_counterparty_sig"))) TS_HTLCDescriptor_get_counterparty_sig(uint64_t this_ptr) {
+ LDKHTLCDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(64, __LINE__);
+ memcpy(ret_arr->elems, HTLCDescriptor_get_counterparty_sig(&this_ptr_conv).compact_form, 64);
+ return ret_arr;
+}
+
+void __attribute__((export_name("TS_HTLCDescriptor_set_counterparty_sig"))) TS_HTLCDescriptor_set_counterparty_sig(uint64_t this_ptr, int8_tArray val) {
+ LDKHTLCDescriptor this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKECDSASignature val_ref;
+ CHECK(val->arr_len == 64);
+ memcpy(val_ref.compact_form, val->elems, 64); FREE(val);
+ HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref);
+}
+
+static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) {
+ LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_clone_ptr"))) TS_StaticPaymentOutputDescriptor_clone_ptr(uint64_t arg) {
- LDKStaticPaymentOutputDescriptor arg_conv;
+int64_t __attribute__((export_name("TS_HTLCDescriptor_clone_ptr"))) TS_HTLCDescriptor_clone_ptr(uint64_t arg) {
+ LDKHTLCDescriptor arg_conv;
arg_conv.inner = untag_ptr(arg);
arg_conv.is_owned = ptr_is_owned(arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
arg_conv.is_owned = false;
- int64_t ret_conv = StaticPaymentOutputDescriptor_clone_ptr(&arg_conv);
+ int64_t ret_conv = HTLCDescriptor_clone_ptr(&arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_clone"))) TS_StaticPaymentOutputDescriptor_clone(uint64_t orig) {
- LDKStaticPaymentOutputDescriptor orig_conv;
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_clone"))) TS_HTLCDescriptor_clone(uint64_t orig) {
+ LDKHTLCDescriptor orig_conv;
orig_conv.inner = untag_ptr(orig);
orig_conv.is_owned = ptr_is_owned(orig);
CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
orig_conv.is_owned = false;
- LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_clone(&orig_conv);
+ LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(&orig_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_hash"))) TS_StaticPaymentOutputDescriptor_hash(uint64_t o) {
- LDKStaticPaymentOutputDescriptor o_conv;
- o_conv.inner = untag_ptr(o);
- o_conv.is_owned = ptr_is_owned(o);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
- o_conv.is_owned = false;
- int64_t ret_conv = StaticPaymentOutputDescriptor_hash(&o_conv);
- return ret_conv;
-}
-
-jboolean __attribute__((export_name("TS_StaticPaymentOutputDescriptor_eq"))) TS_StaticPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
- LDKStaticPaymentOutputDescriptor a_conv;
+jboolean __attribute__((export_name("TS_HTLCDescriptor_eq"))) TS_HTLCDescriptor_eq(uint64_t a, uint64_t b) {
+ LDKHTLCDescriptor a_conv;
a_conv.inner = untag_ptr(a);
a_conv.is_owned = ptr_is_owned(a);
CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
a_conv.is_owned = false;
- LDKStaticPaymentOutputDescriptor b_conv;
+ LDKHTLCDescriptor b_conv;
b_conv.inner = untag_ptr(b);
b_conv.is_owned = ptr_is_owned(b);
CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
b_conv.is_owned = false;
- jboolean ret_conv = StaticPaymentOutputDescriptor_eq(&a_conv, &b_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_witness_script"))) TS_StaticPaymentOutputDescriptor_witness_script(uint64_t this_arg) {
- LDKStaticPaymentOutputDescriptor this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
- *ret_copy = StaticPaymentOutputDescriptor_witness_script(&this_arg_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint32_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_max_witness_length"))) TS_StaticPaymentOutputDescriptor_max_witness_length(uint64_t this_arg) {
- LDKStaticPaymentOutputDescriptor this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- uint32_t ret_conv = StaticPaymentOutputDescriptor_max_witness_length(&this_arg_conv);
+ jboolean ret_conv = HTLCDescriptor_eq(&a_conv, &b_conv);
return ret_conv;
}
-int8_tArray __attribute__((export_name("TS_StaticPaymentOutputDescriptor_write"))) TS_StaticPaymentOutputDescriptor_write(uint64_t obj) {
- LDKStaticPaymentOutputDescriptor obj_conv;
+int8_tArray __attribute__((export_name("TS_HTLCDescriptor_write"))) TS_HTLCDescriptor_write(uint64_t obj) {
+ LDKHTLCDescriptor obj_conv;
obj_conv.inner = untag_ptr(obj);
obj_conv.is_owned = ptr_is_owned(obj);
CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
obj_conv.is_owned = false;
- LDKCVec_u8Z ret_var = StaticPaymentOutputDescriptor_write(&obj_conv);
+ LDKCVec_u8Z ret_var = HTLCDescriptor_write(&obj_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
CVec_u8Z_free(ret_var);
return ret_arr;
}
-uint64_t __attribute__((export_name("TS_StaticPaymentOutputDescriptor_read"))) TS_StaticPaymentOutputDescriptor_read(int8_tArray ser) {
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_read"))) TS_HTLCDescriptor_read(int8_tArray ser) {
LDKu8slice ser_ref;
ser_ref.datalen = ser->arr_len;
ser_ref.data = ser->elems;
- LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ");
- *ret_conv = StaticPaymentOutputDescriptor_read(ser_ref);
+ LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
+ *ret_conv = HTLCDescriptor_read(ser_ref);
FREE(ser);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_SpendableOutputDescriptor_free"))) TS_SpendableOutputDescriptor_free(uint64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKSpendableOutputDescriptor this_ptr_conv = *(LDKSpendableOutputDescriptor*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- SpendableOutputDescriptor_free(this_ptr_conv);
-}
-
-static inline uint64_t SpendableOutputDescriptor_clone_ptr(LDKSpendableOutputDescriptor *NONNULL_PTR arg) {
- LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
- *ret_copy = SpendableOutputDescriptor_clone(arg);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t __attribute__((export_name("TS_SpendableOutputDescriptor_clone_ptr"))) TS_SpendableOutputDescriptor_clone_ptr(uint64_t arg) {
- LDKSpendableOutputDescriptor* arg_conv = (LDKSpendableOutputDescriptor*)untag_ptr(arg);
- int64_t ret_conv = SpendableOutputDescriptor_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_clone"))) TS_SpendableOutputDescriptor_clone(uint64_t orig) {
- LDKSpendableOutputDescriptor* orig_conv = (LDKSpendableOutputDescriptor*)untag_ptr(orig);
- LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
- *ret_copy = SpendableOutputDescriptor_clone(orig_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_static_output"))) TS_SpendableOutputDescriptor_static_output(uint64_t outpoint, uint64_t output) {
- LDKOutPoint outpoint_conv;
- outpoint_conv.inner = untag_ptr(outpoint);
- outpoint_conv.is_owned = ptr_is_owned(outpoint);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
- outpoint_conv = OutPoint_clone(&outpoint_conv);
- void* output_ptr = untag_ptr(output);
- CHECK_ACCESS(output_ptr);
- LDKTxOut output_conv = *(LDKTxOut*)(output_ptr);
- output_conv = TxOut_clone((LDKTxOut*)untag_ptr(output));
- LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
- *ret_copy = SpendableOutputDescriptor_static_output(outpoint_conv, output_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_delayed_payment_output"))) TS_SpendableOutputDescriptor_delayed_payment_output(uint64_t a) {
- LDKDelayedPaymentOutputDescriptor a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv = DelayedPaymentOutputDescriptor_clone(&a_conv);
- LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
- *ret_copy = SpendableOutputDescriptor_delayed_payment_output(a_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_outpoint"))) TS_HTLCDescriptor_outpoint(uint64_t this_arg) {
+ LDKHTLCDescriptor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKOutPoint ret_var = HTLCDescriptor_outpoint(&this_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_static_payment_output"))) TS_SpendableOutputDescriptor_static_payment_output(uint64_t a) {
- LDKStaticPaymentOutputDescriptor a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv = StaticPaymentOutputDescriptor_clone(&a_conv);
- LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
- *ret_copy = SpendableOutputDescriptor_static_payment_output(a_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_previous_utxo"))) TS_HTLCDescriptor_previous_utxo(uint64_t this_arg) {
+ LDKHTLCDescriptor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = HTLCDescriptor_previous_utxo(&this_arg_conv);
+ return tag_ptr(ret_ref, true);
}
-int64_t __attribute__((export_name("TS_SpendableOutputDescriptor_hash"))) TS_SpendableOutputDescriptor_hash(uint64_t o) {
- LDKSpendableOutputDescriptor* o_conv = (LDKSpendableOutputDescriptor*)untag_ptr(o);
- int64_t ret_conv = SpendableOutputDescriptor_hash(o_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_unsigned_tx_input"))) TS_HTLCDescriptor_unsigned_tx_input(uint64_t this_arg) {
+ LDKHTLCDescriptor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKTxIn* ret_ref = MALLOC(sizeof(LDKTxIn), "LDKTxIn");
+ *ret_ref = HTLCDescriptor_unsigned_tx_input(&this_arg_conv);
+ return tag_ptr(ret_ref, true);
}
-jboolean __attribute__((export_name("TS_SpendableOutputDescriptor_eq"))) TS_SpendableOutputDescriptor_eq(uint64_t a, uint64_t b) {
- LDKSpendableOutputDescriptor* a_conv = (LDKSpendableOutputDescriptor*)untag_ptr(a);
- LDKSpendableOutputDescriptor* b_conv = (LDKSpendableOutputDescriptor*)untag_ptr(b);
- jboolean ret_conv = SpendableOutputDescriptor_eq(a_conv, b_conv);
- return ret_conv;
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_tx_output"))) TS_HTLCDescriptor_tx_output(uint64_t this_arg) {
+ LDKHTLCDescriptor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+ *ret_ref = HTLCDescriptor_tx_output(&this_arg_conv);
+ return tag_ptr(ret_ref, true);
}
-int8_tArray __attribute__((export_name("TS_SpendableOutputDescriptor_write"))) TS_SpendableOutputDescriptor_write(uint64_t obj) {
- LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)untag_ptr(obj);
- LDKCVec_u8Z ret_var = SpendableOutputDescriptor_write(obj_conv);
+int8_tArray __attribute__((export_name("TS_HTLCDescriptor_witness_script"))) TS_HTLCDescriptor_witness_script(uint64_t this_arg) {
+ LDKHTLCDescriptor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKCVec_u8Z ret_var = HTLCDescriptor_witness_script(&this_arg_conv);
int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
CVec_u8Z_free(ret_var);
return ret_arr;
}
-uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_read"))) TS_SpendableOutputDescriptor_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_SpendableOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ), "LDKCResult_SpendableOutputDescriptorDecodeErrorZ");
- *ret_conv = SpendableOutputDescriptor_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
+int8_tArray __attribute__((export_name("TS_HTLCDescriptor_tx_input_witness"))) TS_HTLCDescriptor_tx_input_witness(uint64_t this_arg, int8_tArray signature, int8_tArray witness_script) {
+ LDKHTLCDescriptor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ LDKECDSASignature signature_ref;
+ CHECK(signature->arr_len == 64);
+ memcpy(signature_ref.compact_form, signature->elems, 64); FREE(signature);
+ LDKu8slice witness_script_ref;
+ witness_script_ref.datalen = witness_script->arr_len;
+ witness_script_ref.data = witness_script->elems;
+ LDKWitness ret_var = HTLCDescriptor_tx_input_witness(&this_arg_conv, signature_ref, witness_script_ref);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ Witness_free(ret_var);
+ FREE(witness_script);
+ return ret_arr;
}
-uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_create_spendable_outputs_psbt"))) TS_SpendableOutputDescriptor_create_spendable_outputs_psbt(uint64_tArray descriptors, uint64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, uint64_t locktime) {
- LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
- descriptors_constr.datalen = descriptors->arr_len;
- if (descriptors_constr.datalen > 0)
- descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
- else
- descriptors_constr.data = NULL;
- uint64_t* descriptors_vals = descriptors->elems;
- for (size_t b = 0; b < descriptors_constr.datalen; b++) {
- uint64_t descriptors_conv_27 = descriptors_vals[b];
- void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
- CHECK_ACCESS(descriptors_conv_27_ptr);
- LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
- descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
- descriptors_constr.data[b] = descriptors_conv_27_conv;
- }
- FREE(descriptors);
- LDKCVec_TxOutZ outputs_constr;
- outputs_constr.datalen = outputs->arr_len;
- if (outputs_constr.datalen > 0)
- outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
- else
- outputs_constr.data = NULL;
- uint64_t* outputs_vals = outputs->elems;
- for (size_t h = 0; h < outputs_constr.datalen; h++) {
- uint64_t outputs_conv_7 = outputs_vals[h];
- void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
- CHECK_ACCESS(outputs_conv_7_ptr);
- LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
- outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
- outputs_constr.data[h] = outputs_conv_7_conv;
- }
- FREE(outputs);
- LDKCVec_u8Z change_destination_script_ref;
- change_destination_script_ref.datalen = change_destination_script->arr_len;
- change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
- memcpy(change_destination_script_ref.data, change_destination_script->elems, change_destination_script_ref.datalen); FREE(change_destination_script);
- void* locktime_ptr = untag_ptr(locktime);
- CHECK_ACCESS(locktime_ptr);
- LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
- locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
- LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ), "LDKCResult_C2Tuple_CVec_u8ZusizeZNoneZ");
- *ret_conv = SpendableOutputDescriptor_create_spendable_outputs_psbt(descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
- return tag_ptr(ret_conv, true);
+uint64_t __attribute__((export_name("TS_HTLCDescriptor_derive_channel_signer"))) TS_HTLCDescriptor_derive_channel_signer(uint64_t this_arg, uint64_t signer_provider) {
+ LDKHTLCDescriptor this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ void* signer_provider_ptr = untag_ptr(signer_provider);
+ if (ptr_is_owned(signer_provider)) { CHECK_ACCESS(signer_provider_ptr); }
+ LDKSignerProvider* signer_provider_conv = (LDKSignerProvider*)signer_provider_ptr;
+ LDKWriteableEcdsaChannelSigner* ret_ret = MALLOC(sizeof(LDKWriteableEcdsaChannelSigner), "LDKWriteableEcdsaChannelSigner");
+ *ret_ret = HTLCDescriptor_derive_channel_signer(&this_arg_conv, signer_provider_conv);
+ return tag_ptr(ret_ret, true);
}
void __attribute__((export_name("TS_ChannelSigner_free"))) TS_ChannelSigner_free(uint64_t this_ptr) {
ChannelSigner_free(this_ptr_conv);
}
-void __attribute__((export_name("TS_EcdsaChannelSigner_free"))) TS_EcdsaChannelSigner_free(uint64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKEcdsaChannelSigner this_ptr_conv = *(LDKEcdsaChannelSigner*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- EcdsaChannelSigner_free(this_ptr_conv);
-}
-
-static inline uint64_t WriteableEcdsaChannelSigner_clone_ptr(LDKWriteableEcdsaChannelSigner *NONNULL_PTR arg) {
- LDKWriteableEcdsaChannelSigner* ret_ret = MALLOC(sizeof(LDKWriteableEcdsaChannelSigner), "LDKWriteableEcdsaChannelSigner");
- *ret_ret = WriteableEcdsaChannelSigner_clone(arg);
- return tag_ptr(ret_ret, true);
-}
-int64_t __attribute__((export_name("TS_WriteableEcdsaChannelSigner_clone_ptr"))) TS_WriteableEcdsaChannelSigner_clone_ptr(uint64_t arg) {
- void* arg_ptr = untag_ptr(arg);
- if (ptr_is_owned(arg)) { CHECK_ACCESS(arg_ptr); }
- LDKWriteableEcdsaChannelSigner* arg_conv = (LDKWriteableEcdsaChannelSigner*)arg_ptr;
- int64_t ret_conv = WriteableEcdsaChannelSigner_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_WriteableEcdsaChannelSigner_clone"))) TS_WriteableEcdsaChannelSigner_clone(uint64_t orig) {
- void* orig_ptr = untag_ptr(orig);
- if (ptr_is_owned(orig)) { CHECK_ACCESS(orig_ptr); }
- LDKWriteableEcdsaChannelSigner* orig_conv = (LDKWriteableEcdsaChannelSigner*)orig_ptr;
- LDKWriteableEcdsaChannelSigner* ret_ret = MALLOC(sizeof(LDKWriteableEcdsaChannelSigner), "LDKWriteableEcdsaChannelSigner");
- *ret_ret = WriteableEcdsaChannelSigner_clone(orig_conv);
- return tag_ptr(ret_ret, true);
-}
-
-void __attribute__((export_name("TS_WriteableEcdsaChannelSigner_free"))) TS_WriteableEcdsaChannelSigner_free(uint64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKWriteableEcdsaChannelSigner this_ptr_conv = *(LDKWriteableEcdsaChannelSigner*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- WriteableEcdsaChannelSigner_free(this_ptr_conv);
-}
-
uint32_t __attribute__((export_name("TS_Recipient_clone"))) TS_Recipient_clone(uint64_t orig) {
LDKRecipient* orig_conv = (LDKRecipient*)untag_ptr(orig);
uint32_t ret_conv = LDKRecipient_to_js(Recipient_clone(orig_conv));
descriptor_conv.is_owned = ptr_is_owned(descriptor);
CHECK_INNER_FIELD_ACCESS_OR_NULL(descriptor_conv);
descriptor_conv.is_owned = false;
- LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+ LDKCResult_WitnessNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_WitnessNoneZ), "LDKCResult_WitnessNoneZ");
*ret_conv = InMemorySigner_sign_counterparty_payment_input(&this_arg_conv, spend_tx_ref, input_idx, &descriptor_conv);
return tag_ptr(ret_conv, true);
}
descriptor_conv.is_owned = ptr_is_owned(descriptor);
CHECK_INNER_FIELD_ACCESS_OR_NULL(descriptor_conv);
descriptor_conv.is_owned = false;
- LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+ LDKCResult_WitnessNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_WitnessNoneZ), "LDKCResult_WitnessNoneZ");
*ret_conv = InMemorySigner_sign_dynamic_p2wsh_input(&this_arg_conv, spend_tx_ref, input_idx, &descriptor_conv);
return tag_ptr(ret_conv, true);
}
return ret_arr;
}
+void __attribute__((export_name("TS_EcdsaChannelSigner_free"))) TS_EcdsaChannelSigner_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKEcdsaChannelSigner this_ptr_conv = *(LDKEcdsaChannelSigner*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ EcdsaChannelSigner_free(this_ptr_conv);
+}
+
+static inline uint64_t WriteableEcdsaChannelSigner_clone_ptr(LDKWriteableEcdsaChannelSigner *NONNULL_PTR arg) {
+ LDKWriteableEcdsaChannelSigner* ret_ret = MALLOC(sizeof(LDKWriteableEcdsaChannelSigner), "LDKWriteableEcdsaChannelSigner");
+ *ret_ret = WriteableEcdsaChannelSigner_clone(arg);
+ return tag_ptr(ret_ret, true);
+}
+int64_t __attribute__((export_name("TS_WriteableEcdsaChannelSigner_clone_ptr"))) TS_WriteableEcdsaChannelSigner_clone_ptr(uint64_t arg) {
+ void* arg_ptr = untag_ptr(arg);
+ if (ptr_is_owned(arg)) { CHECK_ACCESS(arg_ptr); }
+ LDKWriteableEcdsaChannelSigner* arg_conv = (LDKWriteableEcdsaChannelSigner*)arg_ptr;
+ int64_t ret_conv = WriteableEcdsaChannelSigner_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_WriteableEcdsaChannelSigner_clone"))) TS_WriteableEcdsaChannelSigner_clone(uint64_t orig) {
+ void* orig_ptr = untag_ptr(orig);
+ if (ptr_is_owned(orig)) { CHECK_ACCESS(orig_ptr); }
+ LDKWriteableEcdsaChannelSigner* orig_conv = (LDKWriteableEcdsaChannelSigner*)orig_ptr;
+ LDKWriteableEcdsaChannelSigner* ret_ret = MALLOC(sizeof(LDKWriteableEcdsaChannelSigner), "LDKWriteableEcdsaChannelSigner");
+ *ret_ret = WriteableEcdsaChannelSigner_clone(orig_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+void __attribute__((export_name("TS_WriteableEcdsaChannelSigner_free"))) TS_WriteableEcdsaChannelSigner_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKWriteableEcdsaChannelSigner this_ptr_conv = *(LDKWriteableEcdsaChannelSigner*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ WriteableEcdsaChannelSigner_free(this_ptr_conv);
+}
+
void __attribute__((export_name("TS_OnionMessenger_free"))) TS_OnionMessenger_free(uint64_t this_obj) {
LDKOnionMessenger this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
DefaultMessageRouter_free(this_obj_conv);
}
-uint64_t __attribute__((export_name("TS_DefaultMessageRouter_new"))) TS_DefaultMessageRouter_new() {
- LDKDefaultMessageRouter ret_var = DefaultMessageRouter_new();
+uint64_t __attribute__((export_name("TS_DefaultMessageRouter_new"))) TS_DefaultMessageRouter_new(uint64_t network_graph, uint64_t entropy_source) {
+ LDKNetworkGraph network_graph_conv;
+ network_graph_conv.inner = untag_ptr(network_graph);
+ network_graph_conv.is_owned = ptr_is_owned(network_graph);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+ network_graph_conv.is_owned = false;
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ CHECK_ACCESS(entropy_source_ptr);
+ LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+ if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+ }
+ LDKDefaultMessageRouter ret_var = DefaultMessageRouter_new(&network_graph_conv, entropy_source_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
OnionMessagePath_set_destination(&this_ptr_conv, val_conv);
}
-uint64_t __attribute__((export_name("TS_OnionMessagePath_new"))) TS_OnionMessagePath_new(ptrArray intermediate_nodes_arg, uint64_t destination_arg) {
+uint64_t __attribute__((export_name("TS_OnionMessagePath_get_first_node_addresses"))) TS_OnionMessagePath_get_first_node_addresses(uint64_t this_ptr) {
+ LDKOnionMessagePath this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKCOption_CVec_SocketAddressZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_SocketAddressZZ), "LDKCOption_CVec_SocketAddressZZ");
+ *ret_copy = OnionMessagePath_get_first_node_addresses(&this_ptr_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void __attribute__((export_name("TS_OnionMessagePath_set_first_node_addresses"))) TS_OnionMessagePath_set_first_node_addresses(uint64_t this_ptr, uint64_t val) {
+ LDKOnionMessagePath this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ void* val_ptr = untag_ptr(val);
+ CHECK_ACCESS(val_ptr);
+ LDKCOption_CVec_SocketAddressZZ val_conv = *(LDKCOption_CVec_SocketAddressZZ*)(val_ptr);
+ val_conv = COption_CVec_SocketAddressZZ_clone((LDKCOption_CVec_SocketAddressZZ*)untag_ptr(val));
+ OnionMessagePath_set_first_node_addresses(&this_ptr_conv, val_conv);
+}
+
+uint64_t __attribute__((export_name("TS_OnionMessagePath_new"))) TS_OnionMessagePath_new(ptrArray intermediate_nodes_arg, uint64_t destination_arg, uint64_t first_node_addresses_arg) {
LDKCVec_PublicKeyZ intermediate_nodes_arg_constr;
intermediate_nodes_arg_constr.datalen = intermediate_nodes_arg->arr_len;
if (intermediate_nodes_arg_constr.datalen > 0)
CHECK_ACCESS(destination_arg_ptr);
LDKDestination destination_arg_conv = *(LDKDestination*)(destination_arg_ptr);
destination_arg_conv = Destination_clone((LDKDestination*)untag_ptr(destination_arg));
- LDKOnionMessagePath ret_var = OnionMessagePath_new(intermediate_nodes_arg_constr, destination_arg_conv);
+ void* first_node_addresses_arg_ptr = untag_ptr(first_node_addresses_arg);
+ CHECK_ACCESS(first_node_addresses_arg_ptr);
+ LDKCOption_CVec_SocketAddressZZ first_node_addresses_arg_conv = *(LDKCOption_CVec_SocketAddressZZ*)(first_node_addresses_arg_ptr);
+ LDKOnionMessagePath ret_var = OnionMessagePath_new(intermediate_nodes_arg_constr, destination_arg_conv, first_node_addresses_arg_conv);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
+int8_tArray __attribute__((export_name("TS_OnionMessagePath_first_node"))) TS_OnionMessagePath_first_node(uint64_t this_arg) {
+ LDKOnionMessagePath this_arg_conv;
+ this_arg_conv.inner = untag_ptr(this_arg);
+ this_arg_conv.is_owned = ptr_is_owned(this_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+ this_arg_conv.is_owned = false;
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, OnionMessagePath_first_node(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
+}
+
void __attribute__((export_name("TS_Destination_free"))) TS_Destination_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+void __attribute__((export_name("TS_SendSuccess_free"))) TS_SendSuccess_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKSendSuccess this_ptr_conv = *(LDKSendSuccess*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ SendSuccess_free(this_ptr_conv);
+}
+
+static inline uint64_t SendSuccess_clone_ptr(LDKSendSuccess *NONNULL_PTR arg) {
+ LDKSendSuccess *ret_copy = MALLOC(sizeof(LDKSendSuccess), "LDKSendSuccess");
+ *ret_copy = SendSuccess_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_SendSuccess_clone_ptr"))) TS_SendSuccess_clone_ptr(uint64_t arg) {
+ LDKSendSuccess* arg_conv = (LDKSendSuccess*)untag_ptr(arg);
+ int64_t ret_conv = SendSuccess_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_SendSuccess_clone"))) TS_SendSuccess_clone(uint64_t orig) {
+ LDKSendSuccess* orig_conv = (LDKSendSuccess*)untag_ptr(orig);
+ LDKSendSuccess *ret_copy = MALLOC(sizeof(LDKSendSuccess), "LDKSendSuccess");
+ *ret_copy = SendSuccess_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_SendSuccess_buffered"))) TS_SendSuccess_buffered() {
+ LDKSendSuccess *ret_copy = MALLOC(sizeof(LDKSendSuccess), "LDKSendSuccess");
+ *ret_copy = SendSuccess_buffered();
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_SendSuccess_buffered_awaiting_connection"))) TS_SendSuccess_buffered_awaiting_connection(int8_tArray a) {
+ LDKPublicKey a_ref;
+ CHECK(a->arr_len == 33);
+ memcpy(a_ref.compressed_form, a->elems, 33); FREE(a);
+ LDKSendSuccess *ret_copy = MALLOC(sizeof(LDKSendSuccess), "LDKSendSuccess");
+ *ret_copy = SendSuccess_buffered_awaiting_connection(a_ref);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+jboolean __attribute__((export_name("TS_SendSuccess_eq"))) TS_SendSuccess_eq(uint64_t a, uint64_t b) {
+ LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a);
+ LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b);
+ jboolean ret_conv = SendSuccess_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void __attribute__((export_name("TS_SendError_free"))) TS_SendError_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_SendError_invalid_first_hop"))) TS_SendError_invalid_first_hop() {
+uint64_t __attribute__((export_name("TS_SendError_invalid_first_hop"))) TS_SendError_invalid_first_hop(int8_tArray a) {
+ LDKPublicKey a_ref;
+ CHECK(a->arr_len == 33);
+ memcpy(a_ref.compressed_form, a->elems, 33); FREE(a);
+ LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+ *ret_copy = SendError_invalid_first_hop(a_ref);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_SendError_path_not_found"))) TS_SendError_path_not_found() {
LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
- *ret_copy = SendError_invalid_first_hop();
+ *ret_copy = SendError_path_not_found();
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
CustomOnionMessageHandler_free(this_ptr_conv);
}
-uint64_t __attribute__((export_name("TS_create_onion_message"))) TS_create_onion_message(uint64_t entropy_source, uint64_t node_signer, uint64_t path, uint64_t message, uint64_t reply_path) {
+void __attribute__((export_name("TS_PeeledOnion_free"))) TS_PeeledOnion_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKPeeledOnion this_ptr_conv = *(LDKPeeledOnion*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ PeeledOnion_free(this_ptr_conv);
+}
+
+static inline uint64_t PeeledOnion_clone_ptr(LDKPeeledOnion *NONNULL_PTR arg) {
+ LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion");
+ *ret_copy = PeeledOnion_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_PeeledOnion_clone_ptr"))) TS_PeeledOnion_clone_ptr(uint64_t arg) {
+ LDKPeeledOnion* arg_conv = (LDKPeeledOnion*)untag_ptr(arg);
+ int64_t ret_conv = PeeledOnion_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_PeeledOnion_clone"))) TS_PeeledOnion_clone(uint64_t orig) {
+ LDKPeeledOnion* orig_conv = (LDKPeeledOnion*)untag_ptr(orig);
+ LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion");
+ *ret_copy = PeeledOnion_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_PeeledOnion_forward"))) TS_PeeledOnion_forward(int8_tArray a, uint64_t b) {
+ LDKPublicKey a_ref;
+ CHECK(a->arr_len == 33);
+ memcpy(a_ref.compressed_form, a->elems, 33); FREE(a);
+ LDKOnionMessage b_conv;
+ b_conv.inner = untag_ptr(b);
+ b_conv.is_owned = ptr_is_owned(b);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+ b_conv = OnionMessage_clone(&b_conv);
+ LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion");
+ *ret_copy = PeeledOnion_forward(a_ref, b_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_PeeledOnion_receive"))) TS_PeeledOnion_receive(uint64_t a, int8_tArray b, uint64_t c) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKParsedOnionMessageContents a_conv = *(LDKParsedOnionMessageContents*)(a_ptr);
+ a_conv = ParsedOnionMessageContents_clone((LDKParsedOnionMessageContents*)untag_ptr(a));
+ LDKThirtyTwoBytes b_ref;
+ CHECK(b->arr_len == 32);
+ memcpy(b_ref.data, b->elems, 32); FREE(b);
+ LDKBlindedPath c_conv;
+ c_conv.inner = untag_ptr(c);
+ c_conv.is_owned = ptr_is_owned(c);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(c_conv);
+ c_conv = BlindedPath_clone(&c_conv);
+ LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion");
+ *ret_copy = PeeledOnion_receive(a_conv, b_ref, c_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_create_onion_message"))) TS_create_onion_message(uint64_t entropy_source, uint64_t node_signer, uint64_t path, uint64_t contents, uint64_t reply_path) {
void* entropy_source_ptr = untag_ptr(entropy_source);
if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
path_conv.is_owned = ptr_is_owned(path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
path_conv = OnionMessagePath_clone(&path_conv);
- void* message_ptr = untag_ptr(message);
- CHECK_ACCESS(message_ptr);
- LDKOnionMessageContents message_conv = *(LDKOnionMessageContents*)(message_ptr);
- message_conv = OnionMessageContents_clone((LDKOnionMessageContents*)untag_ptr(message));
+ void* contents_ptr = untag_ptr(contents);
+ CHECK_ACCESS(contents_ptr);
+ LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr);
+ if (contents_conv.free == LDKOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOnionMessageContents_JCalls_cloned(&contents_conv);
+ }
LDKBlindedPath reply_path_conv;
reply_path_conv.inner = untag_ptr(reply_path);
reply_path_conv.is_owned = ptr_is_owned(reply_path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
reply_path_conv = BlindedPath_clone(&reply_path_conv);
- LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ), "LDKCResult_C2Tuple_PublicKeyOnionMessageZSendErrorZ");
- *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, message_conv, reply_path_conv);
+ LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+ *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+uint64_t __attribute__((export_name("TS_peel_onion_message"))) TS_peel_onion_message(uint64_t msg, uint64_t node_signer, uint64_t logger, uint64_t custom_handler) {
+ LDKOnionMessage msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv.is_owned = false;
+ void* node_signer_ptr = untag_ptr(node_signer);
+ CHECK_ACCESS(node_signer_ptr);
+ LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
+ if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKNodeSigner_JCalls_cloned(&node_signer_conv);
+ }
+ void* logger_ptr = untag_ptr(logger);
+ CHECK_ACCESS(logger_ptr);
+ LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+ if (logger_conv.free == LDKLogger_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKLogger_JCalls_cloned(&logger_conv);
+ }
+ void* custom_handler_ptr = untag_ptr(custom_handler);
+ CHECK_ACCESS(custom_handler_ptr);
+ LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
+ if (custom_handler_conv.free == LDKCustomOnionMessageHandler_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
+ }
+ LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+ *ret_conv = peel_onion_message(&msg_conv, node_signer_conv, logger_conv, custom_handler_conv);
return tag_ptr(ret_conv, true);
}
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_OnionMessenger_send_onion_message"))) TS_OnionMessenger_send_onion_message(uint64_t this_arg, uint64_t path, uint64_t message, uint64_t reply_path) {
+uint64_t __attribute__((export_name("TS_OnionMessenger_send_onion_message"))) TS_OnionMessenger_send_onion_message(uint64_t this_arg, uint64_t contents, uint64_t destination, uint64_t reply_path) {
LDKOnionMessenger this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
- LDKOnionMessagePath path_conv;
- path_conv.inner = untag_ptr(path);
- path_conv.is_owned = ptr_is_owned(path);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
- path_conv = OnionMessagePath_clone(&path_conv);
- void* message_ptr = untag_ptr(message);
- CHECK_ACCESS(message_ptr);
- LDKOnionMessageContents message_conv = *(LDKOnionMessageContents*)(message_ptr);
- message_conv = OnionMessageContents_clone((LDKOnionMessageContents*)untag_ptr(message));
+ void* contents_ptr = untag_ptr(contents);
+ CHECK_ACCESS(contents_ptr);
+ LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr);
+ if (contents_conv.free == LDKOnionMessageContents_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKOnionMessageContents_JCalls_cloned(&contents_conv);
+ }
+ void* destination_ptr = untag_ptr(destination);
+ CHECK_ACCESS(destination_ptr);
+ LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
+ destination_conv = Destination_clone((LDKDestination*)untag_ptr(destination));
LDKBlindedPath reply_path_conv;
reply_path_conv.inner = untag_ptr(reply_path);
reply_path_conv.is_owned = ptr_is_owned(reply_path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
reply_path_conv = BlindedPath_clone(&reply_path_conv);
- LDKCResult_NoneSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneSendErrorZ), "LDKCResult_NoneSendErrorZ");
- *ret_conv = OnionMessenger_send_onion_message(&this_arg_conv, path_conv, message_conv, reply_path_conv);
+ LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+ *ret_conv = OnionMessenger_send_onion_message(&this_arg_conv, contents_conv, destination_conv, reply_path_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_ret, true);
}
-uint64_t __attribute__((export_name("TS_OnionMessenger_as_OnionMessageProvider"))) TS_OnionMessenger_as_OnionMessageProvider(uint64_t this_arg) {
- LDKOnionMessenger this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKOnionMessageProvider* ret_ret = MALLOC(sizeof(LDKOnionMessageProvider), "LDKOnionMessageProvider");
- *ret_ret = OnionMessenger_as_OnionMessageProvider(&this_arg_conv);
- return tag_ptr(ret_ret, true);
-}
-
void __attribute__((export_name("TS_OffersMessageHandler_free"))) TS_OffersMessageHandler_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_conv;
}
-int64_t __attribute__((export_name("TS_OffersMessage_tlv_type"))) TS_OffersMessage_tlv_type(uint64_t this_arg) {
+uint64_t __attribute__((export_name("TS_OffersMessage_as_OnionMessageContents"))) TS_OffersMessage_as_OnionMessageContents(uint64_t this_arg) {
LDKOffersMessage* this_arg_conv = (LDKOffersMessage*)untag_ptr(this_arg);
- int64_t ret_conv = OffersMessage_tlv_type(this_arg_conv);
- return ret_conv;
+ LDKOnionMessageContents* ret_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *ret_ret = OffersMessage_as_OnionMessageContents(this_arg_conv);
+ return tag_ptr(ret_ret, true);
}
int8_tArray __attribute__((export_name("TS_OffersMessage_write"))) TS_OffersMessage_write(uint64_t obj) {
return ret_ref;
}
+int64_t __attribute__((export_name("TS_Packet_hash"))) TS_Packet_hash(uint64_t o) {
+ LDKPacket o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ int64_t ret_conv = Packet_hash(&o_conv);
+ return ret_conv;
+}
+
jboolean __attribute__((export_name("TS_Packet_eq"))) TS_Packet_eq(uint64_t a, uint64_t b) {
LDKPacket a_conv;
a_conv.inner = untag_ptr(a);
return ret_arr;
}
-void __attribute__((export_name("TS_OnionMessageContents_free"))) TS_OnionMessageContents_free(uint64_t this_ptr) {
+void __attribute__((export_name("TS_ParsedOnionMessageContents_free"))) TS_ParsedOnionMessageContents_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
CHECK_ACCESS(this_ptr_ptr);
- LDKOnionMessageContents this_ptr_conv = *(LDKOnionMessageContents*)(this_ptr_ptr);
+ LDKParsedOnionMessageContents this_ptr_conv = *(LDKParsedOnionMessageContents*)(this_ptr_ptr);
FREE(untag_ptr(this_ptr));
- OnionMessageContents_free(this_ptr_conv);
+ ParsedOnionMessageContents_free(this_ptr_conv);
}
-static inline uint64_t OnionMessageContents_clone_ptr(LDKOnionMessageContents *NONNULL_PTR arg) {
- LDKOnionMessageContents *ret_copy = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
- *ret_copy = OnionMessageContents_clone(arg);
+static inline uint64_t ParsedOnionMessageContents_clone_ptr(LDKParsedOnionMessageContents *NONNULL_PTR arg) {
+ LDKParsedOnionMessageContents *ret_copy = MALLOC(sizeof(LDKParsedOnionMessageContents), "LDKParsedOnionMessageContents");
+ *ret_copy = ParsedOnionMessageContents_clone(arg);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-int64_t __attribute__((export_name("TS_OnionMessageContents_clone_ptr"))) TS_OnionMessageContents_clone_ptr(uint64_t arg) {
- LDKOnionMessageContents* arg_conv = (LDKOnionMessageContents*)untag_ptr(arg);
- int64_t ret_conv = OnionMessageContents_clone_ptr(arg_conv);
+int64_t __attribute__((export_name("TS_ParsedOnionMessageContents_clone_ptr"))) TS_ParsedOnionMessageContents_clone_ptr(uint64_t arg) {
+ LDKParsedOnionMessageContents* arg_conv = (LDKParsedOnionMessageContents*)untag_ptr(arg);
+ int64_t ret_conv = ParsedOnionMessageContents_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_OnionMessageContents_clone"))) TS_OnionMessageContents_clone(uint64_t orig) {
- LDKOnionMessageContents* orig_conv = (LDKOnionMessageContents*)untag_ptr(orig);
- LDKOnionMessageContents *ret_copy = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
- *ret_copy = OnionMessageContents_clone(orig_conv);
+uint64_t __attribute__((export_name("TS_ParsedOnionMessageContents_clone"))) TS_ParsedOnionMessageContents_clone(uint64_t orig) {
+ LDKParsedOnionMessageContents* orig_conv = (LDKParsedOnionMessageContents*)untag_ptr(orig);
+ LDKParsedOnionMessageContents *ret_copy = MALLOC(sizeof(LDKParsedOnionMessageContents), "LDKParsedOnionMessageContents");
+ *ret_copy = ParsedOnionMessageContents_clone(orig_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_OnionMessageContents_offers"))) TS_OnionMessageContents_offers(uint64_t a) {
+uint64_t __attribute__((export_name("TS_ParsedOnionMessageContents_offers"))) TS_ParsedOnionMessageContents_offers(uint64_t a) {
void* a_ptr = untag_ptr(a);
CHECK_ACCESS(a_ptr);
LDKOffersMessage a_conv = *(LDKOffersMessage*)(a_ptr);
a_conv = OffersMessage_clone((LDKOffersMessage*)untag_ptr(a));
- LDKOnionMessageContents *ret_copy = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
- *ret_copy = OnionMessageContents_offers(a_conv);
+ LDKParsedOnionMessageContents *ret_copy = MALLOC(sizeof(LDKParsedOnionMessageContents), "LDKParsedOnionMessageContents");
+ *ret_copy = ParsedOnionMessageContents_offers(a_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_OnionMessageContents_custom"))) TS_OnionMessageContents_custom(uint64_t a) {
+uint64_t __attribute__((export_name("TS_ParsedOnionMessageContents_custom"))) TS_ParsedOnionMessageContents_custom(uint64_t a) {
void* a_ptr = untag_ptr(a);
CHECK_ACCESS(a_ptr);
- LDKCustomOnionMessageContents a_conv = *(LDKCustomOnionMessageContents*)(a_ptr);
- if (a_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+ LDKOnionMessageContents a_conv = *(LDKOnionMessageContents*)(a_ptr);
+ if (a_conv.free == LDKOnionMessageContents_JCalls_free) {
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKCustomOnionMessageContents_JCalls_cloned(&a_conv);
+ LDKOnionMessageContents_JCalls_cloned(&a_conv);
}
- LDKOnionMessageContents *ret_copy = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
- *ret_copy = OnionMessageContents_custom(a_conv);
+ LDKParsedOnionMessageContents *ret_copy = MALLOC(sizeof(LDKParsedOnionMessageContents), "LDKParsedOnionMessageContents");
+ *ret_copy = ParsedOnionMessageContents_custom(a_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-static inline uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg) {
- LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
- *ret_ret = CustomOnionMessageContents_clone(arg);
+uint64_t __attribute__((export_name("TS_ParsedOnionMessageContents_as_OnionMessageContents"))) TS_ParsedOnionMessageContents_as_OnionMessageContents(uint64_t this_arg) {
+ LDKParsedOnionMessageContents* this_arg_conv = (LDKParsedOnionMessageContents*)untag_ptr(this_arg);
+ LDKOnionMessageContents* ret_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *ret_ret = ParsedOnionMessageContents_as_OnionMessageContents(this_arg_conv);
return tag_ptr(ret_ret, true);
}
-int64_t __attribute__((export_name("TS_CustomOnionMessageContents_clone_ptr"))) TS_CustomOnionMessageContents_clone_ptr(uint64_t arg) {
+
+int8_tArray __attribute__((export_name("TS_ParsedOnionMessageContents_write"))) TS_ParsedOnionMessageContents_write(uint64_t obj) {
+ LDKParsedOnionMessageContents* obj_conv = (LDKParsedOnionMessageContents*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = ParsedOnionMessageContents_write(obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+static inline uint64_t OnionMessageContents_clone_ptr(LDKOnionMessageContents *NONNULL_PTR arg) {
+ LDKOnionMessageContents* ret_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *ret_ret = OnionMessageContents_clone(arg);
+ return tag_ptr(ret_ret, true);
+}
+int64_t __attribute__((export_name("TS_OnionMessageContents_clone_ptr"))) TS_OnionMessageContents_clone_ptr(uint64_t arg) {
void* arg_ptr = untag_ptr(arg);
if (ptr_is_owned(arg)) { CHECK_ACCESS(arg_ptr); }
- LDKCustomOnionMessageContents* arg_conv = (LDKCustomOnionMessageContents*)arg_ptr;
- int64_t ret_conv = CustomOnionMessageContents_clone_ptr(arg_conv);
+ LDKOnionMessageContents* arg_conv = (LDKOnionMessageContents*)arg_ptr;
+ int64_t ret_conv = OnionMessageContents_clone_ptr(arg_conv);
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_CustomOnionMessageContents_clone"))) TS_CustomOnionMessageContents_clone(uint64_t orig) {
+uint64_t __attribute__((export_name("TS_OnionMessageContents_clone"))) TS_OnionMessageContents_clone(uint64_t orig) {
void* orig_ptr = untag_ptr(orig);
if (ptr_is_owned(orig)) { CHECK_ACCESS(orig_ptr); }
- LDKCustomOnionMessageContents* orig_conv = (LDKCustomOnionMessageContents*)orig_ptr;
- LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
- *ret_ret = CustomOnionMessageContents_clone(orig_conv);
+ LDKOnionMessageContents* orig_conv = (LDKOnionMessageContents*)orig_ptr;
+ LDKOnionMessageContents* ret_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *ret_ret = OnionMessageContents_clone(orig_conv);
return tag_ptr(ret_ret, true);
}
-void __attribute__((export_name("TS_CustomOnionMessageContents_free"))) TS_CustomOnionMessageContents_free(uint64_t this_ptr) {
+void __attribute__((export_name("TS_OnionMessageContents_free"))) TS_OnionMessageContents_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
CHECK_ACCESS(this_ptr_ptr);
- LDKCustomOnionMessageContents this_ptr_conv = *(LDKCustomOnionMessageContents*)(this_ptr_ptr);
+ LDKOnionMessageContents this_ptr_conv = *(LDKOnionMessageContents*)(this_ptr_ptr);
FREE(untag_ptr(this_ptr));
- CustomOnionMessageContents_free(this_ptr_conv);
+ OnionMessageContents_free(this_ptr_conv);
}
void __attribute__((export_name("TS_BlindedPath_free"))) TS_BlindedPath_free(uint64_t this_obj) {
return ret_conv;
}
+uint64_t __attribute__((export_name("TS_BlindedPath_one_hop_for_message"))) TS_BlindedPath_one_hop_for_message(int8_tArray recipient_node_id, uint64_t entropy_source) {
+ LDKPublicKey recipient_node_id_ref;
+ CHECK(recipient_node_id->arr_len == 33);
+ memcpy(recipient_node_id_ref.compressed_form, recipient_node_id->elems, 33); FREE(recipient_node_id);
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+ LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ");
+ *ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint64_t __attribute__((export_name("TS_BlindedPath_new_for_message"))) TS_BlindedPath_new_for_message(ptrArray node_pks, uint64_t entropy_source) {
LDKCVec_PublicKeyZ node_pks_constr;
node_pks_constr.datalen = node_pks->arr_len;
return tag_ptr(ret_conv, true);
}
+uint64_t __attribute__((export_name("TS_BlindedPath_new_for_payment"))) TS_BlindedPath_new_for_payment(uint64_tArray intermediate_nodes, int8_tArray payee_node_id, uint64_t payee_tlvs, int64_t htlc_maximum_msat, uint64_t entropy_source) {
+ LDKCVec_ForwardNodeZ intermediate_nodes_constr;
+ intermediate_nodes_constr.datalen = intermediate_nodes->arr_len;
+ if (intermediate_nodes_constr.datalen > 0)
+ intermediate_nodes_constr.data = MALLOC(intermediate_nodes_constr.datalen * sizeof(LDKForwardNode), "LDKCVec_ForwardNodeZ Elements");
+ else
+ intermediate_nodes_constr.data = NULL;
+ uint64_t* intermediate_nodes_vals = intermediate_nodes->elems;
+ for (size_t n = 0; n < intermediate_nodes_constr.datalen; n++) {
+ uint64_t intermediate_nodes_conv_13 = intermediate_nodes_vals[n];
+ LDKForwardNode intermediate_nodes_conv_13_conv;
+ intermediate_nodes_conv_13_conv.inner = untag_ptr(intermediate_nodes_conv_13);
+ intermediate_nodes_conv_13_conv.is_owned = ptr_is_owned(intermediate_nodes_conv_13);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(intermediate_nodes_conv_13_conv);
+ intermediate_nodes_conv_13_conv = ForwardNode_clone(&intermediate_nodes_conv_13_conv);
+ intermediate_nodes_constr.data[n] = intermediate_nodes_conv_13_conv;
+ }
+ FREE(intermediate_nodes);
+ LDKPublicKey payee_node_id_ref;
+ CHECK(payee_node_id->arr_len == 33);
+ memcpy(payee_node_id_ref.compressed_form, payee_node_id->elems, 33); FREE(payee_node_id);
+ LDKReceiveTlvs payee_tlvs_conv;
+ payee_tlvs_conv.inner = untag_ptr(payee_tlvs);
+ payee_tlvs_conv.is_owned = ptr_is_owned(payee_tlvs);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv);
+ payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv);
+ void* entropy_source_ptr = untag_ptr(entropy_source);
+ if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+ LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+ LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ");
+ *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv);
+ return tag_ptr(ret_conv, true);
+}
+
int8_tArray __attribute__((export_name("TS_BlindedPath_write"))) TS_BlindedPath_write(uint64_t obj) {
LDKBlindedPath obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_arr;
}
-uint64_t __attribute__((export_name("TS_ReceiveTlvs_read"))) TS_ReceiveTlvs_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_ReceiveTlvsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReceiveTlvsDecodeErrorZ), "LDKCResult_ReceiveTlvsDecodeErrorZ");
- *ret_conv = ReceiveTlvs_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
int8_tArray __attribute__((export_name("TS_PaymentRelay_write"))) TS_PaymentRelay_write(uint64_t obj) {
LDKPaymentRelay obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_conv;
}
+uint64_t __attribute__((export_name("TS_PaymentPurpose_preimage"))) TS_PaymentPurpose_preimage(uint64_t this_arg) {
+ LDKPaymentPurpose* this_arg_conv = (LDKPaymentPurpose*)untag_ptr(this_arg);
+ LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ");
+ *ret_copy = PaymentPurpose_preimage(this_arg_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
int8_tArray __attribute__((export_name("TS_PaymentPurpose_write"))) TS_PaymentPurpose_write(uint64_t obj) {
LDKPaymentPurpose* obj_conv = (LDKPaymentPurpose*)untag_ptr(obj);
LDKCVec_u8Z ret_var = PaymentPurpose_write(obj_conv);
ClaimedHTLC_set_value_msat(&this_ptr_conv, val);
}
-uint64_t __attribute__((export_name("TS_ClaimedHTLC_new"))) TS_ClaimedHTLC_new(int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg) {
+int64_t __attribute__((export_name("TS_ClaimedHTLC_get_counterparty_skimmed_fee_msat"))) TS_ClaimedHTLC_get_counterparty_skimmed_fee_msat(uint64_t this_ptr) {
+ LDKClaimedHTLC this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ int64_t ret_conv = ClaimedHTLC_get_counterparty_skimmed_fee_msat(&this_ptr_conv);
+ return ret_conv;
+}
+
+void __attribute__((export_name("TS_ClaimedHTLC_set_counterparty_skimmed_fee_msat"))) TS_ClaimedHTLC_set_counterparty_skimmed_fee_msat(uint64_t this_ptr, int64_t val) {
+ LDKClaimedHTLC this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val);
+}
+
+uint64_t __attribute__((export_name("TS_ClaimedHTLC_new"))) TS_ClaimedHTLC_new(int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) {
LDKThirtyTwoBytes channel_id_arg_ref;
CHECK(channel_id_arg->arr_len == 32);
memcpy(channel_id_arg_ref.data, channel_id_arg->elems, 32); FREE(channel_id_arg);
LDKU128 user_channel_id_arg_ref;
CHECK(user_channel_id_arg->arr_len == 16);
memcpy(user_channel_id_arg_ref.le_bytes, user_channel_id_arg->elems, 16); FREE(user_channel_id_arg);
- LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg);
+ LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
uint64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
+uint64_t __attribute__((export_name("TS_Event_connection_needed"))) TS_Event_connection_needed(int8_tArray node_id, uint64_tArray addresses) {
+ LDKPublicKey node_id_ref;
+ CHECK(node_id->arr_len == 33);
+ memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
+ LDKCVec_SocketAddressZ addresses_constr;
+ addresses_constr.datalen = addresses->arr_len;
+ if (addresses_constr.datalen > 0)
+ addresses_constr.data = MALLOC(addresses_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements");
+ else
+ addresses_constr.data = NULL;
+ uint64_t* addresses_vals = addresses->elems;
+ for (size_t p = 0; p < addresses_constr.datalen; p++) {
+ uint64_t addresses_conv_15 = addresses_vals[p];
+ void* addresses_conv_15_ptr = untag_ptr(addresses_conv_15);
+ CHECK_ACCESS(addresses_conv_15_ptr);
+ LDKSocketAddress addresses_conv_15_conv = *(LDKSocketAddress*)(addresses_conv_15_ptr);
+ addresses_constr.data[p] = addresses_conv_15_conv;
+ }
+ FREE(addresses);
+ LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
+ *ret_copy = Event_connection_needed(node_id_ref, addresses_constr);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_Event_invoice_request_failed"))) TS_Event_invoice_request_failed(int8_tArray payment_id) {
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK(payment_id->arr_len == 32);
+ memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
+ LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
+ *ret_copy = Event_invoice_request_failed(payment_id_ref);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
uint64_t __attribute__((export_name("TS_Event_payment_sent"))) TS_Event_payment_sent(uint64_t payment_id, int8_tArray payment_preimage, int8_tArray payment_hash, uint64_t fee_paid_msat) {
void* payment_id_ptr = untag_ptr(payment_id);
CHECK_ACCESS(payment_id_ptr);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_Event_channel_closed"))) TS_Event_channel_closed(int8_tArray channel_id, int8_tArray user_channel_id, uint64_t reason, int8_tArray counterparty_node_id, uint64_t channel_capacity_sats) {
+uint64_t __attribute__((export_name("TS_Event_channel_closed"))) TS_Event_channel_closed(int8_tArray channel_id, int8_tArray user_channel_id, uint64_t reason, int8_tArray counterparty_node_id, uint64_t channel_capacity_sats, uint64_t channel_funding_txo) {
LDKThirtyTwoBytes channel_id_ref;
CHECK(channel_id->arr_len == 32);
memcpy(channel_id_ref.data, channel_id->elems, 32); FREE(channel_id);
CHECK_ACCESS(channel_capacity_sats_ptr);
LDKCOption_u64Z channel_capacity_sats_conv = *(LDKCOption_u64Z*)(channel_capacity_sats_ptr);
channel_capacity_sats_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(channel_capacity_sats));
+ LDKOutPoint channel_funding_txo_conv;
+ channel_funding_txo_conv.inner = untag_ptr(channel_funding_txo);
+ channel_funding_txo_conv.is_owned = ptr_is_owned(channel_funding_txo);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv);
+ channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv);
+ *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_MessageSendEvent_send_accept_channel"))) TS_MessageSendEvent_send_accept_channel(int8_tArray node_id, uint64_t msg) {
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_accept_channel"))) TS_MessageSendEvent_send_accept_channel(int8_tArray node_id, uint64_t msg) {
+ LDKPublicKey node_id_ref;
+ CHECK(node_id->arr_len == 33);
+ memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
+ LDKAcceptChannel msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv = AcceptChannel_clone(&msg_conv);
+ LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
+ *ret_copy = MessageSendEvent_send_accept_channel(node_id_ref, msg_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_accept_channel_v2"))) TS_MessageSendEvent_send_accept_channel_v2(int8_tArray node_id, uint64_t msg) {
+ LDKPublicKey node_id_ref;
+ CHECK(node_id->arr_len == 33);
+ memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
+ LDKAcceptChannelV2 msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv = AcceptChannelV2_clone(&msg_conv);
+ LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
+ *ret_copy = MessageSendEvent_send_accept_channel_v2(node_id_ref, msg_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_open_channel"))) TS_MessageSendEvent_send_open_channel(int8_tArray node_id, uint64_t msg) {
+ LDKPublicKey node_id_ref;
+ CHECK(node_id->arr_len == 33);
+ memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
+ LDKOpenChannel msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv = OpenChannel_clone(&msg_conv);
+ LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
+ *ret_copy = MessageSendEvent_send_open_channel(node_id_ref, msg_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_open_channel_v2"))) TS_MessageSendEvent_send_open_channel_v2(int8_tArray node_id, uint64_t msg) {
+ LDKPublicKey node_id_ref;
+ CHECK(node_id->arr_len == 33);
+ memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
+ LDKOpenChannelV2 msg_conv;
+ msg_conv.inner = untag_ptr(msg);
+ msg_conv.is_owned = ptr_is_owned(msg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
+ msg_conv = OpenChannelV2_clone(&msg_conv);
+ LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
+ *ret_copy = MessageSendEvent_send_open_channel_v2(node_id_ref, msg_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_funding_created"))) TS_MessageSendEvent_send_funding_created(int8_tArray node_id, uint64_t msg) {
LDKPublicKey node_id_ref;
CHECK(node_id->arr_len == 33);
memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
- LDKAcceptChannel msg_conv;
+ LDKFundingCreated msg_conv;
msg_conv.inner = untag_ptr(msg);
msg_conv.is_owned = ptr_is_owned(msg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv = AcceptChannel_clone(&msg_conv);
+ msg_conv = FundingCreated_clone(&msg_conv);
LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
- *ret_copy = MessageSendEvent_send_accept_channel(node_id_ref, msg_conv);
+ *ret_copy = MessageSendEvent_send_funding_created(node_id_ref, msg_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_MessageSendEvent_send_accept_channel_v2"))) TS_MessageSendEvent_send_accept_channel_v2(int8_tArray node_id, uint64_t msg) {
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_funding_signed"))) TS_MessageSendEvent_send_funding_signed(int8_tArray node_id, uint64_t msg) {
LDKPublicKey node_id_ref;
CHECK(node_id->arr_len == 33);
memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
- LDKAcceptChannelV2 msg_conv;
+ LDKFundingSigned msg_conv;
msg_conv.inner = untag_ptr(msg);
msg_conv.is_owned = ptr_is_owned(msg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv = AcceptChannelV2_clone(&msg_conv);
+ msg_conv = FundingSigned_clone(&msg_conv);
LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
- *ret_copy = MessageSendEvent_send_accept_channel_v2(node_id_ref, msg_conv);
+ *ret_copy = MessageSendEvent_send_funding_signed(node_id_ref, msg_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_MessageSendEvent_send_open_channel"))) TS_MessageSendEvent_send_open_channel(int8_tArray node_id, uint64_t msg) {
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_stfu"))) TS_MessageSendEvent_send_stfu(int8_tArray node_id, uint64_t msg) {
LDKPublicKey node_id_ref;
CHECK(node_id->arr_len == 33);
memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
- LDKOpenChannel msg_conv;
+ LDKStfu msg_conv;
msg_conv.inner = untag_ptr(msg);
msg_conv.is_owned = ptr_is_owned(msg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv = OpenChannel_clone(&msg_conv);
+ msg_conv = Stfu_clone(&msg_conv);
LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
- *ret_copy = MessageSendEvent_send_open_channel(node_id_ref, msg_conv);
+ *ret_copy = MessageSendEvent_send_stfu(node_id_ref, msg_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_MessageSendEvent_send_open_channel_v2"))) TS_MessageSendEvent_send_open_channel_v2(int8_tArray node_id, uint64_t msg) {
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_splice"))) TS_MessageSendEvent_send_splice(int8_tArray node_id, uint64_t msg) {
LDKPublicKey node_id_ref;
CHECK(node_id->arr_len == 33);
memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
- LDKOpenChannelV2 msg_conv;
+ LDKSplice msg_conv;
msg_conv.inner = untag_ptr(msg);
msg_conv.is_owned = ptr_is_owned(msg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv = OpenChannelV2_clone(&msg_conv);
+ msg_conv = Splice_clone(&msg_conv);
LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
- *ret_copy = MessageSendEvent_send_open_channel_v2(node_id_ref, msg_conv);
+ *ret_copy = MessageSendEvent_send_splice(node_id_ref, msg_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_MessageSendEvent_send_funding_created"))) TS_MessageSendEvent_send_funding_created(int8_tArray node_id, uint64_t msg) {
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_splice_ack"))) TS_MessageSendEvent_send_splice_ack(int8_tArray node_id, uint64_t msg) {
LDKPublicKey node_id_ref;
CHECK(node_id->arr_len == 33);
memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
- LDKFundingCreated msg_conv;
+ LDKSpliceAck msg_conv;
msg_conv.inner = untag_ptr(msg);
msg_conv.is_owned = ptr_is_owned(msg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv = FundingCreated_clone(&msg_conv);
+ msg_conv = SpliceAck_clone(&msg_conv);
LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
- *ret_copy = MessageSendEvent_send_funding_created(node_id_ref, msg_conv);
+ *ret_copy = MessageSendEvent_send_splice_ack(node_id_ref, msg_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-uint64_t __attribute__((export_name("TS_MessageSendEvent_send_funding_signed"))) TS_MessageSendEvent_send_funding_signed(int8_tArray node_id, uint64_t msg) {
+uint64_t __attribute__((export_name("TS_MessageSendEvent_send_splice_locked"))) TS_MessageSendEvent_send_splice_locked(int8_tArray node_id, uint64_t msg) {
LDKPublicKey node_id_ref;
CHECK(node_id->arr_len == 33);
memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
- LDKFundingSigned msg_conv;
+ LDKSpliceLocked msg_conv;
msg_conv.inner = untag_ptr(msg);
msg_conv.is_owned = ptr_is_owned(msg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
- msg_conv = FundingSigned_clone(&msg_conv);
+ msg_conv = SpliceLocked_clone(&msg_conv);
LDKMessageSendEvent *ret_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
- *ret_copy = MessageSendEvent_send_funding_signed(node_id_ref, msg_conv);
+ *ret_copy = MessageSendEvent_send_splice_locked(node_id_ref, msg_conv);
uint64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
MessageSendEventsProvider_free(this_ptr_conv);
}
-void __attribute__((export_name("TS_OnionMessageProvider_free"))) TS_OnionMessageProvider_free(uint64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKOnionMessageProvider this_ptr_conv = *(LDKOnionMessageProvider*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- OnionMessageProvider_free(this_ptr_conv);
-}
-
void __attribute__((export_name("TS_EventsProvider_free"))) TS_EventsProvider_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
EventHandler_free(this_ptr_conv);
}
-void __attribute__((export_name("TS_ChannelDerivationParameters_free"))) TS_ChannelDerivationParameters_free(uint64_t this_obj) {
- LDKChannelDerivationParameters this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- ChannelDerivationParameters_free(this_obj_conv);
-}
-
-int64_t __attribute__((export_name("TS_ChannelDerivationParameters_get_value_satoshis"))) TS_ChannelDerivationParameters_get_value_satoshis(uint64_t this_ptr) {
- LDKChannelDerivationParameters this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = ChannelDerivationParameters_get_value_satoshis(&this_ptr_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_ChannelDerivationParameters_set_value_satoshis"))) TS_ChannelDerivationParameters_set_value_satoshis(uint64_t this_ptr, int64_t val) {
- LDKChannelDerivationParameters this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- ChannelDerivationParameters_set_value_satoshis(&this_ptr_conv, val);
-}
-
-int8_tArray __attribute__((export_name("TS_ChannelDerivationParameters_get_keys_id"))) TS_ChannelDerivationParameters_get_keys_id(uint64_t this_ptr) {
- LDKChannelDerivationParameters this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *ChannelDerivationParameters_get_keys_id(&this_ptr_conv), 32);
- return ret_arr;
-}
-
-void __attribute__((export_name("TS_ChannelDerivationParameters_set_keys_id"))) TS_ChannelDerivationParameters_set_keys_id(uint64_t this_ptr, int8_tArray val) {
- LDKChannelDerivationParameters this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKThirtyTwoBytes val_ref;
- CHECK(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- ChannelDerivationParameters_set_keys_id(&this_ptr_conv, val_ref);
-}
-
-uint64_t __attribute__((export_name("TS_ChannelDerivationParameters_get_transaction_parameters"))) TS_ChannelDerivationParameters_get_transaction_parameters(uint64_t this_ptr) {
- LDKChannelDerivationParameters this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTransactionParameters ret_var = ChannelDerivationParameters_get_transaction_parameters(&this_ptr_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-void __attribute__((export_name("TS_ChannelDerivationParameters_set_transaction_parameters"))) TS_ChannelDerivationParameters_set_transaction_parameters(uint64_t this_ptr, uint64_t val) {
- LDKChannelDerivationParameters this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelTransactionParameters val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = ChannelTransactionParameters_clone(&val_conv);
- ChannelDerivationParameters_set_transaction_parameters(&this_ptr_conv, val_conv);
-}
-
-uint64_t __attribute__((export_name("TS_ChannelDerivationParameters_new"))) TS_ChannelDerivationParameters_new(int64_t value_satoshis_arg, int8_tArray keys_id_arg, uint64_t transaction_parameters_arg) {
- LDKThirtyTwoBytes keys_id_arg_ref;
- CHECK(keys_id_arg->arr_len == 32);
- memcpy(keys_id_arg_ref.data, keys_id_arg->elems, 32); FREE(keys_id_arg);
- LDKChannelTransactionParameters transaction_parameters_arg_conv;
- transaction_parameters_arg_conv.inner = untag_ptr(transaction_parameters_arg);
- transaction_parameters_arg_conv.is_owned = ptr_is_owned(transaction_parameters_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(transaction_parameters_arg_conv);
- transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&transaction_parameters_arg_conv);
- LDKChannelDerivationParameters ret_var = ChannelDerivationParameters_new(value_satoshis_arg, keys_id_arg_ref, transaction_parameters_arg_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-static inline uint64_t ChannelDerivationParameters_clone_ptr(LDKChannelDerivationParameters *NONNULL_PTR arg) {
- LDKChannelDerivationParameters ret_var = ChannelDerivationParameters_clone(arg);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-int64_t __attribute__((export_name("TS_ChannelDerivationParameters_clone_ptr"))) TS_ChannelDerivationParameters_clone_ptr(uint64_t arg) {
- LDKChannelDerivationParameters arg_conv;
- arg_conv.inner = untag_ptr(arg);
- arg_conv.is_owned = ptr_is_owned(arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
- arg_conv.is_owned = false;
- int64_t ret_conv = ChannelDerivationParameters_clone_ptr(&arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_ChannelDerivationParameters_clone"))) TS_ChannelDerivationParameters_clone(uint64_t orig) {
- LDKChannelDerivationParameters orig_conv;
- orig_conv.inner = untag_ptr(orig);
- orig_conv.is_owned = ptr_is_owned(orig);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
- orig_conv.is_owned = false;
- LDKChannelDerivationParameters ret_var = ChannelDerivationParameters_clone(&orig_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-jboolean __attribute__((export_name("TS_ChannelDerivationParameters_eq"))) TS_ChannelDerivationParameters_eq(uint64_t a, uint64_t b) {
- LDKChannelDerivationParameters a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv.is_owned = false;
- LDKChannelDerivationParameters b_conv;
- b_conv.inner = untag_ptr(b);
- b_conv.is_owned = ptr_is_owned(b);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
- b_conv.is_owned = false;
- jboolean ret_conv = ChannelDerivationParameters_eq(&a_conv, &b_conv);
- return ret_conv;
-}
-
-int8_tArray __attribute__((export_name("TS_ChannelDerivationParameters_write"))) TS_ChannelDerivationParameters_write(uint64_t obj) {
- LDKChannelDerivationParameters obj_conv;
- obj_conv.inner = untag_ptr(obj);
- obj_conv.is_owned = ptr_is_owned(obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
- obj_conv.is_owned = false;
- LDKCVec_u8Z ret_var = ChannelDerivationParameters_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-uint64_t __attribute__((export_name("TS_ChannelDerivationParameters_read"))) TS_ChannelDerivationParameters_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_ChannelDerivationParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDerivationParametersDecodeErrorZ), "LDKCResult_ChannelDerivationParametersDecodeErrorZ");
- *ret_conv = ChannelDerivationParameters_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
void __attribute__((export_name("TS_AnchorDescriptor_free"))) TS_AnchorDescriptor_free(uint64_t this_obj) {
LDKAnchorDescriptor this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_ret, true);
}
-void __attribute__((export_name("TS_HTLCDescriptor_free"))) TS_HTLCDescriptor_free(uint64_t this_obj) {
- LDKHTLCDescriptor this_obj_conv;
- this_obj_conv.inner = untag_ptr(this_obj);
- this_obj_conv.is_owned = ptr_is_owned(this_obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
- HTLCDescriptor_free(this_obj_conv);
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_get_channel_derivation_parameters"))) TS_HTLCDescriptor_get_channel_derivation_parameters(uint64_t this_ptr) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelDerivationParameters ret_var = HTLCDescriptor_get_channel_derivation_parameters(&this_ptr_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-void __attribute__((export_name("TS_HTLCDescriptor_set_channel_derivation_parameters"))) TS_HTLCDescriptor_set_channel_derivation_parameters(uint64_t this_ptr, uint64_t val) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKChannelDerivationParameters val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = ChannelDerivationParameters_clone(&val_conv);
- HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv);
-}
-
-int64_t __attribute__((export_name("TS_HTLCDescriptor_get_per_commitment_number"))) TS_HTLCDescriptor_get_per_commitment_number(uint64_t this_ptr) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int64_t ret_conv = HTLCDescriptor_get_per_commitment_number(&this_ptr_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_HTLCDescriptor_set_per_commitment_number"))) TS_HTLCDescriptor_set_per_commitment_number(uint64_t this_ptr, int64_t val) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- HTLCDescriptor_set_per_commitment_number(&this_ptr_conv, val);
-}
-
-int8_tArray __attribute__((export_name("TS_HTLCDescriptor_get_per_commitment_point"))) TS_HTLCDescriptor_get_per_commitment_point(uint64_t this_ptr) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, HTLCDescriptor_get_per_commitment_point(&this_ptr_conv).compressed_form, 33);
- return ret_arr;
-}
-
-void __attribute__((export_name("TS_HTLCDescriptor_set_per_commitment_point"))) TS_HTLCDescriptor_set_per_commitment_point(uint64_t this_ptr, int8_tArray val) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKPublicKey val_ref;
- CHECK(val->arr_len == 33);
- memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- HTLCDescriptor_set_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_get_htlc"))) TS_HTLCDescriptor_get_htlc(uint64_t this_ptr) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKHTLCOutputInCommitment ret_var = HTLCDescriptor_get_htlc(&this_ptr_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-void __attribute__((export_name("TS_HTLCDescriptor_set_htlc"))) TS_HTLCDescriptor_set_htlc(uint64_t this_ptr, uint64_t val) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKHTLCOutputInCommitment val_conv;
- val_conv.inner = untag_ptr(val);
- val_conv.is_owned = ptr_is_owned(val);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
- val_conv = HTLCOutputInCommitment_clone(&val_conv);
- HTLCDescriptor_set_htlc(&this_ptr_conv, val_conv);
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_get_preimage"))) TS_HTLCDescriptor_get_preimage(uint64_t this_ptr) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ");
- *ret_copy = HTLCDescriptor_get_preimage(&this_ptr_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-void __attribute__((export_name("TS_HTLCDescriptor_set_preimage"))) TS_HTLCDescriptor_set_preimage(uint64_t this_ptr, uint64_t val) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- void* val_ptr = untag_ptr(val);
- CHECK_ACCESS(val_ptr);
- LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr);
- val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val));
- HTLCDescriptor_set_preimage(&this_ptr_conv, val_conv);
-}
-
-int8_tArray __attribute__((export_name("TS_HTLCDescriptor_get_counterparty_sig"))) TS_HTLCDescriptor_get_counterparty_sig(uint64_t this_ptr) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- int8_tArray ret_arr = init_int8_tArray(64, __LINE__);
- memcpy(ret_arr->elems, HTLCDescriptor_get_counterparty_sig(&this_ptr_conv).compact_form, 64);
- return ret_arr;
-}
-
-void __attribute__((export_name("TS_HTLCDescriptor_set_counterparty_sig"))) TS_HTLCDescriptor_set_counterparty_sig(uint64_t this_ptr, int8_tArray val) {
- LDKHTLCDescriptor this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- LDKECDSASignature val_ref;
- CHECK(val->arr_len == 64);
- memcpy(val_ref.compact_form, val->elems, 64); FREE(val);
- HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref);
-}
-
-static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) {
- LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-int64_t __attribute__((export_name("TS_HTLCDescriptor_clone_ptr"))) TS_HTLCDescriptor_clone_ptr(uint64_t arg) {
- LDKHTLCDescriptor arg_conv;
- arg_conv.inner = untag_ptr(arg);
- arg_conv.is_owned = ptr_is_owned(arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
- arg_conv.is_owned = false;
- int64_t ret_conv = HTLCDescriptor_clone_ptr(&arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_clone"))) TS_HTLCDescriptor_clone(uint64_t orig) {
- LDKHTLCDescriptor orig_conv;
- orig_conv.inner = untag_ptr(orig);
- orig_conv.is_owned = ptr_is_owned(orig);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
- orig_conv.is_owned = false;
- LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(&orig_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-jboolean __attribute__((export_name("TS_HTLCDescriptor_eq"))) TS_HTLCDescriptor_eq(uint64_t a, uint64_t b) {
- LDKHTLCDescriptor a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv.is_owned = false;
- LDKHTLCDescriptor b_conv;
- b_conv.inner = untag_ptr(b);
- b_conv.is_owned = ptr_is_owned(b);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
- b_conv.is_owned = false;
- jboolean ret_conv = HTLCDescriptor_eq(&a_conv, &b_conv);
- return ret_conv;
-}
-
-int8_tArray __attribute__((export_name("TS_HTLCDescriptor_write"))) TS_HTLCDescriptor_write(uint64_t obj) {
- LDKHTLCDescriptor obj_conv;
- obj_conv.inner = untag_ptr(obj);
- obj_conv.is_owned = ptr_is_owned(obj);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
- obj_conv.is_owned = false;
- LDKCVec_u8Z ret_var = HTLCDescriptor_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_read"))) TS_HTLCDescriptor_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_HTLCDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCDescriptorDecodeErrorZ), "LDKCResult_HTLCDescriptorDecodeErrorZ");
- *ret_conv = HTLCDescriptor_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_outpoint"))) TS_HTLCDescriptor_outpoint(uint64_t this_arg) {
- LDKHTLCDescriptor this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKOutPoint ret_var = HTLCDescriptor_outpoint(&this_arg_conv);
- uint64_t ret_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
- ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_previous_utxo"))) TS_HTLCDescriptor_previous_utxo(uint64_t this_arg) {
- LDKHTLCDescriptor this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
- *ret_ref = HTLCDescriptor_previous_utxo(&this_arg_conv);
- return tag_ptr(ret_ref, true);
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_unsigned_tx_input"))) TS_HTLCDescriptor_unsigned_tx_input(uint64_t this_arg) {
- LDKHTLCDescriptor this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKTxIn* ret_ref = MALLOC(sizeof(LDKTxIn), "LDKTxIn");
- *ret_ref = HTLCDescriptor_unsigned_tx_input(&this_arg_conv);
- return tag_ptr(ret_ref, true);
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_tx_output"))) TS_HTLCDescriptor_tx_output(uint64_t this_arg) {
- LDKHTLCDescriptor this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
- *ret_ref = HTLCDescriptor_tx_output(&this_arg_conv);
- return tag_ptr(ret_ref, true);
-}
-
-int8_tArray __attribute__((export_name("TS_HTLCDescriptor_witness_script"))) TS_HTLCDescriptor_witness_script(uint64_t this_arg) {
- LDKHTLCDescriptor this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKCVec_u8Z ret_var = HTLCDescriptor_witness_script(&this_arg_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int8_tArray __attribute__((export_name("TS_HTLCDescriptor_tx_input_witness"))) TS_HTLCDescriptor_tx_input_witness(uint64_t this_arg, int8_tArray signature, int8_tArray witness_script) {
- LDKHTLCDescriptor this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- LDKECDSASignature signature_ref;
- CHECK(signature->arr_len == 64);
- memcpy(signature_ref.compact_form, signature->elems, 64); FREE(signature);
- LDKu8slice witness_script_ref;
- witness_script_ref.datalen = witness_script->arr_len;
- witness_script_ref.data = witness_script->elems;
- LDKWitness ret_var = HTLCDescriptor_tx_input_witness(&this_arg_conv, signature_ref, witness_script_ref);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- Witness_free(ret_var);
- FREE(witness_script);
- return ret_arr;
-}
-
-uint64_t __attribute__((export_name("TS_HTLCDescriptor_derive_channel_signer"))) TS_HTLCDescriptor_derive_channel_signer(uint64_t this_arg, uint64_t signer_provider) {
- LDKHTLCDescriptor this_arg_conv;
- this_arg_conv.inner = untag_ptr(this_arg);
- this_arg_conv.is_owned = ptr_is_owned(this_arg);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
- this_arg_conv.is_owned = false;
- void* signer_provider_ptr = untag_ptr(signer_provider);
- if (ptr_is_owned(signer_provider)) { CHECK_ACCESS(signer_provider_ptr); }
- LDKSignerProvider* signer_provider_conv = (LDKSignerProvider*)signer_provider_ptr;
- LDKWriteableEcdsaChannelSigner* ret_ret = MALLOC(sizeof(LDKWriteableEcdsaChannelSigner), "LDKWriteableEcdsaChannelSigner");
- *ret_ret = HTLCDescriptor_derive_channel_signer(&this_arg_conv, signer_provider_conv);
- return tag_ptr(ret_ret, true);
-}
-
void __attribute__((export_name("TS_BumpTransactionEvent_free"))) TS_BumpTransactionEvent_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
+void __attribute__((export_name("TS_GraphSyncError_free"))) TS_GraphSyncError_free(uint64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKGraphSyncError this_ptr_conv = *(LDKGraphSyncError*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ GraphSyncError_free(this_ptr_conv);
+}
+
+static inline uint64_t GraphSyncError_clone_ptr(LDKGraphSyncError *NONNULL_PTR arg) {
+ LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+ *ret_copy = GraphSyncError_clone(arg);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t __attribute__((export_name("TS_GraphSyncError_clone_ptr"))) TS_GraphSyncError_clone_ptr(uint64_t arg) {
+ LDKGraphSyncError* arg_conv = (LDKGraphSyncError*)untag_ptr(arg);
+ int64_t ret_conv = GraphSyncError_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+uint64_t __attribute__((export_name("TS_GraphSyncError_clone"))) TS_GraphSyncError_clone(uint64_t orig) {
+ LDKGraphSyncError* orig_conv = (LDKGraphSyncError*)untag_ptr(orig);
+ LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+ *ret_copy = GraphSyncError_clone(orig_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_GraphSyncError_decode_error"))) TS_GraphSyncError_decode_error(uint64_t a) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKDecodeError a_conv = *(LDKDecodeError*)(a_ptr);
+ a_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(a));
+ LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+ *ret_copy = GraphSyncError_decode_error(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+uint64_t __attribute__((export_name("TS_GraphSyncError_lightning_error"))) TS_GraphSyncError_lightning_error(uint64_t a) {
+ LDKLightningError a_conv;
+ a_conv.inner = untag_ptr(a);
+ a_conv.is_owned = ptr_is_owned(a);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+ a_conv = LightningError_clone(&a_conv);
+ LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+ *ret_copy = GraphSyncError_lightning_error(a_conv);
+ uint64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
void __attribute__((export_name("TS_RapidGossipSync_free"))) TS_RapidGossipSync_free(uint64_t this_obj) {
LDKRapidGossipSync this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_conv;
}
-void __attribute__((export_name("TS_GraphSyncError_free"))) TS_GraphSyncError_free(uint64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKGraphSyncError this_ptr_conv = *(LDKGraphSyncError*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- GraphSyncError_free(this_ptr_conv);
-}
-
-static inline uint64_t GraphSyncError_clone_ptr(LDKGraphSyncError *NONNULL_PTR arg) {
- LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
- *ret_copy = GraphSyncError_clone(arg);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t __attribute__((export_name("TS_GraphSyncError_clone_ptr"))) TS_GraphSyncError_clone_ptr(uint64_t arg) {
- LDKGraphSyncError* arg_conv = (LDKGraphSyncError*)untag_ptr(arg);
- int64_t ret_conv = GraphSyncError_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_GraphSyncError_clone"))) TS_GraphSyncError_clone(uint64_t orig) {
- LDKGraphSyncError* orig_conv = (LDKGraphSyncError*)untag_ptr(orig);
- LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
- *ret_copy = GraphSyncError_clone(orig_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_GraphSyncError_decode_error"))) TS_GraphSyncError_decode_error(uint64_t a) {
- void* a_ptr = untag_ptr(a);
- CHECK_ACCESS(a_ptr);
- LDKDecodeError a_conv = *(LDKDecodeError*)(a_ptr);
- a_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(a));
- LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
- *ret_copy = GraphSyncError_decode_error(a_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_GraphSyncError_lightning_error"))) TS_GraphSyncError_lightning_error(uint64_t a) {
- LDKLightningError a_conv;
- a_conv.inner = untag_ptr(a);
- a_conv.is_owned = ptr_is_owned(a);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
- a_conv = LightningError_clone(&a_conv);
- LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
- *ret_copy = GraphSyncError_lightning_error(a_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
void __attribute__((export_name("TS_Bolt11ParseError_free"))) TS_Bolt11ParseError_free(uint64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return tag_ptr(ret_conv, true);
}
-jstring __attribute__((export_name("TS_Description_into_inner"))) TS_Description_into_inner(uint64_t this_arg) {
+uint64_t __attribute__((export_name("TS_Description_into_inner"))) TS_Description_into_inner(uint64_t this_arg) {
LDKDescription this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv = Description_clone(&this_arg_conv);
- LDKStr ret_str = Description_into_inner(this_arg_conv);
+ LDKUntrustedString ret_var = Description_into_inner(this_arg_conv);
+ uint64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
+jstring __attribute__((export_name("TS_Description_to_str"))) TS_Description_to_str(uint64_t o) {
+ LDKDescription o_conv;
+ o_conv.inner = untag_ptr(o);
+ o_conv.is_owned = ptr_is_owned(o);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+ o_conv.is_owned = false;
+ LDKStr ret_str = Description_to_str(&o_conv);
jstring ret_conv = str_ref_to_ts(ret_str.chars, ret_str.len);
Str_free(ret_str);
return ret_conv;
return ret_conv;
}
-uint64_t __attribute__((export_name("TS_pay_invoice"))) TS_pay_invoice(uint64_t invoice, uint64_t retry_strategy, uint64_t channelmanager) {
+uint64_t __attribute__((export_name("TS_payment_parameters_from_zero_amount_invoice"))) TS_payment_parameters_from_zero_amount_invoice(uint64_t invoice, int64_t amount_msat) {
LDKBolt11Invoice invoice_conv;
invoice_conv.inner = untag_ptr(invoice);
invoice_conv.is_owned = ptr_is_owned(invoice);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
invoice_conv.is_owned = false;
- void* retry_strategy_ptr = untag_ptr(retry_strategy);
- CHECK_ACCESS(retry_strategy_ptr);
- LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
- retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
- LDKChannelManager channelmanager_conv;
- channelmanager_conv.inner = untag_ptr(channelmanager);
- channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
- channelmanager_conv.is_owned = false;
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentErrorZ), "LDKCResult_ThirtyTwoBytesPaymentErrorZ");
- *ret_conv = pay_invoice(&invoice_conv, retry_strategy_conv, &channelmanager_conv);
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ");
+ *ret_conv = payment_parameters_from_zero_amount_invoice(&invoice_conv, amount_msat);
return tag_ptr(ret_conv, true);
}
-uint64_t __attribute__((export_name("TS_pay_invoice_with_id"))) TS_pay_invoice_with_id(uint64_t invoice, int8_tArray payment_id, uint64_t retry_strategy, uint64_t channelmanager) {
+uint64_t __attribute__((export_name("TS_payment_parameters_from_invoice"))) TS_payment_parameters_from_invoice(uint64_t invoice) {
LDKBolt11Invoice invoice_conv;
invoice_conv.inner = untag_ptr(invoice);
invoice_conv.is_owned = ptr_is_owned(invoice);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
invoice_conv.is_owned = false;
- LDKThirtyTwoBytes payment_id_ref;
- CHECK(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- void* retry_strategy_ptr = untag_ptr(retry_strategy);
- CHECK_ACCESS(retry_strategy_ptr);
- LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
- retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
- LDKChannelManager channelmanager_conv;
- channelmanager_conv.inner = untag_ptr(channelmanager);
- channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
- channelmanager_conv.is_owned = false;
- LDKCResult_NonePaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentErrorZ), "LDKCResult_NonePaymentErrorZ");
- *ret_conv = pay_invoice_with_id(&invoice_conv, payment_id_ref, retry_strategy_conv, &channelmanager_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_pay_zero_value_invoice"))) TS_pay_zero_value_invoice(uint64_t invoice, int64_t amount_msats, uint64_t retry_strategy, uint64_t channelmanager) {
- LDKBolt11Invoice invoice_conv;
- invoice_conv.inner = untag_ptr(invoice);
- invoice_conv.is_owned = ptr_is_owned(invoice);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
- invoice_conv.is_owned = false;
- void* retry_strategy_ptr = untag_ptr(retry_strategy);
- CHECK_ACCESS(retry_strategy_ptr);
- LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
- retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
- LDKChannelManager channelmanager_conv;
- channelmanager_conv.inner = untag_ptr(channelmanager);
- channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
- channelmanager_conv.is_owned = false;
- LDKCResult_ThirtyTwoBytesPaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentErrorZ), "LDKCResult_ThirtyTwoBytesPaymentErrorZ");
- *ret_conv = pay_zero_value_invoice(&invoice_conv, amount_msats, retry_strategy_conv, &channelmanager_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_pay_zero_value_invoice_with_id"))) TS_pay_zero_value_invoice_with_id(uint64_t invoice, int64_t amount_msats, int8_tArray payment_id, uint64_t retry_strategy, uint64_t channelmanager) {
- LDKBolt11Invoice invoice_conv;
- invoice_conv.inner = untag_ptr(invoice);
- invoice_conv.is_owned = ptr_is_owned(invoice);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
- invoice_conv.is_owned = false;
- LDKThirtyTwoBytes payment_id_ref;
- CHECK(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- void* retry_strategy_ptr = untag_ptr(retry_strategy);
- CHECK_ACCESS(retry_strategy_ptr);
- LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
- retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
- LDKChannelManager channelmanager_conv;
- channelmanager_conv.inner = untag_ptr(channelmanager);
- channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
- channelmanager_conv.is_owned = false;
- LDKCResult_NonePaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentErrorZ), "LDKCResult_NonePaymentErrorZ");
- *ret_conv = pay_zero_value_invoice_with_id(&invoice_conv, amount_msats, payment_id_ref, retry_strategy_conv, &channelmanager_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_preflight_probe_invoice"))) TS_preflight_probe_invoice(uint64_t invoice, uint64_t channelmanager, uint64_t liquidity_limit_multiplier) {
- LDKBolt11Invoice invoice_conv;
- invoice_conv.inner = untag_ptr(invoice);
- invoice_conv.is_owned = ptr_is_owned(invoice);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
- invoice_conv.is_owned = false;
- LDKChannelManager channelmanager_conv;
- channelmanager_conv.inner = untag_ptr(channelmanager);
- channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
- channelmanager_conv.is_owned = false;
- void* liquidity_limit_multiplier_ptr = untag_ptr(liquidity_limit_multiplier);
- CHECK_ACCESS(liquidity_limit_multiplier_ptr);
- LDKCOption_u64Z liquidity_limit_multiplier_conv = *(LDKCOption_u64Z*)(liquidity_limit_multiplier_ptr);
- liquidity_limit_multiplier_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(liquidity_limit_multiplier));
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ), "LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ");
- *ret_conv = preflight_probe_invoice(&invoice_conv, &channelmanager_conv, liquidity_limit_multiplier_conv);
- return tag_ptr(ret_conv, true);
-}
-
-uint64_t __attribute__((export_name("TS_preflight_probe_zero_value_invoice"))) TS_preflight_probe_zero_value_invoice(uint64_t invoice, int64_t amount_msat, uint64_t channelmanager, uint64_t liquidity_limit_multiplier) {
- LDKBolt11Invoice invoice_conv;
- invoice_conv.inner = untag_ptr(invoice);
- invoice_conv.is_owned = ptr_is_owned(invoice);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
- invoice_conv.is_owned = false;
- LDKChannelManager channelmanager_conv;
- channelmanager_conv.inner = untag_ptr(channelmanager);
- channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
- channelmanager_conv.is_owned = false;
- void* liquidity_limit_multiplier_ptr = untag_ptr(liquidity_limit_multiplier);
- CHECK_ACCESS(liquidity_limit_multiplier_ptr);
- LDKCOption_u64Z liquidity_limit_multiplier_conv = *(LDKCOption_u64Z*)(liquidity_limit_multiplier_ptr);
- liquidity_limit_multiplier_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(liquidity_limit_multiplier));
- LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ), "LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ");
- *ret_conv = preflight_probe_zero_value_invoice(&invoice_conv, amount_msat, &channelmanager_conv, liquidity_limit_multiplier_conv);
+ LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ");
+ *ret_conv = payment_parameters_from_invoice(&invoice_conv);
return tag_ptr(ret_conv, true);
}
-void __attribute__((export_name("TS_PaymentError_free"))) TS_PaymentError_free(uint64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKPaymentError this_ptr_conv = *(LDKPaymentError*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- PaymentError_free(this_ptr_conv);
-}
-
-static inline uint64_t PaymentError_clone_ptr(LDKPaymentError *NONNULL_PTR arg) {
- LDKPaymentError *ret_copy = MALLOC(sizeof(LDKPaymentError), "LDKPaymentError");
- *ret_copy = PaymentError_clone(arg);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t __attribute__((export_name("TS_PaymentError_clone_ptr"))) TS_PaymentError_clone_ptr(uint64_t arg) {
- LDKPaymentError* arg_conv = (LDKPaymentError*)untag_ptr(arg);
- int64_t ret_conv = PaymentError_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_PaymentError_clone"))) TS_PaymentError_clone(uint64_t orig) {
- LDKPaymentError* orig_conv = (LDKPaymentError*)untag_ptr(orig);
- LDKPaymentError *ret_copy = MALLOC(sizeof(LDKPaymentError), "LDKPaymentError");
- *ret_copy = PaymentError_clone(orig_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_PaymentError_invoice"))) TS_PaymentError_invoice(jstring a) {
- LDKStr a_conv = str_ref_to_owned_c(a);
- LDKPaymentError *ret_copy = MALLOC(sizeof(LDKPaymentError), "LDKPaymentError");
- *ret_copy = PaymentError_invoice(a_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_PaymentError_sending"))) TS_PaymentError_sending(uint32_t a) {
- LDKRetryableSendFailure a_conv = LDKRetryableSendFailure_from_js(a);
- LDKPaymentError *ret_copy = MALLOC(sizeof(LDKPaymentError), "LDKPaymentError");
- *ret_copy = PaymentError_sending(a_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-jboolean __attribute__((export_name("TS_PaymentError_eq"))) TS_PaymentError_eq(uint64_t a, uint64_t b) {
- LDKPaymentError* a_conv = (LDKPaymentError*)untag_ptr(a);
- LDKPaymentError* b_conv = (LDKPaymentError*)untag_ptr(b);
- jboolean ret_conv = PaymentError_eq(a_conv, b_conv);
- return ret_conv;
-}
-
-void __attribute__((export_name("TS_ProbingError_free"))) TS_ProbingError_free(uint64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKProbingError this_ptr_conv = *(LDKProbingError*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- ProbingError_free(this_ptr_conv);
-}
-
-static inline uint64_t ProbingError_clone_ptr(LDKProbingError *NONNULL_PTR arg) {
- LDKProbingError *ret_copy = MALLOC(sizeof(LDKProbingError), "LDKProbingError");
- *ret_copy = ProbingError_clone(arg);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t __attribute__((export_name("TS_ProbingError_clone_ptr"))) TS_ProbingError_clone_ptr(uint64_t arg) {
- LDKProbingError* arg_conv = (LDKProbingError*)untag_ptr(arg);
- int64_t ret_conv = ProbingError_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-uint64_t __attribute__((export_name("TS_ProbingError_clone"))) TS_ProbingError_clone(uint64_t orig) {
- LDKProbingError* orig_conv = (LDKProbingError*)untag_ptr(orig);
- LDKProbingError *ret_copy = MALLOC(sizeof(LDKProbingError), "LDKProbingError");
- *ret_copy = ProbingError_clone(orig_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_ProbingError_invoice"))) TS_ProbingError_invoice(jstring a) {
- LDKStr a_conv = str_ref_to_owned_c(a);
- LDKProbingError *ret_copy = MALLOC(sizeof(LDKProbingError), "LDKProbingError");
- *ret_copy = ProbingError_invoice(a_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-uint64_t __attribute__((export_name("TS_ProbingError_sending"))) TS_ProbingError_sending(uint64_t a) {
- void* a_ptr = untag_ptr(a);
- CHECK_ACCESS(a_ptr);
- LDKProbeSendFailure a_conv = *(LDKProbeSendFailure*)(a_ptr);
- a_conv = ProbeSendFailure_clone((LDKProbeSendFailure*)untag_ptr(a));
- LDKProbingError *ret_copy = MALLOC(sizeof(LDKProbingError), "LDKProbingError");
- *ret_copy = ProbingError_sending(a_conv);
- uint64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-jboolean __attribute__((export_name("TS_ProbingError_eq"))) TS_ProbingError_eq(uint64_t a, uint64_t b) {
- LDKProbingError* a_conv = (LDKProbingError*)untag_ptr(a);
- LDKProbingError* b_conv = (LDKProbingError*)untag_ptr(b);
- jboolean ret_conv = ProbingError_eq(a_conv, b_conv);
- return ret_conv;
-}
-
uint64_t __attribute__((export_name("TS_create_phantom_invoice"))) TS_create_phantom_invoice(uint64_t amt_msat, uint64_t payment_hash, jstring description, int32_t invoice_expiry_delta_secs, uint64_tArray phantom_route_hints, uint64_t entropy_source, uint64_t node_signer, uint64_t logger, uint32_t network, uint64_t min_final_cltv_expiry_delta, int64_t duration_since_epoch) {
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);