import type { AxiosStatic } from 'axios'; import type Web3 from 'web3'; import type { SendOptions } from 'web3-eth-contract'; import type { Contract as EthersContract } from '@ethersproject/contracts'; import type { Signer } from '@ethersproject/abstract-signer'; import type { BaseProvider } from '@ethersproject/providers'; import type { Address, OptimalRate } from 'paraswap-core'; import { SwapSide } from '../constants'; import { AllSDKMethods, PriceString } from '..'; import type { RateOptions } from '../rates'; import type { BuildOptions, TransactionParams } from '../transaction'; import type { AddressOrSymbol, Token } from '../token'; import type { Allowance } from '../balance'; import type { FetcherFunction } from '../types'; export declare type APIError = { message: string; status?: number; data?: any; }; interface EthersProviderDeps { providerOrSigner: BaseProvider | Signer; Contract: typeof EthersContract; } /** @deprecated */ export declare class ParaSwap { private network; private apiURL; web3Provider?: Web3 | undefined; ethersDeps?: EthersProviderDeps | undefined; account?: string | undefined; axios?: AxiosStatic | undefined; fetch?: typeof fetch | undefined; sdk: Partial; fetcher: FetcherFunction; constructor(network?: number, apiURL?: string, web3Provider?: Web3 | undefined, ethersDeps?: EthersProviderDeps | undefined, // need to be a provider with signer for approve requests account?: string | undefined, axios?: AxiosStatic | undefined, fetch?: typeof globalThis.fetch | undefined); private handleAPIError; setWeb3Provider(web3Provider: Web3, account?: string): this; setEthersProvider(ethersDeps: EthersProviderDeps, account?: string): this; getTokens(): Promise; getAdapters(): Promise; getRateByRoute(route: AddressOrSymbol[], amount: PriceString, userAddress?: Address, side?: SwapSide, options?: RateOptions, srcDecimals?: number, destDecimals?: number): Promise; getRate(srcToken: AddressOrSymbol, destToken: AddressOrSymbol, amount: PriceString, userAddress?: Address, side?: SwapSide, options?: RateOptions, srcDecimals?: number, destDecimals?: number): Promise; buildTx(srcToken: Address, destToken: Address, srcAmount: PriceString, destAmount: PriceString, priceRoute: OptimalRate, userAddress: Address, partner?: string, partnerAddress?: string, partnerFeeBps?: number, receiver?: Address, options?: BuildOptions, srcDecimals?: number, destDecimals?: number, permit?: string, deadline?: string): Promise; getTokenTransferProxy(_provider?: any): Promise
; getAllowances(userAddress: Address, tokenAddresses: Address[]): Promise; getAllowance(userAddress: Address, tokenAddress: Address): Promise; approveTokenBulk(amount: PriceString, userAddress: Address, tokenAddresses: Address[], /** @deprecated */ _provider?: any): Promise; approveToken(amount: PriceString, userAddress: Address, tokenAddress: Address, /** @deprecated */ _provider?: any, // not used, can't detect if Ethers or Web3 provider without importing them sendOptions?: Omit): Promise; getMarketNames(): Promise; getBalance(userAddress: Address, token: AddressOrSymbol): Promise; getBalances(userAddress: Address): Promise; } export {}; //# sourceMappingURL=index.d.ts.map