use std::future::Future; use mpc_node::keyshare::Keyshare; use near_mpc_contract_interface::types::{Keyset, ProtocolContractState}; use crate::types; pub trait SecretsRepository { type Error: std::fmt::Debug; fn store_secrets( &self, secrets: &types::PersistentSecrets, ) -> impl Future> + Send; fn load_secrets( &self, ) -> impl Future> + Send; } pub trait KeyShareRepository { type Error: std::fmt::Debug; fn store_keyshares( &self, key_shares: &[Keyshare], ) -> impl Future> + Send; fn load_keyshares(&self) -> impl Future, Self::Error>> + Send; } pub trait P2PClient { type Error: std::fmt::Debug; fn get_keyshares( &self, keyset: &Keyset, ) -> impl Future, Self::Error>> + Send; fn put_keyshares( &self, key_shares: &[Keyshare], ) -> impl Future> + Send; } pub trait ContractStateReader { type Error: std::fmt::Debug; fn get_contract_state( &self, ) -> impl Future> + Send; }