-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Cardano.Api.DeserialiseAnyOf #4639
Conversation
4fd4eee
to
d744c0c
Compare
renderSomeAddressVerificationKey (AGenesisDelegateExtendedVerificationKey vk) = | ||
-- TODO: We could implement a CastVerificationKeyRole GenesisDelegateKey PaymentKey | ||
-- if we want to avoid casting twice. | ||
let genDelegKey = (castVerificationKey vk :: VerificationKey GenesisDelegateKey) | ||
stakePoolKey = castVerificationKey genDelegKey :: VerificationKey StakePoolKey | ||
in serialiseToBech32 stakePoolKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has the comment become outdated? I don't think you want CastVerificationKeyRole GenesisDelegateKey PaymentKey
. It looks to me like you want CastVerificationKeyRole GenesisKey PaymentKey
and CastVerificationKeyRole GenesisDelegateKey StatePoolKey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They all use the same crypto. I could also implement a SerialiseAsBech32 (VerificationKey GenesisDelegateKey)
instance as another option.
d744c0c
to
031e0d5
Compare
bors r+ |
Build succeeded: |
Move verification key related serialization to
cardano-api
and expose a simpler interface.