Function prepareSwapCollateralInLoanBegin

  • Returns a transaction to begin swap collateral in a loan escrow. Must be groped together with swap_collateral_end call.

    Returns

    Transaction swap collateral begin 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

Generated using TypeDoc