1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
10 * Static channel fields used to build transactions given per-commitment fields, organized by
11 * broadcaster/countersignatory.
13 * This is derived from the holder/counterparty-organized ChannelTransactionParameters via the
14 * as_holder_broadcastable and as_counterparty_broadcastable functions.
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 {
22 if (ptr != 0) { bindings.DirectedChannelTransactionParameters_free(ptr); }
26 * Get the channel pubkeys for the broadcaster
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);
36 * Get the channel pubkeys for the countersignatory
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);
46 * Get the contest delay applicable to the transactions.
47 * Note that the contest delay was selected by the countersignatory.
49 public short contest_delay() {
50 short ret = bindings.DirectedChannelTransactionParameters_contest_delay(this.ptr);
55 * Whether the channel is outbound from the broadcaster.
57 * The boolean representing the side that initiated the channel is
58 * an input to the commitment number obscure factor computation.
60 public boolean is_outbound() {
61 boolean ret = bindings.DirectedChannelTransactionParameters_is_outbound(this.ptr);
66 * The funding outpoint
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);