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§
Sourcefn 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 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
Sourcefn 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 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
Sourcefn auth<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ApiAuth>> + 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,
Get the auth token for API calls
Sourcefn 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 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
Sourcefn available_modules(&self) -> BTreeSet<ModuleKind>
fn available_modules(&self) -> BTreeSet<ModuleKind>
Get the available modules that can be enabled during setup
Sourcefn default_modules(&self) -> BTreeSet<ModuleKind>
fn default_modules(&self) -> BTreeSet<ModuleKind>
Get the modules that should be enabled by default in the setup UI
Sourcefn reset_setup_codes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + 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,
Reset the set of other guardians
Sourcefn 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 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
Sourcefn 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 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
Sourcefn start_dkg<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + 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,
Start the distributed key generation process
Sourcefn 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 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
Sourcefn 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_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
Sourcefn 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_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
Sourcefn 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,
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