]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/ChannelConfig.ts
Bindings updates for latest upstream, check in .so
[ldk-java] / ts / structs / ChannelConfig.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 ChannelConfig 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.ChannelConfig_free(this.ptr);
19                     }
20                 }
21         public ChannelConfig clone() {
22                 number ret = bindings.ChannelConfig_clone(this.ptr);
23                 const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
24                 ret_hu_conv.ptrs_to.add(this);
25                 return ret_hu_conv;
26         }
27
28         public number get_fee_proportional_millionths() {
29                 number ret = bindings.ChannelConfig_get_fee_proportional_millionths(this.ptr);
30                 return ret;
31         }
32
33         public void set_fee_proportional_millionths(number val) {
34                 bindings.ChannelConfig_set_fee_proportional_millionths(this.ptr, val);
35         }
36
37         public boolean get_announced_channel() {
38                 boolean ret = bindings.ChannelConfig_get_announced_channel(this.ptr);
39                 return ret;
40         }
41
42         public void set_announced_channel(boolean val) {
43                 bindings.ChannelConfig_set_announced_channel(this.ptr, val);
44         }
45
46         public boolean get_commit_upfront_shutdown_pubkey() {
47                 boolean ret = bindings.ChannelConfig_get_commit_upfront_shutdown_pubkey(this.ptr);
48                 return ret;
49         }
50
51         public void set_commit_upfront_shutdown_pubkey(boolean val) {
52                 bindings.ChannelConfig_set_commit_upfront_shutdown_pubkey(this.ptr, val);
53         }
54
55         public static ChannelConfig constructor_new(number fee_proportional_millionths_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg) {
56                 number ret = bindings.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
57                 const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
58                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
59                 return ret_hu_conv;
60         }
61
62         public static ChannelConfig constructor_default() {
63                 number ret = bindings.ChannelConfig_default();
64                 const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
65                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
66                 return ret_hu_conv;
67         }
68
69         public Uint8Array write() {
70                 Uint8Array ret = bindings.ChannelConfig_write(this.ptr);
71                 return ret;
72         }
73
74         public static ChannelConfig constructor_read(Uint8Array ser) {
75                 number ret = bindings.ChannelConfig_read(ser);
76                 const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
77                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
78                 return ret_hu_conv;
79         }
80
81 }