@uniswap/universal-router-sdk 4.22.0 → 4.24.0
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/README.md +282 -0
- package/dist/entities/actions/across.d.ts +21 -0
- package/dist/entities/actions/index.d.ts +1 -0
- package/dist/entities/actions/uniswap.d.ts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/swapRouter.d.ts +46 -2
- package/dist/universal-router-sdk.cjs.development.js +298 -15
- package/dist/universal-router-sdk.cjs.development.js.map +1 -1
- package/dist/universal-router-sdk.cjs.production.min.js +1 -1
- package/dist/universal-router-sdk.cjs.production.min.js.map +1 -1
- package/dist/universal-router-sdk.esm.js +294 -16
- package/dist/universal-router-sdk.esm.js.map +1 -1
- package/dist/utils/constants.d.ts +2 -1
- package/dist/utils/eip712.d.ts +17 -0
- package/dist/utils/routerCommands.d.ts +9 -1
- package/package.json +3 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TypedDataDomain, TypedDataField } from '@ethersproject/abstract-signer';
|
|
2
|
+
export declare const EIP712_DOMAIN_NAME = "UniversalRouter";
|
|
3
|
+
export declare const EIP712_DOMAIN_VERSION = "2";
|
|
4
|
+
export declare const EXECUTE_SIGNED_TYPES: Record<string, TypedDataField[]>;
|
|
5
|
+
/**
|
|
6
|
+
* Generate EIP712 domain for Universal Router
|
|
7
|
+
*/
|
|
8
|
+
export declare function getUniversalRouterDomain(chainId: number, verifyingContract: string): TypedDataDomain;
|
|
9
|
+
/**
|
|
10
|
+
* Generate a random nonce for signed execution
|
|
11
|
+
* Uses ethers.utils.randomBytes for secure randomness
|
|
12
|
+
*/
|
|
13
|
+
export declare function generateNonce(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Sentinel value to skip nonce checking (allows signature replay)
|
|
16
|
+
*/
|
|
17
|
+
export declare const NONCE_SKIP_CHECK: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AcrossV4DepositV3Params } from '../entities/actions/across';
|
|
1
2
|
/**
|
|
2
3
|
* CommandTypes
|
|
3
4
|
* @description Flags that modify a command's execution
|
|
@@ -23,7 +24,8 @@ export declare enum CommandType {
|
|
|
23
24
|
V3_POSITION_MANAGER_CALL = 18,
|
|
24
25
|
V4_INITIALIZE_POOL = 19,
|
|
25
26
|
V4_POSITION_MANAGER_CALL = 20,
|
|
26
|
-
EXECUTE_SUB_PLAN = 33
|
|
27
|
+
EXECUTE_SUB_PLAN = 33,
|
|
28
|
+
ACROSS_V4_DEPOSIT_V3 = 64
|
|
27
29
|
}
|
|
28
30
|
export declare enum Subparser {
|
|
29
31
|
V3PathExactIn = 0,
|
|
@@ -56,6 +58,12 @@ export declare class RoutePlanner {
|
|
|
56
58
|
constructor();
|
|
57
59
|
addSubPlan(subplan: RoutePlanner): RoutePlanner;
|
|
58
60
|
addCommand(type: CommandType, parameters: any[], allowRevert?: boolean): RoutePlanner;
|
|
61
|
+
/**
|
|
62
|
+
* Add Across bridge deposit command for cross-chain bridging
|
|
63
|
+
* @param params AcrossV4DepositV3Params containing bridge parameters
|
|
64
|
+
* @returns RoutePlanner instance for chaining
|
|
65
|
+
*/
|
|
66
|
+
addAcrossBridge(params: AcrossV4DepositV3Params): RoutePlanner;
|
|
59
67
|
}
|
|
60
68
|
export declare type RouterCommand = {
|
|
61
69
|
type: CommandType;
|
package/package.json
CHANGED
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"@uniswap/permit2-sdk": "^1.3.0",
|
|
34
34
|
"@uniswap/router-sdk": "^2.1.0",
|
|
35
35
|
"@uniswap/sdk-core": "^7.8.0",
|
|
36
|
-
"@uniswap/universal-router": "2.
|
|
36
|
+
"@uniswap/universal-router": "2.1.0",
|
|
37
37
|
"@uniswap/v2-core": "^1.0.1",
|
|
38
38
|
"@uniswap/v2-sdk": "^4.16.0",
|
|
39
39
|
"@uniswap/v3-core": "1.0.0",
|
|
40
40
|
"@uniswap/v3-sdk": "^3.26.0",
|
|
41
|
-
"@uniswap/v4-sdk": "^1.
|
|
41
|
+
"@uniswap/v4-sdk": "^1.23.0",
|
|
42
42
|
"bignumber.js": "^9.0.2",
|
|
43
43
|
"ethers": "^5.7.0"
|
|
44
44
|
},
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"hoistingLimits": "workspaces"
|
|
102
102
|
},
|
|
103
103
|
"sideEffects": false,
|
|
104
|
-
"version": "4.
|
|
104
|
+
"version": "4.24.0"
|
|
105
105
|
}
|