This repository was archived by the owner on Dec 13, 2023. It is now read-only.
Add generate credentials#3
Merged
BoisterousCoder merged 4 commits intomainfrom Oct 26, 2022
Merged
Conversation
bgins
reviewed
Oct 24, 2022
| println!("{}", "✅ Generated an Ed25519 key pair and associated DID".bright_green()); | ||
| println!("🗝️ Private key: {}", private_key_str.bright_blue()); | ||
| println!("🔑 Public key: {}", public_key_str.bright_blue()); | ||
| println!("🆔 DID: {}", did.bright_blue()); |
Contributor
There was a problem hiding this comment.
Nice job capturing the emoji! 😄
bgins
approved these changes
Oct 24, 2022
Contributor
bgins
left a comment
There was a problem hiding this comment.
Looks great! Thanks for implementing this. 🎉 🚀
expede
reviewed
Oct 24, 2022
| } | ||
|
|
||
| const DID_KEY_PREFIX:&str = "did:key:z"; | ||
| const DID_KEY_PREFIX_ED25519:[u8; 2] = [237, 1]; |
Member
There was a problem hiding this comment.
Oh interesting! The existing did-key crates don't have Ed25519?
Contributor
Author
There was a problem hiding this comment.
The one did crate I saw had no documentation and looked unfinished, so I just made my own as it was pretty quick
fixed an issue. DIdn't know you had to hard code the prefix as a byte and not a string
6274e55 to
f8a8ebb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the add generate credentials command.
Testing
To test this command
The output should produce the ed222519 key pair and its did, which should look something like the following:
Related Issues
Closes #2