Skip to content

Commit

Permalink
Document LocalKeystore insert method (#3336)
Browse files Browse the repository at this point in the history
Refer to #3320
discussion
  • Loading branch information
davxy authored Feb 16, 2024
1 parent 9346019 commit e75e0eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions substrate/client/keystore/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ impl LocalKeystore {
}

impl Keystore for LocalKeystore {
/// Insert a new secret key.
///
/// WARNING: if the secret keypair has been manually generated using a password
/// (e.g. using methods such as [`sp_core::crypto::Pair::from_phrase`]) then such
/// a password must match the one used to open the keystore via [`LocalKeystore::open`].
/// If the passwords doesn't match then the inserted key ends up being unusable under
/// the current keystore instance.
fn insert(
&self,
key_type: KeyTypeId,
Expand Down

0 comments on commit e75e0eb

Please sign in to comment.