2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
5 public class ChannelTransactionParameters extends CommonBase {
6 ChannelTransactionParameters(Object _dummy, long ptr) { super(ptr); }
7 @Override @SuppressWarnings("deprecation")
8 protected void finalize() throws Throwable {
10 if (ptr != 0) { bindings.ChannelTransactionParameters_free(ptr); }
13 public ChannelTransactionParameters clone() {
14 uint32_t ret = bindings.ChannelTransactionParameters_clone(this.ptr);
15 ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
19 public ChannelPublicKeys get_holder_pubkeys() {
20 uint32_t ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr);
21 ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
25 public void set_holder_pubkeys(ChannelPublicKeys val) {
26 bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val == null ? 0 : val.ptr & ~1);
27 this.ptrs_to.add(val);
30 public short get_holder_selected_contest_delay() {
31 short ret = bindings.ChannelTransactionParameters_get_holder_selected_contest_delay(this.ptr);
35 public void set_holder_selected_contest_delay(short val) {
36 bindings.ChannelTransactionParameters_set_holder_selected_contest_delay(this.ptr, val);
39 public boolean get_is_outbound_from_holder() {
40 boolean ret = bindings.ChannelTransactionParameters_get_is_outbound_from_holder(this.ptr);
44 public void set_is_outbound_from_holder(boolean val) {
45 bindings.ChannelTransactionParameters_set_is_outbound_from_holder(this.ptr, val);
48 public CounterpartyChannelTransactionParameters get_counterparty_parameters() {
49 uint32_t ret = bindings.ChannelTransactionParameters_get_counterparty_parameters(this.ptr);
50 CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret);
54 public void set_counterparty_parameters(CounterpartyChannelTransactionParameters val) {
55 bindings.ChannelTransactionParameters_set_counterparty_parameters(this.ptr, val == null ? 0 : val.ptr & ~1);
56 this.ptrs_to.add(val);
59 public OutPoint get_funding_outpoint() {
60 uint32_t ret = bindings.ChannelTransactionParameters_get_funding_outpoint(this.ptr);
61 OutPoint ret_hu_conv = new OutPoint(null, ret);
65 public void set_funding_outpoint(OutPoint val) {
66 bindings.ChannelTransactionParameters_set_funding_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
67 this.ptrs_to.add(val);
70 public static ChannelTransactionParameters constructor_new(ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, CounterpartyChannelTransactionParameters counterparty_parameters_arg, OutPoint funding_outpoint_arg) {
71 uint32_t ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr & ~1, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr & ~1, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr & ~1);
72 ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
73 ret_hu_conv.ptrs_to.add(holder_pubkeys_arg);
74 ret_hu_conv.ptrs_to.add(counterparty_parameters_arg);
75 ret_hu_conv.ptrs_to.add(funding_outpoint_arg);
79 public boolean is_populated() {
80 boolean ret = bindings.ChannelTransactionParameters_is_populated(this.ptr);
84 public DirectedChannelTransactionParameters as_holder_broadcastable() {
85 uint32_t ret = bindings.ChannelTransactionParameters_as_holder_broadcastable(this.ptr);
86 DirectedChannelTransactionParameters ret_hu_conv = new DirectedChannelTransactionParameters(null, ret);
90 public DirectedChannelTransactionParameters as_counterparty_broadcastable() {
91 uint32_t ret = bindings.ChannelTransactionParameters_as_counterparty_broadcastable(this.ptr);
92 DirectedChannelTransactionParameters ret_hu_conv = new DirectedChannelTransactionParameters(null, ret);
96 public byte[] write() {
97 byte[] ret = bindings.ChannelTransactionParameters_write(this.ptr);
101 public static ChannelTransactionParameters constructor_read(byte[] ser) {
102 uint32_t ret = bindings.ChannelTransactionParameters_read(ser);
103 ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);