UNPKG

@xswap-link/sdk

Version:
41 lines (33 loc) 721 B
interface BaseRoute { estAmountOut: string; minAmountOut: string; xSwapFees: XSwapFees; message?: string; } export interface EVMRoute extends BaseRoute { ecosystem: "evm"; transactions: Transactions; } export interface SolanaRoute extends BaseRoute { ecosystem: "solana"; swapTransaction: string; } export type UnifiedRoute = EVMRoute | SolanaRoute; export type Transactions = { approve?: TransactionRequest; swap: TransactionRequest; }; export type TransactionRequest = { to: string; data: string; value: string; }; export type XSwapFees = { ccipFee?: string; xSwapFee: XSwapFee; expressDeliveryFee?: string; }; export type XSwapFee = { tokenFee: string; nativeFee: string; };