Rewrite the world, with several interdependant changes (but several still WIP)
[ldk-java] / src / main / java / org / ldk / structs / KeysInterface.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class KeysInterface extends CommonBase {
10         KeysInterface(Object _dummy, long ptr) { super(ptr); }
11         public KeysInterface(bindings.LDKKeysInterface arg) {
12                 super(bindings.LDKKeysInterface_new(arg));
13                 this.ptrs_to.add(arg);
14         }
15         @Override @SuppressWarnings("deprecation")
16         protected void finalize() throws Throwable {
17                 bindings.KeysInterface_free(ptr); super.finalize();
18         }
19
20         public byte[] get_node_secret() {
21                 byte[] ret = bindings.KeysInterface_get_node_secret(this.ptr);
22                 return ret;
23         }
24
25         public byte[] get_destination_script() {
26                 byte[] ret = bindings.KeysInterface_get_destination_script(this.ptr);
27                 return ret;
28         }
29
30         public byte[] get_shutdown_pubkey() {
31                 byte[] ret = bindings.KeysInterface_get_shutdown_pubkey(this.ptr);
32                 return ret;
33         }
34
35         public ChannelKeys get_channel_keys(boolean inbound, long channel_value_satoshis) {
36                 long ret = bindings.KeysInterface_get_channel_keys(this.ptr, inbound, channel_value_satoshis);
37                 ChannelKeys ret_hu_conv = new ChannelKeys(null, ret);
38                 ret_hu_conv.ptrs_to.add(this);
39                 return ret_hu_conv;
40         }
41
42         public byte[] get_secure_random_bytes() {
43                 byte[] ret = bindings.KeysInterface_get_secure_random_bytes(this.ptr);
44                 return ret;
45         }
46
47 }