Trait oasis_runtime_sdk::modules::rofl::API

source ·
pub trait API {
    // Required methods
    fn is_authorized_origin(app: AppId) -> Result<bool, Error>;
    fn get_app(id: AppId) -> Result<AppConfig, Error>;
    fn get_instances(id: AppId) -> Result<Vec<Registration>, Error>;
}
Expand description

Interface that can be called from other modules.

Required Methods§

source

fn is_authorized_origin(app: AppId) -> Result<bool, Error>

Verify whether the origin transaction is signed by an authorized ROFL instance for the given application.

§Panics

This method will panic if called outside a transaction environment.

source

fn get_app(id: AppId) -> Result<AppConfig, Error>

Get an application’s configuration.

source

fn get_instances(id: AppId) -> Result<Vec<Registration>, Error>

Get all registered instances for an application.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Cfg: Config> API for Module<Cfg>