@argent/x-shared 1.37.0 → 1.38.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 (669) hide show
  1. package/dist/.eslintrc.d.cts +45 -0
  2. package/dist/_virtual/_commonjsHelpers.cjs +1 -0
  3. package/dist/_virtual/_commonjsHelpers.js +6 -0
  4. package/dist/_virtual/semver.cjs +1 -0
  5. package/dist/_virtual/semver.js +4 -0
  6. package/dist/commitlint.config.d.cts +2 -0
  7. package/dist/index.cjs +1 -0
  8. package/dist/index.d.ts +2 -19
  9. package/dist/index.js +424 -4
  10. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.cjs +1 -0
  11. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js +14 -0
  12. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.cjs +1 -0
  13. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js +88 -0
  14. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -0
  15. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js +203 -0
  16. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.cjs +1 -0
  17. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.js +68 -0
  18. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -0
  19. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js +166 -0
  20. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -0
  21. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js +581 -0
  22. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
  23. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js +48 -0
  24. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.cjs +1 -0
  25. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js +4 -0
  26. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.cjs +1 -0
  27. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js +42 -0
  28. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.cjs +1 -0
  29. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js +47 -0
  30. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
  31. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.js +31 -0
  32. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.cjs +1 -0
  33. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.js +61 -0
  34. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.cjs +1 -0
  35. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.js +21 -0
  36. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.cjs +1 -0
  37. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.js +114 -0
  38. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.cjs +1 -0
  39. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.js +107 -0
  40. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.cjs +1 -0
  41. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js +38 -0
  42. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
  43. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_assert.js +32 -0
  44. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_u64.cjs +1 -0
  45. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_u64.js +21 -0
  46. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.cjs +1 -0
  47. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.js +107 -0
  48. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.cjs +1 -0
  49. package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.js +44 -0
  50. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs +1 -0
  51. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +622 -0
  52. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.cjs +1 -0
  53. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js +20 -0
  54. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.cjs +1 -0
  55. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js +20 -0
  56. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.cjs +1 -0
  57. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js +6 -0
  58. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.cjs +1 -0
  59. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js +20 -0
  60. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.cjs +1 -0
  61. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js +6 -0
  62. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.cjs +1 -0
  63. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js +13 -0
  64. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.cjs +1 -0
  65. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -0
  66. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.cjs +1 -0
  67. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.js +8 -0
  68. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.cjs +1 -0
  69. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.js +9 -0
  70. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.cjs +1 -0
  71. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js +10 -0
  72. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.cjs +1 -0
  73. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.js +9 -0
  74. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.cjs +1 -0
  75. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +10 -0
  76. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.cjs +1 -0
  77. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.js +9 -0
  78. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.cjs +1 -0
  79. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.js +6 -0
  80. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.cjs +1 -0
  81. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js +16 -0
  82. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.cjs +1 -0
  83. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.js +33 -0
  84. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.cjs +1 -0
  85. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js +6 -0
  86. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.cjs +1 -0
  87. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js +5 -0
  88. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.cjs +1 -0
  89. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.js +9 -0
  90. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.cjs +1 -0
  91. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -0
  92. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.cjs +1 -0
  93. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js +8 -0
  94. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.cjs +1 -0
  95. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js +9 -0
  96. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.cjs +1 -0
  97. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +15 -0
  98. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.cjs +1 -0
  99. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +6 -0
  100. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.cjs +1 -0
  101. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js +7 -0
  102. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.cjs +1 -0
  103. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js +7 -0
  104. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.cjs +1 -0
  105. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js +13 -0
  106. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.cjs +1 -0
  107. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js +9 -0
  108. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.cjs +1 -0
  109. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js +9 -0
  110. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.cjs +1 -0
  111. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js +7 -0
  112. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.cjs +1 -0
  113. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js +11 -0
  114. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.cjs +1 -0
  115. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js +6 -0
  116. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.cjs +1 -0
  117. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js +12 -0
  118. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.cjs +1 -0
  119. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js +8 -0
  120. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.cjs +1 -0
  121. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js +7 -0
  122. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.cjs +1 -0
  123. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js +8 -0
  124. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.cjs +1 -0
  125. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js +13 -0
  126. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.cjs +1 -0
  127. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  128. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.cjs +1 -0
  129. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js +7 -0
  130. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.cjs +1 -0
  131. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js +7 -0
  132. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.cjs +1 -0
  133. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js +8 -0
  134. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.cjs +1 -0
  135. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js +5 -0
  136. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.cjs +1 -0
  137. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +7 -0
  138. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.cjs +1 -0
  139. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +5 -0
  140. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.cjs +1 -0
  141. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js +7 -0
  142. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.cjs +1 -0
  143. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js +6 -0
  144. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.cjs +1 -0
  145. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js +9 -0
  146. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.cjs +1 -0
  147. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.js +9 -0
  148. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.cjs +1 -0
  149. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js +17 -0
  150. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.cjs +1 -0
  151. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js +6 -0
  152. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.cjs +1 -0
  153. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js +12 -0
  154. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.cjs +1 -0
  155. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +7 -0
  156. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.cjs +1 -0
  157. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.js +5 -0
  158. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.cjs +1 -0
  159. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.js +7 -0
  160. package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.cjs +1 -0
  161. package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.js +134 -0
  162. package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.cjs +1 -0
  163. package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js +629 -0
  164. package/dist/simulation.cjs +1 -0
  165. package/dist/simulation.d.ts +1 -1
  166. package/dist/simulation.js +69 -1
  167. package/dist/src/account/account.model.cjs +1 -0
  168. package/dist/src/account/account.model.js +45 -0
  169. package/dist/src/account/accountv4.cjs +1 -0
  170. package/dist/src/account/accountv4.js +14 -0
  171. package/dist/src/account/preferences.model.cjs +1 -0
  172. package/dist/src/account/preferences.model.js +11 -0
  173. package/dist/src/assets/tokens.json.cjs +1 -0
  174. package/dist/src/assets/tokens.json.js +181 -0
  175. package/dist/src/backend/schema.cjs +1 -0
  176. package/dist/src/backend/schema.js +14 -0
  177. package/dist/src/bigdecimal/constants.cjs +1 -0
  178. package/dist/src/bigdecimal/constants.js +4 -0
  179. package/dist/src/bigdecimal/createUnitsSchema.cjs +1 -0
  180. package/dist/src/bigdecimal/createUnitsSchema.js +8 -0
  181. package/dist/src/bigdecimal/formatUnits.cjs +1 -0
  182. package/dist/src/bigdecimal/formatUnits.js +11 -0
  183. package/dist/src/bigdecimal/index.cjs +1 -0
  184. package/dist/src/bigdecimal/index.js +33 -0
  185. package/dist/src/bigdecimal/lib.cjs +1 -0
  186. package/dist/src/bigdecimal/lib.js +53 -0
  187. package/dist/src/bigdecimal/parseUnits.cjs +1 -0
  188. package/dist/src/bigdecimal/parseUnits.js +11 -0
  189. package/dist/src/bigdecimal/utils.cjs +1 -0
  190. package/dist/src/bigdecimal/utils.js +37 -0
  191. package/dist/src/cache/CacheService.cjs +1 -0
  192. package/dist/src/cache/CacheService.js +37 -0
  193. package/dist/src/chains/starknet/address.cjs +1 -0
  194. package/dist/src/chains/starknet/address.js +64 -0
  195. package/dist/src/chains/starknet/addressDomain.cjs +1 -0
  196. package/dist/src/chains/starknet/addressDomain.js +29 -0
  197. package/dist/src/chains/starknet/addressInput.cjs +1 -0
  198. package/dist/src/chains/starknet/addressInput.js +7 -0
  199. package/dist/src/chains/starknet/argentName.cjs +1 -0
  200. package/dist/src/chains/starknet/argentName.js +14 -0
  201. package/dist/src/chains/starknet/cairoVersionSchema.cjs +1 -0
  202. package/dist/src/chains/starknet/cairoVersionSchema.js +5 -0
  203. package/dist/src/chains/starknet/constants.cjs +1 -0
  204. package/dist/src/chains/starknet/constants.js +10 -0
  205. package/dist/src/chains/starknet/getAddressFromArgentName.cjs +1 -0
  206. package/dist/src/chains/starknet/getAddressFromArgentName.js +48 -0
  207. package/dist/src/chains/starknet/getAddressFromStarkName.cjs +1 -0
  208. package/dist/src/chains/starknet/getAddressFromStarkName.js +70 -0
  209. package/dist/src/chains/starknet/network.cjs +1 -0
  210. package/dist/src/chains/starknet/network.js +20 -0
  211. package/dist/src/chains/starknet/services/address/StarknetAddressService.cjs +1 -0
  212. package/dist/src/chains/starknet/services/address/StarknetAddressService.js +38 -0
  213. package/dist/src/chains/starknet/services/deploymentData/constants.cjs +1 -0
  214. package/dist/src/chains/starknet/services/deploymentData/constants.js +22 -0
  215. package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.cjs +1 -0
  216. package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.js +19 -0
  217. package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs +1 -0
  218. package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.js +69 -0
  219. package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.cjs +1 -0
  220. package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.js +59 -0
  221. package/dist/src/chains/starknet/starknetId.cjs +1 -0
  222. package/dist/src/chains/starknet/starknetId.js +14 -0
  223. package/dist/src/errors/account.cjs +1 -0
  224. package/dist/src/errors/account.js +14 -0
  225. package/dist/src/errors/address.cjs +1 -0
  226. package/dist/src/errors/address.js +14 -0
  227. package/dist/src/errors/baseErrors.cjs +1 -0
  228. package/dist/src/errors/baseErrors.js +15 -0
  229. package/dist/src/errors/call.cjs +1 -0
  230. package/dist/src/errors/call.js +14 -0
  231. package/dist/src/errors/network.cjs +1 -0
  232. package/dist/src/errors/network.js +14 -0
  233. package/dist/src/errors/review.cjs +1 -0
  234. package/dist/src/errors/review.js +14 -0
  235. package/dist/src/errors/swap.cjs +1 -0
  236. package/dist/src/errors/swap.js +14 -0
  237. package/dist/src/features/simulation/activity/normalize.cjs +1 -0
  238. package/dist/src/features/simulation/activity/normalize.js +40 -0
  239. package/dist/src/features/simulation/activity/schema.cjs +1 -0
  240. package/dist/src/features/simulation/activity/schema.js +236 -0
  241. package/dist/src/features/simulation/activity/utils/createNativeActivity.cjs +1 -0
  242. package/dist/src/features/simulation/activity/utils/createNativeActivity.js +31 -0
  243. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.cjs +1 -0
  244. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.js +24 -0
  245. package/dist/src/features/simulation/activity/utils/getOverallLastModified.cjs +1 -0
  246. package/dist/src/features/simulation/activity/utils/getOverallLastModified.js +6 -0
  247. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.cjs +1 -0
  248. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.js +10 -0
  249. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs +1 -0
  250. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js +11 -0
  251. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.cjs +1 -0
  252. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.js +26 -0
  253. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -0
  254. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +22 -0
  255. package/dist/src/features/simulation/activity/utils/parseAccountActivities.cjs +1 -0
  256. package/dist/src/features/simulation/activity/utils/parseAccountActivities.js +13 -0
  257. package/dist/src/features/simulation/activity/utils/parseFinanceActivities.cjs +1 -0
  258. package/dist/src/features/simulation/activity/utils/parseFinanceActivities.js +33 -0
  259. package/dist/src/features/simulation/fees/schema.cjs +1 -0
  260. package/dist/src/features/simulation/fees/schema.js +20 -0
  261. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -0
  262. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +18 -0
  263. package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.cjs +1 -0
  264. package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.js +6 -0
  265. package/dist/src/features/simulation/transactionReview/schema.cjs +1 -0
  266. package/dist/src/features/simulation/transactionReview/schema.js +215 -0
  267. package/dist/src/features/simulation/warning/helper.cjs +1 -0
  268. package/dist/src/features/simulation/warning/helper.js +12 -0
  269. package/dist/src/features/simulation/warning/schema.cjs +1 -0
  270. package/dist/src/features/simulation/warning/schema.js +11 -0
  271. package/dist/src/features/swap/models/order.model.cjs +1 -0
  272. package/dist/src/features/swap/models/order.model.js +20 -0
  273. package/dist/src/features/swap/models/quote.model.cjs +1 -0
  274. package/dist/src/features/swap/models/quote.model.js +36 -0
  275. package/dist/src/features/swap/models/trade.model.cjs +1 -0
  276. package/dist/src/features/swap/models/trade.model.js +28 -0
  277. package/dist/src/features/swap/services/implementation.cjs +1 -0
  278. package/dist/src/features/swap/services/implementation.js +76 -0
  279. package/dist/src/features/swap/utils/slippage.cjs +1 -0
  280. package/dist/src/features/swap/utils/slippage.js +28 -0
  281. package/dist/src/features/swap/utils/totalFee.cjs +1 -0
  282. package/dist/src/features/swap/utils/totalFee.js +13 -0
  283. package/dist/src/http/DateService.cjs +1 -0
  284. package/dist/src/http/DateService.js +17 -0
  285. package/dist/src/http/HttpError.cjs +1 -0
  286. package/dist/src/http/HttpError.js +8 -0
  287. package/dist/src/http/HttpService.cjs +1 -0
  288. package/dist/src/http/HttpService.js +90 -0
  289. package/dist/src/http/IHttpService.cjs +1 -0
  290. package/dist/src/http/IHttpService.js +7 -0
  291. package/dist/src/http/SWRService.cjs +1 -0
  292. package/dist/src/http/SWRService.js +60 -0
  293. package/dist/src/http/fetcher.cjs +1 -0
  294. package/dist/src/http/fetcher.js +36 -0
  295. package/dist/{http → src/http}/index.d.ts +0 -1
  296. package/dist/src/http/time.cjs +1 -0
  297. package/dist/src/http/time.js +19 -0
  298. package/dist/src/index.d.ts +17 -0
  299. package/dist/src/knownDapps/KnownDappsBackendService.cjs +1 -0
  300. package/dist/src/knownDapps/KnownDappsBackendService.js +16 -0
  301. package/dist/src/knownDapps/schema.cjs +1 -0
  302. package/dist/src/knownDapps/schema.js +44 -0
  303. package/dist/src/knownDapps/utils/getDapplandUrl.cjs +1 -0
  304. package/dist/src/knownDapps/utils/getDapplandUrl.js +12 -0
  305. package/dist/src/nameResolution/ResolveNameService.cjs +1 -0
  306. package/dist/src/nameResolution/ResolveNameService.js +42 -0
  307. package/dist/src/nameResolution/schema.cjs +1 -0
  308. package/dist/src/nameResolution/schema.js +25 -0
  309. package/dist/src/nfts/BackendNftService.cjs +1 -0
  310. package/dist/src/nfts/BackendNftService.js +119 -0
  311. package/dist/src/nfts/BackendPaginationError.cjs +1 -0
  312. package/dist/src/nfts/BackendPaginationError.js +13 -0
  313. package/dist/{nfts → src/nfts}/index.d.ts +0 -1
  314. package/dist/src/nfts/utils.cjs +1 -0
  315. package/dist/src/nfts/utils.js +14 -0
  316. package/dist/src/onchainRecovery/OnchainRecoveryService.cjs +1 -0
  317. package/dist/src/onchainRecovery/OnchainRecoveryService.js +69 -0
  318. package/dist/src/onchainRecovery/schema.cjs +1 -0
  319. package/dist/src/onchainRecovery/schema.js +49 -0
  320. package/dist/src/platform/isBraveBrowser.cjs +1 -0
  321. package/dist/src/platform/isBraveBrowser.js +11 -0
  322. package/dist/src/platform/isBrowser.cjs +1 -0
  323. package/dist/src/platform/isBrowser.js +28 -0
  324. package/dist/src/signer/multisigner.cjs +1 -0
  325. package/dist/src/signer/multisigner.js +19 -0
  326. package/dist/src/signer/seedphrase.cjs +1 -0
  327. package/dist/src/signer/seedphrase.js +7 -0
  328. package/dist/src/tokens/balances.cjs +1 -0
  329. package/dist/src/tokens/balances.js +38 -0
  330. package/dist/src/tokens/constants.cjs +1 -0
  331. package/dist/src/tokens/constants.js +4 -0
  332. package/dist/src/tokens/convertTokenAmountToCurrencyValue.cjs +1 -0
  333. package/dist/src/tokens/convertTokenAmountToCurrencyValue.js +16 -0
  334. package/dist/src/tokens/convertTokenUnitAmountWithDecimals.cjs +1 -0
  335. package/dist/src/tokens/convertTokenUnitAmountWithDecimals.js +11 -0
  336. package/dist/src/tokens/ensureDecimals.cjs +1 -0
  337. package/dist/src/tokens/ensureDecimals.js +5 -0
  338. package/dist/src/tokens/getCurrencySymbol.cjs +1 -0
  339. package/dist/src/tokens/getCurrencySymbol.js +15 -0
  340. package/dist/src/tokens/isUnlimitedAmount.cjs +1 -0
  341. package/dist/src/tokens/isUnlimitedAmount.js +5 -0
  342. package/dist/src/tokens/prettifyCurrencyValue.cjs +1 -0
  343. package/dist/src/tokens/prettifyCurrencyValue.js +11 -0
  344. package/dist/src/tokens/prettifyTokenAmount.cjs +1 -0
  345. package/dist/src/tokens/prettifyTokenAmount.js +23 -0
  346. package/dist/src/tokens/service/implementation.cjs +1 -0
  347. package/dist/{tokens → src/tokens}/service/implementation.d.ts +21 -2
  348. package/dist/src/tokens/service/implementation.js +64 -0
  349. package/dist/src/tokens/service/tokenError.cjs +1 -0
  350. package/dist/src/tokens/service/tokenError.js +14 -0
  351. package/dist/src/tokens/service/types/backend.model.cjs +1 -0
  352. package/dist/{tokens → src/tokens}/service/types/backend.model.d.ts +818 -73
  353. package/dist/src/tokens/service/types/backend.model.js +134 -0
  354. package/dist/src/tokens/service/types/defiPosition.model.cjs +1 -0
  355. package/dist/{tokens → src/tokens}/service/types/defiPosition.model.d.ts +1024 -64
  356. package/dist/src/tokens/service/types/defiPosition.model.js +75 -0
  357. package/dist/src/tokens/service/types/defiPositionType.model.cjs +1 -0
  358. package/dist/{tokens → src/tokens}/service/types/defiPositionType.model.d.ts +1 -1
  359. package/dist/src/tokens/service/types/defiPositionType.model.js +10 -0
  360. package/dist/src/tokens/service/types/unclaimedRewards.model.cjs +1 -0
  361. package/dist/src/tokens/service/types/unclaimedRewards.model.js +16 -0
  362. package/dist/src/tokens/service/types/webToken.model.cjs +1 -0
  363. package/dist/src/tokens/service/types/webToken.model.js +45 -0
  364. package/dist/src/transactions/amount.cjs +1 -0
  365. package/dist/src/transactions/amount.js +24 -0
  366. package/dist/src/transactions/buildTransactions.cjs +1 -0
  367. package/dist/src/transactions/buildTransactions.js +34 -0
  368. package/dist/src/transactions/errors.cjs +1 -0
  369. package/dist/src/transactions/errors.js +19 -0
  370. package/dist/src/transactions/estimate/argentMaxFee.cjs +1 -0
  371. package/dist/src/transactions/estimate/argentMaxFee.js +13 -0
  372. package/dist/src/transactions/estimate/error.cjs +1 -0
  373. package/dist/src/transactions/estimate/error.js +14 -0
  374. package/dist/src/transactions/estimate/model.cjs +1 -0
  375. package/dist/src/transactions/estimate/model.js +14 -0
  376. package/dist/src/transactions/estimate/utils.cjs +1 -0
  377. package/dist/src/transactions/estimate/utils.js +232 -0
  378. package/dist/src/transactions/findTransfersAndApprovals.cjs +1 -0
  379. package/dist/src/transactions/findTransfersAndApprovals.js +31 -0
  380. package/dist/src/transactions/getPrettyRcpError.cjs +1 -0
  381. package/dist/src/transactions/getPrettyRcpError.js +11 -0
  382. package/dist/src/transactions/getTransactionVersion.cjs +1 -0
  383. package/dist/src/transactions/getTransactionVersion.js +18 -0
  384. package/dist/{transactions → src/transactions}/index.d.ts +0 -6
  385. package/dist/src/transactions/service/implementation.cjs +1 -0
  386. package/dist/src/transactions/service/implementation.js +182 -0
  387. package/dist/src/transactions/service/types.cjs +1 -0
  388. package/dist/src/transactions/service/types.js +10 -0
  389. package/dist/src/transactions/transactionReviewTypes.cjs +1 -0
  390. package/dist/src/transactions/transactionReviewTypes.js +10 -0
  391. package/dist/src/transactions/transactionVersion.cjs +1 -0
  392. package/dist/src/transactions/transactionVersion.js +14 -0
  393. package/dist/src/transactions/txv3.cjs +1 -0
  394. package/dist/src/transactions/txv3.js +14 -0
  395. package/dist/src/utils/address.cjs +1 -0
  396. package/dist/src/utils/address.js +4 -0
  397. package/dist/src/utils/arrays.cjs +1 -0
  398. package/dist/src/utils/arrays.js +4 -0
  399. package/dist/src/utils/avatarImage.cjs +4 -0
  400. package/dist/src/utils/avatarImage.js +42 -0
  401. package/dist/src/utils/base58.cjs +1 -0
  402. package/dist/src/utils/base58.js +15 -0
  403. package/dist/src/utils/bigNumber.cjs +1 -0
  404. package/dist/src/utils/bigNumber.js +7 -0
  405. package/dist/src/utils/bips.cjs +1 -0
  406. package/dist/src/utils/bips.js +11 -0
  407. package/dist/src/utils/daysBetween.cjs +1 -0
  408. package/dist/src/utils/daysBetween.js +7 -0
  409. package/dist/src/utils/env.cjs +1 -0
  410. package/dist/src/utils/env.js +4 -0
  411. package/dist/src/utils/hex.cjs +1 -0
  412. package/dist/src/utils/hex.js +9 -0
  413. package/dist/src/utils/id.cjs +1 -0
  414. package/dist/src/utils/id.js +8 -0
  415. package/dist/{utils → src/utils}/index.d.ts +0 -1
  416. package/dist/src/utils/initials.cjs +1 -0
  417. package/dist/src/utils/initials.js +16 -0
  418. package/dist/src/utils/isContractDeployed.cjs +1 -0
  419. package/dist/src/utils/isContractDeployed.js +10 -0
  420. package/dist/src/utils/nonNullable.cjs +1 -0
  421. package/dist/src/utils/nonNullable.js +7 -0
  422. package/dist/src/utils/number/isAllowedAddressHexInputValue.cjs +1 -0
  423. package/dist/src/utils/number/isAllowedAddressHexInputValue.js +7 -0
  424. package/dist/src/utils/number/isAllowedNumericInputValue.cjs +1 -0
  425. package/dist/src/utils/number/isAllowedNumericInputValue.js +8 -0
  426. package/dist/src/utils/number/isNumeric.cjs +1 -0
  427. package/dist/src/utils/number/isNumeric.js +4 -0
  428. package/dist/src/utils/number/prettifyNumber.cjs +1 -0
  429. package/dist/src/utils/number/prettifyNumber.js +47 -0
  430. package/dist/src/utils/parseAmount.cjs +1 -0
  431. package/dist/src/utils/parseAmount.js +14 -0
  432. package/dist/src/utils/pluralise.cjs +1 -0
  433. package/dist/src/utils/pluralise.js +4 -0
  434. package/dist/src/utils/readFileAsString.cjs +1 -0
  435. package/dist/src/utils/readFileAsString.js +10 -0
  436. package/dist/src/utils/schemas.cjs +1 -0
  437. package/dist/src/utils/schemas.js +29 -0
  438. package/dist/src/utils/starknet/starknet.cjs +1 -0
  439. package/dist/src/utils/starknet/starknet.js +57 -0
  440. package/dist/src/utils/starknet/starknetLibTypes.cjs +1 -0
  441. package/dist/src/utils/starknet/starknetLibTypes.js +7 -0
  442. package/dist/src/utils/starknet/starknetSchemas.cjs +1 -0
  443. package/dist/src/utils/starknet/starknetSchemas.js +102 -0
  444. package/dist/src/utils/transactions.cjs +1 -0
  445. package/dist/src/utils/transactions.js +11 -0
  446. package/dist/src/utils/url/urlWithQuery.cjs +1 -0
  447. package/dist/src/utils/url/urlWithQuery.js +9 -0
  448. package/dist/src/utils/voidify.cjs +1 -0
  449. package/dist/src/utils/voidify.js +8 -0
  450. package/dist/swap.cjs +1 -0
  451. package/dist/swap.d.ts +1 -1
  452. package/dist/swap.js +20 -1
  453. package/package.json +14 -28
  454. package/dist/bips-DKbEGvGl.mjs +0 -114
  455. package/dist/bips-DxN0hSiY.js +0 -1
  456. package/dist/hooks/index.d.ts +0 -2
  457. package/dist/hooks/useDebounce.d.ts +0 -1
  458. package/dist/hooks/useDebouncedValue.d.ts +0 -1
  459. package/dist/http/swr.d.ts +0 -21
  460. package/dist/index.mjs +0 -4466
  461. package/dist/nfts/useNfts.d.ts +0 -23
  462. package/dist/providers/WebAmplitude/WebAmplitudeProvider.d.ts +0 -7
  463. package/dist/providers/WebAmplitude/index.d.ts +0 -2
  464. package/dist/providers/WebAmplitude/service.d.ts +0 -7
  465. package/dist/providers/WebAmplitude/types.d.ts +0 -6
  466. package/dist/providers/WebAmplitude/utils.d.ts +0 -2
  467. package/dist/providers/index.d.ts +0 -1
  468. package/dist/simulation.mjs +0 -255
  469. package/dist/swap.mjs +0 -183
  470. package/dist/transactionVersion-C7p_qk9x.js +0 -1
  471. package/dist/transactionVersion-Cjoucwcx.mjs +0 -793
  472. package/dist/transactions/useBalanceChange.d.ts +0 -5
  473. package/dist/transactions/useErc20Transactions.d.ts +0 -6
  474. package/dist/transactions/useErc721Transactions.d.ts +0 -5
  475. package/dist/transactions/useErc721Transfers.d.ts +0 -5
  476. package/dist/transactions/useMaxAmountTransaction.d.ts +0 -7
  477. package/dist/transactions/useTransactionReview.d.ts +0 -15
  478. package/dist/transactions/useTransactionReviewV2web.d.ts +0 -1004
  479. package/dist/utils/useEventEmitter.d.ts +0 -67
  480. package/dist/webToken.model-5HUiR8ER.js +0 -1
  481. package/dist/webToken.model-CpudLBp0.mjs +0 -1913
  482. package/dist/{account → src/account}/account.model.d.ts +0 -0
  483. package/dist/{account → src/account}/accountv4.d.ts +0 -0
  484. package/dist/{account → src/account}/index.d.ts +0 -0
  485. package/dist/{account → src/account}/preferences.model.d.ts +0 -0
  486. package/dist/{backend → src/backend}/index.d.ts +0 -0
  487. package/dist/{backend → src/backend}/schema.d.ts +0 -0
  488. package/dist/{backend → src/backend}/types.d.ts +0 -0
  489. package/dist/{bigdecimal → src/bigdecimal}/constants.d.ts +0 -0
  490. package/dist/{bigdecimal → src/bigdecimal}/createUnitsSchema.d.ts +0 -0
  491. package/dist/{bigdecimal → src/bigdecimal}/formatUnits.d.ts +0 -0
  492. package/dist/{bigdecimal → src/bigdecimal}/index.d.ts +0 -0
  493. package/dist/{bigdecimal → src/bigdecimal}/lib.d.ts +0 -0
  494. package/dist/{bigdecimal → src/bigdecimal}/parseUnits.d.ts +0 -0
  495. package/dist/{bigdecimal → src/bigdecimal}/type.d.ts +0 -0
  496. package/dist/{bigdecimal → src/bigdecimal}/types.d.ts +0 -0
  497. package/dist/{bigdecimal → src/bigdecimal}/utils.d.ts +0 -0
  498. package/dist/{cache → src/cache}/CacheService.d.ts +0 -0
  499. package/dist/{cache → src/cache}/ICacheService.d.ts +0 -0
  500. package/dist/{cache → src/cache}/index.d.ts +0 -0
  501. package/dist/{chains → src/chains}/index.d.ts +0 -0
  502. package/dist/{chains → src/chains}/starknet/address.d.ts +0 -0
  503. package/dist/{chains → src/chains}/starknet/addressDomain.d.ts +0 -0
  504. package/dist/{chains → src/chains}/starknet/addressInput.d.ts +0 -0
  505. package/dist/{chains → src/chains}/starknet/argentName.d.ts +0 -0
  506. package/dist/{chains → src/chains}/starknet/cairoVersionSchema.d.ts +0 -0
  507. package/dist/{chains → src/chains}/starknet/constants.d.ts +0 -0
  508. package/dist/{chains → src/chains}/starknet/getAddressFromArgentName.d.ts +0 -0
  509. package/dist/{chains → src/chains}/starknet/getAddressFromStarkName.d.ts +0 -0
  510. package/dist/{chains → src/chains}/starknet/index.d.ts +0 -0
  511. package/dist/{chains → src/chains}/starknet/network.d.ts +0 -0
  512. package/dist/{chains → src/chains}/starknet/services/address/IStarknetAddressService.d.ts +0 -0
  513. package/dist/{chains → src/chains}/starknet/services/address/StarknetAddressService.d.ts +0 -0
  514. package/dist/{chains → src/chains}/starknet/services/address/index.d.ts +0 -0
  515. package/dist/{chains → src/chains}/starknet/services/deploymentData/constants.d.ts +0 -0
  516. package/dist/{chains → src/chains}/starknet/services/deploymentData/deploymentData.schema.d.ts +0 -0
  517. package/dist/{chains → src/chains}/starknet/services/deploymentData/findImplementationForAccount.d.ts +0 -0
  518. package/dist/{chains → src/chains}/starknet/services/deploymentData/getAccountClassHash.d.ts +0 -0
  519. package/dist/{chains → src/chains}/starknet/services/deploymentData/index.d.ts +0 -0
  520. package/dist/{chains → src/chains}/starknet/services/index.d.ts +0 -0
  521. package/dist/{chains → src/chains}/starknet/starknetId.d.ts +0 -0
  522. package/dist/{errors → src/errors}/account.d.ts +0 -0
  523. package/dist/{errors → src/errors}/address.d.ts +0 -0
  524. package/dist/{errors → src/errors}/baseErrors.d.ts +0 -0
  525. package/dist/{errors → src/errors}/call.d.ts +0 -0
  526. package/dist/{errors → src/errors}/network.d.ts +0 -0
  527. package/dist/{errors → src/errors}/review.d.ts +0 -0
  528. package/dist/{errors → src/errors}/swap.d.ts +0 -0
  529. package/dist/{features → src/features}/simulation/activity/index.d.ts +0 -0
  530. package/dist/{features → src/features}/simulation/activity/normalize.d.ts +0 -0
  531. package/dist/{features → src/features}/simulation/activity/schema.d.ts +200 -200
  532. package/dist/{features → src/features}/simulation/activity/utils/createNativeActivity.d.ts +6 -6
  533. package/dist/{features → src/features}/simulation/activity/utils/getAnyActivityTitle.d.ts +0 -0
  534. package/dist/{features → src/features}/simulation/activity/utils/getOverallLastModified.d.ts +0 -0
  535. package/dist/{features → src/features}/simulation/activity/utils/hasDelegationActivity.d.ts +0 -0
  536. package/dist/{features → src/features}/simulation/activity/utils/index.d.ts +0 -0
  537. package/dist/{features → src/features}/simulation/activity/utils/isMulticallWithDeploymentActivity.d.ts +0 -0
  538. package/dist/{features → src/features}/simulation/activity/utils/isRejectOnChainActivity.d.ts +0 -0
  539. package/dist/{features → src/features}/simulation/activity/utils/isUpgradeActivity.d.ts +0 -0
  540. package/dist/{features → src/features}/simulation/activity/utils/parseAccountActivities.d.ts +0 -0
  541. package/dist/{features → src/features}/simulation/activity/utils/parseFinanceActivities.d.ts +0 -0
  542. package/dist/{features → src/features}/simulation/fees/index.d.ts +0 -0
  543. package/dist/{features → src/features}/simulation/fees/schema.d.ts +0 -0
  544. package/dist/{features → src/features}/simulation/index.d.ts +0 -0
  545. package/dist/{features → src/features}/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.d.ts +0 -0
  546. package/dist/{features → src/features}/simulation/transactionReview/getMessageFromSimulationError.d.ts +0 -0
  547. package/dist/{features → src/features}/simulation/transactionReview/index.d.ts +0 -0
  548. package/dist/{features → src/features}/simulation/transactionReview/schema.d.ts +1324 -1324
  549. package/dist/{features → src/features}/simulation/warning/helper.d.ts +0 -0
  550. package/dist/{features → src/features}/simulation/warning/index.d.ts +0 -0
  551. package/dist/{features → src/features}/simulation/warning/schema.d.ts +0 -0
  552. package/dist/{features → src/features}/swap/index.d.ts +0 -0
  553. package/dist/{features → src/features}/swap/models/index.d.ts +0 -0
  554. package/dist/{features → src/features}/swap/models/order.model.d.ts +0 -0
  555. package/dist/{features → src/features}/swap/models/quote.model.d.ts +0 -0
  556. package/dist/{features → src/features}/swap/models/trade.model.d.ts +0 -0
  557. package/dist/{features → src/features}/swap/services/implementation.d.ts +0 -0
  558. package/dist/{features → src/features}/swap/services/index.d.ts +0 -0
  559. package/dist/{features → src/features}/swap/services/interface.d.ts +0 -0
  560. package/dist/{features → src/features}/swap/services/order.mock.d.ts +0 -0
  561. package/dist/{features → src/features}/swap/services/quote.mock.d.ts +0 -0
  562. package/dist/{features → src/features}/swap/tests/token.mock.d.ts +0 -0
  563. package/dist/{features → src/features}/swap/tests/trade.mock.d.ts +0 -0
  564. package/dist/{features → src/features}/swap/tests/walletAccount.mock.d.ts +0 -0
  565. package/dist/{features → src/features}/swap/utils/index.d.ts +0 -0
  566. package/dist/{features → src/features}/swap/utils/slippage.d.ts +0 -0
  567. package/dist/{features → src/features}/swap/utils/totalFee.d.ts +0 -0
  568. package/dist/{http → src/http}/DateService.d.ts +0 -0
  569. package/dist/{http → src/http}/HttpError.d.ts +0 -0
  570. package/dist/{http → src/http}/HttpService.d.ts +0 -0
  571. package/dist/{http → src/http}/IDateService.d.ts +0 -0
  572. package/dist/{http → src/http}/IHttpService.d.ts +0 -0
  573. package/dist/{http → src/http}/SWRService.d.ts +0 -0
  574. package/dist/{http → src/http}/apiData.d.ts +0 -0
  575. package/dist/{http → src/http}/fetcher.d.ts +0 -0
  576. package/dist/{http → src/http}/time.d.ts +0 -0
  577. package/dist/{knownDapps → src/knownDapps}/IKnownDappsBackendService.d.ts +0 -0
  578. package/dist/{knownDapps → src/knownDapps}/KnownDappsBackendService.d.ts +0 -0
  579. package/dist/{knownDapps → src/knownDapps}/index.d.ts +0 -0
  580. package/dist/{knownDapps → src/knownDapps}/schema.d.ts +0 -0
  581. package/dist/{knownDapps → src/knownDapps}/utils/getDapplandUrl.d.ts +0 -0
  582. package/dist/{knownDapps → src/knownDapps}/utils/index.d.ts +0 -0
  583. package/dist/{nameResolution → src/nameResolution}/IResolveNameService.d.ts +0 -0
  584. package/dist/{nameResolution → src/nameResolution}/ResolveNameService.d.ts +0 -0
  585. package/dist/{nameResolution → src/nameResolution}/index.d.ts +0 -0
  586. package/dist/{nameResolution → src/nameResolution}/schema.d.ts +0 -0
  587. package/dist/{nfts → src/nfts}/BackendNftService.d.ts +0 -0
  588. package/dist/{nfts → src/nfts}/BackendPaginationError.d.ts +0 -0
  589. package/dist/{nfts → src/nfts}/INFTService.d.ts +0 -0
  590. package/dist/{nfts → src/nfts}/utils.d.ts +0 -0
  591. package/dist/{onchainRecovery → src/onchainRecovery}/IOnchainRecoveryService.d.ts +0 -0
  592. package/dist/{onchainRecovery → src/onchainRecovery}/OnchainRecoveryService.d.ts +0 -0
  593. package/dist/{onchainRecovery → src/onchainRecovery}/index.d.ts +0 -0
  594. package/dist/{onchainRecovery → src/onchainRecovery}/schema.d.ts +0 -0
  595. package/dist/{platform → src/platform}/index.d.ts +0 -0
  596. package/dist/{platform → src/platform}/isBraveBrowser.d.ts +0 -0
  597. package/dist/{platform → src/platform}/isBrowser.d.ts +0 -0
  598. package/dist/{signer → src/signer}/index.d.ts +0 -0
  599. package/dist/{signer → src/signer}/multisigner.d.ts +0 -0
  600. package/dist/{signer → src/signer}/seedphrase.d.ts +0 -0
  601. package/dist/{tokens → src/tokens}/balances.d.ts +0 -0
  602. package/dist/{tokens → src/tokens}/constants.d.ts +0 -0
  603. package/dist/{tokens → src/tokens}/convertTokenAmountToCurrencyValue.d.ts +0 -0
  604. package/dist/{tokens → src/tokens}/convertTokenUnitAmountWithDecimals.d.ts +0 -0
  605. package/dist/{tokens → src/tokens}/ensureDecimals.d.ts +0 -0
  606. package/dist/{tokens → src/tokens}/getCurrencySymbol.d.ts +0 -0
  607. package/dist/{tokens → src/tokens}/index.d.ts +0 -0
  608. package/dist/{tokens → src/tokens}/isUnlimitedAmount.d.ts +0 -0
  609. package/dist/{tokens → src/tokens}/prettifyCurrencyValue.d.ts +0 -0
  610. package/dist/{tokens → src/tokens}/prettifyTokenAmount.d.ts +0 -0
  611. package/dist/{tokens → src/tokens}/service/index.d.ts +0 -0
  612. package/dist/{tokens → src/tokens}/service/interface.d.ts +0 -0
  613. package/dist/{tokens → src/tokens}/service/tokenError.d.ts +0 -0
  614. package/dist/{tokens → src/tokens}/service/types/index.d.ts +0 -0
  615. package/dist/{tokens → src/tokens}/service/types/unclaimedRewards.model.d.ts +0 -0
  616. package/dist/{tokens → src/tokens}/service/types/webToken.model.d.ts +0 -0
  617. package/dist/{tokens → src/tokens}/token.d.ts +0 -0
  618. package/dist/{transactions → src/transactions}/aggregatedSimDataTypes.d.ts +0 -0
  619. package/dist/{transactions → src/transactions}/amount.d.ts +0 -0
  620. package/dist/{transactions → src/transactions}/buildTransactions.d.ts +0 -0
  621. package/dist/{transactions → src/transactions}/deployAccountTypes.d.ts +0 -0
  622. package/dist/{transactions → src/transactions}/errors.d.ts +0 -0
  623. package/dist/{transactions → src/transactions}/estimate/argentMaxFee.d.ts +0 -0
  624. package/dist/{transactions → src/transactions}/estimate/error.d.ts +0 -0
  625. package/dist/{transactions → src/transactions}/estimate/index.d.ts +0 -0
  626. package/dist/{transactions → src/transactions}/estimate/model.d.ts +0 -0
  627. package/dist/{transactions → src/transactions}/estimate/utils.d.ts +0 -0
  628. package/dist/{transactions → src/transactions}/findTransfersAndApprovals.d.ts +0 -0
  629. package/dist/{transactions → src/transactions}/getPrettyRcpError.d.ts +0 -0
  630. package/dist/{transactions → src/transactions}/getTransactionVersion.d.ts +0 -0
  631. package/dist/{transactions → src/transactions}/service/implementation.d.ts +0 -0
  632. package/dist/{transactions → src/transactions}/service/index.d.ts +0 -0
  633. package/dist/{transactions → src/transactions}/service/interface.d.ts +0 -0
  634. package/dist/{transactions → src/transactions}/service/types.d.ts +2 -2
  635. /package/dist/{transactions → src/transactions}/transactionAction.d.ts +0 -0
  636. /package/dist/{transactions → src/transactions}/transactionReviewTypes.d.ts +0 -0
  637. /package/dist/{transactions → src/transactions}/transactionSimulationTypes.d.ts +0 -0
  638. /package/dist/{transactions → src/transactions}/transactionVersion.d.ts +0 -0
  639. /package/dist/{transactions → src/transactions}/txv3.d.ts +0 -0
  640. /package/dist/{transactions → src/transactions}/types.d.ts +0 -0
  641. /package/dist/{utils → src/utils}/address.d.ts +0 -0
  642. /package/dist/{utils → src/utils}/arrays.d.ts +0 -0
  643. /package/dist/{utils → src/utils}/avatarImage.d.ts +0 -0
  644. /package/dist/{utils → src/utils}/base58.d.ts +0 -0
  645. /package/dist/{utils → src/utils}/bigNumber.d.ts +0 -0
  646. /package/dist/{utils → src/utils}/bips.d.ts +0 -0
  647. /package/dist/{utils → src/utils}/daysBetween.d.ts +0 -0
  648. /package/dist/{utils → src/utils}/env.d.ts +0 -0
  649. /package/dist/{utils → src/utils}/hex.d.ts +0 -0
  650. /package/dist/{utils → src/utils}/id.d.ts +0 -0
  651. /package/dist/{utils → src/utils}/initials.d.ts +0 -0
  652. /package/dist/{utils → src/utils}/isContractDeployed.d.ts +0 -0
  653. /package/dist/{utils → src/utils}/nonNullable.d.ts +0 -0
  654. /package/dist/{utils → src/utils}/number/index.d.ts +0 -0
  655. /package/dist/{utils → src/utils}/number/isAllowedAddressHexInputValue.d.ts +0 -0
  656. /package/dist/{utils → src/utils}/number/isAllowedNumericInputValue.d.ts +0 -0
  657. /package/dist/{utils → src/utils}/number/isNumeric.d.ts +0 -0
  658. /package/dist/{utils → src/utils}/number/prettifyNumber.d.ts +0 -0
  659. /package/dist/{utils → src/utils}/parseAmount.d.ts +0 -0
  660. /package/dist/{utils → src/utils}/pluralise.d.ts +0 -0
  661. /package/dist/{utils → src/utils}/readFileAsString.d.ts +0 -0
  662. /package/dist/{utils → src/utils}/schemas.d.ts +0 -0
  663. /package/dist/{utils → src/utils}/starknet/starknet.d.ts +0 -0
  664. /package/dist/{utils → src/utils}/starknet/starknetLibTypes.d.ts +0 -0
  665. /package/dist/{utils → src/utils}/starknet/starknetSchemas.d.ts +0 -0
  666. /package/dist/{utils → src/utils}/transactions.d.ts +0 -0
  667. /package/dist/{utils → src/utils}/url/index.d.ts +0 -0
  668. /package/dist/{utils → src/utils}/url/urlWithQuery.d.ts +0 -0
  669. /package/dist/{utils → src/utils}/voidify.d.ts +0 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("starknet"),h=require("url-join"),m=require("../../errors/review.cjs"),w=require("../getTransactionVersion.cjs"),E=require("../estimate/utils.cjs"),T=require("../../utils/url/urlWithQuery.cjs"),y=require("../../features/simulation/transactionReview/schema.cjs"),S=require("../../utils/arrays.cjs");class I{constructor(e,a){this.apiBase=e,this.httpService=a}async getLabels(){const e=h(this.apiBase,"reviewer","labels");return await this.httpService.get(e)}async getWarnings(){const e=h(this.apiBase,"reviewer","warnings/reasons");return await this.httpService.get(e)}async simulateAndReview(e,a,c,o,l,s){const r=a.some(i=>i.type==="DEPLOY_ACCOUNT");try{if(!("getChainId"in e))throw new Error("MISSING_METHOD");const i=w.getTxVersionFromFeeToken(c),t=r?"0x0":await e.getNonce(),n=await e.getChainId(),d={transactions:a.map(g=>({...E.getPayloadFromTransaction({transaction:g,nonce:t,version:i,chainId:n,isDeploymentTransaction:r,appDomain:o,cairoVersion:e.cairoVersion,address:e.address}),type:g.type}))},p=h(this.apiBase,"reviewer","transactions","v2","review","starknet"),F=s?T.urlWithQuery(p,{delayedTransactions:"true"}):p,u=await this.httpService.post(F,{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(d)},y.simulateAndReviewSchema);if(u.transactions.some(g=>y.isTransactionSimulationError(g)))return u;const v=E.getEstimatedFeeFromSimulationAndRespectWatermarkFee(u,c);return{...u,enrichedFeeEstimation:v}}catch(i){return console.error(i),this.fallbackToOnchainFeeEstimation({transactions:a,account:e,isDeploymentTransaction:r,feeTokenAddress:c,accountDeployTransaction:l})}}getCallsFromTx(e){let a;return e.calls&&(a=S.ensureArray(e.calls)),a}async fallbackToOnchainFeeEstimation({transactions:e,account:a,isDeploymentTransaction:c,feeTokenAddress:o,accountDeployTransaction:l}){try{const s=c?this.getCallsFromTx(e[1]):this.getCallsFromTx(e[0]);if(!s)throw new m.ReviewError({code:"NO_CALLS_FOUND"});const r=await this.fetchFeesOnchain({starknetAccount:a,calls:s,isDeployed:!c,feeTokenAddress:o,accountDeployTransaction:l});return{transactions:[],enrichedFeeEstimation:r,isBackendDown:!0}}catch(s){throw console.error(s),new m.ReviewError({message:`${s}`,code:"SIMULATE_AND_REVIEW_FAILED"})}}async fetchFeesOnchain({starknetAccount:e,calls:a,isDeployed:c,feeTokenAddress:o,accountDeployTransaction:l}){try{const s=w.getTxVersionFromFeeToken(o),r={transactions:{feeTokenAddress:o,amount:0n,pricePerUnit:0n,dataGasConsumed:0n,dataGasPrice:0n}};if(!c&&l){if("estimateFeeBulk"in e){const i=[{type:_.TransactionType.DEPLOY_ACCOUNT,payload:{classHash:l.classHash,addressSalt:l.salt,constructorCalldata:l.calldata,contractAddress:e.address}},{type:_.TransactionType.INVOKE,payload:a}],[t,n]=await e.estimateFeeBulk(i,{version:s}).catch(d=>{throw console.error(d),d});if(!t.gas_consumed||!t.gas_price||!n.gas_consumed||!n.gas_price)throw new m.ReviewError({code:"ONCHAIN_FEE_ESTIMATION_FAILED",message:"Missing gas_consumed or gas_price"});r.deployment={feeTokenAddress:o,amount:t.gas_consumed,pricePerUnit:t.gas_price,dataGasConsumed:t.data_gas_consumed,dataGasPrice:t.data_gas_price},r.transactions={feeTokenAddress:o,amount:n.gas_consumed,pricePerUnit:n.gas_price,dataGasConsumed:n.data_gas_consumed,dataGasPrice:n.data_gas_price}}}else{const{gas_consumed:i,gas_price:t,data_gas_consumed:n,data_gas_price:d}=await e.estimateFee(a,{skipValidate:!0,version:s});if(!i||!t)throw new m.ReviewError({code:"ONCHAIN_FEE_ESTIMATION_FAILED",message:"Missing gas_consumed or gas_price"});r.transactions={feeTokenAddress:o,amount:i,pricePerUnit:t,dataGasConsumed:n,dataGasPrice:d}}return r}catch(s){throw new m.ReviewError({code:"ONCHAIN_FEE_ESTIMATION_FAILED",message:`${s}`})}}}exports.TransactionReviewServiceWeb=I;
@@ -0,0 +1,182 @@
1
+ import { TransactionType as u } from "starknet";
2
+ import g from "url-join";
3
+ import { ReviewError as d } from "../../errors/review.js";
4
+ import { getTxVersionFromFeeToken as E } from "../getTransactionVersion.js";
5
+ import { getPayloadFromTransaction as F, getEstimatedFeeFromSimulationAndRespectWatermarkFee as I } from "../estimate/utils.js";
6
+ import { urlWithQuery as C } from "../../utils/url/urlWithQuery.js";
7
+ import { simulateAndReviewSchema as O, isTransactionSimulationError as S } from "../../features/simulation/transactionReview/schema.js";
8
+ import { ensureArray as N } from "../../utils/arrays.js";
9
+ class B {
10
+ constructor(a, e) {
11
+ this.apiBase = a, this.httpService = e;
12
+ }
13
+ /**
14
+ * Fetch transaction review labels
15
+ * @returns {Promise<TransactionReviewLabel[] | undefined>} The account activities.
16
+ */
17
+ async getLabels() {
18
+ const a = g(this.apiBase, "reviewer", "labels");
19
+ return await this.httpService.get(a);
20
+ }
21
+ /**
22
+ * Fetch transaction review warnings.
23
+ * @returns {Promise<TransactionReviewWarning[] | undefined>} The account activities.
24
+ */
25
+ async getWarnings() {
26
+ const a = g(this.apiBase, "reviewer", "warnings/reasons");
27
+ return await this.httpService.get(a);
28
+ }
29
+ async simulateAndReview(a, e, c, o, m, t) {
30
+ const r = e.some((i) => i.type === "DEPLOY_ACCOUNT");
31
+ try {
32
+ if (!("getChainId" in a))
33
+ throw new Error("MISSING_METHOD");
34
+ const i = E(c), s = r ? "0x0" : await a.getNonce(), n = await a.getChainId(), l = {
35
+ transactions: e.map((h) => ({
36
+ ...F({
37
+ transaction: h,
38
+ nonce: s,
39
+ version: i,
40
+ chainId: n,
41
+ isDeploymentTransaction: r,
42
+ appDomain: o,
43
+ cairoVersion: a.cairoVersion,
44
+ address: a.address
45
+ }),
46
+ type: h.type
47
+ }))
48
+ }, _ = g(this.apiBase, "reviewer", "transactions", "v2", "review", "starknet"), w = t ? C(_, { delayedTransactions: "true" }) : _, p = await this.httpService.post(w, {
49
+ headers: {
50
+ Accept: "application/json",
51
+ "Content-Type": "application/json"
52
+ },
53
+ body: JSON.stringify(l)
54
+ }, O);
55
+ if (p.transactions.some((h) => S(h)))
56
+ return p;
57
+ const y = I(p, c);
58
+ return {
59
+ ...p,
60
+ enrichedFeeEstimation: y
61
+ };
62
+ } catch (i) {
63
+ return console.error(i), this.fallbackToOnchainFeeEstimation({
64
+ transactions: e,
65
+ account: a,
66
+ isDeploymentTransaction: r,
67
+ feeTokenAddress: c,
68
+ accountDeployTransaction: m
69
+ });
70
+ }
71
+ }
72
+ getCallsFromTx(a) {
73
+ let e;
74
+ return a.calls && (e = N(a.calls)), e;
75
+ }
76
+ async fallbackToOnchainFeeEstimation({ transactions: a, account: e, isDeploymentTransaction: c, feeTokenAddress: o, accountDeployTransaction: m }) {
77
+ try {
78
+ const t = c ? this.getCallsFromTx(a[1]) : this.getCallsFromTx(a[0]);
79
+ if (!t)
80
+ throw new d({
81
+ code: "NO_CALLS_FOUND"
82
+ });
83
+ const r = await this.fetchFeesOnchain({
84
+ starknetAccount: e,
85
+ calls: t,
86
+ isDeployed: !c,
87
+ feeTokenAddress: o,
88
+ accountDeployTransaction: m
89
+ });
90
+ return {
91
+ transactions: [],
92
+ enrichedFeeEstimation: r,
93
+ isBackendDown: !0
94
+ };
95
+ } catch (t) {
96
+ throw console.error(t), new d({
97
+ message: `${t}`,
98
+ code: "SIMULATE_AND_REVIEW_FAILED"
99
+ });
100
+ }
101
+ }
102
+ async fetchFeesOnchain({ starknetAccount: a, calls: e, isDeployed: c, feeTokenAddress: o, accountDeployTransaction: m }) {
103
+ try {
104
+ const t = E(o), r = {
105
+ transactions: {
106
+ feeTokenAddress: o,
107
+ amount: 0n,
108
+ pricePerUnit: 0n,
109
+ dataGasConsumed: 0n,
110
+ dataGasPrice: 0n
111
+ }
112
+ };
113
+ if (!c && m) {
114
+ if ("estimateFeeBulk" in a) {
115
+ const i = [
116
+ {
117
+ type: u.DEPLOY_ACCOUNT,
118
+ payload: {
119
+ classHash: m.classHash,
120
+ addressSalt: m.salt,
121
+ constructorCalldata: m.calldata,
122
+ contractAddress: a.address
123
+ }
124
+ },
125
+ {
126
+ type: u.INVOKE,
127
+ payload: e
128
+ }
129
+ ], [s, n] = await a.estimateFeeBulk(i, {
130
+ version: t
131
+ }).catch((l) => {
132
+ throw console.error(l), l;
133
+ });
134
+ if (!s.gas_consumed || !s.gas_price || !n.gas_consumed || !n.gas_price)
135
+ throw new d({
136
+ code: "ONCHAIN_FEE_ESTIMATION_FAILED",
137
+ message: "Missing gas_consumed or gas_price"
138
+ });
139
+ r.deployment = {
140
+ feeTokenAddress: o,
141
+ amount: s.gas_consumed,
142
+ pricePerUnit: s.gas_price,
143
+ dataGasConsumed: s.data_gas_consumed,
144
+ dataGasPrice: s.data_gas_price
145
+ }, r.transactions = {
146
+ feeTokenAddress: o,
147
+ amount: n.gas_consumed,
148
+ pricePerUnit: n.gas_price,
149
+ dataGasConsumed: n.data_gas_consumed,
150
+ dataGasPrice: n.data_gas_price
151
+ };
152
+ }
153
+ } else {
154
+ const { gas_consumed: i, gas_price: s, data_gas_consumed: n, data_gas_price: l } = await a.estimateFee(e, {
155
+ skipValidate: !0,
156
+ version: t
157
+ });
158
+ if (!i || !s)
159
+ throw new d({
160
+ code: "ONCHAIN_FEE_ESTIMATION_FAILED",
161
+ message: "Missing gas_consumed or gas_price"
162
+ });
163
+ r.transactions = {
164
+ feeTokenAddress: o,
165
+ amount: i,
166
+ pricePerUnit: s,
167
+ dataGasConsumed: n,
168
+ dataGasPrice: l
169
+ };
170
+ }
171
+ return r;
172
+ } catch (t) {
173
+ throw new d({
174
+ code: "ONCHAIN_FEE_ESTIMATION_FAILED",
175
+ message: `${t}`
176
+ });
177
+ }
178
+ }
179
+ }
180
+ export {
181
+ B as TransactionReviewServiceWeb
182
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),e=t.z.object({reason:t.z.string(),severity:t.z.string().optional(),title:t.z.string(),description:t.z.string().optional()});exports.transactionReviewWarningSchema=e;
@@ -0,0 +1,10 @@
1
+ import { z as t } from "zod";
2
+ const n = t.object({
3
+ reason: t.string(),
4
+ severity: t.string().optional(),
5
+ title: t.string(),
6
+ description: t.string().optional()
7
+ });
8
+ export {
9
+ n as transactionReviewWarningSchema
10
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=["account-upgrade","approve","set-approval-for-all","swap","transfer"];exports.apiTransactionReviewActivityType=e;
@@ -0,0 +1,10 @@
1
+ const a = [
2
+ "account-upgrade",
3
+ "approve",
4
+ "set-approval-for-all",
5
+ "swap",
6
+ "transfer"
7
+ ];
8
+ export {
9
+ a as apiTransactionReviewActivityType
10
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("starknet"),s=require("zod"),o=Object.values(n.constants.TRANSACTION_VERSION),i=s.z.string().default("0x3").refine(t=>{const e=n.num.toBigInt(t);return o.map(r=>n.num.toBigInt(r)).includes(e)}).transform(t=>n.num.toHex(t));function c(t){if(t===n.constants.TRANSACTION_VERSION.V3||t===n.constants.TRANSACTION_VERSION.F3)throw Error("Only txv1 is supported")}exports.denyTxV3=c;exports.txVersionSchema=i;
@@ -0,0 +1,14 @@
1
+ import { constants as r, num as n } from "starknet";
2
+ import { z as s } from "zod";
3
+ const i = Object.values(r.TRANSACTION_VERSION), m = s.string().default("0x3").refine((t) => {
4
+ const o = n.toBigInt(t);
5
+ return i.map((e) => n.toBigInt(e)).includes(o);
6
+ }).transform((t) => n.toHex(t));
7
+ function u(t) {
8
+ if (t === r.TRANSACTION_VERSION.V3 || t === r.TRANSACTION_VERSION.F3)
9
+ throw Error("Only txv1 is supported");
10
+ }
11
+ export {
12
+ u as denyTxV3,
13
+ m as txVersionSchema
14
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chains/starknet/services/deploymentData/getAccountClassHash.cjs"),o=require("../chains/starknet/constants.cjs"),t=require("../chains/starknet/address.cjs"),u=[o.STRK_TOKEN_ADDRESS];function n({address:e}){return u.some(s=>t.isEqualAddress(e,s))}function a(e){return e?r.getArgentAccountClassHashesWithTxV3Support().some(s=>t.isEqualAddress(s,e)):!1}exports.classHashSupportsTxV3=a;exports.feeTokenNeedsTxV3Support=n;
@@ -0,0 +1,14 @@
1
+ import { getArgentAccountClassHashesWithTxV3Support as t } from "../chains/starknet/services/deploymentData/getAccountClassHash.js";
2
+ import { STRK_TOKEN_ADDRESS as s } from "../chains/starknet/constants.js";
3
+ import { isEqualAddress as o } from "../chains/starknet/address.js";
4
+ const n = [s];
5
+ function f({ address: r }) {
6
+ return n.some((e) => o(r, e));
7
+ }
8
+ function m(r) {
9
+ return r ? t().some((e) => o(e, r)) : !1;
10
+ }
11
+ export {
12
+ m as classHashSupportsTxV3,
13
+ f as feeTokenNeedsTxV3Support
14
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>e.slice(0,6)+"..."+e.slice(-4);exports.formatAddress=t;
@@ -0,0 +1,4 @@
1
+ const r = (e) => e.slice(0, 6) + "..." + e.slice(-4);
2
+ export {
3
+ r as formatAddress
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=r=>r==null?[]:Array.isArray(r)?r:[r];exports.ensureArray=e;
@@ -0,0 +1,4 @@
1
+ const r = (n) => n == null ? [] : Array.isArray(n) ? n : [n];
2
+ export {
3
+ r as ensureArray
4
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("starknet"),m=require("./id.cjs"),f=require("./initials.cjs"),{toBigInt:h}=i.num,a=t=>{const e=t.replace("#","");if(!/^[0-9A-F]{6}$/i.test(e))throw new Error(`Invalid color ${t}`);return`#${e}`},l=(t,e)=>{const r=a(e.background),n=a(e.color??"#ffffff"),o=f.getInitials(t,!0),s=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
2
+ <rect width="48" height="48" fill="${r}" />
3
+ <text x="50%" y="54%" dominant-baseline="middle" text-anchor="middle" font-size="16" font-family="Barlow, Helvetica, Arial, sans-serif" fill="${n}">${o}</text>
4
+ </svg>`;return`data:image/svg+xml;base64,${btoa(s)}`},c=["02BBA8","29C5FF","0078A4","FFBF3D","FFA85C","FF875B","FF675C","FF5C72"],d=t=>{const e=m.id(t).slice(-2),r=parseInt(e,16)%c.length;return c[r]},g=t=>{try{return i.num.toHex(h(i.num.hexToDecimalString(t)))}catch{}return""},F=({accountName:t,networkId:e,accountAddress:r,backgroundColor:n})=>{const o=g(r),s=`${e}::${o}`,u=n||d(s);return l(t,{background:u})};exports.generateAvatarImage=l;exports.getColor=d;exports.getNetworkAccountImageUrl=F;exports.stripAddressZeroPadding=g;
@@ -0,0 +1,42 @@
1
+ import { num as i } from "starknet";
2
+ import { id as d } from "./id.js";
3
+ import { getInitials as g } from "./initials.js";
4
+ const { toBigInt: f } = i, a = (t) => {
5
+ const r = t.replace("#", "");
6
+ if (!/^[0-9A-F]{6}$/i.test(r))
7
+ throw new Error(`Invalid color ${t}`);
8
+ return `#${r}`;
9
+ }, m = (t, r) => {
10
+ const e = a(r.background), o = a(r.color ?? "#ffffff"), n = g(t, !0), s = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
11
+ <rect width="48" height="48" fill="${e}" />
12
+ <text x="50%" y="54%" dominant-baseline="middle" text-anchor="middle" font-size="16" font-family="Barlow, Helvetica, Arial, sans-serif" fill="${o}">${n}</text>
13
+ </svg>`;
14
+ return `data:image/svg+xml;base64,${btoa(s)}`;
15
+ }, c = [
16
+ "02BBA8",
17
+ "29C5FF",
18
+ "0078A4",
19
+ "FFBF3D",
20
+ "FFA85C",
21
+ "FF875B",
22
+ "FF675C",
23
+ "FF5C72"
24
+ ], h = (t) => {
25
+ const r = d(t).slice(-2), e = parseInt(r, 16) % c.length;
26
+ return c[e];
27
+ }, u = (t) => {
28
+ try {
29
+ return i.toHex(f(i.hexToDecimalString(t)));
30
+ } catch {
31
+ }
32
+ return "";
33
+ }, A = ({ accountName: t, networkId: r, accountAddress: e, backgroundColor: o }) => {
34
+ const n = u(e), s = `${r}::${n}`, l = o || h(s);
35
+ return m(t, { background: l });
36
+ };
37
+ export {
38
+ m as generateAvatarImage,
39
+ h as getColor,
40
+ A as getNetworkAccountImageUrl,
41
+ u as stripAddressZeroPadding
42
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@scure/base"),o=require("starknet"),c=e=>{const s=o.encode.removeHexPrefix(o.encode.sanitizeHex(o.num.toHex(e))),a=n.hex.decode(s);return n.base58.encode(a)},t=e=>e.map(c),r=e=>{const s=n.base58.decode(e);return o.encode.sanitizeHex(n.hex.encode(s))},d=e=>e.map(r);exports.decodeBase58=r;exports.decodeBase58Array=d;exports.encodeBase58=c;exports.encodeBase58Array=t;
@@ -0,0 +1,15 @@
1
+ import { hex as r, base58 as c } from "@scure/base";
2
+ import { encode as n, num as s } from "starknet";
3
+ const a = (e) => {
4
+ const o = n.removeHexPrefix(n.sanitizeHex(s.toHex(e))), t = r.decode(o);
5
+ return c.encode(t);
6
+ }, m = (e) => e.map(a), d = (e) => {
7
+ const o = c.decode(e);
8
+ return n.sanitizeHex(r.encode(o));
9
+ }, i = (e) => e.map(d);
10
+ export {
11
+ d as decodeBase58,
12
+ i as decodeBase58Array,
13
+ a as encodeBase58,
14
+ m as encodeBase58Array
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),i=t.z.any().refine(e=>typeof e=="bigint",{message:"Value must be a BigInt"}).transform(e=>BigInt(e));exports.bigNumberSchema=i;
@@ -0,0 +1,7 @@
1
+ import { z as t } from "zod";
2
+ const m = t.any().refine((e) => typeof e == "bigint", {
3
+ message: "Value must be a BigInt"
4
+ }).transform((e) => BigInt(e));
5
+ export {
6
+ m as bigNumberSchema
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../bigdecimal/lib.cjs");function o(e){const t={value:BigInt(e),decimals:2},n={value:BigInt(1e4),decimals:2};return i.div(t,n)}exports.bipsToPercent=o;
@@ -0,0 +1,11 @@
1
+ import { div as o } from "../bigdecimal/lib.js";
2
+ function r(e) {
3
+ const n = { value: BigInt(e), decimals: 2 }, t = {
4
+ value: BigInt(1e4),
5
+ decimals: 2
6
+ };
7
+ return o(n, t);
8
+ }
9
+ export {
10
+ r as bipsToPercent
11
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function a(e,t){const s=e.getTime(),n=t.getTime(),o=Math.abs(s-n);return Math.floor(o/(1e3*60*60*24))}exports.daysBetween=a;
@@ -0,0 +1,7 @@
1
+ function c(t, e) {
2
+ const s = t.getTime(), n = e.getTime(), o = Math.abs(s - n);
3
+ return Math.floor(o / (1e3 * 60 * 60 * 24));
4
+ }
5
+ export {
6
+ c as daysBetween
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>(e||"false")==="true";exports.isFeatureEnabled=t;
@@ -0,0 +1,4 @@
1
+ const r = (e) => (e || "false") === "true";
2
+ export {
3
+ r as isFeatureEnabled
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("zod"),r=s.z.string().regex(/^(0x)?[0-9a-fA-F]+$/,"Invalid hex string"),n=r.transform(e=>{const t=e.startsWith("0x")?e.slice(2):e;return`0x${t.length%2===0?t:`0${t}`}`});exports.hexSchema=n;exports.hexSchemaBase=r;
@@ -0,0 +1,9 @@
1
+ import { z as r } from "zod";
2
+ const s = r.string().regex(/^(0x)?[0-9a-fA-F]+$/, "Invalid hex string"), x = s.transform((t) => {
3
+ const e = t.startsWith("0x") ? t.slice(2) : t;
4
+ return `0x${e.length % 2 === 0 ? e : `0${e}`}`;
5
+ });
6
+ export {
7
+ x as hexSchema,
8
+ s as hexSchemaBase
9
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.cjs"),e=require("../../node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.cjs");function i(t){return`0x${e.bytesToHex(r.keccak_256(e.utf8ToBytes(t)))}`}exports.id=i;
@@ -0,0 +1,8 @@
1
+ import { keccak_256 as t } from "../../node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.js";
2
+ import { bytesToHex as r, utf8ToBytes as e } from "../../node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.js";
3
+ function m(o) {
4
+ return `0x${r(t(e(o)))}`;
5
+ }
6
+ export {
7
+ m as id
8
+ };
@@ -19,6 +19,5 @@ export * from './starknet/starknet';
19
19
  export * from './starknet/starknetSchemas';
20
20
  export * from './transactions';
21
21
  export * from './url';
22
- export * from './useEventEmitter';
23
22
  export * from './voidify';
24
23
  export * from './bips';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash-es"),c=e=>{if(!o.isString(e))return;const s=/(\d+)$/,t=e.match(s);if(t)return t[1]},u=(e,s=!1)=>{if(!o.isString(e))return"";const t=s?e.replace(/[^0-9a-z ]/gi,""):e,i=o.upperCase(t).split(" "),n=c(t),r=i.map(l=>l[0]);return n&&n.length>1&&n.length<t.length?[r[0],n.substring(0,2)].join(""):i.length===1?i[0].substring(0,2):[r[0],r[r.length-1]].join("")};exports.getInitials=u;
@@ -0,0 +1,16 @@
1
+ import { isString as o, upperCase as l } from "lodash-es";
2
+ const u = (t) => {
3
+ if (!o(t))
4
+ return;
5
+ const s = /(\d+)$/, e = t.match(s);
6
+ if (e)
7
+ return e[1];
8
+ }, a = (t, s = !1) => {
9
+ if (!o(t))
10
+ return "";
11
+ const e = s ? t.replace(/[^0-9a-z ]/gi, "") : t, i = l(e).split(" "), r = u(e), n = i.map((c) => c[0]);
12
+ return r && r.length > 1 && r.length < e.length ? [n[0], r.substring(0, 2)].join("") : i.length === 1 ? i[0].substring(0, 2) : [n[0], n[n.length - 1]].join("");
13
+ };
14
+ export {
15
+ a as getInitials
16
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=async(t,e)=>{try{return await t.getClassHashAt(e),!0}catch{return!1}};exports.isContractDeployed=r;
@@ -0,0 +1,10 @@
1
+ const r = async (t, e) => {
2
+ try {
3
+ return await t.getClassHashAt(e), !0;
4
+ } catch {
5
+ return !1;
6
+ }
7
+ };
8
+ export {
9
+ r as isContractDeployed
10
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("lodash-es");function n(e){return!l.isNil(e)}exports.nonNullable=n;
@@ -0,0 +1,7 @@
1
+ import { isNil as o } from "lodash-es";
2
+ function i(n) {
3
+ return !o(n);
4
+ }
5
+ export {
6
+ i as nonNullable
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=e=>{const t=/^(0|0x([a-f0-9A-F]+)?)$/;return!!(e===""||t.test(e))};exports.isAllowedAddressHexInputValue=r;
@@ -0,0 +1,7 @@
1
+ const r = (e) => {
2
+ const t = /^(0|0x([a-f0-9A-F]+)?)$/;
3
+ return !!(e === "" || t.test(e));
4
+ };
5
+ export {
6
+ r as isAllowedAddressHexInputValue
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./isNumeric.cjs"),i=(e,r=16)=>{const t=new RegExp(`^[0-9]*.?[0-9]{0,${r}}$`);return e===""?!0:u.isNumeric(e)?!!t.test(e):!1};exports.isAllowedNumericInputValue=i;
@@ -0,0 +1,8 @@
1
+ import { isNumeric as i } from "./isNumeric.js";
2
+ const u = (e, r = 16) => {
3
+ const t = new RegExp(`^[0-9]*.?[0-9]{0,${r}}$`);
4
+ return e === "" ? !0 : i(e) ? !!t.test(e) : !1;
5
+ };
6
+ export {
7
+ u as isAllowedNumericInputValue
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=e=>!isNaN(parseFloat(e))&&isFinite(Number(e));exports.isNumeric=i;
@@ -0,0 +1,4 @@
1
+ const s = (i) => !isNaN(parseFloat(i)) && isFinite(Number(i));
2
+ export {
3
+ s as isNumeric
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../../node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs"),D=require("./isNumeric.cjs"),n={CURRENCY:{minDecimalPlaces:2,maxDecimalPlaces:10,minDecimalSignificantDigits:2,decimalPlacesWhenZero:2,allowLeadingZerosInDecimalPart:!0},TOKEN:{minDecimalPlaces:4,maxDecimalPlaces:16,minDecimalSignificantDigits:2,decimalPlacesWhenZero:1,allowLeadingZerosInDecimalPart:!0}},d=(e,t)=>o(e,{...n.CURRENCY,...t||{}}),P=(e,t)=>o(e,{...n.TOKEN,...t||{}}),o=(e,{minDecimalPlaces:t,maxDecimalPlaces:g,minDecimalSignificantDigits:f,decimalPlacesWhenZero:a,allowLeadingZerosInDecimalPart:s}=n.CURRENCY)=>{if(!D.isNumeric(e))return null;const r=new u.BigNumber(typeof e=="bigint"?e.toString():e);let i;const N=`0.${"".padStart(a-1,"0")}1`;if(r.lt(new u.BigNumber(N))&&!s)i=`0.${"".padStart(a,"0")}`;else if(r.gte(1))i=r.toFormat(t);else{const m=r.toFormat(g).split(".")[1].match(/^0+/),b=s&&m&&m.length?m[0].length:0,y=Math.max(b+f,t);i=r.toFormat(y)}let c=i.replace(/0+$/,"");const l=1+i.indexOf(".")+a;return c.length<l&&(c=i.substring(0,l)),c};exports.prettifyCurrencyNumber=d;exports.prettifyNumber=o;exports.prettifyNumberConfig=n;exports.prettifyTokenNumber=P;
@@ -0,0 +1,47 @@
1
+ import { BigNumber as s } from "../../../node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js";
2
+ import { isNumeric as P } from "./isNumeric.js";
3
+ const m = {
4
+ CURRENCY: {
5
+ minDecimalPlaces: 2,
6
+ maxDecimalPlaces: 10,
7
+ minDecimalSignificantDigits: 2,
8
+ decimalPlacesWhenZero: 2,
9
+ allowLeadingZerosInDecimalPart: !0
10
+ },
11
+ TOKEN: {
12
+ minDecimalPlaces: 4,
13
+ maxDecimalPlaces: 16,
14
+ minDecimalSignificantDigits: 2,
15
+ decimalPlacesWhenZero: 1,
16
+ allowLeadingZerosInDecimalPart: !0
17
+ }
18
+ }, x = (t, e) => g(t, {
19
+ ...m.CURRENCY,
20
+ ...e || {}
21
+ }), y = (t, e) => g(t, {
22
+ ...m.TOKEN,
23
+ ...e || {}
24
+ }), g = (t, { minDecimalPlaces: e, maxDecimalPlaces: f, minDecimalSignificantDigits: u, decimalPlacesWhenZero: n, allowLeadingZerosInDecimalPart: o } = m.CURRENCY) => {
25
+ if (!P(t))
26
+ return null;
27
+ const r = new s(typeof t == "bigint" ? t.toString() : t);
28
+ let i;
29
+ const p = `0.${"".padStart(n - 1, "0")}1`;
30
+ if (r.lt(new s(p)) && !o)
31
+ i = `0.${"".padStart(n, "0")}`;
32
+ else if (r.gte(1))
33
+ i = r.toFormat(e);
34
+ else {
35
+ const c = r.toFormat(f).split(".")[1].match(/^0+/), N = o && c && c.length ? c[0].length : 0, d = Math.max(N + u, e);
36
+ i = r.toFormat(d);
37
+ }
38
+ let a = i.replace(/0+$/, "");
39
+ const l = 1 + i.indexOf(".") + n;
40
+ return a.length < l && (a = i.substring(0, l)), a;
41
+ };
42
+ export {
43
+ x as prettifyCurrencyNumber,
44
+ g as prettifyNumber,
45
+ m as prettifyNumberConfig,
46
+ y as prettifyTokenNumber
47
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("starknet"),u=require("./number/isNumeric.cjs"),a=require("../bigdecimal/parseUnits.cjs"),i=(e,r=18)=>{const t=e.replace(",",".");return!e||!u.isNumeric(t)?0n:a.parseUnits(t,Number(r)).value};function o(e){return n.uint256.bnToUint256(e)}exports.getUint256CalldataFromBN=o;exports.parseAmountValue=i;
@@ -0,0 +1,14 @@
1
+ import { uint256 as n } from "starknet";
2
+ import { isNumeric as e } from "./number/isNumeric.js";
3
+ import { parseUnits as m } from "../bigdecimal/parseUnits.js";
4
+ const p = (r, o = 18) => {
5
+ const t = r.replace(",", ".");
6
+ return !r || !e(t) ? 0n : m(t, Number(o)).value;
7
+ };
8
+ function s(r) {
9
+ return n.bnToUint256(r);
10
+ }
11
+ export {
12
+ s as getUint256CalldataFromBN,
13
+ p as parseAmountValue
14
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=(e,r)=>`${e} ${r}${e===1?"":"s"}`;exports.pluralise=t;
@@ -0,0 +1,4 @@
1
+ const t = (r, s) => `${r} ${s}${r === 1 ? "" : "s"}`;
2
+ export {
3
+ t as pluralise
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=o=>new Promise((t,e)=>{const r=new FileReader;r.onload=()=>{var n;return r.result?t((n=r.result)==null?void 0:n.toString()):e(new Error("Could not read file"))},r.onerror=e,r.onabort=e.bind(null,new Error("User aborted")),r.readAsText(o)});exports.readFileAsString=i;
@@ -0,0 +1,10 @@
1
+ const d = (o) => new Promise((t, e) => {
2
+ const r = new FileReader();
3
+ r.onload = () => {
4
+ var n;
5
+ return r.result ? t((n = r.result) == null ? void 0 : n.toString()) : e(new Error("Could not read file"));
6
+ }, r.onerror = e, r.onabort = e.bind(null, new Error("User aborted")), r.readAsText(o);
7
+ });
8
+ export {
9
+ d as readFileAsString
10
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),c=t.z.boolean().transform(e=>String(e)),i=t.z.string().transform(e=>e==="true");function a(e){return t.z.object(e).passthrough().superRefine(r=>{const n=Object.keys(e),o=Object.keys(r).filter(s=>!n.includes(s));o.length>0&&`${o.join(", ")}`})}function u(e){const r=a(e);return Object.assign(r,{extend:n=>a({...e,...n})})}const l=(e,r)=>{try{return{success:!0,data:e.parse(r)}}catch(n){if(n instanceof t.z.ZodError)return console.error("Validation warnings:",n.errors),{success:!1,error:n};throw n}};exports.booleanToStringSchema=c;exports.createSchemaWithWarnings=u;exports.safeParseAndWarn=l;exports.stringToBooleanSchema=i;