mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Adds with_pair! macro to application-crypto (#4885)
* Adds `with_pair!` macro to application-crypto This macro will "generate" the given code only when the crypto pair is available. So, when either the `std` or the `full_crypto` feature is enabled. * Fix example
This commit is contained in:
@@ -102,9 +102,10 @@ pub mod sr25519 {
|
||||
app_crypto!(sr25519, IM_ONLINE);
|
||||
}
|
||||
|
||||
/// An i'm online keypair using sr25519 as its crypto.
|
||||
#[cfg(feature = "std")]
|
||||
pub type AuthorityPair = app_sr25519::Pair;
|
||||
sp_application_crypto::with_pair! {
|
||||
/// An i'm online keypair using sr25519 as its crypto.
|
||||
pub type AuthorityPair = app_sr25519::Pair;
|
||||
}
|
||||
|
||||
/// An i'm online signature using sr25519 as its crypto.
|
||||
pub type AuthoritySignature = app_sr25519::Signature;
|
||||
@@ -119,9 +120,10 @@ pub mod ed25519 {
|
||||
app_crypto!(ed25519, IM_ONLINE);
|
||||
}
|
||||
|
||||
/// An i'm online keypair using ed25519 as its crypto.
|
||||
#[cfg(feature = "std")]
|
||||
pub type AuthorityPair = app_ed25519::Pair;
|
||||
sp_application_crypto::with_pair! {
|
||||
/// An i'm online keypair using ed25519 as its crypto.
|
||||
pub type AuthorityPair = app_ed25519::Pair;
|
||||
}
|
||||
|
||||
/// An i'm online signature using ed25519 as its crypto.
|
||||
pub type AuthoritySignature = app_ed25519::Signature;
|
||||
|
||||
Reference in New Issue
Block a user