Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions c_sharp/bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -71594,6 +71594,19 @@ int64_t CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(int64_t
return tag_ptr(ret_conv, true);
}

int64_t CS_LDK_VerifiedInvoiceRequest_fields(int64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}

uint8_tArray CS_LDK_UnsignedInvoiceRequest_write(int64_t obj) {
LDKUnsignedInvoiceRequest obj_conv;
obj_conv.inner = untag_ptr(obj);
Expand Down
13 changes: 13 additions & 0 deletions c_sharp/bindings.c.body
Original file line number Diff line number Diff line change
Expand Up @@ -71590,6 +71590,19 @@ int64_t CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(int64_t
return tag_ptr(ret_conv, true);
}

int64_t CS_LDK_VerifiedInvoiceRequest_fields(int64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}

uint8_tArray CS_LDK_UnsignedInvoiceRequest_write(int64_t obj) {
LDKUnsignedInvoiceRequest obj_conv;
obj_conv.inner = untag_ptr(obj);
Expand Down
2 changes: 2 additions & 0 deletions c_sharp/src/org/ldk/impl/bindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12427,6 +12427,8 @@ public static long[] LDKProcessMessagesCallback_new(LDKProcessMessagesCallback i
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys")] public static extern long VerifiedInvoiceRequest_respond_using_derived_keys(long _this_arg, long _payment_paths, long _payment_hash);
// MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_BlindedPaymentPathZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys_no_std")] public static extern long VerifiedInvoiceRequest_respond_using_derived_keys_no_std(long _this_arg, long _payment_paths, long _payment_hash, long _created_at);
// MUST_USE_RES struct LDKInvoiceRequestFields VerifiedInvoiceRequest_fields(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_fields")] public static extern long VerifiedInvoiceRequest_fields(long _this_arg);
// struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_write")] public static extern long UnsignedInvoiceRequest_write(long _obj);
// struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);
Expand Down
18 changes: 18 additions & 0 deletions c_sharp/src/org/ldk/structs/VerifiedInvoiceRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,23 @@ public org.ldk.structs.Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12Semant
return ret_hu_conv;
}

/**
* Fetch the [`InvoiceRequestFields`] for this verified invoice.
*
* These are fields which we expect to be useful when receiving a payment for this invoice
* request, and include the returned [`InvoiceRequestFields`] in the
* [`PaymentContext::Bolt12Offer`].
*
* [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
*/
public org.ldk.structs.InvoiceRequestFields fields() {
long ret = bindings.VerifiedInvoiceRequest_fields(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
return ret_hu_conv;
}

}
} } }
2 changes: 2 additions & 0 deletions src/main/java/org/ldk/impl/bindings.java
Original file line number Diff line number Diff line change
Expand Up @@ -13534,6 +13534,8 @@ public interface LDKProcessMessagesCallback {
public static native long VerifiedInvoiceRequest_respond_using_derived_keys(long this_arg, long[] payment_paths, byte[] payment_hash);
// MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_BlindedPaymentPathZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
public static native long VerifiedInvoiceRequest_respond_using_derived_keys_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at);
// MUST_USE_RES struct LDKInvoiceRequestFields VerifiedInvoiceRequest_fields(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
public static native long VerifiedInvoiceRequest_fields(long this_arg);
// struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
public static native byte[] UnsignedInvoiceRequest_write(long obj);
// struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/org/ldk/structs/VerifiedInvoiceRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -417,4 +417,22 @@ public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond
return ret_hu_conv;
}

/**
* Fetch the [`InvoiceRequestFields`] for this verified invoice.
*
* These are fields which we expect to be useful when receiving a payment for this invoice
* request, and include the returned [`InvoiceRequestFields`] in the
* [`PaymentContext::Bolt12Offer`].
*
* [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
*/
public InvoiceRequestFields fields() {
long ret = bindings.VerifiedInvoiceRequest_fields(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}

}
13 changes: 13 additions & 0 deletions src/main/jni/bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -77669,6 +77669,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1res
return tag_ptr(ret_conv, true);
}

JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1fields(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}

JNIEXPORT uint8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKUnsignedInvoiceRequest obj_conv;
obj_conv.inner = untag_ptr(obj);
Expand Down
13 changes: 13 additions & 0 deletions src/main/jni/bindings.c.body
Original file line number Diff line number Diff line change
Expand Up @@ -77665,6 +77665,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1res
return tag_ptr(ret_conv, true);
}

JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1fields(JNIEnv *env, jclass clz, int64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}

JNIEXPORT uint8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) {
LDKUnsignedInvoiceRequest obj_conv;
obj_conv.inner = untag_ptr(obj);
Expand Down
8 changes: 8 additions & 0 deletions src/main/jni/org_ldk_impl_bindings.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions ts/bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -71047,6 +71047,19 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_respond_using_de
return tag_ptr(ret_conv, true);
}

uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_fields"))) TS_VerifiedInvoiceRequest_fields(uint64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&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;
}

uint8_tArray __attribute__((export_name("TS_UnsignedInvoiceRequest_write"))) TS_UnsignedInvoiceRequest_write(uint64_t obj) {
LDKUnsignedInvoiceRequest obj_conv;
obj_conv.inner = untag_ptr(obj);
Expand Down
13 changes: 13 additions & 0 deletions ts/bindings.c.body
Original file line number Diff line number Diff line change
Expand Up @@ -71045,6 +71045,19 @@ uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_respond_using_de
return tag_ptr(ret_conv, true);
}

uint64_t __attribute__((export_name("TS_VerifiedInvoiceRequest_fields"))) TS_VerifiedInvoiceRequest_fields(uint64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
this_arg_conv.is_owned = false;
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&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;
}

uint8_tArray __attribute__((export_name("TS_UnsignedInvoiceRequest_write"))) TS_UnsignedInvoiceRequest_write(uint64_t obj) {
LDKUnsignedInvoiceRequest obj_conv;
obj_conv.inner = untag_ptr(obj);
Expand Down
9 changes: 9 additions & 0 deletions ts/bindings.mts
Original file line number Diff line number Diff line change
Expand Up @@ -55818,6 +55818,15 @@ export function VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this_ar
}
const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this_arg, payment_paths, payment_hash, created_at);
return nativeResponseValue;
}
// MUST_USE_RES struct LDKInvoiceRequestFields VerifiedInvoiceRequest_fields(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
/* @internal */
export function VerifiedInvoiceRequest_fields(this_arg: bigint): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
const nativeResponseValue = wasm.TS_VerifiedInvoiceRequest_fields(this_arg);
return nativeResponseValue;
}
// struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
/* @internal */
Expand Down
16 changes: 16 additions & 0 deletions ts/structs/VerifiedInvoiceRequest.mts
Original file line number Diff line number Diff line change
Expand Up @@ -1126,4 +1126,20 @@ export class VerifiedInvoiceRequest extends CommonBase {
return ret_hu_conv;
}

/**
* Fetch the [`InvoiceRequestFields`] for this verified invoice.
*
* These are fields which we expect to be useful when receiving a payment for this invoice
* request, and include the returned [`InvoiceRequestFields`] in the
* [`PaymentContext::Bolt12Offer`].
*
* [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
*/
public fields(): InvoiceRequestFields {
const ret: bigint = bindings.VerifiedInvoiceRequest_fields(this.ptr);
const ret_hu_conv: InvoiceRequestFields = new InvoiceRequestFields(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
}

}
Loading