import { FeeType, IBaseAmountConfig, IFeeConfig, IGasConfig, ISenderConfig, UIProperties } from "./types"; import { TxChainSetter } from "./chain"; import { ChainGetter } from "@keplr-wallet/stores"; import { CoinPretty, Dec } from "@keplr-wallet/unit"; import { Currency, FeeCurrency, StdFee } from "@keplr-wallet/types"; import { QueriesStore } from "./internal"; export declare class FeeConfig extends TxChainSetter implements IFeeConfig { protected readonly queriesStore: QueriesStore; protected readonly senderConfig: ISenderConfig; protected readonly amountConfig: IBaseAmountConfig; protected readonly gasConfig: IGasConfig; /** * This hooks package is for cosmos/ethermint chains. * feeCurrencies exist on cosmos and ethermint types. */ protected get _cosmosFeeCurrencies(): FeeCurrency[]; protected _fee: { type: FeeType | "custom"; currency: Currency; } | CoinPretty[] | undefined; /** * `additionAmountToNeedFee` indicated that the fee config should consider the amount config's amount * when checking that the fee is sufficient to send tx. * If this value is true and if the amount + fee is not sufficient to send tx, it will return error. * Else, only consider the fee without addition the amount. * @protected */ protected additionAmountToNeedFee: boolean; protected computeTerraClassicTax: boolean; protected _disableBalanceCheck: boolean; protected _l1DataFee: Dec | undefined; protected forceUseAtoneTokenAsFee: boolean; protected forceTopUp: boolean; constructor(chainGetter: ChainGetter, queriesStore: QueriesStore, initialChainId: string, senderConfig: ISenderConfig, amountConfig: IBaseAmountConfig, gasConfig: IGasConfig, additionAmountToNeedFee?: boolean, computeTerraClassicTax?: boolean, forceUseAtoneTokenAsFee?: boolean, forceTopUp?: boolean); setAdditionAmountToNeedFee(additionAmountToNeedFee: boolean): void; setComputeTerraClassicTax(computeTerraClassicTax: boolean): void; setForceUseAtoneTokenAsFee(forceUseAtoneTokenAsFee: boolean): void; setForceTopUp(forceTopUp: boolean): void; setDisableBalanceCheck(bool: boolean): void; get disableBalanceCheck(): boolean; get type(): FeeType | "manual" | "custom"; protected get fee(): { type: FeeType | "custom"; currency: Currency; } | CoinPretty[] | undefined; setFee(fee: { type: FeeType | "custom"; currency: Currency; } | CoinPretty | CoinPretty[] | undefined): void; get selectableFeeCurrencies(): FeeCurrency[]; toStdFee(): StdFee; get fees(): CoinPretty[]; getFeePrimitive(): { amount: string; currency: FeeCurrency; }[]; protected canOsmosisTxFeesAndReady(): boolean; protected canFeeMarketTxFeesAndReady(): boolean; get l1DataFee(): Dec | undefined; setL1DataFee(fee: Dec): void; readonly getFeeTypePrettyForFeeCurrency: (feeCurrency: FeeCurrency, feeType: FeeType | "custom") => CoinPretty; readonly getGasPriceForFeeCurrency: (feeCurrency: FeeCurrency, feeType: FeeType | "custom") => Dec; protected populateGasPriceStep(feeCurrency: FeeCurrency, feeType: FeeType | "custom"): Dec; get _uiProperties(): UIProperties; get uiProperties(): UIProperties; readonly getTopUpStatus: () => { isTopUpAvailable: boolean; remainingTimeMs: undefined; shouldTopUp: boolean; topUpOverrideStdFee: undefined; stakingChainId?: undefined; validatorAddress?: undefined; coinDenom?: undefined; coinMinimalDenom?: undefined; requiredStaking?: undefined; additionalStakingNeeded?: undefined; } | { shouldTopUp: boolean; isTopUpAvailable: boolean; remainingTimeMs: number | undefined; topUpOverrideStdFee: StdFee | undefined; stakingChainId: string | undefined; validatorAddress: string | undefined; coinDenom: string | undefined; coinMinimalDenom: string | undefined; requiredStaking: number | undefined; additionalStakingNeeded: number | undefined; }; get topUpStatus(): { shouldTopUp: boolean; remainingTimeMs?: number; topUpOverrideStdFee?: StdFee; isTopUpAvailable: boolean; stakingChainId?: string; validatorAddress?: string; coinDenom?: string; coinMinimalDenom?: string; requiredStaking?: number; additionalStakingNeeded?: number; }; refreshTopUpStatus(): void; private getMultiplication; } export declare const useFeeConfig: (chainGetter: ChainGetter, queriesStore: QueriesStore, chainId: string, senderConfig: ISenderConfig, amountConfig: IBaseAmountConfig, gasConfig: IGasConfig, opts?: { additionAmountToNeedFee?: boolean; computeTerraClassicTax?: boolean; forceUseAtoneTokenAsFee?: boolean; forceTopUp?: boolean; }) => FeeConfig;