UNPKG

@transferwise/sensible

Version:
33 lines (31 loc) 1.75 kB
/** * Gets the default amount for a specific currency. * @param {string} currency - The currency code (e.g "JPY"). * @returns {number} The default amount for the given currency or the fallback default amount. */ declare function getAmountForCurrency(currency: string): number; /** * Gets the currency pair for a specific country. * @param {string} country - The country code (e.g "us"). * @returns {[sourceCurrency: string, targetCurrency: string]} The default currency pair for the given country or the fallback default currency pair. */ declare function getCurrencyPairForCountry(country: string): [sourceCurrency: string, targetCurrency: string]; /** * Gets the route for a specific country. * @param {string} country - The country code (e.g "us"). * @returns {string} The default route for the given country or the fallback default route. */ declare function getRouteForCountry(country: string): string; /** * Gets the default target currency for a specific source currency. * @param {string} currency - The source currency code (e.g "USD"). * @returns {string} The default target currency for the given source currency or the fallback default target currency. */ declare function getTargetForSourceCurrency(currency: string): string; /** * Gets all default target currencies for a specific source currency. * @param {string} currency - The source currency code (e.g "USD"). * @returns {string[]} An array of default target currencies for the given source currency or the fallback default target currencies. */ declare function getTargetsForSourceCurrency(currency: string): string[]; export { getAmountForCurrency, getCurrencyPairForCountry, getRouteForCountry, getTargetForSourceCurrency, getTargetsForSourceCurrency };