1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class OpenChannel extends CommonBase {
10 OpenChannel(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.OpenChannel_free(ptr); }
17 public static OpenChannel constructor_clone(OpenChannel orig) {
18 long ret = bindings.OpenChannel_clone(orig == null ? 0 : orig.ptr & ~1);
19 OpenChannel ret_hu_conv = new OpenChannel(null, ret);
20 ret_hu_conv.ptrs_to.add(orig);
24 public byte[] get_chain_hash() {
25 byte[] ret = bindings.OpenChannel_get_chain_hash(this.ptr);
29 public void set_chain_hash(byte[] val) {
30 bindings.OpenChannel_set_chain_hash(this.ptr, val);
33 public byte[] get_temporary_channel_id() {
34 byte[] ret = bindings.OpenChannel_get_temporary_channel_id(this.ptr);
38 public void set_temporary_channel_id(byte[] val) {
39 bindings.OpenChannel_set_temporary_channel_id(this.ptr, val);
42 public long get_funding_satoshis() {
43 long ret = bindings.OpenChannel_get_funding_satoshis(this.ptr);
47 public void set_funding_satoshis(long val) {
48 bindings.OpenChannel_set_funding_satoshis(this.ptr, val);
51 public long get_push_msat() {
52 long ret = bindings.OpenChannel_get_push_msat(this.ptr);
56 public void set_push_msat(long val) {
57 bindings.OpenChannel_set_push_msat(this.ptr, val);
60 public long get_dust_limit_satoshis() {
61 long ret = bindings.OpenChannel_get_dust_limit_satoshis(this.ptr);
65 public void set_dust_limit_satoshis(long val) {
66 bindings.OpenChannel_set_dust_limit_satoshis(this.ptr, val);
69 public long get_max_htlc_value_in_flight_msat() {
70 long ret = bindings.OpenChannel_get_max_htlc_value_in_flight_msat(this.ptr);
74 public void set_max_htlc_value_in_flight_msat(long val) {
75 bindings.OpenChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
78 public long get_channel_reserve_satoshis() {
79 long ret = bindings.OpenChannel_get_channel_reserve_satoshis(this.ptr);
83 public void set_channel_reserve_satoshis(long val) {
84 bindings.OpenChannel_set_channel_reserve_satoshis(this.ptr, val);
87 public long get_htlc_minimum_msat() {
88 long ret = bindings.OpenChannel_get_htlc_minimum_msat(this.ptr);
92 public void set_htlc_minimum_msat(long val) {
93 bindings.OpenChannel_set_htlc_minimum_msat(this.ptr, val);
96 public int get_feerate_per_kw() {
97 int ret = bindings.OpenChannel_get_feerate_per_kw(this.ptr);
101 public void set_feerate_per_kw(int val) {
102 bindings.OpenChannel_set_feerate_per_kw(this.ptr, val);
105 public short get_to_self_delay() {
106 short ret = bindings.OpenChannel_get_to_self_delay(this.ptr);
110 public void set_to_self_delay(short val) {
111 bindings.OpenChannel_set_to_self_delay(this.ptr, val);
114 public short get_max_accepted_htlcs() {
115 short ret = bindings.OpenChannel_get_max_accepted_htlcs(this.ptr);
119 public void set_max_accepted_htlcs(short val) {
120 bindings.OpenChannel_set_max_accepted_htlcs(this.ptr, val);
123 public byte[] get_funding_pubkey() {
124 byte[] ret = bindings.OpenChannel_get_funding_pubkey(this.ptr);
128 public void set_funding_pubkey(byte[] val) {
129 bindings.OpenChannel_set_funding_pubkey(this.ptr, val);
132 public byte[] get_revocation_basepoint() {
133 byte[] ret = bindings.OpenChannel_get_revocation_basepoint(this.ptr);
137 public void set_revocation_basepoint(byte[] val) {
138 bindings.OpenChannel_set_revocation_basepoint(this.ptr, val);
141 public byte[] get_payment_point() {
142 byte[] ret = bindings.OpenChannel_get_payment_point(this.ptr);
146 public void set_payment_point(byte[] val) {
147 bindings.OpenChannel_set_payment_point(this.ptr, val);
150 public byte[] get_delayed_payment_basepoint() {
151 byte[] ret = bindings.OpenChannel_get_delayed_payment_basepoint(this.ptr);
155 public void set_delayed_payment_basepoint(byte[] val) {
156 bindings.OpenChannel_set_delayed_payment_basepoint(this.ptr, val);
159 public byte[] get_htlc_basepoint() {
160 byte[] ret = bindings.OpenChannel_get_htlc_basepoint(this.ptr);
164 public void set_htlc_basepoint(byte[] val) {
165 bindings.OpenChannel_set_htlc_basepoint(this.ptr, val);
168 public byte[] get_first_per_commitment_point() {
169 byte[] ret = bindings.OpenChannel_get_first_per_commitment_point(this.ptr);
173 public void set_first_per_commitment_point(byte[] val) {
174 bindings.OpenChannel_set_first_per_commitment_point(this.ptr, val);
177 public byte get_channel_flags() {
178 byte ret = bindings.OpenChannel_get_channel_flags(this.ptr);
182 public void set_channel_flags(byte val) {
183 bindings.OpenChannel_set_channel_flags(this.ptr, val);
186 public byte[] write(OpenChannel obj) {
187 byte[] ret = bindings.OpenChannel_write(obj == null ? 0 : obj.ptr & ~1);
188 this.ptrs_to.add(obj);
192 public static OpenChannel constructor_read(byte[] ser) {
193 long ret = bindings.OpenChannel_read(ser);
194 OpenChannel ret_hu_conv = new OpenChannel(null, ret);