Timeline for How can I convert from cborHex to VRFKeyHash type from the Cardano Serialization Lib?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 9, 2022 at 23:27 | comment | added | Falcon Stakepool | Thank you very much! | |
Jun 9, 2022 at 9:12 | comment | added | Fermat | Also see npmjs.com/package/@dcspark/cip5-js, this might help. | |
Jun 9, 2022 at 9:01 | comment | added | Fermat |
Note that in the bech32 is something similar to JSON, to indicate if something is a bytestring or a list etc some bytes indicate those objects. If you have a look at cbor.me and put in the full you will see the key is D3E6E69EDF63E50CE0D12BC8FD891D6D00A09CB484A55F99CAF0767BD9D75488 . Which has length 32 not 34. I am no expert on the serialization lib so I cannot help with that unfortunately.
|
|
Jun 9, 2022 at 5:07 | comment | added | Falcon Stakepool | Do you know what conversion should I apply to cborHex in order to work with Cardano Serialization Lib? const vrfKeyHash = CardanoWasm.VRFKeyHash.from_bytes(X) Imagine that X is the cborHex. If I provide it directly that way, I get the following: "JsValue("Deserialization failed in VRFKeyHash because: Invalid cbor: expected tuple 'hash length' of length 32 but got length Len(34).")" I have also tried converting it to bytes, but same error. | |
May 6, 2022 at 22:55 | vote | accept | Falcon Stakepool | ||
May 31, 2022 at 6:36 | |||||
May 5, 2022 at 9:17 | history | answered | Fermat | CC BY-SA 4.0 |