[TS] Update auto-generated bindings to LDK-C-Bindings 0.0.123.1
[ldk-java] / c_sharp / src / org / ldk / structs / NodeId.cs
index b5b0522c707644e5c23ae57b6ea6447d6071ccc4..a7a211adcb6d1f4c25998f85f423e5ddfa2e31f1 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
         */
@@ -78,6 +89,17 @@ public class NodeId : CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Get the string representation of a NodeId object
+        */
+       public string to_str() {
+               long ret = bindings.NodeId_to_str(this.ptr);
+               GC.KeepAlive(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               string ret_conv = InternalUtils.decodeString(ret);
+               return ret_conv;
+       }
+
        /**
         * Generates a non-cryptographic 64-bit hash of the NodeId.
         */