1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 public class InMemoryChannelKeys extends CommonBase {
7 InMemoryChannelKeys(Object _dummy, long ptr) { super(ptr); }
8 @Override @SuppressWarnings("deprecation")
9 protected void finalize() throws Throwable {
10 bindings.InMemoryChannelKeys_free(ptr); super.finalize();
13 public InMemoryChannelKeys(InMemoryChannelKeys orig) {
14 super(bindings.InMemoryChannelKeys_clone(orig == null ? 0 : orig.ptr & ~1));
15 this.ptrs_to.add(orig);
18 public byte[] get_funding_key(InMemoryChannelKeys this_ptr) {
19 byte[] ret = bindings.InMemoryChannelKeys_get_funding_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
20 this.ptrs_to.add(this_ptr);
24 public void set_funding_key(InMemoryChannelKeys this_ptr, byte[] val) {
25 bindings.InMemoryChannelKeys_set_funding_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
26 this.ptrs_to.add(this_ptr);
29 public byte[] get_revocation_base_key(InMemoryChannelKeys this_ptr) {
30 byte[] ret = bindings.InMemoryChannelKeys_get_revocation_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
31 this.ptrs_to.add(this_ptr);
35 public void set_revocation_base_key(InMemoryChannelKeys this_ptr, byte[] val) {
36 bindings.InMemoryChannelKeys_set_revocation_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
37 this.ptrs_to.add(this_ptr);
40 public byte[] get_payment_key(InMemoryChannelKeys this_ptr) {
41 byte[] ret = bindings.InMemoryChannelKeys_get_payment_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
42 this.ptrs_to.add(this_ptr);
46 public void set_payment_key(InMemoryChannelKeys this_ptr, byte[] val) {
47 bindings.InMemoryChannelKeys_set_payment_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
48 this.ptrs_to.add(this_ptr);
51 public byte[] get_delayed_payment_base_key(InMemoryChannelKeys this_ptr) {
52 byte[] ret = bindings.InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
53 this.ptrs_to.add(this_ptr);
57 public void set_delayed_payment_base_key(InMemoryChannelKeys this_ptr, byte[] val) {
58 bindings.InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
59 this.ptrs_to.add(this_ptr);
62 public byte[] get_htlc_base_key(InMemoryChannelKeys this_ptr) {
63 byte[] ret = bindings.InMemoryChannelKeys_get_htlc_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
64 this.ptrs_to.add(this_ptr);
68 public void set_htlc_base_key(InMemoryChannelKeys this_ptr, byte[] val) {
69 bindings.InMemoryChannelKeys_set_htlc_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
70 this.ptrs_to.add(this_ptr);
73 public byte[] get_commitment_seed(InMemoryChannelKeys this_ptr) {
74 byte[] ret = bindings.InMemoryChannelKeys_get_commitment_seed(this_ptr == null ? 0 : this_ptr.ptr & ~1);
75 this.ptrs_to.add(this_ptr);
79 public void set_commitment_seed(InMemoryChannelKeys this_ptr, byte[] val) {
80 bindings.InMemoryChannelKeys_set_commitment_seed(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
81 this.ptrs_to.add(this_ptr);
84 // Skipped InMemoryChannelKeys_new
85 public ChannelPublicKeys counterparty_pubkeys() {
86 ChannelPublicKeys ret = new ChannelPublicKeys(null, bindings.InMemoryChannelKeys_counterparty_pubkeys(this.ptr));
90 public short counterparty_selected_contest_delay() {
91 short ret = bindings.InMemoryChannelKeys_counterparty_selected_contest_delay(this.ptr);
95 public short holder_selected_contest_delay() {
96 short ret = bindings.InMemoryChannelKeys_holder_selected_contest_delay(this.ptr);
100 public ChannelKeys as_ChannelKeys() {
101 ChannelKeys ret = new ChannelKeys(null, bindings.InMemoryChannelKeys_as_ChannelKeys(this.ptr));
102 ret.ptrs_to.add(this);
106 // Skipped InMemoryChannelKeys_write
107 public InMemoryChannelKeys(byte[] ser) {
108 super(bindings.InMemoryChannelKeys_read(ser));