You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Using Conway Alpha Build: @emurgo/[email protected].
Describe the bug
.kind()
call on new Conway certificates I get incorrect indexes, when comparing to the Conway CDDL schema..kind()
on older certificates the correct value is returned..kind()
is meant to do?Expected behaviour
Old Certificates (working):
console.log(CSL.Certificate.new_stake_registration(CSL.StakeRegistration.new(randomCredential)).kind());
0
is expected and0
is returned.console.log(CSL.Certificate.new_stake_deregistration(CSL.StakeDeregistration.new(randomCredential)).kind());
1
is expected and1
is returned.console.log(CSL.Certificate.new_stake_delegation(CSL.StakeDelegation.new(randomCredential, randomKeyHash)).kind());
2
is expected and2
is returned.New Certificates (not working):
console.log(CSL.Certificate.new_vote_delegation(CSL.VoteDelegation.new(randomCredential, randomDRep)).kind());
9
is expected (see CDDL), but15
is returned.console.log(CSL.Certificate.new_drep_registration(dRepRegCert).kind());
16
is expected (see CDDL), but10
is returned.console.log(CSL.Certificate.new_drep_deregistration(dRepDeRegCert).kind());
17
is expected (see CDDL), but9
is returned.(sorry I did not have time to test every new cert🙏)
The text was updated successfully, but these errors were encountered: