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