import * as React from "react"; export declare type CryptoCompareValues = { [key: string]: number; }; export declare type CryptoCompareError = { Message: string; }; export declare type CryptoCompareResponse = CryptoCompareValues | CryptoCompareError; /** * @typedef {Object} Props * @property {string} apikey - the cryptocompare.com api key * @property {string} from - the origin cryptocurrency/currency symbol of interest * @property {string} to - the destination cryptocurrency/currency symbol of interest * @property {number} amount - the amount to be converted */ export declare type Props = { apikey?: string; from: string; to: string; amount: number; }; /** * Set the API key for every future call * @param {string} apikey */ export declare const setApikey: (apikey: string) => string; /** * Get the authorization header for the cryptocompare.com API * @param {string} apikey * @return {string} */ export declare const getApikeyAuthorizationHeader: (apikey: string) => string; /** * Get the cryptocompare.com API URL * @param {string} from * @param {string} to * @return {string} */ export declare const getApiUrl: (from: string, to: string) => string; /** * Get the currency amount to be printed * @param {number} conversionRate * @param {number} amount * @return {string} */ export declare const getAmount: (amount: number, conversionRate: number) => string; export declare const emptyResult = "---"; export declare const defaultClassName = "react-crypto-compare"; export declare const errorClassName = "react-crypto-compare-error"; export declare const loadingClassName = "react-crypto-compare-loading"; export declare const amountClassName = "react-crypto-compare-amount"; export declare const currencyClassName = "react-crypto-compare-currency"; /** * @param props * @param props.apikey the cryptocompare.com api key * @param props.from The email of the user. * @param props.to The email of the user. * @param props.amount The email of the user. */ declare const CryptoCompare: React.FunctionComponent; export default CryptoCompare;