@gearbox-protocol/ui-kit 3.5.0 → 3.5.1

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.
@@ -3,8 +3,9 @@
3
3
  * ==================================
4
4
  *
5
5
  * Self-contained type definitions for the pool-list endpoint response.
6
- * The client maps this response 1-to-1 into the `PoolTable` component from
7
- * `@gearbox-protocol/ui-kit`.
6
+ * The client maps pool / APY / points fields into the `PoolTable` component from
7
+ * `@gearbox-protocol/ui-kit` and resolves token metadata (icons, decimals, titles)
8
+ * locally (e.g. SDK + `tokensList` on each row).
8
9
  *
9
10
  * Copy this file into your backend repo — it has **zero npm dependencies**.
10
11
  *
@@ -25,7 +26,6 @@ type Address = `0x${string}`;
25
26
  * ```jsonc
26
27
  * GET /v1/pools?chainIds=1,42161&wallet=0x…
27
28
  * {
28
- * "tokens": { "0xabc…": { "symbol":"USDC", "title":"USDC", "decimals":6 } },
29
29
  * "rows": [ … ]
30
30
  * }
31
31
  * ```
@@ -33,14 +33,6 @@ type Address = `0x${string}`;
33
33
  export interface PoolTableListResponse {
34
34
  /** One entry per pool visible in the table. */
35
35
  rows: PoolTableRowDTO[];
36
- /**
37
- * Global token dictionary shared by all rows.
38
- * Must contain **at least** every `underlyingToken`, every address in
39
- * `collateralTokens`, and every `rewardToken` from `apy.extraAPY`.
40
- *
41
- * Key = lower-case token address.
42
- */
43
- tokens: Record<Address, TokenMetaDTO>;
44
36
  }
45
37
  export interface PoolTableRowDTO {
46
38
  pool: PoolDTO;
@@ -81,7 +73,11 @@ export interface PoolDTO {
81
73
  * Unit: **basis points** (10 000 = 100%).
82
74
  */
83
75
  borrowAPY?: number;
84
- /** Active collateral token addresses for the "Collateral" column. */
76
+ /**
77
+ * Active collateral token addresses for the "Collateral" column.
78
+ * Token symbols/decimals for display are resolved on the client (no server-side
79
+ * token dictionary in this response).
80
+ */
85
81
  collateralTokens?: Address[];
86
82
  /** User's pool position value in USD ("Your Balance" column). */
87
83
  userBalanceInUSD?: number;
@@ -119,8 +115,6 @@ export interface PoolExternalApyDTO {
119
115
  value?: number;
120
116
  /** Source name, e.g. "Curve". */
121
117
  name: string;
122
- /** i18n key or free-form string for tooltip. */
123
- tooltip?: string;
124
118
  }
125
119
  export interface PoolApy7DaysAgoDTO {
126
120
  totalAPY?: number;
@@ -145,16 +139,4 @@ export interface PoolApyPointRewardHintDTO {
145
139
  name?: string;
146
140
  type?: string;
147
141
  }
148
- export interface TokenMetaDTO {
149
- /** Ticker, e.g. "USDC". */
150
- symbol: string;
151
- /** Human-readable name, e.g. "USD Coin". */
152
- title?: string;
153
- /** URL or static asset path for the token icon. */
154
- icon?: string;
155
- /** Full token name (rarely different from title). */
156
- name?: string;
157
- /** Token decimals — required for correct amount formatting on the client. */
158
- decimals: number;
159
- }
160
142
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "description": "Internal UI components",
5
5
  "repository": "https://github.com/gearbox-protocol/ui-kit",
6
6
  "license": "MIT",