Create structs and traits that are (a bit) more human-friendly!
[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         // Skipped InMemoryChannelKeys_set_funding_key
25         public byte[] get_revocation_base_key(InMemoryChannelKeys this_ptr) {
26                 byte[] ret = bindings.InMemoryChannelKeys_get_revocation_base_key(this_ptr.ptr & ~1);
27                 this.ptrs_to.add(this_ptr);
28                 return ret;
29         }
30
31         // Skipped InMemoryChannelKeys_set_revocation_base_key
32         public byte[] get_payment_key(InMemoryChannelKeys this_ptr) {
33                 byte[] ret = bindings.InMemoryChannelKeys_get_payment_key(this_ptr.ptr & ~1);
34                 this.ptrs_to.add(this_ptr);
35                 return ret;
36         }
37
38         // Skipped InMemoryChannelKeys_set_payment_key
39         public byte[] get_delayed_payment_base_key(InMemoryChannelKeys this_ptr) {
40                 byte[] ret = bindings.InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr.ptr & ~1);
41                 this.ptrs_to.add(this_ptr);
42                 return ret;
43         }
44
45         // Skipped InMemoryChannelKeys_set_delayed_payment_base_key
46         public byte[] get_htlc_base_key(InMemoryChannelKeys this_ptr) {
47                 byte[] ret = bindings.InMemoryChannelKeys_get_htlc_base_key(this_ptr.ptr & ~1);
48                 this.ptrs_to.add(this_ptr);
49                 return ret;
50         }
51
52         // Skipped InMemoryChannelKeys_set_htlc_base_key
53         public byte[] get_commitment_seed(InMemoryChannelKeys this_ptr) {
54                 byte[] ret = bindings.InMemoryChannelKeys_get_commitment_seed(this_ptr.ptr & ~1);
55                 this.ptrs_to.add(this_ptr);
56                 return ret;
57         }
58
59         public void set_commitment_seed(InMemoryChannelKeys this_ptr, byte[] val) {
60                 bindings.InMemoryChannelKeys_set_commitment_seed(this_ptr.ptr & ~1, val);
61                 this.ptrs_to.add(this_ptr);
62         }
63
64         // Skipped InMemoryChannelKeys_new
65         public ChannelPublicKeys counterparty_pubkeys() {
66                 ChannelPublicKeys ret = new ChannelPublicKeys(null, bindings.InMemoryChannelKeys_counterparty_pubkeys(this.ptr));
67                 return ret;
68         }
69
70         public short counterparty_selected_contest_delay() {
71                 short ret = bindings.InMemoryChannelKeys_counterparty_selected_contest_delay(this.ptr);
72                 return ret;
73         }
74
75         public short holder_selected_contest_delay() {
76                 short ret = bindings.InMemoryChannelKeys_holder_selected_contest_delay(this.ptr);
77                 return ret;
78         }
79
80         public ChannelKeys as_ChannelKeys() {
81                 ChannelKeys ret = new ChannelKeys(null, bindings.InMemoryChannelKeys_as_ChannelKeys(this.ptr));
82                 ret.ptrs_to.add(this);
83                 return ret;
84         }
85
86         // Skipped InMemoryChannelKeys_write
87         // Skipped InMemoryChannelKeys_read
88 }