kms_secp256k1_api/services/
kms_client_service.rs

1use crate::services::keys_service::KeyEntry;
2
3#[async_trait::async_trait]
4pub trait KmsClientService: Send + Sync {
5    async fn create_key(&self) -> Result<(String, String), String>;
6    async fn create_alias(&self, key_id: &str, alias: &str) -> Result<(), String>;
7    async fn sign(&self, transaction_hash_hex: &str, alias: &str) -> Result<String, String>;
8    async fn verify(
9        &self,
10        transaction_hash_hex: &str,
11        signature_with_prefix: &str,
12        alias: &str,
13    ) -> Result<bool, String>;
14    async fn delete_key(&self, alias: &str) -> Result<bool, String>;
15    async fn list_keys(&self) -> Result<Vec<KeyEntry>, String>;
16    async fn get_public_key(&self, alias: &str) -> Result<String, String>;
17}