Skip to main content

AppGatewayApi

Trait AppGatewayApi 

Source
pub trait AppGatewayApi {
    // Required methods
    async fn get_fiat_rates(&self) -> Result<FiatRates, GatewayApiError>;
    async fn latest_release(&self) -> Result<NodeEnclave, GatewayApiError>;
    async fn current_releases(&self) -> Result<CurrentEnclaves, GatewayApiError>;
    async fn current_enclaves(&self) -> Result<CurrentEnclaves, GatewayApiError>;
}
Expand description

Defines the api that the gateway directly exposes to the app.

Required Methods§

Source

async fn get_fiat_rates(&self) -> Result<FiatRates, GatewayApiError>

GET /app/v1/fiat_rates Empty -> FiatRates

Source

async fn latest_release(&self) -> Result<NodeEnclave, GatewayApiError>

👎Deprecated:

since app-v0.8.1: Use current_releases() instead

Get the measurement and semver version of the latest node release.

GET /app/v1/latest_release Empty -> NodeEnclave

Source

async fn current_releases(&self) -> Result<CurrentEnclaves, GatewayApiError>

👎Deprecated:

since app-v0.8.8: Use current_enclaves() instead

Get the measurements, enclave machine id and versions of all current node enclaves.

GET /app/v1/current_releases Empty -> CurrentEnclaves

Source

async fn current_enclaves(&self) -> Result<CurrentEnclaves, GatewayApiError>

Get the measurements, enclave machine id and versions of all current node enclaves.

GET /app/v1/current_enclaves Empty -> CurrentEnclaves

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§