@argent/x-shared 1.41.2 → 1.41.3

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 u=require("url-join"),a=require("../../../errors/swap.cjs"),p=require("../../../utils/url/urlWithQuery.cjs"),l=require("../models/quote.model.cjs"),S=require("../utils/totalFee.cjs"),d=require("../models/trade.model.cjs"),i=require("../models/order.model.cjs");class y{constructor(e,r){if(this.httpService=e,!r)throw new a.SwapError({code:"NO_SWAP_URL"});this.swapQuoteUrl=u(r,"/quote"),this.swapOrderUrl=u(r,"/order")}async getSwapQuoteForPay(e,r,o,n,t="USD"){const s=p.urlWithQuery(this.swapQuoteUrl,{accountAddress:n,currency:t,chain:"starknet",sellToken:e,buyToken:r,sellAmount:o});try{const c=await this.httpService.get(s);return await l.SwapQuoteResponseSchema.parseAsync(c)}catch(c){throw console.error(c),new a.SwapError({code:"INVALID_QUOTE_RESPONSE"})}}async getSwapTradeFromQuote(e,r,o){if(!r||!o)throw new a.SwapError({code:"INVALID_SWAP_TOKENS"});const{totalFee:n,totalFeeInCurrency:t,totalFeePercentage:s}=S.calculateTotalFee(e);return d.TradeSchema.parse({payToken:r,receiveToken:o,payAmount:e.sellAmount,receiveAmount:e.buyAmount,payAmountInCurrency:e.sellAmountInCurrency,receiveAmountInCurrency:e.buyAmountInCurrency,totalFee:n,totalFeeInCurrency:t,totalFeePercentage:s,expiresAt:e.expiresAt,expiresIn:e.expiresIn,route:e.routes[0],data:e.data})}async getSwapOrderFromTrade(e,r,o){const n=i.SwapOrderRequestSchema.parse({chain:"starknet",sellToken:r.payToken.address,buyToken:r.receiveToken.address,sellAmount:r.payAmount,buyAmount:r.receiveAmount,accountAddress:e,slippage:o/1e4,data:r.data});try{const t=await this.httpService.post(this.swapOrderUrl,{body:JSON.stringify(n),headers:{"Content-Type":"application/json"}});return await i.SwapOrderResponseSchema.parseAsync(t)}catch(t){throw console.error(t),new a.SwapError({code:"INVALID_SWAP_ORDER_RESPONSE"})}}}exports.SharedSwapService=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("url-join"),a=require("../../../errors/swap.cjs"),p=require("../models/quote.model.cjs"),l=require("../utils/totalFee.cjs"),S=require("../models/trade.model.cjs"),i=require("../models/order.model.cjs"),d=require("../../../utils/url/urlWithQuery.cjs");class y{constructor(e,r){if(this.httpService=e,!r)throw new a.SwapError({code:"NO_SWAP_URL"});this.swapQuoteUrl=u(r,"/quote"),this.swapOrderUrl=u(r,"/order")}async getSwapQuoteForPay(e,r,o,n,t="USD"){const s=d.urlWithQuery(this.swapQuoteUrl,{accountAddress:n,currency:t,chain:"starknet",sellToken:e,buyToken:r,sellAmount:o});try{const c=await this.httpService.get(s);return await p.SwapQuoteResponseSchema.parseAsync(c)}catch(c){throw console.error(c),new a.SwapError({code:"INVALID_QUOTE_RESPONSE"})}}async getSwapTradeFromQuote(e,r,o){if(!r||!o)throw new a.SwapError({code:"INVALID_SWAP_TOKENS"});const{totalFee:n,totalFeeInCurrency:t,totalFeePercentage:s}=l.calculateTotalFee(e);return S.TradeSchema.parse({payToken:r,receiveToken:o,payAmount:e.sellAmount,receiveAmount:e.buyAmount,payAmountInCurrency:e.sellAmountInCurrency,receiveAmountInCurrency:e.buyAmountInCurrency,totalFee:n,totalFeeInCurrency:t,totalFeePercentage:s,expiresAt:e.expiresAt,expiresIn:e.expiresIn,route:e.routes[0],data:e.data})}async getSwapOrderFromTrade(e,r,o){const n=i.SwapOrderRequestSchema.parse({chain:"starknet",sellToken:r.payToken.address,buyToken:r.receiveToken.address,sellAmount:r.payAmount,buyAmount:r.receiveAmount,accountAddress:e,slippage:o/1e4,data:r.data});try{const t=await this.httpService.post(this.swapOrderUrl,{body:JSON.stringify(n),headers:{"Content-Type":"application/json"}});return await i.SwapOrderResponseSchema.parseAsync(t)}catch(t){throw console.error(t),new a.SwapError({code:"INVALID_SWAP_ORDER_RESPONSE"})}}}exports.SharedSwapService=y;
@@ -1,10 +1,10 @@
1
1
  import p from "url-join";
2
2
  import { SwapError as a } from "../../../errors/swap.js";
3
- import { urlWithQuery as i } from "../../../utils/url/urlWithQuery.js";
4
- import { SwapQuoteResponseSchema as u } from "../models/quote.model.js";
5
- import { calculateTotalFee as m } from "../utils/totalFee.js";
6
- import { TradeSchema as l } from "../models/trade.model.js";
7
- import { SwapOrderRequestSchema as S, SwapOrderResponseSchema as y } from "../models/order.model.js";
3
+ import { SwapQuoteResponseSchema as i } from "../models/quote.model.js";
4
+ import { calculateTotalFee as u } from "../utils/totalFee.js";
5
+ import { TradeSchema as m } from "../models/trade.model.js";
6
+ import { SwapOrderRequestSchema as l, SwapOrderResponseSchema as S } from "../models/order.model.js";
7
+ import { urlWithQuery as y } from "../../../utils/url/urlWithQuery.js";
8
8
  class _ {
9
9
  constructor(e, r) {
10
10
  if (this.httpService = e, !r)
@@ -12,7 +12,7 @@ class _ {
12
12
  this.swapQuoteUrl = p(r, "/quote"), this.swapOrderUrl = p(r, "/order");
13
13
  }
14
14
  async getSwapQuoteForPay(e, r, o, n, t = "USD") {
15
- const s = i(this.swapQuoteUrl, {
15
+ const s = y(this.swapQuoteUrl, {
16
16
  accountAddress: n,
17
17
  currency: t,
18
18
  chain: "starknet",
@@ -22,7 +22,7 @@ class _ {
22
22
  });
23
23
  try {
24
24
  const c = await this.httpService.get(s);
25
- return await u.parseAsync(c);
25
+ return await i.parseAsync(c);
26
26
  } catch (c) {
27
27
  throw console.error(c), new a({ code: "INVALID_QUOTE_RESPONSE" });
28
28
  }
@@ -30,8 +30,8 @@ class _ {
30
30
  async getSwapTradeFromQuote(e, r, o) {
31
31
  if (!r || !o)
32
32
  throw new a({ code: "INVALID_SWAP_TOKENS" });
33
- const { totalFee: n, totalFeeInCurrency: t, totalFeePercentage: s } = m(e);
34
- return l.parse({
33
+ const { totalFee: n, totalFeeInCurrency: t, totalFeePercentage: s } = u(e);
34
+ return m.parse({
35
35
  payToken: r,
36
36
  receiveToken: o,
37
37
  payAmount: e.sellAmount,
@@ -48,7 +48,7 @@ class _ {
48
48
  });
49
49
  }
50
50
  async getSwapOrderFromTrade(e, r, o) {
51
- const n = S.parse({
51
+ const n = l.parse({
52
52
  chain: "starknet",
53
53
  sellToken: r.payToken.address,
54
54
  buyToken: r.receiveToken.address,
@@ -65,7 +65,7 @@ class _ {
65
65
  "Content-Type": "application/json"
66
66
  }
67
67
  });
68
- return await y.parseAsync(t);
68
+ return await S.parseAsync(t);
69
69
  } catch (t) {
70
70
  throw console.error(t), new a({ code: "INVALID_SWAP_ORDER_RESPONSE" });
71
71
  }
@@ -261,6 +261,7 @@ export declare class TokenServiceWeb implements ITokenServiceWeb {
261
261
  apy: string;
262
262
  }>;
263
263
  investmentId: import('zod').ZodOptional<import('zod').ZodString>;
264
+ totalBalances: import('zod').ZodRecord<import('zod').ZodString, import('zod').ZodString>;
264
265
  }>, "strip", import('zod').ZodTypeAny, {
265
266
  data: {
266
267
  apy: string;
@@ -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()}))})),t=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(t)}),D=t,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)}),o=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:o,token1:o})}),P=e.z.array(n),s=i.extend({data:e.z.object({apy:e.z.string()}),investmentId:e.z.string().optional()}),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=o;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=t;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({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;
@@ -706,6 +706,7 @@ export declare const apiStakingPositionSchema: z.ZodObject<z.objectUtil.extendSh
706
706
  apy: string;
707
707
  }>;
708
708
  investmentId: z.ZodOptional<z.ZodString>;
709
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
709
710
  }>, "strip", z.ZodTypeAny, {
710
711
  data: {
711
712
  apy: string;
@@ -736,6 +737,7 @@ export declare const apiStakingPositionsSchema: z.ZodArray<z.ZodObject<z.objectU
736
737
  apy: string;
737
738
  }>;
738
739
  investmentId: z.ZodOptional<z.ZodString>;
740
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
739
741
  }>, "strip", z.ZodTypeAny, {
740
742
  data: {
741
743
  apy: string;
@@ -1289,6 +1291,7 @@ export declare const apiDefiPositionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[
1289
1291
  apy: string;
1290
1292
  }>;
1291
1293
  investmentId: z.ZodOptional<z.ZodString>;
1294
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
1292
1295
  }>, "strip", z.ZodTypeAny, {
1293
1296
  data: {
1294
1297
  apy: string;
@@ -1617,6 +1620,7 @@ export declare const apiDefiDecompositionProducts: z.ZodArray<z.ZodUnion<[z.ZodU
1617
1620
  apy: string;
1618
1621
  }>;
1619
1622
  investmentId: z.ZodOptional<z.ZodString>;
1623
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
1620
1624
  }>, "strip", z.ZodTypeAny, {
1621
1625
  data: {
1622
1626
  apy: string;
@@ -1958,6 +1962,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
1958
1962
  apy: string;
1959
1963
  }>;
1960
1964
  investmentId: z.ZodOptional<z.ZodString>;
1965
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
1961
1966
  }>, "strip", z.ZodTypeAny, {
1962
1967
  data: {
1963
1968
  apy: string;
@@ -2299,6 +2304,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
2299
2304
  apy: string;
2300
2305
  }>;
2301
2306
  investmentId: z.ZodOptional<z.ZodString>;
2307
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
2302
2308
  }>, "strip", z.ZodTypeAny, {
2303
2309
  data: {
2304
2310
  apy: string;
@@ -2640,6 +2646,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
2640
2646
  apy: string;
2641
2647
  }>;
2642
2648
  investmentId: z.ZodOptional<z.ZodString>;
2649
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
2643
2650
  }>, "strip", z.ZodTypeAny, {
2644
2651
  data: {
2645
2652
  apy: string;
@@ -2981,6 +2988,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
2981
2988
  apy: string;
2982
2989
  }>;
2983
2990
  investmentId: z.ZodOptional<z.ZodString>;
2991
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
2984
2992
  }>, "strip", z.ZodTypeAny, {
2985
2993
  data: {
2986
2994
  apy: string;
@@ -3322,6 +3330,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
3322
3330
  apy: string;
3323
3331
  }>;
3324
3332
  investmentId: z.ZodOptional<z.ZodString>;
3333
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
3325
3334
  }>, "strip", z.ZodTypeAny, {
3326
3335
  data: {
3327
3336
  apy: string;
@@ -3664,6 +3673,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
3664
3673
  apy: string;
3665
3674
  }>;
3666
3675
  investmentId: z.ZodOptional<z.ZodString>;
3676
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
3667
3677
  }>, "strip", z.ZodTypeAny, {
3668
3678
  data: {
3669
3679
  apy: string;
@@ -4005,6 +4015,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
4005
4015
  apy: string;
4006
4016
  }>;
4007
4017
  investmentId: z.ZodOptional<z.ZodString>;
4018
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
4008
4019
  }>, "strip", z.ZodTypeAny, {
4009
4020
  data: {
4010
4021
  apy: string;
@@ -4346,6 +4357,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
4346
4357
  apy: string;
4347
4358
  }>;
4348
4359
  investmentId: z.ZodOptional<z.ZodString>;
4360
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
4349
4361
  }>, "strip", z.ZodTypeAny, {
4350
4362
  data: {
4351
4363
  apy: string;
@@ -4687,6 +4699,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
4687
4699
  apy: string;
4688
4700
  }>;
4689
4701
  investmentId: z.ZodOptional<z.ZodString>;
4702
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
4690
4703
  }>, "strip", z.ZodTypeAny, {
4691
4704
  data: {
4692
4705
  apy: string;
@@ -5028,6 +5041,7 @@ export declare const apiDefiDecompositionProduct: z.ZodEffects<z.ZodObject<{
5028
5041
  apy: string;
5029
5042
  }>;
5030
5043
  investmentId: z.ZodOptional<z.ZodString>;
5044
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
5031
5045
  }>, "strip", z.ZodTypeAny, {
5032
5046
  data: {
5033
5047
  apy: string;
@@ -5373,6 +5387,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
5373
5387
  apy: string;
5374
5388
  }>;
5375
5389
  investmentId: z.ZodOptional<z.ZodString>;
5390
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
5376
5391
  }>, "strip", z.ZodTypeAny, {
5377
5392
  data: {
5378
5393
  apy: string;
@@ -5714,6 +5729,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
5714
5729
  apy: string;
5715
5730
  }>;
5716
5731
  investmentId: z.ZodOptional<z.ZodString>;
5732
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
5717
5733
  }>, "strip", z.ZodTypeAny, {
5718
5734
  data: {
5719
5735
  apy: string;
@@ -6055,6 +6071,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
6055
6071
  apy: string;
6056
6072
  }>;
6057
6073
  investmentId: z.ZodOptional<z.ZodString>;
6074
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
6058
6075
  }>, "strip", z.ZodTypeAny, {
6059
6076
  data: {
6060
6077
  apy: string;
@@ -6396,6 +6413,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
6396
6413
  apy: string;
6397
6414
  }>;
6398
6415
  investmentId: z.ZodOptional<z.ZodString>;
6416
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
6399
6417
  }>, "strip", z.ZodTypeAny, {
6400
6418
  data: {
6401
6419
  apy: string;
@@ -6737,6 +6755,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
6737
6755
  apy: string;
6738
6756
  }>;
6739
6757
  investmentId: z.ZodOptional<z.ZodString>;
6758
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
6740
6759
  }>, "strip", z.ZodTypeAny, {
6741
6760
  data: {
6742
6761
  apy: string;
@@ -7079,6 +7098,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
7079
7098
  apy: string;
7080
7099
  }>;
7081
7100
  investmentId: z.ZodOptional<z.ZodString>;
7101
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
7082
7102
  }>, "strip", z.ZodTypeAny, {
7083
7103
  data: {
7084
7104
  apy: string;
@@ -7420,6 +7440,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
7420
7440
  apy: string;
7421
7441
  }>;
7422
7442
  investmentId: z.ZodOptional<z.ZodString>;
7443
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
7423
7444
  }>, "strip", z.ZodTypeAny, {
7424
7445
  data: {
7425
7446
  apy: string;
@@ -7761,6 +7782,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
7761
7782
  apy: string;
7762
7783
  }>;
7763
7784
  investmentId: z.ZodOptional<z.ZodString>;
7785
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
7764
7786
  }>, "strip", z.ZodTypeAny, {
7765
7787
  data: {
7766
7788
  apy: string;
@@ -8102,6 +8124,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
8102
8124
  apy: string;
8103
8125
  }>;
8104
8126
  investmentId: z.ZodOptional<z.ZodString>;
8127
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
8105
8128
  }>, "strip", z.ZodTypeAny, {
8106
8129
  data: {
8107
8130
  apy: string;
@@ -8443,6 +8466,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
8443
8466
  apy: string;
8444
8467
  }>;
8445
8468
  investmentId: z.ZodOptional<z.ZodString>;
8469
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
8446
8470
  }>, "strip", z.ZodTypeAny, {
8447
8471
  data: {
8448
8472
  apy: string;
@@ -8788,6 +8812,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
8788
8812
  apy: string;
8789
8813
  }>;
8790
8814
  investmentId: z.ZodOptional<z.ZodString>;
8815
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
8791
8816
  }>, "strip", z.ZodTypeAny, {
8792
8817
  data: {
8793
8818
  apy: string;
@@ -9132,6 +9157,7 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
9132
9157
  apy: string;
9133
9158
  }>;
9134
9159
  investmentId: z.ZodOptional<z.ZodString>;
9160
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
9135
9161
  }>, "strip", z.ZodTypeAny, {
9136
9162
  data: {
9137
9163
  apy: string;
@@ -9478,6 +9504,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
9478
9504
  apy: string;
9479
9505
  }>;
9480
9506
  investmentId: z.ZodOptional<z.ZodString>;
9507
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
9481
9508
  }>, "strip", z.ZodTypeAny, {
9482
9509
  data: {
9483
9510
  apy: string;
@@ -9819,6 +9846,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
9819
9846
  apy: string;
9820
9847
  }>;
9821
9848
  investmentId: z.ZodOptional<z.ZodString>;
9849
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
9822
9850
  }>, "strip", z.ZodTypeAny, {
9823
9851
  data: {
9824
9852
  apy: string;
@@ -10160,6 +10188,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
10160
10188
  apy: string;
10161
10189
  }>;
10162
10190
  investmentId: z.ZodOptional<z.ZodString>;
10191
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
10163
10192
  }>, "strip", z.ZodTypeAny, {
10164
10193
  data: {
10165
10194
  apy: string;
@@ -10501,6 +10530,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
10501
10530
  apy: string;
10502
10531
  }>;
10503
10532
  investmentId: z.ZodOptional<z.ZodString>;
10533
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
10504
10534
  }>, "strip", z.ZodTypeAny, {
10505
10535
  data: {
10506
10536
  apy: string;
@@ -10842,6 +10872,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
10842
10872
  apy: string;
10843
10873
  }>;
10844
10874
  investmentId: z.ZodOptional<z.ZodString>;
10875
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
10845
10876
  }>, "strip", z.ZodTypeAny, {
10846
10877
  data: {
10847
10878
  apy: string;
@@ -11184,6 +11215,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
11184
11215
  apy: string;
11185
11216
  }>;
11186
11217
  investmentId: z.ZodOptional<z.ZodString>;
11218
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
11187
11219
  }>, "strip", z.ZodTypeAny, {
11188
11220
  data: {
11189
11221
  apy: string;
@@ -11525,6 +11557,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
11525
11557
  apy: string;
11526
11558
  }>;
11527
11559
  investmentId: z.ZodOptional<z.ZodString>;
11560
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
11528
11561
  }>, "strip", z.ZodTypeAny, {
11529
11562
  data: {
11530
11563
  apy: string;
@@ -11866,6 +11899,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
11866
11899
  apy: string;
11867
11900
  }>;
11868
11901
  investmentId: z.ZodOptional<z.ZodString>;
11902
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
11869
11903
  }>, "strip", z.ZodTypeAny, {
11870
11904
  data: {
11871
11905
  apy: string;
@@ -12207,6 +12241,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
12207
12241
  apy: string;
12208
12242
  }>;
12209
12243
  investmentId: z.ZodOptional<z.ZodString>;
12244
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
12210
12245
  }>, "strip", z.ZodTypeAny, {
12211
12246
  data: {
12212
12247
  apy: string;
@@ -12548,6 +12583,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
12548
12583
  apy: string;
12549
12584
  }>;
12550
12585
  investmentId: z.ZodOptional<z.ZodString>;
12586
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
12551
12587
  }>, "strip", z.ZodTypeAny, {
12552
12588
  data: {
12553
12589
  apy: string;
@@ -12893,6 +12929,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
12893
12929
  apy: string;
12894
12930
  }>;
12895
12931
  investmentId: z.ZodOptional<z.ZodString>;
12932
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
12896
12933
  }>, "strip", z.ZodTypeAny, {
12897
12934
  data: {
12898
12935
  apy: string;
@@ -13237,6 +13274,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
13237
13274
  apy: string;
13238
13275
  }>;
13239
13276
  investmentId: z.ZodOptional<z.ZodString>;
13277
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
13240
13278
  }>, "strip", z.ZodTypeAny, {
13241
13279
  data: {
13242
13280
  apy: string;
@@ -13583,6 +13621,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
13583
13621
  apy: string;
13584
13622
  }>;
13585
13623
  investmentId: z.ZodOptional<z.ZodString>;
13624
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
13586
13625
  }>, "strip", z.ZodTypeAny, {
13587
13626
  data: {
13588
13627
  apy: string;
@@ -13929,6 +13968,7 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
13929
13968
  apy: string;
13930
13969
  }>;
13931
13970
  investmentId: z.ZodOptional<z.ZodString>;
13971
+ totalBalances: z.ZodRecord<z.ZodString, z.ZodString>;
13932
13972
  }>, "strip", z.ZodTypeAny, {
13933
13973
  data: {
13934
13974
  apy: string;
@@ -70,8 +70,9 @@ const f = a.object({
70
70
  data: a.object({
71
71
  apy: a.string()
72
72
  }),
73
- investmentId: a.string().optional()
74
- }), x = a.array(s), c = t.extend({
73
+ investmentId: a.string().optional(),
74
+ totalBalances: a.record(a.string())
75
+ }), B = a.array(s), c = t.extend({
75
76
  data: a.object({
76
77
  apy: a.string().optional(),
77
78
  group: a.number().optional(),
@@ -79,7 +80,7 @@ const f = a.object({
79
80
  debt: a.boolean(),
80
81
  lending: a.boolean()
81
82
  })
82
- }), B = a.array(c), l = a.object({
83
+ }), x = a.array(c), l = a.object({
83
84
  data: a.object({
84
85
  delegatingTo: e
85
86
  }),
@@ -128,7 +129,7 @@ export {
128
129
  f as apiAccountTokenBalancesSchema,
129
130
  k as apiAirdropSchema,
130
131
  c as apiCollateralizedDebtPositionSchema,
131
- B as apiCollateralizedDebtPositionsSchema,
132
+ x as apiCollateralizedDebtPositionsSchema,
132
133
  r as apiConcentratedLiquidityPositionSchema,
133
134
  T as apiConcentratedLiquidityPositionsSchema,
134
135
  u as apiDefiDecompositionProduct,
@@ -142,7 +143,7 @@ export {
142
143
  I as apiPriceDataResponseSchema,
143
144
  g as apiPriceDetailsSchema,
144
145
  s as apiStakingPositionSchema,
145
- x as apiStakingPositionsSchema,
146
+ B as apiStakingPositionsSchema,
146
147
  w as apiStrkDelegatedStakingPositionsSchema,
147
148
  p as apiStrkDelegatedStakingSchema,
148
149
  C as apiTokenInfoResponseSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.41.2",
3
+ "version": "1.41.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"