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

* 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

(cherry picked from commit b437b0a49d)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
This commit is contained in:
mergify[bot]
2021-05-12 20:48:53 +00:00
committed by GitHub
parent 8ad1554bc9
commit 9753f1a6ca
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()