1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 public class ChannelHandshakeLimits extends CommonBase {
7 ChannelHandshakeLimits(Object _dummy, long ptr) { super(ptr); }
8 @Override @SuppressWarnings("deprecation")
9 protected void finalize() throws Throwable {
11 bindings.ChannelHandshakeLimits_free(ptr);
14 public ChannelHandshakeLimits(ChannelHandshakeLimits orig) {
15 super(bindings.ChannelHandshakeLimits_clone(orig == null ? 0 : orig.ptr & ~1));
16 this.ptrs_to.add(orig);
19 public long get_min_funding_satoshis(ChannelHandshakeLimits this_ptr) {
20 long ret = bindings.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
21 this.ptrs_to.add(this_ptr);
25 public void set_min_funding_satoshis(ChannelHandshakeLimits this_ptr, long val) {
26 bindings.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
27 this.ptrs_to.add(this_ptr);
30 public long get_max_htlc_minimum_msat(ChannelHandshakeLimits this_ptr) {
31 long ret = bindings.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
32 this.ptrs_to.add(this_ptr);
36 public void set_max_htlc_minimum_msat(ChannelHandshakeLimits this_ptr, long val) {
37 bindings.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
38 this.ptrs_to.add(this_ptr);
41 public long get_min_max_htlc_value_in_flight_msat(ChannelHandshakeLimits this_ptr) {
42 long ret = bindings.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
43 this.ptrs_to.add(this_ptr);
47 public void set_min_max_htlc_value_in_flight_msat(ChannelHandshakeLimits this_ptr, long val) {
48 bindings.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
49 this.ptrs_to.add(this_ptr);
52 public long get_max_channel_reserve_satoshis(ChannelHandshakeLimits this_ptr) {
53 long ret = bindings.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
54 this.ptrs_to.add(this_ptr);
58 public void set_max_channel_reserve_satoshis(ChannelHandshakeLimits this_ptr, long val) {
59 bindings.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
60 this.ptrs_to.add(this_ptr);
63 public short get_min_max_accepted_htlcs(ChannelHandshakeLimits this_ptr) {
64 short ret = bindings.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1);
65 this.ptrs_to.add(this_ptr);
69 public void set_min_max_accepted_htlcs(ChannelHandshakeLimits this_ptr, short val) {
70 bindings.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
71 this.ptrs_to.add(this_ptr);
74 public long get_min_dust_limit_satoshis(ChannelHandshakeLimits this_ptr) {
75 long ret = bindings.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
76 this.ptrs_to.add(this_ptr);
80 public void set_min_dust_limit_satoshis(ChannelHandshakeLimits this_ptr, long val) {
81 bindings.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
82 this.ptrs_to.add(this_ptr);
85 public long get_max_dust_limit_satoshis(ChannelHandshakeLimits this_ptr) {
86 long ret = bindings.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
87 this.ptrs_to.add(this_ptr);
91 public void set_max_dust_limit_satoshis(ChannelHandshakeLimits this_ptr, long val) {
92 bindings.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
93 this.ptrs_to.add(this_ptr);
96 public int get_max_minimum_depth(ChannelHandshakeLimits this_ptr) {
97 int ret = bindings.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1);
98 this.ptrs_to.add(this_ptr);
102 public void set_max_minimum_depth(ChannelHandshakeLimits this_ptr, int val) {
103 bindings.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
104 this.ptrs_to.add(this_ptr);
107 public boolean get_force_announced_channel_preference(ChannelHandshakeLimits this_ptr) {
108 boolean ret = bindings.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr == null ? 0 : this_ptr.ptr & ~1);
109 this.ptrs_to.add(this_ptr);
113 public void set_force_announced_channel_preference(ChannelHandshakeLimits this_ptr, boolean val) {
114 bindings.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
115 this.ptrs_to.add(this_ptr);
118 public short get_their_to_self_delay(ChannelHandshakeLimits this_ptr) {
119 short ret = bindings.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1);
120 this.ptrs_to.add(this_ptr);
124 public void set_their_to_self_delay(ChannelHandshakeLimits this_ptr, short val) {
125 bindings.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
126 this.ptrs_to.add(this_ptr);
129 public ChannelHandshakeLimits(long min_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, short min_max_accepted_htlcs_arg, long min_dust_limit_satoshis_arg, long max_dust_limit_satoshis_arg, int max_minimum_depth_arg, boolean force_announced_channel_preference_arg, short their_to_self_delay_arg) {
130 super(bindings.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg));
133 public ChannelHandshakeLimits() {
134 super(bindings.ChannelHandshakeLimits_default());