1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import javax.annotation.Nullable;
11 * Static channel fields used to build transactions given per-commitment fields, organized by
12 * broadcaster/countersignatory.
14 * This is derived from the holder/counterparty-organized ChannelTransactionParameters via the
15 * as_holder_broadcastable and as_counterparty_broadcastable functions.
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 {
23 if (ptr != 0) { bindings.DirectedChannelTransactionParameters_free(ptr); }
27 * Get the channel pubkeys for the broadcaster
29 public ChannelPublicKeys broadcaster_pubkeys() {
30 long ret = bindings.DirectedChannelTransactionParameters_broadcaster_pubkeys(this.ptr);
31 if (ret < 1024) { return null; }
32 ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
33 ret_hu_conv.ptrs_to.add(this);
38 * Get the channel pubkeys for the countersignatory
40 public ChannelPublicKeys countersignatory_pubkeys() {
41 long ret = bindings.DirectedChannelTransactionParameters_countersignatory_pubkeys(this.ptr);
42 if (ret < 1024) { return null; }
43 ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
44 ret_hu_conv.ptrs_to.add(this);
49 * Get the contest delay applicable to the transactions.
50 * Note that the contest delay was selected by the countersignatory.
52 public short contest_delay() {
53 short ret = bindings.DirectedChannelTransactionParameters_contest_delay(this.ptr);
58 * Whether the channel is outbound from the broadcaster.
60 * The boolean representing the side that initiated the channel is
61 * an input to the commitment number obscure factor computation.
63 public boolean is_outbound() {
64 boolean ret = bindings.DirectedChannelTransactionParameters_is_outbound(this.ptr);
69 * The funding outpoint
71 public OutPoint funding_outpoint() {
72 long ret = bindings.DirectedChannelTransactionParameters_funding_outpoint(this.ptr);
73 if (ret < 1024) { return null; }
74 OutPoint ret_hu_conv = new OutPoint(null, ret);
75 ret_hu_conv.ptrs_to.add(this);