Expose SecretKey as byte[32], expose trait call fns in human structs
[ldk-java] / src / main / java / org / ldk / structs / InMemoryChannelKeys.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
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();
11         }
12
13         public InMemoryChannelKeys(InMemoryChannelKeys orig) {
14                 super(bindings.InMemoryChannelKeys_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         public byte[] get_funding_key(InMemoryChannelKeys this_ptr) {
19                 byte[] ret = bindings.InMemoryChannelKeys_get_funding_key(this_ptr.ptr & ~1);
20                 this.ptrs_to.add(this_ptr);
21                 return ret;
22         }
23
24         public void set_funding_key(InMemoryChannelKeys this_ptr, byte[] val) {
25                 bindings.InMemoryChannelKeys_set_funding_key(this_ptr.ptr & ~1, val);
26                 this.ptrs_to.add(this_ptr);
27         }
28
29         public byte[] get_revocation_base_key(InMemoryChannelKeys this_ptr) {
30                 byte[] ret = bindings.InMemoryChannelKeys_get_revocation_base_key(this_ptr.ptr & ~1);
31                 this.ptrs_to.add(this_ptr);
32                 return ret;
33         }
34
35         public void set_revocation_base_key(InMemoryChannelKeys this_ptr, byte[] val) {
36                 bindings.InMemoryChannelKeys_set_revocation_base_key(this_ptr.ptr & ~1, val);
37                 this.ptrs_to.add(this_ptr);
38         }
39
40         public byte[] get_payment_key(InMemoryChannelKeys this_ptr) {
41                 byte[] ret = bindings.InMemoryChannelKeys_get_payment_key(this_ptr.ptr & ~1);
42                 this.ptrs_to.add(this_ptr);
43                 return ret;
44         }
45
46         public void set_payment_key(InMemoryChannelKeys this_ptr, byte[] val) {
47                 bindings.InMemoryChannelKeys_set_payment_key(this_ptr.ptr & ~1, val);
48                 this.ptrs_to.add(this_ptr);
49         }
50
51         public byte[] get_delayed_payment_base_key(InMemoryChannelKeys this_ptr) {
52                 byte[] ret = bindings.InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr.ptr & ~1);
53                 this.ptrs_to.add(this_ptr);
54                 return ret;
55         }
56
57         public void set_delayed_payment_base_key(InMemoryChannelKeys this_ptr, byte[] val) {
58                 bindings.InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr.ptr & ~1, val);
59                 this.ptrs_to.add(this_ptr);
60         }
61
62         public byte[] get_htlc_base_key(InMemoryChannelKeys this_ptr) {
63                 byte[] ret = bindings.InMemoryChannelKeys_get_htlc_base_key(this_ptr.ptr & ~1);
64                 this.ptrs_to.add(this_ptr);
65                 return ret;
66         }
67
68         public void set_htlc_base_key(InMemoryChannelKeys this_ptr, byte[] val) {
69                 bindings.InMemoryChannelKeys_set_htlc_base_key(this_ptr.ptr & ~1, val);
70                 this.ptrs_to.add(this_ptr);
71         }
72
73         public byte[] get_commitment_seed(InMemoryChannelKeys this_ptr) {
74                 byte[] ret = bindings.InMemoryChannelKeys_get_commitment_seed(this_ptr.ptr & ~1);
75                 this.ptrs_to.add(this_ptr);
76                 return ret;
77         }
78
79         public void set_commitment_seed(InMemoryChannelKeys this_ptr, byte[] val) {
80                 bindings.InMemoryChannelKeys_set_commitment_seed(this_ptr.ptr & ~1, val);
81                 this.ptrs_to.add(this_ptr);
82         }
83
84         // Skipped InMemoryChannelKeys_new
85         public ChannelPublicKeys counterparty_pubkeys() {
86                 ChannelPublicKeys ret = new ChannelPublicKeys(null, bindings.InMemoryChannelKeys_counterparty_pubkeys(this.ptr));
87                 return ret;
88         }
89
90         public short counterparty_selected_contest_delay() {
91                 short ret = bindings.InMemoryChannelKeys_counterparty_selected_contest_delay(this.ptr);
92                 return ret;
93         }
94
95         public short holder_selected_contest_delay() {
96                 short ret = bindings.InMemoryChannelKeys_holder_selected_contest_delay(this.ptr);
97                 return ret;
98         }
99
100         public ChannelKeys as_ChannelKeys() {
101                 ChannelKeys ret = new ChannelKeys(null, bindings.InMemoryChannelKeys_as_ChannelKeys(this.ptr));
102                 ret.ptrs_to.add(this);
103                 return ret;
104         }
105
106         // Skipped InMemoryChannelKeys_write
107         // Skipped InMemoryChannelKeys_read
108 }