pub trait RedeemApiServer<BlockHash, VaultId, Balance, AccountId, H256, RedeemRequest>: Sized + Send + Sync + 'staticwhere
    Balance: Codec + MaybeDisplay + MaybeFromStr,{
    // Required methods
    fn get_redeem_requests(
        &self,
        account_id: AccountId,
        at: Option<BlockHash>
    ) -> RpcResult<Vec<H256>>;
    fn get_vault_redeem_requests(
        &self,
        vault_id: AccountId,
        at: Option<BlockHash>
    ) -> RpcResult<Vec<H256>>;
    fn get_premium_redeem_vaults(
        &self,
        at: Option<BlockHash>
    ) -> RpcResult<Vec<(VaultId, BalanceWrapper<Balance>)>>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where BlockHash: Send + Sync + 'static + DeserializeOwned,
             VaultId: Send + Sync + 'static + Serialize,
             Balance: Send + Sync + 'static + Serialize + Codec + MaybeDisplay + MaybeFromStr,
             AccountId: Send + Sync + 'static + DeserializeOwned,
             H256: Send + Sync + 'static + Serialize,
             RedeemRequest: Send + Sync + 'static { ... }
}
Expand description

Server trait implementation for the RedeemApi RPC API.

Required Methods§

source

fn get_redeem_requests( &self, account_id: AccountId, at: Option<BlockHash> ) -> RpcResult<Vec<H256>>

source

fn get_vault_redeem_requests( &self, vault_id: AccountId, at: Option<BlockHash> ) -> RpcResult<Vec<H256>>

source

fn get_premium_redeem_vaults( &self, at: Option<BlockHash> ) -> RpcResult<Vec<(VaultId, BalanceWrapper<Balance>)>>

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>where BlockHash: Send + Sync + 'static + DeserializeOwned, VaultId: Send + Sync + 'static + Serialize, Balance: Send + Sync + 'static + Serialize + Codec + MaybeDisplay + MaybeFromStr, AccountId: Send + Sync + 'static + DeserializeOwned, H256: Send + Sync + 'static + Serialize, RedeemRequest: Send + Sync + 'static,

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Implementors§

source§

impl<C, Block, VaultId, Balance, AccountId, H256, RedeemRequest> RedeemApiServer<<Block as Block>::Hash, VaultId, Balance, AccountId, H256, RedeemRequest> for Redeem<C, Block>where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: RedeemRuntimeApi<Block, VaultId, Balance, AccountId, H256, RedeemRequest>, VaultId: Codec, Balance: Codec + MaybeDisplay + MaybeFromStr, AccountId: Codec, H256: Codec, RedeemRequest: Codec,