Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / FundingCreated.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
9 /**
10  * A funding_created message to be sent or received from a peer
11  */
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class FundingCreated extends CommonBase {
14         FundingCreated(Object _dummy, long ptr) { super(ptr); }
15         @Override @SuppressWarnings("deprecation")
16         protected void finalize() throws Throwable {
17                 super.finalize();
18                 if (ptr != 0) { bindings.FundingCreated_free(ptr); }
19         }
20
21         /**
22          * A temporary channel ID, until the funding is established
23          */
24         public byte[] get_temporary_channel_id() {
25                 byte[] ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr);
26                 return ret;
27         }
28
29         /**
30          * A temporary channel ID, until the funding is established
31          */
32         public void set_temporary_channel_id(byte[] val) {
33                 bindings.FundingCreated_set_temporary_channel_id(this.ptr, val);
34         }
35
36         /**
37          * The funding transaction ID
38          */
39         public byte[] get_funding_txid() {
40                 byte[] ret = bindings.FundingCreated_get_funding_txid(this.ptr);
41                 return ret;
42         }
43
44         /**
45          * The funding transaction ID
46          */
47         public void set_funding_txid(byte[] val) {
48                 bindings.FundingCreated_set_funding_txid(this.ptr, val);
49         }
50
51         /**
52          * The specific output index funding this channel
53          */
54         public short get_funding_output_index() {
55                 short ret = bindings.FundingCreated_get_funding_output_index(this.ptr);
56                 return ret;
57         }
58
59         /**
60          * The specific output index funding this channel
61          */
62         public void set_funding_output_index(short val) {
63                 bindings.FundingCreated_set_funding_output_index(this.ptr, val);
64         }
65
66         /**
67          * The signature of the channel initiator (funder) on the funding transaction
68          */
69         public byte[] get_signature() {
70                 byte[] ret = bindings.FundingCreated_get_signature(this.ptr);
71                 return ret;
72         }
73
74         /**
75          * The signature of the channel initiator (funder) on the funding transaction
76          */
77         public void set_signature(byte[] val) {
78                 bindings.FundingCreated_set_signature(this.ptr, val);
79         }
80
81         /**
82          * Constructs a new FundingCreated given each field
83          */
84         public static FundingCreated of(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) {
85                 long ret = bindings.FundingCreated_new(temporary_channel_id_arg, funding_txid_arg, funding_output_index_arg, signature_arg);
86                 FundingCreated ret_hu_conv = new FundingCreated(null, ret);
87                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
88                 return ret_hu_conv;
89         }
90
91         /**
92          * Creates a copy of the FundingCreated
93          */
94         public FundingCreated clone() {
95                 long ret = bindings.FundingCreated_clone(this.ptr);
96                 FundingCreated ret_hu_conv = new FundingCreated(null, ret);
97                 ret_hu_conv.ptrs_to.add(this);
98                 return ret_hu_conv;
99         }
100
101         /**
102          * Serialize the FundingCreated object into a byte array which can be read by FundingCreated_read
103          */
104         public byte[] write() {
105                 byte[] ret = bindings.FundingCreated_write(this.ptr);
106                 return ret;
107         }
108
109         /**
110          * Read a FundingCreated from a byte array, created by FundingCreated_write
111          */
112         public static Result_FundingCreatedDecodeErrorZ read(byte[] ser) {
113                 long ret = bindings.FundingCreated_read(ser);
114                 Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
115                 return ret_hu_conv;
116         }
117
118 }