@argent/x-shared 1.38.0 → 1.38.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.
@@ -1,30 +1,30 @@
1
1
  import { z as o } from "zod";
2
2
  import { addressSchema as t } from "../../../chains/starknet/address.js";
3
- import { apiTokenInfoSchema as c } from "./backend.model.js";
4
- import { defiPositionTypeSchema as s } from "./defiPositionType.model.js";
5
- import { webTokenWithBalanceAndPriceSchema as e } from "./webToken.model.js";
6
- const n = e.extend({
3
+ import { apiTokenInfoSchema as s } from "./backend.model.js";
4
+ import { defiPositionTypeSchema as l } from "./defiPositionType.model.js";
5
+ import { webTokenWithBalanceAndPriceSchema as n } from "./webToken.model.js";
6
+ const a = n.extend({
7
7
  accruedFees: o.string(),
8
8
  currentPrice: o.string(),
9
9
  maxPrice: o.string(),
10
10
  minPrice: o.string(),
11
11
  principal: o.string()
12
- }), i = o.object({
12
+ }), e = o.object({
13
13
  address: t.optional(),
14
14
  currencyValue: o.string().default("0")
15
- }), a = i.extend({
15
+ }), i = e.extend({
16
16
  poolFeePercentage: o.string(),
17
17
  tickSpacingPercentage: o.string().optional(),
18
18
  tokenId: o.string().optional(),
19
19
  unitCurrencyValueToken0: o.string().optional(),
20
20
  unitCurrencyValueToken1: o.string().optional(),
21
- token0: n,
22
- token1: n
23
- }), b = o.array(a), f = o.object({
21
+ token0: a,
22
+ token1: a
23
+ }), b = o.array(i), f = o.object({
24
24
  name: o.string().optional(),
25
25
  healthRatio: o.string().optional(),
26
26
  accountAddress: t.optional()
27
- }), r = i.extend({
27
+ }), r = e.extend({
28
28
  totalBalances: o.record(o.string()),
29
29
  collateral: o.boolean(),
30
30
  debt: o.boolean(),
@@ -32,37 +32,44 @@ const n = e.extend({
32
32
  apy: o.string().optional(),
33
33
  group: o.string().optional(),
34
34
  unitCurrencyValue: o.string().optional(),
35
- positionToken: c.or(o.undefined()),
36
- token: e.optional(),
35
+ positionToken: s.or(o.undefined()),
36
+ token: n.optional(),
37
37
  accountAddress: t.optional(),
38
38
  accountAddressGroup: o.string().optional()
39
- }), y = o.array(r), l = a.or(r), p = o.record(o.object({
39
+ }), k = o.array(r), c = e.extend({
40
+ delegatingTo: t,
41
+ token: n.optional(),
42
+ balance: o.string(),
43
+ unitCurrencyValue: o.string().optional().default("0")
44
+ }), T = o.array(c), d = i.or(r).or(c), p = o.record(o.object({
40
45
  name: o.string().optional(),
41
46
  healthRatio: o.string().optional(),
42
47
  accountAddress: t.optional()
43
- })), d = o.object({
44
- type: s,
48
+ })), g = o.object({
49
+ type: l,
45
50
  manageUrl: o.string().url().optional(),
46
51
  name: o.string(),
47
- positions: o.array(l),
52
+ positions: o.array(d),
48
53
  // other types will be added when available from be
49
54
  positionsTotalValue: o.string(),
50
55
  brandColor: o.string().optional(),
51
56
  groups: p.optional(),
52
57
  accountAddress: t
53
- }), u = o.array(d), k = o.object({
58
+ }), u = o.array(g), A = o.object({
54
59
  dappId: o.string(),
55
60
  products: u
56
61
  });
57
62
  export {
58
63
  f as collateralizedDebtGroupSchema,
59
64
  r as collateralizedDebtPositionSchema,
60
- y as collateralizedDebtPositionsSchema,
61
- a as concentratedLiquidityPositionSchema,
65
+ k as collateralizedDebtPositionsSchema,
66
+ i as concentratedLiquidityPositionSchema,
62
67
  b as concentratedLiquidityPositionsSchema,
63
- k as defiDappsProductsSchema,
64
- l as defiPositionSchema,
65
- d as defiProductSchema,
68
+ A as defiDappsProductsSchema,
69
+ d as defiPositionSchema,
70
+ g as defiProductSchema,
66
71
  u as defiProductsSchema,
72
+ T as delegatedTokensArraySchema,
73
+ c as delegatedTokensSchema,
67
74
  p as productGroupsSchema
68
75
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),i=e.z.union([e.z.literal("concentratedLiquidityPosition"),e.z.literal("collateralizedDebtPosition"),e.z.literal("staking")]);exports.defiPositionTypeSchema=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),i=e.z.union([e.z.literal("concentratedLiquidityPosition"),e.z.literal("collateralizedDebtPosition"),e.z.literal("delegatedTokens"),e.z.literal("staking")]);exports.defiPositionTypeSchema=i;
@@ -1,3 +1,3 @@
1
1
  import { z } from 'zod';
2
- export declare const defiPositionTypeSchema: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"staking">]>;
2
+ export declare const defiPositionTypeSchema: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"staking">]>;
3
3
  export type DefiPositionType = z.infer<typeof defiPositionTypeSchema>;
@@ -1,9 +1,10 @@
1
1
  import { z as i } from "zod";
2
- const o = i.union([
2
+ const t = i.union([
3
3
  i.literal("concentratedLiquidityPosition"),
4
4
  i.literal("collateralizedDebtPosition"),
5
+ i.literal("delegatedTokens"),
5
6
  i.literal("staking")
6
7
  ]);
7
8
  export {
8
- o as defiPositionTypeSchema
9
+ t as defiPositionTypeSchema
9
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.38.0",
3
+ "version": "1.38.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"