@argent/x-shared 1.79.0 → 1.79.2

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 (502) hide show
  1. package/dist/.ts-temp/tsconfig.tsbuildinfo +1 -1
  2. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  3. package/dist/_virtual/_rolldown/runtime.js +20 -0
  4. package/dist/index.cjs +1 -1
  5. package/dist/index.js +112 -488
  6. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.cjs +1 -1
  7. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js +11 -11
  8. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.cjs +1 -1
  9. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js +62 -85
  10. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -1
  11. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js +153 -190
  12. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.cjs +1 -1
  13. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.js +56 -65
  14. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -1
  15. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js +125 -151
  16. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -1
  17. package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js +470 -575
  18. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
  19. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js +26 -40
  20. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.cjs +1 -1
  21. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js +4 -4
  22. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.cjs +1 -1
  23. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js +38 -42
  24. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.cjs +1 -1
  25. package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js +28 -42
  26. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
  27. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.js +17 -26
  28. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.cjs +1 -1
  29. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.js +52 -59
  30. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
  31. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.js +20 -19
  32. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.cjs +1 -1
  33. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.js +118 -113
  34. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.cjs +1 -1
  35. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.js +95 -105
  36. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.cjs +1 -1
  37. package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js +26 -32
  38. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_md.cjs +1 -1
  39. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_md.js +71 -82
  40. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_u64.cjs +1 -1
  41. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_u64.js +20 -20
  42. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha2.cjs +1 -1
  43. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha2.js +125 -124
  44. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha3.cjs +1 -1
  45. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha3.js +102 -116
  46. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/utils.cjs +1 -1
  47. package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/utils.js +62 -76
  48. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs +1 -1
  49. package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +519 -614
  50. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.cjs +1 -1
  51. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js +15 -19
  52. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.cjs +1 -1
  53. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js +15 -19
  54. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.cjs +1 -1
  55. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js +6 -6
  56. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.cjs +1 -1
  57. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js +15 -19
  58. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.cjs +1 -1
  59. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js +5 -5
  60. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.cjs +1 -1
  61. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js +10 -12
  62. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.cjs +1 -1
  63. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -5
  64. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.cjs +1 -1
  65. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.js +6 -7
  66. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.cjs +1 -1
  67. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.js +6 -8
  68. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.cjs +1 -1
  69. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js +7 -9
  70. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.cjs +1 -1
  71. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.js +6 -8
  72. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.cjs +1 -1
  73. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +9 -9
  74. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.cjs +1 -1
  75. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.js +7 -7
  76. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.cjs +1 -1
  77. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.js +5 -5
  78. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.cjs +1 -1
  79. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js +10 -15
  80. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.cjs +1 -1
  81. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.js +26 -32
  82. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.cjs +1 -1
  83. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js +5 -5
  84. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.cjs +1 -1
  85. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js +5 -5
  86. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.cjs +1 -1
  87. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.js +7 -7
  88. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.cjs +1 -1
  89. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -4
  90. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.cjs +1 -1
  91. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js +6 -6
  92. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.cjs +1 -1
  93. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js +8 -8
  94. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.cjs +1 -1
  95. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +12 -13
  96. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.cjs +1 -1
  97. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +5 -5
  98. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.cjs +1 -1
  99. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js +6 -6
  100. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.cjs +1 -1
  101. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js +6 -6
  102. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.cjs +1 -1
  103. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js +11 -11
  104. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.cjs +1 -1
  105. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js +8 -8
  106. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.cjs +1 -1
  107. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js +7 -7
  108. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.cjs +1 -1
  109. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js +6 -6
  110. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.cjs +1 -1
  111. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js +9 -9
  112. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.cjs +1 -1
  113. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js +5 -5
  114. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.cjs +1 -1
  115. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js +8 -11
  116. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.cjs +1 -1
  117. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js +7 -7
  118. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.cjs +1 -1
  119. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js +6 -6
  120. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.cjs +1 -1
  121. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js +6 -6
  122. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.cjs +1 -1
  123. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js +11 -11
  124. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.cjs +1 -1
  125. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js +7 -7
  126. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.cjs +1 -1
  127. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js +6 -6
  128. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.cjs +1 -1
  129. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js +6 -6
  130. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.cjs +1 -1
  131. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js +7 -7
  132. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.cjs +1 -1
  133. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js +4 -4
  134. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.cjs +1 -1
  135. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +6 -6
  136. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.cjs +1 -1
  137. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +4 -4
  138. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.cjs +1 -1
  139. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js +6 -6
  140. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.cjs +1 -1
  141. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js +5 -5
  142. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.cjs +1 -1
  143. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js +8 -8
  144. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.cjs +1 -1
  145. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.js +6 -8
  146. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.cjs +1 -1
  147. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js +14 -16
  148. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.cjs +1 -1
  149. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js +5 -5
  150. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.cjs +1 -1
  151. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js +10 -11
  152. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.cjs +1 -1
  153. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +6 -6
  154. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.cjs +1 -1
  155. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.js +4 -5
  156. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.cjs +1 -1
  157. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.js +6 -6
  158. package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.cjs +1 -1
  159. package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.js +121 -118
  160. package/dist/node_modules/.pnpm/numeral@2.0.6/node_modules/numeral/numeral.cjs +1 -1
  161. package/dist/node_modules/.pnpm/numeral@2.0.6/node_modules/numeral/numeral.js +377 -417
  162. package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.cjs +1 -1
  163. package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js +546 -635
  164. package/dist/paymaster.cjs +1 -1
  165. package/dist/paymaster.js +2 -11
  166. package/dist/simulation.cjs +1 -1
  167. package/dist/simulation.js +22 -90
  168. package/dist/src/account/account.model.cjs +1 -1
  169. package/dist/src/account/account.model.js +58 -52
  170. package/dist/src/account/accountv4.cjs +1 -1
  171. package/dist/src/account/accountv4.js +9 -11
  172. package/dist/src/account/preferences.model.cjs +1 -1
  173. package/dist/src/account/preferences.model.js +12 -10
  174. package/dist/src/accountNameGenerator/colors.cjs +1 -1
  175. package/dist/src/accountNameGenerator/colors.js +24 -24
  176. package/dist/src/accountNameGenerator/index.cjs +1 -1
  177. package/dist/src/accountNameGenerator/index.js +23 -23
  178. package/dist/src/accountNameGenerator/x-names.json.cjs +1 -1
  179. package/dist/src/accountNameGenerator/x-names.json.js +1922 -7
  180. package/dist/src/assets/tokens.json.cjs +1 -1
  181. package/dist/src/assets/tokens.json.js +180 -180
  182. package/dist/src/backend/schema.cjs +1 -1
  183. package/dist/src/backend/schema.js +9 -12
  184. package/dist/src/backend/sessionKeys/schema.cjs +1 -1
  185. package/dist/src/backend/sessionKeys/schema.js +27 -30
  186. package/dist/src/bigdecimal/constants.cjs +1 -1
  187. package/dist/src/bigdecimal/constants.js +6 -3
  188. package/dist/src/bigdecimal/createUnitsSchema.cjs +1 -1
  189. package/dist/src/bigdecimal/createUnitsSchema.js +7 -7
  190. package/dist/src/bigdecimal/formatUnits.cjs +1 -1
  191. package/dist/src/bigdecimal/formatUnits.js +9 -10
  192. package/dist/src/bigdecimal/index.cjs +1 -1
  193. package/dist/src/bigdecimal/index.js +45 -41
  194. package/dist/src/bigdecimal/lib.cjs +1 -1
  195. package/dist/src/bigdecimal/lib.js +105 -117
  196. package/dist/src/bigdecimal/parseUnits.cjs +1 -1
  197. package/dist/src/bigdecimal/parseUnits.js +18 -21
  198. package/dist/src/bigdecimal/utils.cjs +1 -1
  199. package/dist/src/bigdecimal/utils.js +33 -30
  200. package/dist/src/cache/CacheService.cjs +1 -1
  201. package/dist/src/cache/CacheService.js +32 -36
  202. package/dist/src/chains/starknet/address.cjs +1 -1
  203. package/dist/src/chains/starknet/address.js +73 -117
  204. package/dist/src/chains/starknet/addressDomain.cjs +1 -1
  205. package/dist/src/chains/starknet/addressDomain.js +14 -29
  206. package/dist/src/chains/starknet/addressInput.cjs +1 -1
  207. package/dist/src/chains/starknet/addressInput.js +6 -7
  208. package/dist/src/chains/starknet/argentName.cjs +1 -1
  209. package/dist/src/chains/starknet/argentName.js +10 -14
  210. package/dist/src/chains/starknet/cairoVersionSchema.cjs +1 -1
  211. package/dist/src/chains/starknet/cairoVersionSchema.js +5 -5
  212. package/dist/src/chains/starknet/constants.cjs +1 -1
  213. package/dist/src/chains/starknet/constants.js +4 -10
  214. package/dist/src/chains/starknet/getAddressFromArgentName.cjs +1 -1
  215. package/dist/src/chains/starknet/getAddressFromArgentName.js +38 -46
  216. package/dist/src/chains/starknet/getAddressFromStarkName.cjs +1 -1
  217. package/dist/src/chains/starknet/getAddressFromStarkName.js +59 -66
  218. package/dist/src/chains/starknet/network.cjs +1 -1
  219. package/dist/src/chains/starknet/network.js +20 -26
  220. package/dist/src/chains/starknet/services/address/StarknetAddressService.cjs +1 -1
  221. package/dist/src/chains/starknet/services/address/StarknetAddressService.js +31 -36
  222. package/dist/src/chains/starknet/services/deploymentData/constants.cjs +1 -1
  223. package/dist/src/chains/starknet/services/deploymentData/constants.js +14 -21
  224. package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.cjs +1 -1
  225. package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.js +15 -17
  226. package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs +1 -1
  227. package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.js +61 -65
  228. package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.cjs +1 -1
  229. package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.js +46 -65
  230. package/dist/src/chains/starknet/starknetId.cjs +1 -1
  231. package/dist/src/chains/starknet/starknetId.js +10 -14
  232. package/dist/src/currencyFetchService/CurrencyFetchService.cjs +1 -1
  233. package/dist/src/currencyFetchService/CurrencyFetchService.js +13 -18
  234. package/dist/src/currencyFetchService/types.ts.cjs +1 -1
  235. package/dist/src/currencyFetchService/types.ts.js +9 -12
  236. package/dist/src/errors/account.cjs +1 -1
  237. package/dist/src/errors/account.js +12 -13
  238. package/dist/src/errors/address.cjs +1 -1
  239. package/dist/src/errors/address.js +11 -12
  240. package/dist/src/errors/baseErrors.cjs +1 -1
  241. package/dist/src/errors/baseErrors.js +14 -14
  242. package/dist/src/errors/call.cjs +1 -1
  243. package/dist/src/errors/call.js +12 -13
  244. package/dist/src/errors/network.cjs +1 -1
  245. package/dist/src/errors/network.js +11 -12
  246. package/dist/src/errors/review.cjs +1 -1
  247. package/dist/src/errors/review.js +11 -12
  248. package/dist/src/errors/swap.cjs +1 -1
  249. package/dist/src/errors/swap.js +12 -13
  250. package/dist/src/features/paymaster/PaymasterService.cjs +1 -1
  251. package/dist/src/features/paymaster/PaymasterService.js +73 -87
  252. package/dist/src/features/paymaster/types.cjs +1 -1
  253. package/dist/src/features/paymaster/types.js +41 -51
  254. package/dist/src/features/simulation/activity/normalize.cjs +1 -1
  255. package/dist/src/features/simulation/activity/normalize.js +36 -38
  256. package/dist/src/features/simulation/activity/schema.cjs +1 -1
  257. package/dist/src/features/simulation/activity/schema.js +224 -250
  258. package/dist/src/features/simulation/activity/utils/createNativeActivity.cjs +1 -1
  259. package/dist/src/features/simulation/activity/utils/createNativeActivity.js +23 -27
  260. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.cjs +1 -1
  261. package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.js +14 -21
  262. package/dist/src/features/simulation/activity/utils/getOverallLastModified.cjs +1 -1
  263. package/dist/src/features/simulation/activity/utils/getOverallLastModified.js +5 -5
  264. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.cjs +1 -1
  265. package/dist/src/features/simulation/activity/utils/hasDelegationActivity.js +4 -4
  266. package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.cjs +1 -1
  267. package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.js +15 -19
  268. package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.cjs +1 -1
  269. package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.js +15 -19
  270. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs +1 -1
  271. package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js +5 -5
  272. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.cjs +1 -1
  273. package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.js +19 -21
  274. package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.cjs +1 -1
  275. package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.js +15 -19
  276. package/dist/src/features/simulation/activity/utils/isSwapActivity.cjs +1 -1
  277. package/dist/src/features/simulation/activity/utils/isSwapActivity.js +17 -18
  278. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -1
  279. package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +15 -19
  280. package/dist/src/features/simulation/activity/utils/parseAccountActivities.cjs +1 -1
  281. package/dist/src/features/simulation/activity/utils/parseAccountActivities.js +12 -12
  282. package/dist/src/features/simulation/activity/utils/parseFinanceActivities.cjs +1 -1
  283. package/dist/src/features/simulation/activity/utils/parseFinanceActivities.js +32 -32
  284. package/dist/src/features/simulation/fees/schema.cjs +1 -1
  285. package/dist/src/features/simulation/fees/schema.js +33 -47
  286. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -1
  287. package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +15 -17
  288. package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.cjs +1 -1
  289. package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.js +5 -5
  290. package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
  291. package/dist/src/features/simulation/transactionReview/schema.js +221 -242
  292. package/dist/src/features/simulation/warning/helper.cjs +1 -1
  293. package/dist/src/features/simulation/warning/helper.js +12 -11
  294. package/dist/src/features/simulation/warning/schema.cjs +1 -1
  295. package/dist/src/features/simulation/warning/schema.js +10 -11
  296. package/dist/src/features/swap/models/order.model.cjs +1 -1
  297. package/dist/src/features/swap/models/order.model.js +16 -19
  298. package/dist/src/features/swap/models/quote.model.cjs +1 -1
  299. package/dist/src/features/swap/models/quote.model.js +31 -35
  300. package/dist/src/features/swap/models/trade.model.cjs +1 -1
  301. package/dist/src/features/swap/models/trade.model.js +25 -27
  302. package/dist/src/features/swap/services/SwapSharedService.cjs +1 -1
  303. package/dist/src/features/swap/services/SwapSharedService.js +71 -75
  304. package/dist/src/features/swap/services/SwapTransactionService.cjs +1 -1
  305. package/dist/src/features/swap/services/SwapTransactionService.js +57 -63
  306. package/dist/src/features/swap/utils/slippage.cjs +1 -1
  307. package/dist/src/features/swap/utils/slippage.js +18 -25
  308. package/dist/src/features/swap/utils/totalFee.cjs +1 -1
  309. package/dist/src/features/swap/utils/totalFee.js +12 -12
  310. package/dist/src/http/DateService.cjs +1 -1
  311. package/dist/src/http/DateService.js +15 -18
  312. package/dist/src/http/HttpError.cjs +1 -1
  313. package/dist/src/http/HttpError.js +7 -7
  314. package/dist/src/http/HttpService.cjs +1 -1
  315. package/dist/src/http/HttpService.js +117 -134
  316. package/dist/src/http/IHttpService.cjs +1 -1
  317. package/dist/src/http/IHttpService.js +6 -6
  318. package/dist/src/http/SWRService.cjs +1 -1
  319. package/dist/src/http/SWRService.js +50 -57
  320. package/dist/src/http/fetcher.cjs +1 -1
  321. package/dist/src/http/fetcher.js +29 -35
  322. package/dist/src/http/time.cjs +1 -1
  323. package/dist/src/http/time.js +15 -18
  324. package/dist/src/knownDapps/KnownDappsBackendService.cjs +1 -1
  325. package/dist/src/knownDapps/KnownDappsBackendService.js +13 -14
  326. package/dist/src/knownDapps/schema.cjs +1 -1
  327. package/dist/src/knownDapps/schema.js +41 -44
  328. package/dist/src/knownDapps/utils/getDapplandUrl.cjs +1 -1
  329. package/dist/src/knownDapps/utils/getDapplandUrl.js +7 -8
  330. package/dist/src/nameResolution/ResolveNameService.cjs +1 -1
  331. package/dist/src/nameResolution/ResolveNameService.js +34 -41
  332. package/dist/src/nameResolution/schema.cjs +1 -1
  333. package/dist/src/nameResolution/schema.js +20 -25
  334. package/dist/src/nfts/BackendNftService.cjs +1 -1
  335. package/dist/src/nfts/BackendNftService.js +103 -116
  336. package/dist/src/nfts/BackendPaginationError.cjs +1 -1
  337. package/dist/src/nfts/BackendPaginationError.js +11 -12
  338. package/dist/src/nfts/utils.cjs +1 -1
  339. package/dist/src/nfts/utils.js +11 -14
  340. package/dist/src/onchainRecovery/OnchainRecoveryService.cjs +1 -1
  341. package/dist/src/onchainRecovery/OnchainRecoveryService.js +38 -68
  342. package/dist/src/onchainRecovery/schema.cjs +1 -1
  343. package/dist/src/onchainRecovery/schema.js +35 -49
  344. package/dist/src/platform/isBraveBrowser.cjs +1 -1
  345. package/dist/src/platform/isBraveBrowser.js +8 -10
  346. package/dist/src/platform/isBrowser.cjs +1 -1
  347. package/dist/src/platform/isBrowser.js +17 -22
  348. package/dist/src/signer/mergeOwnerGuardianSignatures.cjs +1 -1
  349. package/dist/src/signer/mergeOwnerGuardianSignatures.js +28 -30
  350. package/dist/src/signer/multisigner.cjs +1 -1
  351. package/dist/src/signer/multisigner.js +16 -17
  352. package/dist/src/signer/seedphrase.cjs +1 -1
  353. package/dist/src/signer/seedphrase.js +7 -7
  354. package/dist/src/staking/schema.cjs +1 -1
  355. package/dist/src/staking/schema.js +146 -162
  356. package/dist/src/storage/base.cjs +1 -1
  357. package/dist/src/storage/base.js +33 -34
  358. package/dist/src/storage/utils.cjs +1 -1
  359. package/dist/src/storage/utils.js +19 -28
  360. package/dist/src/tokens/balances.cjs +1 -1
  361. package/dist/src/tokens/balances.js +34 -38
  362. package/dist/src/tokens/constants.cjs +1 -1
  363. package/dist/src/tokens/constants.js +4 -4
  364. package/dist/src/tokens/convertCurrencyValueToTokenAmount.cjs +1 -1
  365. package/dist/src/tokens/convertCurrencyValueToTokenAmount.js +8 -9
  366. package/dist/src/tokens/convertTokenAmountToCurrencyValue.cjs +1 -1
  367. package/dist/src/tokens/convertTokenAmountToCurrencyValue.js +14 -15
  368. package/dist/src/tokens/convertTokenUnitAmountWithDecimals.cjs +1 -1
  369. package/dist/src/tokens/convertTokenUnitAmountWithDecimals.js +8 -9
  370. package/dist/src/tokens/ensureDecimals.cjs +1 -1
  371. package/dist/src/tokens/ensureDecimals.js +4 -4
  372. package/dist/src/tokens/getCurrencySymbol.cjs +1 -1
  373. package/dist/src/tokens/getCurrencySymbol.js +14 -14
  374. package/dist/src/tokens/isUnlimitedAmount.cjs +1 -1
  375. package/dist/src/tokens/isUnlimitedAmount.js +5 -5
  376. package/dist/src/tokens/prettifyCurrencyValue.cjs +1 -1
  377. package/dist/src/tokens/prettifyCurrencyValue.js +13 -14
  378. package/dist/src/tokens/prettifyTokenAmount.cjs +1 -1
  379. package/dist/src/tokens/prettifyTokenAmount.js +22 -22
  380. package/dist/src/tokens/service/implementation.cjs +1 -1
  381. package/dist/src/tokens/service/implementation.js +28 -40
  382. package/dist/src/tokens/service/tokenError.cjs +1 -1
  383. package/dist/src/tokens/service/tokenError.js +11 -12
  384. package/dist/src/tokens/service/types/backend.model.cjs +1 -1
  385. package/dist/src/tokens/service/types/backend.model.js +128 -163
  386. package/dist/src/tokens/service/types/defiPosition.model.cjs +1 -1
  387. package/dist/src/tokens/service/types/defiPosition.model.js +83 -99
  388. package/dist/src/tokens/service/types/defiPositionType.model.cjs +1 -1
  389. package/dist/src/tokens/service/types/defiPositionType.model.js +9 -9
  390. package/dist/src/tokens/service/types/unclaimedRewards.model.cjs +1 -1
  391. package/dist/src/tokens/service/types/unclaimedRewards.model.js +15 -16
  392. package/dist/src/tokens/service/types/webToken.model.cjs +1 -1
  393. package/dist/src/tokens/service/types/webToken.model.js +28 -51
  394. package/dist/src/tokens/utils.cjs +1 -1
  395. package/dist/src/tokens/utils.js +5 -9
  396. package/dist/src/transactions/amount.cjs +1 -1
  397. package/dist/src/transactions/amount.js +17 -24
  398. package/dist/src/transactions/buildTransactions.cjs +1 -1
  399. package/dist/src/transactions/buildTransactions.js +30 -33
  400. package/dist/src/transactions/errors.cjs +1 -1
  401. package/dist/src/transactions/errors.js +11 -18
  402. package/dist/src/transactions/estimate/adjustment.cjs +1 -1
  403. package/dist/src/transactions/estimate/adjustment.js +6 -6
  404. package/dist/src/transactions/estimate/argentMaxFee.cjs +1 -1
  405. package/dist/src/transactions/estimate/argentMaxFee.js +10 -13
  406. package/dist/src/transactions/estimate/error.cjs +1 -1
  407. package/dist/src/transactions/estimate/error.js +12 -13
  408. package/dist/src/transactions/estimate/model.cjs +1 -1
  409. package/dist/src/transactions/estimate/model.js +18 -13
  410. package/dist/src/transactions/estimate/utils.cjs +1 -1
  411. package/dist/src/transactions/estimate/utils.js +139 -172
  412. package/dist/src/transactions/findTransfersAndApprovals.cjs +1 -1
  413. package/dist/src/transactions/findTransfersAndApprovals.js +34 -30
  414. package/dist/src/transactions/getPrettyRcpError.cjs +1 -1
  415. package/dist/src/transactions/getPrettyRcpError.js +8 -10
  416. package/dist/src/transactions/service/implementation.cjs +1 -1
  417. package/dist/src/transactions/service/implementation.js +187 -208
  418. package/dist/src/transactions/service/types.cjs +1 -1
  419. package/dist/src/transactions/service/types.js +9 -9
  420. package/dist/src/transactions/service/utils.cjs +1 -1
  421. package/dist/src/transactions/service/utils.js +24 -25
  422. package/dist/src/transactions/transactionExecuteTypes.cjs +1 -1
  423. package/dist/src/transactions/transactionExecuteTypes.js +8 -9
  424. package/dist/src/transactions/transactionReviewTypes.cjs +1 -1
  425. package/dist/src/transactions/transactionReviewTypes.js +9 -9
  426. package/dist/src/transactions/transactionVersion.cjs +1 -1
  427. package/dist/src/transactions/transactionVersion.js +8 -13
  428. package/dist/src/transactions/txv3.cjs +1 -1
  429. package/dist/src/transactions/txv3.js +10 -11
  430. package/dist/src/utils/address.cjs +1 -1
  431. package/dist/src/utils/address.js +4 -4
  432. package/dist/src/utils/arrays.cjs +1 -1
  433. package/dist/src/utils/arrays.js +4 -4
  434. package/dist/src/utils/avatarImage.cjs +4 -4
  435. package/dist/src/utils/avatarImage.js +35 -40
  436. package/dist/src/utils/base58.cjs +1 -1
  437. package/dist/src/utils/base58.js +12 -15
  438. package/dist/src/utils/bigNumber.cjs +1 -1
  439. package/dist/src/utils/bigNumber.d.ts +1 -1
  440. package/dist/src/utils/bigNumber.js +5 -7
  441. package/dist/src/utils/bips.cjs +1 -1
  442. package/dist/src/utils/bips.js +12 -10
  443. package/dist/src/utils/daysBetween.cjs +1 -1
  444. package/dist/src/utils/daysBetween.js +6 -6
  445. package/dist/src/utils/env.cjs +1 -1
  446. package/dist/src/utils/env.js +4 -4
  447. package/dist/src/utils/hex.cjs +1 -1
  448. package/dist/src/utils/hex.js +7 -8
  449. package/dist/src/utils/id.cjs +1 -1
  450. package/dist/src/utils/id.js +7 -7
  451. package/dist/src/utils/initials.cjs +1 -1
  452. package/dist/src/utils/initials.js +12 -15
  453. package/dist/src/utils/isContractDeployed.cjs +1 -1
  454. package/dist/src/utils/isContractDeployed.js +9 -9
  455. package/dist/src/utils/nonNullable.cjs +1 -1
  456. package/dist/src/utils/nonNullable.js +6 -6
  457. package/dist/src/utils/number/abbreviateNumber.cjs +1 -1
  458. package/dist/src/utils/number/abbreviateNumber.js +13 -14
  459. package/dist/src/utils/number/isAllowedAddressHexInputValue.cjs +1 -1
  460. package/dist/src/utils/number/isAllowedAddressHexInputValue.js +4 -7
  461. package/dist/src/utils/number/isAllowedNumericInputValue.cjs +1 -1
  462. package/dist/src/utils/number/isAllowedNumericInputValue.js +5 -5
  463. package/dist/src/utils/number/isNumeric.cjs +1 -1
  464. package/dist/src/utils/number/isNumeric.js +4 -4
  465. package/dist/src/utils/number/prettifyNumber.cjs +1 -1
  466. package/dist/src/utils/number/prettifyNumber.js +65 -75
  467. package/dist/src/utils/parseAmount.cjs +1 -1
  468. package/dist/src/utils/parseAmount.js +10 -11
  469. package/dist/src/utils/pluralise.cjs +1 -1
  470. package/dist/src/utils/pluralise.js +4 -4
  471. package/dist/src/utils/readFileAsString.cjs +1 -1
  472. package/dist/src/utils/readFileAsString.js +6 -6
  473. package/dist/src/utils/retryUntilInitialised.cjs +1 -1
  474. package/dist/src/utils/retryUntilInitialised.js +21 -20
  475. package/dist/src/utils/schemas.cjs +1 -1
  476. package/dist/src/utils/schemas.js +29 -26
  477. package/dist/src/utils/starknet/starknet.cjs +1 -1
  478. package/dist/src/utils/starknet/starknet.js +64 -77
  479. package/dist/src/utils/starknet/starknetLibTypes.cjs +1 -1
  480. package/dist/src/utils/starknet/starknetLibTypes.js +7 -7
  481. package/dist/src/utils/starknet/starknetSchemas.cjs +1 -1
  482. package/dist/src/utils/starknet/starknetSchemas.js +84 -99
  483. package/dist/src/utils/transactions.cjs +1 -1
  484. package/dist/src/utils/transactions.js +10 -10
  485. package/dist/src/utils/url/urlWithQuery.cjs +1 -1
  486. package/dist/src/utils/url/urlWithQuery.js +8 -8
  487. package/dist/src/utils/voidify.cjs +1 -1
  488. package/dist/src/utils/voidify.js +7 -7
  489. package/dist/swap.cjs +1 -1
  490. package/dist/swap.js +8 -22
  491. package/package.json +20 -19
  492. package/dist/.eslintrc.d.cts +0 -39
  493. package/dist/_virtual/_commonjsHelpers.cjs +0 -1
  494. package/dist/_virtual/_commonjsHelpers.js +0 -6
  495. package/dist/_virtual/numeral.cjs +0 -1
  496. package/dist/_virtual/numeral.js +0 -7
  497. package/dist/_virtual/numeral2.cjs +0 -1
  498. package/dist/_virtual/numeral2.js +0 -4
  499. package/dist/_virtual/semver.cjs +0 -1
  500. package/dist/_virtual/semver.js +0 -7
  501. package/dist/_virtual/semver2.cjs +0 -1
  502. package/dist/_virtual/semver2.js +0 -4
@@ -1,44 +1,41 @@
1
- import { z as o } from "zod";
2
- import { addressSchemaArgentBackend as a } from "../chains/starknet/address.js";
3
- const t = o.object({
4
- name: o.enum([
5
- "dappland",
6
- "discord",
7
- "github",
8
- "telegram",
9
- "twitter",
10
- "website"
11
- ]),
12
- url: o.string(),
13
- position: o.number()
14
- }), n = o.object({
15
- address: a,
16
- chain: o.enum(["ethereum", "starknet"])
17
- }), e = o.object({
18
- maxExpiryDays: o.number().positive(),
19
- allowList: o.array(o.object({
20
- contractAddress: a,
21
- methods: o.array(o.string())
22
- }))
23
- }), r = o.object({
24
- dappId: o.string(),
25
- name: o.string(),
26
- description: o.string().optional(),
27
- logoUrl: o.string().optional(),
28
- dappUrl: o.string().optional(),
29
- inAppBrowserCompatible: o.boolean(),
30
- argentVerified: o.boolean(),
31
- links: o.array(t).optional(),
32
- contracts: o.array(n).optional(),
33
- categories: o.array(o.string()).optional(),
34
- supportedApps: o.array(o.string()).optional(),
35
- brandColor: o.string().optional(),
36
- executeFromOutsideAllowed: o.boolean().default(!1).optional(),
37
- sessionConfig: o.union([e, o.object({})]).nullable().optional()
38
- }), p = o.array(r);
39
- export {
40
- n as dappContractSchema,
41
- t as dappLinkSchema,
42
- r as knownDappSchema,
43
- p as knownDappsSchema
44
- };
1
+ import { addressSchemaArgentBackend as e } from "../chains/starknet/address.js";
2
+ import { z as t } from "zod";
3
+ //#region src/knownDapps/schema.ts
4
+ var n = t.object({
5
+ name: t.enum([
6
+ "dappland",
7
+ "discord",
8
+ "github",
9
+ "telegram",
10
+ "twitter",
11
+ "website"
12
+ ]),
13
+ url: t.string(),
14
+ position: t.number()
15
+ }), r = t.object({
16
+ address: e,
17
+ chain: t.enum(["ethereum", "starknet"])
18
+ }), i = t.object({
19
+ maxExpiryDays: t.number().positive(),
20
+ allowList: t.array(t.object({
21
+ contractAddress: e,
22
+ methods: t.array(t.string())
23
+ }))
24
+ }), a = t.object({
25
+ dappId: t.string(),
26
+ name: t.string(),
27
+ description: t.string().optional(),
28
+ logoUrl: t.string().optional(),
29
+ dappUrl: t.string().optional(),
30
+ inAppBrowserCompatible: t.boolean(),
31
+ argentVerified: t.boolean(),
32
+ links: t.array(n).optional(),
33
+ contracts: t.array(r).optional(),
34
+ categories: t.array(t.string()).optional(),
35
+ supportedApps: t.array(t.string()).optional(),
36
+ brandColor: t.string().optional(),
37
+ executeFromOutsideAllowed: t.boolean().default(!1).optional(),
38
+ sessionConfig: t.union([i, t.object({})]).nullable().optional()
39
+ }), o = t.array(a);
40
+ //#endregion
41
+ export { r as dappContractSchema, n as dappLinkSchema, a as knownDappSchema, o as knownDappsSchema };
@@ -1 +1 @@
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
+ function e(e){return e?.links?.find(e=>e.name===`dappland`)}function t(t){return e(t)?.url}exports.getDapplandLinkForDapp=e,exports.getDapplandUrlForDapp=t;
@@ -1,10 +1,9 @@
1
- function a(n) {
2
- return n?.links?.find((p) => p.name === "dappland");
1
+ //#region src/knownDapps/utils/getDapplandUrl.ts
2
+ function e(e) {
3
+ return e?.links?.find((e) => e.name === "dappland");
3
4
  }
4
- function r(n) {
5
- return a(n)?.url;
5
+ function t(t) {
6
+ return e(t)?.url;
6
7
  }
7
- export {
8
- a as getDapplandLinkForDapp,
9
- r as getDapplandUrlForDapp
10
- };
8
+ //#endregion
9
+ export { e as getDapplandLinkForDapp, t as getDapplandUrlForDapp };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("url-join"),c=require("./schema.cjs"),u=require("../http/HttpService.cjs");class h{constructor(s,r){this.apiBase=s,this.headers=r,this.httpService=new u.HTTPService(this.headers,"json")}async getAddressFromMultipleStarknetId(s,r,t){const e=new URLSearchParams(r.map(d=>["domain",d]));t&&e.set("includeAvatar","true");const n=o(this.apiBase,s,"starknet.id",`?${e}`),a=await this.httpService.get(n),i=c.nameResolutionStarknetIdsSchema.safeParse(a);if(!i.success)throw new Error("Failed to parse name resolution");return i.data}async getAddressFromStarknetId(s,r,t){const e=o(this.apiBase,s,"starknet.id",r,t?"?includeAvatar=true":""),n=await this.httpService.get(e),a=c.nameResolutionStarknetIdSchema.safeParse(n);if(!a.success)throw new Error("Failed to parse name resolution");return a.data}async getStarknetIdFromAddress(s,r,t){const e=new URLSearchParams(r.map(d=>["address",d]));t&&e.set("includeAvatar","true");const n=o(this.apiBase,s,"addresses",`?${e}`),a=await this.httpService.get(n),i=c.nameResolutionAddressesSchema.safeParse(a);if(!i.success)throw new Error("Failed to parse name resolution");return i.data}async getProvidersNames(s){const r=o(this.apiBase,s,"providers","name"),t=await this.httpService.get(r),e=c.providersNamesSchema.safeParse(t);if(!e.success)throw new Error("Failed to parse name resolution");return e.data}}exports.ResolveNameService=h;
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../http/HttpService.cjs`),n=require(`./schema.cjs`);let r=require(`url-join`);r=e.__toESM(r);var i=class{constructor(e,n){this.apiBase=e,this.headers=n,this.httpService=new t.HTTPService(this.headers,`json`)}async getAddressFromMultipleStarknetId(e,t,i){let a=new URLSearchParams(t.map(e=>[`domain`,e]));i&&a.set(`includeAvatar`,`true`);let o=(0,r.default)(this.apiBase,e,`starknet.id`,`?${a}`),s=await this.httpService.get(o),c=n.nameResolutionStarknetIdsSchema.safeParse(s);if(!c.success)throw Error(`Failed to parse name resolution`);return c.data}async getAddressFromStarknetId(e,t,i){let a=(0,r.default)(this.apiBase,e,`starknet.id`,t,i?`?includeAvatar=true`:``),o=await this.httpService.get(a),s=n.nameResolutionStarknetIdSchema.safeParse(o);if(!s.success)throw Error(`Failed to parse name resolution`);return s.data}async getStarknetIdFromAddress(e,t,i){let a=new URLSearchParams(t.map(e=>[`address`,e]));i&&a.set(`includeAvatar`,`true`);let o=(0,r.default)(this.apiBase,e,`addresses`,`?${a}`),s=await this.httpService.get(o),c=n.nameResolutionAddressesSchema.safeParse(s);if(!c.success)throw Error(`Failed to parse name resolution`);return c.data}async getProvidersNames(e){let t=(0,r.default)(this.apiBase,e,`providers`,`name`),i=await this.httpService.get(t),a=n.providersNamesSchema.safeParse(i);if(!a.success)throw Error(`Failed to parse name resolution`);return a.data}};exports.ResolveNameService=i;
@@ -1,42 +1,35 @@
1
- import i from "url-join";
2
- import { nameResolutionStarknetIdsSchema as d, nameResolutionStarknetIdSchema as h, nameResolutionAddressesSchema as m, providersNamesSchema as p } from "./schema.js";
3
- import { HTTPService as u } from "../http/HttpService.js";
4
- class f {
5
- constructor(s, r) {
6
- this.apiBase = s, this.headers = r, this.httpService = new u(this.headers, "json");
7
- }
8
- async getAddressFromMultipleStarknetId(s, r, t) {
9
- const e = new URLSearchParams(r.map((c) => ["domain", c]));
10
- t && e.set("includeAvatar", "true");
11
- const o = i(this.apiBase, s, "starknet.id", `?${e}`), a = await this.httpService.get(o), n = d.safeParse(a);
12
- if (!n.success)
13
- throw new Error("Failed to parse name resolution");
14
- return n.data;
15
- }
16
- async getAddressFromStarknetId(s, r, t) {
17
- const e = i(this.apiBase, s, "starknet.id", r, t ? "?includeAvatar=true" : ""), o = await this.httpService.get(e), a = h.safeParse(o);
18
- if (!a.success)
19
- throw new Error("Failed to parse name resolution");
20
- return a.data;
21
- }
22
- /**
23
- * getAddressFromStarknetId: retrieve address from starknetId
24
- */
25
- async getStarknetIdFromAddress(s, r, t) {
26
- const e = new URLSearchParams(r.map((c) => ["address", c]));
27
- t && e.set("includeAvatar", "true");
28
- const o = i(this.apiBase, s, "addresses", `?${e}`), a = await this.httpService.get(o), n = m.safeParse(a);
29
- if (!n.success)
30
- throw new Error("Failed to parse name resolution");
31
- return n.data;
32
- }
33
- async getProvidersNames(s) {
34
- const r = i(this.apiBase, s, "providers", "name"), t = await this.httpService.get(r), e = p.safeParse(t);
35
- if (!e.success)
36
- throw new Error("Failed to parse name resolution");
37
- return e.data;
38
- }
39
- }
40
- export {
41
- f as ResolveNameService
1
+ import { HTTPService as e } from "../http/HttpService.js";
2
+ import { nameResolutionAddressesSchema as t, nameResolutionStarknetIdSchema as n, nameResolutionStarknetIdsSchema as r, providersNamesSchema as i } from "./schema.js";
3
+ import a from "url-join";
4
+ //#region src/nameResolution/ResolveNameService.ts
5
+ var o = class {
6
+ constructor(t, n) {
7
+ this.apiBase = t, this.headers = n, this.httpService = new e(this.headers, "json");
8
+ }
9
+ async getAddressFromMultipleStarknetId(e, t, n) {
10
+ let i = new URLSearchParams(t.map((e) => ["domain", e]));
11
+ n && i.set("includeAvatar", "true");
12
+ let o = a(this.apiBase, e, "starknet.id", `?${i}`), s = await this.httpService.get(o), c = r.safeParse(s);
13
+ if (!c.success) throw Error("Failed to parse name resolution");
14
+ return c.data;
15
+ }
16
+ async getAddressFromStarknetId(e, t, r) {
17
+ let i = a(this.apiBase, e, "starknet.id", t, r ? "?includeAvatar=true" : ""), o = await this.httpService.get(i), s = n.safeParse(o);
18
+ if (!s.success) throw Error("Failed to parse name resolution");
19
+ return s.data;
20
+ }
21
+ async getStarknetIdFromAddress(e, n, r) {
22
+ let i = new URLSearchParams(n.map((e) => ["address", e]));
23
+ r && i.set("includeAvatar", "true");
24
+ let o = a(this.apiBase, e, "addresses", `?${i}`), s = await this.httpService.get(o), c = t.safeParse(s);
25
+ if (!c.success) throw Error("Failed to parse name resolution");
26
+ return c.data;
27
+ }
28
+ async getProvidersNames(e) {
29
+ let t = a(this.apiBase, e, "providers", "name"), n = await this.httpService.get(t), r = i.safeParse(n);
30
+ if (!r.success) throw Error("Failed to parse name resolution");
31
+ return r.data;
32
+ }
42
33
  };
34
+ //#endregion
35
+ export { o as ResolveNameService };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),a=require("../chains/starknet/address.cjs"),o=require("../chains/starknet/starknetId.cjs"),s=e.object({domain:o.starknetIdSchema,address:a.addressSchema.optional(),avatar:e.string().optional(),status:e.union([e.literal("KNOWN"),e.literal("UNKNOWN")])}),n=e.array(s),t=e.object({provider:e.string(),name:e.string(),avatar:e.string().optional()}),r=e.object({address:a.addressSchema,status:e.union([e.literal("KNOWN"),e.literal("UNKNOWN")]),resolutions:e.array(t).optional()}),i=e.array(e.string()),d=r.array();exports.nameProviderResolutionSchema=t;exports.nameResolutionAddressSchema=r;exports.nameResolutionAddressesSchema=d;exports.nameResolutionStarknetIdSchema=s;exports.nameResolutionStarknetIdsSchema=n;exports.providersNamesSchema=i;
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../chains/starknet/address.cjs`),n=require(`../chains/starknet/starknetId.cjs`);let r=require(`zod`);r=e.__toESM(r);var i=r.default.object({domain:n.starknetIdSchema,address:t.addressSchema.optional(),avatar:r.default.string().optional(),status:r.default.union([r.default.literal(`KNOWN`),r.default.literal(`UNKNOWN`)])}),a=r.default.array(i),o=r.default.object({provider:r.default.string(),name:r.default.string(),avatar:r.default.string().optional()}),s=r.default.object({address:t.addressSchema,status:r.default.union([r.default.literal(`KNOWN`),r.default.literal(`UNKNOWN`)]),resolutions:r.default.array(o).optional()}),c=r.default.array(r.default.string()),l=s.array();exports.nameProviderResolutionSchema=o,exports.nameResolutionAddressSchema=s,exports.nameResolutionAddressesSchema=l,exports.nameResolutionStarknetIdSchema=i,exports.nameResolutionStarknetIdsSchema=a,exports.providersNamesSchema=c;
@@ -1,25 +1,20 @@
1
- import a from "zod";
2
- import { addressSchema as t } from "../chains/starknet/address.js";
3
- import { starknetIdSchema as o } from "../chains/starknet/starknetId.js";
4
- const e = a.object({
5
- domain: o,
6
- address: t.optional(),
7
- avatar: a.string().optional(),
8
- status: a.union([a.literal("KNOWN"), a.literal("UNKNOWN")])
9
- }), l = a.array(e), r = a.object({
10
- provider: a.string(),
11
- name: a.string(),
12
- avatar: a.string().optional()
13
- }), s = a.object({
14
- address: t,
15
- status: a.union([a.literal("KNOWN"), a.literal("UNKNOWN")]),
16
- resolutions: a.array(r).optional()
17
- }), c = a.array(a.string()), d = s.array();
18
- export {
19
- r as nameProviderResolutionSchema,
20
- s as nameResolutionAddressSchema,
21
- d as nameResolutionAddressesSchema,
22
- e as nameResolutionStarknetIdSchema,
23
- l as nameResolutionStarknetIdsSchema,
24
- c as providersNamesSchema
25
- };
1
+ import { addressSchema as e } from "../chains/starknet/address.js";
2
+ import { starknetIdSchema as t } from "../chains/starknet/starknetId.js";
3
+ import n from "zod";
4
+ //#region src/nameResolution/schema.ts
5
+ var r = n.object({
6
+ domain: t,
7
+ address: e.optional(),
8
+ avatar: n.string().optional(),
9
+ status: n.union([n.literal("KNOWN"), n.literal("UNKNOWN")])
10
+ }), i = n.array(r), a = n.object({
11
+ provider: n.string(),
12
+ name: n.string(),
13
+ avatar: n.string().optional()
14
+ }), o = n.object({
15
+ address: e,
16
+ status: n.union([n.literal("KNOWN"), n.literal("UNKNOWN")]),
17
+ resolutions: n.array(a).optional()
18
+ }), s = n.array(n.string()), c = o.array();
19
+ //#endregion
20
+ export { a as nameProviderResolutionSchema, o as nameResolutionAddressSchema, c as nameResolutionAddressesSchema, r as nameResolutionStarknetIdSchema, i as nameResolutionStarknetIdsSchema, s as providersNamesSchema };
@@ -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,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;
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../chains/starknet/address.cjs`),n=require(`../utils/address.cjs`),r=require(`./BackendPaginationError.cjs`);let i=require(`url-join`);i=e.__toESM(i);var a=32,o=class{constructor(e,t){this.apiBase=e,this.httpService=t}async getNfts(e,t,n,r=1){let o=this.normalizeAddress(n),s=(0,i.default)(this.apiBase,`pandora`,e,t),c=this.pageToPageIndex(r),l=`${(0,i.default)(s,`profile`,o,`nfts`)}?page=${c}&size=${a}`,u=await this.httpService.get(l),d=u.content.map(e=>this.mapItem(e,n));return{totalPages:u.totalPages,page:u.number+1,count:d.length,nfts:d}}async getCollection(e,t,n){let r=this.normalizeAddress(n),a=(0,i.default)(this.apiBase,`pandora`,e,t),o=(0,i.default)(a,`collection`,r),s=`${a}/collection/${r}`,[l,u]=await Promise.all([this.httpService.get(o),this.httpService.get(s)]),d=c(l),f=u.content.map(e=>this.mapItem(e));return{...d,nfts:{totalPages:u.totalPages,page:u.number,count:f.length,data:f}}}async getNft(e,t,n,r){let a=this.normalizeAddress(n),o=(0,i.default)((0,i.default)(this.apiBase,`pandora`,e,t),`nft`,a,r),s=await this.httpService.get(o);return this.mapItem(s)}async getProfileCollections(e,t,n,r=1,o=!1){let s=this.pageToPageIndex(r),l=this.normalizeAddress(n),u=(0,i.default)((0,i.default)(this.apiBase,`pandora`,e,t),`profile`,l,`collections`,`?page=${s}&size=${a}`),d=await this.httpService.get(u),f=[];for(let n of d.content)if(o){let r=await this.getCollectionMetrics(e,t,n.contractAddress);f.push(c(n,r))}else f.push(c(n));return{totalPages:d.totalPages,page:d.number+1,count:f.length,collections:f}}async getCollectionMetrics(e,t,n){let r=this.normalizeAddress(n),a=(0,i.default)((0,i.default)(this.apiBase,`pandora`,e,t),`collection`,r,`metrics`);return this.httpService.get(a)}normalizeAddress(e){return t.addressSchemaArgentBackend.parse(e)}pageToPageIndex(e){if(!Number.isInteger(e))throw new r.BackendPaginationError(`notANumber`);let t=e-1;if(t<0)throw new r.BackendPaginationError(`tooLow`);return t}mapItem(e,t){let r=e.name??e.tokenId;return{token_id:e.tokenId,contract_address:e.contractAddress,name:r,spec:`spec`in e?s(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(e=>({key:e.key,value:e.value}))||[],image_uri:e.imageUrls.preview,image_url_copy:e.imageUrls.full,owner:{account_address:e.owner?.address||t},contract_name:n.formatAddress(e.contractAddress)}}};function s(e){switch(e){case`erc721`:case`starknetErc721`:return`ERC721`;case`erc1155`:case`starknetErc1155`:return`ERC1155`}}function c(e,r){return{contractAddress:t.addressSchema.parse(e.contractAddress),name:e.name||n.formatAddress(e.contractAddress),description:e.description??``,imageUri:e.imageUrls.preview,...r&&{owners:{total:r.numberOfItems,unique:r.uniqueOwners},...r.floorPrice&&{floorPrice:BigInt(r.floorPrice)}}}}exports.BackendNftService=o;
@@ -1,118 +1,105 @@
1
- import n from "url-join";
2
- import { BackendPaginationError as f } from "./BackendPaginationError.js";
3
- import { formatAddress as b } from "../utils/address.js";
4
- import { addressSchemaArgentBackend as P, addressSchema as S } from "../chains/starknet/address.js";
5
- const A = 32;
6
- class k {
7
- constructor(e, t) {
8
- this.apiBase = e, this.httpService = t;
9
- }
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
- return {
13
- totalPages: i.totalPages,
14
- page: i.number + 1,
15
- count: r.length,
16
- nfts: r
17
- };
18
- }
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
- this.httpService.get(c),
22
- this.httpService.get(m)
23
- ]), i = h(g), r = l.content.map((p) => this.mapItem(p));
24
- return {
25
- ...i,
26
- nfts: {
27
- totalPages: l.totalPages,
28
- page: l.number,
29
- count: r.length,
30
- data: r
31
- }
32
- };
33
- }
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
- return this.mapItem(g);
37
- }
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
- for (const p of i.content)
41
- if (a) {
42
- const u = await this.getCollectionMetrics(e, t, p.contractAddress);
43
- r.push(h(p, u));
44
- } else
45
- r.push(h(p));
46
- return {
47
- totalPages: i.totalPages,
48
- page: i.number + 1,
49
- count: r.length,
50
- collections: r
51
- };
52
- }
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
- return this.httpService.get(c);
56
- }
57
- normalizeAddress(e) {
58
- return P.parse(e);
59
- }
60
- pageToPageIndex(e) {
61
- if (!Number.isInteger(e))
62
- throw new f("notANumber");
63
- const t = e - 1;
64
- if (t < 0)
65
- throw new f("tooLow");
66
- return t;
67
- }
68
- mapItem(e, t) {
69
- const o = e.name ?? e.tokenId;
70
- return {
71
- token_id: e.tokenId,
72
- contract_address: e.contractAddress,
73
- name: o,
74
- spec: "spec" in e ? w(e.spec) : void 0,
75
- description: "",
76
- best_bid_order: {
77
- payment_amount: "bestListPrice" in e ? BigInt(e.bestListPrice) : void 0
78
- },
79
- properties: "properties" in e && e.properties.map((s) => ({ key: s.key, value: s.value })) || [],
80
- image_uri: e.imageUrls.preview,
81
- image_url_copy: e.imageUrls.full,
82
- owner: {
83
- account_address: e.owner?.address || t
84
- },
85
- contract_name: b(e.contractAddress)
86
- };
87
- }
88
- }
89
- function w(d) {
90
- switch (d) {
91
- case "erc721":
92
- case "starknetErc721":
93
- return "ERC721";
94
- case "erc1155":
95
- case "starknetErc1155":
96
- return "ERC1155";
97
- }
1
+ import { addressSchema as e, addressSchemaArgentBackend as t } from "../chains/starknet/address.js";
2
+ import { formatAddress as n } from "../utils/address.js";
3
+ import { BackendPaginationError as r } from "./BackendPaginationError.js";
4
+ import i from "url-join";
5
+ //#region src/nfts/BackendNftService.ts
6
+ var a = 32, o = class {
7
+ constructor(e, t) {
8
+ this.apiBase = e, this.httpService = t;
9
+ }
10
+ async getNfts(e, t, n, r = 1) {
11
+ let o = this.normalizeAddress(n), s = i(this.apiBase, "pandora", e, t), c = this.pageToPageIndex(r), l = `${i(s, "profile", o, "nfts")}?page=${c}&size=${a}`, u = await this.httpService.get(l), d = u.content.map((e) => this.mapItem(e, n));
12
+ return {
13
+ totalPages: u.totalPages,
14
+ page: u.number + 1,
15
+ count: d.length,
16
+ nfts: d
17
+ };
18
+ }
19
+ async getCollection(e, t, n) {
20
+ let r = this.normalizeAddress(n), a = i(this.apiBase, "pandora", e, t), o = i(a, "collection", r), s = `${a}/collection/${r}`, [l, u] = await Promise.all([this.httpService.get(o), this.httpService.get(s)]), d = c(l), f = u.content.map((e) => this.mapItem(e));
21
+ return {
22
+ ...d,
23
+ nfts: {
24
+ totalPages: u.totalPages,
25
+ page: u.number,
26
+ count: f.length,
27
+ data: f
28
+ }
29
+ };
30
+ }
31
+ async getNft(e, t, n, r) {
32
+ let a = this.normalizeAddress(n), o = i(i(this.apiBase, "pandora", e, t), "nft", a, r), s = await this.httpService.get(o);
33
+ return this.mapItem(s);
34
+ }
35
+ async getProfileCollections(e, t, n, r = 1, o = !1) {
36
+ let s = this.pageToPageIndex(r), l = this.normalizeAddress(n), u = i(i(this.apiBase, "pandora", e, t), "profile", l, "collections", `?page=${s}&size=${a}`), d = await this.httpService.get(u), f = [];
37
+ for (let n of d.content) if (o) {
38
+ let r = await this.getCollectionMetrics(e, t, n.contractAddress);
39
+ f.push(c(n, r));
40
+ } else f.push(c(n));
41
+ return {
42
+ totalPages: d.totalPages,
43
+ page: d.number + 1,
44
+ count: f.length,
45
+ collections: f
46
+ };
47
+ }
48
+ async getCollectionMetrics(e, t, n) {
49
+ let r = this.normalizeAddress(n), a = i(i(this.apiBase, "pandora", e, t), "collection", r, "metrics");
50
+ return this.httpService.get(a);
51
+ }
52
+ normalizeAddress(e) {
53
+ return t.parse(e);
54
+ }
55
+ pageToPageIndex(e) {
56
+ if (!Number.isInteger(e)) throw new r("notANumber");
57
+ let t = e - 1;
58
+ if (t < 0) throw new r("tooLow");
59
+ return t;
60
+ }
61
+ mapItem(e, t) {
62
+ let r = e.name ?? e.tokenId;
63
+ return {
64
+ token_id: e.tokenId,
65
+ contract_address: e.contractAddress,
66
+ name: r,
67
+ spec: "spec" in e ? s(e.spec) : void 0,
68
+ description: "",
69
+ best_bid_order: { payment_amount: "bestListPrice" in e ? BigInt(e.bestListPrice) : void 0 },
70
+ properties: "properties" in e && e.properties.map((e) => ({
71
+ key: e.key,
72
+ value: e.value
73
+ })) || [],
74
+ image_uri: e.imageUrls.preview,
75
+ image_url_copy: e.imageUrls.full,
76
+ owner: { account_address: e.owner?.address || t },
77
+ contract_name: n(e.contractAddress)
78
+ };
79
+ }
80
+ };
81
+ function s(e) {
82
+ switch (e) {
83
+ case "erc721":
84
+ case "starknetErc721": return "ERC721";
85
+ case "erc1155":
86
+ case "starknetErc1155": return "ERC1155";
87
+ }
98
88
  }
99
- function h(d, e) {
100
- return {
101
- contractAddress: S.parse(d.contractAddress),
102
- name: d.name || b(d.contractAddress),
103
- description: d.description ?? "",
104
- imageUri: d.imageUrls.preview,
105
- ...e && {
106
- owners: {
107
- total: e.numberOfItems,
108
- unique: e.uniqueOwners
109
- },
110
- ...e.floorPrice && {
111
- floorPrice: BigInt(e.floorPrice)
112
- }
113
- }
114
- };
89
+ function c(t, r) {
90
+ return {
91
+ contractAddress: e.parse(t.contractAddress),
92
+ name: t.name || n(t.contractAddress),
93
+ description: t.description ?? "",
94
+ imageUri: t.imageUrls.preview,
95
+ ...r && {
96
+ owners: {
97
+ total: r.numberOfItems,
98
+ unique: r.uniqueOwners
99
+ },
100
+ ...r.floorPrice && { floorPrice: BigInt(r.floorPrice) }
101
+ }
102
+ };
115
103
  }
116
- export {
117
- k as BackendNftService
118
- };
104
+ //#endregion
105
+ export { o as BackendNftService };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class e extends Error{constructor(r,t){super(`${r}::${t}`),this.name=r,this.code=t,this.name=r}}class s extends e{constructor(r){super("BackendPaginationError",r)}}exports.BackendPaginationError=s;
1
+ var e=class extends Error{constructor(e,t){super(`${e}::${t}`),this.name=e,this.code=t,this.name=e}},t=class extends e{constructor(e){super(`BackendPaginationError`,e)}};exports.BackendPaginationError=t;
@@ -1,13 +1,12 @@
1
- class o extends Error {
2
- constructor(r, s) {
3
- super(`${r}::${s}`), this.name = r, this.code = s, this.name = r;
4
- }
5
- }
6
- class n extends o {
7
- constructor(r) {
8
- super("BackendPaginationError", r);
9
- }
10
- }
11
- export {
12
- n as BackendPaginationError
1
+ //#region src/nfts/BackendPaginationError.ts
2
+ var e = class extends Error {
3
+ constructor(e, t) {
4
+ super(`${e}::${t}`), this.name = e, this.code = t, this.name = e;
5
+ }
6
+ }, t = class extends e {
7
+ constructor(e) {
8
+ super("BackendPaginationError", e);
9
+ }
13
10
  };
11
+ //#endregion
12
+ export { t as BackendPaginationError };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chains/starknet/address.cjs"),r=({image_uri:s,image_url_copy:t})=>{if(s&&t){if(!t.startsWith("ipfs://"))return t;if(!s.startsWith("ipfs://"))return s}return t||s},n=(s,t)=>s.token_id===t.token_id&&e.isEqualAddress(s.contract_address,t.contract_address);exports.equalNft=n;exports.getNftPicture=r;
1
+ const e=require(`../chains/starknet/address.cjs`);var t=({image_uri:e,image_url_copy:t})=>{if(e&&t){if(!t.startsWith(`ipfs://`))return t;if(!e.startsWith(`ipfs://`))return e}return t||e},n=(t,n)=>t.token_id===n.token_id&&e.isEqualAddress(t.contract_address,n.contract_address);exports.equalNft=n,exports.getNftPicture=t;
@@ -1,14 +1,11 @@
1
- import { isEqualAddress as r } from "../chains/starknet/address.js";
2
- const f = ({ image_uri: s, image_url_copy: t }) => {
3
- if (s && t) {
4
- if (!t.startsWith("ipfs://"))
5
- return t;
6
- if (!s.startsWith("ipfs://"))
7
- return s;
8
- }
9
- return t || s;
10
- }, d = (s, t) => s.token_id === t.token_id && r(s.contract_address, t.contract_address);
11
- export {
12
- d as equalNft,
13
- f as getNftPicture
14
- };
1
+ import { isEqualAddress as e } from "../chains/starknet/address.js";
2
+ //#region src/nfts/utils.ts
3
+ var t = ({ image_uri: e, image_url_copy: t }) => {
4
+ if (e && t) {
5
+ if (!t.startsWith("ipfs://")) return t;
6
+ if (!e.startsWith("ipfs://")) return e;
7
+ }
8
+ return t || e;
9
+ }, n = (t, n) => t.token_id === n.token_id && e(t.contract_address, n.contract_address);
10
+ //#endregion
11
+ export { n as equalNft, t as getNftPicture };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@scure/base"),i=require("../../node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.cjs"),n=require("starknet"),a=require("url-join"),o=require("./schema.cjs");class h{constructor(e,t){this.apiBase=e,this.httpService=t}async getRecovery(e,t){const r=a(this.apiBase,"accounts","starknet",e,"recovery",`${t}`),s=await this.httpService.get(r),c=o.onchainRecoverySchema.safeParse(s);return c.error?null:c.data}async getActiveRecovery(e){const t=a(this.apiBase,"accounts","starknet",e,"recovery"),r=await this.httpService.get(t),s=o.activeOnchainRecoverySchema.safeParse(r);return s.error?null:s.data}async startRecovery(e,t,r,s){const{r:c,s:v}=n.ec.starkCurve.sign(i.pedersen(i.keccak(u.stringToBytes("utf8","starknet:recovery")),r),s),y={feeToken:t,signerSignature:{type:"StarknetKey",signer:{publicKey:r,r:n.encode.addHexPrefix(c.toString(16)),s:n.encode.addHexPrefix(v.toString(16))}}};return await this.httpService.post(`${this.apiBase}/accounts/starknet/${e}/recovery`,{body:JSON.stringify(y)},o.startOnchainRecoverySchema)}async completeRecovery(e,t){const r=a(this.apiBase,"accounts","starknet",e,"recovery",`${t}`,"complete");return await this.httpService.post(r)}}exports.OnchainRecoveryService=h;
1
+ const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../../node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.cjs`),n=require(`./schema.cjs`);let r=require(`starknet`),i=require(`@scure/base`),a=require(`url-join`);a=e.__toESM(a);var o=class{constructor(e,t){this.apiBase=e,this.httpService=t}async getRecovery(e,t){let r=(0,a.default)(this.apiBase,`accounts`,`starknet`,e,`recovery`,`${t}`),i=await this.httpService.get(r),o=n.onchainRecoverySchema.safeParse(i);return o.error?null:o.data}async getActiveRecovery(e){let t=(0,a.default)(this.apiBase,`accounts`,`starknet`,e,`recovery`),r=await this.httpService.get(t),i=n.activeOnchainRecoverySchema.safeParse(r);return i.error?null:i.data}async startRecovery(e,a,o,s){let{r:c,s:l}=r.ec.starkCurve.sign(t.pedersen(t.keccak((0,i.stringToBytes)(`utf8`,`starknet:recovery`)),o),s),u={feeToken:a,signerSignature:{type:`StarknetKey`,signer:{publicKey:o,r:r.encode.addHexPrefix(c.toString(16)),s:r.encode.addHexPrefix(l.toString(16))}}};return await this.httpService.post(`${this.apiBase}/accounts/starknet/${e}/recovery`,{body:JSON.stringify(u)},n.startOnchainRecoverySchema)}async completeRecovery(e,t){let n=(0,a.default)(this.apiBase,`accounts`,`starknet`,e,`recovery`,`${t}`,`complete`);return await this.httpService.post(n)}};exports.OnchainRecoveryService=o;