mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 18:41:05 +00:00
Added RuntimePublic for ecdsa public key. (#6029)
* add generate ecdsa, etc to keystore * impl ecdsa needed traits * add ecdsa to sr_io * add ecdsa to application-crypto * add ecdsa to test-utils * add ecdsa debug derive * fix ecdsa public
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
use crate::{
|
||||
crypto::{KeyTypeId, CryptoTypePublicPair},
|
||||
ed25519, sr25519,
|
||||
ed25519, sr25519, ecdsa,
|
||||
};
|
||||
|
||||
use std::{
|
||||
@@ -77,6 +77,18 @@ pub trait BareCryptoStore: Send + Sync {
|
||||
id: KeyTypeId,
|
||||
seed: Option<&str>,
|
||||
) -> Result<ed25519::Public, BareCryptoStoreError>;
|
||||
/// Returns all ecdsa public keys for the given key type.
|
||||
fn ecdsa_public_keys(&self, id: KeyTypeId) -> Vec<ecdsa::Public>;
|
||||
/// Generate a new ecdsa key pair for the given key type and an optional seed.
|
||||
///
|
||||
/// If the given seed is `Some(_)`, the key pair will only be stored in memory.
|
||||
///
|
||||
/// Returns the public key of the generated key pair.
|
||||
fn ecdsa_generate_new(
|
||||
&mut self,
|
||||
id: KeyTypeId,
|
||||
seed: Option<&str>,
|
||||
) -> Result<ecdsa::Public, BareCryptoStoreError>;
|
||||
|
||||
/// Insert a new key. This doesn't require any known of the crypto; but a public key must be
|
||||
/// manually provided.
|
||||
|
||||
Reference in New Issue
Block a user