Skip to content

Commit fdd69cf

Browse files
committed
[C#] Update auto-generated bindings to LDK 0.1.3
1 parent 92188e7 commit fdd69cf

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

c_sharp/bindings.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71594,6 +71594,19 @@ int64_t CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(int64_t
7159471594
return tag_ptr(ret_conv, true);
7159571595
}
7159671596

71597+
int64_t CS_LDK_VerifiedInvoiceRequest_fields(int64_t this_arg) {
71598+
LDKVerifiedInvoiceRequest this_arg_conv;
71599+
this_arg_conv.inner = untag_ptr(this_arg);
71600+
this_arg_conv.is_owned = ptr_is_owned(this_arg);
71601+
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
71602+
this_arg_conv.is_owned = false;
71603+
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
71604+
int64_t ret_ref = 0;
71605+
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
71606+
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
71607+
return ret_ref;
71608+
}
71609+
7159771610
uint8_tArray CS_LDK_UnsignedInvoiceRequest_write(int64_t obj) {
7159871611
LDKUnsignedInvoiceRequest obj_conv;
7159971612
obj_conv.inner = untag_ptr(obj);

c_sharp/bindings.c.body

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71590,6 +71590,19 @@ int64_t CS_LDK_VerifiedInvoiceRequest_respond_using_derived_keys_no_std(int64_t
7159071590
return tag_ptr(ret_conv, true);
7159171591
}
7159271592

71593+
int64_t CS_LDK_VerifiedInvoiceRequest_fields(int64_t this_arg) {
71594+
LDKVerifiedInvoiceRequest this_arg_conv;
71595+
this_arg_conv.inner = untag_ptr(this_arg);
71596+
this_arg_conv.is_owned = ptr_is_owned(this_arg);
71597+
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
71598+
this_arg_conv.is_owned = false;
71599+
LDKInvoiceRequestFields ret_var = VerifiedInvoiceRequest_fields(&this_arg_conv);
71600+
int64_t ret_ref = 0;
71601+
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
71602+
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
71603+
return ret_ref;
71604+
}
71605+
7159371606
uint8_tArray CS_LDK_UnsignedInvoiceRequest_write(int64_t obj) {
7159471607
LDKUnsignedInvoiceRequest obj_conv;
7159571608
obj_conv.inner = untag_ptr(obj);

c_sharp/src/org/ldk/impl/bindings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12427,6 +12427,8 @@ public static long[] LDKProcessMessagesCallback_new(LDKProcessMessagesCallback i
1242712427
[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);
1242812428
// 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);
1242912429
[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);
12430+
// MUST_USE_RES struct LDKInvoiceRequestFields VerifiedInvoiceRequest_fields(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
12431+
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_fields")] public static extern long VerifiedInvoiceRequest_fields(long _this_arg);
1243012432
// struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
1243112433
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_write")] public static extern long UnsignedInvoiceRequest_write(long _obj);
1243212434
// struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);

c_sharp/src/org/ldk/structs/VerifiedInvoiceRequest.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,5 +426,23 @@ public org.ldk.structs.Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12Semant
426426
return ret_hu_conv;
427427
}
428428

429+
/**
430+
* Fetch the [`InvoiceRequestFields`] for this verified invoice.
431+
*
432+
* These are fields which we expect to be useful when receiving a payment for this invoice
433+
* request, and include the returned [`InvoiceRequestFields`] in the
434+
* [`PaymentContext::Bolt12Offer`].
435+
*
436+
* [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
437+
*/
438+
public org.ldk.structs.InvoiceRequestFields fields() {
439+
long ret = bindings.VerifiedInvoiceRequest_fields(this.ptr);
440+
GC.KeepAlive(this);
441+
if (ret >= 0 && ret <= 4096) { return null; }
442+
org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
443+
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
444+
return ret_hu_conv;
445+
}
446+
429447
}
430448
} } }

0 commit comments

Comments
 (0)