Skip to content

Commit 5383e9c

Browse files
committed
[TS] Update auto-generated bindings to LDK 0.1.3
1 parent 29002ff commit 5383e9c

File tree

4 files changed

+51
-0
lines changed

4 files changed

+51
-0
lines changed

ts/bindings.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71047,6 +71047,19 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_respond_using_de
7104771047
return tag_ptr(ret_conv, true);
7104871048
}
7104971049

71050+
uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_fields"))) TS_VerifiedInvoiceRequest_fields(uint64_t this_arg) {
71051+
LDKVerifiedInvoiceRequest this_arg_conv;
71052+
this_arg_conv.inner = untag_ptr(this_arg);
71053+
this_arg_conv.is_owned = ptr_is_owned(this_arg);
71054+
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
71055+
this_arg_conv.is_owned = false;
71056+
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
71057+
uint64_t ret_ref = 0;
71058+
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
71059+
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
71060+
return ret_ref;
71061+
}
71062+
7105071063
uint8_tArray __attribute__((export_name("TS_UnsignedInvoiceRequest_write"))) TS_UnsignedInvoiceRequest_write(uint64_t obj) {
7105171064
LDKUnsignedInvoiceRequest obj_conv;
7105271065
obj_conv.inner = untag_ptr(obj);

ts/bindings.c.body

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71045,6 +71045,19 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_respond_using_de
7104571045
return tag_ptr(ret_conv, true);
7104671046
}
7104771047

71048+
uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_fields"))) TS_VerifiedInvoiceRequest_fields(uint64_t this_arg) {
71049+
LDKVerifiedInvoiceRequest this_arg_conv;
71050+
this_arg_conv.inner = untag_ptr(this_arg);
71051+
this_arg_conv.is_owned = ptr_is_owned(this_arg);
71052+
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
71053+
this_arg_conv.is_owned = false;
71054+
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
71055+
uint64_t ret_ref = 0;
71056+
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
71057+
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
71058+
return ret_ref;
71059+
}
71060+
7104871061
uint8_tArray __attribute__((export_name("TS_UnsignedInvoiceRequest_write"))) TS_UnsignedInvoiceRequest_write(uint64_t obj) {
7104971062
LDKUnsignedInvoiceRequest obj_conv;
7105071063
obj_conv.inner = untag_ptr(obj);

ts/bindings.mts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55818,6 +55818,15 @@ export function VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this_ar
5581855818
}
5581955819
const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this_arg, payment_paths, payment_hash, created_at);
5582055820
return nativeResponseValue;
55821+
}
55822+
// MUST_USE_RES struct LDKInvoiceRequestFields VerifiedInvoiceRequest_fields(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
55823+
/* @internal */
55824+
export function VerifiedInvoiceRequest_fields(this_arg: bigint): bigint {
55825+
if(!isWasmInitialized) {
55826+
throw new Error("initializeWasm() must be awaited first!");
55827+
}
55828+
const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_fields(this_arg);
55829+
return nativeResponseValue;
5582155830
}
5582255831
// struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
5582355832
/* @internal */

ts/structs/VerifiedInvoiceRequest.mts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,4 +1126,20 @@ export class VerifiedInvoiceRequest extends CommonBase {
11261126
return ret_hu_conv;
11271127
}
11281128

1129+
/**
1130+
* Fetch the [`InvoiceRequestFields`] for this verified invoice.
1131+
*
1132+
* These are fields which we expect to be useful when receiving a payment for this invoice
1133+
* request, and include the returned [`InvoiceRequestFields`] in the
1134+
* [`PaymentContext::Bolt12Offer`].
1135+
*
1136+
* [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
1137+
*/
1138+
public fields(): InvoiceRequestFields {
1139+
const ret: bigint = bindings.VerifiedInvoiceRequest_fields(this.ptr);
1140+
const ret_hu_conv: InvoiceRequestFields = new InvoiceRequestFields(null, ret);
1141+
CommonBase.add_ref_from(ret_hu_conv, this);
1142+
return ret_hu_conv;
1143+
}
1144+
11291145
}

0 commit comments

Comments
 (0)