import EventEmitter from 'eventemitter3'; import IVaultService from '../interfaces/services/IVaultService'; import { DefaultProvider } from '../types'; export default class VaultService implements IVaultService { provider: DefaultProvider; chainId: number; emitter: EventEmitter; constructor(provider: DefaultProvider, chainId: number); /** * Create deposit on Vault. * @param amount - The amount of asset to deposit. * @param account - The address to receive the assets. * @param vaultAddress - ERC20 token address. */ deposit(amount: string, account: string, vaultAddress: string): Promise; /** * Withdraw from Vault. * @param amount - The amount of asset to withdraw. * @param receiver - The address to receive the assets. * @param owner - The address who`s shares are being burnt. * @param vaultAddress - ERC20 token address. */ withdraw(amount: string, receiver: string, owner: string, vaultAddress: string): Promise; /** * Withdraw from Vault. * @param shareAmount - The amount of share Token to withdraw. * @param receiver - The address to receive the assets. * @param owner - The address who`s shares are being burnt. * @param vaultAddress - ERC20 token address. */ redeem(shareAmount: string, receiver: string, owner: string, vaultAddress: string): Promise; /** * Approve ERC20 token. * @param account - wallet address. * @param tokenAddress - ERC20 token for deposit. * @param vaultAddress - vault address to approve. */ approve(account: string, tokenAddress: string, vaultAddress: string): Promise; /** * Check approved deposit token. * @param address - wallet address. * @param tokenAddress - ERC20 token address. * @param vaultAddress - ERC20 token address. * @param deposit - amount of deposit for check. */ approvalStatus(address: string, tokenAddress: string, vaultAddress: string, deposit: string): Promise; /** * Get amount share token by amount of asset to deposit. * @param amount - The amount of asset to deposit. * @param vaultAddress - Vault contract address. */ previewDeposit(amount: string, vaultAddress: string): Promise; /** * Calculates the equivalent asset amount for a given amount of share tokens to be redeemed from the vault. * This method queries the vault contract to determine the equivalent asset amount that corresponds to the specified share token amount. * * @param shareAmount - The amount of share tokens to be redeemed, specified in the smallest unit of the token (e.g., wei for ETH). * @param vaultAddress - The address of the vault contract from which the redemption will be made. * @returns A promise that resolves to a string representing the equivalent asset amount for the specified share token amount. */ previewRedeem(shareAmount: string, vaultAddress: string): Promise; /** * Calculates the amount of burnt share tokens based on the amount of the asset to be withdrawn from the vault. * This method queries the vault contract to determine how many share tokens would be burnt for a given withdrawal amount. * * @param amount - The amount of asset to be withdrawn, specified in the smallest unit of the asset (e.g., wei for ETH). * @param vaultAddress - The address of the vault contract from which the withdrawal will be made. * @returns A promise that resolves to a string representing the amount of burnt share tokens for the specified withdrawal amount. */ previewWithdraw(amount: string, vaultAddress: string): Promise; /** * Retrieves the current deposit limit for a given vault. If the vault is a TradeFlow vault and a wallet address is provided, * it queries the deposit limit module of the vault to determine the available deposit limit for that wallet. * Otherwise, it returns the general deposit limit for the vault. * * @param vaultAddress - The address of the vault for which to retrieve the deposit limit. * @param isTradeFlowVault - A boolean indicating whether the vault is a TradeFlow vault. * @param wallet - Optional. The wallet address to check for an individual deposit limit in a TradeFlow vault. * @returns A promise that resolves to a string representing the current deposit limit for the vault or for the individual wallet if specified. */ getDepositLimit(vaultAddress: string, isTradeFlowVault: boolean, wallet?: string): Promise; /** * Checks if the KYC (Know Your Customer) process has been passed for a given wallet address in relation to a specific vault. * This method queries the deposit limit module of the vault to determine the KYC status. * * @param vaultAddress - The address of the vault for which to check the KYC status. * @param wallet - The wallet address to check for KYC completion. * @returns A promise that resolves to a boolean indicating whether the KYC process has been passed for the given wallet. */ kycPassed(vaultAddress: string, wallet: string): Promise; /** * Retrieves the end date of the deposit period for a TradeFlow vault. * This method queries the TradeFlow strategy contract to obtain the timestamp when the deposit period ends. * * @param strategyAddress - The address of the TradeFlow strategy contract. * @returns A promise that resolves to a string representing the timestamp of the deposit period end date. */ getTradeFlowVaultDepositEndDate(strategyAddress: string): Promise; /** * Retrieves the end date of the lock period for a TradeFlow vault. * This method queries the TradeFlow strategy contract to obtain the timestamp when the lock period ends. * * @param strategyAddress - The address of the TradeFlow strategy contract. * @returns A promise that resolves to a string representing the timestamp of the lock period end date. */ getTradeFlowVaultLockEndDate(strategyAddress: string): Promise; /** * Retrieves the minimum deposit amount required for a user to participate in a TradeFlow vault. * This method queries the TradeFlow vault contract to obtain the minimum deposit amount. * * @param vaultAddress - The address of the TradeFlow vault for which to retrieve the minimum deposit amount. * @returns A promise that resolves to a string representing the minimum deposit amount required for participation. */ getMinUserDeposit(vaultAddress: string): Promise; /** * Checks if a given strategy is in shutdown mode. * This method queries the strategy contract to determine its shutdown status. * * @param strategyId - The identifier of the strategy to check. * @returns A promise that resolves to a boolean indicating whether the strategy is in shutdown mode. */ isStrategyShutdown(strategyId: string): any; /** * Set JsonRpcProvider provider for service * @param provider - JsonRpcProvider provider */ setProvider(provider: DefaultProvider): void; /** * Set chainId * @param chainId */ setChainId(chainId: number): void; } //# sourceMappingURL=VaultService.d.ts.map