Skip to content

Commit e2c31f4

Browse files
committed
[TS] Update auto-generated bindings to LDK 0.1.1
1 parent c029ad4 commit e2c31f4

7 files changed

+163
-13
lines changed

ts/bindings.c

+48-2
Original file line numberDiff line numberDiff line change
@@ -6510,6 +6510,12 @@ uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Forward_get_blinde
65106510
blinded_ref = tag_ptr(blinded_var.inner, false);
65116511
return blinded_ref;
65126512
}
6513+
uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Forward_get_incoming_cltv_expiry"))) TS_LDKPendingHTLCRouting_Forward_get_incoming_cltv_expiry(uint64_t ptr) {
6514+
LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
6515+
assert(obj->tag == LDKPendingHTLCRouting_Forward);
6516+
uint64_t incoming_cltv_expiry_ref = tag_ptr(&obj->forward.incoming_cltv_expiry, false);
6517+
return incoming_cltv_expiry_ref;
6518+
}
65136519
uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_payment_data"))) TS_LDKPendingHTLCRouting_Receive_get_payment_data(uint64_t ptr) {
65146520
LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
65156521
assert(obj->tag == LDKPendingHTLCRouting_Receive);
@@ -44222,7 +44228,7 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_clone"))) TS_Pending
4422244228
return ret_ref;
4422344229
}
4422444230

44225-
uint64_t __attribute__((export_name("TS_PendingHTLCRouting_forward"))) TS_PendingHTLCRouting_forward(uint64_t onion_packet, int64_t short_channel_id, uint64_t blinded) {
44231+
uint64_t __attribute__((export_name("TS_PendingHTLCRouting_forward"))) TS_PendingHTLCRouting_forward(uint64_t onion_packet, int64_t short_channel_id, uint64_t blinded, uint64_t incoming_cltv_expiry) {
4422644232
LDKOnionPacket onion_packet_conv;
4422744233
onion_packet_conv.inner = untag_ptr(onion_packet);
4422844234
onion_packet_conv.is_owned = ptr_is_owned(onion_packet);
@@ -44233,8 +44239,12 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_forward"))) TS_Pendi
4423344239
blinded_conv.is_owned = ptr_is_owned(blinded);
4423444240
CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_conv);
4423544241
blinded_conv = BlindedForward_clone(&blinded_conv);
44242+
void* incoming_cltv_expiry_ptr = untag_ptr(incoming_cltv_expiry);
44243+
CHECK_ACCESS(incoming_cltv_expiry_ptr);
44244+
LDKCOption_u32Z incoming_cltv_expiry_conv = *(LDKCOption_u32Z*)(incoming_cltv_expiry_ptr);
44245+
incoming_cltv_expiry_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(incoming_cltv_expiry));
4423644246
LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
44237-
*ret_copy = PendingHTLCRouting_forward(onion_packet_conv, short_channel_id, blinded_conv);
44247+
*ret_copy = PendingHTLCRouting_forward(onion_packet_conv, short_channel_id, blinded_conv, incoming_cltv_expiry_conv);
4423844248
uint64_t ret_ref = tag_ptr(ret_copy, true);
4423944249
return ret_ref;
4424044250
}
@@ -45450,6 +45460,33 @@ void __attribute__((export_name("TS_ChannelManager_force_close_all_channels_wit
4545045460
ChannelManager_force_close_all_channels_without_broadcasting_txn(&this_arg_conv, error_message_conv);
4545145461
}
4545245462

45463+
uint64_t __attribute__((export_name("TS_ChannelManager_send_payment_with_route"))) TS_ChannelManager_send_payment_with_route(uint64_t this_arg, uint64_t route, int8_tArray payment_hash, uint64_t recipient_onion, int8_tArray payment_id) {
45464+
LDKChannelManager this_arg_conv;
45465+
this_arg_conv.inner = untag_ptr(this_arg);
45466+
this_arg_conv.is_owned = ptr_is_owned(this_arg);
45467+
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
45468+
this_arg_conv.is_owned = false;
45469+
LDKRoute route_conv;
45470+
route_conv.inner = untag_ptr(route);
45471+
route_conv.is_owned = ptr_is_owned(route);
45472+
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_conv);
45473+
route_conv = Route_clone(&route_conv);
45474+
LDKThirtyTwoBytes payment_hash_ref;
45475+
CHECK(payment_hash->arr_len == 32);
45476+
memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
45477+
LDKRecipientOnionFields recipient_onion_conv;
45478+
recipient_onion_conv.inner = untag_ptr(recipient_onion);
45479+
recipient_onion_conv.is_owned = ptr_is_owned(recipient_onion);
45480+
CHECK_INNER_FIELD_ACCESS_OR_NULL(recipient_onion_conv);
45481+
recipient_onion_conv = RecipientOnionFields_clone(&recipient_onion_conv);
45482+
LDKThirtyTwoBytes payment_id_ref;
45483+
CHECK(payment_id->arr_len == 32);
45484+
memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
45485+
LDKCResult_NoneRetryableSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneRetryableSendFailureZ), "LDKCResult_NoneRetryableSendFailureZ");
45486+
*ret_conv = ChannelManager_send_payment_with_route(&this_arg_conv, route_conv, payment_hash_ref, recipient_onion_conv, payment_id_ref);
45487+
return tag_ptr(ret_conv, true);
45488+
}
45489+
4545345490
uint64_t __attribute__((export_name("TS_ChannelManager_send_payment"))) TS_ChannelManager_send_payment(uint64_t this_arg, int8_tArray payment_hash, uint64_t recipient_onion, int8_tArray payment_id, uint64_t route_params, uint64_t retry_strategy) {
4545445491
LDKChannelManager this_arg_conv;
4545545492
this_arg_conv.inner = untag_ptr(this_arg);
@@ -76774,6 +76811,15 @@ uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_create_spenda
7677476811
return tag_ptr(ret_conv, true);
7677576812
}
7677676813

76814+
uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_spendable_outpoint"))) TS_SpendableOutputDescriptor_spendable_outpoint(uint64_t this_arg) {
76815+
LDKSpendableOutputDescriptor* this_arg_conv = (LDKSpendableOutputDescriptor*)untag_ptr(this_arg);
76816+
LDKOutPoint ret_var = SpendableOutputDescriptor_spendable_outpoint(this_arg_conv);
76817+
uint64_t ret_ref = 0;
76818+
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
76819+
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
76820+
return ret_ref;
76821+
}
76822+
7677776823
void __attribute__((export_name("TS_ChannelDerivationParameters_free"))) TS_ChannelDerivationParameters_free(uint64_t this_obj) {
7677876824
LDKChannelDerivationParameters this_obj_conv;
7677976825
this_obj_conv.inner = untag_ptr(this_obj);

ts/bindings.c.body

+48-2
Original file line numberDiff line numberDiff line change
@@ -6508,6 +6508,12 @@ uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Forward_get_blinde
65086508
blinded_ref = tag_ptr(blinded_var.inner, false);
65096509
return blinded_ref;
65106510
}
6511+
uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Forward_get_incoming_cltv_expiry"))) TS_LDKPendingHTLCRouting_Forward_get_incoming_cltv_expiry(uint64_t ptr) {
6512+
LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
6513+
assert(obj->tag == LDKPendingHTLCRouting_Forward);
6514+
uint64_t incoming_cltv_expiry_ref = tag_ptr(&obj->forward.incoming_cltv_expiry, false);
6515+
return incoming_cltv_expiry_ref;
6516+
}
65116517
uint64_t __attribute__((export_name("TS_LDKPendingHTLCRouting_Receive_get_payment_data"))) TS_LDKPendingHTLCRouting_Receive_get_payment_data(uint64_t ptr) {
65126518
LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
65136519
assert(obj->tag == LDKPendingHTLCRouting_Receive);
@@ -44220,7 +44226,7 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_clone"))) TS_Pending
4422044226
return ret_ref;
4422144227
}
4422244228

44223-
uint64_t __attribute__((export_name("TS_PendingHTLCRouting_forward"))) TS_PendingHTLCRouting_forward(uint64_t onion_packet, int64_t short_channel_id, uint64_t blinded) {
44229+
uint64_t __attribute__((export_name("TS_PendingHTLCRouting_forward"))) TS_PendingHTLCRouting_forward(uint64_t onion_packet, int64_t short_channel_id, uint64_t blinded, uint64_t incoming_cltv_expiry) {
4422444230
LDKOnionPacket onion_packet_conv;
4422544231
onion_packet_conv.inner = untag_ptr(onion_packet);
4422644232
onion_packet_conv.is_owned = ptr_is_owned(onion_packet);
@@ -44231,8 +44237,12 @@ uint64_t __attribute__((export_name("TS_PendingHTLCRouting_forward"))) TS_Pendi
4423144237
blinded_conv.is_owned = ptr_is_owned(blinded);
4423244238
CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_conv);
4423344239
blinded_conv = BlindedForward_clone(&blinded_conv);
44240+
void* incoming_cltv_expiry_ptr = untag_ptr(incoming_cltv_expiry);
44241+
CHECK_ACCESS(incoming_cltv_expiry_ptr);
44242+
LDKCOption_u32Z incoming_cltv_expiry_conv = *(LDKCOption_u32Z*)(incoming_cltv_expiry_ptr);
44243+
incoming_cltv_expiry_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(incoming_cltv_expiry));
4423444244
LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
44235-
*ret_copy = PendingHTLCRouting_forward(onion_packet_conv, short_channel_id, blinded_conv);
44245+
*ret_copy = PendingHTLCRouting_forward(onion_packet_conv, short_channel_id, blinded_conv, incoming_cltv_expiry_conv);
4423644246
uint64_t ret_ref = tag_ptr(ret_copy, true);
4423744247
return ret_ref;
4423844248
}
@@ -45448,6 +45458,33 @@ void __attribute__((export_name("TS_ChannelManager_force_close_all_channels_wit
4544845458
ChannelManager_force_close_all_channels_without_broadcasting_txn(&this_arg_conv, error_message_conv);
4544945459
}
4545045460

45461+
uint64_t __attribute__((export_name("TS_ChannelManager_send_payment_with_route"))) TS_ChannelManager_send_payment_with_route(uint64_t this_arg, uint64_t route, int8_tArray payment_hash, uint64_t recipient_onion, int8_tArray payment_id) {
45462+
LDKChannelManager this_arg_conv;
45463+
this_arg_conv.inner = untag_ptr(this_arg);
45464+
this_arg_conv.is_owned = ptr_is_owned(this_arg);
45465+
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
45466+
this_arg_conv.is_owned = false;
45467+
LDKRoute route_conv;
45468+
route_conv.inner = untag_ptr(route);
45469+
route_conv.is_owned = ptr_is_owned(route);
45470+
CHECK_INNER_FIELD_ACCESS_OR_NULL(route_conv);
45471+
route_conv = Route_clone(&route_conv);
45472+
LDKThirtyTwoBytes payment_hash_ref;
45473+
CHECK(payment_hash->arr_len == 32);
45474+
memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
45475+
LDKRecipientOnionFields recipient_onion_conv;
45476+
recipient_onion_conv.inner = untag_ptr(recipient_onion);
45477+
recipient_onion_conv.is_owned = ptr_is_owned(recipient_onion);
45478+
CHECK_INNER_FIELD_ACCESS_OR_NULL(recipient_onion_conv);
45479+
recipient_onion_conv = RecipientOnionFields_clone(&recipient_onion_conv);
45480+
LDKThirtyTwoBytes payment_id_ref;
45481+
CHECK(payment_id->arr_len == 32);
45482+
memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
45483+
LDKCResult_NoneRetryableSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneRetryableSendFailureZ), "LDKCResult_NoneRetryableSendFailureZ");
45484+
*ret_conv = ChannelManager_send_payment_with_route(&this_arg_conv, route_conv, payment_hash_ref, recipient_onion_conv, payment_id_ref);
45485+
return tag_ptr(ret_conv, true);
45486+
}
45487+
4545145488
uint64_t __attribute__((export_name("TS_ChannelManager_send_payment"))) TS_ChannelManager_send_payment(uint64_t this_arg, int8_tArray payment_hash, uint64_t recipient_onion, int8_tArray payment_id, uint64_t route_params, uint64_t retry_strategy) {
4545245489
LDKChannelManager this_arg_conv;
4545345490
this_arg_conv.inner = untag_ptr(this_arg);
@@ -76772,6 +76809,15 @@ uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_create_spenda
7677276809
return tag_ptr(ret_conv, true);
7677376810
}
7677476811

76812+
uint64_t __attribute__((export_name("TS_SpendableOutputDescriptor_spendable_outpoint"))) TS_SpendableOutputDescriptor_spendable_outpoint(uint64_t this_arg) {
76813+
LDKSpendableOutputDescriptor* this_arg_conv = (LDKSpendableOutputDescriptor*)untag_ptr(this_arg);
76814+
LDKOutPoint ret_var = SpendableOutputDescriptor_spendable_outpoint(this_arg_conv);
76815+
uint64_t ret_ref = 0;
76816+
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
76817+
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
76818+
return ret_ref;
76819+
}
76820+
7677576821
void __attribute__((export_name("TS_ChannelDerivationParameters_free"))) TS_ChannelDerivationParameters_free(uint64_t this_obj) {
7677676822
LDKChannelDerivationParameters this_obj_conv;
7677776823
this_obj_conv.inner = untag_ptr(this_obj);

ts/bindings.mts

+29-3
Original file line numberDiff line numberDiff line change
@@ -5921,6 +5921,14 @@ export function LDKPendingHTLCRouting_Forward_get_blinded(ptr: bigint): bigint {
59215921
return nativeResponseValue;
59225922
}
59235923
/* @internal */
5924+
export function LDKPendingHTLCRouting_Forward_get_incoming_cltv_expiry(ptr: bigint): bigint {
5925+
if(!isWasmInitialized) {
5926+
throw new Error("initializeWasm() must be awaited first!");
5927+
}
5928+
const nativeResponseValue = wasm.TS_LDKPendingHTLCRouting_Forward_get_incoming_cltv_expiry(ptr);
5929+
return nativeResponseValue;
5930+
}
5931+
/* @internal */
59245932
export function LDKPendingHTLCRouting_Receive_get_payment_data(ptr: bigint): bigint {
59255933
if(!isWasmInitialized) {
59265934
throw new Error("initializeWasm() must be awaited first!");
@@ -36676,13 +36684,13 @@ export function PendingHTLCRouting_clone(orig: bigint): bigint {
3667636684
const nativeResponseValue = wasm.TS_PendingHTLCRouting_clone(orig);
3667736685
return nativeResponseValue;
3667836686
}
36679-
// struct LDKPendingHTLCRouting PendingHTLCRouting_forward(struct LDKOnionPacket onion_packet, uint64_t short_channel_id, struct LDKBlindedForward blinded);
36687+
// struct LDKPendingHTLCRouting PendingHTLCRouting_forward(struct LDKOnionPacket onion_packet, uint64_t short_channel_id, struct LDKBlindedForward blinded, struct LDKCOption_u32Z incoming_cltv_expiry);
3668036688
/* @internal */
36681-
export function PendingHTLCRouting_forward(onion_packet: bigint, short_channel_id: bigint, blinded: bigint): bigint {
36689+
export function PendingHTLCRouting_forward(onion_packet: bigint, short_channel_id: bigint, blinded: bigint, incoming_cltv_expiry: bigint): bigint {
3668236690
if(!isWasmInitialized) {
3668336691
throw new Error("initializeWasm() must be awaited first!");
3668436692
}
36685-
const nativeResponseValue = wasm.TS_PendingHTLCRouting_forward(onion_packet, short_channel_id, blinded);
36693+
const nativeResponseValue = wasm.TS_PendingHTLCRouting_forward(onion_packet, short_channel_id, blinded, incoming_cltv_expiry);
3668636694
return nativeResponseValue;
3668736695
}
3668836696
// struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, struct LDKCOption_PaymentContextZ payment_context, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error);
@@ -37449,6 +37457,15 @@ export function ChannelManager_force_close_all_channels_without_broadcasting_txn
3744937457
}
3745037458
const nativeResponseValue = wasm.TS_ChannelManager_force_close_all_channels_without_broadcasting_txn(this_arg, error_message);
3745137459
// debug statements here
37460+
}
37461+
// MUST_USE_RES struct LDKCResult_NoneRetryableSendFailureZ ChannelManager_send_payment_with_route(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKRoute route, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id);
37462+
/* @internal */
37463+
export function ChannelManager_send_payment_with_route(this_arg: bigint, route: bigint, payment_hash: number, recipient_onion: bigint, payment_id: number): bigint {
37464+
if(!isWasmInitialized) {
37465+
throw new Error("initializeWasm() must be awaited first!");
37466+
}
37467+
const nativeResponseValue = wasm.TS_ChannelManager_send_payment_with_route(this_arg, route, payment_hash, recipient_onion, payment_id);
37468+
return nativeResponseValue;
3745237469
}
3745337470
// MUST_USE_RES struct LDKCResult_NoneRetryableSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id, struct LDKRouteParameters route_params, struct LDKRetry retry_strategy);
3745437471
/* @internal */
@@ -59904,6 +59921,15 @@ export function SpendableOutputDescriptor_create_spendable_outputs_psbt(descript
5990459921
}
5990559922
const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_create_spendable_outputs_psbt(descriptors, outputs, change_destination_script, feerate_sat_per_1000_weight, locktime);
5990659923
return nativeResponseValue;
59924+
}
59925+
// MUST_USE_RES struct LDKOutPoint SpendableOutputDescriptor_spendable_outpoint(const struct LDKSpendableOutputDescriptor *NONNULL_PTR this_arg);
59926+
/* @internal */
59927+
export function SpendableOutputDescriptor_spendable_outpoint(this_arg: bigint): bigint {
59928+
if(!isWasmInitialized) {
59929+
throw new Error("initializeWasm() must be awaited first!");
59930+
}
59931+
const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_spendable_outpoint(this_arg);
59932+
return nativeResponseValue;
5990759933
}
5990859934
// void ChannelDerivationParameters_free(struct LDKChannelDerivationParameters this_obj);
5990959935
/* @internal */

ts/structs/ChannelManager.mts

+14-1
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,18 @@ export class ChannelManager extends CommonBase {
17931793
bindings.ChannelManager_force_close_all_channels_without_broadcasting_txn(this.ptr, bindings.encodeString(error_message));
17941794
}
17951795

1796+
/**
1797+
* Sends a payment along a given route. See [`Self::send_payment`] for more info.
1798+
*
1799+
* LDK will not automatically retry this payment, though it may be manually re-sent after an
1800+
* [`Event::PaymentFailed`] is generated.
1801+
*/
1802+
public send_payment_with_route(route: Route, payment_hash: Uint8Array, recipient_onion: RecipientOnionFields, payment_id: Uint8Array): Result_NoneRetryableSendFailureZ {
1803+
const ret: bigint = bindings.ChannelManager_send_payment_with_route(this.ptr, CommonBase.get_ptr_of(route), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(recipient_onion), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)));
1804+
const ret_hu_conv: Result_NoneRetryableSendFailureZ = Result_NoneRetryableSendFailureZ.constr_from_ptr(ret);
1805+
return ret_hu_conv;
1806+
}
1807+
17961808
/**
17971809
* Sends a payment to the route found using the provided [`RouteParameters`], retrying failed
17981810
* payment paths based on the provided `Retry`.
@@ -1820,7 +1832,8 @@ export class ChannelManager extends CommonBase {
18201832
* [`ChannelManager::list_recent_payments`] for more information.
18211833
*
18221834
* Routes are automatically found using the [`Router] provided on startup. To fix a route for a
1823-
* particular payment, match the [`PaymentId`] passed to [`Router::find_route_with_id`].
1835+
* particular payment, use [`Self::send_payment_with_route`] or match the [`PaymentId`] passed to
1836+
* [`Router::find_route_with_id`].
18241837
*
18251838
* [`Event::PaymentSent`]: events::Event::PaymentSent
18261839
* [`Event::PaymentFailed`]: events::Event::PaymentFailed

ts/structs/ChannelMonitor.mts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1232,10 +1232,11 @@ export class ChannelMonitor extends CommonBase {
12321232
*
12331233
* This function returns a tuple of two booleans, the first indicating whether the monitor is
12341234
* fully resolved, and the second whether the monitor needs persistence to ensure it is
1235-
* reliably marked as resolved within 4032 blocks.
1235+
* reliably marked as resolved within [`ARCHIVAL_DELAY_BLOCKS`] blocks.
12361236
*
1237-
* The first boolean is true only if [`Self::get_claimable_balances`] has been empty for at least
1238-
* 4032 blocks as an additional protection against any bugs resulting in spuriously empty balance sets.
1237+
* The first boolean is true only if [`Self::get_claimable_balances`] has been empty for at
1238+
* least [`ARCHIVAL_DELAY_BLOCKS`] blocks as an additional protection against any bugs
1239+
* resulting in spuriously empty balance sets.
12391240
*/
12401241
public check_and_update_full_resolution_status(logger: Logger): TwoTuple_boolboolZ {
12411242
const ret: bigint = bindings.ChannelMonitor_check_and_update_full_resolution_status(this.ptr, CommonBase.get_ptr_of(logger));

ts/structs/PendingHTLCRouting.mts

+10-2
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,8 @@ export class PendingHTLCRouting extends CommonBase {
774774
/**
775775
* Utility method to constructs a new Forward-variant PendingHTLCRouting
776776
*/
777-
public static constructor_forward(onion_packet: OnionPacket, short_channel_id: bigint, blinded: BlindedForward): PendingHTLCRouting {
778-
const ret: bigint = bindings.PendingHTLCRouting_forward(CommonBase.get_ptr_of(onion_packet), short_channel_id, CommonBase.get_ptr_of(blinded));
777+
public static constructor_forward(onion_packet: OnionPacket, short_channel_id: bigint, blinded: BlindedForward, incoming_cltv_expiry: Option_u32Z): PendingHTLCRouting {
778+
const ret: bigint = bindings.PendingHTLCRouting_forward(CommonBase.get_ptr_of(onion_packet), short_channel_id, CommonBase.get_ptr_of(blinded), CommonBase.get_ptr_of(incoming_cltv_expiry));
779779
const ret_hu_conv: PendingHTLCRouting = PendingHTLCRouting.constr_from_ptr(ret);
780780
CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
781781
return ret_hu_conv;
@@ -841,6 +841,10 @@ export class PendingHTLCRouting_Forward extends PendingHTLCRouting {
841841
* Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
842842
*/
843843
public blinded: BlindedForward;
844+
/**
845+
* The absolute CLTV of the inbound HTLC
846+
*/
847+
public incoming_cltv_expiry: Option_u32Z;
844848
/* @internal */
845849
public constructor(ptr: bigint) {
846850
super(null, ptr);
@@ -853,6 +857,10 @@ export class PendingHTLCRouting_Forward extends PendingHTLCRouting {
853857
const blinded_hu_conv: BlindedForward = new BlindedForward(null, blinded);
854858
CommonBase.add_ref_from(blinded_hu_conv, this);
855859
this.blinded = blinded_hu_conv;
860+
const incoming_cltv_expiry: bigint = bindings.LDKPendingHTLCRouting_Forward_get_incoming_cltv_expiry(ptr);
861+
const incoming_cltv_expiry_hu_conv: Option_u32Z = Option_u32Z.constr_from_ptr(incoming_cltv_expiry);
862+
CommonBase.add_ref_from(incoming_cltv_expiry_hu_conv, this);
863+
this.incoming_cltv_expiry = incoming_cltv_expiry_hu_conv;
856864
}
857865
}
858866
/** A PendingHTLCRouting of type Receive */

0 commit comments

Comments
 (0)