/** * @file Vault * @desc These methods facilitate interactions with the Vault smart contracts. */ import { BigNumber } from "ethers"; import { CallOptions, TrxResponse } from "./types"; /** * Check if user has enabled depositing into vault * * @param {string} vault The name of the vault. * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. * * @returns {boolean} True if depositing is enabled */ export declare function depositEnabled(vault: string, options?: CallOptions): Promise; /** * Enable depositing into vault for user (approve vault to transfer asset) * * @param {string} vault The name of the vault. * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. * * @returns {TrxResponse} Returns an Ethers.js transaction object of the approve * transaction, or nothing if the vault is already approved. */ export declare function enableDeposit(vault: string, options?: CallOptions): Promise; /** * Deposit the user's asset into vault. * * @param {string} vault The name of the vault to deposit into. * @param {number | string | BigNumber} amount A string, number, or BigNumber * object of the amount of an asset to deposit. Use the `mantissa` boolean * in the `options` parameter to indicate if this value is scaled up (so * there are no decimals) or in its natural scale. * @param {boolean} noApprove Explicitly prevent this method from attempting an * ERC-20 `approve` transaction prior to sending the `deposit` transaction. * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. * * @returns {TrxResponse} Returns an Ethers.js transaction object of the deposit * transaction. * * @example * * ``` * const rifi = new Rifi(window.ethereum); * * (async function() { * * console.log('Redeeming ETH...'); * const trx = await rifi.deposit(Rifi.UsdtVault, 1); * console.log('Ethers.js transaction object', trx); * * })().catch(console.error); * ``` */ export declare function deposit(vault: string, amount: string | number | BigNumber, noApprove?: boolean, options?: CallOptions): Promise; /** * Withdraw user's asset from vault. * * @param {string} vault The name of the vault to withdraw from. * @param {number | string | BigNumber} amount A string, number, or BigNumber * object of the amount of an asset to withdraw. Use the `mantissa` boolean * in the `options` parameter to indicate if this value is scaled up (so * there are no decimals) or in its natural scale. Omit this parameter or * pass `null` to withdraw all assets. * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. * * @returns {TrxResponse} Returns an Ethers.js transaction object of the withdraw * transaction. * * @example * * ``` * const rifi = new Rifi(window.ethereum); * * (async function() { * * console.log('Redeeming ETH...'); * const trx = await rifi.withdraw(Rifi.UsdtVault, 1); * console.log('Ethers.js transaction object', trx); * * })().catch(console.error); * ``` */ export declare function withdraw(vault: string, amount?: string | number | BigNumber, options?: CallOptions): Promise; /** * Harvest user's reward in vault. * * @param {string} vault The name of the vault to harvest. * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. * * @returns {TrxResponse} Returns an Ethers.js transaction object of the harvest * transaction. * * @example * * ``` * const rifi = new Rifi(window.ethereum); * * (async function() { * * console.log('Harvesting RIFI...'); * const trx = await rifi.harvestReward(Rifi.UsdtVault); * console.log('Ethers.js transaction object', trx); * * })().catch(console.error); * ``` */ export declare function harvestReward(vault: string, options?: CallOptions): Promise; /** * Claim vested reward from vault. * * @param {string} vault The name of the vault to (to find reward locker). * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. * * @returns {TrxResponse} Returns an Ethers.js transaction object of the claim * transaction. * * @example * * ``` * const rifi = new Rifi(window.ethereum); * * (async function() { * * console.log('Claiming RIFI...'); * const trx = await rifi.claimReward(Rifi.UsdtVault); * console.log('Ethers.js transaction object', trx); * * })().catch(console.error); * ``` */ export declare function claimReward(vault: string, options?: CallOptions): Promise; /** * Get user balance in vault * * @param {string} vault The name of the vault to (to find reward locker). * @param {string} account User's account address. * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. * * @returns {BigNumber} Account's balance in vault * * @example * * ``` * const rifi = new Rifi(window.ethereum); * * (async function() { * * console.log('Get balance...'); * const balance = await rifi.getDepositOf(Rifi.UsdtVault, account); * console.log('Balance in vault', balance); * * })().catch(console.error); * ``` */ export declare function getDepositOf(vault: string, account?: string, options?: CallOptions): Promise; interface RewardBalances { symbol: string; pending: BigNumber; vesting: BigNumber; claimable: BigNumber; } /** * Query and calculate reward amounts for current user * * @param {string} vault The name of the vault to (to find reward locker). * @param {string} account User's account address. * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. * * @returns {RewardBalances[]} Balances for each type of reward / earning tokens * * @example * * ``` * const rifi = new Rifi(window.ethereum); * * (async function() { * * console.log('Get balance...'); * const { pending, vesting, claimable } = await rifi.getRewardBalances(Rifi.UsdtVault); * console.log('Pending reward', pending); * console.log('Vesting reward', vesting); * console.log('Claimable reward', claimable); * * })().catch(console.error); * ``` */ export declare function getRewardBalances(vault: string, account?: string, options?: CallOptions): Promise; export {};