API Report File for "@mosaic/lib-ethers"
Do not edit this file. It is a report generated by API Extractor.
import { BigNumberish } from '@ethersproject/bignumber';
import { BlockTag } from '@ethersproject/abstract-provider';
import { CollateralGainTransferDetails } from '@mosaic/lib-base';
import { Decimal } from '@mosaic/lib-base';
import { Decimalish } from '@mosaic/lib-base';
import { ErrorCode } from '@ethersproject/logger';
import { FailedReceipt } from '@mosaic/lib-base';
import { Fees } from '@mosaic/lib-base';
import { FrontendStatus } from '@mosaic/lib-base';
import { LiquidationDetails } from '@mosaic/lib-base';
import { MosaicReceipt } from '@mosaic/lib-base';
import { MosaicStore } from '@mosaic/lib-base';
import { MosaicStoreState } from '@mosaic/lib-base';
import { MSICStake } from '@mosaic/lib-base';
import { MinedReceipt } from '@mosaic/lib-base';
import { ObservableMosaic } from '@mosaic/lib-base';
import { PopulatableMosaic } from '@mosaic/lib-base';
import { PopulatedMosaicTransaction } from '@mosaic/lib-base';
import { PopulatedRedemption } from '@mosaic/lib-base';
import { PopulatedTransaction } from '@ethersproject/contracts';
import { Provider } from '@ethersproject/abstract-provider';
import { ReadableMosaic } from '@mosaic/lib-base';
import { RedemptionDetails } from '@mosaic/lib-base';
import { SendableMosaic } from '@mosaic/lib-base';
import { SentMosaicTransaction } from '@mosaic/lib-base';
import { Signer } from '@ethersproject/abstract-signer';
import { StabilityDeposit } from '@mosaic/lib-base';
import { StabilityDepositChangeDetails } from '@mosaic/lib-base';
import { StabilityPoolGainsWithdrawalDetails } from '@mosaic/lib-base';
import { TransactableMosaic } from '@mosaic/lib-base';
import { TransactionFailedError } from '@mosaic/lib-base';
import { TransactionReceipt } from '@ethersproject/abstract-provider';
import { TransactionResponse } from '@ethersproject/abstract-provider';
import { Trove } from '@mosaic/lib-base';
import { TroveAdjustmentDetails } from '@mosaic/lib-base';
import { TroveAdjustmentParams } from '@mosaic/lib-base';
import { TroveClosureDetails } from '@mosaic/lib-base';
import { TroveCreationDetails } from '@mosaic/lib-base';
import { TroveCreationParams } from '@mosaic/lib-base';
import { TroveListingParams } from '@mosaic/lib-base';
import { TroveWithPendingRedistribution } from '@mosaic/lib-base';
import { UserTrove } from '@mosaic/lib-base';
// @public
export class BlockPolledMosaicStore extends MosaicStore<BlockPolledMosaicStoreExtraState> {
constructor(readable: ReadableEthersMosaic);
// (undocumented)
readonly connection: EthersMosaicConnection;
// @internal @override (undocumented)
protected _doStart(): () => void;
// @internal @override (undocumented)
protected _reduceExtra(oldState: BlockPolledMosaicStoreExtraState, stateUpdate: Partial<BlockPolledMosaicStoreExtraState>): BlockPolledMosaicStoreExtraState;
}
// @public
export interface BlockPolledMosaicStoreExtraState {
blockTag?: number;
blockTimestamp: number;
// @internal (undocumented)
_feesFactory: (blockTimestamp: number, recoveryMode: boolean) => Fees;
}
// @public
export type BlockPolledMosaicStoreState = MosaicStoreState<BlockPolledMosaicStoreExtraState>;
// @public
export interface BorrowingOperationOptionalParams {
borrowingFeeDecayToleranceMinutes?: number;
maxBorrowingRate?: Decimalish;
}
// @internal (undocumented)
export function _connectByChainId<T>(provider: EthersProvider, signer: EthersSigner | undefined, chainId: number, optionalParams: EthersMosaicConnectionOptionalParams & {
useStore: T;
}): EthersMosaicConnection & {
useStore: T;
};
// @internal (undocumented)
export function _connectByChainId(provider: EthersProvider, signer: EthersSigner | undefined, chainId: number, optionalParams?: EthersMosaicConnectionOptionalParams): EthersMosaicConnection;
// @public
export interface EthersCallOverrides {
// (undocumented)
blockTag?: BlockTag;
}
// @public
export class EthersMosaic implements ReadableEthersMosaic, TransactableMosaic {
// @internal
constructor(readable: ReadableEthersMosaic);
// (undocumented)
adjustTrove(params: TroveAdjustmentParams<Decimalish>, maxBorrowingRateOrOptionalParams?: Decimalish | BorrowingOperationOptionalParams, overrides?: EthersTransactionOverrides): Promise<TroveAdjustmentDetails>;
// (undocumented)
approveUniTokens(allowance?: Decimalish, overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
borrowMoUSD(amount: Decimalish, maxBorrowingRate?: Decimalish, overrides?: EthersTransactionOverrides): Promise<TroveAdjustmentDetails>;
// (undocumented)
claimCollateralSurplus(overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
closeTrove(overrides?: EthersTransactionOverrides): Promise<TroveClosureDetails>;
// @internal (undocumented)
static connect(signerOrProvider: EthersSigner | EthersProvider, optionalParams: EthersMosaicConnectionOptionalParams & {
useStore: "blockPolled";
}): Promise<EthersMosaicWithStore<BlockPolledMosaicStore>>;
static connect(signerOrProvider: EthersSigner | EthersProvider, optionalParams?: EthersMosaicConnectionOptionalParams): Promise<EthersMosaic>;
readonly connection: EthersMosaicConnection;
// (undocumented)
depositCollateral(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<TroveAdjustmentDetails>;
// (undocumented)
depositMoUSDInStabilityPool(amount: Decimalish, frontendTag?: string, overrides?: EthersTransactionOverrides): Promise<StabilityDepositChangeDetails>;
// (undocumented)
exitLiquidityMining(overrides?: EthersTransactionOverrides): Promise<void>;
// @internal (undocumented)
static _from(connection: EthersMosaicConnection & {
useStore: "blockPolled";
}): EthersMosaicWithStore<BlockPolledMosaicStore>;
// @internal (undocumented)
static _from(connection: EthersMosaicConnection): EthersMosaic;
// @internal (undocumented)
_getActivePool(overrides?: EthersCallOverrides): Promise<Trove>;
// @internal (undocumented)
_getBlockTimestamp(blockTag?: BlockTag): Promise<number>;
// (undocumented)
getCollateralSurplusBalance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// @internal (undocumented)
_getDefaultPool(overrides?: EthersCallOverrides): Promise<Trove>;
// (undocumented)
getFees(overrides?: EthersCallOverrides): Promise<Fees>;
// @internal (undocumented)
_getFeesFactory(overrides?: EthersCallOverrides): Promise<(blockTimestamp: number, recoveryMode: boolean) => Fees>;
// (undocumented)
getFrontendStatus(address?: string, overrides?: EthersCallOverrides): Promise<FrontendStatus>;
// (undocumented)
getLiquidityMiningMSICReward(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getLiquidityMiningStake(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getMSICBalance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getMSICStake(address?: string, overrides?: EthersCallOverrides): Promise<MSICStake>;
// (undocumented)
getMoUSDBalance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getMoUSDInStabilityPool(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getNumberOfTroves(overrides?: EthersCallOverrides): Promise<number>;
// (undocumented)
getPrice(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getRemainingLiquidityMiningMSICReward(overrides?: EthersCallOverrides): Promise<Decimal>;
// @internal (undocumented)
_getRemainingLiquidityMiningMSICRewardCalculator(overrides?: EthersCallOverrides): Promise<(blockTimestamp: number) => Decimal>;
// (undocumented)
getRemainingStabilityPoolMSICReward(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getStabilityDeposit(address?: string, overrides?: EthersCallOverrides): Promise<StabilityDeposit>;
// (undocumented)
getTotal(overrides?: EthersCallOverrides): Promise<Trove>;
// (undocumented)
getTotalRedistributed(overrides?: EthersCallOverrides): Promise<Trove>;
// (undocumented)
getTotalStakedMSIC(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getTotalStakedUniTokens(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getTrove(address?: string, overrides?: EthersCallOverrides): Promise<UserTrove>;
// (undocumented)
getTroveBeforeRedistribution(address?: string, overrides?: EthersCallOverrides): Promise<TroveWithPendingRedistribution>;
// @internal (undocumented)
getTroves(params: TroveListingParams & {
beforeRedistribution: true;
}, overrides?: EthersCallOverrides): Promise<TroveWithPendingRedistribution[]>;
// (undocumented)
getTroves(params: TroveListingParams, overrides?: EthersCallOverrides): Promise<UserTrove[]>;
// (undocumented)
getUniTokenAllowance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getUniTokenBalance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
hasStore(): this is EthersMosaicWithStore;
hasStore(store: "blockPolled"): this is EthersMosaicWithStore<BlockPolledMosaicStore>;
// (undocumented)
liquidate(address: string | string[], overrides?: EthersTransactionOverrides): Promise<LiquidationDetails>;
// (undocumented)
liquidateUpTo(maximumNumberOfTrovesToLiquidate: number, overrides?: EthersTransactionOverrides): Promise<LiquidationDetails>;
// @internal (undocumented)
_mintUniToken(amount: Decimalish, address?: string, overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
openTrove(params: TroveCreationParams<Decimalish>, maxBorrowingRateOrOptionalParams?: Decimalish | BorrowingOperationOptionalParams, overrides?: EthersTransactionOverrides): Promise<TroveCreationDetails>;
readonly populate: PopulatableEthersMosaic;
// (undocumented)
redeemMoUSD(amount: Decimalish, maxRedemptionRate?: Decimalish, overrides?: EthersTransactionOverrides): Promise<RedemptionDetails>;
// (undocumented)
registerFrontend(kickbackRate: Decimalish, overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
repayMoUSD(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<TroveAdjustmentDetails>;
readonly send: SendableEthersMosaic;
// (undocumented)
sendMSIC(toAddress: string, amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
sendMoUSD(toAddress: string, amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<void>;
// @internal (undocumented)
setPrice(price: Decimalish, overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
stakeMSIC(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
stakeUniTokens(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
transferCollateralGainToTrove(overrides?: EthersTransactionOverrides): Promise<CollateralGainTransferDetails>;
// (undocumented)
unstakeMSIC(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
unstakeUniTokens(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
withdrawCollateral(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<TroveAdjustmentDetails>;
// (undocumented)
withdrawGainsFromStabilityPool(overrides?: EthersTransactionOverrides): Promise<StabilityPoolGainsWithdrawalDetails>;
// (undocumented)
withdrawGainsFromStaking(overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
withdrawMSICRewardFromLiquidityMining(overrides?: EthersTransactionOverrides): Promise<void>;
// (undocumented)
withdrawMoUSDFromStabilityPool(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<StabilityDepositChangeDetails>;
}
// @public
export interface EthersMosaicConnection extends EthersMosaicConnectionOptionalParams {
// @internal (undocumented)
readonly [brand]: unique symbol;
readonly addresses: Record<string, string>;
readonly bootstrapPeriod: number;
readonly chainId: number;
readonly deploymentDate: Date;
// @internal (undocumented)
readonly _isDev: boolean;
readonly liquidityMiningMSICRewardRate: Decimal;
// @internal (undocumented)
readonly _priceFeedIsTestnet: boolean;
readonly provider: EthersProvider;
readonly signer?: EthersSigner;
readonly startBlock: number;
readonly totalStabilityPoolMSICReward: Decimal;
readonly version: string;
}
// @public
export interface EthersMosaicConnectionOptionalParams {
readonly frontendTag?: string;
readonly userAddress?: string;
readonly useStore?: EthersMosaicStoreOption;
}
// @public
export type EthersMosaicStoreOption = "blockPolled";
// @public
export interface EthersMosaicWithStore<T extends MosaicStore = MosaicStore> extends EthersMosaic {
readonly store: T;
}
// @public
export type EthersPopulatedTransaction = PopulatedTransaction;
// @public
export type EthersProvider = Provider;
// @public
export type EthersSigner = Signer;
// @public
export class EthersTransactionCancelledError extends Error {
// @internal
constructor(rawError: _RawTransactionReplacedError);
// (undocumented)
readonly rawError: Error;
// (undocumented)
readonly rawReplacementReceipt: EthersTransactionReceipt;
}
// @public
export class EthersTransactionFailedError extends TransactionFailedError<FailedReceipt<EthersTransactionReceipt>> {
constructor(message: string, failedReceipt: FailedReceipt<EthersTransactionReceipt>);
}
// @public
export interface EthersTransactionOverrides {
// (undocumented)
from?: string;
// (undocumented)
gasLimit?: BigNumberish;
// (undocumented)
gasPrice?: BigNumberish;
// (undocumented)
nonce?: BigNumberish;
}
// @public
export type EthersTransactionReceipt = TransactionReceipt;
// @public
export type EthersTransactionResponse = TransactionResponse;
// @alpha (undocumented)
export class ObservableEthersMosaic implements ObservableMosaic {
constructor(readable: ReadableEthersMosaic);
// (undocumented)
watchMoUSDBalance(onMoUSDBalanceChanged: (balance: Decimal) => void, address?: string): () => void;
// (undocumented)
watchMoUSDInStabilityPool(onMoUSDInStabilityPoolChanged: (msicInStabilityPool: Decimal) => void): () => void;
// (undocumented)
watchNumberOfTroves(onNumberOfTrovesChanged: (numberOfTroves: number) => void): () => void;
// (undocumented)
watchPrice(onPriceChanged: (price: Decimal) => void): () => void;
// (undocumented)
watchStabilityDeposit(onStabilityDepositChanged: (stabilityDeposit: StabilityDeposit) => void, address?: string): () => void;
// (undocumented)
watchTotal(onTotalChanged: (total: Trove) => void): () => void;
// (undocumented)
watchTotalRedistributed(onTotalRedistributedChanged: (totalRedistributed: Trove) => void): () => void;
// (undocumented)
watchTroveWithoutRewards(onTroveChanged: (trove: TroveWithPendingRedistribution) => void, address?: string): () => void;
}
// @public
export class PopulatableEthersMosaic implements PopulatableMosaic<EthersTransactionReceipt, EthersTransactionResponse, EthersPopulatedTransaction> {
constructor(readable: ReadableEthersMosaic);
// (undocumented)
adjustTrove(params: TroveAdjustmentParams<Decimalish>, maxBorrowingRateOrOptionalParams?: Decimalish | BorrowingOperationOptionalParams, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
approveUniTokens(allowance?: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
borrowMoUSD(amount: Decimalish, maxBorrowingRate?: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
claimCollateralSurplus(overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
closeTrove(overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<TroveClosureDetails>>;
// (undocumented)
depositCollateral(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
depositMoUSDInStabilityPool(amount: Decimalish, frontendTag?: string, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<StabilityDepositChangeDetails>>;
// (undocumented)
exitLiquidityMining(overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
liquidate(address: string | string[], overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<LiquidationDetails>>;
// (undocumented)
liquidateUpTo(maximumNumberOfTrovesToLiquidate: number, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<LiquidationDetails>>;
// @internal (undocumented)
_mintUniToken(amount: Decimalish, address?: string, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
openTrove(params: TroveCreationParams<Decimalish>, maxBorrowingRateOrOptionalParams?: Decimalish | BorrowingOperationOptionalParams, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<TroveCreationDetails>>;
// (undocumented)
redeemMoUSD(amount: Decimalish, maxRedemptionRate?: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersRedemption>;
// (undocumented)
registerFrontend(kickbackRate: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
repayMoUSD(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
sendMSIC(toAddress: string, amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
sendMoUSD(toAddress: string, amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// @internal (undocumented)
setPrice(price: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
stakeMSIC(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
stakeUniTokens(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
transferCollateralGainToTrove(overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<CollateralGainTransferDetails>>;
// (undocumented)
unstakeMSIC(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
unstakeUniTokens(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
withdrawCollateral(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
withdrawGainsFromStabilityPool(overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<StabilityPoolGainsWithdrawalDetails>>;
// (undocumented)
withdrawGainsFromStaking(overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
withdrawMSICRewardFromLiquidityMining(overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<void>>;
// (undocumented)
withdrawMoUSDFromStabilityPool(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<PopulatedEthersMosaicTransaction<StabilityDepositChangeDetails>>;
}
// @public
export class PopulatedEthersMosaicTransaction<T = unknown> implements PopulatedMosaicTransaction<EthersPopulatedTransaction, SentEthersMosaicTransaction<T>> {
// @internal
constructor(rawPopulatedTransaction: EthersPopulatedTransaction, connection: EthersMosaicConnection, parse: (rawReceipt: EthersTransactionReceipt) => T, gasHeadroom?: number);
readonly gasHeadroom?: number;
readonly rawPopulatedTransaction: EthersPopulatedTransaction;
// (undocumented)
send(): Promise<SentEthersMosaicTransaction<T>>;
}
// @public (undocumented)
export class PopulatedEthersRedemption extends PopulatedEthersMosaicTransaction<RedemptionDetails> implements PopulatedRedemption<EthersPopulatedTransaction, EthersTransactionResponse, EthersTransactionReceipt> {
// @internal
constructor(rawPopulatedTransaction: EthersPopulatedTransaction, connection: EthersMosaicConnection, attemptedMoUSDAmount: Decimal, redeemableMoUSDAmount: Decimal, increaseAmountByMinimumNetDebt?: (maxRedemptionRate?: Decimalish) => Promise<PopulatedEthersRedemption>);
// (undocumented)
readonly attemptedMoUSDAmount: Decimal;
// (undocumented)
increaseAmountByMinimumNetDebt(maxRedemptionRate?: Decimalish): Promise<PopulatedEthersRedemption>;
// (undocumented)
readonly isTruncated: boolean;
// (undocumented)
readonly redeemableMoUSDAmount: Decimal;
}
// @internal (undocumented)
export enum _RawErrorReason {
// (undocumented)
TRANSACTION_CANCELLED = "cancelled",
// (undocumented)
TRANSACTION_FAILED = "transaction failed",
// (undocumented)
TRANSACTION_REPLACED = "replaced",
// (undocumented)
TRANSACTION_REPRICED = "repriced"
}
// @internal (undocumented)
export interface _RawTransactionReplacedError extends Error {
// (undocumented)
cancelled: boolean;
// (undocumented)
code: ErrorCode.TRANSACTION_REPLACED;
// (undocumented)
hash: string;
// (undocumented)
reason: _RawErrorReason.TRANSACTION_CANCELLED | _RawErrorReason.TRANSACTION_REPLACED | _RawErrorReason.TRANSACTION_REPRICED;
// (undocumented)
receipt: EthersTransactionReceipt;
// (undocumented)
replacement: EthersTransactionResponse;
}
// @public
export class ReadableEthersMosaic implements ReadableMosaic {
// @internal
constructor(connection: EthersMosaicConnection);
// @internal (undocumented)
static connect(signerOrProvider: EthersSigner | EthersProvider, optionalParams: EthersMosaicConnectionOptionalParams & {
useStore: "blockPolled";
}): Promise<ReadableEthersMosaicWithStore<BlockPolledMosaicStore>>;
// (undocumented)
static connect(signerOrProvider: EthersSigner | EthersProvider, optionalParams?: EthersMosaicConnectionOptionalParams): Promise<ReadableEthersMosaic>;
// (undocumented)
readonly connection: EthersMosaicConnection;
// @internal (undocumented)
static _from(connection: EthersMosaicConnection & {
useStore: "blockPolled";
}): ReadableEthersMosaicWithStore<BlockPolledMosaicStore>;
// @internal (undocumented)
static _from(connection: EthersMosaicConnection): ReadableEthersMosaic;
// @internal (undocumented)
_getActivePool(overrides?: EthersCallOverrides): Promise<Trove>;
// @internal (undocumented)
_getBlockTimestamp(blockTag?: BlockTag): Promise<number>;
// (undocumented)
getCollateralSurplusBalance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// @internal (undocumented)
_getDefaultPool(overrides?: EthersCallOverrides): Promise<Trove>;
// (undocumented)
getFees(overrides?: EthersCallOverrides): Promise<Fees>;
// @internal (undocumented)
_getFeesFactory(overrides?: EthersCallOverrides): Promise<(blockTimestamp: number, recoveryMode: boolean) => Fees>;
// (undocumented)
getFrontendStatus(address?: string, overrides?: EthersCallOverrides): Promise<FrontendStatus>;
// (undocumented)
getLiquidityMiningMSICReward(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getLiquidityMiningStake(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getMSICBalance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getMSICStake(address?: string, overrides?: EthersCallOverrides): Promise<MSICStake>;
// (undocumented)
getMoUSDBalance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getMoUSDInStabilityPool(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getNumberOfTroves(overrides?: EthersCallOverrides): Promise<number>;
// (undocumented)
getPrice(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getRemainingLiquidityMiningMSICReward(overrides?: EthersCallOverrides): Promise<Decimal>;
// @internal (undocumented)
_getRemainingLiquidityMiningMSICRewardCalculator(overrides?: EthersCallOverrides): Promise<(blockTimestamp: number) => Decimal>;
// (undocumented)
getRemainingStabilityPoolMSICReward(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getStabilityDeposit(address?: string, overrides?: EthersCallOverrides): Promise<StabilityDeposit>;
// (undocumented)
getTotal(overrides?: EthersCallOverrides): Promise<Trove>;
// (undocumented)
getTotalRedistributed(overrides?: EthersCallOverrides): Promise<Trove>;
// (undocumented)
getTotalStakedMSIC(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getTotalStakedUniTokens(overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getTrove(address?: string, overrides?: EthersCallOverrides): Promise<UserTrove>;
// (undocumented)
getTroveBeforeRedistribution(address?: string, overrides?: EthersCallOverrides): Promise<TroveWithPendingRedistribution>;
// @internal (undocumented)
getTroves(params: TroveListingParams & {
beforeRedistribution: true;
}, overrides?: EthersCallOverrides): Promise<TroveWithPendingRedistribution[]>;
// (undocumented)
getTroves(params: TroveListingParams, overrides?: EthersCallOverrides): Promise<UserTrove[]>;
// (undocumented)
getUniTokenAllowance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
// (undocumented)
getUniTokenBalance(address?: string, overrides?: EthersCallOverrides): Promise<Decimal>;
hasStore(): this is ReadableEthersMosaicWithStore;
hasStore(store: "blockPolled"): this is ReadableEthersMosaicWithStore<BlockPolledMosaicStore>;
}
// @public
export interface ReadableEthersMosaicWithStore<T extends MosaicStore = MosaicStore> extends ReadableEthersMosaic {
readonly store: T;
}
// @internal (undocumented)
export const _redeemMaxIterations = 70;
// @public
export class SendableEthersMosaic implements SendableMosaic<EthersTransactionReceipt, EthersTransactionResponse> {
constructor(populatable: PopulatableEthersMosaic);
// (undocumented)
adjustTrove(params: TroveAdjustmentParams<Decimalish>, maxBorrowingRateOrOptionalParams?: Decimalish | BorrowingOperationOptionalParams, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
approveUniTokens(allowance?: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
borrowMoUSD(amount: Decimalish, maxBorrowingRate?: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
claimCollateralSurplus(overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
closeTrove(overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<TroveClosureDetails>>;
// (undocumented)
depositCollateral(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
depositMoUSDInStabilityPool(amount: Decimalish, frontendTag?: string, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<StabilityDepositChangeDetails>>;
// (undocumented)
exitLiquidityMining(overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
liquidate(address: string | string[], overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<LiquidationDetails>>;
// (undocumented)
liquidateUpTo(maximumNumberOfTrovesToLiquidate: number, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<LiquidationDetails>>;
// @internal (undocumented)
_mintUniToken(amount: Decimalish, address?: string, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
openTrove(params: TroveCreationParams<Decimalish>, maxBorrowingRateOrOptionalParams?: Decimalish | BorrowingOperationOptionalParams, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<TroveCreationDetails>>;
// (undocumented)
redeemMoUSD(amount: Decimalish, maxRedemptionRate?: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<RedemptionDetails>>;
// (undocumented)
registerFrontend(kickbackRate: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
repayMoUSD(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
sendMSIC(toAddress: string, amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
sendMoUSD(toAddress: string, amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// @internal (undocumented)
setPrice(price: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
stakeMSIC(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
stakeUniTokens(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
transferCollateralGainToTrove(overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<CollateralGainTransferDetails>>;
// (undocumented)
unstakeMSIC(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
unstakeUniTokens(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
withdrawCollateral(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<TroveAdjustmentDetails>>;
// (undocumented)
withdrawGainsFromStabilityPool(overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<StabilityPoolGainsWithdrawalDetails>>;
// (undocumented)
withdrawGainsFromStaking(overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
withdrawMSICRewardFromLiquidityMining(overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<void>>;
// (undocumented)
withdrawMoUSDFromStabilityPool(amount: Decimalish, overrides?: EthersTransactionOverrides): Promise<SentEthersMosaicTransaction<StabilityDepositChangeDetails>>;
}
// @public
export class SentEthersMosaicTransaction<T = unknown> implements SentMosaicTransaction<EthersTransactionResponse, MosaicReceipt<EthersTransactionReceipt, T>> {
// @internal
constructor(rawSentTransaction: EthersTransactionResponse, connection: EthersMosaicConnection, parse: (rawReceipt: EthersTransactionReceipt) => T);
// (undocumented)
getReceipt(): Promise<MosaicReceipt<EthersTransactionReceipt, T>>;
readonly rawSentTransaction: EthersTransactionResponse;
// (undocumented)
waitForReceipt(): Promise<MinedReceipt<EthersTransactionReceipt, T>>;
}
// @internal (undocumented)
export interface _TroveChangeWithFees<T> {
// (undocumented)
fee: Decimal;
// (undocumented)
newTrove: Trove;
// (undocumented)
params: T;
}
// @public
export class UnsupportedNetworkError extends Error {
// @internal
constructor(chainId: number);
readonly chainId: number;
}
// (No @packageDocumentation comment for this package)
Last updated