@argent/x-shared 1.41.3 → 1.41.4

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.
@@ -28,6 +28,7 @@ export declare class TokenServiceWeb implements ITokenServiceWeb {
28
28
  fetchDefiDecomposition(address: Address, application: "mobile" | "webwallet" | "argentx"): Promise<{
29
29
  dappId: string;
30
30
  products: import('zod').objectOutputType<{
31
+ productId: import('zod').ZodString;
31
32
  name: import('zod').ZodString;
32
33
  manageUrl: import('zod').ZodString;
33
34
  type: import('zod').ZodUnion<[import('zod').ZodLiteral<"concentratedLiquidityPosition">, import('zod').ZodLiteral<"collateralizedDebtPosition">, import('zod').ZodLiteral<"delegatedTokens">, import('zod').ZodLiteral<"strkDelegatedStaking">, import('zod').ZodLiteral<"staking">]>;
@@ -1,11 +1,11 @@
1
1
  import { default as retry } from 'async-retry';
2
2
  import { ArgentBackendNetworkId } from '../../backend';
3
3
  import { Address } from '../../chains/starknet/address';
4
- import { ApiDefiDecompositionSchema, ApiTokenInfo } from './types/backend.model';
4
+ import { ApiDefiDecomposition, ApiTokenInfo } from './types/backend.model';
5
5
  import { WebBaseTokenWithBalance } from './types/webToken.model';
6
6
  export type SelectorFn<T> = (value: T) => boolean;
7
7
  export interface ITokenServiceDefiDecomposition {
8
- fetchDefiDecomposition: (address: Address, application: "mobile" | "webwallet" | "argentx") => Promise<ApiDefiDecompositionSchema[]>;
8
+ fetchDefiDecomposition: (address: Address, application: "mobile" | "webwallet" | "argentx") => Promise<ApiDefiDecomposition[]>;
9
9
  }
10
10
  /**
11
11
  * ITokenService interface provides methods for managing tokens, including storage methods, fetch methods, and get methods.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),a=require("../../../chains/starknet/address.cjs"),h=require("./defiPositionType.model.cjs"),b=require("../../../utils/schemas.cjs"),u=e.z.object({status:e.z.literal("initialising")}).or(e.z.object({status:e.z.literal("initialised"),balances:e.z.array(e.z.object({tokenAddress:a.addressSchemaArgentBackend,tokenBalance:e.z.string()}))})),o=e.z.object({id:e.z.number(),address:a.addressSchema,brandColor:e.z.string().optional(),name:e.z.string(),symbol:e.z.string(),decimals:e.z.number(),iconUrl:e.z.string().optional(),sendable:e.z.boolean(),popular:e.z.boolean(),refundable:e.z.boolean(),listed:e.z.boolean(),tradable:e.z.boolean(),category:e.z.union([e.z.literal("tokens"),e.z.literal("currencies"),e.z.literal("savings")]),pricingId:e.z.number().optional(),dappId:e.z.string().optional(),marketData:e.z.object({marketCap:e.z.number(),marketCap24hChange:e.z.number(),dailyVolume:e.z.number(),rank:e.z.number()}).optional(),tags:e.z.array(e.z.string()).optional()}),k=e.z.object({tokens:e.z.array(o)}),D=o,d=e.z.object({pricingId:e.z.number(),ethValue:e.z.string(),ccyValue:e.z.string(),ethDayChange:e.z.string(),ccyDayChange:e.z.string()}),y=e.z.object({prices:e.z.array(d)}),t=e.z.object({tokenAddress:a.addressSchemaArgentBackend,principal:e.z.string(),accruedFees:e.z.string(),minPrice:e.z.string(),maxPrice:e.z.string(),currentPrice:e.z.string()}),i=e.z.object({id:e.z.string(),tokenAddress:a.addressSchema.optional(),totalBalances:e.z.record(e.z.string())}),n=i.extend({tokenId:e.z.string(),data:e.z.object({poolFeePercentage:e.z.string(),tickSpacingPercentage:e.z.string().optional(),token0:t,token1:t})}),P=e.z.array(n),s=i.extend({data:e.z.object({apy:e.z.string()}),investmentId:e.z.string().optional(),totalBalances:e.z.record(e.z.string())}),f=e.z.array(s),r=i.extend({data:e.z.object({apy:e.z.string().optional(),group:e.z.number().optional(),collateral:e.z.boolean(),debt:e.z.boolean(),lending:e.z.boolean()})}),j=e.z.array(r),c=e.z.object({data:e.z.object({delegatingTo:a.addressSchema}),totalBalances:e.z.record(e.z.string())}),T=e.z.array(c),p=i.extend({data:e.z.object({stakerInfo:e.z.object({name:e.z.string().optional(),iconUrl:e.z.string().optional(),address:a.addressSchema}),accruedReward:e.z.string(),pendingWithdrawal:e.z.object({amount:e.z.string(),withdrawableAfter:e.z.number()}).optional(),apy:e.z.string().optional()})}),A=e.z.array(p),z=n.or(r).or(c).or(s).or(p),l=e.z.array(z),m=b.createSchemaWithWarnings({name:e.z.string(),manageUrl:e.z.string(),type:h.defiPositionTypeSchema,groups:e.z.record(e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional()})).optional(),positions:l}),g=e.z.object({dappId:e.z.string(),products:e.z.array(m)}),C=e.z.object({dapps:e.z.array(g)}),S=e.z.object({name:e.z.string().optional(),tokenAddress:a.addressSchema,amount:e.z.string().optional(),claimUrl:e.z.string().optional(),claimStart:e.z.number(),claimEnd:e.z.number().optional()}),I=e.z.object({accountAddress:a.addressSchema,chain:e.z.string(),airdrops:e.z.array(S)});exports.apiAccountTokenBalancesSchema=u;exports.apiAirdropSchema=S;exports.apiCollateralizedDebtPositionSchema=r;exports.apiCollateralizedDebtPositionsSchema=j;exports.apiConcentratedLiquidityPositionSchema=n;exports.apiConcentratedLiquidityPositionsSchema=P;exports.apiDefiDecompositionProduct=m;exports.apiDefiDecompositionProducts=l;exports.apiDefiDecompositionSchema=g;exports.apiDefiDecompositionToken=t;exports.apiDefiPositionSchema=z;exports.apiDefiPositionsSchema=C;exports.apiDelegatedTokensArraySchema=T;exports.apiDelegatedTokensSchema=c;exports.apiPriceDataResponseSchema=y;exports.apiPriceDetailsSchema=d;exports.apiStakingPositionSchema=s;exports.apiStakingPositionsSchema=f;exports.apiStrkDelegatedStakingPositionsSchema=A;exports.apiStrkDelegatedStakingSchema=p;exports.apiTokenInfoResponseSchema=D;exports.apiTokenInfoSchema=o;exports.apiTokensInfoResponseSchema=k;exports.apiUnclaimedRewardsSchema=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),a=require("../../../chains/starknet/address.cjs"),h=require("./defiPositionType.model.cjs"),b=require("../../../utils/schemas.cjs"),u=e.z.object({status:e.z.literal("initialising")}).or(e.z.object({status:e.z.literal("initialised"),balances:e.z.array(e.z.object({tokenAddress:a.addressSchemaArgentBackend,tokenBalance:e.z.string()}))})),o=e.z.object({id:e.z.number(),address:a.addressSchema,brandColor:e.z.string().optional(),name:e.z.string(),symbol:e.z.string(),decimals:e.z.number(),iconUrl:e.z.string().optional(),sendable:e.z.boolean(),popular:e.z.boolean(),refundable:e.z.boolean(),listed:e.z.boolean(),tradable:e.z.boolean(),category:e.z.union([e.z.literal("tokens"),e.z.literal("currencies"),e.z.literal("savings")]),pricingId:e.z.number().optional(),dappId:e.z.string().optional(),marketData:e.z.object({marketCap:e.z.number(),marketCap24hChange:e.z.number(),dailyVolume:e.z.number(),rank:e.z.number()}).optional(),tags:e.z.array(e.z.string()).optional()}),k=e.z.object({tokens:e.z.array(o)}),D=o,d=e.z.object({pricingId:e.z.number(),ethValue:e.z.string(),ccyValue:e.z.string(),ethDayChange:e.z.string(),ccyDayChange:e.z.string()}),y=e.z.object({prices:e.z.array(d)}),t=e.z.object({tokenAddress:a.addressSchemaArgentBackend,principal:e.z.string(),accruedFees:e.z.string(),minPrice:e.z.string(),maxPrice:e.z.string(),currentPrice:e.z.string()}),i=e.z.object({id:e.z.string(),tokenAddress:a.addressSchema.optional(),totalBalances:e.z.record(e.z.string())}),n=i.extend({tokenId:e.z.string(),data:e.z.object({poolFeePercentage:e.z.string(),tickSpacingPercentage:e.z.string().optional(),token0:t,token1:t})}),P=e.z.array(n),s=i.extend({data:e.z.object({apy:e.z.string()}),investmentId:e.z.string().optional(),totalBalances:e.z.record(e.z.string())}),f=e.z.array(s),r=i.extend({data:e.z.object({apy:e.z.string().optional(),group:e.z.number().optional(),collateral:e.z.boolean(),debt:e.z.boolean(),lending:e.z.boolean()})}),j=e.z.array(r),c=e.z.object({data:e.z.object({delegatingTo:a.addressSchema}),totalBalances:e.z.record(e.z.string())}),T=e.z.array(c),p=i.extend({data:e.z.object({stakerInfo:e.z.object({name:e.z.string().optional(),iconUrl:e.z.string().optional(),address:a.addressSchema}),accruedReward:e.z.string(),pendingWithdrawal:e.z.object({amount:e.z.string(),withdrawableAfter:e.z.number()}).optional(),apy:e.z.string().optional()})}),A=e.z.array(p),z=n.or(r).or(c).or(s).or(p),l=e.z.array(z),m=b.createSchemaWithWarnings({productId:e.z.string(),name:e.z.string(),manageUrl:e.z.string(),type:h.defiPositionTypeSchema,groups:e.z.record(e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional()})).optional(),positions:l}),g=e.z.object({dappId:e.z.string(),products:e.z.array(m)}),C=e.z.object({dapps:e.z.array(g)}),S=e.z.object({name:e.z.string().optional(),tokenAddress:a.addressSchema,amount:e.z.string().optional(),claimUrl:e.z.string().optional(),claimStart:e.z.number(),claimEnd:e.z.number().optional()}),I=e.z.object({accountAddress:a.addressSchema,chain:e.z.string(),airdrops:e.z.array(S)});exports.apiAccountTokenBalancesSchema=u;exports.apiAirdropSchema=S;exports.apiCollateralizedDebtPositionSchema=r;exports.apiCollateralizedDebtPositionsSchema=j;exports.apiConcentratedLiquidityPositionSchema=n;exports.apiConcentratedLiquidityPositionsSchema=P;exports.apiDefiDecompositionProduct=m;exports.apiDefiDecompositionProducts=l;exports.apiDefiDecompositionSchema=g;exports.apiDefiDecompositionToken=t;exports.apiDefiPositionSchema=z;exports.apiDefiPositionsSchema=C;exports.apiDelegatedTokensArraySchema=T;exports.apiDelegatedTokensSchema=c;exports.apiPriceDataResponseSchema=y;exports.apiPriceDetailsSchema=d;exports.apiStakingPositionSchema=s;exports.apiStakingPositionsSchema=f;exports.apiStrkDelegatedStakingPositionsSchema=A;exports.apiStrkDelegatedStakingSchema=p;exports.apiTokenInfoResponseSchema=D;exports.apiTokenInfoSchema=o;exports.apiTokensInfoResponseSchema=k;exports.apiUnclaimedRewardsSchema=I;
@@ -1729,6 +1729,7 @@ export declare const apiDefiDecompositionProducts: z.ZodArray<z.ZodUnion<[z.ZodU
1729
1729
  tokenAddress?: string | undefined;
1730
1730
  }>]>, "many">;
1731
1731
  export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
1732
+ productId: z.ZodString;
1732
1733
  name: z.ZodString;
1733
1734
  manageUrl: z.ZodString;
1734
1735
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -2071,6 +2072,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
2071
2072
  tokenAddress?: string | undefined;
2072
2073
  }>]>, "many">;
2073
2074
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2075
+ productId: z.ZodString;
2074
2076
  name: z.ZodString;
2075
2077
  manageUrl: z.ZodString;
2076
2078
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -2413,6 +2415,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
2413
2415
  tokenAddress?: string | undefined;
2414
2416
  }>]>, "many">;
2415
2417
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2418
+ productId: z.ZodString;
2416
2419
  name: z.ZodString;
2417
2420
  manageUrl: z.ZodString;
2418
2421
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -2755,6 +2758,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
2755
2758
  tokenAddress?: string | undefined;
2756
2759
  }>]>, "many">;
2757
2760
  }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
2761
+ productId: z.ZodString;
2758
2762
  name: z.ZodString;
2759
2763
  manageUrl: z.ZodString;
2760
2764
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -3097,6 +3101,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
3097
3101
  tokenAddress?: string | undefined;
3098
3102
  }>]>, "many">;
3099
3103
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3104
+ productId: z.ZodString;
3100
3105
  name: z.ZodString;
3101
3106
  manageUrl: z.ZodString;
3102
3107
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -3440,6 +3445,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
3440
3445
  }>]>, "many">;
3441
3446
  }, z.ZodTypeAny, "passthrough">> & {
3442
3447
  extend: <E extends z.ZodRawShape>(extension: E) => z.ZodEffects<z.ZodObject<{
3448
+ productId: z.ZodString;
3443
3449
  name: z.ZodString;
3444
3450
  manageUrl: z.ZodString;
3445
3451
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -3782,6 +3788,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
3782
3788
  tokenAddress?: string | undefined;
3783
3789
  }>]>, "many">;
3784
3790
  } & E, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3791
+ productId: z.ZodString;
3785
3792
  name: z.ZodString;
3786
3793
  manageUrl: z.ZodString;
3787
3794
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -4124,6 +4131,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
4124
4131
  tokenAddress?: string | undefined;
4125
4132
  }>]>, "many">;
4126
4133
  } & E, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4134
+ productId: z.ZodString;
4127
4135
  name: z.ZodString;
4128
4136
  manageUrl: z.ZodString;
4129
4137
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -4466,6 +4474,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
4466
4474
  tokenAddress?: string | undefined;
4467
4475
  }>]>, "many">;
4468
4476
  } & E, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
4477
+ productId: z.ZodString;
4469
4478
  name: z.ZodString;
4470
4479
  manageUrl: z.ZodString;
4471
4480
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -4808,6 +4817,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
4808
4817
  tokenAddress?: string | undefined;
4809
4818
  }>]>, "many">;
4810
4819
  } & E, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4820
+ productId: z.ZodString;
4811
4821
  name: z.ZodString;
4812
4822
  manageUrl: z.ZodString;
4813
4823
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -5154,6 +5164,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
5154
5164
  export declare const apiDefiDecompositionSchema: z.ZodObject<{
5155
5165
  dappId: z.ZodString;
5156
5166
  products: z.ZodArray<z.ZodEffects<z.ZodObject<{
5167
+ productId: z.ZodString;
5157
5168
  name: z.ZodString;
5158
5169
  manageUrl: z.ZodString;
5159
5170
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -5496,6 +5507,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
5496
5507
  tokenAddress?: string | undefined;
5497
5508
  }>]>, "many">;
5498
5509
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5510
+ productId: z.ZodString;
5499
5511
  name: z.ZodString;
5500
5512
  manageUrl: z.ZodString;
5501
5513
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -5838,6 +5850,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
5838
5850
  tokenAddress?: string | undefined;
5839
5851
  }>]>, "many">;
5840
5852
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5853
+ productId: z.ZodString;
5841
5854
  name: z.ZodString;
5842
5855
  manageUrl: z.ZodString;
5843
5856
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -6180,6 +6193,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
6180
6193
  tokenAddress?: string | undefined;
6181
6194
  }>]>, "many">;
6182
6195
  }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
6196
+ productId: z.ZodString;
6183
6197
  name: z.ZodString;
6184
6198
  manageUrl: z.ZodString;
6185
6199
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -6522,6 +6536,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
6522
6536
  tokenAddress?: string | undefined;
6523
6537
  }>]>, "many">;
6524
6538
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
6539
+ productId: z.ZodString;
6525
6540
  name: z.ZodString;
6526
6541
  manageUrl: z.ZodString;
6527
6542
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -6865,6 +6880,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
6865
6880
  }>]>, "many">;
6866
6881
  }, z.ZodTypeAny, "passthrough">> & {
6867
6882
  extend: <E extends z.ZodRawShape>(extension: E) => z.ZodEffects<z.ZodObject<{
6883
+ productId: z.ZodString;
6868
6884
  name: z.ZodString;
6869
6885
  manageUrl: z.ZodString;
6870
6886
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -7207,6 +7223,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
7207
7223
  tokenAddress?: string | undefined;
7208
7224
  }>]>, "many">;
7209
7225
  } & E, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7226
+ productId: z.ZodString;
7210
7227
  name: z.ZodString;
7211
7228
  manageUrl: z.ZodString;
7212
7229
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -7549,6 +7566,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
7549
7566
  tokenAddress?: string | undefined;
7550
7567
  }>]>, "many">;
7551
7568
  } & E, z.ZodTypeAny, "passthrough">, z.objectInputType<{
7569
+ productId: z.ZodString;
7552
7570
  name: z.ZodString;
7553
7571
  manageUrl: z.ZodString;
7554
7572
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -7891,6 +7909,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
7891
7909
  tokenAddress?: string | undefined;
7892
7910
  }>]>, "many">;
7893
7911
  } & E, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
7912
+ productId: z.ZodString;
7894
7913
  name: z.ZodString;
7895
7914
  manageUrl: z.ZodString;
7896
7915
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -8233,6 +8252,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
8233
8252
  tokenAddress?: string | undefined;
8234
8253
  }>]>, "many">;
8235
8254
  } & E, z.ZodTypeAny, "passthrough">, z.objectInputType<{
8255
+ productId: z.ZodString;
8236
8256
  name: z.ZodString;
8237
8257
  manageUrl: z.ZodString;
8238
8258
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -8579,6 +8599,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
8579
8599
  }, "strip", z.ZodTypeAny, {
8580
8600
  dappId: string;
8581
8601
  products: z.objectOutputType<{
8602
+ productId: z.ZodString;
8582
8603
  name: z.ZodString;
8583
8604
  manageUrl: z.ZodString;
8584
8605
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -8924,6 +8945,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
8924
8945
  }, {
8925
8946
  dappId: string;
8926
8947
  products: z.objectInputType<{
8948
+ productId: z.ZodString;
8927
8949
  name: z.ZodString;
8928
8950
  manageUrl: z.ZodString;
8929
8951
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -9271,6 +9293,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
9271
9293
  dapps: z.ZodArray<z.ZodObject<{
9272
9294
  dappId: z.ZodString;
9273
9295
  products: z.ZodArray<z.ZodEffects<z.ZodObject<{
9296
+ productId: z.ZodString;
9274
9297
  name: z.ZodString;
9275
9298
  manageUrl: z.ZodString;
9276
9299
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -9613,6 +9636,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
9613
9636
  tokenAddress?: string | undefined;
9614
9637
  }>]>, "many">;
9615
9638
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9639
+ productId: z.ZodString;
9616
9640
  name: z.ZodString;
9617
9641
  manageUrl: z.ZodString;
9618
9642
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -9955,6 +9979,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
9955
9979
  tokenAddress?: string | undefined;
9956
9980
  }>]>, "many">;
9957
9981
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9982
+ productId: z.ZodString;
9958
9983
  name: z.ZodString;
9959
9984
  manageUrl: z.ZodString;
9960
9985
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -10297,6 +10322,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
10297
10322
  tokenAddress?: string | undefined;
10298
10323
  }>]>, "many">;
10299
10324
  }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
10325
+ productId: z.ZodString;
10300
10326
  name: z.ZodString;
10301
10327
  manageUrl: z.ZodString;
10302
10328
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -10639,6 +10665,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
10639
10665
  tokenAddress?: string | undefined;
10640
10666
  }>]>, "many">;
10641
10667
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
10668
+ productId: z.ZodString;
10642
10669
  name: z.ZodString;
10643
10670
  manageUrl: z.ZodString;
10644
10671
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -10982,6 +11009,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
10982
11009
  }>]>, "many">;
10983
11010
  }, z.ZodTypeAny, "passthrough">> & {
10984
11011
  extend: <E extends z.ZodRawShape>(extension: E) => z.ZodEffects<z.ZodObject<{
11012
+ productId: z.ZodString;
10985
11013
  name: z.ZodString;
10986
11014
  manageUrl: z.ZodString;
10987
11015
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -11324,6 +11352,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
11324
11352
  tokenAddress?: string | undefined;
11325
11353
  }>]>, "many">;
11326
11354
  } & E, "passthrough", z.ZodTypeAny, z.objectOutputType<{
11355
+ productId: z.ZodString;
11327
11356
  name: z.ZodString;
11328
11357
  manageUrl: z.ZodString;
11329
11358
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -11666,6 +11695,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
11666
11695
  tokenAddress?: string | undefined;
11667
11696
  }>]>, "many">;
11668
11697
  } & E, z.ZodTypeAny, "passthrough">, z.objectInputType<{
11698
+ productId: z.ZodString;
11669
11699
  name: z.ZodString;
11670
11700
  manageUrl: z.ZodString;
11671
11701
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -12008,6 +12038,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
12008
12038
  tokenAddress?: string | undefined;
12009
12039
  }>]>, "many">;
12010
12040
  } & E, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
12041
+ productId: z.ZodString;
12011
12042
  name: z.ZodString;
12012
12043
  manageUrl: z.ZodString;
12013
12044
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -12350,6 +12381,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
12350
12381
  tokenAddress?: string | undefined;
12351
12382
  }>]>, "many">;
12352
12383
  } & E, z.ZodTypeAny, "passthrough">, z.objectInputType<{
12384
+ productId: z.ZodString;
12353
12385
  name: z.ZodString;
12354
12386
  manageUrl: z.ZodString;
12355
12387
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -12696,6 +12728,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
12696
12728
  }, "strip", z.ZodTypeAny, {
12697
12729
  dappId: string;
12698
12730
  products: z.objectOutputType<{
12731
+ productId: z.ZodString;
12699
12732
  name: z.ZodString;
12700
12733
  manageUrl: z.ZodString;
12701
12734
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -13041,6 +13074,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
13041
13074
  }, {
13042
13075
  dappId: string;
13043
13076
  products: z.objectInputType<{
13077
+ productId: z.ZodString;
13044
13078
  name: z.ZodString;
13045
13079
  manageUrl: z.ZodString;
13046
13080
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -13388,6 +13422,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
13388
13422
  dapps: {
13389
13423
  dappId: string;
13390
13424
  products: z.objectOutputType<{
13425
+ productId: z.ZodString;
13391
13426
  name: z.ZodString;
13392
13427
  manageUrl: z.ZodString;
13393
13428
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -13735,6 +13770,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
13735
13770
  dapps: {
13736
13771
  dappId: string;
13737
13772
  products: z.objectInputType<{
13773
+ productId: z.ZodString;
13738
13774
  name: z.ZodString;
13739
13775
  manageUrl: z.ZodString;
13740
13776
  type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"strkDelegatedStaking">, z.ZodLiteral<"staking">]>;
@@ -14081,8 +14117,8 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
14081
14117
  }>;
14082
14118
  export type ApiDefiDecompositionProduct = z.infer<typeof apiDefiDecompositionProduct>;
14083
14119
  export type ApiDefiDecompositionProducts = z.infer<typeof apiDefiDecompositionProducts>;
14084
- export type ApiDefiDecompositionSchema = z.infer<typeof apiDefiDecompositionSchema>;
14085
- export type ApiDefiPositionsSchema = z.infer<typeof apiDefiPositionsSchema>;
14120
+ export type ApiDefiDecomposition = z.infer<typeof apiDefiDecompositionSchema>;
14121
+ export type ApiDefiPositions = z.infer<typeof apiDefiPositionsSchema>;
14086
14122
  export declare const apiAirdropSchema: z.ZodObject<{
14087
14123
  name: z.ZodOptional<z.ZodString>;
14088
14124
  tokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
@@ -1,5 +1,5 @@
1
1
  import { z as a } from "zod";
2
- import { addressSchemaArgentBackend as n, addressSchema as e } from "../../../chains/starknet/address.js";
2
+ import { addressSchemaArgentBackend as n, addressSchema as t } from "../../../chains/starknet/address.js";
3
3
  import { defiPositionTypeSchema as d } from "./defiPositionType.model.js";
4
4
  import { createSchemaWithWarnings as m } from "../../../utils/schemas.js";
5
5
  const f = a.object({
@@ -12,7 +12,7 @@ const f = a.object({
12
12
  }))
13
13
  })), i = a.object({
14
14
  id: a.number(),
15
- address: e,
15
+ address: t,
16
16
  brandColor: a.string().optional(),
17
17
  name: a.string(),
18
18
  symbol: a.string(),
@@ -37,15 +37,15 @@ const f = a.object({
37
37
  rank: a.number()
38
38
  }).optional(),
39
39
  tags: a.array(a.string()).optional()
40
- }), A = a.object({
40
+ }), I = a.object({
41
41
  tokens: a.array(i)
42
- }), C = i, g = a.object({
42
+ }), A = i, g = a.object({
43
43
  pricingId: a.number(),
44
44
  ethValue: a.string(),
45
45
  ccyValue: a.string(),
46
46
  ethDayChange: a.string(),
47
47
  ccyDayChange: a.string()
48
- }), I = a.object({
48
+ }), C = a.object({
49
49
  prices: a.array(g)
50
50
  }), o = a.object({
51
51
  tokenAddress: n,
@@ -54,11 +54,11 @@ const f = a.object({
54
54
  minPrice: a.string(),
55
55
  maxPrice: a.string(),
56
56
  currentPrice: a.string()
57
- }), t = a.object({
57
+ }), e = a.object({
58
58
  id: a.string(),
59
- tokenAddress: e.optional(),
59
+ tokenAddress: t.optional(),
60
60
  totalBalances: a.record(a.string())
61
- }), r = t.extend({
61
+ }), r = e.extend({
62
62
  tokenId: a.string(),
63
63
  data: a.object({
64
64
  poolFeePercentage: a.string(),
@@ -66,13 +66,13 @@ const f = a.object({
66
66
  token0: o,
67
67
  token1: o
68
68
  })
69
- }), T = a.array(r), s = t.extend({
69
+ }), T = a.array(r), s = e.extend({
70
70
  data: a.object({
71
71
  apy: a.string()
72
72
  }),
73
73
  investmentId: a.string().optional(),
74
74
  totalBalances: a.record(a.string())
75
- }), B = a.array(s), c = t.extend({
75
+ }), B = a.array(s), c = e.extend({
76
76
  data: a.object({
77
77
  apy: a.string().optional(),
78
78
  group: a.number().optional(),
@@ -82,15 +82,15 @@ const f = a.object({
82
82
  })
83
83
  }), x = a.array(c), l = a.object({
84
84
  data: a.object({
85
- delegatingTo: e
85
+ delegatingTo: t
86
86
  }),
87
87
  totalBalances: a.record(a.string())
88
- }), R = a.array(l), p = t.extend({
88
+ }), R = a.array(l), p = e.extend({
89
89
  data: a.object({
90
90
  stakerInfo: a.object({
91
91
  name: a.string().optional(),
92
92
  iconUrl: a.string().optional(),
93
- address: e
93
+ address: t
94
94
  }),
95
95
  accruedReward: a.string(),
96
96
  pendingWithdrawal: a.object({
@@ -100,6 +100,7 @@ const f = a.object({
100
100
  apy: a.string().optional()
101
101
  })
102
102
  }), w = a.array(p), b = r.or(c).or(l).or(s).or(p), h = a.array(b), u = m({
103
+ productId: a.string(),
103
104
  name: a.string(),
104
105
  manageUrl: a.string(),
105
106
  type: d,
@@ -115,13 +116,13 @@ const f = a.object({
115
116
  dapps: a.array(S)
116
117
  }), k = a.object({
117
118
  name: a.string().optional(),
118
- tokenAddress: e,
119
+ tokenAddress: t,
119
120
  amount: a.string().optional(),
120
121
  claimUrl: a.string().optional(),
121
122
  claimStart: a.number(),
122
123
  claimEnd: a.number().optional()
123
124
  }), z = a.object({
124
- accountAddress: e,
125
+ accountAddress: t,
125
126
  chain: a.string(),
126
127
  airdrops: a.array(k)
127
128
  });
@@ -140,14 +141,14 @@ export {
140
141
  U as apiDefiPositionsSchema,
141
142
  R as apiDelegatedTokensArraySchema,
142
143
  l as apiDelegatedTokensSchema,
143
- I as apiPriceDataResponseSchema,
144
+ C as apiPriceDataResponseSchema,
144
145
  g as apiPriceDetailsSchema,
145
146
  s as apiStakingPositionSchema,
146
147
  B as apiStakingPositionsSchema,
147
148
  w as apiStrkDelegatedStakingPositionsSchema,
148
149
  p as apiStrkDelegatedStakingSchema,
149
- C as apiTokenInfoResponseSchema,
150
+ A as apiTokenInfoResponseSchema,
150
151
  i as apiTokenInfoSchema,
151
- A as apiTokensInfoResponseSchema,
152
+ I as apiTokensInfoResponseSchema,
152
153
  z as apiUnclaimedRewardsSchema
153
154
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.41.3",
3
+ "version": "1.41.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"