pub trait RedeemApi<Block: BlockT, VaultId, Balance, AccountId, H256, RedeemRequest>: Core<Block>where
    VaultId: Codec,
    Balance: Codec,
    AccountId: Codec,
    H256: Codec,
    RedeemRequest: Codec,{
    // Provided methods
    fn get_redeem_requests(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        account_id: AccountId
    ) -> Result<Vec<H256>, ApiError> { ... }
    fn get_vault_redeem_requests(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        vault_id: AccountId
    ) -> Result<Vec<H256>, ApiError> { ... }
    fn get_premium_redeem_vaults(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash
    ) -> Result<Result<Vec<(VaultId, BalanceWrapper<Balance>)>, DispatchError>, ApiError> { ... }
}

Provided Methods§

source

fn get_redeem_requests( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, account_id: AccountId ) -> Result<Vec<H256>, ApiError>

Get all redeem requests for a particular account

source

fn get_vault_redeem_requests( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, vault_id: AccountId ) -> Result<Vec<H256>, ApiError>

Get all redeem requests for a particular vault

source

fn get_premium_redeem_vaults( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Result<Vec<(VaultId, BalanceWrapper<Balance>)>, DispatchError>, ApiError>

Get all vaults below the premium redeem threshold, ordered in descending order of this amount

Trait Implementations§

source§

impl<Block: BlockT, VaultId, Balance, AccountId, H256, RedeemRequest> RuntimeApiInfo for dyn RedeemApi<Block, VaultId, Balance, AccountId, H256, RedeemRequest>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> RedeemApi<__SrApiBlock__, VaultId<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, CurrencyId>, u128, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, H256, RedeemRequest<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32, u128, CurrencyId>> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, AccountId: UnwindSafe + RefUnwindSafe, Vec<H256>: UnwindSafe + RefUnwindSafe, Result<Vec<(VaultId<AccountId, CurrencyId>, BalanceWrapper<Balance>)>, DispatchError>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> RedeemApi<__SrApiBlock__, VaultId<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, CurrencyId>, u128, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, H256, RedeemRequest<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32, u128, CurrencyId>> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, AccountId: UnwindSafe + RefUnwindSafe, Vec<H256>: UnwindSafe + RefUnwindSafe, Result<Vec<(VaultId<AccountId, CurrencyId>, BalanceWrapper<Balance>)>, DispatchError>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,