1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class StaticPaymentOutputDescriptor extends CommonBase {
10 StaticPaymentOutputDescriptor(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.StaticPaymentOutputDescriptor_free(ptr); }
17 public OutPoint get_outpoint() {
18 long ret = bindings.StaticPaymentOutputDescriptor_get_outpoint(this.ptr);
19 OutPoint ret_hu_conv = new OutPoint(null, ret);
20 ret_hu_conv.ptrs_to.add(this);
24 public void set_outpoint(OutPoint val) {
25 bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
26 this.ptrs_to.add(val);
29 public void set_output(TxOut val) {
30 bindings.StaticPaymentOutputDescriptor_set_output(this.ptr, val.ptr);
33 public byte[] get_channel_keys_id() {
34 byte[] ret = bindings.StaticPaymentOutputDescriptor_get_channel_keys_id(this.ptr);
38 public void set_channel_keys_id(byte[] val) {
39 bindings.StaticPaymentOutputDescriptor_set_channel_keys_id(this.ptr, val);
42 public long get_channel_value_satoshis() {
43 long ret = bindings.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this.ptr);
47 public void set_channel_value_satoshis(long val) {
48 bindings.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val);
51 public static StaticPaymentOutputDescriptor constructor_new(OutPoint outpoint_arg, TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) {
52 long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, output_arg.ptr, channel_keys_id_arg, channel_value_satoshis_arg);
53 StaticPaymentOutputDescriptor ret_hu_conv = new StaticPaymentOutputDescriptor(null, ret);
54 ret_hu_conv.ptrs_to.add(ret_hu_conv);
55 ret_hu_conv.ptrs_to.add(outpoint_arg);
59 public StaticPaymentOutputDescriptor clone() {
60 long ret = bindings.StaticPaymentOutputDescriptor_clone(this.ptr);
61 StaticPaymentOutputDescriptor ret_hu_conv = new StaticPaymentOutputDescriptor(null, ret);
62 ret_hu_conv.ptrs_to.add(this);