@argent/x-shared 1.74.2 → 1.75.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.
Files changed (126) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +212 -209
  3. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -1
  4. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js +12 -13
  5. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs +1 -1
  6. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +60 -60
  7. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.cjs +1 -1
  8. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +1 -1
  9. package/dist/src/chains/starknet/address.cjs +1 -1
  10. package/dist/src/chains/starknet/address.js +16 -16
  11. package/dist/src/features/simulation/activity/normalize.cjs +1 -1
  12. package/dist/src/features/simulation/activity/normalize.js +12 -13
  13. package/dist/src/features/simulation/activity/utils/createNativeActivity.cjs +1 -1
  14. package/dist/src/features/simulation/activity/utils/createNativeActivity.js +22 -24
  15. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.cjs +1 -1
  16. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.js +11 -12
  17. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.cjs +1 -1
  18. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.js +2 -8
  19. package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.cjs +1 -1
  20. package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.js +4 -8
  21. package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.cjs +1 -1
  22. package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.js +4 -8
  23. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs +1 -1
  24. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js +3 -9
  25. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.cjs +1 -1
  26. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.js +15 -19
  27. package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.cjs +1 -1
  28. package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.js +4 -8
  29. package/dist/src/features/simulation/activity/utils/isSwapActivity.cjs +1 -1
  30. package/dist/src/features/simulation/activity/utils/isSwapActivity.js +9 -16
  31. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -1
  32. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +4 -8
  33. package/dist/src/features/simulation/fees/schema.cjs +1 -1
  34. package/dist/src/features/simulation/fees/schema.d.ts +16 -0
  35. package/dist/src/features/simulation/fees/schema.js +8 -6
  36. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -1
  37. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +10 -11
  38. package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
  39. package/dist/src/features/simulation/transactionReview/schema.d.ts +23 -0
  40. package/dist/src/features/simulation/transactionReview/schema.js +20 -18
  41. package/dist/src/features/swap/services/SwapTransactionService.cjs +1 -1
  42. package/dist/src/features/swap/services/SwapTransactionService.js +46 -49
  43. package/dist/src/http/HttpService.cjs +1 -1
  44. package/dist/src/http/HttpService.js +55 -55
  45. package/dist/src/knownDapps/utils/getDapplandUrl.cjs +1 -1
  46. package/dist/src/knownDapps/utils/getDapplandUrl.js +6 -8
  47. package/dist/src/nfts/BackendNftService.cjs +1 -1
  48. package/dist/src/nfts/BackendNftService.js +15 -16
  49. package/dist/src/tokens/service/implementation.cjs +1 -1
  50. package/dist/src/tokens/service/implementation.d.ts +2 -0
  51. package/dist/src/tokens/service/implementation.js +12 -12
  52. package/dist/src/tokens/service/types/backend.model.cjs +1 -1
  53. package/dist/src/tokens/service/types/backend.model.d.ts +26 -0
  54. package/dist/src/tokens/service/types/backend.model.js +25 -23
  55. package/dist/src/transactions/estimate/utils.cjs +1 -1
  56. package/dist/src/transactions/estimate/utils.d.ts +33 -0
  57. package/dist/src/transactions/estimate/utils.js +80 -76
  58. package/dist/src/transactions/service/implementation.cjs +1 -1
  59. package/dist/src/transactions/service/implementation.d.ts +4 -0
  60. package/dist/src/transactions/service/implementation.js +89 -96
  61. package/dist/src/transactions/service/utils.cjs +1 -1
  62. package/dist/src/transactions/service/utils.d.ts +2 -3
  63. package/dist/src/transactions/service/utils.js +12 -11
  64. package/dist/src/transactions/transactionVersion.cjs +1 -1
  65. package/dist/src/transactions/transactionVersion.d.ts +2 -0
  66. package/dist/src/transactions/transactionVersion.js +12 -10
  67. package/dist/src/utils/readFileAsString.cjs +1 -1
  68. package/dist/src/utils/readFileAsString.js +3 -6
  69. package/package.json +5 -5
  70. package/dist/defiDecomposition.cjs +0 -1
  71. package/dist/defiDecomposition.d.ts +0 -2
  72. package/dist/defiDecomposition.js +0 -65
  73. package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.cjs +0 -1
  74. package/dist/node_modules/.pnpm/@starknet-io_types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/api/nonspec.js +0 -6
  75. package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.cjs +0 -1
  76. package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.d.ts +0 -6
  77. package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.js +0 -62
  78. package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.cjs +0 -1
  79. package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.d.ts +0 -4
  80. package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.js +0 -31
  81. package/dist/src/features/defiDecomposition/helpers/computeDefiDecompositionUsdValue.cjs +0 -1
  82. package/dist/src/features/defiDecomposition/helpers/computeDefiDecompositionUsdValue.d.ts +0 -4
  83. package/dist/src/features/defiDecomposition/helpers/computeDefiDecompositionUsdValue.js +0 -55
  84. package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.cjs +0 -1
  85. package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.d.ts +0 -4
  86. package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.js +0 -30
  87. package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.cjs +0 -1
  88. package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.d.ts +0 -4
  89. package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.js +0 -30
  90. package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.cjs +0 -1
  91. package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.d.ts +0 -4
  92. package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.js +0 -30
  93. package/dist/src/features/defiDecomposition/helpers/computeUsdValueForPosition.cjs +0 -1
  94. package/dist/src/features/defiDecomposition/helpers/computeUsdValueForPosition.d.ts +0 -3
  95. package/dist/src/features/defiDecomposition/helpers/computeUsdValueForPosition.js +0 -17
  96. package/dist/src/features/defiDecomposition/helpers/getDefiProductName.cjs +0 -1
  97. package/dist/src/features/defiDecomposition/helpers/getDefiProductName.d.ts +0 -1
  98. package/dist/src/features/defiDecomposition/helpers/getDefiProductName.js +0 -11
  99. package/dist/src/features/defiDecomposition/helpers/index.d.ts +0 -13
  100. package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.cjs +0 -1
  101. package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.d.ts +0 -7
  102. package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.js +0 -57
  103. package/dist/src/features/defiDecomposition/helpers/parseConcentratedLiquidityPositions.cjs +0 -1
  104. package/dist/src/features/defiDecomposition/helpers/parseConcentratedLiquidityPositions.d.ts +0 -4
  105. package/dist/src/features/defiDecomposition/helpers/parseConcentratedLiquidityPositions.js +0 -42
  106. package/dist/src/features/defiDecomposition/helpers/parseDefiDecomposition.cjs +0 -1
  107. package/dist/src/features/defiDecomposition/helpers/parseDefiDecomposition.d.ts +0 -4
  108. package/dist/src/features/defiDecomposition/helpers/parseDefiDecomposition.js +0 -63
  109. package/dist/src/features/defiDecomposition/helpers/parseDelegatedTokensPositions.cjs +0 -1
  110. package/dist/src/features/defiDecomposition/helpers/parseDelegatedTokensPositions.d.ts +0 -4
  111. package/dist/src/features/defiDecomposition/helpers/parseDelegatedTokensPositions.js +0 -27
  112. package/dist/src/features/defiDecomposition/helpers/parseStakingPositions.cjs +0 -1
  113. package/dist/src/features/defiDecomposition/helpers/parseStakingPositions.d.ts +0 -4
  114. package/dist/src/features/defiDecomposition/helpers/parseStakingPositions.js +0 -29
  115. package/dist/src/features/defiDecomposition/helpers/parseStrkDelegatedStakingPositions.cjs +0 -1
  116. package/dist/src/features/defiDecomposition/helpers/parseStrkDelegatedStakingPositions.d.ts +0 -4
  117. package/dist/src/features/defiDecomposition/helpers/parseStrkDelegatedStakingPositions.js +0 -27
  118. package/dist/src/features/defiDecomposition/helpers/sortDescendingByUsdValue.cjs +0 -1
  119. package/dist/src/features/defiDecomposition/helpers/sortDescendingByUsdValue.d.ts +0 -9
  120. package/dist/src/features/defiDecomposition/helpers/sortDescendingByUsdValue.js +0 -9
  121. package/dist/src/features/defiDecomposition/index.d.ts +0 -2
  122. package/dist/src/features/defiDecomposition/schema.cjs +0 -1
  123. package/dist/src/features/defiDecomposition/schema.d.ts +0 -1842
  124. package/dist/src/features/defiDecomposition/schema.js +0 -153
  125. package/dist/src/transactions/equalTokens.cjs +0 -1
  126. package/dist/src/transactions/equalTokens.js +0 -5
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("lodash-es"),n=require("./HttpError.cjs"),d=require("./IHttpService.cjs");class w{constructor(a,t="json"){this.requestInit=a,this.responseType=t}async get(a,t){const s=i.isFunction(this.requestInit)?await this.requestInit():this.requestInit,r={...s,...t,method:"GET",headers:{...s==null?void 0:s.headers,...t==null?void 0:t.headers}},e=await fetch(a,r).catch(async o=>{let c;throw o instanceof Response&&(c=await o.json().catch(()=>{})),new n.HttpError(d.HTTP_ERROR_MESSAGE.FAILED_TO_FETCH_URL,0,c)});if(this.responseType==="json"){if(!e.ok)throw new n.HttpError(e.statusText,e.status,await e.json().catch(()=>{}));return await e.json()}return e}async post(a,t,s){const r=i.isFunction(this.requestInit)?await this.requestInit():this.requestInit,e={...r,...t,method:"POST",headers:{...r==null?void 0:r.headers,...t==null?void 0:t.headers}},o=await fetch(a,e).catch(()=>{throw new n.HttpError(d.HTTP_ERROR_MESSAGE.FAILED_TO_POST_URL,0)});if(!o.ok)throw new n.HttpError(o.statusText,o.status,await o.json());if(o.status===204)return{};const c=await o.json();if(s)try{return s.parse(c)}catch(h){throw new n.HttpError(h.message,0)}return c}async put(a,t){const s=i.isFunction(this.requestInit)?await this.requestInit():this.requestInit,r={...s,...t,method:"PUT",headers:{...s==null?void 0:s.headers,...t==null?void 0:t.headers}},e=await fetch(a,r).catch(()=>{throw new n.HttpError("Failed to put url",0)});if(!e.ok)throw new n.HttpError(e.statusText,e.status);return await e.json()}async delete(a,t){const s=i.isFunction(this.requestInit)?await this.requestInit():this.requestInit,r={...s,...t,method:"DELETE",headers:{...s==null?void 0:s.headers,...t==null?void 0:t.headers}},e=await fetch(a,r).catch(()=>{throw new n.HttpError("Failed to delete url",0)});if(!e.ok)throw new n.HttpError(e.statusText,e.status)}}exports.HTTPService=w;
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,93 +1,93 @@
1
- import { isFunction as c } from "lodash-es";
2
- import { HttpError as h } from "./HttpError.js";
3
- import { HTTP_ERROR_MESSAGE as w } from "./IHttpService.js";
4
- class m {
5
- constructor(r, t = "json") {
6
- this.requestInit = r, this.responseType = t;
1
+ import { isFunction as h } from "lodash-es";
2
+ import { HttpError as o } from "./HttpError.js";
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;
7
7
  }
8
- async get(r, t) {
9
- const s = c(this.requestInit) ? await this.requestInit() : this.requestInit, a = {
8
+ async get(n, e) {
9
+ const s = h(this.requestInit) ? await this.requestInit() : this.requestInit, r = {
10
10
  ...s,
11
- ...t,
11
+ ...e,
12
12
  method: "GET",
13
13
  // merge headers
14
14
  headers: {
15
- ...s == null ? void 0 : s.headers,
16
- ...t == null ? void 0 : t.headers
15
+ ...s?.headers,
16
+ ...e?.headers
17
17
  }
18
- }, e = await fetch(r, a).catch(async (o) => {
19
- let n;
20
- throw o instanceof Response && (n = await o.json().catch(() => {
21
- })), new h(w.FAILED_TO_FETCH_URL, 0, n);
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);
22
22
  });
23
23
  if (this.responseType === "json") {
24
- if (!e.ok)
25
- throw new h(e.statusText, e.status, await e.json().catch(() => {
24
+ if (!t.ok)
25
+ throw new o(t.statusText, t.status, await t.json().catch(() => {
26
26
  }));
27
- return await e.json();
27
+ return await t.json();
28
28
  }
29
- return e;
29
+ return t;
30
30
  }
31
- async post(r, t, s) {
32
- const a = c(this.requestInit) ? await this.requestInit() : this.requestInit, e = {
33
- ...a,
34
- ...t,
31
+ async post(n, e, s) {
32
+ const r = h(this.requestInit) ? await this.requestInit() : this.requestInit, t = {
33
+ ...r,
34
+ ...e,
35
35
  method: "POST",
36
36
  // merge headers
37
37
  headers: {
38
- ...a == null ? void 0 : a.headers,
39
- ...t == null ? void 0 : t.headers
38
+ ...r?.headers,
39
+ ...e?.headers
40
40
  }
41
- }, o = await fetch(r, e).catch(() => {
42
- throw new h(w.FAILED_TO_POST_URL, 0);
41
+ }, a = await fetch(n, t).catch(() => {
42
+ throw new o(u.FAILED_TO_POST_URL, 0);
43
43
  });
44
- if (!o.ok)
45
- throw new h(o.statusText, o.status, await o.json());
46
- if (o.status === 204)
44
+ if (!a.ok)
45
+ throw new o(a.statusText, a.status, await a.json());
46
+ if (a.status === 204)
47
47
  return {};
48
- const n = await o.json();
48
+ const i = await a.json();
49
49
  if (s)
50
50
  try {
51
- return s.parse(n);
52
- } catch (i) {
53
- throw new h(i.message, 0);
51
+ return s.parse(i);
52
+ } catch (c) {
53
+ throw new o(c.message, 0);
54
54
  }
55
- return n;
55
+ return i;
56
56
  }
57
- async put(r, t) {
58
- const s = c(this.requestInit) ? await this.requestInit() : this.requestInit, a = {
57
+ async put(n, e) {
58
+ const s = h(this.requestInit) ? await this.requestInit() : this.requestInit, r = {
59
59
  ...s,
60
- ...t,
60
+ ...e,
61
61
  method: "PUT",
62
62
  // merge headers
63
63
  headers: {
64
- ...s == null ? void 0 : s.headers,
65
- ...t == null ? void 0 : t.headers
64
+ ...s?.headers,
65
+ ...e?.headers
66
66
  }
67
- }, e = await fetch(r, a).catch(() => {
68
- throw new h("Failed to put url", 0);
67
+ }, t = await fetch(n, r).catch(() => {
68
+ throw new o("Failed to put url", 0);
69
69
  });
70
- if (!e.ok)
71
- throw new h(e.statusText, e.status);
72
- return await e.json();
70
+ if (!t.ok)
71
+ throw new o(t.statusText, t.status);
72
+ return await t.json();
73
73
  }
74
- async delete(r, t) {
75
- const s = c(this.requestInit) ? await this.requestInit() : this.requestInit, a = {
74
+ async delete(n, e) {
75
+ const s = h(this.requestInit) ? await this.requestInit() : this.requestInit, r = {
76
76
  ...s,
77
- ...t,
77
+ ...e,
78
78
  method: "DELETE",
79
79
  // merge headers
80
80
  headers: {
81
- ...s == null ? void 0 : s.headers,
82
- ...t == null ? void 0 : t.headers
81
+ ...s?.headers,
82
+ ...e?.headers
83
83
  }
84
- }, e = await fetch(r, a).catch(() => {
85
- throw new h("Failed to delete url", 0);
84
+ }, t = await fetch(n, r).catch(() => {
85
+ throw new o("Failed to delete url", 0);
86
86
  });
87
- if (!e.ok)
88
- throw new h(e.statusText, e.status);
87
+ if (!t.ok)
88
+ throw new o(t.statusText, t.status);
89
89
  }
90
90
  }
91
91
  export {
92
- m as HTTPService
92
+ T as HTTPService
93
93
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(n){var r;return(r=n==null?void 0:n.links)==null?void 0:r.find(t=>t.name==="dappland")}function a(n){var r;return(r=e(n))==null?void 0:r.url}exports.getDapplandLinkForDapp=e;exports.getDapplandUrlForDapp=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(p){return p?.links?.find(a=>a.name==="dappland")}function r(p){return n(p)?.url}exports.getDapplandLinkForDapp=n;exports.getDapplandUrlForDapp=r;
@@ -1,12 +1,10 @@
1
- function e(n) {
2
- var r;
3
- return (r = n == null ? void 0 : n.links) == null ? void 0 : r.find((t) => t.name === "dappland");
1
+ function a(n) {
2
+ return n?.links?.find((p) => p.name === "dappland");
4
3
  }
5
- function l(n) {
6
- var r;
7
- return (r = e(n)) == null ? void 0 : r.url;
4
+ function r(n) {
5
+ return a(n)?.url;
8
6
  }
9
7
  export {
10
- e as getDapplandLinkForDapp,
11
- l as getDapplandUrlForDapp
8
+ a as getDapplandLinkForDapp,
9
+ r as getDapplandUrlForDapp
12
10
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("url-join"),f=require("./BackendPaginationError.cjs"),A=require("../utils/address.cjs"),P=require("../chains/starknet/address.cjs"),u=32;class S{constructor(e,t){this.apiBase=e,this.httpService=t}async getNfts(e,t,r,s=1){const a=this.normalizeAddress(r),c=o(this.apiBase,"pandora",e,t),m=this.pageToPageIndex(s),l=`${o(c,"profile",a,"nfts")}?page=${m}&size=${u}`,i=await this.httpService.get(l),n=i.content.map(p=>this.mapItem(p,r));return{totalPages:i.totalPages,page:i.number+1,count:n.length,nfts:n}}async getCollection(e,t,r){const s=this.normalizeAddress(r),a=o(this.apiBase,"pandora",e,t),c=o(a,"collection",s),m=`${a}/collection/${s}`,[g,l]=await Promise.all([this.httpService.get(c),this.httpService.get(m)]),i=h(g),n=l.content.map(p=>this.mapItem(p));return{...i,nfts:{totalPages:l.totalPages,page:l.number,count:n.length,data:n}}}async getNft(e,t,r,s){const a=this.normalizeAddress(r),c=o(this.apiBase,"pandora",e,t),m=o(c,"nft",a,s),g=await this.httpService.get(m);return this.mapItem(g)}async getProfileCollections(e,t,r,s=1,a=!1){const c=this.pageToPageIndex(s),m=this.normalizeAddress(r),g=o(this.apiBase,"pandora",e,t),l=o(g,"profile",m,"collections",`?page=${c}&size=${u}`),i=await this.httpService.get(l),n=[];for(const p of i.content)if(a){const b=await this.getCollectionMetrics(e,t,p.contractAddress);n.push(h(p,b))}else n.push(h(p));return{totalPages:i.totalPages,page:i.number+1,count:n.length,collections:n}}async getCollectionMetrics(e,t,r){const s=this.normalizeAddress(r),a=o(this.apiBase,"pandora",e,t),c=o(a,"collection",s,"metrics");return this.httpService.get(c)}normalizeAddress(e){return P.addressSchemaArgentBackend.parse(e)}pageToPageIndex(e){if(!Number.isInteger(e))throw new f.BackendPaginationError("notANumber");const t=e-1;if(t<0)throw new f.BackendPaginationError("tooLow");return t}mapItem(e,t){var s;const r=e.name??e.tokenId;return{token_id:e.tokenId,contract_address:e.contractAddress,name:r,spec:"spec"in e?v(e.spec):void 0,description:"",best_bid_order:{payment_amount:"bestListPrice"in e?BigInt(e.bestListPrice):void 0},properties:"properties"in e&&e.properties.map(a=>({key:a.key,value:a.value}))||[],image_uri:e.imageUrls.preview,image_url_copy:e.imageUrls.full,owner:{account_address:((s=e.owner)==null?void 0:s.address)||t},contract_name:A.formatAddress(e.contractAddress)}}}function v(d){switch(d){case"erc721":case"starknetErc721":return"ERC721";case"erc1155":case"starknetErc1155":return"ERC1155"}}function h(d,e){return{contractAddress:P.addressSchema.parse(d.contractAddress),name:d.name||A.formatAddress(d.contractAddress),description:d.description??"",imageUri:d.imageUrls.preview,...e&&{owners:{total:e.numberOfItems,unique:e.uniqueOwners},...e.floorPrice&&{floorPrice:BigInt(e.floorPrice)}}}}exports.BackendNftService=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("url-join"),f=require("./BackendPaginationError.cjs"),A=require("../utils/address.cjs"),P=require("../chains/starknet/address.cjs"),u=32;class S{constructor(e,t){this.apiBase=e,this.httpService=t}async getNfts(e,t,a,s=1){const r=this.normalizeAddress(a),c=o(this.apiBase,"pandora",e,t),m=this.pageToPageIndex(s),l=`${o(c,"profile",r,"nfts")}?page=${m}&size=${u}`,i=await this.httpService.get(l),n=i.content.map(p=>this.mapItem(p,a));return{totalPages:i.totalPages,page:i.number+1,count:n.length,nfts:n}}async getCollection(e,t,a){const s=this.normalizeAddress(a),r=o(this.apiBase,"pandora",e,t),c=o(r,"collection",s),m=`${r}/collection/${s}`,[g,l]=await Promise.all([this.httpService.get(c),this.httpService.get(m)]),i=h(g),n=l.content.map(p=>this.mapItem(p));return{...i,nfts:{totalPages:l.totalPages,page:l.number,count:n.length,data:n}}}async getNft(e,t,a,s){const r=this.normalizeAddress(a),c=o(this.apiBase,"pandora",e,t),m=o(c,"nft",r,s),g=await this.httpService.get(m);return this.mapItem(g)}async getProfileCollections(e,t,a,s=1,r=!1){const c=this.pageToPageIndex(s),m=this.normalizeAddress(a),g=o(this.apiBase,"pandora",e,t),l=o(g,"profile",m,"collections",`?page=${c}&size=${u}`),i=await this.httpService.get(l),n=[];for(const p of i.content)if(r){const b=await this.getCollectionMetrics(e,t,p.contractAddress);n.push(h(p,b))}else n.push(h(p));return{totalPages:i.totalPages,page:i.number+1,count:n.length,collections:n}}async getCollectionMetrics(e,t,a){const s=this.normalizeAddress(a),r=o(this.apiBase,"pandora",e,t),c=o(r,"collection",s,"metrics");return this.httpService.get(c)}normalizeAddress(e){return P.addressSchemaArgentBackend.parse(e)}pageToPageIndex(e){if(!Number.isInteger(e))throw new f.BackendPaginationError("notANumber");const t=e-1;if(t<0)throw new f.BackendPaginationError("tooLow");return t}mapItem(e,t){const a=e.name??e.tokenId;return{token_id:e.tokenId,contract_address:e.contractAddress,name:a,spec:"spec"in e?v(e.spec):void 0,description:"",best_bid_order:{payment_amount:"bestListPrice"in e?BigInt(e.bestListPrice):void 0},properties:"properties"in e&&e.properties.map(s=>({key:s.key,value:s.value}))||[],image_uri:e.imageUrls.preview,image_url_copy:e.imageUrls.full,owner:{account_address:e.owner?.address||t},contract_name:A.formatAddress(e.contractAddress)}}}function v(d){switch(d){case"erc721":case"starknetErc721":return"ERC721";case"erc1155":case"starknetErc1155":return"ERC1155"}}function h(d,e){return{contractAddress:P.addressSchema.parse(d.contractAddress),name:d.name||A.formatAddress(d.contractAddress),description:d.description??"",imageUri:d.imageUrls.preview,...e&&{owners:{total:e.numberOfItems,unique:e.uniqueOwners},...e.floorPrice&&{floorPrice:BigInt(e.floorPrice)}}}}exports.BackendNftService=S;
@@ -7,8 +7,8 @@ class k {
7
7
  constructor(e, t) {
8
8
  this.apiBase = e, this.httpService = t;
9
9
  }
10
- async getNfts(e, t, a, s = 1) {
11
- const o = this.normalizeAddress(a), c = n(this.apiBase, "pandora", e, t), m = this.pageToPageIndex(s), l = `${n(c, "profile", o, "nfts")}?page=${m}&size=${A}`, i = await this.httpService.get(l), r = i.content.map((p) => this.mapItem(p, a));
10
+ async getNfts(e, t, o, s = 1) {
11
+ const a = this.normalizeAddress(o), c = n(this.apiBase, "pandora", e, t), m = this.pageToPageIndex(s), l = `${n(c, "profile", a, "nfts")}?page=${m}&size=${A}`, i = await this.httpService.get(l), r = i.content.map((p) => this.mapItem(p, o));
12
12
  return {
13
13
  totalPages: i.totalPages,
14
14
  page: i.number + 1,
@@ -16,8 +16,8 @@ class k {
16
16
  nfts: r
17
17
  };
18
18
  }
19
- async getCollection(e, t, a) {
20
- const s = this.normalizeAddress(a), o = n(this.apiBase, "pandora", e, t), c = n(o, "collection", s), m = `${o}/collection/${s}`, [g, l] = await Promise.all([
19
+ async getCollection(e, t, o) {
20
+ const s = this.normalizeAddress(o), a = n(this.apiBase, "pandora", e, t), c = n(a, "collection", s), m = `${a}/collection/${s}`, [g, l] = await Promise.all([
21
21
  this.httpService.get(c),
22
22
  this.httpService.get(m)
23
23
  ]), i = h(g), r = l.content.map((p) => this.mapItem(p));
@@ -31,14 +31,14 @@ class k {
31
31
  }
32
32
  };
33
33
  }
34
- async getNft(e, t, a, s) {
35
- const o = this.normalizeAddress(a), c = n(this.apiBase, "pandora", e, t), m = n(c, "nft", o, s), g = await this.httpService.get(m);
34
+ async getNft(e, t, o, s) {
35
+ const a = this.normalizeAddress(o), c = n(this.apiBase, "pandora", e, t), m = n(c, "nft", a, s), g = await this.httpService.get(m);
36
36
  return this.mapItem(g);
37
37
  }
38
- async getProfileCollections(e, t, a, s = 1, o = !1) {
39
- const c = this.pageToPageIndex(s), m = this.normalizeAddress(a), g = n(this.apiBase, "pandora", e, t), l = n(g, "profile", m, "collections", `?page=${c}&size=${A}`), i = await this.httpService.get(l), r = [];
38
+ async getProfileCollections(e, t, o, s = 1, a = !1) {
39
+ const c = this.pageToPageIndex(s), m = this.normalizeAddress(o), g = n(this.apiBase, "pandora", e, t), l = n(g, "profile", m, "collections", `?page=${c}&size=${A}`), i = await this.httpService.get(l), r = [];
40
40
  for (const p of i.content)
41
- if (o) {
41
+ if (a) {
42
42
  const u = await this.getCollectionMetrics(e, t, p.contractAddress);
43
43
  r.push(h(p, u));
44
44
  } else
@@ -50,8 +50,8 @@ class k {
50
50
  collections: r
51
51
  };
52
52
  }
53
- async getCollectionMetrics(e, t, a) {
54
- const s = this.normalizeAddress(a), o = n(this.apiBase, "pandora", e, t), c = n(o, "collection", s, "metrics");
53
+ async getCollectionMetrics(e, t, o) {
54
+ const s = this.normalizeAddress(o), a = n(this.apiBase, "pandora", e, t), c = n(a, "collection", s, "metrics");
55
55
  return this.httpService.get(c);
56
56
  }
57
57
  normalizeAddress(e) {
@@ -66,22 +66,21 @@ class k {
66
66
  return t;
67
67
  }
68
68
  mapItem(e, t) {
69
- var s;
70
- const a = e.name ?? e.tokenId;
69
+ const o = e.name ?? e.tokenId;
71
70
  return {
72
71
  token_id: e.tokenId,
73
72
  contract_address: e.contractAddress,
74
- name: a,
73
+ name: o,
75
74
  spec: "spec" in e ? w(e.spec) : void 0,
76
75
  description: "",
77
76
  best_bid_order: {
78
77
  payment_amount: "bestListPrice" in e ? BigInt(e.bestListPrice) : void 0
79
78
  },
80
- properties: "properties" in e && e.properties.map((o) => ({ key: o.key, value: o.value })) || [],
79
+ properties: "properties" in e && e.properties.map((s) => ({ key: s.key, value: s.value })) || [],
81
80
  image_uri: e.imageUrls.preview,
82
81
  image_url_copy: e.imageUrls.full,
83
82
  owner: {
84
- account_address: ((s = e.owner) == null ? void 0 : s.address) || t
83
+ account_address: e.owner?.address || t
85
84
  },
86
85
  contract_name: b(e.contractAddress)
87
86
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("url-join"),r=require("../../utils/retryUntilInitialised.cjs"),i=require("./types/backend.model.cjs"),h=require("../../utils/schemas.cjs");class d{constructor(n,e){this.apiBase=n,this.httpService=e,this.TOKENS_INFO_URL="/tokens/info"}async fetchTokensInfoFromBackend(n){const e=o(this.apiBase,this.TOKENS_INFO_URL,n??"","?chain=starknet"),a=await this.httpService.get(e),t=i.apiTokensInfoResponseSchema.safeParse(a);if(t.success)return t.data.tokens;const s=i.apiTokenInfoResponseSchema.safeParse(a);if(s.success)return[s.data]}async fetchAddressTokenBalancesFromBackend(n,e,a){const t=o(this.apiBase,"activity","starknet",e,"account",n,"balance"),s=await r.retryUntilInitialised(()=>this.httpService.get(t),i.apiAccountTokenBalancesSchema,a);return((s==null?void 0:s.status)==="initialised"?s.balances:[]).map(c=>({address:c.tokenAddress,balance:c.tokenBalance,networkId:e}))}async fetchDefiDecomposition(n,e){const a=o(this.apiBase,"tokens/defi",n,"investments","?chain=starknet",`&application=${e}`),t=await this.httpService.get(a);return h.safeParseAndWarn(i.apiDefiPositionsSchema,t).success||console.error("Backend schema has changed. Make the changes to the models to prevent unknown/unhandled errors."),t.dapps}}exports.TokenServiceWeb=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("url-join"),r=require("../../utils/retryUntilInitialised.cjs"),i=require("./types/backend.model.cjs"),h=require("../../utils/schemas.cjs");class d{constructor(s,e){this.apiBase=s,this.httpService=e,this.TOKENS_INFO_URL="/tokens/info"}async fetchTokensInfoFromBackend(s){const e=o(this.apiBase,this.TOKENS_INFO_URL,s??"","?chain=starknet"),t=await this.httpService.get(e),n=i.apiTokensInfoResponseSchema.safeParse(t);if(n.success)return n.data.tokens;const a=i.apiTokenInfoResponseSchema.safeParse(t);if(a.success)return[a.data]}async fetchAddressTokenBalancesFromBackend(s,e,t){const n=o(this.apiBase,"activity","starknet",e,"account",s,"balance"),a=await r.retryUntilInitialised(()=>this.httpService.get(n),i.apiAccountTokenBalancesSchema,t);return(a?.status==="initialised"?a.balances:[]).map(c=>({address:c.tokenAddress,balance:c.tokenBalance,networkId:e}))}async fetchDefiDecomposition(s,e){const t=o(this.apiBase,"tokens/defi",s,"investments","?chain=starknet",`&application=${e}`),n=await this.httpService.get(t);return h.safeParseAndWarn(i.apiDefiPositionsSchema,n).success||console.error("Backend schema has changed. Make the changes to the models to prevent unknown/unhandled errors."),n.dapps}}exports.TokenServiceWeb=d;
@@ -42,6 +42,8 @@ export declare class TokenServiceWeb implements ITokenServiceWeb {
42
42
  };
43
43
  accruedRewards: string;
44
44
  stakedAmount: string;
45
+ stakedTokenAddress: `0x${string}`;
46
+ rewardTokenAddress: `0x${string}`;
45
47
  pendingWithdrawal?: {
46
48
  amount: string;
47
49
  withdrawableAfter: number;
@@ -3,37 +3,37 @@ import { retryUntilInitialised as c } from "../../utils/retryUntilInitialised.js
3
3
  import { apiTokensInfoResponseSchema as r, apiTokenInfoResponseSchema as p, apiAccountTokenBalancesSchema as h, apiDefiPositionsSchema as d } from "./types/backend.model.js";
4
4
  import { safeParseAndWarn as k } from "../../utils/schemas.js";
5
5
  class v {
6
- constructor(t, e) {
7
- this.apiBase = t, this.httpService = e, this.TOKENS_INFO_URL = "/tokens/info";
6
+ constructor(s, e) {
7
+ this.apiBase = s, this.httpService = e, this.TOKENS_INFO_URL = "/tokens/info";
8
8
  }
9
9
  /**
10
10
  * Fetch tokens info from backend
11
11
  * @param {Address} tokenAddress - The token address.
12
12
  * @returns {Promise<ApiTokenInfo[]>} - The fetched tokens or undefined if there was an error or not default network
13
13
  */
14
- async fetchTokensInfoFromBackend(t) {
15
- const e = o(this.apiBase, this.TOKENS_INFO_URL, t ?? "", "?chain=starknet"), a = await this.httpService.get(e), n = r.safeParse(a);
14
+ async fetchTokensInfoFromBackend(s) {
15
+ const e = o(this.apiBase, this.TOKENS_INFO_URL, s ?? "", "?chain=starknet"), t = await this.httpService.get(e), n = r.safeParse(t);
16
16
  if (n.success)
17
17
  return n.data.tokens;
18
- const s = p.safeParse(a);
19
- if (s.success)
20
- return [s.data];
18
+ const a = p.safeParse(t);
19
+ if (a.success)
20
+ return [a.data];
21
21
  }
22
22
  /**
23
23
  * Fetch list of tokens and balances for given account from backend
24
24
  * @param {Address} address - The account address.
25
25
  * @returns {Promise<WebBaseTokenWithBalance[]>} - The fetched balances for the account address.
26
26
  */
27
- async fetchAddressTokenBalancesFromBackend(t, e, a) {
28
- const n = o(this.apiBase, "activity", "starknet", e, "account", t, "balance"), s = await c(() => this.httpService.get(n), h, a);
29
- return ((s == null ? void 0 : s.status) === "initialised" ? s.balances : []).map((i) => ({
27
+ async fetchAddressTokenBalancesFromBackend(s, e, t) {
28
+ const n = o(this.apiBase, "activity", "starknet", e, "account", s, "balance"), a = await c(() => this.httpService.get(n), h, t);
29
+ return (a?.status === "initialised" ? a.balances : []).map((i) => ({
30
30
  address: i.tokenAddress,
31
31
  balance: i.tokenBalance,
32
32
  networkId: e
33
33
  }));
34
34
  }
35
- async fetchDefiDecomposition(t, e) {
36
- const a = o(this.apiBase, "tokens/defi", t, "investments", "?chain=starknet", `&application=${e}`), n = await this.httpService.get(a);
35
+ async fetchDefiDecomposition(s, e) {
36
+ const t = o(this.apiBase, "tokens/defi", s, "investments", "?chain=starknet", `&application=${e}`), n = await this.httpService.get(t);
37
37
  return k(d, n).success || console.error("Backend schema has changed. Make the changes to the models to prevent unknown/unhandled errors."), n.dapps;
38
38
  }
39
39
  }
@@ -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().default(0),marketCap24hChange:e.z.number().default(0),dailyVolume:e.z.number().default(0),rank:e.z.number().default(0)}).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)}),i=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()}),t=e.z.object({id:e.z.string(),investmentId:e.z.string().optional(),tokenAddress:a.addressSchema.optional(),totalBalances:e.z.record(e.z.string(),e.z.string())}),n=t.extend({tokenId:e.z.string(),data:e.z.object({poolFeePercentage:e.z.string(),tickSpacingPercentage:e.z.string().optional(),token0:i,token1:i})}),P=e.z.array(n),s=t.extend({data:e.z.object({apy:e.z.string().optional(),totalApy:e.z.string().optional()}),investmentId:e.z.string().optional(),totalBalances:e.z.record(e.z.string(),e.z.string())}),f=e.z.array(s),r=t.extend({data:e.z.object({apy:e.z.string().optional(),totalApy: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=t.extend({id:e.z.string(),data:e.z.object({delegatingTo:a.addressSchema}),totalBalances:e.z.record(e.z.string(),e.z.string())}),A=e.z.array(c),p=t.extend({investmentId:e.z.string().optional(),data:e.z.object({stakerInfo:e.z.object({name:e.z.string().optional(),iconUrl:e.z.string().optional(),address:a.addressSchema}),accruedRewards:e.z.string(),stakedAmount:e.z.string(),pendingWithdrawal:e.z.object({amount:e.z.string(),withdrawableAfter:e.z.number()}).optional(),apy:e.z.string().optional(),totalApy:e.z.string().optional()})}),T=e.z.array(p),l=n.or(r).or(c).or(s).or(p),z=e.z.array(l),m=b.createSchemaWithWarnings({productId:e.z.string().optional(),name:e.z.string(),manageUrl:e.z.string().optional(),type:h.defiPositionTypeSchema,groups:e.z.record(e.z.string(),e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional()})).optional(),positions:z}),g=e.z.object({dappId:e.z.string(),products:e.z.array(m)}),I=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()}),C=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=z;exports.apiDefiDecompositionSchema=g;exports.apiDefiDecompositionToken=i;exports.apiDefiPositionSchema=l;exports.apiDefiPositionsSchema=I;exports.apiDelegatedTokensArraySchema=A;exports.apiDelegatedTokensSchema=c;exports.apiPriceDataResponseSchema=y;exports.apiPriceDetailsSchema=d;exports.apiStakingPositionSchema=s;exports.apiStakingPositionsSchema=f;exports.apiStrkDelegatedStakingPositionsSchema=T;exports.apiStrkDelegatedStakingSchema=p;exports.apiTokenInfoResponseSchema=D;exports.apiTokenInfoSchema=o;exports.apiTokensInfoResponseSchema=k;exports.apiUnclaimedRewardsSchema=C;
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().default(0),marketCap24hChange:e.z.number().default(0),dailyVolume:e.z.number().default(0),rank:e.z.number().default(0)}).optional(),tags:e.z.array(e.z.string()).optional()}),k=e.z.object({tokens:e.z.array(o)}),D=o,p=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(p)}),i=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()}),t=e.z.object({id:e.z.string(),investmentId:e.z.string().optional(),tokenAddress:a.addressSchema.optional(),totalBalances:e.z.record(e.z.string(),e.z.string())}),n=t.extend({tokenId:e.z.string(),data:e.z.object({poolFeePercentage:e.z.string(),tickSpacingPercentage:e.z.string().optional(),token0:i,token1:i})}),P=e.z.array(n),s=t.extend({data:e.z.object({apy:e.z.string().optional(),totalApy:e.z.string().optional()}),investmentId:e.z.string().optional(),totalBalances:e.z.record(e.z.string(),e.z.string())}),f=e.z.array(s),r=t.extend({data:e.z.object({apy:e.z.string().optional(),totalApy: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=t.extend({id:e.z.string(),data:e.z.object({delegatingTo:a.addressSchema}),totalBalances:e.z.record(e.z.string(),e.z.string())}),A=e.z.array(c),d=t.extend({investmentId:e.z.string().optional(),data:e.z.object({stakerInfo:e.z.object({name:e.z.string().optional(),iconUrl:e.z.string().optional(),address:a.addressSchema}),accruedRewards:e.z.string(),stakedAmount:e.z.string(),pendingWithdrawal:e.z.object({amount:e.z.string(),withdrawableAfter:e.z.number()}).optional(),apy:e.z.string().optional(),totalApy:e.z.string().optional(),stakedTokenAddress:a.addressSchema,rewardTokenAddress:a.addressSchema})}),T=e.z.array(d),l=n.or(r).or(c).or(s).or(d),z=e.z.array(l),m=b.createSchemaWithWarnings({productId:e.z.string().optional(),name:e.z.string(),manageUrl:e.z.string().optional(),type:h.defiPositionTypeSchema,groups:e.z.record(e.z.string(),e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional()})).optional(),positions:z}),g=e.z.object({dappId:e.z.string(),products:e.z.array(m)}),I=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()}),C=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=z;exports.apiDefiDecompositionSchema=g;exports.apiDefiDecompositionToken=i;exports.apiDefiPositionSchema=l;exports.apiDefiPositionsSchema=I;exports.apiDelegatedTokensArraySchema=A;exports.apiDelegatedTokensSchema=c;exports.apiPriceDataResponseSchema=y;exports.apiPriceDetailsSchema=p;exports.apiStakingPositionSchema=s;exports.apiStakingPositionsSchema=f;exports.apiStrkDelegatedStakingPositionsSchema=T;exports.apiStrkDelegatedStakingSchema=d;exports.apiTokenInfoResponseSchema=D;exports.apiTokenInfoSchema=o;exports.apiTokensInfoResponseSchema=k;exports.apiUnclaimedRewardsSchema=C;
@@ -252,6 +252,8 @@ export declare const apiStrkDelegatedStakingSchema: z.ZodObject<{
252
252
  }, z.core.$strip>>;
253
253
  apy: z.ZodOptional<z.ZodString>;
254
254
  totalApy: z.ZodOptional<z.ZodString>;
255
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
256
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
255
257
  }, z.core.$strip>;
256
258
  }, z.core.$strip>;
257
259
  export declare const apiStrkDelegatedStakingPositionsSchema: z.ZodArray<z.ZodObject<{
@@ -273,6 +275,8 @@ export declare const apiStrkDelegatedStakingPositionsSchema: z.ZodArray<z.ZodObj
273
275
  }, z.core.$strip>>;
274
276
  apy: z.ZodOptional<z.ZodString>;
275
277
  totalApy: z.ZodOptional<z.ZodString>;
278
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
279
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
276
280
  }, z.core.$strip>;
277
281
  }, z.core.$strip>>;
278
282
  export declare const apiDefiPositionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
@@ -350,6 +354,8 @@ export declare const apiDefiPositionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[
350
354
  }, z.core.$strip>>;
351
355
  apy: z.ZodOptional<z.ZodString>;
352
356
  totalApy: z.ZodOptional<z.ZodString>;
357
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
358
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
353
359
  }, z.core.$strip>;
354
360
  }, z.core.$strip>]>;
355
361
  export type ApiDefiPosition = z.infer<typeof apiDefiPositionSchema>;
@@ -428,6 +434,8 @@ export declare const apiDefiDecompositionProducts: z.ZodArray<z.ZodUnion<[z.ZodU
428
434
  }, z.core.$strip>>;
429
435
  apy: z.ZodOptional<z.ZodString>;
430
436
  totalApy: z.ZodOptional<z.ZodString>;
437
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
438
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
431
439
  }, z.core.$strip>;
432
440
  }, z.core.$strip>]>>;
433
441
  export declare const apiDefiDecompositionProduct: z.ZodObject<{
@@ -514,6 +522,8 @@ export declare const apiDefiDecompositionProduct: z.ZodObject<{
514
522
  }, z.core.$strip>>;
515
523
  apy: z.ZodOptional<z.ZodString>;
516
524
  totalApy: z.ZodOptional<z.ZodString>;
525
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
526
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
517
527
  }, z.core.$strip>;
518
528
  }, z.core.$strip>]>>;
519
529
  }, z.core.$loose> & {
@@ -603,6 +613,8 @@ export declare const apiDefiDecompositionProduct: z.ZodObject<{
603
613
  }, z.core.$strip>>;
604
614
  apy: z.ZodOptional<z.ZodString>;
605
615
  totalApy: z.ZodOptional<z.ZodString>;
616
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
617
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
606
618
  }, z.core.$strip>;
607
619
  }, z.core.$strip>]>>;
608
620
  } & E extends infer T ? { -readonly [P in keyof T]: ({
@@ -689,6 +701,8 @@ export declare const apiDefiDecompositionProduct: z.ZodObject<{
689
701
  }, z.core.$strip>>;
690
702
  apy: z.ZodOptional<z.ZodString>;
691
703
  totalApy: z.ZodOptional<z.ZodString>;
704
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
705
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
692
706
  }, z.core.$strip>;
693
707
  }, z.core.$strip>]>>;
694
708
  } & E)[P]; } : never, z.core.$loose>;
@@ -779,6 +793,8 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
779
793
  }, z.core.$strip>>;
780
794
  apy: z.ZodOptional<z.ZodString>;
781
795
  totalApy: z.ZodOptional<z.ZodString>;
796
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
797
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
782
798
  }, z.core.$strip>;
783
799
  }, z.core.$strip>]>>;
784
800
  }, z.core.$loose> & {
@@ -868,6 +884,8 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
868
884
  }, z.core.$strip>>;
869
885
  apy: z.ZodOptional<z.ZodString>;
870
886
  totalApy: z.ZodOptional<z.ZodString>;
887
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
888
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
871
889
  }, z.core.$strip>;
872
890
  }, z.core.$strip>]>>;
873
891
  } & E extends infer T ? { -readonly [P in keyof T]: ({
@@ -954,6 +972,8 @@ export declare const apiDefiDecompositionSchema: z.ZodObject<{
954
972
  }, z.core.$strip>>;
955
973
  apy: z.ZodOptional<z.ZodString>;
956
974
  totalApy: z.ZodOptional<z.ZodString>;
975
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
976
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
957
977
  }, z.core.$strip>;
958
978
  }, z.core.$strip>]>>;
959
979
  } & E)[P]; } : never, z.core.$loose>;
@@ -1046,6 +1066,8 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
1046
1066
  }, z.core.$strip>>;
1047
1067
  apy: z.ZodOptional<z.ZodString>;
1048
1068
  totalApy: z.ZodOptional<z.ZodString>;
1069
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
1070
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
1049
1071
  }, z.core.$strip>;
1050
1072
  }, z.core.$strip>]>>;
1051
1073
  }, z.core.$loose> & {
@@ -1135,6 +1157,8 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
1135
1157
  }, z.core.$strip>>;
1136
1158
  apy: z.ZodOptional<z.ZodString>;
1137
1159
  totalApy: z.ZodOptional<z.ZodString>;
1160
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
1161
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
1138
1162
  }, z.core.$strip>;
1139
1163
  }, z.core.$strip>]>>;
1140
1164
  } & E extends infer T ? { -readonly [P in keyof T]: ({
@@ -1221,6 +1245,8 @@ export declare const apiDefiPositionsSchema: z.ZodObject<{
1221
1245
  }, z.core.$strip>>;
1222
1246
  apy: z.ZodOptional<z.ZodString>;
1223
1247
  totalApy: z.ZodOptional<z.ZodString>;
1248
+ stakedTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
1249
+ rewardTokenAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
1224
1250
  }, z.core.$strip>;
1225
1251
  }, z.core.$strip>]>>;
1226
1252
  } & E)[P]; } : never, z.core.$loose>;
@@ -45,36 +45,36 @@ const P = t.object({
45
45
  ccyValue: t.string(),
46
46
  ethDayChange: t.string(),
47
47
  ccyDayChange: t.string()
48
- }), C = t.object({
48
+ }), T = t.object({
49
49
  prices: t.array(m)
50
- }), e = t.object({
50
+ }), n = t.object({
51
51
  tokenAddress: o,
52
52
  principal: t.string(),
53
53
  accruedFees: t.string(),
54
54
  minPrice: t.string(),
55
55
  maxPrice: t.string(),
56
56
  currentPrice: t.string()
57
- }), n = t.object({
57
+ }), e = t.object({
58
58
  id: t.string(),
59
59
  investmentId: t.string().optional(),
60
60
  tokenAddress: a.optional(),
61
61
  totalBalances: t.record(t.string(), t.string())
62
- }), r = n.extend({
62
+ }), r = e.extend({
63
63
  tokenId: t.string(),
64
64
  data: t.object({
65
65
  poolFeePercentage: t.string(),
66
66
  tickSpacingPercentage: t.string().optional(),
67
- token0: e,
68
- token1: e
67
+ token0: n,
68
+ token1: n
69
69
  })
70
- }), T = t.array(r), s = n.extend({
70
+ }), C = t.array(r), s = e.extend({
71
71
  data: t.object({
72
72
  apy: t.string().optional(),
73
73
  totalApy: t.string().optional()
74
74
  }),
75
75
  investmentId: t.string().optional(),
76
76
  totalBalances: t.record(t.string(), t.string())
77
- }), x = t.array(s), c = n.extend({
77
+ }), x = t.array(s), c = e.extend({
78
78
  data: t.object({
79
79
  apy: t.string().optional(),
80
80
  totalApy: t.string().optional(),
@@ -83,13 +83,13 @@ const P = t.object({
83
83
  debt: t.boolean(),
84
84
  lending: t.boolean()
85
85
  })
86
- }), B = t.array(c), l = n.extend({
86
+ }), B = t.array(c), l = e.extend({
87
87
  id: t.string(),
88
88
  data: t.object({
89
89
  delegatingTo: a
90
90
  }),
91
91
  totalBalances: t.record(t.string(), t.string())
92
- }), R = t.array(l), p = n.extend({
92
+ }), w = t.array(l), p = e.extend({
93
93
  investmentId: t.string().optional(),
94
94
  data: t.object({
95
95
  stakerInfo: t.object({
@@ -104,9 +104,11 @@ const P = t.object({
104
104
  withdrawableAfter: t.number()
105
105
  }).optional(),
106
106
  apy: t.string().optional(),
107
- totalApy: t.string().optional()
107
+ totalApy: t.string().optional(),
108
+ stakedTokenAddress: a,
109
+ rewardTokenAddress: a
108
110
  })
109
- }), w = t.array(p), b = r.or(c).or(l).or(s).or(p), u = t.array(b), h = g({
111
+ }), R = t.array(p), b = r.or(c).or(l).or(s).or(p), u = t.array(b), h = g({
110
112
  productId: t.string().optional(),
111
113
  name: t.string(),
112
114
  manageUrl: t.string().optional(),
@@ -116,12 +118,12 @@ const P = t.object({
116
118
  healthRatio: t.string().optional()
117
119
  })).optional(),
118
120
  positions: u
119
- }), S = t.object({
121
+ }), k = t.object({
120
122
  dappId: t.string(),
121
123
  products: t.array(h)
122
124
  }), U = t.object({
123
- dapps: t.array(S)
124
- }), k = t.object({
125
+ dapps: t.array(k)
126
+ }), S = t.object({
125
127
  name: t.string().optional(),
126
128
  tokenAddress: a,
127
129
  amount: t.string().optional(),
@@ -131,28 +133,28 @@ const P = t.object({
131
133
  }), v = t.object({
132
134
  accountAddress: a,
133
135
  chain: t.string(),
134
- airdrops: t.array(k)
136
+ airdrops: t.array(S)
135
137
  });
136
138
  export {
137
139
  P as apiAccountTokenBalancesSchema,
138
- k as apiAirdropSchema,
140
+ S as apiAirdropSchema,
139
141
  c as apiCollateralizedDebtPositionSchema,
140
142
  B as apiCollateralizedDebtPositionsSchema,
141
143
  r as apiConcentratedLiquidityPositionSchema,
142
- T as apiConcentratedLiquidityPositionsSchema,
144
+ C as apiConcentratedLiquidityPositionsSchema,
143
145
  h as apiDefiDecompositionProduct,
144
146
  u as apiDefiDecompositionProducts,
145
- S as apiDefiDecompositionSchema,
146
- e as apiDefiDecompositionToken,
147
+ k as apiDefiDecompositionSchema,
148
+ n as apiDefiDecompositionToken,
147
149
  b as apiDefiPositionSchema,
148
150
  U as apiDefiPositionsSchema,
149
- R as apiDelegatedTokensArraySchema,
151
+ w as apiDelegatedTokensArraySchema,
150
152
  l as apiDelegatedTokensSchema,
151
- C as apiPriceDataResponseSchema,
153
+ T as apiPriceDataResponseSchema,
152
154
  m as apiPriceDetailsSchema,
153
155
  s as apiStakingPositionSchema,
154
156
  x as apiStakingPositionsSchema,
155
- w as apiStrkDelegatedStakingPositionsSchema,
157
+ R as apiStrkDelegatedStakingPositionsSchema,
156
158
  p as apiStrkDelegatedStakingSchema,
157
159
  I as apiTokenInfoResponseSchema,
158
160
  i as apiTokenInfoSchema,