TS bindings
[ldk-java] / ts / structs / DirectionalChannelInfo.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class DirectionalChannelInfo extends CommonBase {
6         DirectionalChannelInfo(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.DirectionalChannelInfo_free(ptr); }
11         }
12
13         public int get_last_update() {
14                 int ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr);
15                 return ret;
16         }
17
18         public void set_last_update(int val) {
19                 bindings.DirectionalChannelInfo_set_last_update(this.ptr, val);
20         }
21
22         public boolean get_enabled() {
23                 boolean ret = bindings.DirectionalChannelInfo_get_enabled(this.ptr);
24                 return ret;
25         }
26
27         public void set_enabled(boolean val) {
28                 bindings.DirectionalChannelInfo_set_enabled(this.ptr, val);
29         }
30
31         public short get_cltv_expiry_delta() {
32                 short ret = bindings.DirectionalChannelInfo_get_cltv_expiry_delta(this.ptr);
33                 return ret;
34         }
35
36         public void set_cltv_expiry_delta(short val) {
37                 bindings.DirectionalChannelInfo_set_cltv_expiry_delta(this.ptr, val);
38         }
39
40         public long get_htlc_minimum_msat() {
41                 long ret = bindings.DirectionalChannelInfo_get_htlc_minimum_msat(this.ptr);
42                 return ret;
43         }
44
45         public void set_htlc_minimum_msat(long val) {
46                 bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
47         }
48
49         public RoutingFees get_fees() {
50                 uint32_t ret = bindings.DirectionalChannelInfo_get_fees(this.ptr);
51                 RoutingFees ret_hu_conv = new RoutingFees(null, ret);
52                 return ret_hu_conv;
53         }
54
55         public void set_fees(RoutingFees val) {
56                 bindings.DirectionalChannelInfo_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
57                 this.ptrs_to.add(val);
58         }
59
60         public ChannelUpdate get_last_update_message() {
61                 uint32_t ret = bindings.DirectionalChannelInfo_get_last_update_message(this.ptr);
62                 ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
63                 return ret_hu_conv;
64         }
65
66         public void set_last_update_message(ChannelUpdate val) {
67                 bindings.DirectionalChannelInfo_set_last_update_message(this.ptr, val == null ? 0 : val.ptr & ~1);
68                 this.ptrs_to.add(val);
69         }
70
71         public byte[] write() {
72                 byte[] ret = bindings.DirectionalChannelInfo_write(this.ptr);
73                 return ret;
74         }
75
76         public static DirectionalChannelInfo constructor_read(byte[] ser) {
77                 uint32_t ret = bindings.DirectionalChannelInfo_read(ser);
78                 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
79                 return ret_hu_conv;
80         }
81
82 }