Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / NetAddress.java
index 646489eba079debf0fdb35a3860ef4ca38e2add5..3e7d2affb059d6c7cce56df4727c5e28e029248d 100644 (file)
@@ -79,6 +79,7 @@ public class NetAddress extends CommonBase {
         */
        public NetAddress clone() {
                long ret = bindings.NetAddress_clone(this.ptr);
+               if (ret < 1024) { return null; }
                NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
@@ -92,4 +93,14 @@ public class NetAddress extends CommonBase {
                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);
+               if (ret < 1024) { return null; }
+               Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }