mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 12:37:57 +00:00
Overhaul crypto (Schnorr/Ristretto, HDKD, BIP39) (#1795)
* Rijig to Ristretto * Rebuild wasm * adds compatibility test with the wasm module * Add Ed25519-BIP39 support * Bump subkey version * Update CLI output * New keys. * Standard phrase/password/path keys. * Subkey uses S-URI for secrets * Move everything to use new HDKD crypto. * Test fixes * Ignore old test vector. * fix the ^^ old test vector. * Fix tests * Test fixes * Cleanups * Fix broken key conversion logic in grandpa CC @rphmeier * Remove legacy Keyring usage * Traitify `Pair` * Replace Ed25519AuthorityId with ed25519::Public * Expunge Ed25519AuthorityId type! * Replace Sr25519AuthorityId with sr25519::Public * Remove dodgy crypto type-punning conversions * Fix some tests * Avoid trait * Deduplicate DeriveJunction string decode * Remove cruft code * Fix test * Minor removals * Build fix * Subkey supports sign and verify * Inspect works for public key URIs * Remove more crypto type-punning * Fix typo * Fix tests
This commit is contained in:
@@ -273,17 +273,16 @@ mod tests {
|
||||
use codec::Encode;
|
||||
use std::cell::RefCell;
|
||||
use consensus_common::{Environment, Proposer};
|
||||
use test_client::keyring::Keyring;
|
||||
use test_client::{self, runtime::{Extrinsic, Transfer}};
|
||||
use test_client::{self, runtime::{Extrinsic, Transfer}, AccountKeyring};
|
||||
|
||||
fn extrinsic(nonce: u64) -> Extrinsic {
|
||||
let tx = Transfer {
|
||||
amount: Default::default(),
|
||||
nonce,
|
||||
from: Keyring::Alice.to_raw_public().into(),
|
||||
from: AccountKeyring::Alice.into(),
|
||||
to: Default::default(),
|
||||
};
|
||||
let signature = Keyring::from_raw_public(tx.from.to_fixed_bytes()).unwrap().sign(&tx.encode()).into();
|
||||
let signature = AccountKeyring::from_public(&tx.from).unwrap().sign(&tx.encode()).into();
|
||||
Extrinsic::Transfer(tx, signature)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user