1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#![cfg_attr(not(feature = "std"), no_std)]
use codec::Codec;
use frame_support::dispatch::DispatchError;
use oracle_rpc_runtime_api::BalanceWrapper;
use sp_std::vec::Vec;
sp_api::decl_runtime_apis! {
pub trait RedeemApi<VaultId, Balance, AccountId, H256, RedeemRequest> where
VaultId: Codec,
Balance: Codec,
AccountId: Codec,
H256: Codec,
RedeemRequest: Codec,
{
fn get_redeem_requests(account_id: AccountId) -> Vec<H256>;
fn get_vault_redeem_requests(vault_id: AccountId) -> Vec<H256>;
fn get_premium_redeem_vaults() -> Result<Vec<(VaultId, BalanceWrapper<Balance>)>, DispatchError>;
}
}