@dzapio/sdk
Version:
A TypeScript/JavaScript SDK for interacting with the DZap protocol, providing utilities for DeFi operations including Swaps, Bridges, and Zaps.
37 lines (36 loc) • 843 B
TypeScript
import { HexString, ProviderDetails } from 'src/types';
import { zapPathAction } from '../../zap/constants/path';
export type ZapPathAction = keyof typeof zapPathAction;
export type ZapPathAsset = {
chainId: number;
address: HexString;
symbol: string;
logo: string;
decimals: number;
price: string;
type: string;
name: string;
};
export type ZapFee = {
amount: string;
amountUSD: string;
asset: ZapPathAsset;
included: boolean;
};
export type ZapPath = {
action: ZapPathAction;
protocol: ProviderDetails;
fee: ZapFee[];
estimatedDuration: number;
input: {
asset: ZapPathAsset;
amount: string;
amountUSD: string;
}[];
output: {
asset: ZapPathAsset;
amount: string;
amountUSD: string;
dust?: boolean;
}[];
};