UNPKG

@paraswap/sdk

Version:
59 lines 1.97 kB
import type { ConstructFetchInput, RequestParameters } from '../../types'; export type DeltaPriceParams = { /** @description Source Token Address. Not Native Token */ srcToken: string; /** @description Destination Token Address */ destToken: string; /** @description srcToken amount in wei */ amount: string; /** @description Source Token Decimals */ srcDecimals: number; /** @description Destination Token Decimals */ destDecimals: number; /** @description User's Wallet Address */ userAddress?: string; /** @description Partner string. */ partner?: string; /** @description Destination Chain ID for Crosschain Orders */ destChainId?: number; }; export type DeltaPrice = { srcToken: string; destToken: string; srcAmount: string; destAmount: string; destAmountBeforeFee: string; gasCost: string; gasCostBeforeFee: string; gasCostUSD: string; gasCostUSDBeforeFee: string; srcUSD: string; destUSD: string; destUSDBeforeFee: string; partner: string; partnerFee: number; hmac: string; }; export type BridgePrice = DeltaPrice & { destTokenSrcChain: string; destAmountAfterBridge: string; destUSDAfterBridge: string; bridgeFee: string; bridgeFeeUSD: string; poolAddress: string; }; interface GetDeltaPrice { (options: DeltaPriceParams & { destChainId: number; }, requestParams?: RequestParameters): Promise<BridgePrice>; (options: DeltaPriceParams & { destChainId?: undefined; }, requestParams?: RequestParameters): Promise<DeltaPrice>; (options: DeltaPriceParams, requestParams?: RequestParameters): Promise<DeltaPrice | BridgePrice>; } export type GetDeltaPriceFunctions = { getDeltaPrice: GetDeltaPrice; }; export declare const constructGetDeltaPrice: ({ apiURL, chainId, fetcher, }: ConstructFetchInput) => GetDeltaPriceFunctions; export {}; //# sourceMappingURL=getDeltaPrice.d.ts.map