f37c057f1cfd3e036895ff91af5e3a1f2c94e783
[ldk-java] / ts / structs / ChannelHandshakeConfig.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class ChannelHandshakeConfig extends CommonBase {
6         ChannelHandshakeConfig(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.ChannelHandshakeConfig_free(ptr); }
11         }
12
13         public ChannelHandshakeConfig clone() {
14                 uint32_t ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
15                 ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
16                 return ret_hu_conv;
17         }
18
19         public int get_minimum_depth() {
20                 int ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this.ptr);
21                 return ret;
22         }
23
24         public void set_minimum_depth(int val) {
25                 bindings.ChannelHandshakeConfig_set_minimum_depth(this.ptr, val);
26         }
27
28         public short get_our_to_self_delay() {
29                 short ret = bindings.ChannelHandshakeConfig_get_our_to_self_delay(this.ptr);
30                 return ret;
31         }
32
33         public void set_our_to_self_delay(short val) {
34                 bindings.ChannelHandshakeConfig_set_our_to_self_delay(this.ptr, val);
35         }
36
37         public long get_our_htlc_minimum_msat() {
38                 long ret = bindings.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this.ptr);
39                 return ret;
40         }
41
42         public void set_our_htlc_minimum_msat(long val) {
43                 bindings.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this.ptr, val);
44         }
45
46         public static ChannelHandshakeConfig constructor_new(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) {
47                 uint32_t ret = bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
48                 ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
49                 return ret_hu_conv;
50         }
51
52         public static ChannelHandshakeConfig constructor_default() {
53                 uint32_t ret = bindings.ChannelHandshakeConfig_default();
54                 ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
55                 return ret_hu_conv;
56         }
57
58 }