UNPKG

sdk-utils

Version:

TEST TEST

69 lines (68 loc) 2.27 kB
/** * 对token授权 * @param token_address * @param type * @param callback */ export declare function approveToken(token_address: string, type: "deposit" | "invest", callback: (code: number, hash: string) => void): Promise<void>; /** * deposit买入 * @param token_address * @param amount * @param callback */ export declare function deposit(token_address: string, amount: string, callback: (code: number, hash: string) => void): Promise<void>; /** * withdraw 提出 * @param token_address * @param amount * @param callback */ export declare function withdraw(token_address: string, amount: string, callback: (code: number, hash: string) => void): Promise<void>; /** * 投资 * @param token0_address * @param token1_address * @param fee * @param amount0 * @param amount1 * @param leftPrice * @param rightPrice * @param callback */ export declare function invest(token0_address: string, token1_address: string, fee: string, amount0: string, amount1: string, leftPrice: string, rightPrice: string, callback: (code: number, hash: string) => void): Promise<void>; /** * 追加 * @param token0_address * @param token1_address * @param id * @param amount0 * @param amount1 * @param callback */ export declare function addInvest(token0_address: string, token1_address: string, id: string, amount0: string, amount1: string, callback: (code: number, hash: string) => void): Promise<void>; /** * 切仓 * @param token0_address * @param token1_address * @param id * @param amount0 * @param amount1 * @param leftPrice * @param rightPrice * @param hedge * @param callback */ export declare function switching(token0_address: string, token1_address: string, id: string, amount0: string, amount1: string, leftPrice: string, rightPrice: string, hedge: boolean, callback: (code: number, hash: string) => void): Promise<void>; /** * 撤资 * @param id * @param isclose * @param callback */ export declare function divest(id: string, isclose: boolean, callback: (code: number, hash: string) => void): void; /** * 创建账号(投资前先创建) * @param callback */ export declare function createAccount(callback: (code: number, hash: string) => void): void;