Emurgo / cardano-serialization-lib

This is a library, written in Rust, for serialization & deserialization of data structures used in Cardano's Haskell implementation of Alonzo along with useful utility functions.
Other
230 stars 124 forks source link

Conway [12.0.0-alpha.4] - New certificates .kind() return in correct value. #642

Closed Ryun1 closed 10 months ago

Ryun1 commented 10 months ago

Using Conway Alpha Build: @emurgo/cardano-serialization-lib-nodejs@12.0.0-alpha.4.

Describe the bug

Expected behaviour

Old Certificates (working):

New Certificates (not working):

(sorry I did not have time to test every new cert🙏)

lisicky commented 10 months ago

It is not cbor map key. It is number of our internal enum. See CertificateKind enum to match types from kind() function. Also as there is possibility to serialize StakeRegistration and StakeDeregistration with coin and without coin these types have two constructors new and new_with_coin depends on it these types serialize into different certs according to CDDL.

Ryun1 commented 10 months ago

Understood - thank you @lisicky 🙏

lisicky commented 10 months ago

If you wanna to check a cbor map key of certificate you can serialize a certificate into cbor in look into cbor by third party tool. Like https://cardananium.github.io/cquisitor/ (made by me) or https://cbor.nemo157.com