X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FInvoice.ts;h=aa559f5aac86b32d2fc40e8d1f8833c0d4f2d008;hb=0fee03a8095f5599f8eccd920c1b1af6b3a20260;hp=20bcd4fad241be3b593681505d473dfcaddc1f28;hpb=b0c50b891cbca28d3bd1d86276c132ff5221d8e4;p=ldk-java diff --git a/ts/structs/Invoice.ts b/ts/structs/Invoice.ts index 20bcd4fa..aa559f5a 100644 --- a/ts/structs/Invoice.ts +++ b/ts/structs/Invoice.ts @@ -24,6 +24,11 @@ import * as bindings from '../bindings' // TODO: figure out location return ret; } + public number clone_ptr() { + number ret = bindings.Invoice_clone_ptr(this.ptr); + return ret; + } + public Invoice clone() { number ret = bindings.Invoice_clone(this.ptr); const ret_hu_conv: Invoice = new Invoice(null, ret); @@ -47,7 +52,6 @@ import * as bindings from '../bindings' // TODO: figure out location public static Result_InvoiceSemanticErrorZ constructor_from_signed(SignedRawInvoice signed_invoice) { number ret = bindings.Invoice_from_signed(signed_invoice == null ? 0 : signed_invoice.ptr & ~1); Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret); - ret_hu_conv.ptrs_to.add(signed_invoice); return ret_hu_conv; } @@ -88,6 +92,11 @@ import * as bindings from '../bindings' // TODO: figure out location return ret; } + public boolean is_expired() { + boolean ret = bindings.Invoice_is_expired(this.ptr); + return ret; + } + public number min_final_cltv_expiry() { number ret = bindings.Invoice_min_final_cltv_expiry(this.ptr); return ret; @@ -122,8 +131,8 @@ import * as bindings from '../bindings' // TODO: figure out location return ret; } - public Option_u64Z amount_pico_btc() { - number ret = bindings.Invoice_amount_pico_btc(this.ptr); + public Option_u64Z amount_milli_satoshis() { + number ret = bindings.Invoice_amount_milli_satoshis(this.ptr); Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv;