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 TxCreationKeys extends CommonBase {
10 TxCreationKeys(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.TxCreationKeys_free(ptr); }
17 public static TxCreationKeys constructor_clone(TxCreationKeys orig) {
18 long ret = bindings.TxCreationKeys_clone(orig == null ? 0 : orig.ptr & ~1);
19 TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
20 ret_hu_conv.ptrs_to.add(orig);
24 public byte[] get_per_commitment_point() {
25 byte[] ret = bindings.TxCreationKeys_get_per_commitment_point(this.ptr);
29 public void set_per_commitment_point(byte[] val) {
30 bindings.TxCreationKeys_set_per_commitment_point(this.ptr, val);
33 public byte[] get_revocation_key() {
34 byte[] ret = bindings.TxCreationKeys_get_revocation_key(this.ptr);
38 public void set_revocation_key(byte[] val) {
39 bindings.TxCreationKeys_set_revocation_key(this.ptr, val);
42 public byte[] get_broadcaster_htlc_key() {
43 byte[] ret = bindings.TxCreationKeys_get_broadcaster_htlc_key(this.ptr);
47 public void set_broadcaster_htlc_key(byte[] val) {
48 bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val);
51 public byte[] get_countersignatory_htlc_key() {
52 byte[] ret = bindings.TxCreationKeys_get_countersignatory_htlc_key(this.ptr);
56 public void set_countersignatory_htlc_key(byte[] val) {
57 bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val);
60 public byte[] get_broadcaster_delayed_payment_key() {
61 byte[] ret = bindings.TxCreationKeys_get_broadcaster_delayed_payment_key(this.ptr);
65 public void set_broadcaster_delayed_payment_key(byte[] val) {
66 bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val);
69 public static TxCreationKeys constructor_new(byte[] per_commitment_point_arg, byte[] revocation_key_arg, byte[] broadcaster_htlc_key_arg, byte[] countersignatory_htlc_key_arg, byte[] broadcaster_delayed_payment_key_arg) {
70 long ret = bindings.TxCreationKeys_new(per_commitment_point_arg, revocation_key_arg, broadcaster_htlc_key_arg, countersignatory_htlc_key_arg, broadcaster_delayed_payment_key_arg);
71 TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
75 public byte[] write(TxCreationKeys obj) {
76 byte[] ret = bindings.TxCreationKeys_write(obj == null ? 0 : obj.ptr & ~1);
77 this.ptrs_to.add(obj);
81 public static TxCreationKeys constructor_read(byte[] ser) {
82 long ret = bindings.TxCreationKeys_read(ser);
83 TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
87 public Result_TxCreationKeysSecpErrorZ derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base) {
88 long ret = bindings.TxCreationKeys_derive_new(per_commitment_point, broadcaster_delayed_payment_base, broadcaster_htlc_base, countersignatory_revocation_base, countersignatory_htlc_base);
89 Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
90 ret_hu_conv.ptrs_to.add(this);