@argent/x-shared 1.75.8 → 1.76.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 c=require("lodash-es"),o=require("./HttpError.cjs"),u=require("./IHttpService.cjs");class d{constructor(n,e="json"){this.requestInit=n,this.responseType=e}async get(n,e){const s=c.isFunction(this.requestInit)?await this.requestInit():this.requestInit,a={...s,...e,method:"GET",headers:{...s?.headers,...e?.headers}},t=await fetch(n,a).catch(async r=>{let i;throw r instanceof Response&&(i=await r.json().catch(()=>{})),new o.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_FETCH_URL,0,i)});if(this.responseType==="json"){if(!t.ok)throw new o.HttpError(t.statusText,t.status,await t.json().catch(()=>{}));return await t.json()}return t}async post(n,e,s){const a=c.isFunction(this.requestInit)?await this.requestInit():this.requestInit,t={...a,...e,method:"POST",headers:{...a?.headers,...e?.headers}},r=await fetch(n,t).catch(()=>{throw new o.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_POST_URL,0)});if(!r.ok)throw new o.HttpError(r.statusText,r.status,await r.json());if(r.status===204)return{};const i=await r.json();if(s)try{return s.parse(i)}catch(h){throw new o.HttpError(h.message,0)}return i}async put(n,e){const s=c.isFunction(this.requestInit)?await this.requestInit():this.requestInit,a={...s,...e,method:"PUT",headers:{...s?.headers,...e?.headers}},t=await fetch(n,a).catch(()=>{throw new o.HttpError("Failed to put url",0)});if(!t.ok)throw new o.HttpError(t.statusText,t.status);return await t.json()}async delete(n,e){const s=c.isFunction(this.requestInit)?await this.requestInit():this.requestInit,a={...s,...e,method:"DELETE",headers:{...s?.headers,...e?.headers}},t=await fetch(n,a).catch(()=>{throw new o.HttpError("Failed to delete url",0)});if(!t.ok)throw new o.HttpError(t.statusText,t.status)}}exports.HTTPService=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("lodash-es"),n=require("./HttpError.cjs"),u=require("./IHttpService.cjs");class d{constructor(i,e="json"){this.requestInit=i,this.responseType=e}async get(i,e,s){const o=h.isFunction(this.requestInit)?await this.requestInit():this.requestInit,c={...o,...e,method:"GET",headers:{...o?.headers,...e?.headers}},t=await fetch(i,c).catch(async r=>{let a;throw r instanceof Response&&(a=await r.json().catch(()=>{})),new n.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_FETCH_URL,0,a)});if(this.responseType==="json"){if(!t.ok)throw new n.HttpError(t.statusText,t.status,await t.json().catch(()=>{}));const r=await t.json();if(s)try{return s.parse(r)}catch(a){throw new n.HttpError(a.message,0)}return r}return t}async post(i,e,s){const o=h.isFunction(this.requestInit)?await this.requestInit():this.requestInit,c={...o,...e,method:"POST",headers:{...o?.headers,...e?.headers}},t=await fetch(i,c).catch(()=>{throw new n.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_POST_URL,0)});if(!t.ok)throw new n.HttpError(t.statusText,t.status,await t.json());if(t.status===204)return{};const r=await t.json();if(s)try{return s.parse(r)}catch(a){throw new n.HttpError(a.message,0)}return r}async put(i,e,s){const o=h.isFunction(this.requestInit)?await this.requestInit():this.requestInit,c={...o,...e,method:"PUT",headers:{...o?.headers,...e?.headers}},t=await fetch(i,c).catch(()=>{throw new n.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_PUT_URL,0)});if(!t.ok)throw new n.HttpError(t.statusText,t.status,await t.json().catch(()=>{}));if(t.status===204)return{};const r=await t.json();if(s)try{return s.parse(r)}catch(a){throw new n.HttpError(a.message,0)}return r}async delete(i,e){const s=h.isFunction(this.requestInit)?await this.requestInit():this.requestInit,o={...s,...e,method:"DELETE",headers:{...s?.headers,...e?.headers}},c=await fetch(i,o).catch(()=>{throw new n.HttpError(u.HTTP_ERROR_MESSAGE.FAILED_TO_DELETE_URL,0)});if(!c.ok)throw new n.HttpError(c.statusText,c.status)}}exports.HTTPService=d;
@@ -7,9 +7,9 @@ export declare class HTTPService implements IHttpService {
7
7
  private requestInit;
8
8
  private responseType;
9
9
  constructor(requestInit?: CanBeFn<RequestInit>, responseType?: ResponseType);
10
- get<T>(url: string, requestInit?: RequestInit): Promise<T>;
10
+ get<T>(url: string, requestInit?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
11
11
  post<T>(url: string, requestInit?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
12
- put<T>(url: string, requestInit?: RequestInit): Promise<T>;
12
+ put<T>(url: string, requestInit?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
13
13
  delete(url: string, requestInit?: RequestInit): Promise<void>;
14
14
  }
15
15
  export {};
@@ -1,78 +1,95 @@
1
- import { isFunction as h } from "lodash-es";
2
- import { HttpError as o } from "./HttpError.js";
1
+ import { isFunction as c } from "lodash-es";
2
+ import { HttpError as r } from "./HttpError.js";
3
3
  import { HTTP_ERROR_MESSAGE as u } from "./IHttpService.js";
4
- class T {
5
- constructor(n, e = "json") {
6
- this.requestInit = n, this.responseType = e;
4
+ class f {
5
+ constructor(i, e = "json") {
6
+ this.requestInit = i, this.responseType = e;
7
7
  }
8
- async get(n, e) {
9
- const s = h(this.requestInit) ? await this.requestInit() : this.requestInit, r = {
10
- ...s,
8
+ async get(i, e, s) {
9
+ const o = c(this.requestInit) ? await this.requestInit() : this.requestInit, h = {
10
+ ...o,
11
11
  ...e,
12
12
  method: "GET",
13
13
  // merge headers
14
14
  headers: {
15
- ...s?.headers,
15
+ ...o?.headers,
16
16
  ...e?.headers
17
17
  }
18
- }, t = await fetch(n, r).catch(async (a) => {
19
- let i;
20
- throw a instanceof Response && (i = await a.json().catch(() => {
21
- })), new o(u.FAILED_TO_FETCH_URL, 0, i);
18
+ }, t = await fetch(i, h).catch(async (a) => {
19
+ let n;
20
+ throw a instanceof Response && (n = await a.json().catch(() => {
21
+ })), new r(u.FAILED_TO_FETCH_URL, 0, n);
22
22
  });
23
23
  if (this.responseType === "json") {
24
24
  if (!t.ok)
25
- throw new o(t.statusText, t.status, await t.json().catch(() => {
25
+ throw new r(t.statusText, t.status, await t.json().catch(() => {
26
26
  }));
27
- return await t.json();
27
+ const a = await t.json();
28
+ if (s)
29
+ try {
30
+ return s.parse(a);
31
+ } catch (n) {
32
+ throw new r(n.message, 0);
33
+ }
34
+ return a;
28
35
  }
29
36
  return t;
30
37
  }
31
- async post(n, e, s) {
32
- const r = h(this.requestInit) ? await this.requestInit() : this.requestInit, t = {
33
- ...r,
38
+ async post(i, e, s) {
39
+ const o = c(this.requestInit) ? await this.requestInit() : this.requestInit, h = {
40
+ ...o,
34
41
  ...e,
35
42
  method: "POST",
36
43
  // merge headers
37
44
  headers: {
38
- ...r?.headers,
45
+ ...o?.headers,
39
46
  ...e?.headers
40
47
  }
41
- }, a = await fetch(n, t).catch(() => {
42
- throw new o(u.FAILED_TO_POST_URL, 0);
48
+ }, t = await fetch(i, h).catch(() => {
49
+ throw new r(u.FAILED_TO_POST_URL, 0);
43
50
  });
44
- if (!a.ok)
45
- throw new o(a.statusText, a.status, await a.json());
46
- if (a.status === 204)
51
+ if (!t.ok)
52
+ throw new r(t.statusText, t.status, await t.json());
53
+ if (t.status === 204)
47
54
  return {};
48
- const i = await a.json();
55
+ const a = await t.json();
49
56
  if (s)
50
57
  try {
51
- return s.parse(i);
52
- } catch (c) {
53
- throw new o(c.message, 0);
58
+ return s.parse(a);
59
+ } catch (n) {
60
+ throw new r(n.message, 0);
54
61
  }
55
- return i;
62
+ return a;
56
63
  }
57
- async put(n, e) {
58
- const s = h(this.requestInit) ? await this.requestInit() : this.requestInit, r = {
59
- ...s,
64
+ async put(i, e, s) {
65
+ const o = c(this.requestInit) ? await this.requestInit() : this.requestInit, h = {
66
+ ...o,
60
67
  ...e,
61
68
  method: "PUT",
62
69
  // merge headers
63
70
  headers: {
64
- ...s?.headers,
71
+ ...o?.headers,
65
72
  ...e?.headers
66
73
  }
67
- }, t = await fetch(n, r).catch(() => {
68
- throw new o("Failed to put url", 0);
74
+ }, t = await fetch(i, h).catch(() => {
75
+ throw new r(u.FAILED_TO_PUT_URL, 0);
69
76
  });
70
77
  if (!t.ok)
71
- throw new o(t.statusText, t.status);
72
- return await t.json();
78
+ throw new r(t.statusText, t.status, await t.json().catch(() => {
79
+ }));
80
+ if (t.status === 204)
81
+ return {};
82
+ const a = await t.json();
83
+ if (s)
84
+ try {
85
+ return s.parse(a);
86
+ } catch (n) {
87
+ throw new r(n.message, 0);
88
+ }
89
+ return a;
73
90
  }
74
- async delete(n, e) {
75
- const s = h(this.requestInit) ? await this.requestInit() : this.requestInit, r = {
91
+ async delete(i, e) {
92
+ const s = c(this.requestInit) ? await this.requestInit() : this.requestInit, o = {
76
93
  ...s,
77
94
  ...e,
78
95
  method: "DELETE",
@@ -81,13 +98,13 @@ class T {
81
98
  ...s?.headers,
82
99
  ...e?.headers
83
100
  }
84
- }, t = await fetch(n, r).catch(() => {
85
- throw new o("Failed to delete url", 0);
101
+ }, h = await fetch(i, o).catch(() => {
102
+ throw new r(u.FAILED_TO_DELETE_URL, 0);
86
103
  });
87
- if (!t.ok)
88
- throw new o(t.statusText, t.status);
104
+ if (!h.ok)
105
+ throw new r(h.statusText, h.status);
89
106
  }
90
107
  }
91
108
  export {
92
- T as HTTPService
109
+ f as HTTPService
93
110
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.HTTP_ERROR_MESSAGE=void 0;(function(t){t.FAILED_TO_FETCH_URL="Failed to fetch url",t.FAILED_TO_POST_URL="Failed to post url"})(exports.HTTP_ERROR_MESSAGE||(exports.HTTP_ERROR_MESSAGE={}));
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.HTTP_ERROR_MESSAGE=void 0;(function(e){e.FAILED_TO_FETCH_URL="Failed to fetch url",e.FAILED_TO_POST_URL="Failed to post url",e.FAILED_TO_PUT_URL="Failed to put url",e.FAILED_TO_DELETE_URL="Failed to delete url"})(exports.HTTP_ERROR_MESSAGE||(exports.HTTP_ERROR_MESSAGE={}));
@@ -1,11 +1,13 @@
1
1
  import { ZodType } from 'zod';
2
2
  export interface IHttpService {
3
- get<T>(url: string, options?: RequestInit): Promise<T>;
3
+ get<T>(url: string, options?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
4
4
  post<T>(url: string, options?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
5
5
  delete(url: string, options?: RequestInit): Promise<void>;
6
- put<T>(url: string, options?: RequestInit): Promise<T>;
6
+ put<T>(url: string, options?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
7
7
  }
8
8
  export declare enum HTTP_ERROR_MESSAGE {
9
9
  FAILED_TO_FETCH_URL = "Failed to fetch url",
10
- FAILED_TO_POST_URL = "Failed to post url"
10
+ FAILED_TO_POST_URL = "Failed to post url",
11
+ FAILED_TO_PUT_URL = "Failed to put url",
12
+ FAILED_TO_DELETE_URL = "Failed to delete url"
11
13
  }
@@ -1,7 +1,7 @@
1
- var _;
1
+ var e;
2
2
  (function(t) {
3
- t.FAILED_TO_FETCH_URL = "Failed to fetch url", t.FAILED_TO_POST_URL = "Failed to post url";
4
- })(_ || (_ = {}));
3
+ t.FAILED_TO_FETCH_URL = "Failed to fetch url", t.FAILED_TO_POST_URL = "Failed to post url", t.FAILED_TO_PUT_URL = "Failed to put url", t.FAILED_TO_DELETE_URL = "Failed to delete url";
4
+ })(e || (e = {}));
5
5
  export {
6
- _ as HTTP_ERROR_MESSAGE
6
+ e as HTTP_ERROR_MESSAGE
7
7
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),z=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()}),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()})}),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"])}),claimRewardsUrl:e.z.string().url().optional(),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().optional()}),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()}),l=e.z.discriminatedUnion("category",[s,o,r]),d=e.z.object({investments:e.z.array(l)}),g=e.z.object({calls:e.z.array(z.callSchema)}),m=e.z.object({investmentId:e.z.string(),investmentType:e.z.enum(["staking","lending","strkDelegatedStaking"]).optional(),accountAddress:t.addressSchemaArgentBackend,tokenAddress:t.addressSchemaArgentBackend,stakerInfo:n,amount:e.z.string()}),i=e.z.enum(["deposit","stake","initiateWithdraw","withdraw","claim"]),c=e.z.object({useFullBalance:e.z.boolean().optional(),subsequentTransaction:e.z.boolean().optional()}),b=e.z.object({investmentId:e.z.string().optional(),stakingAction:i,stakerInfo:n,tokenAddress:t.addressSchema,amount:e.z.string(),...c.shape});exports.buildSellOptsSchema=c;exports.investmentMetaSchema=b;exports.investmentSchema=l;exports.investmentsResponseSchema=d;exports.lendingInvestmentSchema=o;exports.liquidStakingInvestmentSchema=s;exports.stakerInfoSchema=n;exports.stakingActionSchema=i;exports.strkDelegatedStakingInvestmentSchema=r;exports.strkStakingCalldataResponseSchema=g;exports.strkStakingCalldataSchema=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),z=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()}),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()})}),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"])}),claimRewardsUrl:e.z.url().optional(),externalUrl:e.z.url().optional(),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().optional()}),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()}),l=e.z.discriminatedUnion("category",[s,o,r]),d=e.z.object({investments:e.z.array(l)}),g=e.z.object({calls:e.z.array(z.callSchema)}),m=e.z.object({investmentId:e.z.string(),investmentType:e.z.enum(["staking","lending","strkDelegatedStaking"]).optional(),accountAddress:t.addressSchemaArgentBackend,tokenAddress:t.addressSchemaArgentBackend,stakerInfo:n,amount:e.z.string()}),i=e.z.enum(["deposit","stake","initiateWithdraw","withdraw","claim"]),c=e.z.object({useFullBalance:e.z.boolean().optional(),subsequentTransaction:e.z.boolean().optional()}),b=e.z.object({investmentId:e.z.string().optional(),stakingAction:i,stakerInfo:n,tokenAddress:t.addressSchema,amount:e.z.string(),...c.shape});exports.buildSellOptsSchema=c;exports.investmentMetaSchema=b;exports.investmentSchema=l;exports.investmentsResponseSchema=d;exports.lendingInvestmentSchema=o;exports.liquidStakingInvestmentSchema=s;exports.stakerInfoSchema=n;exports.stakingActionSchema=i;exports.strkDelegatedStakingInvestmentSchema=r;exports.strkStakingCalldataResponseSchema=g;exports.strkStakingCalldataSchema=m;
@@ -100,7 +100,8 @@ export declare const lendingInvestmentSchema: z.ZodObject<{
100
100
  any: "any";
101
101
  }>;
102
102
  }, z.core.$strip>;
103
- claimRewardsUrl: z.ZodOptional<z.ZodString>;
103
+ claimRewardsUrl: z.ZodOptional<z.ZodURL>;
104
+ externalUrl: z.ZodOptional<z.ZodURL>;
104
105
  fees: z.ZodObject<{
105
106
  depositFees: z.ZodObject<{
106
107
  totalFee: z.ZodString;
@@ -291,7 +292,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
291
292
  any: "any";
292
293
  }>;
293
294
  }, z.core.$strip>;
294
- claimRewardsUrl: z.ZodOptional<z.ZodString>;
295
+ claimRewardsUrl: z.ZodOptional<z.ZodURL>;
296
+ externalUrl: z.ZodOptional<z.ZodURL>;
295
297
  fees: z.ZodObject<{
296
298
  depositFees: z.ZodObject<{
297
299
  totalFee: z.ZodString;
@@ -480,7 +482,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
480
482
  any: "any";
481
483
  }>;
482
484
  }, z.core.$strip>;
483
- claimRewardsUrl: z.ZodOptional<z.ZodString>;
485
+ claimRewardsUrl: z.ZodOptional<z.ZodURL>;
486
+ externalUrl: z.ZodOptional<z.ZodURL>;
484
487
  fees: z.ZodObject<{
485
488
  depositFees: z.ZodObject<{
486
489
  totalFee: z.ZodString;
@@ -64,7 +64,8 @@ const n = e.object({
64
64
  tokenAddresses: e.array(t),
65
65
  tokensRequirement: e.enum(["any"])
66
66
  }),
67
- claimRewardsUrl: e.string().url().optional(),
67
+ claimRewardsUrl: e.url().optional(),
68
+ externalUrl: e.url().optional(),
68
69
  fees: e.object({
69
70
  depositFees: e.object({
70
71
  totalFee: e.string()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.75.8",
3
+ "version": "1.76.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"
@@ -64,23 +64,23 @@
64
64
  "@types/lodash-es": "4.17.12",
65
65
  "@types/numeral": "2.0.5",
66
66
  "@types/ua-parser-js": "0.7.39",
67
- "@typescript-eslint/eslint-plugin": "8.41.0",
68
- "@typescript-eslint/parser": "8.41.0",
67
+ "@typescript-eslint/eslint-plugin": "8.43.0",
68
+ "@typescript-eslint/parser": "8.43.0",
69
69
  "esbuild": "0.25.9",
70
70
  "esbuild-register": "3.6.0",
71
71
  "eslint": "8.57.1",
72
72
  "eslint-config-prettier": "10.1.8",
73
73
  "eslint-plugin-import": "2.32.0",
74
74
  "husky": "9.1.7",
75
- "lint-staged": "16.1.5",
76
- "msw": "2.10.5",
75
+ "lint-staged": "16.1.6",
76
+ "msw": "2.11.1",
77
77
  "prettier": "3.6.2",
78
78
  "semantic-release": "24.2.7",
79
79
  "ts-node": "10.9.2",
80
80
  "ts-to-zod": "3.15.0",
81
81
  "tsx": "4.20.5",
82
82
  "typescript": "5.9.2",
83
- "vite": "7.1.3",
83
+ "vite": "7.1.5",
84
84
  "vite-plugin-dts": "4.5.4",
85
85
  "vitest": "3.2.4"
86
86
  },
@@ -111,7 +111,7 @@
111
111
  "lodash-es": "^4.17.21",
112
112
  "ua-parser-js": "^1.0.38 || ^2.0.0",
113
113
  "url-join": "^5.0.0",
114
- "zod": "4.1.1"
114
+ "zod": "4.1.5"
115
115
  },
116
116
  "lint-staged": {
117
117
  "*": "prettier --ignore-unknown --write",