Skip to content

Commit 29002ff

Browse files
committed
[Java] Update auto-generated bindings to LDK 0.1.3
1 parent fdd69cf commit 29002ff

File tree

5 files changed

+54
-0
lines changed

5 files changed

+54
-0
lines changed

src/main/java/org/ldk/impl/bindings.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13534,6 +13534,8 @@ public interface LDKProcessMessagesCallback {
1353413534
public static native long VerifiedInvoiceRequest_respond_using_derived_keys(long this_arg, long[] payment_paths, byte[] payment_hash);
1353513535
// 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);
1353613536
public static native long VerifiedInvoiceRequest_respond_using_derived_keys_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at);
13537+
// MUST_USE_RES struct LDKInvoiceRequestFields VerifiedInvoiceRequest_fields(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
13538+
public static native long VerifiedInvoiceRequest_fields(long this_arg);
1353713539
// struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
1353813540
public static native byte[] UnsignedInvoiceRequest_write(long obj);
1353913541
// struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);

src/main/java/org/ldk/structs/VerifiedInvoiceRequest.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,4 +417,22 @@ public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond
417417
return ret_hu_conv;
418418
}
419419

420+
/**
421+
* Fetch the [`InvoiceRequestFields`] for this verified invoice.
422+
*
423+
* These are fields which we expect to be useful when receiving a payment for this invoice
424+
* request, and include the returned [`InvoiceRequestFields`] in the
425+
* [`PaymentContext::Bolt12Offer`].
426+
*
427+
* [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
428+
*/
429+
public InvoiceRequestFields fields() {
430+
long ret = bindings.VerifiedInvoiceRequest_fields(this.ptr);
431+
Reference.reachabilityFence(this);
432+
if (ret >= 0 && ret <= 4096) { return null; }
433+
org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
434+
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
435+
return ret_hu_conv;
436+
}
437+
420438
}

src/main/jni/bindings.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77669,6 +77669,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1res
7766977669
return tag_ptr(ret_conv, true);
7767077670
}
7767177671

77672+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1fields(JNIEnv *env, jclass clz, int64_t this_arg) {
77673+
LDKVerifiedInvoiceRequest this_arg_conv;
77674+
this_arg_conv.inner = untag_ptr(this_arg);
77675+
this_arg_conv.is_owned = ptr_is_owned(this_arg);
77676+
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
77677+
this_arg_conv.is_owned = false;
77678+
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
77679+
int64_t ret_ref = 0;
77680+
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
77681+
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
77682+
return ret_ref;
77683+
}
77684+
7767277685
JNIEXPORT uint8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) {
7767377686
LDKUnsignedInvoiceRequest obj_conv;
7767477687
obj_conv.inner = untag_ptr(obj);

src/main/jni/bindings.c.body

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77665,6 +77665,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1res
7766577665
return tag_ptr(ret_conv, true);
7766677666
}
7766777667

77668+
JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1fields(JNIEnv *env, jclass clz, int64_t this_arg) {
77669+
LDKVerifiedInvoiceRequest this_arg_conv;
77670+
this_arg_conv.inner = untag_ptr(this_arg);
77671+
this_arg_conv.is_owned = ptr_is_owned(this_arg);
77672+
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
77673+
this_arg_conv.is_owned = false;
77674+
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
77675+
int64_t ret_ref = 0;
77676+
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
77677+
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
77678+
return ret_ref;
77679+
}
77680+
7766877681
JNIEXPORT uint8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) {
7766977682
LDKUnsignedInvoiceRequest obj_conv;
7767077683
obj_conv.inner = untag_ptr(obj);

src/main/jni/org_ldk_impl_bindings.h

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)