@argent/x-shared 1.53.2 → 1.55.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.
@@ -1,82 +1,99 @@
1
- import { z as o } from "zod";
2
- import { addressSchema as t } from "../../../chains/starknet/address.js";
3
- import { apiTokenInfoSchema as l } from "./backend.model.js";
4
- import { defiPositionTypeSchema as p } from "./defiPositionType.model.js";
1
+ import { z as t } from "zod";
2
+ import { addressSchema as o } from "../../../chains/starknet/address.js";
3
+ import { apiTokenInfoSchema as p, apiStrkDelegatedStakingSchema as g } from "./backend.model.js";
4
+ import { defiPositionTypeSchema as m } from "./defiPositionType.model.js";
5
5
  import { webTokenWithBalanceAndPriceSchema as e } from "./webToken.model.js";
6
6
  const i = e.extend({
7
- accruedFees: o.string(),
8
- currentPrice: o.string(),
9
- maxPrice: o.string(),
10
- minPrice: o.string(),
11
- principal: o.string()
12
- }), n = o.object({
13
- address: t.optional(),
14
- currencyValue: o.string().default("0")
15
- }), a = n.extend({
16
- poolFeePercentage: o.string(),
17
- tickSpacingPercentage: o.string().optional(),
18
- tokenId: o.string().optional(),
19
- unitCurrencyValueToken0: o.string().optional(),
20
- unitCurrencyValueToken1: o.string().optional(),
7
+ accruedFees: t.string(),
8
+ currentPrice: t.string(),
9
+ maxPrice: t.string(),
10
+ minPrice: t.string(),
11
+ principal: t.string()
12
+ }), n = t.object({
13
+ address: o.optional(),
14
+ currencyValue: t.string().default("0")
15
+ }), r = n.extend({
16
+ poolFeePercentage: t.string(),
17
+ tickSpacingPercentage: t.string().optional(),
18
+ tokenId: t.string().optional(),
19
+ unitCurrencyValueToken0: t.string().optional(),
20
+ unitCurrencyValueToken1: t.string().optional(),
21
21
  token0: i,
22
22
  token1: i
23
- }), b = o.array(a), f = o.object({
24
- name: o.string().optional(),
25
- healthRatio: o.string().optional(),
26
- accountAddress: t.optional()
27
- }), r = n.extend({
28
- totalBalances: o.record(o.string()),
29
- collateral: o.boolean(),
30
- debt: o.boolean(),
31
- lending: o.boolean(),
32
- apy: o.string().optional(),
33
- totalApy: o.string().optional(),
34
- group: o.string().optional(),
35
- unitCurrencyValue: o.string().optional(),
36
- positionToken: l.or(o.undefined()),
23
+ }), T = t.array(r), x = t.object({
24
+ name: t.string().optional(),
25
+ healthRatio: t.string().optional(),
26
+ accountAddress: o.optional()
27
+ }), s = n.extend({
28
+ totalBalances: t.record(t.string()),
29
+ collateral: t.boolean(),
30
+ debt: t.boolean(),
31
+ lending: t.boolean(),
32
+ apy: t.string().optional(),
33
+ totalApy: t.string().optional(),
34
+ group: t.string().optional(),
35
+ unitCurrencyValue: t.string().optional(),
36
+ positionToken: p.or(t.undefined()),
37
37
  token: e.optional(),
38
- accountAddress: t.optional(),
39
- accountAddressGroup: o.string().optional()
40
- }), T = o.array(r), s = n.extend({
41
- delegatingTo: t,
38
+ accountAddress: o.optional(),
39
+ accountAddressGroup: t.string().optional()
40
+ }), D = t.array(s), c = n.extend({
41
+ delegatingTo: o,
42
42
  token: e.optional(),
43
- balance: o.string(),
44
- unitCurrencyValue: o.string().optional().default("0")
45
- }), A = o.array(s), c = n.extend({
46
- apy: o.string().optional(),
47
- totalApy: o.string().optional(),
48
- unitCurrencyValue: o.string().optional()
49
- }), x = o.array(c), d = a.or(r).or(s).or(c), g = o.record(o.object({
50
- name: o.string().optional(),
51
- healthRatio: o.string().optional(),
52
- accountAddress: t.optional()
53
- })), u = o.object({
54
- type: p,
55
- manageUrl: o.string().url().optional(),
56
- name: o.string(),
57
- positions: o.array(d),
43
+ balance: t.string(),
44
+ unitCurrencyValue: t.string().optional().default("0")
45
+ }), j = t.array(c), a = t.object({
46
+ wei: t.string(),
47
+ eth: t.string(),
48
+ currency: t.string()
49
+ }), l = n.extend({
50
+ id: t.string(),
51
+ total: a,
52
+ apy: t.number(),
53
+ totalApy: t.number(),
54
+ token: e
55
+ }), V = t.array(l), d = n.extend({
56
+ id: t.string(),
57
+ accruedRewards: a,
58
+ stakedAmount: a,
59
+ total: a,
60
+ apy: t.number(),
61
+ totalApy: t.number(),
62
+ stakerInfo: g.shape.data.shape.stakerInfo,
63
+ token: e
64
+ }), C = t.array(d), u = r.or(s).or(c).or(d).or(l), h = t.record(t.object({
65
+ name: t.string().optional(),
66
+ healthRatio: t.string().optional(),
67
+ accountAddress: o.optional()
68
+ })), S = t.object({
69
+ type: m,
70
+ manageUrl: t.string().url().optional(),
71
+ name: t.string(),
72
+ positions: t.array(u),
58
73
  // other types will be added when available from be
59
- positionsTotalValue: o.string(),
60
- brandColor: o.string().optional(),
61
- groups: g.optional(),
62
- accountAddress: t
63
- }), m = o.array(u), V = o.object({
64
- dappId: o.string(),
65
- products: m
74
+ positionsTotalValue: t.string(),
75
+ brandColor: t.string().optional(),
76
+ groups: h.optional(),
77
+ accountAddress: o
78
+ }), k = t.array(S), I = t.object({
79
+ dappId: t.string(),
80
+ products: k
66
81
  });
67
82
  export {
68
- f as collateralizedDebtGroupSchema,
69
- r as collateralizedDebtPositionSchema,
70
- T as collateralizedDebtPositionsSchema,
71
- a as concentratedLiquidityPositionSchema,
72
- b as concentratedLiquidityPositionsSchema,
73
- V as defiDappsProductsSchema,
74
- d as defiPositionSchema,
75
- u as defiProductSchema,
76
- m as defiProductsSchema,
77
- A as delegatedTokensArraySchema,
78
- s as delegatedTokensSchema,
79
- g as productGroupsSchema,
80
- c as stakingPositionSchema,
81
- x as stakingPositionsSchema
83
+ x as collateralizedDebtGroupSchema,
84
+ s as collateralizedDebtPositionSchema,
85
+ D as collateralizedDebtPositionsSchema,
86
+ r as concentratedLiquidityPositionSchema,
87
+ T as concentratedLiquidityPositionsSchema,
88
+ I as defiDappsProductsSchema,
89
+ u as defiPositionSchema,
90
+ S as defiProductSchema,
91
+ k as defiProductsSchema,
92
+ j as delegatedTokensArraySchema,
93
+ c as delegatedTokensSchema,
94
+ h as productGroupsSchema,
95
+ l as stakingPositionSchema,
96
+ V as stakingPositionsSchema,
97
+ C as strkDelegatedStakingPositionArraySchema,
98
+ d as strkDelegatedStakingPositionSchema
82
99
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.53.2",
3
+ "version": "1.55.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"
@@ -44,26 +44,26 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@amplitude/analytics-types": "2.8.4",
47
- "@commitlint/cli": "19.6.0",
47
+ "@commitlint/cli": "19.6.1",
48
48
  "@commitlint/config-conventional": "19.6.0",
49
- "@rollup/plugin-typescript": "12.1.1",
49
+ "@rollup/plugin-typescript": "12.1.2",
50
50
  "@semantic-release/git": "10.0.1",
51
51
  "@types/async-retry": "1.4.9",
52
52
  "@types/lodash-es": "4.17.12",
53
53
  "@types/ua-parser-js": "0.7.39",
54
- "@typescript-eslint/eslint-plugin": "8.16.0",
55
- "@typescript-eslint/parser": "8.16.0",
54
+ "@typescript-eslint/eslint-plugin": "8.18.0",
55
+ "@typescript-eslint/parser": "8.18.0",
56
56
  "eslint": "8.57.1",
57
57
  "eslint-config-prettier": "9.1.0",
58
58
  "eslint-plugin-import": "2.31.0",
59
59
  "husky": "9.1.7",
60
- "lint-staged": "15.2.10",
61
- "msw": "2.6.6",
62
- "prettier": "3.4.1",
60
+ "lint-staged": "15.2.11",
61
+ "msw": "2.6.8",
62
+ "prettier": "3.4.2",
63
63
  "semantic-release": "24.2.0",
64
64
  "ts-to-zod": "3.15.0",
65
65
  "typescript": "5.7.2",
66
- "vite": "6.0.2",
66
+ "vite": "6.0.3",
67
67
  "vite-plugin-dts": "4.3.0",
68
68
  "vitest": "2.1.8"
69
69
  },