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 CommitmentSigned extends CommonBase {
10 CommitmentSigned(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.CommitmentSigned_free(ptr); }
17 public static CommitmentSigned constructor_clone(CommitmentSigned orig) {
18 long ret = bindings.CommitmentSigned_clone(orig == null ? 0 : orig.ptr & ~1);
19 CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
20 ret_hu_conv.ptrs_to.add(orig);
24 public byte[] get_channel_id() {
25 byte[] ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
29 public void set_channel_id(byte[] val) {
30 bindings.CommitmentSigned_set_channel_id(this.ptr, val);
33 public byte[] get_signature() {
34 byte[] ret = bindings.CommitmentSigned_get_signature(this.ptr);
38 public void set_signature(byte[] val) {
39 bindings.CommitmentSigned_set_signature(this.ptr, val);
42 public void set_htlc_signatures(byte[][] val) {
43 bindings.CommitmentSigned_set_htlc_signatures(this.ptr, val);
46 public static CommitmentSigned constructor_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) {
47 long ret = bindings.CommitmentSigned_new(channel_id_arg, signature_arg, htlc_signatures_arg);
48 CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
52 public byte[] write(CommitmentSigned obj) {
53 byte[] ret = bindings.CommitmentSigned_write(obj == null ? 0 : obj.ptr & ~1);
54 this.ptrs_to.add(obj);
58 public static CommitmentSigned constructor_read(byte[] ser) {
59 long ret = bindings.CommitmentSigned_read(ser);
60 CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);