@argent/x-shared 1.46.0 → 1.46.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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),c=require("../utils/starknet/starknet.cjs"),t=require("../chains/starknet/address.cjs"),a=e.z.object({id:e.z.string(),dappId:e.z.string(),productId:e.z.string(),productName:e.z.string(),chain:e.z.string(),name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url().optional(),riskFactor:e.z.enum(["low"]),metrics:e.z.object({baseApy:e.z.string(),totalApy:e.z.string(),tvl:e.z.string().optional()}),incentives:e.z.array(e.z.object({name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url(),metric:e.z.object({apy:e.z.string()})})),buyEnabled:e.z.boolean(),sellEnabled:e.z.boolean()}),s=a.extend({category:e.z.literal("staking"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()})})}),o=a.extend({category:e.z.literal("lending"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({totalFee:e.z.string()}),withdrawalFees:e.z.object({totalFee:e.z.string()})})}),n=e.z.object({name:e.z.string().optional(),iconUrl:e.z.string().url().optional(),address:e.z.string()}),r=a.extend({category:e.z.literal("strkDelegatedStaking"),stakerInfo:n,investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional()}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional(),amountsRequirement:e.z.enum(["fullBalance"]).optional(),timelockDuration:e.z.number().optional()}),fees:e.z.object({depositFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),performanceFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}).optional()}),claimEnabled:e.z.boolean().optional()}),i=e.z.discriminatedUnion("category",[s,o,r]),z=e.z.object({investments:e.z.array(i)}),d=e.z.object({calls:e.z.array(c.callSchema)}),m=e.z.object({investmentId:e.z.string(),stakerInfo:n,accountAddress:t.addressSchemaArgentBackend,tokenAddress:t.addressSchemaArgentBackend,amount:e.z.string()}),l=e.z.enum(["stake","initiateWithdraw","withdraw","claim"]),g=e.z.object({stakingAction:l,stakerInfo:n,tokenAddress:t.addressSchema,amount:e.z.string()});exports.investmentMetaSchema=g;exports.investmentSchema=i;exports.investmentsResponseSchema=z;exports.lendingInvestmentSchema=o;exports.stakerInfoSchema=n;exports.stakingActionSchema=l;exports.stakingInvestmentSchema=s;exports.strkDelegatedStakingInvestmentSchema=r;exports.strkStakingCalldataResponseSchema=d;exports.strkStakingCalldataSchema=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),c=require("../utils/starknet/starknet.cjs"),t=require("../chains/starknet/address.cjs"),a=e.z.object({id:e.z.string(),dappId:e.z.string(),productId:e.z.string(),productName:e.z.string(),chain:e.z.string(),name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url().optional(),riskFactor:e.z.enum(["low"]),metrics:e.z.object({baseApy:e.z.string(),totalApy:e.z.string(),tvl:e.z.string().optional()}),incentives:e.z.array(e.z.object({name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url(),metric:e.z.object({apy:e.z.string()})})),buyEnabled:e.z.boolean(),sellEnabled:e.z.boolean()}),s=a.extend({category:e.z.literal("staking"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()})})}),o=a.extend({category:e.z.literal("lending"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({totalFee:e.z.string()}),withdrawalFees:e.z.object({totalFee:e.z.string()})})}),n=e.z.object({name:e.z.string().optional(),iconUrl:e.z.string().url().optional(),address:e.z.string()}),r=a.extend({category:e.z.literal("strkDelegatedStaking"),stakerInfo:n,investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional()}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional(),amountsRequirement:e.z.enum(["fullBalance"]).optional(),timelockDuration:e.z.number().optional()}),fees:e.z.object({depositFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),performanceFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}).optional()}),buyEnabled:e.z.boolean().optional(),sellEnabled:e.z.boolean().optional(),claimEnabled:e.z.boolean().optional()}),i=e.z.discriminatedUnion("category",[s,o,r]),z=e.z.object({investments:e.z.array(i)}),d=e.z.object({calls:e.z.array(c.callSchema)}),m=e.z.object({investmentId:e.z.string(),stakerInfo:n,accountAddress:t.addressSchemaArgentBackend,tokenAddress:t.addressSchemaArgentBackend,amount:e.z.string()}),l=e.z.enum(["stake","initiateWithdraw","withdraw","claim"]),g=e.z.object({stakingAction:l,stakerInfo:n,tokenAddress:t.addressSchema,amount:e.z.string()});exports.investmentMetaSchema=g;exports.investmentSchema=i;exports.investmentsResponseSchema=z;exports.lendingInvestmentSchema=o;exports.stakerInfoSchema=n;exports.stakingActionSchema=l;exports.stakingInvestmentSchema=s;exports.strkDelegatedStakingInvestmentSchema=r;exports.strkStakingCalldataResponseSchema=d;exports.strkStakingCalldataSchema=m;
@@ -609,6 +609,8 @@ export declare const strkDelegatedStakingInvestmentSchema: z.ZodObject<z.objectU
609
609
  providerFee?: string | null | undefined;
610
610
  } | undefined;
611
611
  }>;
612
+ buyEnabled: z.ZodOptional<z.ZodBoolean>;
613
+ sellEnabled: z.ZodOptional<z.ZodBoolean>;
612
614
  claimEnabled: z.ZodOptional<z.ZodBoolean>;
613
615
  }>, "strip", z.ZodTypeAny, {
614
616
  name: string;
@@ -634,8 +636,6 @@ export declare const strkDelegatedStakingInvestmentSchema: z.ZodObject<z.objectU
634
636
  apy: string;
635
637
  };
636
638
  }[];
637
- buyEnabled: boolean;
638
- sellEnabled: boolean;
639
639
  category: "strkDelegatedStaking";
640
640
  investableAssets: {
641
641
  tokenAddresses: `0x${string}`[];
@@ -675,6 +675,8 @@ export declare const strkDelegatedStakingInvestmentSchema: z.ZodObject<z.objectU
675
675
  iconUrl?: string | undefined;
676
676
  };
677
677
  learnMoreUrl?: string | undefined;
678
+ buyEnabled?: boolean | undefined;
679
+ sellEnabled?: boolean | undefined;
678
680
  claimEnabled?: boolean | undefined;
679
681
  }, {
680
682
  name: string;
@@ -700,8 +702,6 @@ export declare const strkDelegatedStakingInvestmentSchema: z.ZodObject<z.objectU
700
702
  apy: string;
701
703
  };
702
704
  }[];
703
- buyEnabled: boolean;
704
- sellEnabled: boolean;
705
705
  category: "strkDelegatedStaking";
706
706
  investableAssets: {
707
707
  tokenAddresses: string[];
@@ -741,6 +741,8 @@ export declare const strkDelegatedStakingInvestmentSchema: z.ZodObject<z.objectU
741
741
  iconUrl?: string | undefined;
742
742
  };
743
743
  learnMoreUrl?: string | undefined;
744
+ buyEnabled?: boolean | undefined;
745
+ sellEnabled?: boolean | undefined;
744
746
  claimEnabled?: boolean | undefined;
745
747
  }>;
746
748
  export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.ZodObject<z.objectUtil.extendShape<{
@@ -1337,6 +1339,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
1337
1339
  providerFee?: string | null | undefined;
1338
1340
  } | undefined;
1339
1341
  }>;
1342
+ buyEnabled: z.ZodOptional<z.ZodBoolean>;
1343
+ sellEnabled: z.ZodOptional<z.ZodBoolean>;
1340
1344
  claimEnabled: z.ZodOptional<z.ZodBoolean>;
1341
1345
  }>, "strip", z.ZodTypeAny, {
1342
1346
  name: string;
@@ -1362,8 +1366,6 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
1362
1366
  apy: string;
1363
1367
  };
1364
1368
  }[];
1365
- buyEnabled: boolean;
1366
- sellEnabled: boolean;
1367
1369
  category: "strkDelegatedStaking";
1368
1370
  investableAssets: {
1369
1371
  tokenAddresses: `0x${string}`[];
@@ -1403,6 +1405,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
1403
1405
  iconUrl?: string | undefined;
1404
1406
  };
1405
1407
  learnMoreUrl?: string | undefined;
1408
+ buyEnabled?: boolean | undefined;
1409
+ sellEnabled?: boolean | undefined;
1406
1410
  claimEnabled?: boolean | undefined;
1407
1411
  }, {
1408
1412
  name: string;
@@ -1428,8 +1432,6 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
1428
1432
  apy: string;
1429
1433
  };
1430
1434
  }[];
1431
- buyEnabled: boolean;
1432
- sellEnabled: boolean;
1433
1435
  category: "strkDelegatedStaking";
1434
1436
  investableAssets: {
1435
1437
  tokenAddresses: string[];
@@ -1469,6 +1471,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
1469
1471
  iconUrl?: string | undefined;
1470
1472
  };
1471
1473
  learnMoreUrl?: string | undefined;
1474
+ buyEnabled?: boolean | undefined;
1475
+ sellEnabled?: boolean | undefined;
1472
1476
  claimEnabled?: boolean | undefined;
1473
1477
  }>]>;
1474
1478
  export type Investment = z.infer<typeof investmentSchema>;
@@ -2070,6 +2074,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2070
2074
  providerFee?: string | null | undefined;
2071
2075
  } | undefined;
2072
2076
  }>;
2077
+ buyEnabled: z.ZodOptional<z.ZodBoolean>;
2078
+ sellEnabled: z.ZodOptional<z.ZodBoolean>;
2073
2079
  claimEnabled: z.ZodOptional<z.ZodBoolean>;
2074
2080
  }>, "strip", z.ZodTypeAny, {
2075
2081
  name: string;
@@ -2095,8 +2101,6 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2095
2101
  apy: string;
2096
2102
  };
2097
2103
  }[];
2098
- buyEnabled: boolean;
2099
- sellEnabled: boolean;
2100
2104
  category: "strkDelegatedStaking";
2101
2105
  investableAssets: {
2102
2106
  tokenAddresses: `0x${string}`[];
@@ -2136,6 +2140,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2136
2140
  iconUrl?: string | undefined;
2137
2141
  };
2138
2142
  learnMoreUrl?: string | undefined;
2143
+ buyEnabled?: boolean | undefined;
2144
+ sellEnabled?: boolean | undefined;
2139
2145
  claimEnabled?: boolean | undefined;
2140
2146
  }, {
2141
2147
  name: string;
@@ -2161,8 +2167,6 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2161
2167
  apy: string;
2162
2168
  };
2163
2169
  }[];
2164
- buyEnabled: boolean;
2165
- sellEnabled: boolean;
2166
2170
  category: "strkDelegatedStaking";
2167
2171
  investableAssets: {
2168
2172
  tokenAddresses: string[];
@@ -2202,6 +2206,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2202
2206
  iconUrl?: string | undefined;
2203
2207
  };
2204
2208
  learnMoreUrl?: string | undefined;
2209
+ buyEnabled?: boolean | undefined;
2210
+ sellEnabled?: boolean | undefined;
2205
2211
  claimEnabled?: boolean | undefined;
2206
2212
  }>]>, "many">;
2207
2213
  }, "strip", z.ZodTypeAny, {
@@ -2319,8 +2325,6 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2319
2325
  apy: string;
2320
2326
  };
2321
2327
  }[];
2322
- buyEnabled: boolean;
2323
- sellEnabled: boolean;
2324
2328
  category: "strkDelegatedStaking";
2325
2329
  investableAssets: {
2326
2330
  tokenAddresses: `0x${string}`[];
@@ -2360,6 +2364,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2360
2364
  iconUrl?: string | undefined;
2361
2365
  };
2362
2366
  learnMoreUrl?: string | undefined;
2367
+ buyEnabled?: boolean | undefined;
2368
+ sellEnabled?: boolean | undefined;
2363
2369
  claimEnabled?: boolean | undefined;
2364
2370
  })[];
2365
2371
  }, {
@@ -2477,8 +2483,6 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2477
2483
  apy: string;
2478
2484
  };
2479
2485
  }[];
2480
- buyEnabled: boolean;
2481
- sellEnabled: boolean;
2482
2486
  category: "strkDelegatedStaking";
2483
2487
  investableAssets: {
2484
2488
  tokenAddresses: string[];
@@ -2518,6 +2522,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2518
2522
  iconUrl?: string | undefined;
2519
2523
  };
2520
2524
  learnMoreUrl?: string | undefined;
2525
+ buyEnabled?: boolean | undefined;
2526
+ sellEnabled?: boolean | undefined;
2521
2527
  claimEnabled?: boolean | undefined;
2522
2528
  })[];
2523
2529
  }>;
@@ -105,6 +105,8 @@ const n = e.object({
105
105
  totalFee: e.string()
106
106
  }).optional()
107
107
  }),
108
+ buyEnabled: e.boolean().optional(),
109
+ sellEnabled: e.boolean().optional(),
108
110
  claimEnabled: e.boolean().optional()
109
111
  }), c = e.discriminatedUnion("category", [
110
112
  r,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.46.0",
3
+ "version": "1.46.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"