Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / NetAddress.java
index 2cde093aac976425f31851696f39fcee166356c5..83b2c27efc659aef206f5f357d330c3d1648207e 100644 (file)
@@ -74,4 +74,31 @@ public class NetAddress extends CommonBase {
                        this.port = obj.port;
                }
        }
+       /**
+        * Creates a copy of the NetAddress
+        */
+       public NetAddress clone() {
+               long ret = bindings.NetAddress_clone(this.ptr);
+               NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Serialize the NetAddress object into a byte array which can be read by NetAddress_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.NetAddress_write(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Read a NetAddress from a byte array, created by NetAddress_write
+        */
+       public static Result_NetAddressDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.NetAddress_read(ser);
+               Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }