@dhedge/v2-sdk 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/pool.d.ts +99 -91
- package/dist/services/flatmoney/stableLp.d.ts +4 -4
- package/dist/services/odos/index.d.ts +1 -0
- package/dist/services/toros/completeWithdrawal.d.ts +7 -0
- package/dist/services/toros/easySwapper.d.ts +2 -2
- package/dist/services/toros/initWithdrawal.d.ts +3 -0
- package/dist/services/toros/retry.d.ts +5 -0
- package/dist/services/toros/swapData.d.ts +11 -0
- package/dist/types.d.ts +5 -0
- package/dist/utils/contract.d.ts +3 -2
- package/dist/v2-sdk.cjs.development.js +4398 -1435
- package/dist/v2-sdk.cjs.development.js.map +1 -1
- package/dist/v2-sdk.cjs.production.min.js +1 -1
- package/dist/v2-sdk.cjs.production.min.js.map +1 -1
- package/dist/v2-sdk.esm.js +4398 -1435
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/IAaveLendingPoolAssetGuard.json +645 -0
- package/src/abi/IEasySwapperV2.json +1507 -0
- package/src/abi/PoolManagerLogic.json +13 -0
- package/src/entities/pool.ts +253 -141
- package/src/services/flatmoney/stableLp.ts +27 -21
- package/src/services/odos/index.ts +1 -1
- package/src/services/toros/completeWithdrawal.ts +209 -0
- package/src/services/toros/easySwapper.ts +16 -84
- package/src/services/toros/initWithdrawal.ts +166 -0
- package/src/services/toros/retry.ts +28 -0
- package/src/services/toros/swapData.ts +70 -0
- package/src/test/constants.ts +1 -1
- package/src/test/pool.test.ts +77 -74
- package/src/test/toros.test.ts +10 -8
- package/src/types.ts +8 -0
- package/src/utils/contract.ts +71 -43
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const SWAPPER_ADDERSS = "0x4F754e0F0924afD74980886b0B479Fa1D7C58D0D";
|
|
2
|
+
export interface SwapParams {
|
|
3
|
+
srcAsset: string;
|
|
4
|
+
srcAmount: string;
|
|
5
|
+
dstAsset: string;
|
|
6
|
+
chainId: number;
|
|
7
|
+
from: string;
|
|
8
|
+
receiver: string;
|
|
9
|
+
slippage: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const getSwapDataViaOdos: ({ srcAsset, srcAmount, dstAsset, chainId, from, slippage }: SwapParams) => Promise<string>;
|
package/dist/types.d.ts
CHANGED
package/dist/utils/contract.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ethers, Network, Pool } from "..";
|
|
1
|
+
import { ethers, Network, Pool, SDKOptions } from "..";
|
|
2
2
|
export declare function call(provider: ethers.Signer, abi: any[], call: any[], options?: any): Promise<any>;
|
|
3
3
|
export declare function multicall<T>(network: Network, provider: ethers.Signer, abi: any[], calls: any[], options?: any, requireSuccess?: boolean): Promise<(T | null)[]>;
|
|
4
4
|
export declare class Multicaller {
|
|
@@ -12,4 +12,5 @@ export declare class Multicaller {
|
|
|
12
12
|
call(path: any, address: any, fn: any, params?: any): Multicaller;
|
|
13
13
|
execute(from?: any): Promise<any>;
|
|
14
14
|
}
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const isSdkOptionsBoolean: (sdkOptions: SDKOptions) => sdkOptions is boolean;
|
|
16
|
+
export declare const getPoolTxOrGasEstimate: (pool: Pool, args: any[], sdkOptions: SDKOptions) => Promise<any>;
|