import {ReadOnlyContracts} from '../../contracts'; import {Currency, ERC20, MonetaryAmount} from '../../monetary'; import {Option} from '../../types'; export interface OptionsReadOnlyActions { /** * Lists all the options currently available */ list(): Promise>>; /** * Returns the total liquidity for the given option * * @param option Options for which to get liquidity */ getLiquidity( option: Option ): Promise>; /** * Returns the current supply of `option` collateral for `user` * * @param user User for whom to get the supply * @param option Option for which to get collateral supply */ getUserSupply( user: string, option: Option ): Promise>; /** * Returns the total amount of `option` written by `user` * * @param user Users for whom to get the amount written * @param option Option for which to get amount written */ getUserWritten( user: string, option: Option ): Promise>; /** * Returns the total amount of `option` currently held by `user` * * @param user The user whose balance to check * @param option Option for which to check balance * @returns The user's balance of option tokens */ getUserBalance( user: string, option: Option ): Promise>; /** * Gets the net position of the user (negative for obligations - * short position; positive for put options - long position) * @param user User whose position to calculate * @param option Option whose pair's position to check * @returns Net position, equal to (options held - obligations held) */ getUserPosition( user: string, option: Option ): Promise>; /** * Returns the premium for `option` in unit of collateral when writing `amount` of underlying * * @param option the option for which to compute premium * @param amount amount of underlying tokens * @returns the approximate premium that the user will receive */ estimatePremium( option: Option, amount: MonetaryAmount ): Promise>; /** * Returns the amount of collateral necessary for a uniswap swap * for the given option. * * @param option Option whose pool to check * @param amount Amount of option desired to be bought * @returns Amount of collateral currently necessary to perform the swap */ estimatePoolBuyPrice( option: Option, amount: MonetaryAmount ): Promise>; /** * Returns the amount of collateral that will be obtained from * a uniswap swap with the given option. * * @param option Option whose pool to check * @param amount Amount of option desired to be sold * @returns Amount of collateral currently obtainable from such a swap */ estimatePoolSellPrice( option: Option, amount: MonetaryAmount ): Promise>; } export declare class ContractsOptionsReadOnlyActions implements OptionsReadOnlyActions { private roContracts; constructor(roContracts: ReadOnlyContracts); fetchTokenNames(addresses: Array): Promise>; list(): Promise>>; getLiquidity( option: Option ): Promise>; getUserSupply( user: string, option: Option ): Promise>; getUserWritten( user: string, option: Option ): Promise>; getUserBalance( user: string, option: Option ): Promise>; getUserPosition( user: string, option: Option ): Promise>; estimatePremium( option: Option, amount: MonetaryAmount ): Promise>; estimatePoolBuyPrice( option: Option, amount: MonetaryAmount ): Promise>; estimatePoolSellPrice( option: Option, amount: MonetaryAmount ): Promise>; }