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.

Provided Methods§

source

fn portfolio( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId ) -> Result<Vec<(LoanId, Loan)>, ApiError>

source

fn portfolio_loan( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, loan_id: LoanId ) -> Result<Option<Loan>, ApiError>

source

fn portfolio_valuation( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, input_prices: PriceCollectionInput ) -> Result<Result<Balance, DispatchError>, ApiError>

source

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>

Trait Implementations§

source§

impl<Block: BlockT, PoolId, LoanId, Loan, Balance, PriceCollectionInput> RuntimeApiInfo for dyn LoansApi<Block, PoolId, LoanId, Loan, Balance, PriceCollectionInput>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 3u32

The version of the runtime api.

Implementors§