[C#] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / c_sharp / src / org / ldk / structs / NodeId.cs
index 0aa9014c1fa0305f02b33a7dceb3a04b17f51c15..c994ad56c6623d3808ee7fa500b1faa24f753901 100644 (file)
@@ -45,6 +45,17 @@ public class NodeId : CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Create a new NodeId from a slice of bytes
+        */
+       public static Result_NodeIdDecodeErrorZ from_slice(byte[] bytes) {
+               long ret = bindings.NodeId_from_slice(InternalUtils.encodeUint8Array(bytes));
+               GC.KeepAlive(bytes);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
        /**
         * Get the public key slice from this NodeId
         */
@@ -56,6 +67,17 @@ public class NodeId : CommonBase {
                return ret_conv;
        }
 
+       /**
+        * Get the public key as an array from this NodeId
+        */
+       public byte[] as_array() {
+               long ret = bindings.NodeId_as_array(this.ptr);
+               GC.KeepAlive(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
+       }
+
        /**
         * Get the public key from this NodeId
         */