Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add key raw serialisation instances, and IsString #1455

Merged
merged 1 commit into from
Jul 14, 2020

Conversation

dcoutts
Copy link
Contributor

@dcoutts dcoutts commented Jul 14, 2020

Add SerialiseAsRawBytes instances for all the keys (vkey and skey).

Also provide more helpful Show and IsString instances for all the key
types, so that quick examples are easier to construct and work with in
ghci. Show will render in hex format without any extra constructor, and
the same syntax will work for construction using IsString.

Also add more Bech32 instances for things agreed in the draft CIP.

Add SerialiseAsRawBytes instances for all the keys (vkey and skey).

Also provide more helpful Show and IsString instances for all the key
types, so that quick examples are easier to construct and work with in
ghci. Show will render in hex format without any extra constructor, and
the same syntax will work for construction using IsString.

Also add more Bech32 instances for things agreed in the draft CIP.
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

(Crypto.HD.xprv bs)

instance SerialiseAsBech32 (VerificationKey ByronKey) where
bech32PrefixFor _ = "addr_xvk"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does the x stand for here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dcoutts
Copy link
Contributor Author

dcoutts commented Jul 14, 2020

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 14, 2020

@iohk-bors iohk-bors bot merged commit af65142 into master Jul 14, 2020
@iohk-bors iohk-bors bot deleted the dcoutts/api-more-serialisation-instances branch July 14, 2020 12:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants