@eulerxyz/euler-v2-sdk 0.2.2-beta → 0.2.4-beta
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 +14 -11
- package/dist/src/entities/Account.d.ts +1 -1
- package/dist/src/entities/Account.d.ts.map +1 -1
- package/dist/src/entities/Account.js +28 -38
- package/dist/src/entities/Account.js.map +1 -1
- package/dist/src/entities/ERC4626Vault.d.ts +8 -0
- package/dist/src/entities/ERC4626Vault.d.ts.map +1 -1
- package/dist/src/entities/ERC4626Vault.js +4 -0
- package/dist/src/entities/ERC4626Vault.js.map +1 -1
- package/dist/src/entities/EVault.d.ts +6 -0
- package/dist/src/entities/EVault.d.ts.map +1 -1
- package/dist/src/entities/EVault.js +11 -0
- package/dist/src/entities/EVault.js.map +1 -1
- package/dist/src/entities/Portfolio.d.ts +3 -3
- package/dist/src/entities/Portfolio.d.ts.map +1 -1
- package/dist/src/entities/Portfolio.js +8 -4
- package/dist/src/entities/Portfolio.js.map +1 -1
- package/dist/src/entities/SecuritizeCollateralVault.d.ts +2 -0
- package/dist/src/entities/SecuritizeCollateralVault.d.ts.map +1 -1
- package/dist/src/entities/SecuritizeCollateralVault.js +4 -0
- package/dist/src/entities/SecuritizeCollateralVault.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/sdk/buildSDK.d.ts +8 -0
- package/dist/src/sdk/buildSDK.d.ts.map +1 -1
- package/dist/src/sdk/buildSDK.js +309 -101
- package/dist/src/sdk/buildSDK.js.map +1 -1
- package/dist/src/sdk/config.d.ts +8 -2
- package/dist/src/sdk/config.d.ts.map +1 -1
- package/dist/src/sdk/config.js +6 -1
- package/dist/src/sdk/config.js.map +1 -1
- package/dist/src/sdk/sdk.d.ts +3 -0
- package/dist/src/sdk/sdk.d.ts.map +1 -1
- package/dist/src/sdk/sdk.js +2 -0
- package/dist/src/sdk/sdk.js.map +1 -1
- package/dist/src/services/accountService/accountServiceConfig.d.ts +2 -2
- package/dist/src/services/accountService/accountServiceConfig.d.ts.map +1 -1
- package/dist/src/services/accountService/adapters/accountV3Adapter/accountV3Adapter.d.ts +2 -2
- package/dist/src/services/accountService/adapters/accountV3Adapter/accountV3Adapter.d.ts.map +1 -1
- package/dist/src/services/accountService/adapters/accountV3Adapter/accountV3Adapter.js +3 -3
- package/dist/src/services/accountService/adapters/accountV3Adapter/accountV3Adapter.js.map +1 -1
- package/dist/src/services/executionService/abis/cowSwapWrapperAbi.d.ts +199 -0
- package/dist/src/services/executionService/abis/cowSwapWrapperAbi.d.ts.map +1 -0
- package/dist/src/services/executionService/abis/cowSwapWrapperAbi.js +95 -0
- package/dist/src/services/executionService/abis/cowSwapWrapperAbi.js.map +1 -0
- package/dist/src/services/executionService/cowExecutor.d.ts +53 -0
- package/dist/src/services/executionService/cowExecutor.d.ts.map +1 -0
- package/dist/src/services/executionService/cowExecutor.js +390 -0
- package/dist/src/services/executionService/cowExecutor.js.map +1 -0
- package/dist/src/services/executionService/cowSwapHelpers.d.ts +254 -0
- package/dist/src/services/executionService/cowSwapHelpers.d.ts.map +1 -0
- package/dist/src/services/executionService/cowSwapHelpers.js +524 -0
- package/dist/src/services/executionService/cowSwapHelpers.js.map +1 -0
- package/dist/src/services/executionService/execute.d.ts +18 -3
- package/dist/src/services/executionService/execute.d.ts.map +1 -1
- package/dist/src/services/executionService/execute.js +9 -2
- package/dist/src/services/executionService/execute.js.map +1 -1
- package/dist/src/services/executionService/executionService.d.ts +53 -2
- package/dist/src/services/executionService/executionService.d.ts.map +1 -1
- package/dist/src/services/executionService/executionService.js +368 -15
- package/dist/src/services/executionService/executionService.js.map +1 -1
- package/dist/src/services/executionService/executionServiceTypes.d.ts +130 -3
- package/dist/src/services/executionService/executionServiceTypes.d.ts.map +1 -1
- package/dist/src/services/executionService/executionServiceTypes.js +13 -0
- package/dist/src/services/executionService/executionServiceTypes.js.map +1 -1
- package/dist/src/services/executionService/index.d.ts +5 -3
- package/dist/src/services/executionService/index.d.ts.map +1 -1
- package/dist/src/services/executionService/index.js +3 -2
- package/dist/src/services/executionService/index.js.map +1 -1
- package/dist/src/services/executionService/simulate.d.ts +1 -1
- package/dist/src/services/executionService/simulate.d.ts.map +1 -1
- package/dist/src/services/executionService/simulate.js +25 -9
- package/dist/src/services/executionService/simulate.js.map +1 -1
- package/dist/src/services/priceService/backendClient.d.ts +3 -1
- package/dist/src/services/priceService/backendClient.d.ts.map +1 -1
- package/dist/src/services/priceService/backendClient.js +30 -12
- package/dist/src/services/priceService/backendClient.js.map +1 -1
- package/dist/src/services/reulLockService/index.d.ts +3 -0
- package/dist/src/services/reulLockService/index.d.ts.map +1 -0
- package/dist/src/services/reulLockService/index.js +2 -0
- package/dist/src/services/reulLockService/index.js.map +1 -0
- package/dist/src/services/reulLockService/reulLockService.d.ts +82 -0
- package/dist/src/services/reulLockService/reulLockService.d.ts.map +1 -0
- package/dist/src/services/reulLockService/reulLockService.js +120 -0
- package/dist/src/services/reulLockService/reulLockService.js.map +1 -0
- package/dist/src/services/reulLockService/reulLockServiceTypes.d.ts +41 -0
- package/dist/src/services/reulLockService/reulLockServiceTypes.d.ts.map +1 -0
- package/dist/src/services/reulLockService/reulLockServiceTypes.js +2 -0
- package/dist/src/services/reulLockService/reulLockServiceTypes.js.map +1 -0
- package/dist/src/services/rewardsService/adapters/rewardsDirectAdapter/rewardsDirectAdapter.d.ts.map +1 -1
- package/dist/src/services/rewardsService/adapters/rewardsDirectAdapter/rewardsDirectAdapter.js +93 -5
- package/dist/src/services/rewardsService/adapters/rewardsDirectAdapter/rewardsDirectAdapter.js.map +1 -1
- package/dist/src/services/rewardsService/rewardsService.d.ts +1 -7
- package/dist/src/services/rewardsService/rewardsService.d.ts.map +1 -1
- package/dist/src/services/rewardsService/rewardsService.js +5 -130
- package/dist/src/services/rewardsService/rewardsService.js.map +1 -1
- package/dist/src/services/rewardsService/rewardsServiceTypes.d.ts +13 -2
- package/dist/src/services/rewardsService/rewardsServiceTypes.d.ts.map +1 -1
- package/dist/src/services/swapService/index.d.ts +2 -2
- package/dist/src/services/swapService/index.d.ts.map +1 -1
- package/dist/src/services/swapService/index.js.map +1 -1
- package/dist/src/services/swapService/swapService.d.ts +15 -0
- package/dist/src/services/swapService/swapService.d.ts.map +1 -1
- package/dist/src/services/swapService/swapService.js +217 -7
- package/dist/src/services/swapService/swapService.js.map +1 -1
- package/dist/src/services/swapService/swapServiceTypes.d.ts +33 -0
- package/dist/src/services/swapService/swapServiceTypes.d.ts.map +1 -1
- package/dist/src/services/vaults/eVaultService/adapters/eVaultV3Adapter/eVaultV3AdapterConversions.d.ts.map +1 -1
- package/dist/src/services/vaults/eVaultService/adapters/eVaultV3Adapter/eVaultV3AdapterConversions.js +103 -140
- package/dist/src/services/vaults/eVaultService/adapters/eVaultV3Adapter/eVaultV3AdapterConversions.js.map +1 -1
- package/dist/src/services/vaults/eVaultService/adapters/eVaultV3Adapter/eVaultV3AdapterTypes.d.ts +33 -33
- package/dist/src/services/vaults/eVaultService/adapters/eVaultV3Adapter/eVaultV3AdapterTypes.d.ts.map +1 -1
- package/dist/src/services/vaults/eVaultService/eVaultServiceConfig.d.ts +2 -2
- package/dist/src/services/vaults/eVaultService/eVaultServiceConfig.d.ts.map +1 -1
- package/dist/src/services/vaults/eulerEarnService/adapters/eulerEarnV3Adapter.d.ts +9 -9
- package/dist/src/services/vaults/eulerEarnService/adapters/eulerEarnV3Adapter.d.ts.map +1 -1
- package/dist/src/services/vaults/eulerEarnService/adapters/eulerEarnV3Adapter.js +10 -10
- package/dist/src/services/vaults/eulerEarnService/adapters/eulerEarnV3Adapter.js.map +1 -1
- package/dist/src/services/vaults/eulerEarnService/eulerEarnServiceConfig.d.ts +2 -2
- package/dist/src/services/vaults/eulerEarnService/eulerEarnServiceConfig.d.ts.map +1 -1
- package/dist/src/utils/accountComputations.d.ts.map +1 -1
- package/dist/src/utils/accountComputations.js +4 -2
- package/dist/src/utils/accountComputations.js.map +1 -1
- package/dist/src/utils/eulerLabels.d.ts.map +1 -1
- package/dist/src/utils/eulerLabels.js +4 -1
- package/dist/src/utils/eulerLabels.js.map +1 -1
- package/dist/src/utils/fallbackAdapter.d.ts +69 -0
- package/dist/src/utils/fallbackAdapter.d.ts.map +1 -0
- package/dist/src/utils/fallbackAdapter.js +139 -0
- package/dist/src/utils/fallbackAdapter.js.map +1 -0
- package/dist/src/utils/parsing.d.ts +17 -1
- package/dist/src/utils/parsing.d.ts.map +1 -1
- package/dist/src/utils/parsing.js +39 -0
- package/dist/src/utils/parsing.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export declare const OPEN_POSITION_PARAMS_COMPONENTS: readonly [{
|
|
2
|
+
readonly name: "owner";
|
|
3
|
+
readonly type: "address";
|
|
4
|
+
}, {
|
|
5
|
+
readonly name: "account";
|
|
6
|
+
readonly type: "address";
|
|
7
|
+
}, {
|
|
8
|
+
readonly name: "deadline";
|
|
9
|
+
readonly type: "uint256";
|
|
10
|
+
}, {
|
|
11
|
+
readonly name: "collateralVault";
|
|
12
|
+
readonly type: "address";
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "borrowVault";
|
|
15
|
+
readonly type: "address";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "collateralAmount";
|
|
18
|
+
readonly type: "uint256";
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "borrowAmount";
|
|
21
|
+
readonly type: "uint256";
|
|
22
|
+
}];
|
|
23
|
+
export declare const OPEN_POSITION_WRAPPER_ABI: readonly [{
|
|
24
|
+
readonly inputs: readonly [{
|
|
25
|
+
readonly components: readonly [{
|
|
26
|
+
readonly name: "owner";
|
|
27
|
+
readonly type: "address";
|
|
28
|
+
}, {
|
|
29
|
+
readonly name: "account";
|
|
30
|
+
readonly type: "address";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "deadline";
|
|
33
|
+
readonly type: "uint256";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "collateralVault";
|
|
36
|
+
readonly type: "address";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "borrowVault";
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "collateralAmount";
|
|
42
|
+
readonly type: "uint256";
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: "borrowAmount";
|
|
45
|
+
readonly type: "uint256";
|
|
46
|
+
}];
|
|
47
|
+
readonly name: "params";
|
|
48
|
+
readonly type: "tuple";
|
|
49
|
+
}];
|
|
50
|
+
readonly name: "encodePermitData";
|
|
51
|
+
readonly outputs: readonly [{
|
|
52
|
+
readonly name: "";
|
|
53
|
+
readonly type: "bytes";
|
|
54
|
+
}];
|
|
55
|
+
readonly stateMutability: "view";
|
|
56
|
+
readonly type: "function";
|
|
57
|
+
}];
|
|
58
|
+
export declare const COLLATERAL_SWAP_PARAMS_COMPONENTS: readonly [{
|
|
59
|
+
readonly name: "owner";
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "account";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "deadline";
|
|
66
|
+
readonly type: "uint256";
|
|
67
|
+
}, {
|
|
68
|
+
readonly name: "fromVault";
|
|
69
|
+
readonly type: "address";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "toVault";
|
|
72
|
+
readonly type: "address";
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "fromAmount";
|
|
75
|
+
readonly type: "uint256";
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "disableSourceCollateral";
|
|
78
|
+
readonly type: "bool";
|
|
79
|
+
}];
|
|
80
|
+
export declare const COLLATERAL_SWAP_WRAPPER_ABI: readonly [{
|
|
81
|
+
readonly inputs: readonly [{
|
|
82
|
+
readonly components: readonly [{
|
|
83
|
+
readonly name: "owner";
|
|
84
|
+
readonly type: "address";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "account";
|
|
87
|
+
readonly type: "address";
|
|
88
|
+
}, {
|
|
89
|
+
readonly name: "deadline";
|
|
90
|
+
readonly type: "uint256";
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "fromVault";
|
|
93
|
+
readonly type: "address";
|
|
94
|
+
}, {
|
|
95
|
+
readonly name: "toVault";
|
|
96
|
+
readonly type: "address";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "fromAmount";
|
|
99
|
+
readonly type: "uint256";
|
|
100
|
+
}, {
|
|
101
|
+
readonly name: "disableSourceCollateral";
|
|
102
|
+
readonly type: "bool";
|
|
103
|
+
}];
|
|
104
|
+
readonly name: "params";
|
|
105
|
+
readonly type: "tuple";
|
|
106
|
+
}];
|
|
107
|
+
readonly name: "encodePermitData";
|
|
108
|
+
readonly outputs: readonly [{
|
|
109
|
+
readonly name: "";
|
|
110
|
+
readonly type: "bytes";
|
|
111
|
+
}];
|
|
112
|
+
readonly stateMutability: "view";
|
|
113
|
+
readonly type: "function";
|
|
114
|
+
}];
|
|
115
|
+
export declare const CLOSE_POSITION_PARAMS_COMPONENTS: readonly [{
|
|
116
|
+
readonly name: "owner";
|
|
117
|
+
readonly type: "address";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "account";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "deadline";
|
|
123
|
+
readonly type: "uint256";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "borrowVault";
|
|
126
|
+
readonly type: "address";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "collateralVault";
|
|
129
|
+
readonly type: "address";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "collateralAmount";
|
|
132
|
+
readonly type: "uint256";
|
|
133
|
+
}];
|
|
134
|
+
export declare const CLOSE_POSITION_WRAPPER_ABI: readonly [{
|
|
135
|
+
readonly inputs: readonly [{
|
|
136
|
+
readonly components: readonly [{
|
|
137
|
+
readonly name: "owner";
|
|
138
|
+
readonly type: "address";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "account";
|
|
141
|
+
readonly type: "address";
|
|
142
|
+
}, {
|
|
143
|
+
readonly name: "deadline";
|
|
144
|
+
readonly type: "uint256";
|
|
145
|
+
}, {
|
|
146
|
+
readonly name: "borrowVault";
|
|
147
|
+
readonly type: "address";
|
|
148
|
+
}, {
|
|
149
|
+
readonly name: "collateralVault";
|
|
150
|
+
readonly type: "address";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "collateralAmount";
|
|
153
|
+
readonly type: "uint256";
|
|
154
|
+
}];
|
|
155
|
+
readonly name: "params";
|
|
156
|
+
readonly type: "tuple";
|
|
157
|
+
}];
|
|
158
|
+
readonly name: "encodePermitData";
|
|
159
|
+
readonly outputs: readonly [{
|
|
160
|
+
readonly name: "";
|
|
161
|
+
readonly type: "bytes";
|
|
162
|
+
}];
|
|
163
|
+
readonly stateMutability: "view";
|
|
164
|
+
readonly type: "function";
|
|
165
|
+
}, {
|
|
166
|
+
readonly inputs: readonly [{
|
|
167
|
+
readonly name: "owner";
|
|
168
|
+
readonly type: "address";
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "subaccount";
|
|
171
|
+
readonly type: "address";
|
|
172
|
+
}];
|
|
173
|
+
readonly name: "getInbox";
|
|
174
|
+
readonly outputs: readonly [{
|
|
175
|
+
readonly name: "";
|
|
176
|
+
readonly type: "address";
|
|
177
|
+
}];
|
|
178
|
+
readonly stateMutability: "nonpayable";
|
|
179
|
+
readonly type: "function";
|
|
180
|
+
}, {
|
|
181
|
+
readonly inputs: readonly [{
|
|
182
|
+
readonly name: "owner";
|
|
183
|
+
readonly type: "address";
|
|
184
|
+
}, {
|
|
185
|
+
readonly name: "subaccount";
|
|
186
|
+
readonly type: "address";
|
|
187
|
+
}];
|
|
188
|
+
readonly name: "getInboxAddressAndDomainSeparator";
|
|
189
|
+
readonly outputs: readonly [{
|
|
190
|
+
readonly name: "";
|
|
191
|
+
readonly type: "address";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "";
|
|
194
|
+
readonly type: "bytes32";
|
|
195
|
+
}];
|
|
196
|
+
readonly stateMutability: "view";
|
|
197
|
+
readonly type: "function";
|
|
198
|
+
}];
|
|
199
|
+
//# sourceMappingURL=cowSwapWrapperAbi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cowSwapWrapperAbi.d.ts","sourceRoot":"","sources":["../../../../../src/services/executionService/abis/cowSwapWrapperAbi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;EAQlC,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc5B,CAAC;AAEX,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;EAQpC,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc9B,CAAC;AAEX,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC7B,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export const OPEN_POSITION_PARAMS_COMPONENTS = [
|
|
2
|
+
{ name: "owner", type: "address" },
|
|
3
|
+
{ name: "account", type: "address" },
|
|
4
|
+
{ name: "deadline", type: "uint256" },
|
|
5
|
+
{ name: "collateralVault", type: "address" },
|
|
6
|
+
{ name: "borrowVault", type: "address" },
|
|
7
|
+
{ name: "collateralAmount", type: "uint256" },
|
|
8
|
+
{ name: "borrowAmount", type: "uint256" },
|
|
9
|
+
];
|
|
10
|
+
export const OPEN_POSITION_WRAPPER_ABI = [
|
|
11
|
+
{
|
|
12
|
+
inputs: [
|
|
13
|
+
{
|
|
14
|
+
components: OPEN_POSITION_PARAMS_COMPONENTS,
|
|
15
|
+
name: "params",
|
|
16
|
+
type: "tuple",
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
name: "encodePermitData",
|
|
20
|
+
outputs: [{ name: "", type: "bytes" }],
|
|
21
|
+
stateMutability: "view",
|
|
22
|
+
type: "function",
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
export const COLLATERAL_SWAP_PARAMS_COMPONENTS = [
|
|
26
|
+
{ name: "owner", type: "address" },
|
|
27
|
+
{ name: "account", type: "address" },
|
|
28
|
+
{ name: "deadline", type: "uint256" },
|
|
29
|
+
{ name: "fromVault", type: "address" },
|
|
30
|
+
{ name: "toVault", type: "address" },
|
|
31
|
+
{ name: "fromAmount", type: "uint256" },
|
|
32
|
+
{ name: "disableSourceCollateral", type: "bool" },
|
|
33
|
+
];
|
|
34
|
+
export const COLLATERAL_SWAP_WRAPPER_ABI = [
|
|
35
|
+
{
|
|
36
|
+
inputs: [
|
|
37
|
+
{
|
|
38
|
+
components: COLLATERAL_SWAP_PARAMS_COMPONENTS,
|
|
39
|
+
name: "params",
|
|
40
|
+
type: "tuple",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
name: "encodePermitData",
|
|
44
|
+
outputs: [{ name: "", type: "bytes" }],
|
|
45
|
+
stateMutability: "view",
|
|
46
|
+
type: "function",
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
export const CLOSE_POSITION_PARAMS_COMPONENTS = [
|
|
50
|
+
{ name: "owner", type: "address" },
|
|
51
|
+
{ name: "account", type: "address" },
|
|
52
|
+
{ name: "deadline", type: "uint256" },
|
|
53
|
+
{ name: "borrowVault", type: "address" },
|
|
54
|
+
{ name: "collateralVault", type: "address" },
|
|
55
|
+
{ name: "collateralAmount", type: "uint256" },
|
|
56
|
+
];
|
|
57
|
+
export const CLOSE_POSITION_WRAPPER_ABI = [
|
|
58
|
+
{
|
|
59
|
+
inputs: [
|
|
60
|
+
{
|
|
61
|
+
components: CLOSE_POSITION_PARAMS_COMPONENTS,
|
|
62
|
+
name: "params",
|
|
63
|
+
type: "tuple",
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
name: "encodePermitData",
|
|
67
|
+
outputs: [{ name: "", type: "bytes" }],
|
|
68
|
+
stateMutability: "view",
|
|
69
|
+
type: "function",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
inputs: [
|
|
73
|
+
{ name: "owner", type: "address" },
|
|
74
|
+
{ name: "subaccount", type: "address" },
|
|
75
|
+
],
|
|
76
|
+
name: "getInbox",
|
|
77
|
+
outputs: [{ name: "", type: "address" }],
|
|
78
|
+
stateMutability: "nonpayable",
|
|
79
|
+
type: "function",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
inputs: [
|
|
83
|
+
{ name: "owner", type: "address" },
|
|
84
|
+
{ name: "subaccount", type: "address" },
|
|
85
|
+
],
|
|
86
|
+
name: "getInboxAddressAndDomainSeparator",
|
|
87
|
+
outputs: [
|
|
88
|
+
{ name: "", type: "address" },
|
|
89
|
+
{ name: "", type: "bytes32" },
|
|
90
|
+
],
|
|
91
|
+
stateMutability: "view",
|
|
92
|
+
type: "function",
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
//# sourceMappingURL=cowSwapWrapperAbi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cowSwapWrapperAbi.js","sourceRoot":"","sources":["../../../../../src/services/executionService/abis/cowSwapWrapperAbi.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC9C,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;IAClC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IACpC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;IACrC,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,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SAAS,EAAE;YAClC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE;SACvC;QACD,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7B,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC7B;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KAChB;CACQ,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type Address, type Hash, type Hex } from "viem";
|
|
2
|
+
import type { IDeploymentService } from "../deploymentService/index.js";
|
|
3
|
+
import type { ProviderService } from "../providerService/index.js";
|
|
4
|
+
import { type CowSwapOrderUid, type CowSwapTypedDataRequest } from "./cowSwapHelpers.js";
|
|
5
|
+
import type { TransactionPlanTransactionRequest } from "./execute.js";
|
|
6
|
+
import type { CowSwapPlanItem, TransactionPlan, TransactionPlanItem } from "./executionServiceTypes.js";
|
|
7
|
+
export type CowSwapPermitCancellation = {
|
|
8
|
+
type: "evcPermitNonce";
|
|
9
|
+
chainId: number;
|
|
10
|
+
owner: Address;
|
|
11
|
+
evcAddress: Address;
|
|
12
|
+
addressPrefix: Hex;
|
|
13
|
+
nonceNamespace: bigint;
|
|
14
|
+
nonce: bigint;
|
|
15
|
+
nextNonce: bigint;
|
|
16
|
+
wrapperAddress: Address;
|
|
17
|
+
};
|
|
18
|
+
export type CowSwapPlanItemExecutionResult = {
|
|
19
|
+
item: CowSwapPlanItem;
|
|
20
|
+
orderUid?: CowSwapOrderUid;
|
|
21
|
+
hashes?: Hash[];
|
|
22
|
+
permitCancellation?: CowSwapPermitCancellation;
|
|
23
|
+
};
|
|
24
|
+
export type CowSwapTransactionPlanExecutionStatus = "approval" | "prepareInbox" | "signPermit" | "signOrder" | "submitOrder" | "cancelPermit" | "completed";
|
|
25
|
+
export type CowSwapTransactionPlanExecutionProgress = {
|
|
26
|
+
completed: number;
|
|
27
|
+
total: number;
|
|
28
|
+
item?: TransactionPlanItem;
|
|
29
|
+
status?: CowSwapTransactionPlanExecutionStatus;
|
|
30
|
+
orderUid?: CowSwapOrderUid;
|
|
31
|
+
hash?: Hash;
|
|
32
|
+
};
|
|
33
|
+
export type ExecuteCowSwapTransactionPlanArgs = {
|
|
34
|
+
plan: TransactionPlan;
|
|
35
|
+
chainId: number;
|
|
36
|
+
account: Address;
|
|
37
|
+
sendTransaction: (parameters: TransactionPlanTransactionRequest) => Promise<Hash>;
|
|
38
|
+
signTypedData: (parameters: CowSwapTypedDataRequest) => Promise<Hex>;
|
|
39
|
+
onProgress?: (progress: CowSwapTransactionPlanExecutionProgress) => void;
|
|
40
|
+
};
|
|
41
|
+
type ExecuteCowSwapTransactionPlanInternalArgs = ExecuteCowSwapTransactionPlanArgs & {
|
|
42
|
+
deploymentService: IDeploymentService;
|
|
43
|
+
providerService: ProviderService;
|
|
44
|
+
};
|
|
45
|
+
export type CowSwapTransactionPlanExecutionResult = {
|
|
46
|
+
plan: TransactionPlan;
|
|
47
|
+
orderUids: CowSwapOrderUid[];
|
|
48
|
+
hashes: Hash[];
|
|
49
|
+
results: CowSwapPlanItemExecutionResult[];
|
|
50
|
+
};
|
|
51
|
+
export declare function executeCowSwapTransactionPlan(args: ExecuteCowSwapTransactionPlanInternalArgs): Promise<CowSwapTransactionPlanExecutionResult>;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=cowExecutor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cowExecutor.d.ts","sourceRoot":"","sources":["../../../../src/services/executionService/cowExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,OAAO,EAIZ,KAAK,IAAI,EACT,KAAK,GAAG,EACR,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,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