Function prepareSwapCollateralInLoanBegin
- prepareSwapCollateralInLoanBegin(
loanAppId: number,
poolManagerAppId: number,
userAddr: string,
escrowAddr: string,
receiverAddr: string,
pool: Pool,
amount: number | bigint,
isfAssetAmount: boolean,
txnIndexForSwapCollateralEnd: number,
params: SuggestedParams,
): Transaction Parameters
- loanAppId: number
loan application to swap collateral 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 collateral (typically the user's deposit escrow)
- pool: Pool
pool to swap collateral of
- amount: number | bigint
the amount of asset / f asset to reduce the collateral by
- isfAssetAmount: boolean
whether the amount of collateral to reduce by is expressed in terms of f asset or asset
- txnIndexForSwapCollateralEnd: number
transaction index in the group transaction for the swap_collateral_end call.
- params: SuggestedParams
suggested params for the transactions with the fees overwritten
Returns Transaction
Transaction swap collateral begin transaction
- loanAppId: number
Returns a transaction to begin swap collateral in a loan escrow. Must be groped together with swap_collateral_end call.