/** * Types */ /** * IDs of Currently Supported Chains */ export declare enum ChainId { Celo = 42220, Alfajores = 44787 } /** * Represents an Etherem 20B address */ export declare type Address = string; export declare type BigNumberString = string; export interface TransactionOptions { feeCurrency?: Address; } /** * Interval type used for historical queries */ export declare enum Interval { FiveMinute = 0, FifteenMinute = 1, ThirtyMinute = 2, Hour = 3, Day = 4 } export interface CustomRPC { http?: string; wss?: string; } declare type Time = "hour" | "day" | "week" | "month" | "year"; /** * Timeframe type used for historical queries */ export declare type TimeFrame = Time | `${number} ${Time}s` | "all"; export declare enum Rounding { ROUND_DOWN = 0, ROUND_HALF_UP = 1, ROUND_UP = 2 } export interface PageInfo { currentPage: number; totalPages: number; perPage: number; total: number; } export declare enum DateRange { "1H" = 0, "1D" = 1, "1W" = 7, "1M" = 30, "1Y" = 365, ALL = -1 } /** * API Endpoints */ export declare const API_BASE = "https://us-central1-node-wallet.cloudfunctions.net"; export declare const WALLET_SERVICE_URL: string; export declare const formatAllPricesQuery: () => string; export declare const formatHistoricalPricesQuery: (address: string, interval: number, timeframe: string, currency: string) => string; export declare const formatHeader: (apiKey: string) => { "x-api-key": string; }; export declare const formatRouteRequest: () => string; export declare const formatDepositRequest: (tokenIn: Address, amountIn: BigNumberString, tokenOut: Address) => string; export declare const formatWithdrawRequest: (tokenIn: Address, amountIn: BigNumberString, tokenOut?: Address) => string; export declare const chainsSupportingAlternateGas: Set; /** * Chain-Specific Values */ export declare const DEFAULT_RPC = "https://necessary-muddy-research.celo-mainnet.discover.quiknode.pro/3577f3bb994031ee8c5dfa75313b24bfa4cffd1e/"; export declare const DEFAULT_CHAIN = ChainId.Celo; /** * RPC Links for a given chain */ export declare const CHAINS_TO_RPC: { [id in ChainId]: { http: string; wss?: string; }; }; /** * Overrides the RPC for a given chain * * @param chain ChainId to override the RPC for * @param rpc https and wss rpc endpoints to override * @returns */ export declare const OverrideRPC: (chain: ChainId, rpc: Partial) => { http: string; wss?: string | undefined; }; export declare const MULTICALL_NETWORKS: Record; export declare const WALLET_FACTORY_ADDRESS: { [chain in ChainId]: Address; }; /** * Type Translations */ export declare const dateRangeToReadable: { [range in DateRange]: string; }; export declare const dateRangeToDefaultInterval: { [range in DateRange]: number; }; export declare const getNodeApiKey: () => string; export declare const setNodeApiKey: (s: string) => string; export {};