Trait ISetupApi

Source
pub trait ISetupApi {
    // Required methods
    fn setup_code<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn auth<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Option<ApiAuth>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn connected_peers<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn reset_setup_codes<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_local_parameters<'life0, 'async_trait>(
        &'life0 self,
        auth: ApiAuth,
        name: String,
        federation_name: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_peer_setup_code<'life0, 'async_trait>(
        &'life0 self,
        info: String,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn start_dkg<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_dyn(self) -> DynSetupApi
       where Self: Sized + Send + Sync + 'static { ... }
}
Expand description

Interface for the web UI to interact with the config generation process

Required Methods§

Source

fn setup_code<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get our connection info encoded as base32 string

Source

fn auth<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<ApiAuth>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the auth token for API calls

Source

fn connected_peers<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get list of names of connected peers

Source

fn reset_setup_codes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reset the set of other guardians

Source

fn set_local_parameters<'life0, 'async_trait>( &'life0 self, auth: ApiAuth, name: String, federation_name: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set local guardian parameters

Source

fn add_peer_setup_code<'life0, 'async_trait>( &'life0 self, info: String, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add peer connection info

Source

fn start_dkg<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Start the distributed key generation process

Provided Methods§

Source

fn into_dyn(self) -> DynSetupApi
where Self: Sized + Send + Sync + 'static,

Create a trait object

Implementors§