Skip to content

feat: integrate stellar-strkey for key validation (closes #7)#19

Closed
Idrhas wants to merge 3 commits intoDfunder:mainfrom
Idrhas:feat/stellar-strkey-key-validation
Closed

feat: integrate stellar-strkey for key validation (closes #7)#19
Idrhas wants to merge 3 commits intoDfunder:mainfrom
Idrhas:feat/stellar-strkey-key-validation

Conversation

@Idrhas
Copy link
Contributor

@Idrhas Idrhas commented Mar 3, 2026

Closes #7

What this adds

Cargo.toml

  • Added stellar-strkey = "0.0.8" for StrKey encoding/decoding
  • Added ed25519-dalek = "2" for public key derivation from secret seeds

src/utils/mod.rs (new)

  • Exposes pub mod keypair

src/utils/keypair.rs (new)

  • is_valid_public_key(key: &str) -> bool — validates G-prefixed Stellar public keys
  • is_valid_secret_key(key: &str) -> bool — validates S-prefixed Stellar secret keys
  • public_key_from_secret(secret: &str) -> Result<String, KeyError> — derives public key from secret
  • KeyError enum with InvalidSecretKey and InvalidPublicKey variants
  • 18 unit tests covering valid keys, invalid inputs, wrong prefix, truncated strings, cross-type mismatches, and correct derivation

src/main.rs

  • Added mod utils

@ayshadogo
Copy link
Contributor

ayshadogo commented Mar 3, 2026

@Idrhas Please fix Workflow and resolve conflicts

these are the 3 workflows we have

Run linting --- ⛔

Run tests ---- ⛔

Build to ensure no errors ✅

@ayshadogo
Copy link
Contributor

@Idrhas

Still waiting for you , Please your issue is blocking others

@Idrhas
Copy link
Contributor Author

Idrhas commented Mar 4, 2026

Run linting --- ⛔

Run tests ---- ⛔

on it... in a few

@ayshadogo
Copy link
Contributor

@Idrhas TWO checks failed and there is conflicts also

Please pull changes so that your work will not be scattered

@Idrhas Idrhas closed this Mar 4, 2026
@Idrhas Idrhas deleted the feat/stellar-strkey-key-validation branch March 4, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate stellar-strkey for Key Validation

2 participants