import { AppCurrency, EvmGasSimulationOutcome, FeeCurrency, StdFee } from "@keplr-wallet/types"; import { CoinPretty, Dec } from "@keplr-wallet/unit"; import { NameService } from "./name-service"; import { IModularChainInfoImpl } from "@keplr-wallet/stores"; export interface ITxChainSetter { chainId: string; setChain(chainId: string): void; modularChainInfo: IModularChainInfoImpl; } export interface UIProperties { readonly error?: Error; readonly warning?: Error; readonly loadingState?: "loading" | "loading-block"; } export interface IMemoConfig extends ITxChainSetter { value: string; setValue(value: string): void; memo: string; uiProperties: UIProperties; } export interface IGasConfig extends ITxChainSetter { value: string; setValue(value: string | number): void; gas: number; uiProperties: UIProperties; } export interface ISenderConfig extends ITxChainSetter { value: string; setValue(value: string): void; sender: string; uiProperties: UIProperties; } export interface IFeeConfig extends ITxChainSetter { type: FeeType | "manual" | "custom"; setFee(fee: { type: FeeType | "custom"; currency: FeeCurrency; } | CoinPretty | CoinPretty[] | undefined): void; selectableFeeCurrencies: FeeCurrency[]; toStdFee(): StdFee; fees: CoinPretty[]; getFeeTypePrettyForFeeCurrency(currency: FeeCurrency, feeType: FeeType | "custom"): CoinPretty; l1DataFee: Dec | undefined; setL1DataFee(fee: Dec): void; uiProperties: UIProperties; } export interface IRecipientConfig extends ITxChainSetter { value: string; setValue(value: string): void; recipient: string; uiProperties: UIProperties; } export interface IRecipientConfigWithNameServices extends IRecipientConfig { preferredNameService: string | undefined; setPreferredNameService(nameService: string | undefined): void; getNameService(type: string): NameService | undefined; getNameServices(): NameService[]; nameServiceResult: { type: string; address: string; fullName: string; domain: string; suffix: string; }[]; } export interface IBaseAmountConfig extends ITxChainSetter { amount: CoinPretty[]; uiProperties: UIProperties; } export interface IAmountConfig extends IBaseAmountConfig { value: string; setValue(value: string): void; currency: AppCurrency; setCurrency(currency: AppCurrency | undefined): void; canUseCurrency(currency: AppCurrency): boolean; fraction: number; setFraction(fraction: number): void; } export declare const DefaultGasPriceStep: { low: number; average: number; high: number; }; export type FeeType = "high" | "average" | "low"; export interface IGasSimulator { enabled: boolean; setEnabled(value: boolean): void; isSimulating: boolean; gasEstimated: number | undefined; gasAdjustment: number; gasAdjustmentValue: string; setGasAdjustmentValue(gasAdjustment: string | number): void; evmSimulationOutcome?: EvmGasSimulationOutcome; uiProperties: UIProperties; }