Trait runtime_common::apis::LoansApi
source · pub trait LoansApi<Block: BlockT, PoolId, LoanId, Loan, Balance, PriceCollectionInput>: Core<Block>where
PoolId: Codec,
LoanId: Codec,
Loan: Codec,
Balance: Codec,
PriceCollectionInput: Codec,{
// Provided methods
fn portfolio(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId
) -> Result<Vec<(LoanId, Loan)>, ApiError> { ... }
fn portfolio_loan(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId,
loan_id: LoanId
) -> Result<Option<Loan>, ApiError> { ... }
fn portfolio_valuation(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId,
input_prices: PriceCollectionInput
) -> Result<Result<Balance, DispatchError>, ApiError> { ... }
fn expected_cashflows(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
pool_id: PoolId,
loan_id: LoanId
) -> Result<Result<Vec<CashflowPayment<Balance>>, DispatchError>, ApiError> { ... }
}
Expand description
Runtime API for the rewards pallet.