Update auto-generated bindings
[ldk-java] / ts / structs / SignedRawInvoice.ts
1
2             
3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
5
6
7
8             export default class SignedRawInvoice extends CommonBase {
9                 constructor(_dummy: object, ptr: number) {
10                     super(ptr);
11                 }
12
13                 
14                 protected finalize() {
15                     super.finalize();
16
17                     if (this.ptr != 0) {
18                         bindings.SignedRawInvoice_free(this.ptr);
19                     }
20                 }
21         public boolean eq(SignedRawInvoice b) {
22                 boolean ret = bindings.SignedRawInvoice_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
23                 this.ptrs_to.add(b);
24                 return ret;
25         }
26
27         public number clone_ptr() {
28                 number ret = bindings.SignedRawInvoice_clone_ptr(this.ptr);
29                 return ret;
30         }
31
32         public SignedRawInvoice clone() {
33                 number ret = bindings.SignedRawInvoice_clone(this.ptr);
34                 const ret_hu_conv: SignedRawInvoice = new SignedRawInvoice(null, ret);
35                 ret_hu_conv.ptrs_to.add(this);
36                 return ret_hu_conv;
37         }
38
39         public ThreeTuple_RawInvoice_u832InvoiceSignatureZ into_parts() {
40                 number ret = bindings.SignedRawInvoice_into_parts(this.ptr);
41                 ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret);
42                 ret_hu_conv.ptrs_to.add(this);
43                 return ret_hu_conv;
44         }
45
46         public RawInvoice raw_invoice() {
47                 number ret = bindings.SignedRawInvoice_raw_invoice(this.ptr);
48                 const ret_hu_conv: RawInvoice = new RawInvoice(null, ret);
49                 ret_hu_conv.ptrs_to.add(this);
50                 return ret_hu_conv;
51         }
52
53         public Uint8Array hash() {
54                 Uint8Array ret = bindings.SignedRawInvoice_hash(this.ptr);
55                 return ret;
56         }
57
58         public InvoiceSignature signature() {
59                 number ret = bindings.SignedRawInvoice_signature(this.ptr);
60                 const ret_hu_conv: InvoiceSignature = new InvoiceSignature(null, ret);
61                 ret_hu_conv.ptrs_to.add(this);
62                 return ret_hu_conv;
63         }
64
65         public Result_PayeePubKeyErrorZ recover_payee_pub_key() {
66                 number ret = bindings.SignedRawInvoice_recover_payee_pub_key(this.ptr);
67                 Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret);
68                 return ret_hu_conv;
69         }
70
71         public boolean check_signature() {
72                 boolean ret = bindings.SignedRawInvoice_check_signature(this.ptr);
73                 return ret;
74         }
75
76         public static Result_SignedRawInvoiceNoneZ constructor_from_str(String s) {
77                 number ret = bindings.SignedRawInvoice_from_str(s);
78                 Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
79                 return ret_hu_conv;
80         }
81
82         public String to_str() {
83                 String ret = bindings.SignedRawInvoice_to_str(this.ptr);
84                 return ret;
85         }
86
87 }