Skip to main content

ISetupApi

Trait ISetupApi 

Source
pub trait ISetupApi {
Show 15 methods // 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 guardian_name<'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 available_modules(&self) -> BTreeSet<ModuleKind>; fn default_modules(&self) -> BTreeSet<ModuleKind>; 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>, disable_base_fees: Option<bool>, enabled_modules: Option<BTreeSet<ModuleKind>>, federation_size: Option<u32>, ) -> 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; fn federation_size<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<u32>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn cfg_federation_name<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn cfg_base_fees_disabled<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn cfg_enabled_modules<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<BTreeSet<ModuleKind>>> + 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 guardian_name<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get our guardian name

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 available_modules(&self) -> BTreeSet<ModuleKind>

Get the available modules that can be enabled during setup

Source

fn default_modules(&self) -> BTreeSet<ModuleKind>

Get the modules that should be enabled by default in the setup UI

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>, disable_base_fees: Option<bool>, enabled_modules: Option<BTreeSet<ModuleKind>>, federation_size: Option<u32>, ) -> 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

Source

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

Returns the expected federation size if any setup code (ours or a peer’s) has set it

Source

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

Returns the federation name if set by any setup code

Source

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

Returns whether base fees are disabled, if set by any setup code

Source

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

Returns the enabled modules, if set by any setup code

Provided Methods§

Source

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

Create a trait object

Implementors§