Skip to content

Commit

Permalink
tendermint: PrivateKey is From<ed25519_consensus::SigningKey>
Browse files Browse the repository at this point in the history
  • Loading branch information
cratelyn committed Mar 18, 2024
1 parent 4f1a95a commit 649dd37
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tendermint/src/private_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ impl PrivateKey {
}
}

#[cfg(feature = "rust-crypto")]
impl From<ed25519_consensus::SigningKey> for PrivateKey {
fn from(sk: ed25519_consensus::SigningKey) -> Self {
Self::Ed25519(sk.into())
}
}

/// Serialize a Secp256k1 privkey as Base64
#[cfg(feature = "secp256k1")]
fn serialize_secp256k1_privkey<S>(signing_key: &Secp256k1, serializer: S) -> Result<S::Ok, S::Error>
Expand Down

0 comments on commit 649dd37

Please sign in to comment.