async createCreditLine()

If the user does not have a credit line for the loan request that he wants to create, he first will need to create a credit line.

  • creditLineType:string – there are four types of credit line:
  • “TYPE_A_LOAN” – is Ethereum – ERC20 loan, this means that the underlying is Ethereum and collateral will be ERC20.
  • “TYPE_B_LOAN” – Ethereum – Ethereum, this means both underlying and collateral will be ETH.
  • “TYPE_C_LOAN” – ERC20 – Ethereum, this means underlying is ERC20 while collateral is Ethereum.
  • “TYPE_D_LOAN” – ERC20 – ERC20, this means both underlying and collateral will be ERC20 tokens.
const response = await this.newBorrowingService.createCreditLine(
 creditLineType, 
 walletAddress
)