Update auto-generated bindings
[ldk-java] / ts / structs / UpdateAddHTLC.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 UpdateAddHTLC 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.UpdateAddHTLC_free(this.ptr);
19                     }
20                 }
21         public Uint8Array get_channel_id() {
22                 Uint8Array ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
23                 return ret;
24         }
25
26         public void set_channel_id(Uint8Array val) {
27                 bindings.UpdateAddHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
28         }
29
30         public number get_htlc_id() {
31                 number ret = bindings.UpdateAddHTLC_get_htlc_id(this.ptr);
32                 return ret;
33         }
34
35         public void set_htlc_id(number val) {
36                 bindings.UpdateAddHTLC_set_htlc_id(this.ptr, val);
37         }
38
39         public number get_amount_msat() {
40                 number ret = bindings.UpdateAddHTLC_get_amount_msat(this.ptr);
41                 return ret;
42         }
43
44         public void set_amount_msat(number val) {
45                 bindings.UpdateAddHTLC_set_amount_msat(this.ptr, val);
46         }
47
48         public Uint8Array get_payment_hash() {
49                 Uint8Array ret = bindings.UpdateAddHTLC_get_payment_hash(this.ptr);
50                 return ret;
51         }
52
53         public void set_payment_hash(Uint8Array val) {
54                 bindings.UpdateAddHTLC_set_payment_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
55         }
56
57         public number get_cltv_expiry() {
58                 number ret = bindings.UpdateAddHTLC_get_cltv_expiry(this.ptr);
59                 return ret;
60         }
61
62         public void set_cltv_expiry(number val) {
63                 bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
64         }
65
66         public number clone_ptr() {
67                 number ret = bindings.UpdateAddHTLC_clone_ptr(this.ptr);
68                 return ret;
69         }
70
71         public UpdateAddHTLC clone() {
72                 number ret = bindings.UpdateAddHTLC_clone(this.ptr);
73                 const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret);
74                 ret_hu_conv.ptrs_to.add(this);
75                 return ret_hu_conv;
76         }
77
78         public Uint8Array write() {
79                 Uint8Array ret = bindings.UpdateAddHTLC_write(this.ptr);
80                 return ret;
81         }
82
83         public static Result_UpdateAddHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
84                 number ret = bindings.UpdateAddHTLC_read(ser);
85                 Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
86                 return ret_hu_conv;
87         }
88
89 }