Generic keystore (#3008)

* Add KeyTypeId.

* Implement clone for sr25519::Pair.

* Extend Pair with to_raw_vec.

* Implement TypedKey for Signature and Pair.

* Add trait Public.

* Make keystore generic.

* Fixup clone.

* Fix tests.

* Update service.

* Fix imports.

* Fix build.

* Fix babe build.

* Fix subkey build.

* Make authority setup generic.

* Update node-template.

* Fix build.

* Remove unsafe code.

* Fix tests.
This commit is contained in:
David Craven
2019-07-04 13:14:55 +02:00
committed by GitHub
parent 336053f7ae
commit 51e345c901
15 changed files with 279 additions and 122 deletions
+7 -3
View File
@@ -44,12 +44,16 @@ pub type Balance = u128;
/// Type used for expressing timestamp.
pub type Moment = u64;
/// Alias to the signature scheme used for Aura authority signatures.
pub type AuraSignature = primitives::ed25519::Signature;
/// The aura crypto scheme defined via the keypair type.
#[cfg(feature = "std")]
pub type AuraPair = primitives::ed25519::Pair;
/// The Ed25519 pub key of an session that belongs to an Aura authority of the chain.
/// Identity of an Aura authority.
pub type AuraId = primitives::ed25519::Public;
/// Signature for an Aura authority.
pub type AuraSignature = primitives::ed25519::Signature;
/// Index of a transaction in the chain.
pub type Index = u64;