@argent/x-shared 1.79.0 → 1.79.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 (501) 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 +15 -15
  492. package/dist/_virtual/_commonjsHelpers.cjs +0 -1
  493. package/dist/_virtual/_commonjsHelpers.js +0 -6
  494. package/dist/_virtual/numeral.cjs +0 -1
  495. package/dist/_virtual/numeral.js +0 -7
  496. package/dist/_virtual/numeral2.cjs +0 -1
  497. package/dist/_virtual/numeral2.js +0 -4
  498. package/dist/_virtual/semver.cjs +0 -1
  499. package/dist/_virtual/semver.js +0 -7
  500. package/dist/_virtual/semver2.cjs +0 -1
  501. package/dist/_virtual/semver2.js +0 -4
@@ -1,114 +1,119 @@
1
- import { SHA2 as p } from "./_sha2.js";
2
- import { wrapConstructor as u, rotr as b } from "./utils.js";
3
- const g = (r, e, s) => r & e ^ ~r & s, w = (r, e, s) => r & e ^ r & s ^ e & s, B = /* @__PURE__ */ new Uint32Array([
4
- 1116352408,
5
- 1899447441,
6
- 3049323471,
7
- 3921009573,
8
- 961987163,
9
- 1508970993,
10
- 2453635748,
11
- 2870763221,
12
- 3624381080,
13
- 310598401,
14
- 607225278,
15
- 1426881987,
16
- 1925078388,
17
- 2162078206,
18
- 2614888103,
19
- 3248222580,
20
- 3835390401,
21
- 4022224774,
22
- 264347078,
23
- 604807628,
24
- 770255983,
25
- 1249150122,
26
- 1555081692,
27
- 1996064986,
28
- 2554220882,
29
- 2821834349,
30
- 2952996808,
31
- 3210313671,
32
- 3336571891,
33
- 3584528711,
34
- 113926993,
35
- 338241895,
36
- 666307205,
37
- 773529912,
38
- 1294757372,
39
- 1396182291,
40
- 1695183700,
41
- 1986661051,
42
- 2177026350,
43
- 2456956037,
44
- 2730485921,
45
- 2820302411,
46
- 3259730800,
47
- 3345764771,
48
- 3516065817,
49
- 3600352804,
50
- 4094571909,
51
- 275423344,
52
- 430227734,
53
- 506948616,
54
- 659060556,
55
- 883997877,
56
- 958139571,
57
- 1322822218,
58
- 1537002063,
59
- 1747873779,
60
- 1955562222,
61
- 2024104815,
62
- 2227730452,
63
- 2361852424,
64
- 2428436474,
65
- 2756734187,
66
- 3204031479,
67
- 3329325298
1
+ import { rotr as e, wrapConstructor as t } from "./utils.js";
2
+ import { SHA2 as n } from "./_sha2.js";
3
+ //#region node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.js
4
+ var r = (e, t, n) => e & t ^ ~e & n, i = (e, t, n) => e & t ^ e & n ^ t & n, a = /* @__PURE__ */ new Uint32Array([
5
+ 1116352408,
6
+ 1899447441,
7
+ 3049323471,
8
+ 3921009573,
9
+ 961987163,
10
+ 1508970993,
11
+ 2453635748,
12
+ 2870763221,
13
+ 3624381080,
14
+ 310598401,
15
+ 607225278,
16
+ 1426881987,
17
+ 1925078388,
18
+ 2162078206,
19
+ 2614888103,
20
+ 3248222580,
21
+ 3835390401,
22
+ 4022224774,
23
+ 264347078,
24
+ 604807628,
25
+ 770255983,
26
+ 1249150122,
27
+ 1555081692,
28
+ 1996064986,
29
+ 2554220882,
30
+ 2821834349,
31
+ 2952996808,
32
+ 3210313671,
33
+ 3336571891,
34
+ 3584528711,
35
+ 113926993,
36
+ 338241895,
37
+ 666307205,
38
+ 773529912,
39
+ 1294757372,
40
+ 1396182291,
41
+ 1695183700,
42
+ 1986661051,
43
+ 2177026350,
44
+ 2456956037,
45
+ 2730485921,
46
+ 2820302411,
47
+ 3259730800,
48
+ 3345764771,
49
+ 3516065817,
50
+ 3600352804,
51
+ 4094571909,
52
+ 275423344,
53
+ 430227734,
54
+ 506948616,
55
+ 659060556,
56
+ 883997877,
57
+ 958139571,
58
+ 1322822218,
59
+ 1537002063,
60
+ 1747873779,
61
+ 1955562222,
62
+ 2024104815,
63
+ 2227730452,
64
+ 2361852424,
65
+ 2428436474,
66
+ 2756734187,
67
+ 3204031479,
68
+ 3329325298
68
69
  ]), o = /* @__PURE__ */ new Uint32Array([
69
- 1779033703,
70
- 3144134277,
71
- 1013904242,
72
- 2773480762,
73
- 1359893119,
74
- 2600822924,
75
- 528734635,
76
- 1541459225
77
- ]), n = /* @__PURE__ */ new Uint32Array(64);
78
- class D extends p {
79
- constructor() {
80
- super(64, 32, 8, !1), this.A = o[0] | 0, this.B = o[1] | 0, this.C = o[2] | 0, this.D = o[3] | 0, this.E = o[4] | 0, this.F = o[5] | 0, this.G = o[6] | 0, this.H = o[7] | 0;
81
- }
82
- get() {
83
- const { A: e, B: s, C: t, D: a, E: i, F: h, G: c, H: f } = this;
84
- return [e, s, t, a, i, h, c, f];
85
- }
86
- // prettier-ignore
87
- set(e, s, t, a, i, h, c, f) {
88
- this.A = e | 0, this.B = s | 0, this.C = t | 0, this.D = a | 0, this.E = i | 0, this.F = h | 0, this.G = c | 0, this.H = f | 0;
89
- }
90
- process(e, s) {
91
- for (let x = 0; x < 16; x++, s += 4)
92
- n[x] = e.getUint32(s, !1);
93
- for (let x = 16; x < 64; x++) {
94
- const H = n[x - 15], l = n[x - 2], m = b(H, 7) ^ b(H, 18) ^ H >>> 3, C = b(l, 17) ^ b(l, 19) ^ l >>> 10;
95
- n[x] = C + n[x - 7] + m + n[x - 16] | 0;
96
- }
97
- let { A: t, B: a, C: i, D: h, E: c, F: f, G: d, H: A } = this;
98
- for (let x = 0; x < 64; x++) {
99
- const H = b(c, 6) ^ b(c, 11) ^ b(c, 25), l = A + H + g(c, f, d) + B[x] + n[x] | 0, C = (b(t, 2) ^ b(t, 13) ^ b(t, 22)) + w(t, a, i) | 0;
100
- A = d, d = f, f = c, c = h + l | 0, h = i, i = a, a = t, t = l + C | 0;
101
- }
102
- t = t + this.A | 0, a = a + this.B | 0, i = i + this.C | 0, h = h + this.D | 0, c = c + this.E | 0, f = f + this.F | 0, d = d + this.G | 0, A = A + this.H | 0, this.set(t, a, i, h, c, f, d, A);
103
- }
104
- roundClean() {
105
- n.fill(0);
106
- }
107
- destroy() {
108
- this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
109
- }
110
- }
111
- const G = /* @__PURE__ */ u(() => new D());
112
- export {
113
- G as sha256
114
- };
70
+ 1779033703,
71
+ 3144134277,
72
+ 1013904242,
73
+ 2773480762,
74
+ 1359893119,
75
+ 2600822924,
76
+ 528734635,
77
+ 1541459225
78
+ ]), s = /* @__PURE__ */ new Uint32Array(64), c = class extends n {
79
+ constructor() {
80
+ super(64, 32, 8, !1), this.A = o[0] | 0, this.B = o[1] | 0, this.C = o[2] | 0, this.D = o[3] | 0, this.E = o[4] | 0, this.F = o[5] | 0, this.G = o[6] | 0, this.H = o[7] | 0;
81
+ }
82
+ get() {
83
+ let { A: e, B: t, C: n, D: r, E: i, F: a, G: o, H: s } = this;
84
+ return [
85
+ e,
86
+ t,
87
+ n,
88
+ r,
89
+ i,
90
+ a,
91
+ o,
92
+ s
93
+ ];
94
+ }
95
+ set(e, t, n, r, i, a, o, s) {
96
+ this.A = e | 0, this.B = t | 0, this.C = n | 0, this.D = r | 0, this.E = i | 0, this.F = a | 0, this.G = o | 0, this.H = s | 0;
97
+ }
98
+ process(t, n) {
99
+ for (let e = 0; e < 16; e++, n += 4) s[e] = t.getUint32(n, !1);
100
+ for (let t = 16; t < 64; t++) {
101
+ let n = s[t - 15], r = s[t - 2], i = e(n, 7) ^ e(n, 18) ^ n >>> 3;
102
+ s[t] = (e(r, 17) ^ e(r, 19) ^ r >>> 10) + s[t - 7] + i + s[t - 16] | 0;
103
+ }
104
+ let { A: o, B: c, C: l, D: u, E: d, F: f, G: p, H: m } = this;
105
+ for (let t = 0; t < 64; t++) {
106
+ let n = e(d, 6) ^ e(d, 11) ^ e(d, 25), h = m + n + r(d, f, p) + a[t] + s[t] | 0, g = (e(o, 2) ^ e(o, 13) ^ e(o, 22)) + i(o, c, l) | 0;
107
+ m = p, p = f, f = d, d = u + h | 0, u = l, l = c, c = o, o = h + g | 0;
108
+ }
109
+ o = o + this.A | 0, c = c + this.B | 0, l = l + this.C | 0, u = u + this.D | 0, d = d + this.E | 0, f = f + this.F | 0, p = p + this.G | 0, m = m + this.H | 0, this.set(o, c, l, u, d, f, p, m);
110
+ }
111
+ roundClean() {
112
+ s.fill(0);
113
+ }
114
+ destroy() {
115
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
116
+ }
117
+ }, l = /* @__PURE__ */ t(() => new c());
118
+ //#endregion
119
+ export { l as sha256 };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./_assert.cjs"),f=require("./_u64.cjs"),k=require("./utils.cjs"),[y,b,_]=[[],[],[]],B=BigInt(0),l=BigInt(1),A=BigInt(2),H=BigInt(7),S=BigInt(256),T=BigInt(113);for(let i=0,t=l,s=1,n=0;i<24;i++){[s,n]=[n,(2*s+3*n)%5],y.push(2*(5*n+s)),b.push((i+1)*(i+2)/2%64);let o=B;for(let r=0;r<7;r++)t=(t<<l^(t>>H)*T)%S,t&A&&(o^=l<<(l<<BigInt(r))-l);_.push(o)}const[m,F]=f.split(_,!0),I=(i,t,s)=>s>32?f.rotlBH(i,t,s):f.rotlSH(i,t,s),O=(i,t,s)=>s>32?f.rotlBL(i,t,s):f.rotlSL(i,t,s);function w(i,t=24){const s=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let e=0;e<10;e++)s[e]=i[e]^i[e+10]^i[e+20]^i[e+30]^i[e+40];for(let e=0;e<10;e+=2){const h=(e+8)%10,a=(e+2)%10,p=s[a],c=s[a+1],g=I(p,c,1)^s[h],L=O(p,c,1)^s[h+1];for(let d=0;d<50;d+=10)i[e+d]^=g,i[e+d+1]^=L}let o=i[2],r=i[3];for(let e=0;e<24;e++){const h=b[e],a=I(o,r,h),p=O(o,r,h),c=y[e];o=i[c],r=i[c+1],i[c]=a,i[c+1]=p}for(let e=0;e<50;e+=10){for(let h=0;h<10;h++)s[h]=i[e+h];for(let h=0;h<10;h++)i[e+h]^=~s[(h+2)%10]&s[(h+4)%10]}i[0]^=m[n],i[1]^=F[n]}s.fill(0)}class x extends k.Hash{constructor(t,s,n,o=!1,r=24){if(super(),this.blockLen=t,this.suffix=s,this.outputLen=n,this.enableXOF=o,this.rounds=r,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,u.number(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=k.u32(this.state)}keccak(){w(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){u.exists(this);const{blockLen:s,state:n}=this;t=k.toBytes(t);const o=t.length;for(let r=0;r<o;){const e=Math.min(s-this.pos,o-r);for(let h=0;h<e;h++)n[this.pos++]^=t[r++];this.pos===s&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:s,pos:n,blockLen:o}=this;t[n]^=s,(s&128)!==0&&n===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){u.exists(this,!1),u.bytes(t),this.finish();const s=this.state,{blockLen:n}=this;for(let o=0,r=t.length;o<r;){this.posOut>=n&&this.keccak();const e=Math.min(n-this.posOut,r-o);t.set(s.subarray(this.posOut,this.posOut+e),o),this.posOut+=e,o+=e}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return u.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(u.output(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:s,suffix:n,outputLen:o,rounds:r,enableXOF:e}=this;return t||(t=new x(s,n,o,e,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=n,t.outputLen=o,t.enableXOF=e,t.destroyed=this.destroyed,t}}const P=(i,t,s)=>k.wrapConstructor(()=>new x(t,i,s)),X=P(1,136,256/8);exports.Keccak=x;exports.keccakP=w;exports.keccak_256=X;
1
+ const e=require(`./_assert.cjs`),t=require(`./_u64.cjs`),n=require(`./utils.cjs`);var[r,i,a]=[[],[],[]],o=BigInt(0),s=BigInt(1),c=BigInt(2),l=BigInt(7),u=BigInt(256),d=BigInt(113);for(let e=0,t=s,n=1,f=0;e<24;e++){[n,f]=[f,(2*n+3*f)%5],r.push(2*(5*f+n)),i.push((e+1)*(e+2)/2%64);let p=o;for(let e=0;e<7;e++)t=(t<<s^(t>>l)*d)%u,t&c&&(p^=s<<(s<<BigInt(e))-s);a.push(p)}var[f,p]=t.split(a,!0),m=(e,n,r)=>r>32?t.rotlBH(e,n,r):t.rotlSH(e,n,r),h=(e,n,r)=>r>32?t.rotlBL(e,n,r):t.rotlSL(e,n,r);function g(e,t=24){let n=new Uint32Array(10);for(let a=24-t;a<24;a++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],o=n[i+1],s=m(a,o,1)^n[r],c=h(a,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){let a=i[n],s=m(t,o,a),c=h(t,o,a),l=r[n];t=e[l],o=e[l+1],e[l]=s,e[l+1]=c}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=f[a],e[1]^=p[a]}n.fill(0)}var _=class t extends n.Hash{constructor(t,r,i,a=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=i,this.enableXOF=a,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,e.number(i),0>=this.blockLen||this.blockLen>=200)throw Error(`Sha3 supports only keccak-f1600 function`);this.state=new Uint8Array(200),this.state32=n.u32(this.state)}keccak(){g(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){e.exists(this);let{blockLen:r,state:i}=this;t=n.toBytes(t);let a=t.length;for(let e=0;e<a;){let n=Math.min(r-this.pos,a-e);for(let r=0;r<n;r++)i[this.pos++]^=t[e++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,t&128&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(t){e.exists(this,!1),e.bytes(t),this.finish();let n=this.state,{blockLen:r}=this;for(let e=0,i=t.length;e<i;){this.posOut>=r&&this.keccak();let a=Math.min(r-this.posOut,i-e);t.set(n.subarray(this.posOut,this.posOut+a),e),this.posOut+=a,e+=a}return t}xofInto(e){if(!this.enableXOF)throw Error(`XOF is not possible for this instance`);return this.writeInto(e)}xof(t){return e.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(e.output(t,this),this.finished)throw Error(`digest() was already called`);return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:n,suffix:r,outputLen:i,rounds:a,enableXOF:o}=this;return e||=new t(n,r,i,o,a),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=r,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}},v=((e,t,r)=>n.wrapConstructor(()=>new _(t,e,r)))(1,136,256/8);exports.keccak_256=v;
@@ -1,107 +1,97 @@
1
- import { number as d, exists as k, bytes as _, output as g } from "./_assert.js";
2
- import { rotlSH as B, rotlSL as A, rotlBH as H, rotlBL as m, split as S } from "./_u64.js";
3
- import { wrapConstructor as T, Hash as F, u32 as X, toBytes as U } from "./utils.js";
4
- const [O, w, y] = [[], [], []], E = /* @__PURE__ */ BigInt(0), f = /* @__PURE__ */ BigInt(1), P = /* @__PURE__ */ BigInt(2), M = /* @__PURE__ */ BigInt(7), R = /* @__PURE__ */ BigInt(256), j = /* @__PURE__ */ BigInt(113);
5
- for (let i = 0, t = f, s = 1, n = 0; i < 24; i++) {
6
- [s, n] = [n, (2 * s + 3 * n) % 5], O.push(2 * (5 * n + s)), w.push((i + 1) * (i + 2) / 2 % 64);
7
- let o = E;
8
- for (let r = 0; r < 7; r++)
9
- t = (t << f ^ (t >> M) * j) % R, t & P && (o ^= f << (f << /* @__PURE__ */ BigInt(r)) - f);
10
- y.push(o);
1
+ import { bytes as e, exists as t, number as n, output as r } from "./_assert.js";
2
+ import { rotlBH as i, rotlBL as a, rotlSH as o, rotlSL as s, split as c } from "./_u64.js";
3
+ import { Hash as l, toBytes as u, u32 as d, wrapConstructor as f } from "./utils.js";
4
+ //#region node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.js
5
+ var [p, m, h] = [
6
+ [],
7
+ [],
8
+ []
9
+ ], g = /* @__PURE__ */ BigInt(0), _ = /* @__PURE__ */ BigInt(1), v = /* @__PURE__ */ BigInt(2), y = /* @__PURE__ */ BigInt(7), b = /* @__PURE__ */ BigInt(256), x = /* @__PURE__ */ BigInt(113);
10
+ for (let e = 0, t = _, n = 1, r = 0; e < 24; e++) {
11
+ [n, r] = [r, (2 * n + 3 * r) % 5], p.push(2 * (5 * r + n)), m.push((e + 1) * (e + 2) / 2 % 64);
12
+ let i = g;
13
+ for (let e = 0; e < 7; e++) t = (t << _ ^ (t >> y) * x) % b, t & v && (i ^= _ << (_ << /* @__PURE__ */ BigInt(e)) - _);
14
+ h.push(i);
11
15
  }
12
- const [C, q] = /* @__PURE__ */ S(y, !0), x = (i, t, s) => s > 32 ? H(i, t, s) : B(i, t, s), I = (i, t, s) => s > 32 ? m(i, t, s) : A(i, t, s);
13
- function v(i, t = 24) {
14
- const s = new Uint32Array(10);
15
- for (let n = 24 - t; n < 24; n++) {
16
- for (let e = 0; e < 10; e++)
17
- s[e] = i[e] ^ i[e + 10] ^ i[e + 20] ^ i[e + 30] ^ i[e + 40];
18
- for (let e = 0; e < 10; e += 2) {
19
- const h = (e + 8) % 10, l = (e + 2) % 10, u = s[l], c = s[l + 1], L = x(u, c, 1) ^ s[h], b = I(u, c, 1) ^ s[h + 1];
20
- for (let a = 0; a < 50; a += 10)
21
- i[e + a] ^= L, i[e + a + 1] ^= b;
22
- }
23
- let o = i[2], r = i[3];
24
- for (let e = 0; e < 24; e++) {
25
- const h = w[e], l = x(o, r, h), u = I(o, r, h), c = O[e];
26
- o = i[c], r = i[c + 1], i[c] = l, i[c + 1] = u;
27
- }
28
- for (let e = 0; e < 50; e += 10) {
29
- for (let h = 0; h < 10; h++)
30
- s[h] = i[e + h];
31
- for (let h = 0; h < 10; h++)
32
- i[e + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
33
- }
34
- i[0] ^= C[n], i[1] ^= q[n];
35
- }
36
- s.fill(0);
16
+ var [S, C] = /* @__PURE__ */ c(h, !0), w = (e, t, n) => n > 32 ? i(e, t, n) : o(e, t, n), T = (e, t, n) => n > 32 ? a(e, t, n) : s(e, t, n);
17
+ function E(e, t = 24) {
18
+ let n = new Uint32Array(10);
19
+ for (let r = 24 - t; r < 24; r++) {
20
+ for (let t = 0; t < 10; t++) n[t] = e[t] ^ e[t + 10] ^ e[t + 20] ^ e[t + 30] ^ e[t + 40];
21
+ for (let t = 0; t < 10; t += 2) {
22
+ let r = (t + 8) % 10, i = (t + 2) % 10, a = n[i], o = n[i + 1], s = w(a, o, 1) ^ n[r], c = T(a, o, 1) ^ n[r + 1];
23
+ for (let n = 0; n < 50; n += 10) e[t + n] ^= s, e[t + n + 1] ^= c;
24
+ }
25
+ let t = e[2], i = e[3];
26
+ for (let n = 0; n < 24; n++) {
27
+ let r = m[n], a = w(t, i, r), o = T(t, i, r), s = p[n];
28
+ t = e[s], i = e[s + 1], e[s] = a, e[s + 1] = o;
29
+ }
30
+ for (let t = 0; t < 50; t += 10) {
31
+ for (let r = 0; r < 10; r++) n[r] = e[t + r];
32
+ for (let r = 0; r < 10; r++) e[t + r] ^= ~n[(r + 2) % 10] & n[(r + 4) % 10];
33
+ }
34
+ e[0] ^= S[r], e[1] ^= C[r];
35
+ }
36
+ n.fill(0);
37
37
  }
38
- class p extends F {
39
- // NOTE: we accept arguments in bytes instead of bits here.
40
- constructor(t, s, n, o = !1, r = 24) {
41
- if (super(), this.blockLen = t, this.suffix = s, this.outputLen = n, this.enableXOF = o, this.rounds = r, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, d(n), 0 >= this.blockLen || this.blockLen >= 200)
42
- throw new Error("Sha3 supports only keccak-f1600 function");
43
- this.state = new Uint8Array(200), this.state32 = X(this.state);
44
- }
45
- keccak() {
46
- v(this.state32, this.rounds), this.posOut = 0, this.pos = 0;
47
- }
48
- update(t) {
49
- k(this);
50
- const { blockLen: s, state: n } = this;
51
- t = U(t);
52
- const o = t.length;
53
- for (let r = 0; r < o; ) {
54
- const e = Math.min(s - this.pos, o - r);
55
- for (let h = 0; h < e; h++)
56
- n[this.pos++] ^= t[r++];
57
- this.pos === s && this.keccak();
58
- }
59
- return this;
60
- }
61
- finish() {
62
- if (this.finished)
63
- return;
64
- this.finished = !0;
65
- const { state: t, suffix: s, pos: n, blockLen: o } = this;
66
- t[n] ^= s, (s & 128) !== 0 && n === o - 1 && this.keccak(), t[o - 1] ^= 128, this.keccak();
67
- }
68
- writeInto(t) {
69
- k(this, !1), _(t), this.finish();
70
- const s = this.state, { blockLen: n } = this;
71
- for (let o = 0, r = t.length; o < r; ) {
72
- this.posOut >= n && this.keccak();
73
- const e = Math.min(n - this.posOut, r - o);
74
- t.set(s.subarray(this.posOut, this.posOut + e), o), this.posOut += e, o += e;
75
- }
76
- return t;
77
- }
78
- xofInto(t) {
79
- if (!this.enableXOF)
80
- throw new Error("XOF is not possible for this instance");
81
- return this.writeInto(t);
82
- }
83
- xof(t) {
84
- return d(t), this.xofInto(new Uint8Array(t));
85
- }
86
- digestInto(t) {
87
- if (g(t, this), this.finished)
88
- throw new Error("digest() was already called");
89
- return this.writeInto(t), this.destroy(), t;
90
- }
91
- digest() {
92
- return this.digestInto(new Uint8Array(this.outputLen));
93
- }
94
- destroy() {
95
- this.destroyed = !0, this.state.fill(0);
96
- }
97
- _cloneInto(t) {
98
- const { blockLen: s, suffix: n, outputLen: o, rounds: r, enableXOF: e } = this;
99
- return t || (t = new p(s, n, o, e, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = n, t.outputLen = o, t.enableXOF = e, t.destroyed = this.destroyed, t;
100
- }
101
- }
102
- const z = (i, t, s) => T(() => new p(t, i, s)), K = /* @__PURE__ */ z(1, 136, 256 / 8);
103
- export {
104
- p as Keccak,
105
- v as keccakP,
106
- K as keccak_256
107
- };
38
+ var D = class i extends l {
39
+ constructor(e, t, r, i = !1, a = 24) {
40
+ if (super(), this.blockLen = e, this.suffix = t, this.outputLen = r, this.enableXOF = i, this.rounds = a, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, n(r), 0 >= this.blockLen || this.blockLen >= 200) throw Error("Sha3 supports only keccak-f1600 function");
41
+ this.state = new Uint8Array(200), this.state32 = d(this.state);
42
+ }
43
+ keccak() {
44
+ E(this.state32, this.rounds), this.posOut = 0, this.pos = 0;
45
+ }
46
+ update(e) {
47
+ t(this);
48
+ let { blockLen: n, state: r } = this;
49
+ e = u(e);
50
+ let i = e.length;
51
+ for (let t = 0; t < i;) {
52
+ let a = Math.min(n - this.pos, i - t);
53
+ for (let n = 0; n < a; n++) r[this.pos++] ^= e[t++];
54
+ this.pos === n && this.keccak();
55
+ }
56
+ return this;
57
+ }
58
+ finish() {
59
+ if (this.finished) return;
60
+ this.finished = !0;
61
+ let { state: e, suffix: t, pos: n, blockLen: r } = this;
62
+ e[n] ^= t, t & 128 && n === r - 1 && this.keccak(), e[r - 1] ^= 128, this.keccak();
63
+ }
64
+ writeInto(n) {
65
+ t(this, !1), e(n), this.finish();
66
+ let r = this.state, { blockLen: i } = this;
67
+ for (let e = 0, t = n.length; e < t;) {
68
+ this.posOut >= i && this.keccak();
69
+ let a = Math.min(i - this.posOut, t - e);
70
+ n.set(r.subarray(this.posOut, this.posOut + a), e), this.posOut += a, e += a;
71
+ }
72
+ return n;
73
+ }
74
+ xofInto(e) {
75
+ if (!this.enableXOF) throw Error("XOF is not possible for this instance");
76
+ return this.writeInto(e);
77
+ }
78
+ xof(e) {
79
+ return n(e), this.xofInto(new Uint8Array(e));
80
+ }
81
+ digestInto(e) {
82
+ if (r(e, this), this.finished) throw Error("digest() was already called");
83
+ return this.writeInto(e), this.destroy(), e;
84
+ }
85
+ digest() {
86
+ return this.digestInto(new Uint8Array(this.outputLen));
87
+ }
88
+ destroy() {
89
+ this.destroyed = !0, this.state.fill(0);
90
+ }
91
+ _cloneInto(e) {
92
+ let { blockLen: t, suffix: n, outputLen: r, rounds: a, enableXOF: o } = this;
93
+ return e ||= new i(t, n, r, o, a), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = a, e.suffix = n, e.outputLen = r, e.enableXOF = o, e.destroyed = this.destroyed, e;
94
+ }
95
+ }, O = /* @__PURE__ */ ((e, t, n) => f(() => new D(t, e, n)))(1, 136, 256 / 8);
96
+ //#endregion
97
+ export { O as keccak_256 };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));function f(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}const s=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),y=(t,e)=>t<<32-e|t>>>e,r=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!r)throw new Error("Non little-endian hardware is not supported");function o(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function i(t){if(typeof t=="string"&&(t=o(t)),!f(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class w{clone(){return this._cloneInto()}}function p(t){const e=c=>t().update(i(c)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}exports.Hash=w;exports.createView=s;exports.isLE=r;exports.rotr=y;exports.toBytes=i;exports.u32=u;exports.utf8ToBytes=o;exports.wrapConstructor=p;
1
+ var e=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));function t(e){return e instanceof Uint8Array||typeof e==`object`&&!!e&&e.constructor.name===`Uint8Array`}var n=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),r=(e,t)=>e<<32-t|e>>>t;if(new Uint8Array(new Uint32Array([287454020]).buffer)[0]!==68)throw Error(`Non little-endian hardware is not supported`);function i(e){if(typeof e!=`string`)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function a(e){if(typeof e==`string`&&(e=i(e)),!t(e))throw Error(`expected Uint8Array, got ${typeof e}`);return e}var o=class{clone(){return this._cloneInto()}};({}).toString;function s(e){let t=t=>e().update(a(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function c(e){let t=(t,n)=>e(n).update(a(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}exports.Hash=o,exports.createView=n,exports.rotr=r,exports.toBytes=a,exports.u32=e,exports.utf8ToBytes=i,exports.wrapConstructor=s,exports.wrapXOFConstructorWithOpts=c;
@@ -1,37 +1,31 @@
1
- const u = (t) => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
2
- function o(t) {
3
- return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
1
+ //#region node_modules/.pnpm/@noble+hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js
2
+ var e = (e) => new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
3
+ function t(e) {
4
+ return e instanceof Uint8Array || typeof e == "object" && !!e && e.constructor.name === "Uint8Array";
4
5
  }
5
- const s = (t) => new DataView(t.buffer, t.byteOffset, t.byteLength), y = (t, e) => t << 32 - e | t >>> e, i = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
6
- if (!i)
7
- throw new Error("Non little-endian hardware is not supported");
8
- function c(t) {
9
- if (typeof t != "string")
10
- throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
11
- return new Uint8Array(new TextEncoder().encode(t));
6
+ var n = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), r = (e, t) => e << 32 - t | e >>> t;
7
+ if (new Uint8Array(new Uint32Array([287454020]).buffer)[0] !== 68) throw Error("Non little-endian hardware is not supported");
8
+ function i(e) {
9
+ if (typeof e != "string") throw Error(`utf8ToBytes expected string, got ${typeof e}`);
10
+ return new Uint8Array(new TextEncoder().encode(e));
12
11
  }
13
- function f(t) {
14
- if (typeof t == "string" && (t = c(t)), !o(t))
15
- throw new Error(`expected Uint8Array, got ${typeof t}`);
16
- return t;
12
+ function a(e) {
13
+ if (typeof e == "string" && (e = i(e)), !t(e)) throw Error(`expected Uint8Array, got ${typeof e}`);
14
+ return e;
17
15
  }
18
- class p {
19
- // Safe version that clones internal state
20
- clone() {
21
- return this._cloneInto();
22
- }
16
+ var o = class {
17
+ clone() {
18
+ return this._cloneInto();
19
+ }
20
+ };
21
+ ({}).toString;
22
+ function s(e) {
23
+ let t = (t) => e().update(a(t)).digest(), n = e();
24
+ return t.outputLen = n.outputLen, t.blockLen = n.blockLen, t.create = () => e(), t;
23
25
  }
24
- function w(t) {
25
- const e = (r) => t().update(f(r)).digest(), n = t();
26
- return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
26
+ function c(e) {
27
+ let t = (t, n) => e(n).update(a(t)).digest(), n = e({});
28
+ return t.outputLen = n.outputLen, t.blockLen = n.blockLen, t.create = (t) => e(t), t;
27
29
  }
28
- export {
29
- p as Hash,
30
- s as createView,
31
- i as isLE,
32
- y as rotr,
33
- f as toBytes,
34
- u as u32,
35
- c as utf8ToBytes,
36
- w as wrapConstructor
37
- };
30
+ //#endregion
31
+ export { o as Hash, n as createView, r as rotr, a as toBytes, e as u32, i as utf8ToBytes, s as wrapConstructor, c as wrapXOFConstructorWithOpts };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./utils.cjs");function b(u,t,s){return u&t^~u&s}function p(u,t,s){return u&t^u&s^t&s}class d{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,s,n,i){this.blockLen=t,this.outputLen=s,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(t),this.view=f.createView(this.buffer)}update(t){f.aexists(this),f.abytes(t);const{view:s,buffer:n,blockLen:i}=this,r=t.length;for(let e=0;e<r;){const o=Math.min(i-this.pos,r-e);if(o===i){const c=f.createView(t);for(;i<=r-e;e+=i)this.process(c,e);continue}n.set(t.subarray(e,e+o),this.pos),this.pos+=o,e+=o,this.pos===i&&(this.process(s,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){f.aexists(this),f.aoutput(t,this),this.finished=!0;const{buffer:s,view:n,blockLen:i,isLE:r}=this;let{pos:e}=this;s[e++]=128,f.clean(this.buffer.subarray(e)),this.padOffset>i-e&&(this.process(n,0),e=0);for(let h=e;h<i;h++)s[h]=0;n.setBigUint64(i-8,BigInt(this.length*8),r),this.process(n,0);const o=f.createView(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const a=c/4,l=this.get();if(a>l.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<a;h++)o.setUint32(4*h,l[h],r)}digest(){const{buffer:t,outputLen:s}=this;this.digestInto(t);const n=t.slice(0,s);return this.destroy(),n}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:s,buffer:n,length:i,finished:r,destroyed:e,pos:o}=this;return t.destroyed=e,t.finished=r,t.length=i,t.pos=o,i%s&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const g=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);exports.Chi=b;exports.HashMD=d;exports.Maj=p;exports.SHA256_IV=g;
1
+ const e=require(`./utils.cjs`);function t(e,t,n){return e&t^~e&n}function n(e,t,n){return e&t^e&n^t&n}var r=class{constructor(t,n,r,i){this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=e.createView(this.buffer)}update(t){e.aexists(this),e.abytes(t);let{view:n,buffer:r,blockLen:i}=this,a=t.length;for(let o=0;o<a;){let s=Math.min(i-this.pos,a-o);if(s===i){let n=e.createView(t);for(;i<=a-o;o+=i)this.process(n,o);continue}r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){e.aexists(this),e.aoutput(t,this),this.finished=!0;let{buffer:n,view:r,blockLen:i,isLE:a}=this,{pos:o}=this;n[o++]=128,e.clean(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(r,0),o=0);for(let e=o;e<i;e++)n[e]=0;r.setBigUint64(i-8,BigInt(this.length*8),a),this.process(r,0);let s=e.createView(t),c=this.outputLen;if(c%4)throw Error(`_sha2: outputLen must be aligned to 32bit`);let l=c/4,u=this.get();if(l>u.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<l;e++)s.setUint32(4*e,u[e],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}},i=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);exports.Chi=t,exports.HashMD=r,exports.Maj=n,exports.SHA256_IV=i;