Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / DirectedChannelTransactionParameters.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7 import javax.annotation.Nullable;
8
9
10 /**
11  * Static channel fields used to build transactions given per-commitment fields, organized by
12  * broadcaster/countersignatory.
13  * 
14  * This is derived from the holder/counterparty-organized ChannelTransactionParameters via the
15  * as_holder_broadcastable and as_counterparty_broadcastable functions.
16  */
17 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
18 public class DirectedChannelTransactionParameters extends CommonBase {
19         DirectedChannelTransactionParameters(Object _dummy, long ptr) { super(ptr); }
20         @Override @SuppressWarnings("deprecation")
21         protected void finalize() throws Throwable {
22                 super.finalize();
23                 if (ptr != 0) { bindings.DirectedChannelTransactionParameters_free(ptr); }
24         }
25
26         /**
27          * Get the channel pubkeys for the broadcaster
28          */
29         public ChannelPublicKeys broadcaster_pubkeys() {
30                 long ret = bindings.DirectedChannelTransactionParameters_broadcaster_pubkeys(this.ptr);
31                 if (ret >= 0 && ret <= 4096) { return null; }
32                 ChannelPublicKeys ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelPublicKeys(null, ret); }
33                 ret_hu_conv.ptrs_to.add(this);
34                 return ret_hu_conv;
35         }
36
37         /**
38          * Get the channel pubkeys for the countersignatory
39          */
40         public ChannelPublicKeys countersignatory_pubkeys() {
41                 long ret = bindings.DirectedChannelTransactionParameters_countersignatory_pubkeys(this.ptr);
42                 if (ret >= 0 && ret <= 4096) { return null; }
43                 ChannelPublicKeys ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelPublicKeys(null, ret); }
44                 ret_hu_conv.ptrs_to.add(this);
45                 return ret_hu_conv;
46         }
47
48         /**
49          * Get the contest delay applicable to the transactions.
50          * Note that the contest delay was selected by the countersignatory.
51          */
52         public short contest_delay() {
53                 short ret = bindings.DirectedChannelTransactionParameters_contest_delay(this.ptr);
54                 return ret;
55         }
56
57         /**
58          * Whether the channel is outbound from the broadcaster.
59          * 
60          * The boolean representing the side that initiated the channel is
61          * an input to the commitment number obscure factor computation.
62          */
63         public boolean is_outbound() {
64                 boolean ret = bindings.DirectedChannelTransactionParameters_is_outbound(this.ptr);
65                 return ret;
66         }
67
68         /**
69          * The funding outpoint
70          */
71         public OutPoint funding_outpoint() {
72                 long ret = bindings.DirectedChannelTransactionParameters_funding_outpoint(this.ptr);
73                 if (ret >= 0 && ret <= 4096) { return null; }
74                 OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new OutPoint(null, ret); }
75                 ret_hu_conv.ptrs_to.add(this);
76                 return ret_hu_conv;
77         }
78
79 }