import { Result } from "@ethersproject/abi"; import BigNumber from "bignumber.js"; import Web3 from "web3"; import { Token, TokenAmount } from "../Tokens"; import { Address, TimeFrame } from "../constants"; /** * * @param address string to check if an address is valid and checksummed * @returns checksummed address, or undefined if address is invalid */ export declare function validateAndParseAddress(address: string): string; /** * * @param result Result object from multicall * @param i index of value within Result, default 0 * @returns string representation of ith value in Result */ export declare const convertResultToString: (result?: Result, i?: number) => any; /** * * @param result Result object from multicall * @param i index of value within Result, default 0 * @returns address of ith value in Result */ export declare const convertResultToAddress: (result?: Result, i?: number) => Address; /** * * @param result Result object from multicall * @param i index of value within Result, default 0 * @returns BigNumber of ith value in Result */ export declare const convertResultToBigNumber: (result?: Result, i?: number) => BigNumber; /** * * @param result Result object from multicall * @param i index of value within Result, default 0 * @returns Number of ith value in Result */ export declare const convertResultToNumber: (result?: Result, i?: number) => number; /** * * @param txnHash Hash of transaction waiting to be mined * @param web3 web3 object * @returns status of the transaction (true = success, false = revert) */ export declare function waitForMinedTransaction(txnHash: string, web3: Web3): Promise; /** * * Merges two sorted arrays. * * @param arr1 sorted array * @param arr2 sorted array * @param comparator how to compare entries in the arrays * @returns One array in sorted order */ export declare function mergeArrays(arr1: t[], arr2: t[], comparator: (t1: t, t2: t) => number): t[]; export declare const applySlippage: (amount: BigNumber, slippage: number) => BigNumber; /** * * @param value string value to parse into a token value, this is the decimal adjusted value (i.e. in eth, not wei) * @param currency the corresponding token for the token amount * @returns TokenAmount object with the value parsed, or undefined if unable to parse */ export declare function tryParseTokenAmount(value?: string, currency?: Token): TokenAmount | undefined; /** * * @param timeframe * @returns Unix seconds of given timeframe. If parsing error, will return current timestamp in Unix seconds. */ export declare function convertTimeframeToUnixSeconds(timeframe: TimeFrame): number; export * from "./multicall";