I'm using cardanocli-js
to create both VRF files for running a stake pool: vrf.vkey
and vrf.skey
:
const vrfKeyAccount = cardanocliJs.nodeKeyGenVRF("Totem");
Then I want to read the vrf.vkey
file and convert the cborHex
value to VRFKeyHash
format, from the Cardano Serialization Lib. For that, I do:
CardanoWasm.VRFKeyHash.from_hex(JSON.parse(vrfKeyFile).cborHex);
But I'm getting the following error:
/cardano-multiplatform-lib/rust/pkg/package/cardano_multiplatform_lib.js:16780
throw takeObject(arg0);
^
JsValue("Deserialization failed in VRFKeyHash because: Invalid cbor: expected tuple 'hash length' of length 32 but got length Len(34).")
(Use `node --trace-uncaught ...` to show where the exception was thrown)