Packages versions
@miden-sdk/miden-sdk@0.16.0-rc.5
Bug description
In Node.js, the SDK wrapper converts Buffer and Uint8Array arguments into plain arrays.
AuthSecretKey.deserialize() expects a Buffer, so it fails through the public SDK export.
This also affects Word.deserialize(). Calling the same method through getNativeModule() works because it bypasses the wrapper.
How can this be reproduced?
import { AuthSecretKey } from "@miden-sdk/miden-sdk";
const key = AuthSecretKey.rpoFalconWithRNG(new Uint8Array(32));
const base64 = key.serialize().toString("base64");
AuthSecretKey.deserialize(Buffer.from(base64, "base64"));
Relevant log output
Failed to get Buffer pointer and length
Packages versions
@miden-sdk/miden-sdk@0.16.0-rc.5
Bug description
In Node.js, the SDK wrapper converts
BufferandUint8Arrayarguments into plain arrays.AuthSecretKey.deserialize()expects aBuffer, so it fails through the public SDK export.This also affects
Word.deserialize(). Calling the same method throughgetNativeModule()works because it bypasses the wrapper.How can this be reproduced?
import { AuthSecretKey } from "@miden-sdk/miden-sdk";
const key = AuthSecretKey.rpoFalconWithRNG(new Uint8Array(32));
const base64 = key.serialize().toString("base64");
AuthSecretKey.deserialize(Buffer.from(base64, "base64"));
Relevant log output