3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class SignedRawInvoice extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.SignedRawInvoice_free(this.ptr);
21 public boolean eq(SignedRawInvoice b) {
22 boolean ret = bindings.SignedRawInvoice_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
27 public SignedRawInvoice clone() {
28 number ret = bindings.SignedRawInvoice_clone(this.ptr);
29 const ret_hu_conv: SignedRawInvoice = new SignedRawInvoice(null, ret);
30 ret_hu_conv.ptrs_to.add(this);
34 public ThreeTuple_RawInvoice_u832InvoiceSignatureZ into_parts() {
35 number ret = bindings.SignedRawInvoice_into_parts(this.ptr);
36 ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret);
37 ret_hu_conv.ptrs_to.add(this);
41 public RawInvoice raw_invoice() {
42 number ret = bindings.SignedRawInvoice_raw_invoice(this.ptr);
43 const ret_hu_conv: RawInvoice = new RawInvoice(null, ret);
44 ret_hu_conv.ptrs_to.add(this);
48 public Uint8Array hash() {
49 Uint8Array ret = bindings.SignedRawInvoice_hash(this.ptr);
53 public InvoiceSignature signature() {
54 number ret = bindings.SignedRawInvoice_signature(this.ptr);
55 const ret_hu_conv: InvoiceSignature = new InvoiceSignature(null, ret);
56 ret_hu_conv.ptrs_to.add(this);
60 public Result_PayeePubKeyErrorZ recover_payee_pub_key() {
61 number ret = bindings.SignedRawInvoice_recover_payee_pub_key(this.ptr);
62 Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret);
66 public boolean check_signature() {
67 boolean ret = bindings.SignedRawInvoice_check_signature(this.ptr);
71 public static Result_SignedRawInvoiceNoneZ constructor_from_str(String s) {
72 number ret = bindings.SignedRawInvoice_from_str(s);
73 Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
77 public String to_str() {
78 String ret = bindings.SignedRawInvoice_to_str(this.ptr);