UNPKG

@dzapio/sdk

Version:

A TypeScript/JavaScript SDK for interacting with the DZap protocol, providing utilities for DeFi operations including Swaps, Bridges, and Zaps.

83 lines (82 loc) 2.52 kB
import { Fee, TradeQuote } from '../types'; export declare const calculateAmountUSD: (amountInWei: string, decimals: number, price: string) => string; export declare const calculateNetGasFeeUsd: (item: TradeQuote) => string; export declare const calculateNetAmountUsd: (item: TradeQuote) => string; export declare const calculateNetGasFee: (item: TradeQuote) => bigint; export declare const updateFee: (fee: Fee, tokensPrice: Record<number, Record<string, string | null>>) => { isUpdated: boolean; fee: { gasFee: { amountUSD: string; address: string; decimals: number; chainId: number; symbol: string; logo?: string; amount: string; included: boolean; }[]; providerFee: { amountUSD: string; address: string; decimals: number; chainId: number; symbol: string; logo?: string; amount: string; included: boolean; }[]; protocolFee: { amountUSD: string; address: string; decimals: number; chainId: number; symbol: string; logo?: string; amount: string; included: boolean; }[]; }; }; export declare const updatePath: (data: TradeQuote, tokensPrice: Record<number, Record<string, string | null>>) => { fee: { gasFee: { amountUSD: string; address: string; decimals: number; chainId: number; symbol: string; logo?: string; amount: string; included: boolean; }[]; providerFee: { amountUSD: string; address: string; decimals: number; chainId: number; symbol: string; logo?: string; amount: string; included: boolean; }[]; protocolFee: { amountUSD: string; address: string; decimals: number; chainId: number; symbol: string; logo?: string; amount: string; included: boolean; }[]; }; srcAmountUSD: string; destAmountUSD: string; type: string; exchange: import("../types").ProviderDetails; srcToken: import("../types").Token; srcAmount: string; destToken: import("../types").Token; destAmount: string; }[];