1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
10 * An update_fail_htlc message to be sent or received from a peer
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class UpdateFailHTLC extends CommonBase {
14 UpdateFailHTLC(Object _dummy, long ptr) { super(ptr); }
15 @Override @SuppressWarnings("deprecation")
16 protected void finalize() throws Throwable {
18 if (ptr != 0) { bindings.UpdateFailHTLC_free(ptr); }
24 public byte[] get_channel_id() {
25 byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
32 public void set_channel_id(byte[] val) {
33 bindings.UpdateFailHTLC_set_channel_id(this.ptr, val);
39 public long get_htlc_id() {
40 long ret = bindings.UpdateFailHTLC_get_htlc_id(this.ptr);
47 public void set_htlc_id(long val) {
48 bindings.UpdateFailHTLC_set_htlc_id(this.ptr, val);
52 * Creates a copy of the UpdateFailHTLC
54 public UpdateFailHTLC clone() {
55 long ret = bindings.UpdateFailHTLC_clone(this.ptr);
56 UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret);
57 ret_hu_conv.ptrs_to.add(this);
62 * Serialize the UpdateFailHTLC object into a byte array which can be read by UpdateFailHTLC_read
64 public byte[] write() {
65 byte[] ret = bindings.UpdateFailHTLC_write(this.ptr);
70 * Read a UpdateFailHTLC from a byte array, created by UpdateFailHTLC_write
72 public static Result_UpdateFailHTLCDecodeErrorZ read(byte[] ser) {
73 long ret = bindings.UpdateFailHTLC_read(ser);
74 Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);