📄️ hasCoverBooked
The hasCoverBooked method checks whether a cover has been booked for a given bet ID. This is useful to determine if a particular bet has coverage.
📄️ getDecimalPrecise
The getDecimalPrecise method retrieves the decimal precision used for the token. This is important for ensuring correct handling of token amounts and calculations, especially when tokens have different decimal places.
📄️ approveAmount
This method allows users to approve a specific amount of tokens (such as USDT or other tokens) to be used within the system. The approval is required for specific actions, such as adding liquidity to the pool or purchasing insurance cover for a bet.
📄️ calculatePremium
The calculatePremium method calculates the premium for an insurance bet based on the provided parameters. This involves fetching configuration values, validating inputs, and making a blockchain call to compute the premium. The method considers various factors such as bet type, bet amount, and slippage percentage to determine the correct premium.
📄️ checkMLRBeforeBuyCover
The checkMLRBeforeBuyCover method validates the liquidity requirements and the MLR ratio before allowing the user to buy cover for a specific bet amount. It ensures that sufficient liquidity is available on the platform to fulfill the request.
📄️ earlyWithdrawalFee
The earlyWithdrawalFee method fetches the fee associated with early withdrawal from the pool, if applicable.
📄️ getApprovalAmount
The getApprovalAmount method fetches the current approval amount of tokens that the user has allowed for a particular contract (such as the insurance pool). This is useful for checking how much a user has approved for spending on the token contract.
📄️ getBalanceOfDeposit
The getBalanceOfDeposit method retrieves the balance associated with a specific deposit by querying the smart contract. It helps you track the available funds in the deposit for future use or withdrawal.
📄️ getBetLimits
The getBetLimits method retrieves the minimum and maximum odds, as well as the minimum and maximum amounts allowed for Combo bets. By querying the blockchain, this method fetches the configuration values that define the limits for Combo bets, ensuring that users can only place bets within the allowed parameters.\
📄️ getCover
The getCover method retrieves detailed information about a specific insurance cover based on the provided coverId. This includes critical details such as the bet associated with the cover, coverage amount, premium, and the current state of the cover. The primary application of this method is to check the status of an insurance cover.
📄️ getInsurancePremium
The getInsurancePremium method calculates the insurance premium for a bet based on the provided parameters. This function can be used independently without placing a bet. It determines whether the bet is a Single or Combo type and passes the appropriate data to the kohin.getInsurancePremium method. The result includes the calculated premium, which is processed and displayed accordingly.
📄️ getMaxDeposit
The getMaxDeposit method retrieves the maximum deposit amount allowed for a given contract or pool. This helps users know the upper limit for their deposit.
📄️ getMaxPoolCap
The getMaxPoolCap method retrieves the maximum capacity of the pool, i.e., the upper limit on the amount of funds that can be held in the pool.
📄️ getMaxSubBetLimit
The getMaxSubBetLimit method retrieves the maximum limit allowed for a sub-bet within a combination bet. This helps in managing and controlling the maximum amount a user can bet on a sub-bet in a combo.
📄️ getMinDeposit
The getMinDeposit method retrieves the minimum deposit amount required for a given action or contract. This is useful for determining the lowest deposit users need to make.
📄️ getReserve
The getReserve method fetches the reserve amount of funds that are available for transactions, claims, or other operations in the contract.
📄️ getTokenBalance
The getTokenBalance method retrieves the balance of a token associated with the current wallet address. It interacts with the blockchain to fetch the balance and returns it in a structured format.
📄️ getWithdrawAfter
The getWithdrawAfter method retrieves the timing information for when a withdrawal can be made after a specific deposit. This allows you to know the earliest time when funds can be withdrawn.
📄️ isEarlyWithdrawalEnabled
The isEarlyWithdrawalEnabled method checks whether early withdrawals are allowed for a given insurance pool. This can help users determine if they can withdraw their funds before the standard withdrawal period.
📄️ isPaused
The isPaused method checks if the system is currently paused, which may prevent certain operations from being executed. This method interacts with the backend to retrieve the system's pause status.