UNPKG

@dolomite-exchange/dolomite-margin

Version:

Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol

89 lines (88 loc) 7.7 kB
import { Contracts } from '../lib/Contracts'; import { AccountInfo, AccountStatus, address, Balance, ContractConstantCallOptions, Decimal, Index, Integer, Market, MarketWithInfo, RiskLimits, RiskParams, TotalPar, TotalWei, Values } from '../types'; import { AccountRiskOverrideSetter } from './AccountRiskOverrideSetter'; import { OracleSentinel } from './OracleSentinel'; export declare class Getters { private contracts; constructor(contracts: Contracts); private static parseIndex; private static parseTotalPar; getMarginRatio(options?: ContractConstantCallOptions): Promise<Decimal>; getMarginRatioForAccount(account: AccountInfo, options?: ContractConstantCallOptions): Promise<Decimal>; getLiquidationSpread(options?: ContractConstantCallOptions): Promise<Decimal>; getLiquidationSpreadForPair(heldMarketId: Integer, owedMarketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; getLiquidationSpreadForAccountAndPair(account: AccountInfo, heldMarketId: Integer, owedMarketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; getEarningsRate(options?: ContractConstantCallOptions): Promise<Decimal>; getMinBorrowedValue(options?: ContractConstantCallOptions): Promise<Integer>; getOracleSentinel(options?: ContractConstantCallOptions): Promise<OracleSentinel>; getIsBorrowAllowed(options?: ContractConstantCallOptions): Promise<boolean>; getIsLiquidationAllowed(options?: ContractConstantCallOptions): Promise<boolean>; getCallbackGasLimit(options?: ContractConstantCallOptions): Promise<Integer>; getDefaultAccountRiskOverrideSetter(options?: ContractConstantCallOptions): Promise<AccountRiskOverrideSetter>; getAccountRiskOverrideSetterByAccountOwner(accountOwner: address, options?: ContractConstantCallOptions): Promise<AccountRiskOverrideSetter>; getAccountRiskOverrideByAccount(account: AccountInfo, options?: ContractConstantCallOptions): Promise<{ marginRatioOverride: Decimal; liquidationSpreadOverride: Decimal; }>; getMarginRatioOverrideByAccount(account: AccountInfo, options?: ContractConstantCallOptions): Promise<Decimal>; getLiquidationSpreadOverrideByAccount(account: AccountInfo, options?: ContractConstantCallOptions): Promise<Decimal>; getRiskLimits(options?: ContractConstantCallOptions): Promise<RiskLimits>; getRiskParams(options?: ContractConstantCallOptions): Promise<RiskParams>; getAccountMaxNumberOfMarketsWithBalances(options?: ContractConstantCallOptions): Promise<Integer>; getNumMarkets(options?: ContractConstantCallOptions): Promise<Integer>; getMarketIdByTokenAddress(token: address, options?: ContractConstantCallOptions): Promise<Integer>; getMarketTokenAddress(marketId: Integer, options?: ContractConstantCallOptions): Promise<address>; getMarketIsClosing(marketId: Integer, options?: ContractConstantCallOptions): Promise<boolean>; getMarketPrice(marketId: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getMarketTotalPar(marketId: Integer, options?: ContractConstantCallOptions): Promise<TotalPar>; getMarketTotalWei(marketId: Integer, options?: ContractConstantCallOptions): Promise<TotalWei>; getMarketCachedIndex(marketId: Integer, options?: ContractConstantCallOptions): Promise<Index>; getMarketCurrentIndex(marketId: Integer, options?: ContractConstantCallOptions): Promise<Index>; getMarketPriceOracle(marketId: Integer, options?: ContractConstantCallOptions): Promise<address>; getMarketInterestSetter(marketId: Integer, options?: ContractConstantCallOptions): Promise<address>; getMarketMarginPremium(marketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; /** * @deprecated */ getMarketSpreadPremium(marketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; getMarketLiquidationSpreadPremium(marketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; /** * @deprecated */ getMarketMaxWei(marketId: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getMarketMaxSupplyWei(marketId: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getMarketMaxBorrowWei(marketId: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getMarketEarningsRateOverride(marketId: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getMarketUtilization(marketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; /** * @deprecated */ getMarketInterestRate(marketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; getMarketBorrowInterestRatePerSecond(marketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; getMarketBorrowInterestRateApr(marketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; getMarketSupplyInterestRateApr(marketId: Integer, options?: ContractConstantCallOptions): Promise<Decimal>; getMarket(marketId: Integer, options?: ContractConstantCallOptions): Promise<Market>; getMarketWithInfo(marketId: Integer, options?: ContractConstantCallOptions): Promise<MarketWithInfo>; getNumExcessTokens(marketId: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getAccountPar(accountOwner: address, accountNumber: Integer, marketId: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getAccountWei(accountOwner: address, accountNumber: Integer, marketId: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getAccountStatus(accountOwner: address, accountNumber: Integer, options?: ContractConstantCallOptions): Promise<AccountStatus>; getAccountMarketsWithBalances(accountOwner: address, accountNumber: Integer, options?: ContractConstantCallOptions): Promise<Integer[]>; getAccountNumberOfMarketsWithBalances(accountOwner: address, accountNumber: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getAccountMarketWithBalanceAtIndex(accountOwner: address, accountNumber: Integer, index: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getAccountNumberOfMarketsWithDebt(accountOwner: address, accountNumber: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getAccountValues(accountOwner: address, accountNumber: Integer, options?: ContractConstantCallOptions): Promise<Values>; getAdjustedAccountValues(accountOwner: address, accountNumber: Integer, options?: ContractConstantCallOptions): Promise<Values>; getAccountBalances(accountOwner: address, accountNumber: Integer, options?: ContractConstantCallOptions): Promise<Balance[]>; isAccountLiquidatable(liquidOwner: address, liquidNumber: Integer, options?: ContractConstantCallOptions): Promise<boolean>; getIsLocalOperator(owner: address, operator: address, options?: ContractConstantCallOptions): Promise<boolean>; getIsGlobalOperator(operator: address, options?: ContractConstantCallOptions): Promise<boolean>; getIsAutoTraderSpecial(autoTrader: address, options?: ContractConstantCallOptions): Promise<boolean>; getAdmin(options?: ContractConstantCallOptions): Promise<address>; getExpiry(accountOwner: address, accountNumber: Integer, marketId: Integer, options?: ContractConstantCallOptions): Promise<Integer>; getExpiryPrices(account: AccountInfo, heldMarketId: Integer, owedMarketId: Integer, expiryTimestamp: Integer, options?: ContractConstantCallOptions): Promise<{ heldPrice: Integer; owedPrice: Integer; }>; getExpiryRampTime(options?: ContractConstantCallOptions): Promise<Integer>; }