import { IFeeConfig, IGasConfig, IGasSimulator, UIProperties } from "./types"; import { IReactionDisposer } from "mobx"; import { KVStore } from "@keplr-wallet/common"; import { TxChainSetter } from "./chain"; import { ChainGetter, MakeTxResponse } from "@keplr-wallet/stores"; import { Coin, EvmGasSimulationOutcome, StdFee } from "@keplr-wallet/types"; type TxSimulate = Pick; export type SimulateGasFn = () => TxSimulate; declare class GasSimulatorState { protected _outdatedCosmosSdk: boolean; protected _initialGasEstimated: number | null; protected _isInitialized: boolean; protected _recentGasEstimated: number | undefined; protected _tx: TxSimulate | undefined; protected _stdFee: StdFee | undefined; protected _error: Error | undefined; protected _recentEvmSimulationOutcome: EvmGasSimulationOutcome | undefined; constructor(); get outdatedCosmosSdk(): boolean; setIsInitialized(value: boolean): void; get isInitialized(): boolean; setOutdatedCosmosSdk(value: boolean): void; get initialGasEstimated(): number | null; setInitialGasEstimated(value: number): void; get recentGasEstimated(): number | undefined; setRecentGasEstimated(value: number): void; get tx(): TxSimulate | undefined; refreshTx(tx: TxSimulate | undefined): void; get stdFee(): StdFee | undefined; refreshStdFee(fee: StdFee | undefined): void; get error(): Error | undefined; setError(error: Error | undefined): void; get recentEvmSimulationOutcome(): EvmGasSimulationOutcome | undefined; setRecentEvmSimulationOutcome(outcome: EvmGasSimulationOutcome | undefined): void; static isZeroFee(amount: readonly Coin[] | undefined): boolean; } export declare class GasSimulator extends TxChainSetter implements IGasSimulator { protected kvStore: KVStore; protected readonly gasConfig: IGasConfig; protected readonly feeConfig: IFeeConfig; protected readonly initialKey: string; protected simulateGasFn: SimulateGasFn; protected _key: string; protected _gasAdjustmentValue: string; protected _enabled: boolean; protected _forceDisabled: boolean; protected _forceDisableReason: Error | undefined; protected _isSimulating: boolean; protected _stateMap: Map; protected _disposers: IReactionDisposer[]; constructor(kvStore: KVStore, chainGetter: ChainGetter, initialChainId: string, gasConfig: IGasConfig, feeConfig: IFeeConfig, initialKey: string, simulateGasFn: SimulateGasFn); setKVStore(kvStore: KVStore): void; get key(): string; setKey(value: string): void; get isSimulating(): boolean; setSimulateGasFn(simulateGasFn: SimulateGasFn): void; get enabled(): boolean; setEnabled(value: boolean): void; get forceDisabled(): boolean; get forceDisableReason(): Error | undefined; forceDisable(valueOrReason: boolean | Error): void; get outdatedCosmosSdk(): boolean; get error(): Error | undefined; get gasEstimated(): number | undefined; get evmSimulationOutcome(): EvmGasSimulationOutcome | undefined; get gasAdjustment(): number; get gasAdjustmentValue(): string; setGasAdjustmentValue(gasAdjustment: string | number): void; protected init(): void; dispose(): void; get uiProperties(): UIProperties; protected getState(key: string): GasSimulatorState; protected get storeKey(): string; } export declare const useGasSimulator: (kvStore: KVStore, chainGetter: ChainGetter, chainId: string, gasConfig: IGasConfig, feeConfig: IFeeConfig, key: string, simulateGasFn: SimulateGasFn, initialDisabled?: boolean) => GasSimulator; export {};