@paxoslabs/amplify-sdk 0.4.2 → 0.4.3-alpha.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +79 -64
  2. package/dist/{chain-utils-CRMbWzu7.d.mts → chain-utils-CbVFMjwR.d.mts} +13 -1
  3. package/dist/{chain-utils-CRMbWzu7.d.ts → chain-utils-CbVFMjwR.d.ts} +13 -1
  4. package/dist/{chunk-5CV25BTQ.js → chunk-4OEL42W2.mjs} +83 -4
  5. package/dist/chunk-4OEL42W2.mjs.map +1 -0
  6. package/dist/{chunk-RW7PZETN.mjs → chunk-7RAFG3NI.mjs} +167 -228
  7. package/dist/chunk-7RAFG3NI.mjs.map +1 -0
  8. package/dist/{chunk-CQZCGPZK.mjs → chunk-E2HBXOZY.js} +92 -3
  9. package/dist/chunk-E2HBXOZY.js.map +1 -0
  10. package/dist/{chunk-WZXCJAKM.js → chunk-EHRZFLWL.js} +12 -12
  11. package/dist/{chunk-WZXCJAKM.js.map → chunk-EHRZFLWL.js.map} +1 -1
  12. package/dist/{chunk-GMMBJB4B.mjs → chunk-GSYGURYO.mjs} +71 -46
  13. package/dist/chunk-GSYGURYO.mjs.map +1 -0
  14. package/dist/{chunk-VZED4E3L.mjs → chunk-HBFBGNRH.mjs} +3 -3
  15. package/dist/{chunk-VZED4E3L.mjs.map → chunk-HBFBGNRH.mjs.map} +1 -1
  16. package/dist/{chunk-TPU2HZAX.mjs → chunk-L3X5UBG6.mjs} +86 -169
  17. package/dist/chunk-L3X5UBG6.mjs.map +1 -0
  18. package/dist/{chunk-BQG3XKTU.js → chunk-R5G6F7RP.js} +168 -227
  19. package/dist/chunk-R5G6F7RP.js.map +1 -0
  20. package/dist/{chunk-OZJNKGW6.js → chunk-WHL5LQRP.js} +120 -95
  21. package/dist/chunk-WHL5LQRP.js.map +1 -0
  22. package/dist/{chunk-2YPKHXFJ.js → chunk-ZJBJFFBQ.js} +180 -263
  23. package/dist/chunk-ZJBJFFBQ.js.map +1 -0
  24. package/dist/core.d.mts +2 -2
  25. package/dist/core.d.ts +2 -2
  26. package/dist/core.js +16 -16
  27. package/dist/core.mjs +4 -4
  28. package/dist/display.d.mts +23 -11
  29. package/dist/display.d.ts +23 -11
  30. package/dist/display.js +10 -10
  31. package/dist/display.mjs +4 -4
  32. package/dist/index.d.mts +107 -7
  33. package/dist/index.d.ts +107 -7
  34. package/dist/index.js +75 -51
  35. package/dist/index.mjs +5 -5
  36. package/dist/utils.d.mts +1 -1
  37. package/dist/utils.d.ts +1 -1
  38. package/dist/utils.js +7 -7
  39. package/dist/utils.mjs +2 -2
  40. package/dist/vaults.d.mts +107 -94
  41. package/dist/vaults.d.ts +107 -94
  42. package/dist/vaults.js +25 -25
  43. package/dist/vaults.mjs +4 -4
  44. package/package.json +18 -11
  45. package/dist/chunk-2YPKHXFJ.js.map +0 -1
  46. package/dist/chunk-5CV25BTQ.js.map +0 -1
  47. package/dist/chunk-BQG3XKTU.js.map +0 -1
  48. package/dist/chunk-CQZCGPZK.mjs.map +0 -1
  49. package/dist/chunk-GMMBJB4B.mjs.map +0 -1
  50. package/dist/chunk-OZJNKGW6.js.map +0 -1
  51. package/dist/chunk-RW7PZETN.mjs.map +0 -1
  52. package/dist/chunk-TPU2HZAX.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -7,96 +7,110 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  <!-- auto-changelog-above -->
9
9
 
10
+ ## [0.4.3-alpha.1] (2026-03-13)
11
+
12
+ ### ⚠ BREAKING CHANGES
13
+
14
+ * **vaults:** `yieldType` parameter removed from all deposit and withdrawal method arguments — replace with `vaultName: string` (e.g. `"Amplify USDC Core"`) across `prepareDepositTxData()`, `prepareDeposit()`, `prepareWithdrawOrderTxData()`, `prepareWithdrawal()`, and related authorization methods 209599d7
15
+
16
+ ### Features
17
+
18
+ - **client:** add `getVaultsByConfig()` — new function to filter vaults from cache by `yieldType`, `chainId`, `depositAssetAddress`, `withdrawAssetAddress`, or `settlementAssetAddress`; results are automatically scoped to the organization associated with the initialized API key 8e5e7de2
19
+ - **client:** require `vaultName` for vault resolution — vault lookup now uses `vaultName` as a required parameter for unambiguous resolution across organizations 209599d7
20
+
21
+ ### Refactoring
22
+
23
+ - **display:** update display module types and helpers (`deposit-display`, `vault-display`, `withdrawal-display`) to align with new vault resolution model 209599d7
24
+ - **vaults:** simplify deposit and withdrawal authorization flows; update approval logic across deposit/withdraw 209599d7
10
25
 
11
26
  ## [0.4.2](///compare/v0.4.1...v0.4.2) (2026-02-21)
12
27
 
13
28
  ### Features
14
29
 
15
- * **config:** add custom RPC URL support per chain b096322
30
+ - **config:** add custom RPC URL support per chain b096322
16
31
 
17
32
  ### Bug Fixes
18
33
 
19
- * **config:** address code review feedback for custom RPC support db8a077
20
- * **package.json:** adjust package version 8369305
34
+ - **config:** address code review feedback for custom RPC support db8a077
35
+ - **package.json:** adjust package version 8369305
21
36
 
22
37
  ## [0.4.1](///compare/v0.4.0...v0.4.1) (2026-02-20)
23
38
 
24
39
  ### Features
25
40
 
26
- * **api:** integrate /v2/amplify/vaultAssets REST endpoint 9bb5b10
41
+ - **api:** integrate /v2/amplify/vaultAssets REST endpoint 9bb5b10
27
42
 
28
43
  ### Bug Fixes
29
44
 
30
- * address CodeRabbit PR review findings b268261
31
- * **ci:** allow prerelease builds from main branch and revert manual version bump 8a927cd
32
- * **client:** only trigger pagination safety limit when more pages remain 71dbf06
33
- * **security:** resolve minimatch and ajv audit vulnerabilities 1449156
45
+ - address CodeRabbit PR review findings b268261
46
+ - **ci:** allow prerelease builds from main branch and revert manual version bump 8a927cd
47
+ - **client:** only trigger pagination safety limit when more pages remain 71dbf06
48
+ - **security:** resolve minimatch and ajv audit vulnerabilities 1449156
34
49
 
35
50
  ## [0.4.0](///compare/v0.2.4...v0.4.0) (2026-02-18)
36
51
 
37
52
  ### ⚠ BREAKING CHANGES
38
53
 
39
- * **withdraw:** Replace AtomicQueue with WithdrawQueue contract ([7c521f4](https://github.com/Ion-Protocol/amplify-sdk/commit/7c521f4))
54
+ - **withdraw:** Replace AtomicQueue with WithdrawQueue contract ([7c521f4](https://github.com/Ion-Protocol/amplify-sdk/commit/7c521f4))
40
55
  - `prepareWithdrawTransactionData()` → `prepareWithdrawOrderTxData()`
41
56
  - `prepareApproveWithdrawToken()` → `prepareApproveWithdrawOrderTxData()`
42
57
  - Added `prepareCancelWithdrawOrderTxData()` for order cancellation
43
58
  - Slippage params no longer required for withdrawals
44
- * **withdraw:** Rename WithdrawQueue functions for API clarity ([6b287de](https://github.com/Ion-Protocol/amplify-sdk/commit/6b287de))
45
- * **auth:** Remove redundant allowance fields from approval authorization results ([f6236a4](https://github.com/Ion-Protocol/amplify-sdk/commit/f6236a4))
46
- * **client:** Migrate vault data fetching from REST v1 to GraphQL ([b71bbd6](https://github.com/Ion-Protocol/amplify-sdk/commit/b71bbd6))
47
- * **core:** Minimum Node.js version increased from 20 to 22 ([d96f256](https://github.com/Ion-Protocol/amplify-sdk/commit/d96f256))
59
+ - **withdraw:** Rename WithdrawQueue functions for API clarity ([6b287de](https://github.com/Ion-Protocol/amplify-sdk/commit/6b287de))
60
+ - **auth:** Remove redundant allowance fields from approval authorization results ([f6236a4](https://github.com/Ion-Protocol/amplify-sdk/commit/f6236a4))
61
+ - **client:** Migrate vault data fetching from REST v1 to GraphQL ([b71bbd6](https://github.com/Ion-Protocol/amplify-sdk/commit/b71bbd6))
62
+ - **core:** Minimum Node.js version increased from 20 to 22 ([d96f256](https://github.com/Ion-Protocol/amplify-sdk/commit/d96f256))
48
63
 
49
64
  ### Features
50
65
 
51
- * **withdraw:** add `prepareWithdrawal` unified wrapper and `forceMethod` authorization overrides ([1deef81](https://github.com/Ion-Protocol/amplify-sdk/commit/1deef81))
66
+ - **withdraw:** add `prepareWithdrawal` unified wrapper and `forceMethod` authorization overrides ([1deef81](https://github.com/Ion-Protocol/amplify-sdk/commit/1deef81))
52
67
  - `prepareWithdrawal()` provides a stable high-level API wrapping `prepareWithdrawOrderTxData()`
53
68
  - `forceMethod` parameter on both deposit and withdrawal authorization for explicit routing control
54
69
  - Auth logic reordered: force override → smart wallet heuristic → auto-detect
55
- * **withdraw:** add WithdrawQueue contract integration ([901bb5e](https://github.com/Ion-Protocol/amplify-sdk/commit/901bb5e))
56
- * **withdraw:** add `prepareWithdrawalAuthorization` unified wrapper and fix approval bugs ([88baaaf](https://github.com/Ion-Protocol/amplify-sdk/commit/88baaaf))
57
- * **display:** add display module with UI helper functions (`getVaultAPY`, `getVaultTVL`, `getMinimumMint`, `getMinimumWithdrawalOrderSize`, `getWithdrawalFee`, `getWithdrawalRequests`) ([868d722](https://github.com/Ion-Protocol/amplify-sdk/commit/868d722))
58
- * **init:** make SDK initialization fully non-blocking ([3cfb510](https://github.com/Ion-Protocol/amplify-sdk/commit/3cfb510))
59
- * **wallets:** add smart contract wallet detection for deposit and withdrawal flows ([1547072](https://github.com/Ion-Protocol/amplify-sdk/commit/1547072))
60
- * **config:** add PRIME yield type support ([7b7e60d](https://github.com/Ion-Protocol/amplify-sdk/commit/7b7e60d))
61
- * **deposit:** improve TypeScript inference and add eth_signTypedData_v4 helper ([7feb7b6](https://github.com/Ion-Protocol/amplify-sdk/commit/7feb7b6))
70
+ - **withdraw:** add WithdrawQueue contract integration ([901bb5e](https://github.com/Ion-Protocol/amplify-sdk/commit/901bb5e))
71
+ - **withdraw:** add `prepareWithdrawalAuthorization` unified wrapper and fix approval bugs ([88baaaf](https://github.com/Ion-Protocol/amplify-sdk/commit/88baaaf))
72
+ - **display:** add display module with UI helper functions (`getVaultAPY`, `getVaultTVL`, `getMinimumMint`, `getMinimumWithdrawalOrderSize`, `getWithdrawalFee`, `getWithdrawalRequests`) ([868d722](https://github.com/Ion-Protocol/amplify-sdk/commit/868d722))
73
+ - **init:** make SDK initialization fully non-blocking ([3cfb510](https://github.com/Ion-Protocol/amplify-sdk/commit/3cfb510))
74
+ - **wallets:** add smart contract wallet detection for deposit and withdrawal flows ([1547072](https://github.com/Ion-Protocol/amplify-sdk/commit/1547072))
75
+ - **config:** add PRIME yield type support ([7b7e60d](https://github.com/Ion-Protocol/amplify-sdk/commit/7b7e60d))
76
+ - **deposit:** improve TypeScript inference and add eth_signTypedData_v4 helper ([7feb7b6](https://github.com/Ion-Protocol/amplify-sdk/commit/7feb7b6))
62
77
 
63
78
  ### Bug Fixes
64
79
 
65
- * **withdraw:** remove legacy AtomicQueue utils and update tests ([67f6703](https://github.com/Ion-Protocol/amplify-sdk/commit/67f6703))
66
- * **display:** use AND separator in v2 API filter query strings ([46bdec5](https://github.com/Ion-Protocol/amplify-sdk/commit/46bdec5))
67
- * **display:** add multicall error handling in `getMinimumMint` ([2fe41d5](https://github.com/Ion-Protocol/amplify-sdk/commit/2fe41d5))
68
- * **auth:** remove redundant allowance fields from approval authorization results ([f6236a4](https://github.com/Ion-Protocol/amplify-sdk/commit/f6236a4))
69
- * **deposit:** verify asset is supported on target chain ([d4a6eae](https://github.com/Ion-Protocol/amplify-sdk/commit/d4a6eae))
70
- * **errors:** ensure instanceof checks work in transpiled code ([9167032](https://github.com/Ion-Protocol/amplify-sdk/commit/9167032))
71
- * **ci:** restrict dry-run job permissions to read-only ([af546e1](https://github.com/Ion-Protocol/amplify-sdk/commit/af546e1))
72
- * **ci:** separate dry-run job to skip environment approval ([7c88088](https://github.com/Ion-Protocol/amplify-sdk/commit/7c88088))
73
- * address CodeRabbit review findings across withdraw, deposit, and display modules ([8b52868](https://github.com/Ion-Protocol/amplify-sdk/commit/8b52868))
74
- * address CodeRabbit PR review findings ([299cc64](https://github.com/Ion-Protocol/amplify-sdk/commit/299cc64))
75
- * align stale API references with current naming (PR review) ([d2a2655](https://github.com/Ion-Protocol/amplify-sdk/commit/d2a2655))
76
- * reset version to 0.3.0 for release-it minor bump to 0.4.0 ([79d7b6d](https://github.com/Ion-Protocol/amplify-sdk/commit/79d7b6d))
80
+ - **withdraw:** remove legacy AtomicQueue utils and update tests ([67f6703](https://github.com/Ion-Protocol/amplify-sdk/commit/67f6703))
81
+ - **display:** use AND separator in v2 API filter query strings ([46bdec5](https://github.com/Ion-Protocol/amplify-sdk/commit/46bdec5))
82
+ - **display:** add multicall error handling in `getMinimumMint` ([2fe41d5](https://github.com/Ion-Protocol/amplify-sdk/commit/2fe41d5))
83
+ - **auth:** remove redundant allowance fields from approval authorization results ([f6236a4](https://github.com/Ion-Protocol/amplify-sdk/commit/f6236a4))
84
+ - **deposit:** verify asset is supported on target chain ([d4a6eae](https://github.com/Ion-Protocol/amplify-sdk/commit/d4a6eae))
85
+ - **errors:** ensure instanceof checks work in transpiled code ([9167032](https://github.com/Ion-Protocol/amplify-sdk/commit/9167032))
86
+ - **ci:** restrict dry-run job permissions to read-only ([af546e1](https://github.com/Ion-Protocol/amplify-sdk/commit/af546e1))
87
+ - **ci:** separate dry-run job to skip environment approval ([7c88088](https://github.com/Ion-Protocol/amplify-sdk/commit/7c88088))
88
+ - address CodeRabbit review findings across withdraw, deposit, and display modules ([8b52868](https://github.com/Ion-Protocol/amplify-sdk/commit/8b52868))
89
+ - address CodeRabbit PR review findings ([299cc64](https://github.com/Ion-Protocol/amplify-sdk/commit/299cc64))
90
+ - align stale API references with current naming (PR review) ([d2a2655](https://github.com/Ion-Protocol/amplify-sdk/commit/d2a2655))
91
+ - reset version to 0.3.0 for release-it minor bump to 0.4.0 ([79d7b6d](https://github.com/Ion-Protocol/amplify-sdk/commit/79d7b6d))
77
92
 
78
93
  ### Code Refactoring
79
94
 
80
- * **withdraw:** add ApprovalMethod enum for signature params ([21e0ae9](https://github.com/Ion-Protocol/amplify-sdk/commit/21e0ae9))
81
- * **client:** make `fetchVaults` and `fetchSupportedAssets` cache-aware ([a50a345](https://github.com/Ion-Protocol/amplify-sdk/commit/a50a345))
82
- * **client:** move API client from `api/` to `client/` folder ([a6523db](https://github.com/Ion-Protocol/amplify-sdk/commit/a6523db))
95
+ - **withdraw:** add ApprovalMethod enum for signature params ([21e0ae9](https://github.com/Ion-Protocol/amplify-sdk/commit/21e0ae9))
96
+ - **client:** make `fetchVaults` and `fetchSupportedAssets` cache-aware ([a50a345](https://github.com/Ion-Protocol/amplify-sdk/commit/a50a345))
97
+ - **client:** move API client from `api/` to `client/` folder ([a6523db](https://github.com/Ion-Protocol/amplify-sdk/commit/a6523db))
83
98
 
84
99
  ### Styles
85
100
 
86
- * apply biome formatting to codebase ([d034237](https://github.com/Ion-Protocol/amplify-sdk/commit/d034237))
101
+ - apply biome formatting to codebase ([d034237](https://github.com/Ion-Protocol/amplify-sdk/commit/d034237))
87
102
 
88
103
  ### Documentation
89
104
 
90
- * update API reference and guides for new withdrawal API ([623fbf0](https://github.com/Ion-Protocol/amplify-sdk/commit/623fbf0))
91
- * align Mintlify docs with current SDK state ([df67147](https://github.com/Ion-Protocol/amplify-sdk/commit/df67147))
92
- * update withdrawal docs from AtomicQueue to WithdrawQueue terminology ([4ff639d](https://github.com/Ion-Protocol/amplify-sdk/commit/4ff639d))
93
- * fix withdrawal examples and smart wallet guide per code review ([bacca7c](https://github.com/Ion-Protocol/amplify-sdk/commit/bacca7c))
105
+ - update API reference and guides for new withdrawal API ([623fbf0](https://github.com/Ion-Protocol/amplify-sdk/commit/623fbf0))
106
+ - align Mintlify docs with current SDK state ([df67147](https://github.com/Ion-Protocol/amplify-sdk/commit/df67147))
107
+ - update withdrawal docs from AtomicQueue to WithdrawQueue terminology ([4ff639d](https://github.com/Ion-Protocol/amplify-sdk/commit/4ff639d))
108
+ - fix withdrawal examples and smart wallet guide per code review ([bacca7c](https://github.com/Ion-Protocol/amplify-sdk/commit/bacca7c))
94
109
 
95
110
  ### Chores
96
111
 
97
- * **deps:** add version overrides for brace-expansion and lodash ([4dba204](https://github.com/Ion-Protocol/amplify-sdk/commit/4dba204))
98
- * **test:** remove unused getMockAssets import ([b3e9bd0](https://github.com/Ion-Protocol/amplify-sdk/commit/b3e9bd0))
99
-
112
+ - **deps:** add version overrides for brace-expansion and lodash ([4dba204](https://github.com/Ion-Protocol/amplify-sdk/commit/4dba204))
113
+ - **test:** remove unused getMockAssets import ([b3e9bd0](https://github.com/Ion-Protocol/amplify-sdk/commit/b3e9bd0))
100
114
 
101
115
  ## [0.3.0-beta.0] - 2025-01-30
102
116
 
@@ -141,7 +155,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
141
155
 
142
156
  - use YieldType enum in tests and fix doc dates ([dc04a99](https://github.com/Ion-Protocol/amplify-sdk/commit/dc04a99))
143
157
 
144
-
145
158
  ## [0.2.3-beta.2] - 2025-01-15
146
159
 
147
160
  ### Bug Fixes
@@ -150,7 +163,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
150
163
  - **deposit:** use cache-based lookup for token address resolution ([36eeb42](https://github.com/Ion-Protocol/amplify-sdk/commit/36eeb42))
151
164
  - **types:** align EIP712Domain with viem's TypedDataDomain ([aa87bc7](https://github.com/Ion-Protocol/amplify-sdk/commit/aa87bc7))
152
165
 
153
-
154
166
  ## [0.2.0-beta.4] - 2025-01-10
155
167
 
156
168
  ### Bug Fixes
@@ -164,14 +176,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
164
176
 
165
177
  - **readme:** complete Quick Start deposit example ([451efa7](https://github.com/Ion-Protocol/amplify-sdk/commit/451efa7))
166
178
 
167
-
168
179
  ## [0.2.0-beta.0] - 2025-01-05
169
180
 
170
181
  ### Code Refactoring
171
182
 
172
183
  - **types:** convert LogLevel enum to `as const` pattern ([7cf1580](https://github.com/Ion-Protocol/amplify-sdk/commit/7cf1580))
173
184
 
174
-
175
185
  ## [0.2.0-alpha.0] - 2025-01-01
176
186
 
177
187
  ### Features
@@ -207,13 +217,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
207
217
  - clarify YieldType dual export pattern ([120ef43](https://github.com/Ion-Protocol/amplify-sdk/commit/120ef43))
208
218
  - update slippage default to 0.5% and document partnerCode param ([573bc3b](https://github.com/Ion-Protocol/amplify-sdk/commit/573bc3b))
209
219
 
210
-
211
220
  ## [0.2.4](///compare/v0.2.3-beta.2...v0.2.4) (2026-01-20)
221
+
212
222
  ## [0.2.2](///compare/v0.2.3-beta.2...v0.2.4) (2026-01-09)
223
+
213
224
  ## [0.2.0](///compare/v0.2.3-beta.2...v0.2.4) (2026-01-05)
214
225
 
215
226
  ## [0.2.2](///compare/v0.2.0-beta.4...v0.2.2) (2026-01-09)
227
+
216
228
  ## [0.2.0-beta.4](///compare/v0.2.0-beta.4...v0.2.2) (2026-01-09)
229
+
217
230
  ## [0.2.0](///compare/v0.2.0-beta.4...v0.2.2) (2026-01-05)
218
231
 
219
232
  ## [0.2.0](///compare/v0.2.0-beta.2...v0.2.0) (2026-01-05)
@@ -232,23 +245,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
232
245
 
233
246
  ### Bug Fixes
234
247
 
235
- * **types:** correct DepositTxData args tuple and withdraw docs 748593e
248
+ - **types:** correct DepositTxData args tuple and withdraw docs 748593e
236
249
 
237
250
  ## [0.1.1-alpha.1](///compare/v0.1.1-alpha.0...v0.1.1-alpha.1) (2025-12-10)
238
251
 
239
252
  ### Bug Fixes
240
253
 
241
- * **release:** resolve whatBump is not a function error 1d5d0e3
254
+ - **release:** resolve whatBump is not a function error 1d5d0e3
242
255
 
243
256
  ## <small>0.1.1-alpha.0 (2025-12-10)</small>
244
257
 
245
- * docs(deposits): update spender references from Teller to CommunityCodeDepositor ([6af71db](https://github.com/Ion-Protocol/amplify-sdk/commit/6af71db))
246
- * test(deposit): update permit spender test to expect CommunityCodeDepositor ([4631512](https://github.com/Ion-Protocol/amplify-sdk/commit/4631512))
247
- * fix(deposit): resolve linting and test issues after CommunityCodeDepositor refactor ([e20c464](https://github.com/Ion-Protocol/amplify-sdk/commit/e20c464))
248
- * fix(deposit): use CommunityCodeDepositor as permit spender ([a65b793](https://github.com/Ion-Protocol/amplify-sdk/commit/a65b793))
249
- * ci(release): pin Ubuntu runner to 24.04 LTS ([4fb959e](https://github.com/Ion-Protocol/amplify-sdk/commit/4fb959e))
250
- * build(git-hooks): add Husky and Commitlint for conventional commits enforcement ([010e867](https://github.com/Ion-Protocol/amplify-sdk/commit/010e867))
251
- * refactor(deposit): use CommunityCodeDepositor for all deposits ([5c51cc3](https://github.com/Ion-Protocol/amplify-sdk/commit/5c51cc3))
258
+ - docs(deposits): update spender references from Teller to CommunityCodeDepositor ([6af71db](https://github.com/Ion-Protocol/amplify-sdk/commit/6af71db))
259
+ - test(deposit): update permit spender test to expect CommunityCodeDepositor ([4631512](https://github.com/Ion-Protocol/amplify-sdk/commit/4631512))
260
+ - fix(deposit): resolve linting and test issues after CommunityCodeDepositor refactor ([e20c464](https://github.com/Ion-Protocol/amplify-sdk/commit/e20c464))
261
+ - fix(deposit): use CommunityCodeDepositor as permit spender ([a65b793](https://github.com/Ion-Protocol/amplify-sdk/commit/a65b793))
262
+ - ci(release): pin Ubuntu runner to 24.04 LTS ([4fb959e](https://github.com/Ion-Protocol/amplify-sdk/commit/4fb959e))
263
+ - build(git-hooks): add Husky and Commitlint for conventional commits enforcement ([010e867](https://github.com/Ion-Protocol/amplify-sdk/commit/010e867))
264
+ - refactor(deposit): use CommunityCodeDepositor for all deposits ([5c51cc3](https://github.com/Ion-Protocol/amplify-sdk/commit/5c51cc3))
252
265
 
253
266
  ## [0.1.0](https://github.com/Ion-Protocol/amplify-sdk/compare/v0.1.0-beta.0...v0.1.0) (2025-12-08)
254
267
 
@@ -258,25 +271,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
258
271
 
259
272
  ### Features
260
273
 
261
- * **deposit:** export CommunityCodeDepositTxData type and fix cache check ([426f711](https://github.com/Ion-Protocol/amplify-sdk/commit/426f7116ddd72309aca2e77117a622d6a6a1e0dd))
274
+ - **deposit:** export CommunityCodeDepositTxData type and fix cache check ([426f711](https://github.com/Ion-Protocol/amplify-sdk/commit/426f7116ddd72309aca2e77117a622d6a6a1e0dd))
262
275
 
263
276
  ### Bug Fixes
264
277
 
265
- * **deposit:** update CommunityCodeDepositor support for partner code deposits ([c8c281e](https://github.com/Ion-Protocol/amplify-sdk/commit/c8c281efcbc69b9ce3fd887c5ece6a19688004f3))
266
- * **lint:** remove unused variables and useless try-catch ([5d1ed6d](https://github.com/Ion-Protocol/amplify-sdk/commit/5d1ed6dc73693714127d6ea79afff781b34c1bab))
267
- * **types:** improve type safety and chain cache initialization ([03bcf41](https://github.com/Ion-Protocol/amplify-sdk/commit/03bcf4171fd72fc1bd55d84301cd78f55f2d57b2))
278
+ - **deposit:** update CommunityCodeDepositor support for partner code deposits ([c8c281e](https://github.com/Ion-Protocol/amplify-sdk/commit/c8c281efcbc69b9ce3fd887c5ece6a19688004f3))
279
+ - **lint:** remove unused variables and useless try-catch ([5d1ed6d](https://github.com/Ion-Protocol/amplify-sdk/commit/5d1ed6dc73693714127d6ea79afff781b34c1bab))
280
+ - **types:** improve type safety and chain cache initialization ([03bcf41](https://github.com/Ion-Protocol/amplify-sdk/commit/03bcf4171fd72fc1bd55d84301cd78f55f2d57b2))
268
281
 
269
282
  ### Styles
270
283
 
271
- * apply formatting and update branding to Amplify SDK ([c9f4d19](https://github.com/Ion-Protocol/amplify-sdk/commit/c9f4d193286b6b5fdfdf18a26ce9f6e2704f719f))
284
+ - apply formatting and update branding to Amplify SDK ([c9f4d19](https://github.com/Ion-Protocol/amplify-sdk/commit/c9f4d193286b6b5fdfdf18a26ce9f6e2704f719f))
272
285
 
273
286
  ### Code Refactoring
274
287
 
275
- * **chain-utils:** remove redundant optional chaining after null check ([22f1181](https://github.com/Ion-Protocol/amplify-sdk/commit/22f1181e9e670436a2eda1d6ef7e6921a4c61188))
288
+ - **chain-utils:** remove redundant optional chaining after null check ([22f1181](https://github.com/Ion-Protocol/amplify-sdk/commit/22f1181e9e670436a2eda1d6ef7e6921a4c61188))
276
289
 
277
290
  ## [0.0.1-alpha.1] - 2025-11-01
278
291
 
279
292
  ### Features
293
+
280
294
  - Initial SDK implementation with comprehensive AmplifyVault support
281
295
  - Multi-chain support (PRIME) Earn vaults
282
296
  - Complete deposit functionality with approval management and slippage protection
@@ -292,6 +306,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
292
306
  - Complete TypeScript support with full type safety
293
307
 
294
308
  ### Build System
309
+
295
310
  - Added automated release workflow with conventional commits
296
311
  - Configured semantic versioning with alpha/beta/rc support
297
312
  - Implemented comprehensive CI/CD pipeline with quality gates
@@ -84,6 +84,10 @@ interface VaultContracts {
84
84
  * };
85
85
  * ```
86
86
  */
87
+ interface VaultSLA {
88
+ externalWithdrawalQueueDelaySLA: number;
89
+ externalAccountantRateUpdateSLA: number;
90
+ }
87
91
  interface AmplifyVault {
88
92
  /** Unique identifier for the vault configuration */
89
93
  id: string;
@@ -91,8 +95,12 @@ interface AmplifyVault {
91
95
  chainId: number;
92
96
  /** Yield strategy type */
93
97
  yieldType: YieldType;
98
+ /** Human-readable vault name */
99
+ name: string;
94
100
  /** Vault smart contract addresses */
95
101
  vault: VaultContracts;
102
+ /** SLA data from VaultSLAs table */
103
+ sla?: VaultSLA;
96
104
  /** Supported deposit asset for this vault */
97
105
  supportedAssets: {
98
106
  /** Token contract address */
@@ -170,6 +178,10 @@ interface VaultFilterOptions {
170
178
  yieldType?: YieldType;
171
179
  /** Filter by deposit token address */
172
180
  depositTokenAddress?: Address;
181
+ /** Filter by withdraw asset address */
182
+ withdrawAssetAddress?: Address;
183
+ /** Filter by settlement asset address */
184
+ settlementAssetAddress?: Address;
173
185
  }
174
186
  /**
175
187
  * Filter options for asset queries
@@ -300,4 +312,4 @@ declare function getChainFromConfig(chainId: number, config?: AmplifyVault[]): P
300
312
  */
301
313
  declare function clearChainsCache(): void;
302
314
 
303
- export { type AmplifyVault as A, type ChainId as C, type SupportedAsset as S, type VaultFilterOptions as V, type WithdrawSupportedAsset as W, YieldType as Y, type AssetFilterOptions as a, APIError as b, clearChainsCache as c, getChainFromConfig as g, toChainId as t };
315
+ export { type AmplifyVault as A, type ChainId as C, type SupportedAsset as S, type VaultFilterOptions as V, type WithdrawSupportedAsset as W, YieldType as Y, type AssetFilterOptions as a, APIError as b, clearChainsCache as c, type VaultSLA as d, getChainFromConfig as g, toChainId as t };
@@ -84,6 +84,10 @@ interface VaultContracts {
84
84
  * };
85
85
  * ```
86
86
  */
87
+ interface VaultSLA {
88
+ externalWithdrawalQueueDelaySLA: number;
89
+ externalAccountantRateUpdateSLA: number;
90
+ }
87
91
  interface AmplifyVault {
88
92
  /** Unique identifier for the vault configuration */
89
93
  id: string;
@@ -91,8 +95,12 @@ interface AmplifyVault {
91
95
  chainId: number;
92
96
  /** Yield strategy type */
93
97
  yieldType: YieldType;
98
+ /** Human-readable vault name */
99
+ name: string;
94
100
  /** Vault smart contract addresses */
95
101
  vault: VaultContracts;
102
+ /** SLA data from VaultSLAs table */
103
+ sla?: VaultSLA;
96
104
  /** Supported deposit asset for this vault */
97
105
  supportedAssets: {
98
106
  /** Token contract address */
@@ -170,6 +178,10 @@ interface VaultFilterOptions {
170
178
  yieldType?: YieldType;
171
179
  /** Filter by deposit token address */
172
180
  depositTokenAddress?: Address;
181
+ /** Filter by withdraw asset address */
182
+ withdrawAssetAddress?: Address;
183
+ /** Filter by settlement asset address */
184
+ settlementAssetAddress?: Address;
173
185
  }
174
186
  /**
175
187
  * Filter options for asset queries
@@ -300,4 +312,4 @@ declare function getChainFromConfig(chainId: number, config?: AmplifyVault[]): P
300
312
  */
301
313
  declare function clearChainsCache(): void;
302
314
 
303
- export { type AmplifyVault as A, type ChainId as C, type SupportedAsset as S, type VaultFilterOptions as V, type WithdrawSupportedAsset as W, YieldType as Y, type AssetFilterOptions as a, APIError as b, clearChainsCache as c, getChainFromConfig as g, toChainId as t };
315
+ export { type AmplifyVault as A, type ChainId as C, type SupportedAsset as S, type VaultFilterOptions as V, type WithdrawSupportedAsset as W, YieldType as Y, type AssetFilterOptions as a, APIError as b, clearChainsCache as c, type VaultSLA as d, getChainFromConfig as g, toChainId as t };
@@ -1,4 +1,83 @@
1
- 'use strict';
1
+ import { isValidAddress, APIError, isValidChainId, getCache } from './chunk-7RAFG3NI.mjs';
2
+
3
+ // src/types/withdraw-errors.ts
4
+ var WithdrawError = class _WithdrawError extends Error {
5
+ constructor(message, code, context) {
6
+ super(message);
7
+ this.name = "WithdrawError";
8
+ this.code = code;
9
+ this.context = context;
10
+ Object.setPrototypeOf(this, _WithdrawError.prototype);
11
+ }
12
+ };
13
+ var VaultNotFoundByAddressError = class _VaultNotFoundByAddressError extends WithdrawError {
14
+ constructor(message, context) {
15
+ super(message, "VAULT_NOT_FOUND_BY_ADDRESS", context);
16
+ this.name = "VaultNotFoundByAddressError";
17
+ Object.setPrototypeOf(this, _VaultNotFoundByAddressError.prototype);
18
+ }
19
+ };
20
+ var VaultNotFoundByNameError = class _VaultNotFoundByNameError extends WithdrawError {
21
+ constructor(message, context) {
22
+ super(message, "VAULT_NOT_FOUND_BY_NAME", context);
23
+ this.name = "VaultNotFoundByNameError";
24
+ Object.setPrototypeOf(this, _VaultNotFoundByNameError.prototype);
25
+ }
26
+ };
27
+ var UnauthorizedVaultAccessError = class _UnauthorizedVaultAccessError extends WithdrawError {
28
+ constructor(message, context) {
29
+ super(message, "UNAUTHORIZED_VAULT_ACCESS", context);
30
+ this.name = "UnauthorizedVaultAccessError";
31
+ Object.setPrototypeOf(this, _UnauthorizedVaultAccessError.prototype);
32
+ }
33
+ };
34
+ function isVaultNotFoundByAddressError(error) {
35
+ return error instanceof VaultNotFoundByAddressError;
36
+ }
37
+ function isVaultNotFoundByNameError(error) {
38
+ return error instanceof VaultNotFoundByNameError;
39
+ }
40
+
41
+ // src/client/resolve-vault.ts
42
+ async function resolveVault(params) {
43
+ const { vaultName, assetAddress, chainId, callerEndpoint } = params;
44
+ if (!isValidAddress(assetAddress)) {
45
+ throw new APIError(
46
+ `Invalid assetAddress: ${assetAddress}. Must be a valid Ethereum address.`,
47
+ { endpoint: callerEndpoint }
48
+ );
49
+ }
50
+ if (!isValidChainId(chainId)) {
51
+ throw new APIError(
52
+ `Invalid chainId: ${chainId}. Must be a positive integer.`,
53
+ { endpoint: callerEndpoint }
54
+ );
55
+ }
56
+ const cache = getCache();
57
+ if (cache.isEmpty() || cache.isExpired()) {
58
+ await cache.refresh();
59
+ }
60
+ const vault = cache.getVaultByName(vaultName);
61
+ if (!vault) {
62
+ throw new VaultNotFoundByNameError(
63
+ `No vault found with name "${vaultName}". The vault may not exist or may not be available for your organization.`,
64
+ { vaultName, endpoint: callerEndpoint }
65
+ );
66
+ }
67
+ if (vault.chainId !== chainId) {
68
+ throw new APIError(
69
+ `Vault "${vaultName}" is on chain ${vault.chainId}, but chainId ${chainId} was requested.`,
70
+ { endpoint: callerEndpoint }
71
+ );
72
+ }
73
+ if (vault.supportedAssets.address.toLowerCase() !== assetAddress.toLowerCase()) {
74
+ throw new APIError(
75
+ `Vault "${vaultName}" supports asset ${vault.supportedAssets.address} (${vault.supportedAssets.symbol}), but asset ${assetAddress} was requested.`,
76
+ { endpoint: callerEndpoint }
77
+ );
78
+ }
79
+ return vault;
80
+ }
2
81
 
3
82
  // src/abi/withdraw-queue-abi.ts
4
83
  var WithdrawQueueAbi = [
@@ -1127,6 +1206,6 @@ var WithdrawQueueAbi = [
1127
1206
  }
1128
1207
  ];
1129
1208
 
1130
- exports.WithdrawQueueAbi = WithdrawQueueAbi;
1131
- //# sourceMappingURL=chunk-5CV25BTQ.js.map
1132
- //# sourceMappingURL=chunk-5CV25BTQ.js.map
1209
+ export { UnauthorizedVaultAccessError, VaultNotFoundByAddressError, VaultNotFoundByNameError, WithdrawQueueAbi, isVaultNotFoundByAddressError, isVaultNotFoundByNameError, resolveVault };
1210
+ //# sourceMappingURL=chunk-4OEL42W2.mjs.map
1211
+ //# sourceMappingURL=chunk-4OEL42W2.mjs.map