pub trait IGlobalFederationApi: IRawFederationApi {
Show 27 methods
// Required methods
fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
tx: Transaction,
) -> Pin<Box<dyn Future<Output = SerdeModuleEncoding<TransactionSubmissionOutcome>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn await_block<'life0, 'life1, 'async_trait>(
&'life0 self,
block_index: u64,
decoders: &'life1 ModuleDecoderRegistry,
) -> Pin<Box<dyn Future<Output = Result<SessionOutcome>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_session_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_index: u64,
decoders: &'life1 ModuleDecoderRegistry,
core_api_version: ApiVersion,
broadcast_public_keys: Option<&'life2 BTreeMap<PeerId, PublicKey>>,
) -> Pin<Box<dyn Future<Output = Result<SessionStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn session_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = FederationResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn await_transaction<'life0, 'async_trait>(
&'life0 self,
txid: TransactionId,
) -> Pin<Box<dyn Future<Output = TransactionId> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn upload_backup<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 SignedBackupRequest,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn download_backup<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PublicKey,
) -> Pin<Box<dyn Future<Output = FederationResult<BTreeMap<PeerId, Option<ClientBackupSnapshot>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn set_password<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn setup_status<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<SetupStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_local_params<'life0, 'async_trait>(
&'life0 self,
name: String,
federation_name: Option<String>,
disable_base_fees: Option<bool>,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn add_peer_connection_info<'life0, 'async_trait>(
&'life0 self,
info: String,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reset_peer_setup_codes<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_setup_code<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn start_dkg<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = FederationResult<StatusResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn audit<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<AuditSummary>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn guardian_config_backup<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<GuardianConfigBackup>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn auth<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn restart_federation_setup<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_api_announcement<'life0, 'async_trait>(
&'life0 self,
peer_id: PeerId,
announcement: SignedApiAnnouncement,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn api_announcements<'life0, 'async_trait>(
&'life0 self,
guardian: PeerId,
) -> Pin<Box<dyn Future<Output = ServerResult<BTreeMap<PeerId, SignedApiAnnouncement>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sign_api_announcement<'life0, 'async_trait>(
&'life0 self,
api_url: SafeUrl,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<SignedApiAnnouncement>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shutdown<'life0, 'async_trait>(
&'life0 self,
session: Option<u64>,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fedimintd_version<'life0, 'async_trait>(
&'life0 self,
peer_id: PeerId,
) -> Pin<Box<dyn Future<Output = ServerResult<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn backup_statistics<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<BackupStatistics>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_invite_code<'life0, 'async_trait>(
&'life0 self,
guardian: PeerId,
) -> Pin<Box<dyn Future<Output = ServerResult<InviteCode>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn change_password<'life0, 'life1, 'async_trait>(
&'life0 self,
auth: ApiAuth,
new_password: &'life1 str,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The API for the global (non-module) endpoints
Required Methods§
fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
tx: Transaction,
) -> Pin<Box<dyn Future<Output = SerdeModuleEncoding<TransactionSubmissionOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn await_block<'life0, 'life1, 'async_trait>(
&'life0 self,
block_index: u64,
decoders: &'life1 ModuleDecoderRegistry,
) -> Pin<Box<dyn Future<Output = Result<SessionOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_session_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_index: u64,
decoders: &'life1 ModuleDecoderRegistry,
core_api_version: ApiVersion,
broadcast_public_keys: Option<&'life2 BTreeMap<PeerId, PublicKey>>,
) -> Pin<Box<dyn Future<Output = Result<SessionStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn session_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = FederationResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn await_transaction<'life0, 'async_trait>(
&'life0 self,
txid: TransactionId,
) -> Pin<Box<dyn Future<Output = TransactionId> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upload_backup<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 SignedBackupRequest,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn download_backup<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 PublicKey,
) -> Pin<Box<dyn Future<Output = FederationResult<BTreeMap<PeerId, Option<ClientBackupSnapshot>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn set_password<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_password<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets the password used to decrypt the configs and authenticate
Must be called first before any other calls to the API
fn setup_status<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<SetupStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_local_params<'life0, 'async_trait>(
&'life0 self,
name: String,
federation_name: Option<String>,
disable_base_fees: Option<bool>,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_peer_connection_info<'life0, 'async_trait>(
&'life0 self,
info: String,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn reset_peer_setup_codes<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reset_peer_setup_codes<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reset the peer setup codes during the federation setup process
Sourcefn get_setup_code<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_setup_code<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the setup code if set_local_params was already called
Sourcefn start_dkg<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_dkg<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runs DKG, can only be called once after configs have been generated in
get_consensus_config_gen_params. If DKG fails this returns a 500
error and config gen must be restarted.
Sourcefn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = FederationResult<StatusResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = FederationResult<StatusResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the status of the server
Sourcefn audit<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<AuditSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn audit<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<AuditSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Show an audit across all modules
Sourcefn guardian_config_backup<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<GuardianConfigBackup>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn guardian_config_backup<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<GuardianConfigBackup>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Download the guardian config to back it up
Sourcefn auth<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn auth<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check auth credentials
fn restart_federation_setup<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn submit_api_announcement<'life0, 'async_trait>(
&'life0 self,
peer_id: PeerId,
announcement: SignedApiAnnouncement,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_api_announcement<'life0, 'async_trait>(
&'life0 self,
peer_id: PeerId,
announcement: SignedApiAnnouncement,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Publish our signed API announcement to other guardians
fn api_announcements<'life0, 'async_trait>(
&'life0 self,
guardian: PeerId,
) -> Pin<Box<dyn Future<Output = ServerResult<BTreeMap<PeerId, SignedApiAnnouncement>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_api_announcement<'life0, 'async_trait>(
&'life0 self,
api_url: SafeUrl,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<SignedApiAnnouncement>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
session: Option<u64>,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn fedimintd_version<'life0, 'async_trait>(
&'life0 self,
peer_id: PeerId,
) -> Pin<Box<dyn Future<Output = ServerResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fedimintd_version<'life0, 'async_trait>(
&'life0 self,
peer_id: PeerId,
) -> Pin<Box<dyn Future<Output = ServerResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the fedimintd version a peer is running
Sourcefn backup_statistics<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<BackupStatistics>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn backup_statistics<'life0, 'async_trait>(
&'life0 self,
auth: ApiAuth,
) -> Pin<Box<dyn Future<Output = FederationResult<BackupStatistics>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the backup statistics from the federation (admin endpoint)
Sourcefn get_invite_code<'life0, 'async_trait>(
&'life0 self,
guardian: PeerId,
) -> Pin<Box<dyn Future<Output = ServerResult<InviteCode>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_invite_code<'life0, 'async_trait>(
&'life0 self,
guardian: PeerId,
) -> Pin<Box<dyn Future<Output = ServerResult<InviteCode>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the invite code for the federation guardian. For instance, useful after DKG
Sourcefn change_password<'life0, 'life1, 'async_trait>(
&'life0 self,
auth: ApiAuth,
new_password: &'life1 str,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn change_password<'life0, 'life1, 'async_trait>(
&'life0 self,
auth: ApiAuth,
new_password: &'life1 str,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Change the password used to encrypt the configs and for guardian authentication