import { AppCurrency , Currency } from "@keplr-wallet/types" ; import { StdFee } from "@cosmjs/launchpad" ; import { CoinPretty } from "@keplr-wallet/unit" ; import { CoinPrimitive } from "@keplr-wallet/stores" ; export interface ITxChainSetter { chainId : string ; setChain ( chainId ) : void ; } export interface IMemoConfig extends ITxChainSetter { memo : string ; setMemo ( memo ) : void ; getError ( ) : Error | undefined ; } export interface IGasConfig extends ITxChainSetter { gas : number ; gasRaw : string ; setGas ( gas ) : void ; getError ( ) : Error | undefined ; } export interface IFeeConfig extends ITxChainSetter { feeType : FeeType | undefined ; setFeeType ( feeType ) : void ; feeCurrencies : Currency [ ] ; feeCurrency : Currency | undefined ; toStdFee ( ) : StdFee ; fee : CoinPretty | undefined ; getFeeTypePretty ( feeType ) : CoinPretty ; getFeePrimitive ( ) : CoinPrimitive | undefined ; isManual : boolean ; getError ( ) : Error | undefined ; } export interface IRecipientConfig extends ITxChainSetter { recipient : string ; rawRecipient : string ; setRawRecipient ( recipient ) : void ; getError ( ) : Error | undefined ; } export interface IAmountConfig extends ITxChainSetter { amount : string ; setAmount ( amount ) : void ; getAmountPrimitive ( ) : CoinPrimitive ; sendCurrency : AppCurrency ; setSendCurrency ( currency ) : void ; sendableCurrencies : AppCurrency [ ] ; sender : string ; setSender ( sender ) : void ; deprecated param isMax setIsMax ( isMax ) : void ; deprecated toggleIsMax ( ) : void ; deprecated isMax : boolean ; fraction : number | undefined ; setFraction ( value ) : void ; getError ( ) : Error | undefined ; } export const DefaultGasPriceStep = { low : 0.01 , average : 0.025 , high : 0.04 , } ; export type FeeType = "high" | "average" | "low" ;