- // Skipped ChannelManager_create_channel
- // Skipped ChannelManager_list_channels
- // Skipped ChannelManager_list_usable_channels
- // Skipped ChannelManager_close_channel
- public void force_close_channel(byte[] channel_id) {
- bindings.ChannelManager_force_close_channel(this.ptr, channel_id);
+ public Result_NoneAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, long user_id, UserConfig override_config) {
+ long ret = bindings.ChannelManager_create_channel(this.ptr, their_network_key, channel_value_satoshis, push_msat, user_id, override_config == null ? 0 : override_config.ptr & ~1);
+ Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ this.ptrs_to.add(override_config);
+ return ret_hu_conv;
+ }
+
+ public ChannelDetails[] list_channels() {
+ long[] ret = bindings.ChannelManager_list_channels(this.ptr);
+ ChannelDetails[] ret_conv_16_arr = new ChannelDetails[ret.length];
+ for (int q = 0; q < ret.length; q++) {
+ long ret_conv_16 = ret[q];
+ ChannelDetails ret_conv_16_hu_conv = new ChannelDetails(null, ret_conv_16);
+ ret_conv_16_hu_conv.ptrs_to.add(this);
+ ret_conv_16_arr[q] = ret_conv_16_hu_conv;
+ }
+ return ret_conv_16_arr;
+ }
+
+ public ChannelDetails[] list_usable_channels() {
+ long[] ret = bindings.ChannelManager_list_usable_channels(this.ptr);
+ ChannelDetails[] ret_conv_16_arr = new ChannelDetails[ret.length];
+ for (int q = 0; q < ret.length; q++) {
+ long ret_conv_16 = ret[q];
+ ChannelDetails ret_conv_16_hu_conv = new ChannelDetails(null, ret_conv_16);
+ ret_conv_16_hu_conv.ptrs_to.add(this);
+ ret_conv_16_arr[q] = ret_conv_16_hu_conv;
+ }
+ return ret_conv_16_arr;
+ }
+
+ public Result_NoneAPIErrorZ close_channel(byte[] channel_id) {
+ long ret = bindings.ChannelManager_close_channel(this.ptr, channel_id);
+ Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ public Result_NoneAPIErrorZ force_close_channel(byte[] channel_id) {
+ long ret = bindings.ChannelManager_force_close_channel(this.ptr, channel_id);
+ Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;