Enable remote-wallet signing in solana-keygen (#8267) (#8268)

automerge
This commit is contained in:
mergify[bot]
2020-02-13 13:57:11 -08:00
committed by GitHub
parent 00f92f520f
commit 79e340c499
8 changed files with 150 additions and 85 deletions

View File

@@ -1985,9 +1985,17 @@ impl KeypairUtil for FaucetKeypair {
self.transaction.message().account_keys[0]
}
fn try_pubkey(&self) -> Result<Pubkey, Box<dyn error::Error>> {
Ok(self.pubkey())
}
fn sign_message(&self, _msg: &[u8]) -> Signature {
self.transaction.signatures[0]
}
fn try_sign_message(&self, message: &[u8]) -> Result<Signature, Box<dyn error::Error>> {
Ok(self.sign_message(message))
}
}
pub fn request_and_confirm_airdrop(