@paxoslabs/amplify-sdk 0.5.2 → 1.0.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 (62) hide show
  1. package/dist/index.d.mts +3158 -725
  2. package/dist/index.d.ts +3158 -725
  3. package/dist/index.js +15013 -171
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +15067 -6
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +25 -86
  8. package/CHANGELOG.md +0 -320
  9. package/LICENSE +0 -28
  10. package/README.md +0 -119
  11. package/dist/chain-utils-BdJecHBA.d.mts +0 -334
  12. package/dist/chain-utils-BdJecHBA.d.ts +0 -334
  13. package/dist/chunk-5OK753GA.js +0 -1989
  14. package/dist/chunk-5OK753GA.js.map +0 -1
  15. package/dist/chunk-6CU533DM.mjs +0 -39
  16. package/dist/chunk-6CU533DM.mjs.map +0 -1
  17. package/dist/chunk-7JQQ2TH4.mjs +0 -1231
  18. package/dist/chunk-7JQQ2TH4.mjs.map +0 -1
  19. package/dist/chunk-HU5CTL4C.mjs +0 -1962
  20. package/dist/chunk-HU5CTL4C.mjs.map +0 -1
  21. package/dist/chunk-NNDY5TID.js +0 -1143
  22. package/dist/chunk-NNDY5TID.js.map +0 -1
  23. package/dist/chunk-Q5FXJU5Y.mjs +0 -1133
  24. package/dist/chunk-Q5FXJU5Y.mjs.map +0 -1
  25. package/dist/chunk-QZHI2T7O.mjs +0 -457
  26. package/dist/chunk-QZHI2T7O.mjs.map +0 -1
  27. package/dist/chunk-SWUG4PTB.js +0 -464
  28. package/dist/chunk-SWUG4PTB.js.map +0 -1
  29. package/dist/chunk-TNL23CO2.js +0 -45
  30. package/dist/chunk-TNL23CO2.js.map +0 -1
  31. package/dist/chunk-WK7EJRBB.mjs +0 -1482
  32. package/dist/chunk-WK7EJRBB.mjs.map +0 -1
  33. package/dist/chunk-WYBYBPX5.js +0 -1518
  34. package/dist/chunk-WYBYBPX5.js.map +0 -1
  35. package/dist/chunk-ZKDXRGI5.js +0 -1239
  36. package/dist/chunk-ZKDXRGI5.js.map +0 -1
  37. package/dist/core.d.mts +0 -152
  38. package/dist/core.d.ts +0 -152
  39. package/dist/core.js +0 -1220
  40. package/dist/core.js.map +0 -1
  41. package/dist/core.mjs +0 -1194
  42. package/dist/core.mjs.map +0 -1
  43. package/dist/display.d.mts +0 -263
  44. package/dist/display.d.ts +0 -263
  45. package/dist/display.js +0 -36
  46. package/dist/display.js.map +0 -1
  47. package/dist/display.mjs +0 -7
  48. package/dist/display.mjs.map +0 -1
  49. package/dist/index-DXXA8gEA.d.mts +0 -5026
  50. package/dist/index-aE5lTOUH.d.ts +0 -5026
  51. package/dist/utils.d.mts +0 -112
  52. package/dist/utils.d.ts +0 -112
  53. package/dist/utils.js +0 -67
  54. package/dist/utils.js.map +0 -1
  55. package/dist/utils.mjs +0 -25
  56. package/dist/utils.mjs.map +0 -1
  57. package/dist/vaults.d.mts +0 -4
  58. package/dist/vaults.d.ts +0 -4
  59. package/dist/vaults.js +0 -96
  60. package/dist/vaults.js.map +0 -1
  61. package/dist/vaults.mjs +0 -7
  62. package/dist/vaults.mjs.map +0 -1
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@paxoslabs/amplify-sdk",
3
- "version": "0.5.2",
3
+ "version": "1.0.0",
4
4
  "description": "Paxos Labs Amplify SDK",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
5
+ "private": false,
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
8
9
  "exports": {
9
10
  ".": {
10
11
  "types": "./dist/index.d.ts",
@@ -12,30 +13,6 @@
12
13
  "require": "./dist/index.js",
13
14
  "default": "./dist/index.mjs"
14
15
  },
15
- "./core": {
16
- "types": "./dist/core.d.ts",
17
- "import": "./dist/core.mjs",
18
- "require": "./dist/core.js",
19
- "default": "./dist/core.mjs"
20
- },
21
- "./vaults": {
22
- "types": "./dist/vaults.d.ts",
23
- "import": "./dist/vaults.mjs",
24
- "require": "./dist/vaults.js",
25
- "default": "./dist/vaults.mjs"
26
- },
27
- "./utils": {
28
- "types": "./dist/utils.d.ts",
29
- "import": "./dist/utils.mjs",
30
- "require": "./dist/utils.js",
31
- "default": "./dist/utils.mjs"
32
- },
33
- "./display": {
34
- "types": "./dist/display.d.ts",
35
- "import": "./dist/display.mjs",
36
- "require": "./dist/display.js",
37
- "default": "./dist/display.mjs"
38
- },
39
16
  "./package.json": "./package.json"
40
17
  },
41
18
  "files": [
@@ -44,20 +21,24 @@
44
21
  "CHANGELOG.md"
45
22
  ],
46
23
  "sideEffects": false,
47
- "repository": {
48
- "type": "git",
49
- "url": "git+https://github.com/Ion-Protocol/amplify-sdk.git"
50
- },
51
- "bugs": {
52
- "url": "https://github.com/Ion-Protocol/amplify-sdk/issues"
53
- },
54
- "homepage": "https://github.com/Ion-Protocol/amplify-sdk#readme",
55
24
  "engines": {
56
25
  "node": ">=24"
57
26
  },
58
- "publishConfig": {
59
- "access": "public"
27
+ "author": "Paxos Labs",
28
+ "license": "MIT",
29
+ "dependencies": {
30
+ "node-fetch": "^2.7.0",
31
+ "qs": "^6.11.2",
32
+ "url-join": "^4.0.1"
60
33
  },
34
+ "devDependencies": {
35
+ "@types/node": "^22.13.0",
36
+ "fern-api": "5.27.5",
37
+ "tsup": "^8.5.1",
38
+ "typescript": "^5.9.3",
39
+ "vitest": "^4.0.18"
40
+ },
41
+ "homepage": "https://developer.paxoslabs.com",
61
42
  "keywords": [
62
43
  "amplify",
63
44
  "paxos",
@@ -70,55 +51,13 @@
70
51
  "typescript",
71
52
  "javascript"
72
53
  ],
73
- "author": "Paxos Labs",
74
- "license": "MIT",
75
- "devDependencies": {
76
- "@eslint/js": "^9.39.2",
77
- "@types/node": "^22.13.0",
78
- "@vitest/coverage-v8": "^4.0.18",
79
- "eslint": "^9.39.2",
80
- "eslint-config-prettier": "^10.1.8",
81
- "eslint-plugin-prettier": "^5.5.5",
82
- "globals": "^16.5.0",
83
- "prettier": "^3.8.1",
84
- "tsup": "^8.5.1",
85
- "typescript": "^5.9.3",
86
- "typescript-eslint": "^8.56.0",
87
- "vitest": "^4.0.18"
88
- },
89
- "dependencies": {
90
- "abitype": "^1.2.3",
91
- "posthog-js": "^1.316.0",
92
- "viem": "^2.45.1"
93
- },
94
- "peerDependencies": {
95
- "typescript": ">=4.9.0",
96
- "viem": ">=2.0.0"
97
- },
98
- "peerDependenciesMeta": {
99
- "typescript": {
100
- "optional": true
101
- }
102
- },
103
54
  "scripts": {
104
- "build": "tsup --config tsup.config.ts",
105
- "build:analyze": "pnpm build && npx esbuild-visualizer dist/index.mjs --metadata --open",
106
- "build:watch": "tsup --watch --config tsup.config.ts",
107
- "dev": "pnpm build:watch",
108
- "typecheck": "pnpm check-types",
109
- "typecheck:watch": "tsc --noEmit --watch",
110
- "lint": "eslint \"src/**/*.{ts,tsx,js,jsx}\" --cache",
111
- "lint:ci": "eslint \"src/**/*.{ts,tsx,js,jsx}\" --max-warnings=0 --cache",
112
- "lint:fix": "eslint \"src/**/*.{ts,tsx,js,jsx}\" --fix",
55
+ "build": "tsup",
56
+ "build:watch": "tsup --watch",
113
57
  "clean": "rm -rf dist coverage",
114
- "test": "vitest",
115
- "test:run": "vitest run",
116
- "test:coverage": "vitest run --coverage",
117
- "test:ui": "vitest --ui",
118
- "format": "prettier --write .",
119
- "check": "pnpm check:all",
120
- "check:all": "pnpm check-types && pnpm lint && pnpm test:run",
121
- "size": "size-limit",
122
- "check-types": "tsc --noEmit"
58
+ "generate": "fern generate --group local",
59
+ "typecheck": "tsc --noEmit",
60
+ "check-types": "tsc --noEmit",
61
+ "test:smoke": "vitest run --config vitest.smoke.config.ts"
123
62
  }
124
63
  }
package/CHANGELOG.md DELETED
@@ -1,320 +0,0 @@
1
- # Changelog
2
-
3
- ## 0.5.2
4
-
5
- ### Patch Changes
6
-
7
- - Add KYT deposit support with discriminated union types, enterprise config-based routing, vault deprecation warnings, and flatten permit deposit return shape
8
-
9
- All notable changes to this project will be documented in this file.
10
-
11
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
12
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
13
-
14
- <!-- auto-changelog-above -->
15
-
16
- ## [0.4.3-alpha.1] (2026-03-13)
17
-
18
- ### ⚠ BREAKING CHANGES
19
-
20
- - **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
21
-
22
- ### Features
23
-
24
- - **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
25
- - **client:** require `vaultName` for vault resolution — vault lookup now uses `vaultName` as a required parameter for unambiguous resolution across organizations 209599d7
26
-
27
- ### Refactoring
28
-
29
- - **display:** update display module types and helpers (`deposit-display`, `vault-display`, `withdrawal-display`) to align with new vault resolution model 209599d7
30
- - **vaults:** simplify deposit and withdrawal authorization flows; update approval logic across deposit/withdraw 209599d7
31
-
32
- ## [0.4.2](///compare/v0.4.1...v0.4.2) (2026-02-21)
33
-
34
- ### Features
35
-
36
- - **config:** add custom RPC URL support per chain b096322
37
-
38
- ### Bug Fixes
39
-
40
- - **config:** address code review feedback for custom RPC support db8a077
41
- - **package.json:** adjust package version 8369305
42
-
43
- ## [0.4.1](///compare/v0.4.0...v0.4.1) (2026-02-20)
44
-
45
- ### Features
46
-
47
- - **api:** integrate /v2/amplify/vaultAssets REST endpoint 9bb5b10
48
-
49
- ### Bug Fixes
50
-
51
- - address CodeRabbit PR review findings b268261
52
- - **ci:** allow prerelease builds from main branch and revert manual version bump 8a927cd
53
- - **client:** only trigger pagination safety limit when more pages remain 71dbf06
54
- - **security:** resolve minimatch and ajv audit vulnerabilities 1449156
55
-
56
- ## [0.4.0](///compare/v0.2.4...v0.4.0) (2026-02-18)
57
-
58
- ### ⚠ BREAKING CHANGES
59
-
60
- - **withdraw:** Replace AtomicQueue with WithdrawQueue contract ([7c521f4](https://github.com/Ion-Protocol/amplify-sdk/commit/7c521f4))
61
- - `prepareWithdrawTransactionData()` → `prepareWithdrawOrderTxData()`
62
- - `prepareApproveWithdrawToken()` → `prepareApproveWithdrawOrderTxData()`
63
- - Added `prepareCancelWithdrawOrderTxData()` for order cancellation
64
- - Slippage params no longer required for withdrawals
65
- - **withdraw:** Rename WithdrawQueue functions for API clarity ([6b287de](https://github.com/Ion-Protocol/amplify-sdk/commit/6b287de))
66
- - **auth:** Remove redundant allowance fields from approval authorization results ([f6236a4](https://github.com/Ion-Protocol/amplify-sdk/commit/f6236a4))
67
- - **client:** Migrate vault data fetching from REST v1 to GraphQL ([b71bbd6](https://github.com/Ion-Protocol/amplify-sdk/commit/b71bbd6))
68
- - **core:** Minimum Node.js version increased from 20 to 22 ([d96f256](https://github.com/Ion-Protocol/amplify-sdk/commit/d96f256))
69
-
70
- ### Features
71
-
72
- - **withdraw:** add `prepareWithdrawal` unified wrapper and `forceMethod` authorization overrides ([1deef81](https://github.com/Ion-Protocol/amplify-sdk/commit/1deef81))
73
- - `prepareWithdrawal()` provides a stable high-level API wrapping `prepareWithdrawOrderTxData()`
74
- - `forceMethod` parameter on both deposit and withdrawal authorization for explicit routing control
75
- - Auth logic reordered: force override → smart wallet heuristic → auto-detect
76
- - **withdraw:** add WithdrawQueue contract integration ([901bb5e](https://github.com/Ion-Protocol/amplify-sdk/commit/901bb5e))
77
- - **withdraw:** add `prepareWithdrawalAuthorization` unified wrapper and fix approval bugs ([88baaaf](https://github.com/Ion-Protocol/amplify-sdk/commit/88baaaf))
78
- - **display:** add display module with UI helper functions (`getVaultAPY`, `getVaultTVL`, `getMinimumMint`, `getMinimumWithdrawalOrderSize`, `getWithdrawalFee`, `getWithdrawalRequests`) ([868d722](https://github.com/Ion-Protocol/amplify-sdk/commit/868d722))
79
- - **init:** make SDK initialization fully non-blocking ([3cfb510](https://github.com/Ion-Protocol/amplify-sdk/commit/3cfb510))
80
- - **wallets:** add smart contract wallet detection for deposit and withdrawal flows ([1547072](https://github.com/Ion-Protocol/amplify-sdk/commit/1547072))
81
- - **config:** add PRIME yield type support ([7b7e60d](https://github.com/Ion-Protocol/amplify-sdk/commit/7b7e60d))
82
- - **deposit:** improve TypeScript inference and add eth_signTypedData_v4 helper ([7feb7b6](https://github.com/Ion-Protocol/amplify-sdk/commit/7feb7b6))
83
-
84
- ### Bug Fixes
85
-
86
- - **withdraw:** remove legacy AtomicQueue utils and update tests ([67f6703](https://github.com/Ion-Protocol/amplify-sdk/commit/67f6703))
87
- - **display:** use AND separator in v2 API filter query strings ([46bdec5](https://github.com/Ion-Protocol/amplify-sdk/commit/46bdec5))
88
- - **display:** add multicall error handling in `getMinimumMint` ([2fe41d5](https://github.com/Ion-Protocol/amplify-sdk/commit/2fe41d5))
89
- - **auth:** remove redundant allowance fields from approval authorization results ([f6236a4](https://github.com/Ion-Protocol/amplify-sdk/commit/f6236a4))
90
- - **deposit:** verify asset is supported on target chain ([d4a6eae](https://github.com/Ion-Protocol/amplify-sdk/commit/d4a6eae))
91
- - **errors:** ensure instanceof checks work in transpiled code ([9167032](https://github.com/Ion-Protocol/amplify-sdk/commit/9167032))
92
- - **ci:** restrict dry-run job permissions to read-only ([af546e1](https://github.com/Ion-Protocol/amplify-sdk/commit/af546e1))
93
- - **ci:** separate dry-run job to skip environment approval ([7c88088](https://github.com/Ion-Protocol/amplify-sdk/commit/7c88088))
94
- - address CodeRabbit review findings across withdraw, deposit, and display modules ([8b52868](https://github.com/Ion-Protocol/amplify-sdk/commit/8b52868))
95
- - address CodeRabbit PR review findings ([299cc64](https://github.com/Ion-Protocol/amplify-sdk/commit/299cc64))
96
- - align stale API references with current naming (PR review) ([d2a2655](https://github.com/Ion-Protocol/amplify-sdk/commit/d2a2655))
97
- - 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))
98
-
99
- ### Code Refactoring
100
-
101
- - **withdraw:** add ApprovalMethod enum for signature params ([21e0ae9](https://github.com/Ion-Protocol/amplify-sdk/commit/21e0ae9))
102
- - **client:** make `fetchVaults` and `fetchSupportedAssets` cache-aware ([a50a345](https://github.com/Ion-Protocol/amplify-sdk/commit/a50a345))
103
- - **client:** move API client from `api/` to `client/` folder ([a6523db](https://github.com/Ion-Protocol/amplify-sdk/commit/a6523db))
104
-
105
- ### Styles
106
-
107
- - apply biome formatting to codebase ([d034237](https://github.com/Ion-Protocol/amplify-sdk/commit/d034237))
108
-
109
- ### Documentation
110
-
111
- - update API reference and guides for new withdrawal API ([623fbf0](https://github.com/Ion-Protocol/amplify-sdk/commit/623fbf0))
112
- - align Mintlify docs with current SDK state ([df67147](https://github.com/Ion-Protocol/amplify-sdk/commit/df67147))
113
- - update withdrawal docs from AtomicQueue to WithdrawQueue terminology ([4ff639d](https://github.com/Ion-Protocol/amplify-sdk/commit/4ff639d))
114
- - fix withdrawal examples and smart wallet guide per code review ([bacca7c](https://github.com/Ion-Protocol/amplify-sdk/commit/bacca7c))
115
-
116
- ### Chores
117
-
118
- - **deps:** add version overrides for brace-expansion and lodash ([4dba204](https://github.com/Ion-Protocol/amplify-sdk/commit/4dba204))
119
- - **test:** remove unused getMockAssets import ([b3e9bd0](https://github.com/Ion-Protocol/amplify-sdk/commit/b3e9bd0))
120
-
121
- ## [0.3.0-beta.0] - 2025-01-30
122
-
123
- ### BREAKING CHANGES
124
-
125
- - **deposit:** Parameter names changed in deposit functions ([82fb867](https://github.com/Ion-Protocol/amplify-sdk/commit/82fb867))
126
- - `depositToken` → `depositAsset`
127
- - `recipientAddress` → `to`
128
- - **core:** Minimum Node.js requirement bumped from 20 to 22 ([d96f256](https://github.com/Ion-Protocol/amplify-sdk/commit/d96f256))
129
- - **constants:** Yield type references migrated from PRIME/TBILL/LENDING to CORE/TREASURY/FRONTIER ([6068f1d](https://github.com/Ion-Protocol/amplify-sdk/commit/6068f1d))
130
-
131
- ### Features
132
-
133
- - **deposit:** improve TypeScript inference and add `eth_signTypedData_v4` helper for wallet compatibility ([7feb7b6](https://github.com/Ion-Protocol/amplify-sdk/commit/7feb7b6))
134
- - **core:** bump minimum Node.js requirement from 20 to 22 ([d96f256](https://github.com/Ion-Protocol/amplify-sdk/commit/d96f256))
135
-
136
- ### Bug Fixes
137
-
138
- - **errors:** ensure `instanceof` checks work in transpiled code by adding `Object.setPrototypeOf` for `APIError` and `WithdrawError` classes ([9167032](https://github.com/Ion-Protocol/amplify-sdk/commit/9167032))
139
-
140
- ### Code Refactoring
141
-
142
- - **deposit:** standardize parameter naming across deposit APIs ([82fb867](https://github.com/Ion-Protocol/amplify-sdk/commit/82fb867))
143
- - `depositToken` → `depositAsset` (matches contract terminology)
144
- - `recipientAddress` → `to` (matches common contract patterns)
145
- - **display:** remove display module and bridge functionality (deprecated) ([522d62f](https://github.com/Ion-Protocol/amplify-sdk/commit/522d62f))
146
- - **vaults:** use explicit exports for tree-shaking optimization ([47aae50](https://github.com/Ion-Protocol/amplify-sdk/commit/47aae50))
147
- - **constants:** migrate yield type references from PRIME/TBILL/LENDING to CORE/TREASURY/FRONTIER ([6068f1d](https://github.com/Ion-Protocol/amplify-sdk/commit/6068f1d))
148
- - **ci:** remove automatic prerelease publishing on dev/staging branches ([3efbe3a](https://github.com/Ion-Protocol/amplify-sdk/commit/3efbe3a))
149
-
150
- ### Styles
151
-
152
- - apply biome formatting and import organization ([22bc599](https://github.com/Ion-Protocol/amplify-sdk/commit/22bc599))
153
-
154
- ### Documentation
155
-
156
- - add SDK architecture best practices alignment plan ([3e1eb4e](https://github.com/Ion-Protocol/amplify-sdk/commit/3e1eb4e))
157
- - add CONTRIBUTING.md with development guidelines ([8f0227e](https://github.com/Ion-Protocol/amplify-sdk/commit/8f0227e))
158
- - streamline AGENTS.md for improved clarity and readability ([704b037](https://github.com/Ion-Protocol/amplify-sdk/commit/704b037))
159
-
160
- ### Chores
161
-
162
- - use YieldType enum in tests and fix doc dates ([dc04a99](https://github.com/Ion-Protocol/amplify-sdk/commit/dc04a99))
163
-
164
- ## [0.2.3-beta.2] - 2025-01-15
165
-
166
- ### Bug Fixes
167
-
168
- - **deposit:** use correct spender address and decimals for permit flow ([172a636](https://github.com/Ion-Protocol/amplify-sdk/commit/172a636))
169
- - **deposit:** use cache-based lookup for token address resolution ([36eeb42](https://github.com/Ion-Protocol/amplify-sdk/commit/36eeb42))
170
- - **types:** align EIP712Domain with viem's TypedDataDomain ([aa87bc7](https://github.com/Ion-Protocol/amplify-sdk/commit/aa87bc7))
171
-
172
- ## [0.2.0-beta.4] - 2025-01-10
173
-
174
- ### Bug Fixes
175
-
176
- - **ci:** use non-interactive test command in release hooks ([f08408e](https://github.com/Ion-Protocol/amplify-sdk/commit/f08408e))
177
- - **deps:** resolve preact JSON VNode Injection vulnerability ([ff6b60e](https://github.com/Ion-Protocol/amplify-sdk/commit/ff6b60e))
178
- - **deposit:** use CommunityCodeDepositor as approval spender ([84cffe5](https://github.com/Ion-Protocol/amplify-sdk/commit/84cffe5))
179
- - **withdraw:** align slippage defaults to DEFAULT_SLIPPAGE_BPS (50 bps) ([1a6eb8a](https://github.com/Ion-Protocol/amplify-sdk/commit/1a6eb8a))
180
-
181
- ### Documentation
182
-
183
- - **readme:** complete Quick Start deposit example ([451efa7](https://github.com/Ion-Protocol/amplify-sdk/commit/451efa7))
184
-
185
- ## [0.2.0-beta.0] - 2025-01-05
186
-
187
- ### Code Refactoring
188
-
189
- - **types:** convert LogLevel enum to `as const` pattern ([7cf1580](https://github.com/Ion-Protocol/amplify-sdk/commit/7cf1580))
190
-
191
- ## [0.2.0-alpha.0] - 2025-01-01
192
-
193
- ### Features
194
-
195
- - **deposit:** add unified deposit wrapper functions (`prepareDeposit`, `prepareDepositAuthorization`) ([b0d3a99](https://github.com/Ion-Protocol/amplify-sdk/commit/b0d3a99))
196
- - **observability:** add logging and telemetry infrastructure ([ea4a3ac](https://github.com/Ion-Protocol/amplify-sdk/commit/ea4a3ac))
197
- - **erc20:** add getTokenPermitInfoWithAllowance with unified multicall ([bed1126](https://github.com/Ion-Protocol/amplify-sdk/commit/bed1126))
198
- - **erc20:** enhance token permit info with name and version ([3af2f9d](https://github.com/Ion-Protocol/amplify-sdk/commit/3af2f9d))
199
-
200
- ### Bug Fixes
201
-
202
- - **chain:** update Sei chain ID from 713715 to 1329 ([4b0fafb](https://github.com/Ion-Protocol/amplify-sdk/commit/4b0fafb))
203
- - **test:** add missing multicall mock to deposit-with-permit tests ([8fe2d41](https://github.com/Ion-Protocol/amplify-sdk/commit/8fe2d41))
204
- - **telemetry:** prevent duplicate buffer-full warning messages ([29c6513](https://github.com/Ion-Protocol/amplify-sdk/commit/29c6513))
205
-
206
- ### Code Refactoring
207
-
208
- - **deposit:** convert DepositAuthMethod enum to `as const` pattern ([8af9ac8](https://github.com/Ion-Protocol/amplify-sdk/commit/8af9ac8))
209
- - **approvals:** use unified multicall for isDepositSpendApproved ([a9aaadc](https://github.com/Ion-Protocol/amplify-sdk/commit/a9aaadc))
210
- - **deposit:** use multicall for permit signature token reads ([016666c](https://github.com/Ion-Protocol/amplify-sdk/commit/016666c))
211
- - **api:** centralize API_BASE_URL constant ([a0b9a9b](https://github.com/Ion-Protocol/amplify-sdk/commit/a0b9a9b))
212
-
213
- ### Tests
214
-
215
- - **deposit:** add unit tests for unified deposit wrapper functions ([7a9d4ff](https://github.com/Ion-Protocol/amplify-sdk/commit/7a9d4ff))
216
- - **utils:** add comprehensive tests for address and time utilities ([5f46bf4](https://github.com/Ion-Protocol/amplify-sdk/commit/5f46bf4))
217
-
218
- ### Documentation
219
-
220
- - add llms.txt and improve API documentation ([e4755d8](https://github.com/Ion-Protocol/amplify-sdk/commit/e4755d8))
221
- - update AGENTS.md for unified deposit API, logging, and telemetry ([0e43447](https://github.com/Ion-Protocol/amplify-sdk/commit/0e43447))
222
- - fix isDepositSpendApproved usage and function naming in docs ([e48315f](https://github.com/Ion-Protocol/amplify-sdk/commit/e48315f))
223
- - clarify YieldType dual export pattern ([120ef43](https://github.com/Ion-Protocol/amplify-sdk/commit/120ef43))
224
- - update slippage default to 0.5% and document partnerCode param ([573bc3b](https://github.com/Ion-Protocol/amplify-sdk/commit/573bc3b))
225
-
226
- ## [0.2.4](///compare/v0.2.3-beta.2...v0.2.4) (2026-01-20)
227
-
228
- ## [0.2.2](///compare/v0.2.3-beta.2...v0.2.4) (2026-01-09)
229
-
230
- ## [0.2.0](///compare/v0.2.3-beta.2...v0.2.4) (2026-01-05)
231
-
232
- ## [0.2.2](///compare/v0.2.0-beta.4...v0.2.2) (2026-01-09)
233
-
234
- ## [0.2.0-beta.4](///compare/v0.2.0-beta.4...v0.2.2) (2026-01-09)
235
-
236
- ## [0.2.0](///compare/v0.2.0-beta.4...v0.2.2) (2026-01-05)
237
-
238
- ## [0.2.0](///compare/v0.2.0-beta.2...v0.2.0) (2026-01-05)
239
-
240
- ## [0.1.1](///compare/v0.1.1-beta.1...v0.1.1) (2025-12-10)
241
-
242
- ## [0.1.1-beta.0](///compare/v0.1.1-alpha.5...v0.1.1-beta.0) (2025-12-10)
243
-
244
- ## [0.1.1-alpha.5](///compare/v0.1.1-alpha.4...v0.1.1-alpha.5) (2025-12-10)
245
-
246
- ## [0.1.1-alpha.4](///compare/v0.1.1-alpha.3...v0.1.1-alpha.4) (2025-12-10)
247
-
248
- ## [0.1.1-alpha.3](///compare/v0.1.1-alpha.2...v0.1.1-alpha.3) (2025-12-10)
249
-
250
- ## [0.1.1-alpha.2](///compare/v0.1.1-alpha.1...v0.1.1-alpha.2) (2025-12-10)
251
-
252
- ### Bug Fixes
253
-
254
- - **types:** correct DepositTxData args tuple and withdraw docs 748593e
255
-
256
- ## [0.1.1-alpha.1](///compare/v0.1.1-alpha.0...v0.1.1-alpha.1) (2025-12-10)
257
-
258
- ### Bug Fixes
259
-
260
- - **release:** resolve whatBump is not a function error 1d5d0e3
261
-
262
- ## <small>0.1.1-alpha.0 (2025-12-10)</small>
263
-
264
- - docs(deposits): update spender references from Teller to CommunityCodeDepositor ([6af71db](https://github.com/Ion-Protocol/amplify-sdk/commit/6af71db))
265
- - test(deposit): update permit spender test to expect CommunityCodeDepositor ([4631512](https://github.com/Ion-Protocol/amplify-sdk/commit/4631512))
266
- - fix(deposit): resolve linting and test issues after CommunityCodeDepositor refactor ([e20c464](https://github.com/Ion-Protocol/amplify-sdk/commit/e20c464))
267
- - fix(deposit): use CommunityCodeDepositor as permit spender ([a65b793](https://github.com/Ion-Protocol/amplify-sdk/commit/a65b793))
268
- - ci(release): pin Ubuntu runner to 24.04 LTS ([4fb959e](https://github.com/Ion-Protocol/amplify-sdk/commit/4fb959e))
269
- - build(git-hooks): add Husky and Commitlint for conventional commits enforcement ([010e867](https://github.com/Ion-Protocol/amplify-sdk/commit/010e867))
270
- - refactor(deposit): use CommunityCodeDepositor for all deposits ([5c51cc3](https://github.com/Ion-Protocol/amplify-sdk/commit/5c51cc3))
271
-
272
- ## [0.1.0](https://github.com/Ion-Protocol/amplify-sdk/compare/v0.1.0-beta.0...v0.1.0) (2025-12-08)
273
-
274
- ## [0.1.0-beta.0](https://github.com/Ion-Protocol/amplify-sdk/compare/v0.1.0-alpha.0...v0.1.0-beta.0) (2025-12-08)
275
-
276
- ## [0.1.0-alpha.0](https://github.com/Ion-Protocol/amplify-sdk/compare/v0.0.2...v0.1.0-alpha.0) (2025-12-08)
277
-
278
- ### Features
279
-
280
- - **deposit:** export CommunityCodeDepositTxData type and fix cache check ([426f711](https://github.com/Ion-Protocol/amplify-sdk/commit/426f7116ddd72309aca2e77117a622d6a6a1e0dd))
281
-
282
- ### Bug Fixes
283
-
284
- - **deposit:** update CommunityCodeDepositor support for partner code deposits ([c8c281e](https://github.com/Ion-Protocol/amplify-sdk/commit/c8c281efcbc69b9ce3fd887c5ece6a19688004f3))
285
- - **lint:** remove unused variables and useless try-catch ([5d1ed6d](https://github.com/Ion-Protocol/amplify-sdk/commit/5d1ed6dc73693714127d6ea79afff781b34c1bab))
286
- - **types:** improve type safety and chain cache initialization ([03bcf41](https://github.com/Ion-Protocol/amplify-sdk/commit/03bcf4171fd72fc1bd55d84301cd78f55f2d57b2))
287
-
288
- ### Styles
289
-
290
- - apply formatting and update branding to Amplify SDK ([c9f4d19](https://github.com/Ion-Protocol/amplify-sdk/commit/c9f4d193286b6b5fdfdf18a26ce9f6e2704f719f))
291
-
292
- ### Code Refactoring
293
-
294
- - **chain-utils:** remove redundant optional chaining after null check ([22f1181](https://github.com/Ion-Protocol/amplify-sdk/commit/22f1181e9e670436a2eda1d6ef7e6921a4c61188))
295
-
296
- ## [0.0.1-alpha.1] - 2025-11-01
297
-
298
- ### Features
299
-
300
- - Initial SDK implementation with comprehensive AmplifyVault support
301
- - Multi-chain support (PRIME) Earn vaults
302
- - Complete deposit functionality with approval management and slippage protection
303
- - Cross-chain bridging support for deposit and withdrawal flows
304
- - **New Withdraw Flow (Phase 5)**:
305
- - Prepare withdrawal transactions with `prepareWithdrawTransactionData()`
306
- - Automatic vault data fetching and caching via `fetchSupportedAssets()`
307
- - Three-field vault resolution (yieldType + wantToken + chainId)
308
- - Configurable slippage protection (default 1%, in basis points)
309
- - Full TypeScript type safety for all withdraw operations
310
- - Comprehensive error handling with specific error codes
311
- - Exchange rate calculations and approval management
312
- - Complete TypeScript support with full type safety
313
-
314
- ### Build System
315
-
316
- - Added automated release workflow with conventional commits
317
- - Configured semantic versioning with alpha/beta/rc support
318
- - Implemented comprehensive CI/CD pipeline with quality gates
319
- - Added security auditing and dependency scanning
320
- - Configured automated NPM publishing with provenance
package/LICENSE DELETED
@@ -1,28 +0,0 @@
1
- BSD 3-Clause License
2
-
3
- Copyright (c) 2025, PaxosLabs
4
-
5
- Redistribution and use in source and binary forms, with or without
6
- modification, are permitted provided that the following conditions are met:
7
-
8
- 1. Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
10
-
11
- 2. Redistributions in binary form must reproduce the above copyright notice,
12
- this list of conditions and the following disclaimer in the documentation
13
- and/or other materials provided with the distribution.
14
-
15
- 3. Neither the name of the copyright holder nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md DELETED
@@ -1,119 +0,0 @@
1
- ```
2
- _____ .__ .__ _____ _________________ ____ __.
3
- / _ \ _____ ______ | | |__|/ ____\__.__. / _____/\______ \ | |/ _|
4
- / /_\ \ / \\____ \| | | \ __< | | \_____ \ | | \| <
5
- / | \ Y Y \ |_> > |_| || | \___ | / \ | ` \ | \
6
- \____|__ /__|_| / __/|____/__||__| / ____| /_______ //_______ /____|__ \
7
- \/ \/|__| \/ \/ \/ \/
8
- ```
9
-
10
- # Paxos Labs Amplify SDK
11
-
12
- A TypeScript SDK for interacting with Paxos Labs Amplify Vaults, providing type-safe functions for discovering vaults, depositing assets, and withdrawing across multiple blockchain networks.
13
-
14
- [![npm version](https://img.shields.io/npm/v/@paxoslabs/amplify-sdk.svg)](https://www.npmjs.com/package/@paxoslabs/amplify-sdk)
15
- [![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
16
-
17
- ## Features
18
-
19
- - **Vault Discovery** - Query available vaults and supported assets via API
20
- - **Deposits** - Deposit assets into vaults with slippage protection
21
- - **Withdrawals** - Withdraw assets from vaults with deadline protection
22
- - **Permit Deposits** - Gas-optimized deposits using EIP-2612 permit signatures
23
- - **Cache Management** - Optimize API calls with built-in caching
24
- - **Multi-Chain Support** - Seamless operations across 7+ blockchain networks
25
- - **Full TypeScript Support** - Complete type definitions and autocomplete
26
- - **React Ready** - Works with viem (vanilla) and wagmi (React hooks)
27
-
28
- ## Installation
29
-
30
- ```bash
31
- # npm
32
- npm install @paxoslabs/amplify-sdk viem
33
-
34
- # yarn
35
- yarn add @paxoslabs/amplify-sdk viem
36
-
37
- # pnpm
38
- pnpm add @paxoslabs/amplify-sdk viem
39
-
40
- # For React apps, also install wagmi
41
- pnpm add wagmi @tanstack/react-query
42
- ```
43
-
44
- ## Quick Start
45
-
46
- ```typescript
47
- import {
48
- initAmplifySDK,
49
- prepareDepositAuthorization,
50
- prepareDeposit,
51
- DepositAuthMethod,
52
- } from '@paxoslabs/amplify-sdk'
53
-
54
- // Initialize SDK with your API key
55
- await initAmplifySDK('pxl_your_api_key')
56
-
57
- // Or initialize with custom RPC URLs for better reliability
58
- await initAmplifySDK('pxl_your_api_key', {
59
- rpcUrls: {
60
- 1: 'https://my-eth-rpc.com', // Ethereum
61
- 999: 'https://my-hyperEVM-rpc.com', // HyperEVM
62
- },
63
- })
64
-
65
- // Prepare deposit authorization (auto-detects permit vs approval)
66
- const auth = await prepareDepositAuthorization({
67
- yieldType: 'CORE',
68
- depositAsset: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
69
- depositAmount: '1000.0',
70
- to: userAddress,
71
- chainId: 1,
72
- })
73
-
74
- // Shared deposit parameters
75
- const depositParams = {
76
- yieldType: 'CORE',
77
- depositAsset: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
78
- depositAmount: '1000.0',
79
- to: userAddress,
80
- chainId: 1,
81
- }
82
-
83
- // Handle based on authorization method
84
- if (auth.method === DepositAuthMethod.PERMIT) {
85
- // Token supports EIP-2612: sign permit and deposit in one transaction
86
- const signature = await signTypedData(auth.permitData)
87
- const tx = await prepareDeposit({
88
- ...depositParams,
89
- signature,
90
- deadline: auth.permitData.message.deadline,
91
- })
92
- await writeContract(tx.txData)
93
- } else if (auth.method === DepositAuthMethod.APPROVAL) {
94
- // Token requires ERC20 approval: approve first, then deposit
95
- await writeContract(auth.txData)
96
- const tx = await prepareDeposit(depositParams)
97
- await writeContract(tx.txData)
98
- } else if (auth.method === DepositAuthMethod.ALREADY_APPROVED) {
99
- // Sufficient allowance exists: proceed directly to deposit
100
- const tx = await prepareDeposit(depositParams)
101
- await writeContract(tx.txData)
102
- }
103
- ```
104
-
105
- ## Documentation
106
-
107
- Full documentation at https://developers.paxoslabs.com/
108
-
109
- ## License
110
-
111
- BSD © Paxos Labs
112
-
113
- ---
114
-
115
- **Need Help?**
116
-
117
- - 📖 [Full Documentation](./docs/getting-started.mdx)
118
- - 🐛 [Report Issues](https://github.com/Ion-Protocol/amplify-sdk/issues)
119
- - 💬 [GitHub Discussions](https://github.com/Ion-Protocol/amplify-sdk/discussions)