2f0d32b48b649d7bda5c0fddeb98222f3ffcaefe
[ldk-java] / ts / structs / OutPoint.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class OutPoint extends CommonBase {
6         OutPoint(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.OutPoint_free(ptr); }
11         }
12
13         public OutPoint clone() {
14                 uint32_t ret = bindings.OutPoint_clone(this.ptr);
15                 OutPoint ret_hu_conv = new OutPoint(null, ret);
16                 return ret_hu_conv;
17         }
18
19         public byte[] get_txid() {
20                 byte[] ret = bindings.OutPoint_get_txid(this.ptr);
21                 return ret;
22         }
23
24         public void set_txid(byte[] val) {
25                 bindings.OutPoint_set_txid(this.ptr, val);
26         }
27
28         public short get_index() {
29                 short ret = bindings.OutPoint_get_index(this.ptr);
30                 return ret;
31         }
32
33         public void set_index(short val) {
34                 bindings.OutPoint_set_index(this.ptr, val);
35         }
36
37         public static OutPoint constructor_new(byte[] txid_arg, short index_arg) {
38                 uint32_t ret = bindings.OutPoint_new(txid_arg, index_arg);
39                 OutPoint ret_hu_conv = new OutPoint(null, ret);
40                 return ret_hu_conv;
41         }
42
43         public byte[] to_channel_id() {
44                 byte[] ret = bindings.OutPoint_to_channel_id(this.ptr);
45                 return ret;
46         }
47
48         public byte[] write() {
49                 byte[] ret = bindings.OutPoint_write(this.ptr);
50                 return ret;
51         }
52
53         public static OutPoint constructor_read(byte[] ser) {
54                 uint32_t ret = bindings.OutPoint_read(ser);
55                 OutPoint ret_hu_conv = new OutPoint(null, ret);
56                 return ret_hu_conv;
57         }
58
59 }