X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FSignedRawInvoice.ts;h=22f2b59ed18e2f3e612405d46a819a16a556783f;hb=0fee03a8095f5599f8eccd920c1b1af6b3a20260;hp=6fe55351ac0dd840984722264f918b8add9eb4b4;hpb=b6cc0960eaee5a5bbc7fde79a56152d6dcd649d8;p=ldk-java diff --git a/ts/structs/SignedRawInvoice.ts b/ts/structs/SignedRawInvoice.ts index 6fe55351..22f2b59e 100644 --- a/ts/structs/SignedRawInvoice.ts +++ b/ts/structs/SignedRawInvoice.ts @@ -24,6 +24,11 @@ import * as bindings from '../bindings' // TODO: figure out location return ret; } + public number clone_ptr() { + number ret = bindings.SignedRawInvoice_clone_ptr(this.ptr); + return ret; + } + public SignedRawInvoice clone() { number ret = bindings.SignedRawInvoice_clone(this.ptr); const ret_hu_conv: SignedRawInvoice = new SignedRawInvoice(null, ret); @@ -31,21 +36,11 @@ import * as bindings from '../bindings' // TODO: figure out location return ret_hu_conv; } - public ThreeTuple into_parts() { + public ThreeTuple_RawInvoice_u832InvoiceSignatureZ into_parts() { number ret = bindings.SignedRawInvoice_into_parts(this.ptr); - number ret_a = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(ret); - const ret_a_hu_conv: RawInvoice = new RawInvoice(null, ret_a); - ret_a_hu_conv.ptrs_to.add(this);; - Uint8Array ret_b = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(ret); - number ret_c = bindings.LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(ret); - const ret_c_hu_conv: InvoiceSignature = new InvoiceSignature(null, ret_c); - ret_c_hu_conv.ptrs_to.add(this);; - ThreeTuple ret_conv = new ThreeTuple(ret_a_hu_conv, ret_b, ret_c_hu_conv, () -> { - bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(ret); - }); - ret_a_hu_conv.ptrs_to.add(ret_conv); - ret_c_hu_conv.ptrs_to.add(ret_conv); - return ret_conv; + ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; } public RawInvoice raw_invoice() {