Update java bindings with new generator and new upstream code
[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                 ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
31                 ret_hu_conv.ptrs_to.add(this);
32                 return ret_hu_conv;
33         }
34
35         /**
36          * Get the channel pubkeys for the countersignatory
37          */
38         public ChannelPublicKeys countersignatory_pubkeys() {
39                 long ret = bindings.DirectedChannelTransactionParameters_countersignatory_pubkeys(this.ptr);
40                 ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
41                 ret_hu_conv.ptrs_to.add(this);
42                 return ret_hu_conv;
43         }
44
45         /**
46          * Get the contest delay applicable to the transactions.
47          * Note that the contest delay was selected by the countersignatory.
48          */
49         public short contest_delay() {
50                 short ret = bindings.DirectedChannelTransactionParameters_contest_delay(this.ptr);
51                 return ret;
52         }
53
54         /**
55          * Whether the channel is outbound from the broadcaster.
56          * 
57          * The boolean representing the side that initiated the channel is
58          * an input to the commitment number obscure factor computation.
59          */
60         public boolean is_outbound() {
61                 boolean ret = bindings.DirectedChannelTransactionParameters_is_outbound(this.ptr);
62                 return ret;
63         }
64
65         /**
66          * The funding outpoint
67          */
68         public OutPoint funding_outpoint() {
69                 long ret = bindings.DirectedChannelTransactionParameters_funding_outpoint(this.ptr);
70                 OutPoint ret_hu_conv = new OutPoint(null, ret);
71                 ret_hu_conv.ptrs_to.add(this);
72                 return ret_hu_conv;
73         }
74
75 }