3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class ChannelConfig extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.ChannelConfig_free(this.ptr);
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);
28 public number get_fee_proportional_millionths() {
29 number ret = bindings.ChannelConfig_get_fee_proportional_millionths(this.ptr);
33 public void set_fee_proportional_millionths(number val) {
34 bindings.ChannelConfig_set_fee_proportional_millionths(this.ptr, val);
37 public boolean get_announced_channel() {
38 boolean ret = bindings.ChannelConfig_get_announced_channel(this.ptr);
42 public void set_announced_channel(boolean val) {
43 bindings.ChannelConfig_set_announced_channel(this.ptr, val);
46 public boolean get_commit_upfront_shutdown_pubkey() {
47 boolean ret = bindings.ChannelConfig_get_commit_upfront_shutdown_pubkey(this.ptr);
51 public void set_commit_upfront_shutdown_pubkey(boolean val) {
52 bindings.ChannelConfig_set_commit_upfront_shutdown_pubkey(this.ptr, val);
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);
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);
69 public Uint8Array write() {
70 Uint8Array ret = bindings.ChannelConfig_write(this.ptr);
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);