@cowprotocol/permit-utils 0.7.0-RC.1 → 2.2.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/CHANGELOG.md +219 -0
- package/LICENSE +674 -0
- package/README.md +6 -7
- package/jest.config.ts +11 -0
- package/package.json +25 -14
- package/project.json +42 -0
- package/src/abi/erc20.json +59 -0
- package/src/abi/versionAbis.ts +37 -0
- package/src/const.ts +20 -0
- package/src/consts/1inchPermitUtils.ts +68 -0
- package/src/imports/1inchPermitUtils.ts +10 -0
- package/src/index.ts +11 -0
- package/src/lib/checkIsCallDataAValidPermit.ts +64 -0
- package/src/lib/generatePermitHook.ts +133 -0
- package/src/lib/getPermitUtilsInstance.ts +51 -0
- package/src/lib/getTokenPermitInfo.ts +281 -0
- package/src/types.ts +61 -0
- package/src/utils/PermitProviderConnector.ts +75 -0
- package/src/utils/buildPermitCallData.ts +26 -0
- package/src/utils/getContract.ts +6 -0
- package/src/utils/getEip712Domain.ts +70 -0
- package/src/utils/getPermitDeadline.ts +7 -0
- package/src/utils/getTokenName.ts +13 -0
- package/src/utils/getTokenPermitVersion.ts +35 -0
- package/src/utils/isSupportedPermitInfo.ts +5 -0
- package/tsconfig.json +22 -0
- package/tsconfig.lib.json +10 -0
- package/tsconfig.spec.json +9 -0
- package/vite.config.mts +51 -0
- package/abi/versionAbis.d.ts +0 -15
- package/const.d.ts +0 -6
- package/index.cjs +0 -1
- package/index.d.ts +0 -7
- package/index.js +0 -489
- package/lib/checkIsCallDataAValidPermit.d.ts +0 -3
- package/lib/generatePermitHook.d.ts +0 -2
- package/lib/getPermitUtilsInstance.d.ts +0 -3
- package/lib/getTokenPermitInfo.d.ts +0 -2
- package/types.d.ts +0 -45
- package/utils/PermitProviderConnector.d.ts +0 -13
- package/utils/buildPermitCallData.d.ts +0 -3
- package/utils/getContract.d.ts +0 -3
- package/utils/getEip712Domain.d.ts +0 -13
- package/utils/getPermitDeadline.d.ts +0 -1
- package/utils/getTokenName.d.ts +0 -2
- package/utils/getTokenPermitVersion.d.ts +0 -2
- package/utils/isSupportedPermitInfo.d.ts +0 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [2.2.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v2.1.0...permit-utils-v2.2.0) (2026-02-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ✨ Features
|
|
7
|
+
|
|
8
|
+
* replace toLowerCase on getAddressKey ([#6866](https://github.com/cowprotocol/cowswap/issues/6866)) ([a41b23c](https://github.com/cowprotocol/cowswap/commit/a41b23c4384cdbcde9534abcdde37441121381e7))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @cowprotocol/hook-dapp-lib bumped to 2.0.3
|
|
16
|
+
|
|
17
|
+
## [2.1.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v2.0.1...permit-utils-v2.1.0) (2026-02-05)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### ✨ Features
|
|
21
|
+
|
|
22
|
+
* **trade:** upload appData to IPFS before signing ([#6922](https://github.com/cowprotocol/cowswap/issues/6922)) ([cb94104](https://github.com/cowprotocol/cowswap/commit/cb9410470c549bd5453a7933a0a224ba706ec2c2))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### 🔧 Miscellaneous
|
|
26
|
+
|
|
27
|
+
* update sdk ([a20814b](https://github.com/cowprotocol/cowswap/commit/a20814b7caf16f495cd0292d5f3469bc552e4d97))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* The following workspace dependencies were updated
|
|
33
|
+
* dependencies
|
|
34
|
+
* @cowprotocol/hook-dapp-lib bumped to 2.0.2
|
|
35
|
+
|
|
36
|
+
## [2.0.1](https://github.com/cowprotocol/cowswap/compare/permit-utils-v2.0.0...permit-utils-v2.0.1) (2026-02-02)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* **protocol-fee:** support decimals in protocol fee ([#6948](https://github.com/cowprotocol/cowswap/issues/6948)) ([a572bbe](https://github.com/cowprotocol/cowswap/commit/a572bbe2899b0a48b2c0891922442a4420f6c3ef))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Dependencies
|
|
45
|
+
|
|
46
|
+
* The following workspace dependencies were updated
|
|
47
|
+
* dependencies
|
|
48
|
+
* @cowprotocol/hook-dapp-lib bumped to 2.0.1
|
|
49
|
+
|
|
50
|
+
## [2.0.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v1.0.1...permit-utils-v2.0.0) (2026-01-28)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### ⚠ BREAKING CHANGES
|
|
54
|
+
|
|
55
|
+
* migrate from yarn to pnpm ([#6847](https://github.com/cowprotocol/cowswap/issues/6847))
|
|
56
|
+
|
|
57
|
+
### Features
|
|
58
|
+
|
|
59
|
+
* migrate from yarn to pnpm ([#6847](https://github.com/cowprotocol/cowswap/issues/6847)) ([1c5d115](https://github.com/cowprotocol/cowswap/commit/1c5d11516d0ddb997b0ebbb4eee4adcb491204a4))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Bug Fixes
|
|
63
|
+
|
|
64
|
+
* optimize bundle size ([#6775](https://github.com/cowprotocol/cowswap/issues/6775)) ([287a94e](https://github.com/cowprotocol/cowswap/commit/287a94e807b3672dbbd291768fb2ad80dbd288e5))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Dependencies
|
|
68
|
+
|
|
69
|
+
* The following workspace dependencies were updated
|
|
70
|
+
* dependencies
|
|
71
|
+
* @cowprotocol/hook-dapp-lib bumped to 2.0.0
|
|
72
|
+
|
|
73
|
+
## [1.0.1](https://github.com/cowprotocol/cowswap/compare/permit-utils-v1.0.0...permit-utils-v1.0.1) (2025-12-16)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Bug Fixes
|
|
77
|
+
|
|
78
|
+
* update schema reference for app data ([#6626](https://github.com/cowprotocol/cowswap/issues/6626)) ([93e78e6](https://github.com/cowprotocol/cowswap/commit/93e78e69454039fc89eeeb170f076a7957db604f))
|
|
79
|
+
|
|
80
|
+
## [1.0.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.10.0...permit-utils-v1.0.0) (2025-09-12)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### ⚠ BREAKING CHANGES
|
|
84
|
+
|
|
85
|
+
* add cow-sdk v7 ([#6165](https://github.com/cowprotocol/cowswap/issues/6165))
|
|
86
|
+
|
|
87
|
+
### Features
|
|
88
|
+
|
|
89
|
+
* add cow-sdk v7 ([#6165](https://github.com/cowprotocol/cowswap/issues/6165)) ([46d7afe](https://github.com/cowprotocol/cowswap/commit/46d7afeab94c172dbad975f39b25033abd966498))
|
|
90
|
+
|
|
91
|
+
## [0.10.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.9.0...permit-utils-v0.10.0) (2025-08-28)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Features
|
|
95
|
+
|
|
96
|
+
* **trade:** implement partial approve ([#6139](https://github.com/cowprotocol/cowswap/issues/6139)) ([6f9d6b0](https://github.com/cowprotocol/cowswap/commit/6f9d6b055323d25705ee88a533f71190944be6e2))
|
|
97
|
+
|
|
98
|
+
## [0.9.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.8.0...permit-utils-v0.9.0) (2025-08-21)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* **new-networks:** lens and bnb ([#5992](https://github.com/cowprotocol/cowswap/issues/5992)) ([19ac060](https://github.com/cowprotocol/cowswap/commit/19ac060f94088e7a1f6a2a891ef11d2c1ded4525))
|
|
104
|
+
|
|
105
|
+
## [0.8.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.7.0...permit-utils-v0.8.0) (2025-08-12)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Features
|
|
109
|
+
|
|
110
|
+
* rename Permit hook dapp id ([#6138](https://github.com/cowprotocol/cowswap/issues/6138)) ([41b0b18](https://github.com/cowprotocol/cowswap/commit/41b0b182d4a673bb1799a699ea83029ee8c6d73b))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Bug Fixes
|
|
114
|
+
|
|
115
|
+
* **dev-deps-update:** bump the dev-deps group with 76 updates ([#5663](https://github.com/cowprotocol/cowswap/issues/5663)) ([552b349](https://github.com/cowprotocol/cowswap/commit/552b349f53762a01ccf008e9a2083248424cbafa))
|
|
116
|
+
* **permit:** dai permit issues ([#5680](https://github.com/cowprotocol/cowswap/issues/5680)) ([a9e2da0](https://github.com/cowprotocol/cowswap/commit/a9e2da026cab2b0e001adc7fb0ebf11d1b028089))
|
|
117
|
+
* **permit:** nonce not supported [#5653](https://github.com/cowprotocol/cowswap/issues/5653) ([#5672](https://github.com/cowprotocol/cowswap/issues/5672)) ([a526222](https://github.com/cowprotocol/cowswap/commit/a526222e115c28540d68addd2476070815975846))
|
|
118
|
+
* **trade:** use salt for eip712 if it's needed ([#6086](https://github.com/cowprotocol/cowswap/issues/6086)) ([bb6f26c](https://github.com/cowprotocol/cowswap/commit/bb6f26c72781df087e018ec14d9fefcbc225baa3))
|
|
119
|
+
|
|
120
|
+
## [0.7.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.6.2...permit-utils-v0.7.0) (2025-08-07)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Bug Fixes
|
|
124
|
+
|
|
125
|
+
* **trade:** use salt for eip712 if it's needed ([#6086](https://github.com/cowprotocol/cowswap/issues/6086)) ([bb6f26c](https://github.com/cowprotocol/cowswap/commit/bb6f26c72781df087e018ec14d9fefcbc225baa3))
|
|
126
|
+
|
|
127
|
+
## [0.6.2](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.6.1...permit-utils-v0.6.2) (2025-05-16)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
### Bug Fixes
|
|
131
|
+
|
|
132
|
+
* **permit:** dai permit issues ([#5680](https://github.com/cowprotocol/cowswap/issues/5680)) ([a9e2da0](https://github.com/cowprotocol/cowswap/commit/a9e2da026cab2b0e001adc7fb0ebf11d1b028089))
|
|
133
|
+
|
|
134
|
+
## [0.6.1](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.6.0...permit-utils-v0.6.1) (2025-05-08)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### Bug Fixes
|
|
138
|
+
|
|
139
|
+
* **permit:** nonce not supported [#5653](https://github.com/cowprotocol/cowswap/issues/5653) ([#5672](https://github.com/cowprotocol/cowswap/issues/5672)) ([a526222](https://github.com/cowprotocol/cowswap/commit/a526222e115c28540d68addd2476070815975846))
|
|
140
|
+
|
|
141
|
+
## [0.6.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.5.0...permit-utils-v0.6.0) (2025-01-09)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### Features
|
|
145
|
+
|
|
146
|
+
* **swap:** partial approve ([#5256](https://github.com/cowprotocol/cowswap/issues/5256)) ([f080ffd](https://github.com/cowprotocol/cowswap/commit/f080ffdb098612e729f3a3f829410ce78697979f))
|
|
147
|
+
|
|
148
|
+
## [0.5.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.4.0...permit-utils-v0.5.0) (2024-12-03)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Features
|
|
152
|
+
|
|
153
|
+
* **base:** add base chain support ([#5044](https://github.com/cowprotocol/cowswap/issues/5044)) ([4cf0c91](https://github.com/cowprotocol/cowswap/commit/4cf0c91a300d6fcdc026364e74c45e5b2f729f2b))
|
|
154
|
+
|
|
155
|
+
## [0.4.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.3.1...permit-utils-v0.4.0) (2024-10-10)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Features
|
|
159
|
+
|
|
160
|
+
* **hooks-store:** use dappId from hook model to match with dapp ([#4938](https://github.com/cowprotocol/cowswap/issues/4938)) ([46699cb](https://github.com/cowprotocol/cowswap/commit/46699cbe6df02b0f7a3c6c380a04842e9f403a88))
|
|
161
|
+
|
|
162
|
+
## [0.3.1](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.3.0...permit-utils-v0.3.1) (2024-07-17)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### Bug Fixes
|
|
166
|
+
|
|
167
|
+
* **permit:** filter out permit signer and rotate it ([#4719](https://github.com/cowprotocol/cowswap/issues/4719)) ([bfb1f29](https://github.com/cowprotocol/cowswap/commit/bfb1f295997ba8cf16744afce45dbd19eb8990c6))
|
|
168
|
+
|
|
169
|
+
## [0.3.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.2.1...permit-utils-v0.3.0) (2024-05-29)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### Features
|
|
173
|
+
|
|
174
|
+
* **arbitrum:** add arbitrum_one ([#4407](https://github.com/cowprotocol/cowswap/issues/4407)) ([166e33f](https://github.com/cowprotocol/cowswap/commit/166e33f3c494972738b154cf844584dd78e12c7d))
|
|
175
|
+
|
|
176
|
+
## [0.2.1](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.2.0...permit-utils-v0.2.1) (2024-05-02)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### Bug Fixes
|
|
180
|
+
|
|
181
|
+
* **sentry:** fix unhandled permit failure ([#4275](https://github.com/cowprotocol/cowswap/issues/4275)) ([a774983](https://github.com/cowprotocol/cowswap/commit/a7749831a4874536423d6f65b1e17bfae8571d27))
|
|
182
|
+
|
|
183
|
+
## [0.2.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.1.2...permit-utils-v0.2.0) (2024-04-11)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
### Features
|
|
187
|
+
|
|
188
|
+
* **widget:** customize images ([#4159](https://github.com/cowprotocol/cowswap/issues/4159)) ([0b14b2b](https://github.com/cowprotocol/cowswap/commit/0b14b2b19279a1688f75dc4f2954b8c267e57c40))
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Bug Fixes
|
|
192
|
+
|
|
193
|
+
* **permit:** gnosis chain permits ([#4152](https://github.com/cowprotocol/cowswap/issues/4152)) ([26b703f](https://github.com/cowprotocol/cowswap/commit/26b703f2a45715fce0c4418d1f45fdceab2a716e))
|
|
194
|
+
|
|
195
|
+
## [0.1.2](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.1.1...permit-utils-v0.1.2) (2024-02-01)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
### Bug Fixes
|
|
199
|
+
|
|
200
|
+
* **permit-utils:** aave permit ([#3684](https://github.com/cowprotocol/cowswap/issues/3684)) ([68566d8](https://github.com/cowprotocol/cowswap/commit/68566d882f0c0bebde93b8228645a59d76c2120d))
|
|
201
|
+
|
|
202
|
+
## [0.1.1](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.1.0...permit-utils-v0.1.1) (2024-01-24)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
### Bug Fixes
|
|
206
|
+
|
|
207
|
+
* **permit:** replace permit signer account ([#3691](https://github.com/cowprotocol/cowswap/issues/3691)) ([3ae286f](https://github.com/cowprotocol/cowswap/commit/3ae286f7e0f239a2843ce2a30138d23eceb1577f))
|
|
208
|
+
|
|
209
|
+
## [0.1.0](https://github.com/cowprotocol/cowswap/compare/permit-utils-v0.0.2...permit-utils-v0.1.0) (2024-01-17)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
### Features
|
|
213
|
+
|
|
214
|
+
* **networks:** support Sepolia ([#3558](https://github.com/cowprotocol/cowswap/issues/3558)) ([ab8b179](https://github.com/cowprotocol/cowswap/commit/ab8b1794fb60da851f3fccdd861ebef4b18df30e))
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
### Bug Fixes
|
|
218
|
+
|
|
219
|
+
* **permit:** replace permit signer used for quoting ([#3562](https://github.com/cowprotocol/cowswap/issues/3562)) ([907d908](https://github.com/cowprotocol/cowswap/commit/907d90825643a5ad5824ed4ff5d24a9227f96f71))
|