Function prepareBorrowFromLoan
- prepareBorrowFromLoan(
loanAppId: number,
poolManagerAppId: number,
userAddr: string,
escrowAddr: string,
receiverAddr: string,
pool: Pool,
oracle: Oracle,
lpAssets: LPToken[],
baseAssetIds: number[],
borrowAmount: number | bigint,
maxStableRate: number | bigint,
params: SuggestedParams,
): Transaction[] Parameters
- loanAppId: number
loan application to borrow in
- poolManagerAppId: number
pool manager application
- userAddr: string
account address for the user
- escrowAddr: string
account address for the loan escrow
- receiverAddr: string
account address to receive the borrow (typically the user)
- pool: Pool
pool to borrow from
- oracle: Oracle
oracle application to retrieve asset prices from
- lpAssets: LPToken[]
list of lp assets in loan
- baseAssetIds: number[]
list of base asset ids in loan (non-lp assets)
- borrowAmount: number | bigint
amount to borrow of asset
- maxStableRate: number | bigint
maximum stable rate of the borrow, if zero then borrow is interpreted as a variable rate borrow
- params: SuggestedParams
suggested params for the transactions with the fees overwritten
Returns Transaction[]
Transaction[] borrow group transaction
- loanAppId: number
Returns a group transaction to borrow using loan escrow.