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(bytes);
+ Reference.reachabilityFence(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
*/
return ret;
}
+ /**
+ * Get the public key as an array from this NodeId
+ */
+ public byte[] as_array() {
+ byte[] ret = bindings.NodeId_as_array(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Get the public key from this NodeId
*/
- public Result_PublicKeyErrorZ as_pubkey() {
+ public Result_PublicKeySecp256k1ErrorZ as_pubkey() {
long ret = bindings.NodeId_as_pubkey(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret);
+ Result_PublicKeySecp256k1ErrorZ ret_hu_conv = Result_PublicKeySecp256k1ErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}