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_malformed_htlc message to be sent or received from a peer
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class UpdateFailMalformedHTLC extends CommonBase {
14 UpdateFailMalformedHTLC(Object _dummy, long ptr) { super(ptr); }
15 @Override @SuppressWarnings("deprecation")
16 protected void finalize() throws Throwable {
18 if (ptr != 0) { bindings.UpdateFailMalformedHTLC_free(ptr); }
24 public byte[] get_channel_id() {
25 byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr);
32 public void set_channel_id(byte[] val) {
33 bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, val);
39 public long get_htlc_id() {
40 long ret = bindings.UpdateFailMalformedHTLC_get_htlc_id(this.ptr);
47 public void set_htlc_id(long val) {
48 bindings.UpdateFailMalformedHTLC_set_htlc_id(this.ptr, val);
54 public short get_failure_code() {
55 short ret = bindings.UpdateFailMalformedHTLC_get_failure_code(this.ptr);
62 public void set_failure_code(short val) {
63 bindings.UpdateFailMalformedHTLC_set_failure_code(this.ptr, val);
67 * Creates a copy of the UpdateFailMalformedHTLC
69 public UpdateFailMalformedHTLC clone() {
70 long ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr);
71 UpdateFailMalformedHTLC ret_hu_conv = new UpdateFailMalformedHTLC(null, ret);
72 ret_hu_conv.ptrs_to.add(this);
77 * Serialize the UpdateFailMalformedHTLC object into a byte array which can be read by UpdateFailMalformedHTLC_read
79 public byte[] write() {
80 byte[] ret = bindings.UpdateFailMalformedHTLC_write(this.ptr);
85 * Read a UpdateFailMalformedHTLC from a byte array, created by UpdateFailMalformedHTLC_write
87 public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_read(byte[] ser) {
88 long ret = bindings.UpdateFailMalformedHTLC_read(ser);
89 Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);