diff --git a/substrate/primitives/core/src/lib.rs b/substrate/primitives/core/src/lib.rs index 495b9e6693..1ca97e7c3f 100644 --- a/substrate/primitives/core/src/lib.rs +++ b/substrate/primitives/core/src/lib.rs @@ -336,7 +336,7 @@ impl From for log::Level { /// Log level filter that expresses which log levels should be filtered. /// -/// This enum matches the [`log::LogLevelFilter`] enum. +/// This enum matches the [`log::LevelFilter`] enum. #[derive(Encode, Decode, PassByEnum, Copy, Clone)] pub enum LogLevelFilter { /// `Off` log level filter. diff --git a/substrate/primitives/keystore/src/lib.rs b/substrate/primitives/keystore/src/lib.rs index 352154d824..cccb390d34 100644 --- a/substrate/primitives/keystore/src/lib.rs +++ b/substrate/primitives/keystore/src/lib.rs @@ -195,13 +195,18 @@ pub trait CryptoStore: Send + Sync { transcript_data: VRFTranscriptData, ) -> Result, Error>; - /// Sign pre-hashed + /// Generate an ECDSA signature for a given pre-hashed message. /// - /// Signs a pre-hashed message with the private key that matches - /// the ECDSA public key passed. + /// Receives [`KeyTypeId`] and an [`ecdsa::Public`] key to be able to map + /// them to a private key that exists in the keystore. This private key is, + /// in turn, used for signing the provided pre-hashed message. /// - /// Returns the SCALE encoded signature if key is found and supported, - /// `None` if the key doesn't exist or an error when something failed. + /// The `msg` argument provided should be a hashed message for which an + /// ECDSA signature should be generated. + /// + /// Returns an [`ecdsa::Signature`] or `None` in case the given `id` and + /// `public` combination doesn't exist in the keystore. An `Err` will be + /// returned if generating the signature itself failed. async fn ecdsa_sign_prehashed( &self, id: KeyTypeId, @@ -368,13 +373,18 @@ pub trait SyncCryptoStore: CryptoStore + Send + Sync { transcript_data: VRFTranscriptData, ) -> Result, Error>; - /// Sign pre-hashed + /// Generate an ECDSA signature for a given pre-hashed message. /// - /// Signs a pre-hashed message with the private key that matches - /// the ECDSA public key passed. + /// Receives [`KeyTypeId`] and an [`ecdsa::Public`] key to be able to map + /// them to a private key that exists in the keystore. This private key is, + /// in turn, used for signing the provided pre-hashed message. /// - /// Returns the SCALE encoded signature if key is found and supported, - /// `None` if the key doesn't exist or an error when something failed. + /// The `msg` argument provided should be a hashed message for which an + /// ECDSA signature should be generated. + /// + /// Returns an [`ecdsa::Signature`] or `None` in case the given `id` and + /// `public` combination doesn't exist in the keystore. An `Err` will be + /// returned if generating the signature itself failed. fn ecdsa_sign_prehashed( &self, id: KeyTypeId,