PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/micro-eth-signer/lib/api
Просмотр файла: uniswap-v3.d.ts
import * as abi from '../web3.js';
import * as uni from './uniswap-common.js';
export declare const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000";
export declare const QUOTER_ADDRESS = "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
export declare const QUOTER_ABI: readonly [{
readonly type: "function";
readonly name: "quoteExactInput";
readonly inputs: readonly [{
readonly name: "path";
readonly type: "bytes";
}, {
readonly name: "amountIn";
readonly type: "uint256";
}];
readonly outputs: readonly [{
readonly name: "amountOut";
readonly type: "uint256";
}];
}, {
readonly type: "function";
readonly name: "quoteExactInputSingle";
readonly inputs: readonly [{
readonly name: "tokenIn";
readonly type: "address";
}, {
readonly name: "tokenOut";
readonly type: "address";
}, {
readonly name: "fee";
readonly type: "uint24";
}, {
readonly name: "amountIn";
readonly type: "uint256";
}, {
readonly name: "sqrtPriceLimitX96";
readonly type: "uint160";
}];
readonly outputs: readonly [{
readonly name: "amountOut";
readonly type: "uint256";
}];
}, {
readonly type: "function";
readonly name: "quoteExactOutput";
readonly inputs: readonly [{
readonly name: "path";
readonly type: "bytes";
}, {
readonly name: "amountOut";
readonly type: "uint256";
}];
readonly outputs: readonly [{
readonly name: "amountIn";
readonly type: "uint256";
}];
}, {
readonly type: "function";
readonly name: "quoteExactOutputSingle";
readonly inputs: readonly [{
readonly name: "tokenIn";
readonly type: "address";
}, {
readonly name: "tokenOut";
readonly type: "address";
}, {
readonly name: "fee";
readonly type: "uint24";
}, {
readonly name: "amountOut";
readonly type: "uint256";
}, {
readonly name: "sqrtPriceLimitX96";
readonly type: "uint160";
}];
readonly outputs: readonly [{
readonly name: "amountIn";
readonly type: "uint256";
}];
}];
export declare const Fee: Record<string, number>;
type Route = {
path?: abi.Bytes;
fee?: number;
amountIn?: bigint;
amountOut?: bigint;
p?: any;
};
export declare function bestPath(net: abi.Web3API, a: string, b: string, amountIn?: bigint, amountOut?: bigint): Promise<Route>;
export type TxOpt = {
sqrtPriceLimitX96?: bigint;
slippagePercent: number;
ttl: number;
deadline?: number;
fee?: {
fee: number;
to: string;
};
};
export declare function txData(to: string, input: string, output: string, route: Route, amountIn?: bigint, amountOut?: bigint, opt?: TxOpt): {
to: string;
value: bigint;
data: Uint8Array;
allowance: {
token: string;
amount: bigint;
} | undefined;
};
export declare class UniswapV3 extends uni.UniswapAbstract {
name: string;
contract: string;
bestPath(fromCoin: string, toCoin: string, inputAmount: bigint): Promise<Route>;
txData(toAddress: string, fromCoin: string, toCoin: string, path: any, inputAmount?: bigint, outputAmount?: bigint, opt?: uni.SwapOpt): any;
}
export {};
//# sourceMappingURL=uniswap-v3.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!