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 HTLCOutputInCommitment extends CommonBase {
10 HTLCOutputInCommitment(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.HTLCOutputInCommitment_free(ptr); }
17 public boolean get_offered() {
18 boolean ret = bindings.HTLCOutputInCommitment_get_offered(this.ptr);
22 public void set_offered(boolean val) {
23 bindings.HTLCOutputInCommitment_set_offered(this.ptr, val);
26 public long get_amount_msat() {
27 long ret = bindings.HTLCOutputInCommitment_get_amount_msat(this.ptr);
31 public void set_amount_msat(long val) {
32 bindings.HTLCOutputInCommitment_set_amount_msat(this.ptr, val);
35 public int get_cltv_expiry() {
36 int ret = bindings.HTLCOutputInCommitment_get_cltv_expiry(this.ptr);
40 public void set_cltv_expiry(int val) {
41 bindings.HTLCOutputInCommitment_set_cltv_expiry(this.ptr, val);
44 public byte[] get_payment_hash() {
45 byte[] ret = bindings.HTLCOutputInCommitment_get_payment_hash(this.ptr);
49 public void set_payment_hash(byte[] val) {
50 bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
53 public HTLCOutputInCommitment clone() {
54 long ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
55 HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
56 ret_hu_conv.ptrs_to.add(this);
60 public byte[] write() {
61 byte[] ret = bindings.HTLCOutputInCommitment_write(this.ptr);
65 public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_read(byte[] ser) {
66 long ret = bindings.HTLCOutputInCommitment_read(ser);
67 Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);