mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-10 17:11:03 +00:00
Crypto fixes/improvements (#2008)
* Crypto fixes: - Use schnorrkel's HDKD derive - Assume all key URIs beginning with `/` are prefixed with public root phrase. * Remove commented code. * Update README * Update core/primitives/src/ed25519.rs Co-Authored-By: gavofyork <github@gavwood.com>
This commit is contained in:
@@ -22,11 +22,6 @@ use lazy_static::lazy_static;
|
||||
use substrate_primitives::{ed25519::{Pair, Public, Signature}, Pair as _Pair, H256};
|
||||
pub use substrate_primitives::ed25519;
|
||||
|
||||
/// The root phrase for our test keys.
|
||||
///
|
||||
/// This is the same phrase that's in node::cli, but shouldn't need to be.
|
||||
pub const DEV_PHRASE: &str = "bottom drive obey lake curtain smoke basket hold race lonely fit walk";
|
||||
|
||||
/// Set of test accounts.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum Keyring {
|
||||
@@ -81,7 +76,7 @@ impl Keyring {
|
||||
}
|
||||
|
||||
pub fn pair(self) -> Pair {
|
||||
Pair::from_string(&format!("{}//{}", DEV_PHRASE, <&'static str>::from(self)), None)
|
||||
Pair::from_string(&format!("//{}", <&'static str>::from(self)), None)
|
||||
.expect("static values are known good; qed")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,6 @@ use lazy_static::lazy_static;
|
||||
use substrate_primitives::{sr25519::{Pair, Public, Signature}, Pair as _Pair, H256};
|
||||
pub use substrate_primitives::sr25519;
|
||||
|
||||
/// The root phrase for our test keys.
|
||||
///
|
||||
/// This is the same phrase that's in node::cli, but shouldn't need to be.
|
||||
pub const DEV_PHRASE: &str = "bottom drive obey lake curtain smoke basket hold race lonely fit walk";
|
||||
|
||||
/// Set of test accounts.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum Keyring {
|
||||
@@ -81,7 +76,7 @@ impl Keyring {
|
||||
}
|
||||
|
||||
pub fn pair(self) -> Pair {
|
||||
Pair::from_string(&format!("{}//{}", DEV_PHRASE, <&'static str>::from(self)), None)
|
||||
Pair::from_string(&format!("//{}", <&'static str>::from(self)), None)
|
||||
.expect("static values are known good; qed")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user