@argent/x-shared 1.58.0 → 1.59.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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),t=require("../../../chains/starknet/address.cjs"),m=require("./backend.model.cjs"),p=require("./defiPositionType.model.cjs"),o=require("./webToken.model.cjs"),l=o.webTokenWithBalanceAndPriceSchema.extend({accruedFees:e.z.string(),currentPrice:e.z.string(),maxPrice:e.z.string(),minPrice:e.z.string(),principal:e.z.string()}),a=e.z.object({address:t.addressSchema.optional(),currencyValue:e.z.string().default("0")}),i=a.extend({poolFeePercentage:e.z.string(),tickSpacingPercentage:e.z.string().optional(),tokenId:e.z.string().optional(),unitCurrencyValueToken0:e.z.string().optional(),unitCurrencyValueToken1:e.z.string().optional(),token0:l,token1:l}),S=e.z.array(i),k=e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:t.addressSchema.optional()}),r=a.extend({totalBalances:e.z.record(e.z.string()),collateral:e.z.boolean(),debt:e.z.boolean(),lending:e.z.boolean(),apy:e.z.string().optional(),totalApy:e.z.string().optional(),group:e.z.string().optional(),unitCurrencyValue:e.z.string().optional(),positionToken:m.apiTokenInfoSchema.or(e.z.undefined()),token:o.webTokenWithBalanceAndPriceSchema.optional(),accountAddress:t.addressSchema.optional(),accountAddressGroup:e.z.string().optional()}),P=e.z.array(r),c=a.extend({delegatingTo:t.addressSchema,token:o.webTokenWithBalanceAndPriceSchema.optional(),balance:e.z.string(),unitCurrencyValue:e.z.string().optional().default("0")}),y=e.z.array(c),n=e.z.object({wei:e.z.string(),eth:e.z.string(),currency:e.z.string()}),s=a.extend({id:e.z.string(),total:n,apy:e.z.number(),totalApy:e.z.number(),token:o.webTokenWithBalanceAndPriceSchema}),b=e.z.array(s),d=a.extend({id:e.z.string(),accruedRewards:n,stakedAmount:n,total:n,apy:e.z.number(),totalApy:e.z.number(),stakerInfo:m.apiStrkDelegatedStakingSchema.shape.data.shape.stakerInfo,token:o.webTokenWithBalanceAndPriceSchema}),T=e.z.array(d),z=i.or(r).or(c).or(d).or(s),g=e.z.record(e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:t.addressSchema.optional()})),u=e.z.object({type:p.defiPositionTypeSchema,manageUrl:e.z.string().url().optional(),name:e.z.string(),positions:e.z.array(z),positionsTotalValue:e.z.string(),brandColor:e.z.string().optional(),groups:g.optional(),accountAddress:t.addressSchema}),h=e.z.array(u),A=e.z.object({dappId:e.z.string(),products:h});exports.collateralizedDebtGroupSchema=k;exports.collateralizedDebtPositionSchema=r;exports.collateralizedDebtPositionsSchema=P;exports.concentratedLiquidityPositionSchema=i;exports.concentratedLiquidityPositionsSchema=S;exports.defiDappsProductsSchema=A;exports.defiPositionSchema=z;exports.defiProductSchema=u;exports.defiProductsSchema=h;exports.delegatedTokensArraySchema=y;exports.delegatedTokensSchema=c;exports.productGroupsSchema=g;exports.stakingPositionSchema=s;exports.stakingPositionsSchema=b;exports.strkDelegatedStakingPositionArraySchema=T;exports.strkDelegatedStakingPositionSchema=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),t=require("../../../chains/starknet/address.cjs"),m=require("./backend.model.cjs"),p=require("./defiPositionType.model.cjs"),o=require("./webToken.model.cjs"),l=o.webTokenWithBalanceAndPriceSchema.extend({accruedFees:e.z.string(),currentPrice:e.z.string(),maxPrice:e.z.string(),minPrice:e.z.string(),principal:e.z.string()}),a=e.z.object({address:t.addressSchema.optional(),currencyValue:e.z.string().default("0")}),i=a.extend({poolFeePercentage:e.z.string(),tickSpacingPercentage:e.z.string().optional(),tokenId:e.z.string().optional(),unitCurrencyValueToken0:e.z.string().optional(),unitCurrencyValueToken1:e.z.string().optional(),token0:l,token1:l}),S=e.z.array(i),k=e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:t.addressSchema.optional()}),r=a.extend({totalBalances:e.z.record(e.z.string()),collateral:e.z.boolean(),debt:e.z.boolean(),lending:e.z.boolean(),apy:e.z.string().optional(),totalApy:e.z.string().optional(),group:e.z.string().optional(),unitCurrencyValue:e.z.string().optional(),positionToken:m.apiTokenInfoSchema.or(e.z.undefined()),token:o.webTokenWithBalanceAndPriceSchema.optional(),accountAddress:t.addressSchema.optional(),accountAddressGroup:e.z.string().optional()}),P=e.z.array(r),s=a.extend({delegatingTo:t.addressSchema,token:o.webTokenWithBalanceAndPriceSchema.optional(),balance:e.z.string(),unitCurrencyValue:e.z.string().optional().default("0")}),y=e.z.array(s),n=e.z.object({wei:e.z.string(),eth:e.z.string(),currency:e.z.string()}),c=a.extend({id:e.z.string(),total:n,apy:e.z.number(),totalApy:e.z.number(),token:o.webTokenWithBalanceAndPriceSchema,liquidTokenAddress:t.addressSchema}),b=e.z.array(c),d=a.extend({id:e.z.string(),accruedRewards:n,stakedAmount:n,total:n,apy:e.z.number(),totalApy:e.z.number(),stakerInfo:m.apiStrkDelegatedStakingSchema.shape.data.shape.stakerInfo,token:o.webTokenWithBalanceAndPriceSchema}),T=e.z.array(d),u=i.or(r).or(s).or(d).or(c),z=e.z.record(e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:t.addressSchema.optional()})),g=e.z.object({type:p.defiPositionTypeSchema,manageUrl:e.z.string().url().optional(),name:e.z.string(),positions:e.z.array(u),positionsTotalValue:e.z.string(),brandColor:e.z.string().optional(),groups:z.optional(),accountAddress:t.addressSchema}),h=e.z.array(g),A=e.z.object({dappId:e.z.string(),products:h});exports.collateralizedDebtGroupSchema=k;exports.collateralizedDebtPositionSchema=r;exports.collateralizedDebtPositionsSchema=P;exports.concentratedLiquidityPositionSchema=i;exports.concentratedLiquidityPositionsSchema=S;exports.defiDappsProductsSchema=A;exports.defiPositionSchema=u;exports.defiProductSchema=g;exports.defiProductsSchema=h;exports.delegatedTokensArraySchema=y;exports.delegatedTokensSchema=s;exports.productGroupsSchema=z;exports.stakingPositionSchema=c;exports.stakingPositionsSchema=b;exports.strkDelegatedStakingPositionArraySchema=T;exports.strkDelegatedStakingPositionSchema=d;
@@ -1576,6 +1576,7 @@ export declare const stakingPositionSchema: z.ZodObject<z.objectUtil.extendShape
1576
1576
  ccyDayChange?: string | undefined;
1577
1577
  currencySymbol?: string | undefined;
1578
1578
  }>;
1579
+ liquidTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
1579
1580
  }>, "strip", z.ZodTypeAny, {
1580
1581
  id: string;
1581
1582
  totalApy: number;
@@ -1605,6 +1606,7 @@ export declare const stakingPositionSchema: z.ZodObject<z.objectUtil.extendShape
1605
1606
  eth: string;
1606
1607
  currency: string;
1607
1608
  };
1609
+ liquidTokenAddress: `0x${string}`;
1608
1610
  address?: `0x${string}` | undefined;
1609
1611
  }, {
1610
1612
  id: string;
@@ -1634,6 +1636,7 @@ export declare const stakingPositionSchema: z.ZodObject<z.objectUtil.extendShape
1634
1636
  eth: string;
1635
1637
  currency: string;
1636
1638
  };
1639
+ liquidTokenAddress: string;
1637
1640
  address?: string | undefined;
1638
1641
  currencyValue?: string | undefined;
1639
1642
  }>;
@@ -1726,6 +1729,7 @@ export declare const stakingPositionsSchema: z.ZodArray<z.ZodObject<z.objectUtil
1726
1729
  ccyDayChange?: string | undefined;
1727
1730
  currencySymbol?: string | undefined;
1728
1731
  }>;
1732
+ liquidTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
1729
1733
  }>, "strip", z.ZodTypeAny, {
1730
1734
  id: string;
1731
1735
  totalApy: number;
@@ -1755,6 +1759,7 @@ export declare const stakingPositionsSchema: z.ZodArray<z.ZodObject<z.objectUtil
1755
1759
  eth: string;
1756
1760
  currency: string;
1757
1761
  };
1762
+ liquidTokenAddress: `0x${string}`;
1758
1763
  address?: `0x${string}` | undefined;
1759
1764
  }, {
1760
1765
  id: string;
@@ -1784,6 +1789,7 @@ export declare const stakingPositionsSchema: z.ZodArray<z.ZodObject<z.objectUtil
1784
1789
  eth: string;
1785
1790
  currency: string;
1786
1791
  };
1792
+ liquidTokenAddress: string;
1787
1793
  address?: string | undefined;
1788
1794
  currencyValue?: string | undefined;
1789
1795
  }>, "many">;
@@ -3224,6 +3230,7 @@ export declare const defiPositionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.Z
3224
3230
  ccyDayChange?: string | undefined;
3225
3231
  currencySymbol?: string | undefined;
3226
3232
  }>;
3233
+ liquidTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
3227
3234
  }>, "strip", z.ZodTypeAny, {
3228
3235
  id: string;
3229
3236
  totalApy: number;
@@ -3253,6 +3260,7 @@ export declare const defiPositionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.Z
3253
3260
  eth: string;
3254
3261
  currency: string;
3255
3262
  };
3263
+ liquidTokenAddress: `0x${string}`;
3256
3264
  address?: `0x${string}` | undefined;
3257
3265
  }, {
3258
3266
  id: string;
@@ -3282,6 +3290,7 @@ export declare const defiPositionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.Z
3282
3290
  eth: string;
3283
3291
  currency: string;
3284
3292
  };
3293
+ liquidTokenAddress: string;
3285
3294
  address?: string | undefined;
3286
3295
  currencyValue?: string | undefined;
3287
3296
  }>]>;
@@ -4301,6 +4310,7 @@ export declare const defiProductSchema: z.ZodObject<{
4301
4310
  ccyDayChange?: string | undefined;
4302
4311
  currencySymbol?: string | undefined;
4303
4312
  }>;
4313
+ liquidTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
4304
4314
  }>, "strip", z.ZodTypeAny, {
4305
4315
  id: string;
4306
4316
  totalApy: number;
@@ -4330,6 +4340,7 @@ export declare const defiProductSchema: z.ZodObject<{
4330
4340
  eth: string;
4331
4341
  currency: string;
4332
4342
  };
4343
+ liquidTokenAddress: `0x${string}`;
4333
4344
  address?: `0x${string}` | undefined;
4334
4345
  }, {
4335
4346
  id: string;
@@ -4359,6 +4370,7 @@ export declare const defiProductSchema: z.ZodObject<{
4359
4370
  eth: string;
4360
4371
  currency: string;
4361
4372
  };
4373
+ liquidTokenAddress: string;
4362
4374
  address?: string | undefined;
4363
4375
  currencyValue?: string | undefined;
4364
4376
  }>]>, "many">;
@@ -4548,6 +4560,7 @@ export declare const defiProductSchema: z.ZodObject<{
4548
4560
  eth: string;
4549
4561
  currency: string;
4550
4562
  };
4563
+ liquidTokenAddress: `0x${string}`;
4551
4564
  address?: `0x${string}` | undefined;
4552
4565
  } | {
4553
4566
  id: string;
@@ -4772,6 +4785,7 @@ export declare const defiProductSchema: z.ZodObject<{
4772
4785
  eth: string;
4773
4786
  currency: string;
4774
4787
  };
4788
+ liquidTokenAddress: string;
4775
4789
  address?: string | undefined;
4776
4790
  currencyValue?: string | undefined;
4777
4791
  } | {
@@ -5832,6 +5846,7 @@ export declare const defiProductsSchema: z.ZodArray<z.ZodObject<{
5832
5846
  ccyDayChange?: string | undefined;
5833
5847
  currencySymbol?: string | undefined;
5834
5848
  }>;
5849
+ liquidTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
5835
5850
  }>, "strip", z.ZodTypeAny, {
5836
5851
  id: string;
5837
5852
  totalApy: number;
@@ -5861,6 +5876,7 @@ export declare const defiProductsSchema: z.ZodArray<z.ZodObject<{
5861
5876
  eth: string;
5862
5877
  currency: string;
5863
5878
  };
5879
+ liquidTokenAddress: `0x${string}`;
5864
5880
  address?: `0x${string}` | undefined;
5865
5881
  }, {
5866
5882
  id: string;
@@ -5890,6 +5906,7 @@ export declare const defiProductsSchema: z.ZodArray<z.ZodObject<{
5890
5906
  eth: string;
5891
5907
  currency: string;
5892
5908
  };
5909
+ liquidTokenAddress: string;
5893
5910
  address?: string | undefined;
5894
5911
  currencyValue?: string | undefined;
5895
5912
  }>]>, "many">;
@@ -6079,6 +6096,7 @@ export declare const defiProductsSchema: z.ZodArray<z.ZodObject<{
6079
6096
  eth: string;
6080
6097
  currency: string;
6081
6098
  };
6099
+ liquidTokenAddress: `0x${string}`;
6082
6100
  address?: `0x${string}` | undefined;
6083
6101
  } | {
6084
6102
  id: string;
@@ -6303,6 +6321,7 @@ export declare const defiProductsSchema: z.ZodArray<z.ZodObject<{
6303
6321
  eth: string;
6304
6322
  currency: string;
6305
6323
  };
6324
+ liquidTokenAddress: string;
6306
6325
  address?: string | undefined;
6307
6326
  currencyValue?: string | undefined;
6308
6327
  } | {
@@ -7365,6 +7384,7 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
7365
7384
  ccyDayChange?: string | undefined;
7366
7385
  currencySymbol?: string | undefined;
7367
7386
  }>;
7387
+ liquidTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
7368
7388
  }>, "strip", z.ZodTypeAny, {
7369
7389
  id: string;
7370
7390
  totalApy: number;
@@ -7394,6 +7414,7 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
7394
7414
  eth: string;
7395
7415
  currency: string;
7396
7416
  };
7417
+ liquidTokenAddress: `0x${string}`;
7397
7418
  address?: `0x${string}` | undefined;
7398
7419
  }, {
7399
7420
  id: string;
@@ -7423,6 +7444,7 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
7423
7444
  eth: string;
7424
7445
  currency: string;
7425
7446
  };
7447
+ liquidTokenAddress: string;
7426
7448
  address?: string | undefined;
7427
7449
  currencyValue?: string | undefined;
7428
7450
  }>]>, "many">;
@@ -7612,6 +7634,7 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
7612
7634
  eth: string;
7613
7635
  currency: string;
7614
7636
  };
7637
+ liquidTokenAddress: `0x${string}`;
7615
7638
  address?: `0x${string}` | undefined;
7616
7639
  } | {
7617
7640
  id: string;
@@ -7836,6 +7859,7 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
7836
7859
  eth: string;
7837
7860
  currency: string;
7838
7861
  };
7862
+ liquidTokenAddress: string;
7839
7863
  address?: string | undefined;
7840
7864
  currencyValue?: string | undefined;
7841
7865
  } | {
@@ -8065,6 +8089,7 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
8065
8089
  eth: string;
8066
8090
  currency: string;
8067
8091
  };
8092
+ liquidTokenAddress: `0x${string}`;
8068
8093
  address?: `0x${string}` | undefined;
8069
8094
  } | {
8070
8095
  id: string;
@@ -8292,6 +8317,7 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
8292
8317
  eth: string;
8293
8318
  currency: string;
8294
8319
  };
8320
+ liquidTokenAddress: string;
8295
8321
  address?: string | undefined;
8296
8322
  currencyValue?: string | undefined;
8297
8323
  } | {
@@ -1,7 +1,7 @@
1
1
  import { z as t } from "zod";
2
2
  import { addressSchema as o } from "../../../chains/starknet/address.js";
3
3
  import { apiTokenInfoSchema as p, apiStrkDelegatedStakingSchema as g } from "./backend.model.js";
4
- import { defiPositionTypeSchema as m } from "./defiPositionType.model.js";
4
+ import { defiPositionTypeSchema as u } from "./defiPositionType.model.js";
5
5
  import { webTokenWithBalanceAndPriceSchema as e } from "./webToken.model.js";
6
6
  const i = e.extend({
7
7
  accruedFees: t.string(),
@@ -51,7 +51,8 @@ const i = e.extend({
51
51
  total: a,
52
52
  apy: t.number(),
53
53
  totalApy: t.number(),
54
- token: e
54
+ token: e,
55
+ liquidTokenAddress: o
55
56
  }), V = t.array(l), d = n.extend({
56
57
  id: t.string(),
57
58
  accruedRewards: a,
@@ -61,23 +62,23 @@ const i = e.extend({
61
62
  totalApy: t.number(),
62
63
  stakerInfo: g.shape.data.shape.stakerInfo,
63
64
  token: e
64
- }), C = t.array(d), u = r.or(s).or(c).or(d).or(l), h = t.record(t.object({
65
+ }), C = t.array(d), m = r.or(s).or(c).or(d).or(l), h = t.record(t.object({
65
66
  name: t.string().optional(),
66
67
  healthRatio: t.string().optional(),
67
68
  accountAddress: o.optional()
68
- })), S = t.object({
69
- type: m,
69
+ })), k = t.object({
70
+ type: u,
70
71
  manageUrl: t.string().url().optional(),
71
72
  name: t.string(),
72
- positions: t.array(u),
73
+ positions: t.array(m),
73
74
  // other types will be added when available from be
74
75
  positionsTotalValue: t.string(),
75
76
  brandColor: t.string().optional(),
76
77
  groups: h.optional(),
77
78
  accountAddress: o
78
- }), k = t.array(S), I = t.object({
79
+ }), S = t.array(k), I = t.object({
79
80
  dappId: t.string(),
80
- products: k
81
+ products: S
81
82
  });
82
83
  export {
83
84
  x as collateralizedDebtGroupSchema,
@@ -86,9 +87,9 @@ export {
86
87
  r as concentratedLiquidityPositionSchema,
87
88
  T as concentratedLiquidityPositionsSchema,
88
89
  I as defiDappsProductsSchema,
89
- u as defiPositionSchema,
90
- S as defiProductSchema,
91
- k as defiProductsSchema,
90
+ m as defiPositionSchema,
91
+ k as defiProductSchema,
92
+ S as defiProductsSchema,
92
93
  j as delegatedTokensArraySchema,
93
94
  c as delegatedTokensSchema,
94
95
  h as productGroupsSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.58.0",
3
+ "version": "1.59.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"