X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FInvoicePayer.ts;h=a656a81737ff6bf448197c8b4c57811161d89207;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=fcccc6c8ecaa68a9ac8bb0496812d5d0ef97f4bb;hpb=5fd405f7a48aaeca779c45c88ec6b3d3d3dbf0e4;p=ldk-java diff --git a/ts/structs/InvoicePayer.ts b/ts/structs/InvoicePayer.ts index fcccc6c8..a656a817 100644 --- a/ts/structs/InvoicePayer.ts +++ b/ts/structs/InvoicePayer.ts @@ -18,7 +18,7 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.InvoicePayer_free(this.ptr); } } - public static InvoicePayer constructor_new(Payer payer, Router router, LockableScore scorer, Logger logger, EventHandler event_handler, RetryAttempts retry_attempts) { + public static InvoicePayer constructor_new(Payer payer, Router router, MultiThreadedLockableScore scorer, Logger logger, EventHandler event_handler, RetryAttempts retry_attempts) { number ret = bindings.InvoicePayer_new(payer == null ? 0 : payer.ptr, router == null ? 0 : router.ptr, scorer == null ? 0 : scorer.ptr & ~1, logger == null ? 0 : logger.ptr, event_handler == null ? 0 : event_handler.ptr, retry_attempts == null ? 0 : retry_attempts.ptr & ~1); const ret_hu_conv: InvoicePayer = new InvoicePayer(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); @@ -44,6 +44,12 @@ import * as bindings from '../bindings' // TODO: figure out location return ret_hu_conv; } + public Result_PaymentIdPaymentErrorZ pay_pubkey(Uint8Array pubkey, Uint8Array payment_preimage, number amount_msats, number final_cltv_expiry_delta) { + number ret = bindings.InvoicePayer_pay_pubkey(this.ptr, InternalUtils.check_arr_len(pubkey, 33), InternalUtils.check_arr_len(payment_preimage, 32), amount_msats, final_cltv_expiry_delta); + Result_PaymentIdPaymentErrorZ ret_hu_conv = Result_PaymentIdPaymentErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + public void remove_cached_payment(Uint8Array payment_hash) { bindings.InvoicePayer_remove_cached_payment(this.ptr, InternalUtils.check_arr_len(payment_hash, 32)); }