UNPKG

@nekoproject/swap

Version:

Cross-chain Swap Token

79 lines 2.07 kB
import { Wallet } from '@nekoproject/wallets'; import { BaseToken, SPLToken } from '@nekoproject/tokens'; export declare type CreateOrder = { wallet_address: string; slippage: number; srcAmount: string; destAmount?: string; destToken: BaseToken; srcToken: BaseToken; }; export declare type SetApiParams = { createOrder: string; buildTransaction: string; }; export declare type SwapOrderRequest = {}; export declare type SPLCreateBuildSwap = CreateOrder & {}; export declare type SPLSwapTransaction = { setupTransaction?: string; swapTransaction: string; cleanupTransaction?: string; }; export declare type SPLBuildSwapTransaction = { inAmount: string; outAmount: string; transaction: SPLSwapTransaction; }; export declare type BSCSwapOrderRequest = SwapOrderRequest & { slippage?: number; id: string; src_token: string; src_amount: string; src_decimals: number; src_usd: string; dest_token: string; dest_amount: string; dest_decimals: number; dest_usd: string; gas_cost_usd: string; gas_cost: string; expired_at: string; updated_at: string; created_at: string; token_transfer_proxy: string; network: string; }; export declare type ETHSwapOrderRequest = BSCSwapOrderRequest; export declare type SPLSwapOrderRequest = BSCSwapOrderRequest & { transaction: SPLSwapTransaction; }; export declare type SwapConfig = { cluster: 'devnet' | 'testnet' | 'mainnet-beta'; fee: Fee; slippage?: number; }; export declare type Fee = { feeOwner: string; fee: number; }; export declare type SwapOrder = { inputToken: SPLToken; outputToken: SPLToken; amount: number; slippage?: number; }; export declare type AggParams = { user: Wallet; }; export declare type SwapRequest = { aggregator: any; routes: any; }; export declare type SwapResponse = { tx?: string; inputAddress?: string; outputAddress?: string; inputAmount?: number; outputAmount?: number; }; //# sourceMappingURL=types.d.ts.map