UNPKG

@yfi/sdk

Version:

Interaction framework for the yearn protocol

34 lines (33 loc) 1.47 kB
import { BigNumber } from "@ethersproject/bignumber"; import { Address, Integer, Token, Usdc } from "./types"; export declare const ZeroAddress = "0x0000000000000000000000000000000000000000"; export declare const EthAddress = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; export declare const WethAddress = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"; export declare const WrappedFantomAddress = "0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83"; export declare const SUPPORTED_ZAP_OUT_ADDRESSES_MAINNET: { ETH: string; DAI: string; USDC: string; USDT: string; WBTC: string; }; export declare const FANTOM_TOKEN: Token; export declare const ETH_TOKEN: Token; export declare const WETH_TOKEN: Token; export declare function isNativeToken(address: Address): boolean; export declare function handleHttpError(response: Response): Promise<Response>; export declare function usdc(usd: unknown): Usdc; export declare function int(value: BigNumber): Integer; export declare function chunkArray<T>(array: T[], size: number): T[][]; export declare function convertSecondsMillisOrMicrosToMillis(timestamp: string | number): number; /** * Merges array b into a by address removing a duplicates from b * * @param a higher priority array * @param b lower priority array * * @returns combined arrays by address without duplicates */ export declare function mergeByAddress<T extends { address: Address; }>(a: T[], b: T[]): T[];