Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / NodeId.java
index e74d649ae688fa69a0c5b9770ee08929feaae4e4..a0074a6592c3f2841cf76b9b3983dd8d3df9c0e2 100644 (file)
@@ -19,6 +19,11 @@ public class NodeId extends CommonBase {
                if (ptr != 0) { bindings.NodeId_free(ptr); }
        }
 
+       long clone_ptr() {
+               long ret = bindings.NodeId_clone_ptr(this.ptr);
+               return ret;
+       }
+
        /**
         * Creates a copy of the NodeId
         */
@@ -34,7 +39,7 @@ public class NodeId extends CommonBase {
         * Create a new NodeId from a public key
         */
        public static NodeId from_pubkey(byte[] pubkey) {
-               long ret = bindings.NodeId_from_pubkey(pubkey);
+               long ret = bindings.NodeId_from_pubkey(InternalUtils.check_arr_len(pubkey, 33));
                if (ret >= 0 && ret <= 4096) { return null; }
                NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new NodeId(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);