/** * @file Comptroller * @desc These methods facilitate interactions with the Comptroller smart * contract. */ import { CallOptions } from './types'; import { ContractTransactionResponse } from 'ethers'; /** * Enters the user's address into Sumer Protocol markets. * * @param {any[]} markets An array of strings of markets to enter, meaning use * those supplied assets as collateral. * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. A passed `gasLimit` will be used in both the `approve` (if * not supressed) and `mint` transactions. * * @returns {object} Returns an Ethers.js transaction object of the enterMarkets * transaction. * * @example * * ``` * const sumer = new Sumer(window.ethereum); * * (async function () { * const trx = await sumer.enterMarkets(Sumer.ETH); // Use [] for multiple * console.log('Ethers.js transaction object', trx); * })().catch(console.error); * ``` */ export declare function enterMarkets(markets?: string | string[], options?: CallOptions): Promise; /** * Exits the user's address from a Sumer Protocol market. * * @param {string} market A string of the symbol of the market to exit. * @param {CallOptions} [options] Call options and Ethers.js overrides for the * transaction. A passed `gasLimit` will be used in both the `approve` (if * not supressed) and `mint` transactions. * * @returns {object} Returns an Ethers.js transaction object of the exitMarket * transaction. * * @example * * ``` * const sumer = new Sumer(window.ethereum); * * (async function () { * const trx = await sumer.exitMarket(Sumer.ETH); * console.log('Ethers.js transaction object', trx); * })().catch(console.error); * ``` */ export declare function exitMarket(market: string, options?: CallOptions): Promise; export declare function redeemFaceValue(market: string, amount: string | number, providers: string[], deadline: string, signature: string, options?: CallOptions): Promise; export declare function redeemFaceValueWithPermit(market: string, amount: string | number, providers: string[], providersDeadline: BigInt, providersSignature: string, options?: CallOptions): Promise; interface RedeemDetail { provider: string; redeemAmount: string; redeemVal: string; seizeSymbol: string; seizeAmount: string; seizeVal: string; protocolSeize: string; protocolSeizeVal: string; redemptionRate: string; } export interface RedeemPreview { details: RedeemDetail[]; leftover: BigInt; } export interface SignedRedeemPreview { providers: string[]; success: boolean; details: RedeemDetail[]; leftover: BigInt; deadline: number; signature: string; error?: string; } export declare function redeemFaceValuePreview(chainId: string, redeemer: string, market: string, amount: string | number): Promise; export interface Plan { account: string; repayTokenPrice: string; repayTokenAddress: string; repayTokens: string; seizeTokenPrice: string; seizeTokenAddress: string; seizeTokens: string; profitUSD: number; } export declare function calcPlan(account: string, seizeTokenAddress: string, repayTokenAddress: string): Promise; export {};