feat: integrate stellar-strkey for key validation (closes #7)#19
Closed
Idrhas wants to merge 3 commits intoDfunder:mainfrom
Closed
feat: integrate stellar-strkey for key validation (closes #7)#19Idrhas wants to merge 3 commits intoDfunder:mainfrom
Idrhas wants to merge 3 commits intoDfunder:mainfrom
Conversation
Contributor
|
@Idrhas Please fix Workflow and resolve conflicts these are the 3 workflows we have Run linting --- ⛔Run tests ---- ⛔Build to ensure no errors ✅ |
Contributor
|
Still waiting for you , Please your issue is blocking others |
Contributor
Author
on it... in a few |
Contributor
|
@Idrhas TWO checks failed and there is conflicts also Please pull changes so that your work will not be scattered |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #7
What this adds
Cargo.toml
stellar-strkey = "0.0.8"for StrKey encoding/decodinged25519-dalek = "2"for public key derivation from secret seedssrc/utils/mod.rs (new)
pub mod keypairsrc/utils/keypair.rs (new)
is_valid_public_key(key: &str) -> bool— validates G-prefixed Stellar public keysis_valid_secret_key(key: &str) -> bool— validates S-prefixed Stellar secret keyspublic_key_from_secret(secret: &str) -> Result<String, KeyError>— derives public key from secretKeyErrorenum withInvalidSecretKeyandInvalidPublicKeyvariantssrc/main.rs
mod utils