[TS] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[ldk-java] / c_sharp / src / org / ldk / structs / DirectedChannelTransactionParameters.cs
1 using org.ldk.impl;
2 using org.ldk.enums;
3 using org.ldk.util;
4 using System;
5
6 namespace org { namespace ldk { namespace structs {
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 public class DirectedChannelTransactionParameters : CommonBase {
17         internal DirectedChannelTransactionParameters(object _dummy, long ptr) : base(ptr) { }
18         ~DirectedChannelTransactionParameters() {
19                 if (ptr != 0) { bindings.DirectedChannelTransactionParameters_free(ptr); }
20         }
21
22         /**
23          * Get the channel pubkeys for the broadcaster
24          */
25         public ChannelPublicKeys broadcaster_pubkeys() {
26                 long ret = bindings.DirectedChannelTransactionParameters_broadcaster_pubkeys(this.ptr);
27                 GC.KeepAlive(this);
28                 if (ret >= 0 && ret <= 4096) { return null; }
29                 org.ldk.structs.ChannelPublicKeys ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelPublicKeys(null, ret); }
30                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
31                 return ret_hu_conv;
32         }
33
34         /**
35          * Get the channel pubkeys for the countersignatory
36          */
37         public ChannelPublicKeys countersignatory_pubkeys() {
38                 long ret = bindings.DirectedChannelTransactionParameters_countersignatory_pubkeys(this.ptr);
39                 GC.KeepAlive(this);
40                 if (ret >= 0 && ret <= 4096) { return null; }
41                 org.ldk.structs.ChannelPublicKeys ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelPublicKeys(null, ret); }
42                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
43                 return ret_hu_conv;
44         }
45
46         /**
47          * Get the contest delay applicable to the transactions.
48          * Note that the contest delay was selected by the countersignatory.
49          */
50         public short contest_delay() {
51                 short ret = bindings.DirectedChannelTransactionParameters_contest_delay(this.ptr);
52                 GC.KeepAlive(this);
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 bool is_outbound() {
63                 bool ret = bindings.DirectedChannelTransactionParameters_is_outbound(this.ptr);
64                 GC.KeepAlive(this);
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                 GC.KeepAlive(this);
74                 if (ret >= 0 && ret <= 4096) { return null; }
75                 org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
76                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
77                 return ret_hu_conv;
78         }
79
80         /**
81          * Whether to use anchors for this channel
82          */
83         public ChannelTypeFeatures channel_type_features() {
84                 long ret = bindings.DirectedChannelTransactionParameters_channel_type_features(this.ptr);
85                 GC.KeepAlive(this);
86                 if (ret >= 0 && ret <= 4096) { return null; }
87                 org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
88                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
89                 return ret_hu_conv;
90         }
91
92 }
93 } } }