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