Add bip32 support to solana-keygen recover (#17180)

* Fix spelling

* Add validator for  SignerSources

* Add helper to generate Keypair from supporting SignerSources

* Add bip32 support to solana-keygen recover

* Make SignerSourceKind const strs, use for Debug impl and URI schemes
This commit is contained in:
Tyera Eulberg
2021-05-12 13:33:11 -06:00
committed by GitHub
parent 9c42a89a43
commit b437b0a49d
4 changed files with 117 additions and 9 deletions

View File

@ -61,7 +61,7 @@ pub trait Signer {
}
/// Fallibly gets the implementor's public key
fn try_pubkey(&self) -> Result<Pubkey, SignerError>;
/// Invallibly produces an Ed25519 signature over the provided `message`
/// Infallibly produces an Ed25519 signature over the provided `message`
/// bytes. Returns the all-zeros `Signature` if signing is not possible.
fn sign_message(&self, message: &[u8]) -> Signature {
self.try_sign_message(message).unwrap_or_default()