@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,85 +1,74 @@
1
- import { createView as c, aexists as a, abytes as b, aoutput as d, clean as g } from "./utils.js";
2
- function w(f, t, e) {
3
- return f & t ^ ~f & e;
1
+ import { abytes as e, aexists as t, aoutput as n, clean as r, createView as i } from "./utils.js";
2
+ //#region node_modules/.pnpm/@noble+hashes@2.0.0/node_modules/@noble/hashes/_md.js
3
+ function a(e, t, n) {
4
+ return e & t ^ ~e & n;
4
5
  }
5
- function x(f, t, e) {
6
- return f & t ^ f & e ^ t & e;
6
+ function o(e, t, n) {
7
+ return e & t ^ e & n ^ t & n;
7
8
  }
8
- class y {
9
- blockLen;
10
- outputLen;
11
- padOffset;
12
- isLE;
13
- // For partial updates less than block size
14
- buffer;
15
- view;
16
- finished = !1;
17
- length = 0;
18
- pos = 0;
19
- destroyed = !1;
20
- constructor(t, e, n, i) {
21
- this.blockLen = t, this.outputLen = e, this.padOffset = n, this.isLE = i, this.buffer = new Uint8Array(t), this.view = c(this.buffer);
22
- }
23
- update(t) {
24
- a(this), b(t);
25
- const { view: e, buffer: n, blockLen: i } = this, o = t.length;
26
- for (let s = 0; s < o; ) {
27
- const r = Math.min(i - this.pos, o - s);
28
- if (r === i) {
29
- const u = c(t);
30
- for (; i <= o - s; s += i)
31
- this.process(u, s);
32
- continue;
33
- }
34
- n.set(t.subarray(s, s + r), this.pos), this.pos += r, s += r, this.pos === i && (this.process(e, 0), this.pos = 0);
35
- }
36
- return this.length += t.length, this.roundClean(), this;
37
- }
38
- digestInto(t) {
39
- a(this), d(t, this), this.finished = !0;
40
- const { buffer: e, view: n, blockLen: i, isLE: o } = this;
41
- let { pos: s } = this;
42
- e[s++] = 128, g(this.buffer.subarray(s)), this.padOffset > i - s && (this.process(n, 0), s = 0);
43
- for (let h = s; h < i; h++)
44
- e[h] = 0;
45
- n.setBigUint64(i - 8, BigInt(this.length * 8), o), this.process(n, 0);
46
- const r = c(t), u = this.outputLen;
47
- if (u % 4)
48
- throw new Error("_sha2: outputLen must be aligned to 32bit");
49
- const l = u / 4, p = this.get();
50
- if (l > p.length)
51
- throw new Error("_sha2: outputLen bigger than state");
52
- for (let h = 0; h < l; h++)
53
- r.setUint32(4 * h, p[h], o);
54
- }
55
- digest() {
56
- const { buffer: t, outputLen: e } = this;
57
- this.digestInto(t);
58
- const n = t.slice(0, e);
59
- return this.destroy(), n;
60
- }
61
- _cloneInto(t) {
62
- t ||= new this.constructor(), t.set(...this.get());
63
- const { blockLen: e, buffer: n, length: i, finished: o, destroyed: s, pos: r } = this;
64
- return t.destroyed = s, t.finished = o, t.length = i, t.pos = r, i % e && t.buffer.set(n), t;
65
- }
66
- clone() {
67
- return this._cloneInto();
68
- }
69
- }
70
- const I = /* @__PURE__ */ Uint32Array.from([
71
- 1779033703,
72
- 3144134277,
73
- 1013904242,
74
- 2773480762,
75
- 1359893119,
76
- 2600822924,
77
- 528734635,
78
- 1541459225
9
+ var s = class {
10
+ blockLen;
11
+ outputLen;
12
+ padOffset;
13
+ isLE;
14
+ buffer;
15
+ view;
16
+ finished = !1;
17
+ length = 0;
18
+ pos = 0;
19
+ destroyed = !1;
20
+ constructor(e, t, n, r) {
21
+ this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = i(this.buffer);
22
+ }
23
+ update(n) {
24
+ t(this), e(n);
25
+ let { view: r, buffer: a, blockLen: o } = this, s = n.length;
26
+ for (let e = 0; e < s;) {
27
+ let t = Math.min(o - this.pos, s - e);
28
+ if (t === o) {
29
+ let t = i(n);
30
+ for (; o <= s - e; e += o) this.process(t, e);
31
+ continue;
32
+ }
33
+ a.set(n.subarray(e, e + t), this.pos), this.pos += t, e += t, this.pos === o && (this.process(r, 0), this.pos = 0);
34
+ }
35
+ return this.length += n.length, this.roundClean(), this;
36
+ }
37
+ digestInto(e) {
38
+ t(this), n(e, this), this.finished = !0;
39
+ let { buffer: a, view: o, blockLen: s, isLE: c } = this, { pos: l } = this;
40
+ a[l++] = 128, r(this.buffer.subarray(l)), this.padOffset > s - l && (this.process(o, 0), l = 0);
41
+ for (let e = l; e < s; e++) a[e] = 0;
42
+ o.setBigUint64(s - 8, BigInt(this.length * 8), c), this.process(o, 0);
43
+ let u = i(e), d = this.outputLen;
44
+ if (d % 4) throw Error("_sha2: outputLen must be aligned to 32bit");
45
+ let f = d / 4, p = this.get();
46
+ if (f > p.length) throw Error("_sha2: outputLen bigger than state");
47
+ for (let e = 0; e < f; e++) u.setUint32(4 * e, p[e], c);
48
+ }
49
+ digest() {
50
+ let { buffer: e, outputLen: t } = this;
51
+ this.digestInto(e);
52
+ let n = e.slice(0, t);
53
+ return this.destroy(), n;
54
+ }
55
+ _cloneInto(e) {
56
+ e ||= new this.constructor(), e.set(...this.get());
57
+ let { blockLen: t, buffer: n, length: r, finished: i, destroyed: a, pos: o } = this;
58
+ return e.destroyed = a, e.finished = i, e.length = r, e.pos = o, r % t && e.buffer.set(n), e;
59
+ }
60
+ clone() {
61
+ return this._cloneInto();
62
+ }
63
+ }, c = /* @__PURE__ */ Uint32Array.from([
64
+ 1779033703,
65
+ 3144134277,
66
+ 1013904242,
67
+ 2773480762,
68
+ 1359893119,
69
+ 2600822924,
70
+ 528734635,
71
+ 1541459225
79
72
  ]);
80
- export {
81
- w as Chi,
82
- y as HashMD,
83
- x as Maj,
84
- I as SHA256_IV
85
- };
73
+ //#endregion
74
+ export { a as Chi, s as HashMD, o as Maj, c as SHA256_IV };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=BigInt(2**32-1),c=BigInt(32);function u(t,o=!1){return o?{h:Number(t&l),l:Number(t>>c&l)}:{h:Number(t>>c&l)|0,l:Number(t&l)|0}}function B(t,o=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let e=0;e<r;e++){const{h:f,l:s}=u(t[e],o);[n[e],i[e]]=[f,s]}return[n,i]}const g=(t,o,r)=>t<<r|o>>>32-r,m=(t,o,r)=>o<<r|t>>>32-r,S=(t,o,r)=>o<<r-32|t>>>64-r,a=(t,o,r)=>t<<r-32|o>>>64-r;exports.fromBig=u;exports.rotlBH=S;exports.rotlBL=a;exports.rotlSH=g;exports.rotlSL=m;exports.split=B;
1
+ var e=BigInt(2**32-1),t=BigInt(32);function n(n,r=!1){return r?{h:Number(n&e),l:Number(n>>t&e)}:{h:Number(n>>t&e)|0,l:Number(n&e)|0}}function r(e,t=!1){let r=e.length,i=new Uint32Array(r),a=new Uint32Array(r);for(let o=0;o<r;o++){let{h:r,l:s}=n(e[o],t);[i[o],a[o]]=[r,s]}return[i,a]}var i=(e,t,n)=>e<<n|t>>>32-n,a=(e,t,n)=>t<<n|e>>>32-n,o=(e,t,n)=>t<<n-32|e>>>64-n,s=(e,t,n)=>e<<n-32|t>>>64-n;exports.rotlBH=o,exports.rotlBL=s,exports.rotlSH=i,exports.rotlSL=a,exports.split=r;
@@ -1,22 +1,22 @@
1
- const o = /* @__PURE__ */ BigInt(4294967295), i = /* @__PURE__ */ BigInt(32);
2
- function s(t, r = !1) {
3
- return r ? { h: Number(t & o), l: Number(t >> i & o) } : { h: Number(t >> i & o) | 0, l: Number(t & o) | 0 };
1
+ //#region node_modules/.pnpm/@noble+hashes@2.0.0/node_modules/@noble/hashes/_u64.js
2
+ var e = /* @__PURE__ */ BigInt(2 ** 32 - 1), t = /* @__PURE__ */ BigInt(32);
3
+ function n(n, r = !1) {
4
+ return r ? {
5
+ h: Number(n & e),
6
+ l: Number(n >> t & e)
7
+ } : {
8
+ h: Number(n >> t & e) | 0,
9
+ l: Number(n & e) | 0
10
+ };
4
11
  }
5
- function h(t, r = !1) {
6
- const n = t.length;
7
- let l = new Uint32Array(n), c = new Uint32Array(n);
8
- for (let e = 0; e < n; e++) {
9
- const { h: u, l: f } = s(t[e], r);
10
- [l[e], c[e]] = [u, f];
11
- }
12
- return [l, c];
12
+ function r(e, t = !1) {
13
+ let r = e.length, i = new Uint32Array(r), a = new Uint32Array(r);
14
+ for (let o = 0; o < r; o++) {
15
+ let { h: r, l: s } = n(e[o], t);
16
+ [i[o], a[o]] = [r, s];
17
+ }
18
+ return [i, a];
13
19
  }
14
- const m = (t, r, n) => t << n | r >>> 32 - n, A = (t, r, n) => r << n | t >>> 32 - n, B = (t, r, n) => r << n - 32 | t >>> 64 - n, a = (t, r, n) => t << n - 32 | r >>> 64 - n;
15
- export {
16
- s as fromBig,
17
- B as rotlBH,
18
- a as rotlBL,
19
- m as rotlSH,
20
- A as rotlSL,
21
- h as split
22
- };
20
+ var i = (e, t, n) => e << n | t >>> 32 - n, a = (e, t, n) => t << n | e >>> 32 - n, o = (e, t, n) => t << n - 32 | e >>> 64 - n, s = (e, t, n) => e << n - 32 | t >>> 64 - n;
21
+ //#endregion
22
+ export { o as rotlBH, s as rotlBL, i as rotlSH, a as rotlSL, r as split };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./_md.cjs"),c=require("./utils.cjs"),I=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),b=new Uint32Array(64);class V extends e.HashMD{constructor(f){super(64,f,8,!1)}get(){const{A:f,B:n,C:x,D:a,E:r,F:o,G:s,H:i}=this;return[f,n,x,a,r,o,s,i]}set(f,n,x,a,r,o,s,i){this.A=f|0,this.B=n|0,this.C=x|0,this.D=a|0,this.E=r|0,this.F=o|0,this.G=s|0,this.H=i|0}process(f,n){for(let t=0;t<16;t++,n+=4)b[t]=f.getUint32(n,!1);for(let t=16;t<64;t++){const H=b[t-15],h=b[t-2],S=c.rotr(H,7)^c.rotr(H,18)^H>>>3,l=c.rotr(h,17)^c.rotr(h,19)^h>>>10;b[t]=l+b[t-7]+S+b[t-16]|0}let{A:x,B:a,C:r,D:o,E:s,F:i,G:d,H:A}=this;for(let t=0;t<64;t++){const H=c.rotr(s,6)^c.rotr(s,11)^c.rotr(s,25),h=A+H+e.Chi(s,i,d)+I[t]+b[t]|0,l=(c.rotr(x,2)^c.rotr(x,13)^c.rotr(x,22))+e.Maj(x,a,r)|0;A=d,d=i,i=s,s=o+h|0,o=r,r=a,a=x,x=h+l|0}x=x+this.A|0,a=a+this.B|0,r=r+this.C|0,o=o+this.D|0,s=s+this.E|0,i=i+this.F|0,d=d+this.G|0,A=A+this.H|0,this.set(x,a,r,o,s,i,d,A)}roundClean(){c.clean(b)}destroy(){this.set(0,0,0,0,0,0,0,0),c.clean(this.buffer)}}class _ extends V{A=e.SHA256_IV[0]|0;B=e.SHA256_IV[1]|0;C=e.SHA256_IV[2]|0;D=e.SHA256_IV[3]|0;E=e.SHA256_IV[4]|0;F=e.SHA256_IV[5]|0;G=e.SHA256_IV[6]|0;H=e.SHA256_IV[7]|0;constructor(){super(32)}}const g=c.createHasher(()=>new _,c.oidNist(1));exports._SHA256=_;exports.sha256=g;
1
+ const e=require(`./_u64.cjs`),t=require(`./utils.cjs`),n=require(`./_md.cjs`);var r=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),i=new Uint32Array(64),a=class extends n.HashMD{constructor(e){super(64,e,8,!1)}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){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}process(e,a){for(let t=0;t<16;t++,a+=4)i[t]=e.getUint32(a,!1);for(let e=16;e<64;e++){let n=i[e-15],r=i[e-2],a=t.rotr(n,7)^t.rotr(n,18)^n>>>3;i[e]=(t.rotr(r,17)^t.rotr(r,19)^r>>>10)+i[e-7]+a+i[e-16]|0}let{A:o,B:s,C:c,D:l,E:u,F:d,G:f,H:p}=this;for(let e=0;e<64;e++){let a=t.rotr(u,6)^t.rotr(u,11)^t.rotr(u,25),m=p+a+n.Chi(u,d,f)+r[e]+i[e]|0,h=(t.rotr(o,2)^t.rotr(o,13)^t.rotr(o,22))+n.Maj(o,s,c)|0;p=f,f=d,d=u,u=l+m|0,l=c,c=s,s=o,o=m+h|0}o=o+this.A|0,s=s+this.B|0,c=c+this.C|0,l=l+this.D|0,u=u+this.E|0,d=d+this.F|0,f=f+this.G|0,p=p+this.H|0,this.set(o,s,c,l,u,d,f,p)}roundClean(){t.clean(i)}destroy(){this.set(0,0,0,0,0,0,0,0),t.clean(this.buffer)}},o=class extends a{constructor(){super(32),this.A=n.SHA256_IV[0]|0,this.B=n.SHA256_IV[1]|0,this.C=n.SHA256_IV[2]|0,this.D=n.SHA256_IV[3]|0,this.E=n.SHA256_IV[4]|0,this.F=n.SHA256_IV[5]|0,this.G=n.SHA256_IV[6]|0,this.H=n.SHA256_IV[7]|0}},s=e.split(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map(e=>BigInt(e)));s[0],s[1];var c=t.createHasher(()=>new o,t.oidNist(1));exports.sha256=c;
@@ -1,124 +1,125 @@
1
- import { SHA256_IV as i, HashMD as p, Chi as B, Maj as D } from "./_md.js";
2
- import { createHasher as g, oidNist as E, clean as u, rotr as f } from "./utils.js";
3
- const F = /* @__PURE__ */ Uint32Array.from([
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
68
- ]), o = /* @__PURE__ */ new Uint32Array(64);
69
- class G extends p {
70
- constructor(r) {
71
- super(64, r, 8, !1);
72
- }
73
- get() {
74
- const { A: r, B: h, C: c, D: t, E: e, F: b, G: s, H: a } = this;
75
- return [r, h, c, t, e, b, s, a];
76
- }
77
- // prettier-ignore
78
- set(r, h, c, t, e, b, s, a) {
79
- this.A = r | 0, this.B = h | 0, this.C = c | 0, this.D = t | 0, this.E = e | 0, this.F = b | 0, this.G = s | 0, this.H = a | 0;
80
- }
81
- process(r, h) {
82
- for (let x = 0; x < 16; x++, h += 4)
83
- o[x] = r.getUint32(h, !1);
84
- for (let x = 16; x < 64; x++) {
85
- const H = o[x - 15], d = o[x - 2], m = f(H, 7) ^ f(H, 18) ^ H >>> 3, l = f(d, 17) ^ f(d, 19) ^ d >>> 10;
86
- o[x] = l + o[x - 7] + m + o[x - 16] | 0;
87
- }
88
- let { A: c, B: t, C: e, D: b, E: s, F: a, G: n, H: A } = this;
89
- for (let x = 0; x < 64; x++) {
90
- const H = f(s, 6) ^ f(s, 11) ^ f(s, 25), d = A + H + B(s, a, n) + F[x] + o[x] | 0, l = (f(c, 2) ^ f(c, 13) ^ f(c, 22)) + D(c, t, e) | 0;
91
- A = n, n = a, a = s, s = b + d | 0, b = e, e = t, t = c, c = d + l | 0;
92
- }
93
- c = c + this.A | 0, t = t + this.B | 0, e = e + this.C | 0, b = b + this.D | 0, s = s + this.E | 0, a = a + this.F | 0, n = n + this.G | 0, A = A + this.H | 0, this.set(c, t, e, b, s, a, n, A);
94
- }
95
- roundClean() {
96
- u(o);
97
- }
98
- destroy() {
99
- this.set(0, 0, 0, 0, 0, 0, 0, 0), u(this.buffer);
100
- }
101
- }
102
- class S extends G {
103
- // We cannot use array here since array allows indexing by variable
104
- // which means optimizer/compiler cannot use registers.
105
- A = i[0] | 0;
106
- B = i[1] | 0;
107
- C = i[2] | 0;
108
- D = i[3] | 0;
109
- E = i[4] | 0;
110
- F = i[5] | 0;
111
- G = i[6] | 0;
112
- H = i[7] | 0;
113
- constructor() {
114
- super(32);
115
- }
116
- }
117
- const U = /* @__PURE__ */ g(
118
- () => new S(),
119
- /* @__PURE__ */ E(1)
120
- );
121
- export {
122
- S as _SHA256,
123
- U as sha256
124
- };
1
+ import { split as e } from "./_u64.js";
2
+ import { clean as t, createHasher as n, oidNist as r, rotr as i } from "./utils.js";
3
+ import { Chi as a, HashMD as o, Maj as s, SHA256_IV as c } from "./_md.js";
4
+ //#region node_modules/.pnpm/@noble+hashes@2.0.0/node_modules/@noble/hashes/sha2.js
5
+ var l = /* @__PURE__ */ Uint32Array.from([
6
+ 1116352408,
7
+ 1899447441,
8
+ 3049323471,
9
+ 3921009573,
10
+ 961987163,
11
+ 1508970993,
12
+ 2453635748,
13
+ 2870763221,
14
+ 3624381080,
15
+ 310598401,
16
+ 607225278,
17
+ 1426881987,
18
+ 1925078388,
19
+ 2162078206,
20
+ 2614888103,
21
+ 3248222580,
22
+ 3835390401,
23
+ 4022224774,
24
+ 264347078,
25
+ 604807628,
26
+ 770255983,
27
+ 1249150122,
28
+ 1555081692,
29
+ 1996064986,
30
+ 2554220882,
31
+ 2821834349,
32
+ 2952996808,
33
+ 3210313671,
34
+ 3336571891,
35
+ 3584528711,
36
+ 113926993,
37
+ 338241895,
38
+ 666307205,
39
+ 773529912,
40
+ 1294757372,
41
+ 1396182291,
42
+ 1695183700,
43
+ 1986661051,
44
+ 2177026350,
45
+ 2456956037,
46
+ 2730485921,
47
+ 2820302411,
48
+ 3259730800,
49
+ 3345764771,
50
+ 3516065817,
51
+ 3600352804,
52
+ 4094571909,
53
+ 275423344,
54
+ 430227734,
55
+ 506948616,
56
+ 659060556,
57
+ 883997877,
58
+ 958139571,
59
+ 1322822218,
60
+ 1537002063,
61
+ 1747873779,
62
+ 1955562222,
63
+ 2024104815,
64
+ 2227730452,
65
+ 2361852424,
66
+ 2428436474,
67
+ 2756734187,
68
+ 3204031479,
69
+ 3329325298
70
+ ]), u = /* @__PURE__ */ new Uint32Array(64), d = class extends o {
71
+ constructor(e) {
72
+ super(64, e, 8, !1);
73
+ }
74
+ get() {
75
+ let { A: e, B: t, C: n, D: r, E: i, F: a, G: o, H: s } = this;
76
+ return [
77
+ e,
78
+ t,
79
+ n,
80
+ r,
81
+ i,
82
+ a,
83
+ o,
84
+ s
85
+ ];
86
+ }
87
+ set(e, t, n, r, i, a, o, s) {
88
+ 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;
89
+ }
90
+ process(e, t) {
91
+ for (let n = 0; n < 16; n++, t += 4) u[n] = e.getUint32(t, !1);
92
+ for (let e = 16; e < 64; e++) {
93
+ let t = u[e - 15], n = u[e - 2], r = i(t, 7) ^ i(t, 18) ^ t >>> 3;
94
+ u[e] = (i(n, 17) ^ i(n, 19) ^ n >>> 10) + u[e - 7] + r + u[e - 16] | 0;
95
+ }
96
+ let { A: n, B: r, C: o, D: c, E: d, F: f, G: p, H: m } = this;
97
+ for (let e = 0; e < 64; e++) {
98
+ let t = i(d, 6) ^ i(d, 11) ^ i(d, 25), h = m + t + a(d, f, p) + l[e] + u[e] | 0, g = (i(n, 2) ^ i(n, 13) ^ i(n, 22)) + s(n, r, o) | 0;
99
+ m = p, p = f, f = d, d = c + h | 0, c = o, o = r, r = n, n = h + g | 0;
100
+ }
101
+ n = n + this.A | 0, r = r + this.B | 0, o = o + this.C | 0, c = c + 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(n, r, o, c, d, f, p, m);
102
+ }
103
+ roundClean() {
104
+ t(u);
105
+ }
106
+ destroy() {
107
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), t(this.buffer);
108
+ }
109
+ }, f = class extends d {
110
+ A = c[0] | 0;
111
+ B = c[1] | 0;
112
+ C = c[2] | 0;
113
+ D = c[3] | 0;
114
+ E = c[4] | 0;
115
+ F = c[5] | 0;
116
+ G = c[6] | 0;
117
+ H = c[7] | 0;
118
+ constructor() {
119
+ super(32);
120
+ }
121
+ }, p = e((/* @__PURE__ */ "0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817".split(".")).map((e) => BigInt(e)));
122
+ p[0], p[1];
123
+ var m = /* @__PURE__ */ n(() => new f(), /* @__PURE__ */ r(1));
124
+ //#endregion
125
+ export { m as sha256 };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./_u64.cjs"),h=require("./utils.cjs"),B=BigInt(0),u=BigInt(1),A=BigInt(2),H=BigInt(7),S=BigInt(256),T=BigInt(113),O=[],y=[],w=[];for(let n=0,t=u,s=1,i=0;n<24;n++){[s,i]=[i,(2*s+3*i)%5],O.push(2*(5*i+s)),y.push((n+1)*(n+2)/2%64);let o=B;for(let r=0;r<7;r++)t=(t<<u^(t>>H)*T)%S,t&A&&(o^=u<<(u<<BigInt(r))-u);w.push(o)}const _=f.split(w,!0),F=_[0],X=_[1],I=(n,t,s)=>s>32?f.rotlBH(n,t,s):f.rotlSH(n,t,s),x=(n,t,s)=>s>32?f.rotlBL(n,t,s):f.rotlSL(n,t,s);function b(n,t=24){const s=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let e=0;e<10;e++)s[e]=n[e]^n[e+10]^n[e+20]^n[e+30]^n[e+40];for(let e=0;e<10;e+=2){const c=(e+8)%10,l=(e+2)%10,p=s[l],a=s[l+1],g=I(p,a,1)^s[c],L=x(p,a,1)^s[c+1];for(let d=0;d<50;d+=10)n[e+d]^=g,n[e+d+1]^=L}let o=n[2],r=n[3];for(let e=0;e<24;e++){const c=y[e],l=I(o,r,c),p=x(o,r,c),a=O[e];o=n[a],r=n[a+1],n[a]=l,n[a+1]=p}for(let e=0;e<50;e+=10){for(let c=0;c<10;c++)s[c]=n[e+c];for(let c=0;c<10;c++)n[e+c]^=~s[(c+2)%10]&s[(c+4)%10]}n[0]^=F[i],n[1]^=X[i]}h.clean(s)}class k{state;pos=0;posOut=0;finished=!1;state32;destroyed=!1;blockLen;suffix;outputLen;enableXOF=!1;rounds;constructor(t,s,i,o=!1,r=24){if(this.blockLen=t,this.suffix=s,this.outputLen=i,this.enableXOF=o,this.rounds=r,h.anumber(i,"outputLen"),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=h.u32(this.state)}clone(){return this._cloneInto()}keccak(){h.swap32IfBE(this.state32),b(this.state32,this.rounds),h.swap32IfBE(this.state32),this.posOut=0,this.pos=0}update(t){h.aexists(this),h.abytes(t);const{blockLen:s,state:i}=this,o=t.length;for(let r=0;r<o;){const e=Math.min(s-this.pos,o-r);for(let c=0;c<e;c++)i[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:i,blockLen:o}=this;t[i]^=s,(s&128)!==0&&i===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){h.aexists(this,!1),h.abytes(t),this.finish();const s=this.state,{blockLen:i}=this;for(let o=0,r=t.length;o<r;){this.posOut>=i&&this.keccak();const e=Math.min(i-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 h.anumber(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(h.aoutput(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,h.clean(this.state)}_cloneInto(t){const{blockLen:s,suffix:i,outputLen:o,rounds:r,enableXOF:e}=this;return t||=new k(s,i,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=i,t.outputLen=o,t.enableXOF=e,t.destroyed=this.destroyed,t}}const m=(n,t,s,i={})=>h.createHasher(()=>new k(t,n,s),i),E=m(1,136,32);exports.Keccak=k;exports.keccakP=b;exports.keccak_256=E;
1
+ const e=require(`./_u64.cjs`),t=require(`./utils.cjs`);var n=BigInt(0),r=BigInt(1),i=BigInt(2),a=BigInt(7),o=BigInt(256),s=BigInt(113),c=[],l=[],u=[];for(let e=0,t=r,d=1,f=0;e<24;e++){[d,f]=[f,(2*d+3*f)%5],c.push(2*(5*f+d)),l.push((e+1)*(e+2)/2%64);let p=n;for(let e=0;e<7;e++)t=(t<<r^(t>>a)*s)%o,t&i&&(p^=r<<(r<<BigInt(e))-r);u.push(p)}var d=e.split(u,!0),f=d[0],p=d[1],m=(t,n,r)=>r>32?e.rotlBH(t,n,r):e.rotlSH(t,n,r),h=(t,n,r)=>r>32?e.rotlBL(t,n,r):e.rotlSL(t,n,r);function g(e,n=24){let r=new Uint32Array(10);for(let t=24-n;t<24;t++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,a=r[i],o=r[i+1],s=m(a,o,1)^r[n],c=h(a,o,1)^r[n+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=c}let n=e[2],i=e[3];for(let t=0;t<24;t++){let r=l[t],a=m(n,i,r),o=h(n,i,r),s=c[t];n=e[s],i=e[s+1],e[s]=a,e[s+1]=o}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=f[t],e[1]^=p[t]}t.clean(r)}var _=class e{constructor(e,n,r,i=!1,a=24){if(this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=a,t.anumber(r,`outputLen`),!(0<e&&e<200))throw Error(`only keccak-f1600 function is supported`);this.state=new Uint8Array(200),this.state32=t.u32(this.state)}clone(){return this._cloneInto()}keccak(){t.swap32IfBE(this.state32),g(this.state32,this.rounds),t.swap32IfBE(this.state32),this.posOut=0,this.pos=0}update(e){t.aexists(this),t.abytes(e);let{blockLen:n,state:r}=this,i=e.length;for(let t=0;t<i;){let a=Math.min(n-this.pos,i-t);for(let n=0;n<a;n++)r[this.pos++]^=e[t++];this.pos===n&&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(e){t.aexists(this,!1),t.abytes(e),this.finish();let n=this.state,{blockLen:r}=this;for(let t=0,i=e.length;t<i;){this.posOut>=r&&this.keccak();let a=Math.min(r-this.posOut,i-t);e.set(n.subarray(this.posOut,this.posOut+a),t),this.posOut+=a,t+=a}return e}xofInto(e){if(!this.enableXOF)throw Error(`XOF is not possible for this instance`);return this.writeInto(e)}xof(e){return t.anumber(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(t.aoutput(e,this),this.finished)throw Error(`digest() was already called`);return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,t.clean(this.state)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:a,enableXOF:o}=this;return t||=new e(n,r,i,o,a),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=r,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}},v=((e,n,r,i={})=>t.createHasher(()=>new _(n,e,r),i))(1,136,32);exports.keccak_256=v;