@gauntlet-xyz/sdk 2.3.0 → 2.5.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 (86) hide show
  1. package/README.md +52 -0
  2. package/dist/api/client.d.ts +22 -1
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/client.js +11 -1
  5. package/dist/api/client.js.map +1 -1
  6. package/dist/api/generated.d.ts +51 -7
  7. package/dist/api/generated.d.ts.map +1 -1
  8. package/dist/api/index.d.ts +1 -1
  9. package/dist/api/index.d.ts.map +1 -1
  10. package/dist/api/index.js.map +1 -1
  11. package/dist/errors.d.ts +11 -0
  12. package/dist/errors.d.ts.map +1 -1
  13. package/dist/errors.js +21 -2
  14. package/dist/errors.js.map +1 -1
  15. package/dist/evm/abis/priceAndFeeCalculatorV2.d.ts +44 -0
  16. package/dist/evm/abis/priceAndFeeCalculatorV2.d.ts.map +1 -1
  17. package/dist/evm/abis/priceAndFeeCalculatorV2.js +22 -0
  18. package/dist/evm/abis/priceAndFeeCalculatorV2.js.map +1 -1
  19. package/dist/evm/abis/provisionerV2.d.ts +56 -0
  20. package/dist/evm/abis/provisionerV2.d.ts.map +1 -1
  21. package/dist/evm/abis/provisionerV2.js +33 -0
  22. package/dist/evm/abis/provisionerV2.js.map +1 -1
  23. package/dist/evm/adapters/aera.d.ts.map +1 -1
  24. package/dist/evm/adapters/aera.js +41 -10
  25. package/dist/evm/adapters/aera.js.map +1 -1
  26. package/dist/evm/adapters/types.d.ts +2 -0
  27. package/dist/evm/adapters/types.d.ts.map +1 -1
  28. package/dist/evm/aeraContracts/priceAndFeeCalculator.d.ts +10 -5
  29. package/dist/evm/aeraContracts/priceAndFeeCalculator.d.ts.map +1 -1
  30. package/dist/evm/aeraContracts/priceAndFeeCalculator.js +39 -5
  31. package/dist/evm/aeraContracts/priceAndFeeCalculator.js.map +1 -1
  32. package/dist/evm/aeraContracts/readOptions.d.ts +8 -0
  33. package/dist/evm/aeraContracts/readOptions.d.ts.map +1 -0
  34. package/dist/evm/aeraContracts/readOptions.js +4 -0
  35. package/dist/evm/aeraContracts/readOptions.js.map +1 -0
  36. package/dist/evm/aeraContracts/v2.d.ts +373 -2
  37. package/dist/evm/aeraContracts/v2.d.ts.map +1 -1
  38. package/dist/evm/aeraContracts/v2.js +84 -28
  39. package/dist/evm/aeraContracts/v2.js.map +1 -1
  40. package/dist/evm/aeraContracts.d.ts +9 -3
  41. package/dist/evm/aeraContracts.d.ts.map +1 -1
  42. package/dist/evm/aeraContracts.js +69 -8
  43. package/dist/evm/aeraContracts.js.map +1 -1
  44. package/dist/evm/deposit.d.ts.map +1 -1
  45. package/dist/evm/deposit.js +1 -1
  46. package/dist/evm/deposit.js.map +1 -1
  47. package/dist/evm/index.d.ts +8 -0
  48. package/dist/evm/index.d.ts.map +1 -1
  49. package/dist/evm/index.js +3 -0
  50. package/dist/evm/index.js.map +1 -1
  51. package/dist/evm/tokenModes.d.ts +22 -0
  52. package/dist/evm/tokenModes.d.ts.map +1 -0
  53. package/dist/evm/tokenModes.js +34 -0
  54. package/dist/evm/tokenModes.js.map +1 -0
  55. package/dist/evm/withdraw.d.ts +8 -0
  56. package/dist/evm/withdraw.d.ts.map +1 -1
  57. package/dist/evm/withdraw.js +85 -5
  58. package/dist/evm/withdraw.js.map +1 -1
  59. package/dist/evm/withdrawQuote.d.ts +127 -0
  60. package/dist/evm/withdrawQuote.d.ts.map +1 -0
  61. package/dist/evm/withdrawQuote.js +164 -0
  62. package/dist/evm/withdrawQuote.js.map +1 -0
  63. package/dist/index.d.ts +7 -1
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +3 -1
  66. package/dist/index.js.map +1 -1
  67. package/manifest/vaults.json +112 -154
  68. package/package.json +1 -1
  69. package/src/api/client.ts +35 -2
  70. package/src/api/generated.ts +51 -7
  71. package/src/api/index.ts +5 -0
  72. package/src/errors.ts +32 -2
  73. package/src/evm/abis/priceAndFeeCalculatorV2.ts +22 -0
  74. package/src/evm/abis/provisionerV2.ts +33 -0
  75. package/src/evm/adapters/aera.ts +50 -23
  76. package/src/evm/adapters/types.ts +2 -0
  77. package/src/evm/aeraContracts/priceAndFeeCalculator.ts +72 -5
  78. package/src/evm/aeraContracts/readOptions.ts +3 -0
  79. package/src/evm/aeraContracts/v2.ts +158 -34
  80. package/src/evm/aeraContracts.ts +81 -8
  81. package/src/evm/deposit.ts +2 -1
  82. package/src/evm/index.ts +32 -0
  83. package/src/evm/tokenModes.ts +54 -0
  84. package/src/evm/withdraw.ts +131 -7
  85. package/src/evm/withdrawQuote.ts +360 -0
  86. package/src/index.ts +16 -0
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026-07-29",
2
+ "version": "2026-08-05",
3
3
  "vaults": [
4
4
  {
5
5
  "vaultId": "baseUsdcPrime",
@@ -1534,90 +1534,6 @@
1534
1534
  }
1535
1535
  ]
1536
1536
  },
1537
- {
1538
- "vaultId": "junoMxnbPrime",
1539
- "name": "Juno MXNB Prime",
1540
- "protocol": "morpho",
1541
- "strategy": "Prime Lending v2",
1542
- "deployments": [
1543
- {
1544
- "chain": "evm",
1545
- "chainId": 8453,
1546
- "vaultAddress": "0x08cc279532f159BdB450eBc0bAf6562f585Ded58",
1547
- "vaultType": "single-depositor",
1548
- "supplyToken": [
1549
- {
1550
- "address": "0xF197FFC28c23E0309B5559e7a166f2c6164C80aA",
1551
- "symbol": "MXNB",
1552
- "decimals": 6
1553
- }
1554
- ]
1555
- }
1556
- ]
1557
- },
1558
- {
1559
- "vaultId": "tempoPathusdPrime",
1560
- "name": "Gauntlet pathUSD Prime",
1561
- "protocol": "morpho",
1562
- "strategy": "Prime Lending v2",
1563
- "deployments": [
1564
- {
1565
- "chain": "evm",
1566
- "chainId": 4217,
1567
- "vaultAddress": "0xC609656Ed9ef219c98C8e549bF729144F211f06E",
1568
- "vaultType": "single-depositor",
1569
- "supplyToken": [
1570
- {
1571
- "address": "0x20C0000000000000000000000000000000000000",
1572
- "symbol": "pathUSD",
1573
- "decimals": 6
1574
- }
1575
- ]
1576
- }
1577
- ]
1578
- },
1579
- {
1580
- "vaultId": "tempoPathusdFrontier",
1581
- "name": "Gauntlet pathUSD Frontier",
1582
- "protocol": "morpho",
1583
- "strategy": "Frontier Lending v2",
1584
- "deployments": [
1585
- {
1586
- "chain": "evm",
1587
- "chainId": 4217,
1588
- "vaultAddress": "0xe5235da8Ad839dd2A9De1f1069c89cA3575b5208",
1589
- "vaultType": "single-depositor",
1590
- "supplyToken": [
1591
- {
1592
- "address": "0x20C0000000000000000000000000000000000000",
1593
- "symbol": "pathUSD",
1594
- "decimals": 6
1595
- }
1596
- ]
1597
- }
1598
- ]
1599
- },
1600
- {
1601
- "vaultId": "stableUsdtEarn",
1602
- "name": "Gauntlet USDT StableEarn",
1603
- "protocol": "morpho",
1604
- "strategy": "Frontier Lending v2",
1605
- "deployments": [
1606
- {
1607
- "chain": "evm",
1608
- "chainId": 988,
1609
- "vaultAddress": "0xb7Df8db22A5DBBFA9ebeb94b3910aec6a4f05c08",
1610
- "vaultType": "single-depositor",
1611
- "supplyToken": [
1612
- {
1613
- "address": "0x779Ded0c9e1022225f8E0630b35a9b54bE713736",
1614
- "symbol": "USDT0",
1615
- "decimals": 6
1616
- }
1617
- ]
1618
- }
1619
- ]
1620
- },
1621
1537
  {
1622
1538
  "vaultId": "gtusda",
1623
1539
  "name": "Gauntlet USD Alpha",
@@ -1830,7 +1746,7 @@
1830
1746
  "chainId": 1,
1831
1747
  "vaultAddress": "0x00000000d8f3d6c5DFeB2D2b5ED2276095f3aF44",
1832
1748
  "vaultType": "multi-depositor",
1833
- "expirationDays": 64,
1749
+ "expirationDays": 90,
1834
1750
  "supplyToken": [
1835
1751
  {
1836
1752
  "address": "0xc26a6fa2c37b38e549a4a1807543801db684f99c",
@@ -1857,7 +1773,7 @@
1857
1773
  "chainId": 1,
1858
1774
  "vaultAddress": "0x953Ca96b057D5397CE7791C5AE9b5a19b1352341",
1859
1775
  "vaultType": "multi-depositor",
1860
- "expirationDays": 64,
1776
+ "expirationDays": 90,
1861
1777
  "supplyToken": [
1862
1778
  {
1863
1779
  "address": "0x99e05cdbeac5d91150935c59ff8e9ba9945d6884",
@@ -2117,74 +2033,11 @@
2117
2033
  }
2118
2034
  ]
2119
2035
  },
2120
- {
2121
- "vaultId": "lidov3stg",
2122
- "name": "evstETH Stg",
2123
- "protocol": "aera",
2124
- "strategy": "Lido V3 wstETH Leverage",
2125
- "deployments": [
2126
- {
2127
- "chain": "evm",
2128
- "chainId": 1,
2129
- "vaultAddress": "0x0313C149AB341e8A3695edC472c8723F27379315",
2130
- "vaultType": "multi-depositor",
2131
- "supplyToken": [
2132
- {
2133
- "address": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
2134
- "symbol": "wstETH",
2135
- "decimals": 18
2136
- }
2137
- ]
2138
- }
2139
- ]
2140
- },
2141
- {
2142
- "vaultId": "pestovault",
2143
- "name": "PestoVault",
2144
- "protocol": "aera",
2145
- "strategy": "Multi-strategy Stablecoin Yield",
2146
- "deployments": [
2147
- {
2148
- "chain": "evm",
2149
- "chainId": 1,
2150
- "vaultAddress": "0x4D6F5E146f248392228b711162dc585F95daC067",
2151
- "vaultType": "multi-depositor",
2152
- "supplyToken": [
2153
- {
2154
- "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
2155
- "symbol": "USDC",
2156
- "decimals": 6
2157
- }
2158
- ]
2159
- }
2160
- ]
2161
- },
2162
- {
2163
- "vaultId": "devburrito",
2164
- "name": "BurritoVault",
2165
- "protocol": "aera",
2166
- "strategy": "Multi-strategy Stablecoin Yield",
2167
- "deployments": [
2168
- {
2169
- "chain": "evm",
2170
- "chainId": 8453,
2171
- "vaultAddress": "0xE5E6f0e217b1eA3ADE09324b69F5765662b9e061",
2172
- "vaultType": "multi-depositor",
2173
- "supplyToken": [
2174
- {
2175
- "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
2176
- "symbol": "USDC",
2177
- "decimals": 6
2178
- }
2179
- ]
2180
- }
2181
- ]
2182
- },
2183
2036
  {
2184
2037
  "vaultId": "gtlpsnib",
2185
- "name": "Gauntlet x SecondFi LP Vault",
2038
+ "name": "gtLPSNIB",
2186
2039
  "protocol": "aera",
2187
- "strategy": "USDC LP Yield",
2040
+ "strategy": "Gauntlet x SecondFi LP Vault",
2188
2041
  "deployments": [
2189
2042
  {
2190
2043
  "chain": "evm",
@@ -2203,9 +2056,9 @@
2203
2056
  },
2204
2057
  {
2205
2058
  "vaultId": "gtlpluia",
2206
- "name": "Gauntlet x Liquid LP Vault",
2059
+ "name": "gtLPLUIA",
2207
2060
  "protocol": "aera",
2208
- "strategy": "USDC LP Yield",
2061
+ "strategy": "Gauntlet x Liquid LP Vault",
2209
2062
  "deployments": [
2210
2063
  {
2211
2064
  "chain": "evm",
@@ -2368,6 +2221,111 @@
2368
2221
  ]
2369
2222
  }
2370
2223
  ]
2224
+ },
2225
+ {
2226
+ "vaultId": "stgusdhy",
2227
+ "name": "stgUSDhy",
2228
+ "protocol": "aera",
2229
+ "strategy": "Gauntlet High Yield Staging",
2230
+ "deployments": [
2231
+ {
2232
+ "chain": "evm",
2233
+ "chainId": 1,
2234
+ "vaultAddress": "0x12081d6D2fC9AFe58390FF7B8909c8A31d4F4Ff2",
2235
+ "vaultType": "multi-depositor",
2236
+ "supplyToken": [
2237
+ {
2238
+ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
2239
+ "symbol": "USDC",
2240
+ "decimals": 6
2241
+ }
2242
+ ]
2243
+ }
2244
+ ]
2245
+ },
2246
+ {
2247
+ "vaultId": "gtusdhy",
2248
+ "name": "gtUSDhy",
2249
+ "protocol": "aera",
2250
+ "strategy": "Gauntlet High Yield Prod",
2251
+ "deployments": [
2252
+ {
2253
+ "chain": "evm",
2254
+ "chainId": 1,
2255
+ "vaultAddress": "0x15218Fbb0Efc0A3D5D731a242d853fa625532C3D",
2256
+ "vaultType": "multi-depositor",
2257
+ "supplyToken": [
2258
+ {
2259
+ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
2260
+ "symbol": "USDC",
2261
+ "decimals": 6
2262
+ }
2263
+ ]
2264
+ }
2265
+ ]
2266
+ },
2267
+ {
2268
+ "vaultId": "gtlooper",
2269
+ "name": "sUSDS Looping Dev",
2270
+ "protocol": "aera",
2271
+ "strategy": "sUSDS Looping",
2272
+ "deployments": [
2273
+ {
2274
+ "chain": "evm",
2275
+ "chainId": 1,
2276
+ "vaultAddress": "0x65bC393D16381b292221A664a783812A89f11DE6",
2277
+ "vaultType": "multi-depositor",
2278
+ "supplyToken": [
2279
+ {
2280
+ "address": "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
2281
+ "symbol": "USDS",
2282
+ "decimals": 18
2283
+ }
2284
+ ]
2285
+ }
2286
+ ]
2287
+ },
2288
+ {
2289
+ "vaultId": "stgskylev",
2290
+ "name": "sUSDS Looping Staging",
2291
+ "protocol": "aera",
2292
+ "strategy": "sUSDS Looping",
2293
+ "deployments": [
2294
+ {
2295
+ "chain": "evm",
2296
+ "chainId": 1,
2297
+ "vaultAddress": "0x8BE13F43F1693F98343bD0C3DB6bE705D57221A3",
2298
+ "vaultType": "multi-depositor",
2299
+ "supplyToken": [
2300
+ {
2301
+ "address": "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
2302
+ "symbol": "USDS",
2303
+ "decimals": 18
2304
+ }
2305
+ ]
2306
+ }
2307
+ ]
2308
+ },
2309
+ {
2310
+ "vaultId": "gtskylooping",
2311
+ "name": "Gauntlet sUSDS Looping",
2312
+ "protocol": "aera",
2313
+ "strategy": "sUSDS Looping",
2314
+ "deployments": [
2315
+ {
2316
+ "chain": "evm",
2317
+ "chainId": 1,
2318
+ "vaultAddress": "0xeA40De595f099cA04695b0Ca105499E50AF77f92",
2319
+ "vaultType": "multi-depositor",
2320
+ "supplyToken": [
2321
+ {
2322
+ "address": "0xdC035D45d973E3EC169d2276DDab16f1e407384F",
2323
+ "symbol": "USDS",
2324
+ "decimals": 18
2325
+ }
2326
+ ]
2327
+ }
2328
+ ]
2371
2329
  }
2372
2330
  ]
2373
2331
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gauntlet-xyz/sdk",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "Official Gauntlet SDK for vault deposits, withdrawals, and attribution",
5
5
  "license": "MIT",
6
6
  "keywords": [
package/src/api/client.ts CHANGED
@@ -15,6 +15,10 @@ export type VaultDetailResponse = Schemas['VaultDetailResponse'];
15
15
  export type VaultTimeseriesResponse = Schemas['VaultTimeseriesResponse'];
16
16
  export type VaultTimeseriesPoint = Schemas['VaultTimeseriesPoint'];
17
17
  export type VaultMetrics = Schemas['VaultMetrics'];
18
+ export type FeaturedVault = Schemas['FeaturedVault'];
19
+ export type FeaturedVaultsResponse = Schemas['FeaturedVaultsResponse'];
20
+ export type StrategyCard = Schemas['StrategyCard'];
21
+ export type StrategyListResponse = Schemas['StrategyListResponse'];
18
22
  export type TvlResponse = Schemas['TvlResponse'];
19
23
  export type LatestPriceResponse = Schemas['LatestPriceResponse'];
20
24
  export type PriceTimeseriesResponse = Schemas['TimeseriesResponse'];
@@ -42,6 +46,20 @@ export interface TimeWindowOptions extends PageOptions {
42
46
  export interface ActivityOptions extends PageOptions {
43
47
  /** CAIP-10 vault id (`"{chainId}:{address}"`). Omit for wallet-wide activity. */
44
48
  vaultId?: string;
49
+ /**
50
+ * Wallet-wide feeds only: include activity in hidden (enabled but unlisted)
51
+ * vaults alongside visible ones. Activity in disabled vaults is never
52
+ * returned. Ignored when `vaultId` is set.
53
+ */
54
+ includeHidden?: boolean;
55
+ }
56
+
57
+ export interface PositionsOptions extends PageOptions {
58
+ /**
59
+ * Include positions in hidden (enabled but unlisted) vaults alongside
60
+ * visible ones. Positions in disabled vaults are never returned.
61
+ */
62
+ includeHidden?: boolean;
45
63
  }
46
64
 
47
65
  export interface LatestPriceOptions {
@@ -103,6 +121,16 @@ export class GauntletApi {
103
121
  return this.get('/v1/vaults', { next: options.next, limit: options.limit });
104
122
  }
105
123
 
124
+ /** GET /v1/vaults/featured — admin-curated featured vault cards. */
125
+ featuredVaults(): Promise<FeaturedVaultsResponse> {
126
+ return this.get('/v1/vaults/featured');
127
+ }
128
+
129
+ /** GET /v1/strategies — admin-curated strategy cards. */
130
+ strategies(): Promise<StrategyListResponse> {
131
+ return this.get('/v1/strategies');
132
+ }
133
+
106
134
  /** GET /v1/vaults/{vault_id} — one vault with live metrics. `vaultId` is CAIP-10. */
107
135
  vault(vaultId: string): Promise<VaultDetailResponse> {
108
136
  return this.get(`/v1/vaults/${encodeURIComponent(vaultId)}`);
@@ -122,10 +150,14 @@ export class GauntletApi {
122
150
  }
123
151
 
124
152
  /** GET /v1/users/{wallet}/positions — all of a wallet's indexed positions with PnL. */
125
- positions(walletAddress: string, options: PageOptions = {}): Promise<UserAllPositionsResponse> {
153
+ positions(
154
+ walletAddress: string,
155
+ options: PositionsOptions = {}
156
+ ): Promise<UserAllPositionsResponse> {
126
157
  return this.get(`/v1/users/${encodeURIComponent(walletAddress)}/positions`, {
127
158
  next: options.next,
128
159
  limit: options.limit,
160
+ include_hidden: options.includeHidden,
129
161
  });
130
162
  }
131
163
 
@@ -150,9 +182,10 @@ export class GauntletApi {
150
182
 
151
183
  /** GET /v1/users/{wallet}/activity — one page of the wallet's immutable event log. */
152
184
  activity(walletAddress: string, options: ActivityOptions = {}): Promise<UserActivityResponse> {
153
- const { vaultId, ...page } = options;
185
+ const { vaultId, includeHidden, ...page } = options;
154
186
  return this.get(`/v1/users/${encodeURIComponent(walletAddress)}/activity`, {
155
187
  vault_id: vaultId,
188
+ include_hidden: includeHidden,
156
189
  ...page,
157
190
  });
158
191
  }
@@ -223,7 +223,7 @@ export interface paths {
223
223
  };
224
224
  /**
225
225
  * List Gauntlet-curated vaults
226
- * @description Returns identification-only rows for the admin-curated visible vaults, ordered most-recent-first; pass `?include_hidden=true` for every enabled vault (hidden included, disabled never). Use `/{vault_id}` for current metrics, `/{vault_id}/definition` for the full vault definition, `/{vault_id}/timeseries` for history.
226
+ * @description Returns identification-only rows for the admin-curated visible vaults, ordered most-recent-first; pass `?include_hidden=true` for every enabled vault (hidden included, disabled never). Each row's `group.id` groups deployments of the same logical Admin vault, `group.slug` is its unique public route, and `group.is_primary` identifies its representative. Use `/{vault_id}` for current metrics, `/{vault_id}/definition` for the full vault definition, `/{vault_id}/timeseries` for history.
227
227
  *
228
228
  * Cursor-paginated, but the default page size is the cap so most callers don't need to think about it — pass `meta.next_cursor` back as `?next=` only if the result exceeds 1000 vaults.
229
229
  */
@@ -245,7 +245,7 @@ export interface paths {
245
245
  };
246
246
  /**
247
247
  * Get current vault metrics
248
- * @description Returns the current metrics snapshot for a vault — same metric shape that `/timeseries` emits per point, so this is `current point` and timeseries is `historical points`. The vault's protocol-specific definition (fees, hooks, curator, etc.) lives on `/{vault_id}/definition`.
248
+ * @description Returns the current metrics snapshot for a vault — same metric shape that `/timeseries` emits per point, so this is `current point` and timeseries is `historical points`. The vault's Admin grouping is included when the deployment is associated. The protocol-specific definition (fees, hooks, curator, etc.) lives on `/{vault_id}/definition`.
249
249
  */
250
250
  get: operations["get_vault"];
251
251
  put?: never;
@@ -398,8 +398,8 @@ export interface components {
398
398
  description?: string | null;
399
399
  /**
400
400
  * @description Curated display name; falls back to the registry id when the
401
- * curator hasn't named the vault yet. `vault_ids` carries the
402
- * stable identifiers.
401
+ * curator hasn't named the vault yet. `vault_id` carries the
402
+ * stable logical identifier.
403
403
  */
404
404
  name: string;
405
405
  /**
@@ -408,6 +408,8 @@ export interface components {
408
408
  * decide whether to fall back to `description`.
409
409
  */
410
410
  short_description?: string | null;
411
+ /** @description Stable public route for the logical vault group. */
412
+ slug: string;
411
413
  /**
412
414
  * @description Supply (numeraire) token symbol, from the highest-TVL deployment
413
415
  * that reports one.
@@ -421,6 +423,8 @@ export interface components {
421
423
  * `null` when no deployment carried a usable timestamp.
422
424
  */
423
425
  updated_at?: string | null;
426
+ /** @description Stable logical vault id assigned by Admin. */
427
+ vault_id: string;
424
428
  /**
425
429
  * @description Per-deployment API vault ids (`{chainId}:{address}`, same order
426
430
  * as `chains`) for `/v1/vaults/{vault_id}` links.
@@ -451,8 +455,8 @@ export interface components {
451
455
  timestamp: string;
452
456
  };
453
457
  /**
454
- * @description Envelope for unpaginated list endpoints: `count` but no paging
455
- * fields.
458
+ * @description Documented metadata for list endpoints; pagination fields are omitted
459
+ * by unpaginated responses.
456
460
  */
457
461
  ListMeta: {
458
462
  /**
@@ -460,6 +464,13 @@ export interface components {
460
464
  * @description Number of items in this response.
461
465
  */
462
466
  count: number;
467
+ /**
468
+ * Format: int64
469
+ * @description Page-size cap actually applied to paginated lists.
470
+ */
471
+ limit?: number | null;
472
+ /** @description Set when more pages exist; pass back as `?next=`. */
473
+ next_cursor?: string | null;
463
474
  /** @description Item-scoped failures isolated from an aggregate response. */
464
475
  partial_errors?: components["schemas"]["PartialResponseError"][] | null;
465
476
  /** Format: date-time */
@@ -571,6 +582,16 @@ export interface components {
571
582
  data: components["schemas"]["StrategyCard"][];
572
583
  meta: components["schemas"]["ListMeta"];
573
584
  };
585
+ /** @description Curated strategy assignment from the admin registry. */
586
+ StrategyRef: {
587
+ /**
588
+ * @description Strategy label id (`prime_lending`, `earn`, …) — matches
589
+ * `/v1/strategies` card ids.
590
+ */
591
+ id: string;
592
+ /** @description Display name (`Prime Lending`). */
593
+ name: string;
594
+ };
574
595
  TimeseriesMeta: {
575
596
  /**
576
597
  * Format: int64
@@ -789,9 +810,11 @@ export interface components {
789
810
  address: string;
790
811
  /** Format: int64 */
791
812
  chain_id: number;
813
+ group?: null | components["schemas"]["VaultGroupRef"];
792
814
  metrics: components["schemas"]["VaultMetrics"];
793
815
  name: string;
794
816
  numeraire_token: components["schemas"]["TokenRef"];
817
+ strategy?: null | components["schemas"]["StrategyRef"];
795
818
  symbol: string;
796
819
  vault_id: string;
797
820
  vault_type: string;
@@ -800,6 +823,25 @@ export interface components {
800
823
  data: components["schemas"]["VaultDetail"];
801
824
  meta: components["schemas"]["BasicMeta"];
802
825
  };
826
+ /** @description Admin-curated logical grouping for a deployment-level vault row. */
827
+ VaultGroupRef: {
828
+ /** @description Admin-curated deployment date (`YYYY-MM-DD`). */
829
+ deployment_date?: string | null;
830
+ /** @description Admin-curated long-form detail-page copy. */
831
+ description?: string | null;
832
+ /** @description Stable internal group id from the Admin vault registry (`vlt_176`). */
833
+ id: string;
834
+ /** @description Whether this deployment is the group's primary representative. */
835
+ is_primary: boolean;
836
+ /** @description Whether performance views should use a stable-denominated basis. */
837
+ is_stable: boolean;
838
+ /** @description Unique, curator-managed public route (`stgusda`). */
839
+ slug: string;
840
+ };
841
+ VaultListResponse: {
842
+ data: components["schemas"]["VaultDetail"][];
843
+ meta: components["schemas"]["ListMeta"];
844
+ };
803
845
  VaultMetrics: {
804
846
  /** Format: double */
805
847
  apy_7d?: number | null;
@@ -1255,7 +1297,9 @@ export interface operations {
1255
1297
  headers: {
1256
1298
  [name: string]: unknown;
1257
1299
  };
1258
- content?: never;
1300
+ content: {
1301
+ "application/json": components["schemas"]["VaultListResponse"];
1302
+ };
1259
1303
  };
1260
1304
  /** @description Missing or invalid auth */
1261
1305
  401: {
package/src/api/index.ts CHANGED
@@ -3,14 +3,19 @@ export type {
3
3
  ActivityOptions,
4
4
  AmountPair,
5
5
  ChainSyncStatus,
6
+ FeaturedVault,
7
+ FeaturedVaultsResponse,
6
8
  HealthResponse,
7
9
  LatestPriceOptions,
8
10
  LatestPriceResponse,
9
11
  PageOptions,
10
12
  PartialResponseError,
13
+ PositionsOptions,
11
14
  PositionTimeseriesPoint,
12
15
  PriceTimeseriesOptions,
13
16
  PriceTimeseriesResponse,
17
+ StrategyCard,
18
+ StrategyListResponse,
14
19
  TimeseriesMeta,
15
20
  TimeWindowOptions,
16
21
  TokenRef,
package/src/errors.ts CHANGED
@@ -53,7 +53,7 @@ export class UnsupportedDepositModeError extends GauntletSDKError {
53
53
  readonly available: string;
54
54
 
55
55
  constructor(vaultId: string, requested: string, available: string) {
56
- super(`Vault "${vaultId}" does not support ${requested} deposits (available: ${available})`);
56
+ super(`Vault "${vaultId}" does not support ${requested} operations (available: ${available})`);
57
57
  this.name = 'UnsupportedDepositModeError';
58
58
  this.vaultId = vaultId;
59
59
  this.requested = requested;
@@ -73,11 +73,25 @@ export class RpcNotConfiguredError extends GauntletSDKError {
73
73
 
74
74
  export class AccountRequiredError extends GauntletSDKError {
75
75
  constructor() {
76
- super('No account specified. Provide a wallet in the client config.');
76
+ super(
77
+ 'No account specified. Pass the required account, or configure a wallet when building transactions.'
78
+ );
77
79
  this.name = 'AccountRequiredError';
78
80
  }
79
81
  }
80
82
 
83
+ export class AccountMismatchError extends GauntletSDKError {
84
+ readonly expected: string;
85
+ readonly received: string;
86
+
87
+ constructor(expected: string, received: string) {
88
+ super(`Account mismatch: expected "${expected}", received "${received}"`);
89
+ this.name = 'AccountMismatchError';
90
+ this.expected = expected;
91
+ this.received = received;
92
+ }
93
+ }
94
+
81
95
  export class UnsupportedProtocolError extends GauntletSDKError {
82
96
  readonly protocol: string;
83
97
 
@@ -95,6 +109,22 @@ export class InvalidWithdrawParamsError extends GauntletSDKError {
95
109
  }
96
110
  }
97
111
 
112
+ export type SyncWithdrawBound = 'tokensOut' | 'minTokensOut' | 'unitsIn' | 'maxUnitsIn';
113
+
114
+ export class InvalidSyncWithdrawBoundError extends GauntletSDKError {
115
+ readonly bound: SyncWithdrawBound;
116
+
117
+ constructor(bound: SyncWithdrawBound) {
118
+ super(`Sync withdraw cannot submit zero ${bound}; increase the amount or reduce slippage`);
119
+ this.name = 'InvalidSyncWithdrawBoundError';
120
+ this.bound = bound;
121
+ }
122
+ }
123
+
124
+ export function requireNonZeroSyncWithdrawBound(value: bigint, bound: SyncWithdrawBound) {
125
+ if (value === 0n) throw new InvalidSyncWithdrawBoundError(bound);
126
+ }
127
+
98
128
  export class UnimplementedFeatureError extends GauntletSDKError {
99
129
  readonly feature: string;
100
130
 
@@ -47,6 +47,28 @@ export const priceAndFeeCalculatorV2Abi = [
47
47
  outputs: [{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' }],
48
48
  stateMutability: 'view',
49
49
  },
50
+ {
51
+ type: 'function',
52
+ inputs: [
53
+ { name: 'vault', internalType: 'address', type: 'address' },
54
+ { name: 'token', internalType: 'contract IERC20', type: 'address' },
55
+ { name: 'tokenAmount', internalType: 'uint256', type: 'uint256' },
56
+ ],
57
+ name: 'convertTokenToNumeraire',
58
+ outputs: [{ name: 'numeraireAmount', internalType: 'uint256', type: 'uint256' }],
59
+ stateMutability: 'view',
60
+ },
61
+ {
62
+ type: 'function',
63
+ inputs: [
64
+ { name: 'vault', internalType: 'address', type: 'address' },
65
+ { name: 'token', internalType: 'contract IERC20', type: 'address' },
66
+ { name: 'numeraireAmount', internalType: 'uint256', type: 'uint256' },
67
+ ],
68
+ name: 'convertNumeraireToToken',
69
+ outputs: [{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' }],
70
+ stateMutability: 'view',
71
+ },
50
72
  {
51
73
  type: 'function',
52
74
  inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],