e199a1e30f95f44647ddcd60f1e1911d33919d0b
[ldk-java] / ts / structs / ChannelHandshakeConfig.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 ChannelHandshakeConfig 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.ChannelHandshakeConfig_free(this.ptr);
19                     }
20                 }
21         public ChannelHandshakeConfig clone() {
22                 number ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
23                 const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
24                 ret_hu_conv.ptrs_to.add(this);
25                 return ret_hu_conv;
26         }
27
28         public number get_minimum_depth() {
29                 number ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this.ptr);
30                 return ret;
31         }
32
33         public void set_minimum_depth(number val) {
34                 bindings.ChannelHandshakeConfig_set_minimum_depth(this.ptr, val);
35         }
36
37         public number get_our_to_self_delay() {
38                 number ret = bindings.ChannelHandshakeConfig_get_our_to_self_delay(this.ptr);
39                 return ret;
40         }
41
42         public void set_our_to_self_delay(number val) {
43                 bindings.ChannelHandshakeConfig_set_our_to_self_delay(this.ptr, val);
44         }
45
46         public number get_our_htlc_minimum_msat() {
47                 number ret = bindings.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this.ptr);
48                 return ret;
49         }
50
51         public void set_our_htlc_minimum_msat(number val) {
52                 bindings.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this.ptr, val);
53         }
54
55         public static ChannelHandshakeConfig constructor_new(number minimum_depth_arg, number our_to_self_delay_arg, number our_htlc_minimum_msat_arg) {
56                 number ret = bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
57                 const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
58                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
59                 return ret_hu_conv;
60         }
61
62         public static ChannelHandshakeConfig constructor_default() {
63                 number ret = bindings.ChannelHandshakeConfig_default();
64                 const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
65                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
66                 return ret_hu_conv;
67         }
68
69 }