FlashCashHelper
@totemsdk/core / FlashCashHelper
Class: FlashCashHelper
Flash Cash Helper
Creates flash loan contracts for single-transaction borrowing.
Constructors
Constructor
new FlashCashHelper():
FlashCashHelper
Returns
FlashCashHelper
Methods
buildBorrowDescriptor()
staticbuildBorrowDescriptor(address,ownerPublicKey,interestMultiplier?):ScriptDescriptor
Build ScriptDescriptor for borrowing flash cash.
Parameters
address
string
ownerPublicKey
string
interestMultiplier?
string = '1.01'
Returns
calculateReturn()
staticcalculateReturn(borrowAmount,interestMultiplier):bigint
Calculate return amount with interest.
Parameters
borrowAmount
bigint
interestMultiplier
number
Returns
bigint
createFlashCash()
staticcreateFlashCash(ownerPublicKey,interestMultiplier?):object
Create a flash cash contract.
Parameters
ownerPublicKey
string
interestMultiplier?
string = '1.01'
Returns
object
address
address:
string
script
script:
string