3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class ChannelManagerReadArgs extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.ChannelManagerReadArgs_free(this.ptr);
21 public KeysInterface get_keys_manager() {
22 number ret = bindings.ChannelManagerReadArgs_get_keys_manager(this.ptr);
23 KeysInterface ret_hu_conv = new KeysInterface(null, ret);
24 ret_hu_conv.ptrs_to.add(this);
28 public void set_keys_manager(KeysInterface val) {
29 bindings.ChannelManagerReadArgs_set_keys_manager(this.ptr, val == null ? 0 : val.ptr);
30 this.ptrs_to.add(val);
33 public FeeEstimator get_fee_estimator() {
34 number ret = bindings.ChannelManagerReadArgs_get_fee_estimator(this.ptr);
35 FeeEstimator ret_hu_conv = new FeeEstimator(null, ret);
36 ret_hu_conv.ptrs_to.add(this);
40 public void set_fee_estimator(FeeEstimator val) {
41 bindings.ChannelManagerReadArgs_set_fee_estimator(this.ptr, val == null ? 0 : val.ptr);
42 this.ptrs_to.add(val);
45 public Watch get_chain_monitor() {
46 number ret = bindings.ChannelManagerReadArgs_get_chain_monitor(this.ptr);
47 Watch ret_hu_conv = new Watch(null, ret);
48 ret_hu_conv.ptrs_to.add(this);
52 public void set_chain_monitor(Watch val) {
53 bindings.ChannelManagerReadArgs_set_chain_monitor(this.ptr, val == null ? 0 : val.ptr);
54 this.ptrs_to.add(val);
57 public BroadcasterInterface get_tx_broadcaster() {
58 number ret = bindings.ChannelManagerReadArgs_get_tx_broadcaster(this.ptr);
59 BroadcasterInterface ret_hu_conv = new BroadcasterInterface(null, ret);
60 ret_hu_conv.ptrs_to.add(this);
64 public void set_tx_broadcaster(BroadcasterInterface val) {
65 bindings.ChannelManagerReadArgs_set_tx_broadcaster(this.ptr, val == null ? 0 : val.ptr);
66 this.ptrs_to.add(val);
69 public Logger get_logger() {
70 number ret = bindings.ChannelManagerReadArgs_get_logger(this.ptr);
71 Logger ret_hu_conv = new Logger(null, ret);
72 ret_hu_conv.ptrs_to.add(this);
76 public void set_logger(Logger val) {
77 bindings.ChannelManagerReadArgs_set_logger(this.ptr, val == null ? 0 : val.ptr);
78 this.ptrs_to.add(val);
81 public UserConfig get_default_config() {
82 number ret = bindings.ChannelManagerReadArgs_get_default_config(this.ptr);
83 const ret_hu_conv: UserConfig = new UserConfig(null, ret);
84 ret_hu_conv.ptrs_to.add(this);
88 public void set_default_config(UserConfig val) {
89 bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val == null ? 0 : val.ptr & ~1);
90 this.ptrs_to.add(val);
93 public static ChannelManagerReadArgs constructor_new(KeysInterface keys_manager, FeeEstimator fee_estimator, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, UserConfig default_config, ChannelMonitor[] channel_monitors) {
94 number ret = bindings.ChannelManagerReadArgs_new(keys_manager == null ? 0 : keys_manager.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, default_config == null ? 0 : default_config.ptr & ~1, Arrays.stream(channel_monitors).map(channel_monitors_conv_16 -> channel_monitors_conv_16 == null ? 0 : channel_monitors_conv_16.ptr & ~1).toArray(number[]::new));
95 const ret_hu_conv: ChannelManagerReadArgs = new ChannelManagerReadArgs(null, ret);
96 ret_hu_conv.ptrs_to.add(ret_hu_conv);
97 ret_hu_conv.ptrs_to.add(keys_manager);
98 ret_hu_conv.ptrs_to.add(fee_estimator);
99 ret_hu_conv.ptrs_to.add(chain_monitor);
100 ret_hu_conv.ptrs_to.add(tx_broadcaster);
101 ret_hu_conv.ptrs_to.add(logger);
102 ret_hu_conv.ptrs_to.add(default_config);
103 /* TODO 2 ChannelMonitor */;