-
Notifications
You must be signed in to change notification settings - Fork 720
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
Add command for converting various Byron keys to their Shelley counterpart #1486
Conversation
!Text | ||
-- ^ Text representation of the parse error. Unfortunately, the actual | ||
-- error type isn't exported. | ||
| ShelleyKeyCmdDeserialiseByronVerKeyError |
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.
I feel like it'd be nicer to instead have something like ShelleyKeyCmdCborDecoderError !DecoderError
.
37fb8fa
to
358b052
Compare
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.
Looking good. A few further tweaks we could make.
<$> pITNKeyFIle | ||
<*> pMaybeOutputFile | ||
|
||
pITNKeyFile :: Parser ITNKeyFile | ||
pITNKeyFile = pITNSigningKeyFile <|> pITNVerificationKeyFile | ||
pITNKeyFIle :: Parser ITNKeyFile | ||
pITNKeyFIle = pITNSigningKeyFile <|> pITNVerificationKeyFile |
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.
Accidental name change ("I" vs "i").
Additionally, move key conversion commands such as "address convert" and "stake-address convert-itn-key" under this new "key" command.
And consolodate the special-purpose parsers to be next to each other.
Extended ed25519 (bip32) key variants for stake keys, for genesis keys and for genesis delegate keys. The stake extended keys are useful for importing keys from HD wallets, and for ITN extended keys. The genesis and genesis delgate ones are useful for working with Byron legacy keys, which all used extended signing keys (for no good reason).
The existing command supported Byron payment signing keys. Add conversion support for Byron genesis and genesis delegate keys. Also support both signing and verification keys. And also support the legacy Byron format for the signing keys. Adjust the existing special command for the base64 genesis verification key to take the base64 as a flag rather than in a file. Also adjust the ITN conversion to use the same types as the above.
07de813
to
ee23c34
Compare
bors merge |
I can't approve since I originally opened this PR, but LGTM 💯 |
Build succeeded |
Add support for converting:
Support either verification or signing keys.
Support current or legacy (ie SL) formats.
Also add special conversion for Byron genesis verification keys in base64,
as they appear in the Byron genesis file as
issuerPK
.