Updated bindings
[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 import org.ldk.util.*;
6 import java.util.Arrays;
7
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class InMemoryChannelKeys extends CommonBase {
10         InMemoryChannelKeys(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.InMemoryChannelKeys_free(ptr); }
15         }
16
17         public InMemoryChannelKeys clone() {
18                 long ret = bindings.InMemoryChannelKeys_clone(this.ptr);
19                 InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret);
20                 return ret_hu_conv;
21         }
22
23         public byte[] get_funding_key() {
24                 byte[] ret = bindings.InMemoryChannelKeys_get_funding_key(this.ptr);
25                 return ret;
26         }
27
28         public void set_funding_key(byte[] val) {
29                 bindings.InMemoryChannelKeys_set_funding_key(this.ptr, val);
30         }
31
32         public byte[] get_revocation_base_key() {
33                 byte[] ret = bindings.InMemoryChannelKeys_get_revocation_base_key(this.ptr);
34                 return ret;
35         }
36
37         public void set_revocation_base_key(byte[] val) {
38                 bindings.InMemoryChannelKeys_set_revocation_base_key(this.ptr, val);
39         }
40
41         public byte[] get_payment_key() {
42                 byte[] ret = bindings.InMemoryChannelKeys_get_payment_key(this.ptr);
43                 return ret;
44         }
45
46         public void set_payment_key(byte[] val) {
47                 bindings.InMemoryChannelKeys_set_payment_key(this.ptr, val);
48         }
49
50         public byte[] get_delayed_payment_base_key() {
51                 byte[] ret = bindings.InMemoryChannelKeys_get_delayed_payment_base_key(this.ptr);
52                 return ret;
53         }
54
55         public void set_delayed_payment_base_key(byte[] val) {
56                 bindings.InMemoryChannelKeys_set_delayed_payment_base_key(this.ptr, val);
57         }
58
59         public byte[] get_htlc_base_key() {
60                 byte[] ret = bindings.InMemoryChannelKeys_get_htlc_base_key(this.ptr);
61                 return ret;
62         }
63
64         public void set_htlc_base_key(byte[] val) {
65                 bindings.InMemoryChannelKeys_set_htlc_base_key(this.ptr, val);
66         }
67
68         public byte[] get_commitment_seed() {
69                 byte[] ret = bindings.InMemoryChannelKeys_get_commitment_seed(this.ptr);
70                 return ret;
71         }
72
73         public void set_commitment_seed(byte[] val) {
74                 bindings.InMemoryChannelKeys_set_commitment_seed(this.ptr, val);
75         }
76
77         public static InMemoryChannelKeys constructor_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, TwoTuple<Long, Long> key_derivation_params) {
78                 long ret = bindings.InMemoryChannelKeys_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, bindings.C2Tuple_u64u64Z_new(key_derivation_params.a, key_derivation_params.b));
79                 InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret);
80                 return ret_hu_conv;
81         }
82
83         public ChannelPublicKeys counterparty_pubkeys() {
84                 long ret = bindings.InMemoryChannelKeys_counterparty_pubkeys(this.ptr);
85                 ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
86                 return ret_hu_conv;
87         }
88
89         public short counterparty_selected_contest_delay() {
90                 short ret = bindings.InMemoryChannelKeys_counterparty_selected_contest_delay(this.ptr);
91                 return ret;
92         }
93
94         public short holder_selected_contest_delay() {
95                 short ret = bindings.InMemoryChannelKeys_holder_selected_contest_delay(this.ptr);
96                 return ret;
97         }
98
99         public boolean is_outbound() {
100                 boolean ret = bindings.InMemoryChannelKeys_is_outbound(this.ptr);
101                 return ret;
102         }
103
104         public OutPoint funding_outpoint() {
105                 long ret = bindings.InMemoryChannelKeys_funding_outpoint(this.ptr);
106                 OutPoint ret_hu_conv = new OutPoint(null, ret);
107                 return ret_hu_conv;
108         }
109
110         public ChannelTransactionParameters get_channel_parameters() {
111                 long ret = bindings.InMemoryChannelKeys_get_channel_parameters(this.ptr);
112                 ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
113                 return ret_hu_conv;
114         }
115
116         public ChannelKeys as_ChannelKeys() {
117                 long ret = bindings.InMemoryChannelKeys_as_ChannelKeys(this.ptr);
118                 ChannelKeys ret_hu_conv = new ChannelKeys(null, ret);
119                 ret_hu_conv.ptrs_to.add(this);
120                 return ret_hu_conv;
121         }
122
123         public byte[] write() {
124                 byte[] ret = bindings.InMemoryChannelKeys_write(this.ptr);
125                 return ret;
126         }
127
128         public static Result_InMemoryChannelKeysDecodeErrorZ constructor_read(byte[] ser) {
129                 long ret = bindings.InMemoryChannelKeys_read(ser);
130                 Result_InMemoryChannelKeysDecodeErrorZ ret_hu_conv = Result_InMemoryChannelKeysDecodeErrorZ.constr_from_ptr(ret);
131                 return ret_hu_conv;
132         }
133
134 }