4b38a8b111c4f93bf52784ca87704ba1d0d821e5
[ldk-java] / ts / structs / DataLossProtect.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class DataLossProtect extends CommonBase {
6         DataLossProtect(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.DataLossProtect_free(ptr); }
11         }
12
13         public DataLossProtect clone() {
14                 uint32_t ret = bindings.DataLossProtect_clone(this.ptr);
15                 DataLossProtect ret_hu_conv = new DataLossProtect(null, ret);
16                 return ret_hu_conv;
17         }
18
19         public byte[] get_your_last_per_commitment_secret() {
20                 byte[] ret = bindings.DataLossProtect_get_your_last_per_commitment_secret(this.ptr);
21                 return ret;
22         }
23
24         public void set_your_last_per_commitment_secret(byte[] val) {
25                 bindings.DataLossProtect_set_your_last_per_commitment_secret(this.ptr, val);
26         }
27
28         public byte[] get_my_current_per_commitment_point() {
29                 byte[] ret = bindings.DataLossProtect_get_my_current_per_commitment_point(this.ptr);
30                 return ret;
31         }
32
33         public void set_my_current_per_commitment_point(byte[] val) {
34                 bindings.DataLossProtect_set_my_current_per_commitment_point(this.ptr, val);
35         }
36
37         public static DataLossProtect constructor_new(byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg) {
38                 uint32_t ret = bindings.DataLossProtect_new(your_last_per_commitment_secret_arg, my_current_per_commitment_point_arg);
39                 DataLossProtect ret_hu_conv = new DataLossProtect(null, ret);
40                 return ret_hu_conv;
41         }
42
43 }