@cobaltx/sdk-v2
Version:
An SDK for building applications on top of CobaltX.
25 lines (22 loc) • 643 B
TypeScript
import { TxVersion } from '../../common/txTool/txType.js';
type SwapType = "BaseIn" | "BaseOut";
interface SwapParams {
inputMint: string;
outputMint: string;
amount: string;
slippage: number;
swapType: SwapType;
txVersion: TxVersion;
}
interface SwapResponse {
data?: any;
error?: string;
openTime?: number;
}
/**
* Computes swap details based on provided parameters
* @param params SwapParams object containing swap configuration
* @returns Promise<SwapResponse>
*/
declare function computeSwap(params: SwapParams): Promise<SwapResponse>;
export { SwapParams, SwapResponse, SwapType, computeSwap };