1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
10 * An accept_channel message to be sent or received from a peer
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class AcceptChannel extends CommonBase {
14 AcceptChannel(Object _dummy, long ptr) { super(ptr); }
15 @Override @SuppressWarnings("deprecation")
16 protected void finalize() throws Throwable {
18 if (ptr != 0) { bindings.AcceptChannel_free(ptr); }
22 * A temporary channel ID, until the funding outpoint is announced
24 public byte[] get_temporary_channel_id() {
25 byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
30 * A temporary channel ID, until the funding outpoint is announced
32 public void set_temporary_channel_id(byte[] val) {
33 bindings.AcceptChannel_set_temporary_channel_id(this.ptr, val);
37 * The threshold below which outputs on transactions broadcast by sender will be omitted
39 public long get_dust_limit_satoshis() {
40 long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr);
45 * The threshold below which outputs on transactions broadcast by sender will be omitted
47 public void set_dust_limit_satoshis(long val) {
48 bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val);
52 * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
54 public long get_max_htlc_value_in_flight_msat() {
55 long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr);
60 * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
62 public void set_max_htlc_value_in_flight_msat(long val) {
63 bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
67 * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
69 public long get_channel_reserve_satoshis() {
70 long ret = bindings.AcceptChannel_get_channel_reserve_satoshis(this.ptr);
75 * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
77 public void set_channel_reserve_satoshis(long val) {
78 bindings.AcceptChannel_set_channel_reserve_satoshis(this.ptr, val);
82 * The minimum HTLC size incoming to sender, in milli-satoshi
84 public long get_htlc_minimum_msat() {
85 long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr);
90 * The minimum HTLC size incoming to sender, in milli-satoshi
92 public void set_htlc_minimum_msat(long val) {
93 bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val);
97 * Minimum depth of the funding transaction before the channel is considered open
99 public int get_minimum_depth() {
100 int ret = bindings.AcceptChannel_get_minimum_depth(this.ptr);
105 * Minimum depth of the funding transaction before the channel is considered open
107 public void set_minimum_depth(int val) {
108 bindings.AcceptChannel_set_minimum_depth(this.ptr, val);
112 * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
114 public short get_to_self_delay() {
115 short ret = bindings.AcceptChannel_get_to_self_delay(this.ptr);
120 * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
122 public void set_to_self_delay(short val) {
123 bindings.AcceptChannel_set_to_self_delay(this.ptr, val);
127 * The maximum number of inbound HTLCs towards sender
129 public short get_max_accepted_htlcs() {
130 short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr);
135 * The maximum number of inbound HTLCs towards sender
137 public void set_max_accepted_htlcs(short val) {
138 bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val);
142 * The sender's key controlling the funding transaction
144 public byte[] get_funding_pubkey() {
145 byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this.ptr);
150 * The sender's key controlling the funding transaction
152 public void set_funding_pubkey(byte[] val) {
153 bindings.AcceptChannel_set_funding_pubkey(this.ptr, val);
157 * Used to derive a revocation key for transactions broadcast by counterparty
159 public byte[] get_revocation_basepoint() {
160 byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this.ptr);
165 * Used to derive a revocation key for transactions broadcast by counterparty
167 public void set_revocation_basepoint(byte[] val) {
168 bindings.AcceptChannel_set_revocation_basepoint(this.ptr, val);
172 * A payment key to sender for transactions broadcast by counterparty
174 public byte[] get_payment_point() {
175 byte[] ret = bindings.AcceptChannel_get_payment_point(this.ptr);
180 * A payment key to sender for transactions broadcast by counterparty
182 public void set_payment_point(byte[] val) {
183 bindings.AcceptChannel_set_payment_point(this.ptr, val);
187 * Used to derive a payment key to sender for transactions broadcast by sender
189 public byte[] get_delayed_payment_basepoint() {
190 byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr);
195 * Used to derive a payment key to sender for transactions broadcast by sender
197 public void set_delayed_payment_basepoint(byte[] val) {
198 bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, val);
202 * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
204 public byte[] get_htlc_basepoint() {
205 byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this.ptr);
210 * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
212 public void set_htlc_basepoint(byte[] val) {
213 bindings.AcceptChannel_set_htlc_basepoint(this.ptr, val);
217 * The first to-be-broadcast-by-sender transaction's per commitment point
219 public byte[] get_first_per_commitment_point() {
220 byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr);
225 * The first to-be-broadcast-by-sender transaction's per commitment point
227 public void set_first_per_commitment_point(byte[] val) {
228 bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val);
232 * Creates a copy of the AcceptChannel
234 public AcceptChannel clone() {
235 long ret = bindings.AcceptChannel_clone(this.ptr);
236 AcceptChannel ret_hu_conv = new AcceptChannel(null, ret);
237 ret_hu_conv.ptrs_to.add(this);
242 * Serialize the AcceptChannel object into a byte array which can be read by AcceptChannel_read
244 public byte[] write() {
245 byte[] ret = bindings.AcceptChannel_write(this.ptr);
250 * Read a AcceptChannel from a byte array, created by AcceptChannel_write
252 public static Result_AcceptChannelDecodeErrorZ constructor_read(byte[] ser) {
253 long ret = bindings.AcceptChannel_read(ser);
254 Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);