@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.
- package/dist/.ts-temp/tsconfig.tsbuildinfo +1 -1
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/_virtual/_rolldown/runtime.js +20 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +112 -488
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js +11 -11
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js +62 -85
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js +153 -190
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.js +56 -65
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js +125 -151
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js +470 -575
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js +26 -40
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js +4 -4
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js +38 -42
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js +28 -42
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.js +17 -26
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.js +52 -59
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.js +20 -19
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.js +118 -113
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.js +95 -105
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js +26 -32
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_md.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_md.js +71 -82
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_u64.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_u64.js +20 -20
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha2.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha2.js +125 -124
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha3.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha3.js +102 -116
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/utils.js +62 -76
- package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs +1 -1
- package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +519 -614
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js +15 -19
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js +15 -19
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js +15 -19
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js +10 -12
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.js +6 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.js +6 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js +7 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.js +6 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +9 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js +10 -15
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.js +26 -32
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -4
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js +8 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +12 -13
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js +11 -11
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js +8 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js +9 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js +8 -11
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js +11 -11
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js +4 -4
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +4 -4
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js +8 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.js +6 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js +14 -16
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js +10 -11
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.js +4 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.js +6 -6
- package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.cjs +1 -1
- package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.js +121 -118
- package/dist/node_modules/.pnpm/numeral@2.0.6/node_modules/numeral/numeral.cjs +1 -1
- package/dist/node_modules/.pnpm/numeral@2.0.6/node_modules/numeral/numeral.js +377 -417
- package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.cjs +1 -1
- package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js +546 -635
- package/dist/paymaster.cjs +1 -1
- package/dist/paymaster.js +2 -11
- package/dist/simulation.cjs +1 -1
- package/dist/simulation.js +22 -90
- package/dist/src/account/account.model.cjs +1 -1
- package/dist/src/account/account.model.js +58 -52
- package/dist/src/account/accountv4.cjs +1 -1
- package/dist/src/account/accountv4.js +9 -11
- package/dist/src/account/preferences.model.cjs +1 -1
- package/dist/src/account/preferences.model.js +12 -10
- package/dist/src/accountNameGenerator/colors.cjs +1 -1
- package/dist/src/accountNameGenerator/colors.js +24 -24
- package/dist/src/accountNameGenerator/index.cjs +1 -1
- package/dist/src/accountNameGenerator/index.js +23 -23
- package/dist/src/accountNameGenerator/x-names.json.cjs +1 -1
- package/dist/src/accountNameGenerator/x-names.json.js +1922 -7
- package/dist/src/assets/tokens.json.cjs +1 -1
- package/dist/src/assets/tokens.json.js +180 -180
- package/dist/src/backend/schema.cjs +1 -1
- package/dist/src/backend/schema.js +9 -12
- package/dist/src/backend/sessionKeys/schema.cjs +1 -1
- package/dist/src/backend/sessionKeys/schema.js +27 -30
- package/dist/src/bigdecimal/constants.cjs +1 -1
- package/dist/src/bigdecimal/constants.js +6 -3
- package/dist/src/bigdecimal/createUnitsSchema.cjs +1 -1
- package/dist/src/bigdecimal/createUnitsSchema.js +7 -7
- package/dist/src/bigdecimal/formatUnits.cjs +1 -1
- package/dist/src/bigdecimal/formatUnits.js +9 -10
- package/dist/src/bigdecimal/index.cjs +1 -1
- package/dist/src/bigdecimal/index.js +45 -41
- package/dist/src/bigdecimal/lib.cjs +1 -1
- package/dist/src/bigdecimal/lib.js +105 -117
- package/dist/src/bigdecimal/parseUnits.cjs +1 -1
- package/dist/src/bigdecimal/parseUnits.js +18 -21
- package/dist/src/bigdecimal/utils.cjs +1 -1
- package/dist/src/bigdecimal/utils.js +33 -30
- package/dist/src/cache/CacheService.cjs +1 -1
- package/dist/src/cache/CacheService.js +32 -36
- package/dist/src/chains/starknet/address.cjs +1 -1
- package/dist/src/chains/starknet/address.js +73 -117
- package/dist/src/chains/starknet/addressDomain.cjs +1 -1
- package/dist/src/chains/starknet/addressDomain.js +14 -29
- package/dist/src/chains/starknet/addressInput.cjs +1 -1
- package/dist/src/chains/starknet/addressInput.js +6 -7
- package/dist/src/chains/starknet/argentName.cjs +1 -1
- package/dist/src/chains/starknet/argentName.js +10 -14
- package/dist/src/chains/starknet/cairoVersionSchema.cjs +1 -1
- package/dist/src/chains/starknet/cairoVersionSchema.js +5 -5
- package/dist/src/chains/starknet/constants.cjs +1 -1
- package/dist/src/chains/starknet/constants.js +4 -10
- package/dist/src/chains/starknet/getAddressFromArgentName.cjs +1 -1
- package/dist/src/chains/starknet/getAddressFromArgentName.js +38 -46
- package/dist/src/chains/starknet/getAddressFromStarkName.cjs +1 -1
- package/dist/src/chains/starknet/getAddressFromStarkName.js +59 -66
- package/dist/src/chains/starknet/network.cjs +1 -1
- package/dist/src/chains/starknet/network.js +20 -26
- package/dist/src/chains/starknet/services/address/StarknetAddressService.cjs +1 -1
- package/dist/src/chains/starknet/services/address/StarknetAddressService.js +31 -36
- package/dist/src/chains/starknet/services/deploymentData/constants.cjs +1 -1
- package/dist/src/chains/starknet/services/deploymentData/constants.js +14 -21
- package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.cjs +1 -1
- package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.js +15 -17
- package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs +1 -1
- package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.js +61 -65
- package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.cjs +1 -1
- package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.js +46 -65
- package/dist/src/chains/starknet/starknetId.cjs +1 -1
- package/dist/src/chains/starknet/starknetId.js +10 -14
- package/dist/src/currencyFetchService/CurrencyFetchService.cjs +1 -1
- package/dist/src/currencyFetchService/CurrencyFetchService.js +13 -18
- package/dist/src/currencyFetchService/types.ts.cjs +1 -1
- package/dist/src/currencyFetchService/types.ts.js +9 -12
- package/dist/src/errors/account.cjs +1 -1
- package/dist/src/errors/account.js +12 -13
- package/dist/src/errors/address.cjs +1 -1
- package/dist/src/errors/address.js +11 -12
- package/dist/src/errors/baseErrors.cjs +1 -1
- package/dist/src/errors/baseErrors.js +14 -14
- package/dist/src/errors/call.cjs +1 -1
- package/dist/src/errors/call.js +12 -13
- package/dist/src/errors/network.cjs +1 -1
- package/dist/src/errors/network.js +11 -12
- package/dist/src/errors/review.cjs +1 -1
- package/dist/src/errors/review.js +11 -12
- package/dist/src/errors/swap.cjs +1 -1
- package/dist/src/errors/swap.js +12 -13
- package/dist/src/features/paymaster/PaymasterService.cjs +1 -1
- package/dist/src/features/paymaster/PaymasterService.js +73 -87
- package/dist/src/features/paymaster/types.cjs +1 -1
- package/dist/src/features/paymaster/types.js +41 -51
- package/dist/src/features/simulation/activity/normalize.cjs +1 -1
- package/dist/src/features/simulation/activity/normalize.js +36 -38
- package/dist/src/features/simulation/activity/schema.cjs +1 -1
- package/dist/src/features/simulation/activity/schema.js +224 -250
- package/dist/src/features/simulation/activity/utils/createNativeActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/createNativeActivity.js +23 -27
- package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.js +14 -21
- package/dist/src/features/simulation/activity/utils/getOverallLastModified.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/getOverallLastModified.js +5 -5
- package/dist/src/features/simulation/activity/utils/hasDelegationActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/hasDelegationActivity.js +4 -4
- package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.js +15 -19
- package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.js +15 -19
- package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js +5 -5
- package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.js +19 -21
- package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.js +15 -19
- package/dist/src/features/simulation/activity/utils/isSwapActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isSwapActivity.js +17 -18
- package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +15 -19
- package/dist/src/features/simulation/activity/utils/parseAccountActivities.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/parseAccountActivities.js +12 -12
- package/dist/src/features/simulation/activity/utils/parseFinanceActivities.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/parseFinanceActivities.js +32 -32
- package/dist/src/features/simulation/fees/schema.cjs +1 -1
- package/dist/src/features/simulation/fees/schema.js +33 -47
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +15 -17
- package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.js +5 -5
- package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/schema.js +221 -242
- package/dist/src/features/simulation/warning/helper.cjs +1 -1
- package/dist/src/features/simulation/warning/helper.js +12 -11
- package/dist/src/features/simulation/warning/schema.cjs +1 -1
- package/dist/src/features/simulation/warning/schema.js +10 -11
- package/dist/src/features/swap/models/order.model.cjs +1 -1
- package/dist/src/features/swap/models/order.model.js +16 -19
- package/dist/src/features/swap/models/quote.model.cjs +1 -1
- package/dist/src/features/swap/models/quote.model.js +31 -35
- package/dist/src/features/swap/models/trade.model.cjs +1 -1
- package/dist/src/features/swap/models/trade.model.js +25 -27
- package/dist/src/features/swap/services/SwapSharedService.cjs +1 -1
- package/dist/src/features/swap/services/SwapSharedService.js +71 -75
- package/dist/src/features/swap/services/SwapTransactionService.cjs +1 -1
- package/dist/src/features/swap/services/SwapTransactionService.js +57 -63
- package/dist/src/features/swap/utils/slippage.cjs +1 -1
- package/dist/src/features/swap/utils/slippage.js +18 -25
- package/dist/src/features/swap/utils/totalFee.cjs +1 -1
- package/dist/src/features/swap/utils/totalFee.js +12 -12
- package/dist/src/http/DateService.cjs +1 -1
- package/dist/src/http/DateService.js +15 -18
- package/dist/src/http/HttpError.cjs +1 -1
- package/dist/src/http/HttpError.js +7 -7
- package/dist/src/http/HttpService.cjs +1 -1
- package/dist/src/http/HttpService.js +117 -134
- package/dist/src/http/IHttpService.cjs +1 -1
- package/dist/src/http/IHttpService.js +6 -6
- package/dist/src/http/SWRService.cjs +1 -1
- package/dist/src/http/SWRService.js +50 -57
- package/dist/src/http/fetcher.cjs +1 -1
- package/dist/src/http/fetcher.js +29 -35
- package/dist/src/http/time.cjs +1 -1
- package/dist/src/http/time.js +15 -18
- package/dist/src/knownDapps/KnownDappsBackendService.cjs +1 -1
- package/dist/src/knownDapps/KnownDappsBackendService.js +13 -14
- package/dist/src/knownDapps/schema.cjs +1 -1
- package/dist/src/knownDapps/schema.js +41 -44
- package/dist/src/knownDapps/utils/getDapplandUrl.cjs +1 -1
- package/dist/src/knownDapps/utils/getDapplandUrl.js +7 -8
- package/dist/src/nameResolution/ResolveNameService.cjs +1 -1
- package/dist/src/nameResolution/ResolveNameService.js +34 -41
- package/dist/src/nameResolution/schema.cjs +1 -1
- package/dist/src/nameResolution/schema.js +20 -25
- package/dist/src/nfts/BackendNftService.cjs +1 -1
- package/dist/src/nfts/BackendNftService.js +103 -116
- package/dist/src/nfts/BackendPaginationError.cjs +1 -1
- package/dist/src/nfts/BackendPaginationError.js +11 -12
- package/dist/src/nfts/utils.cjs +1 -1
- package/dist/src/nfts/utils.js +11 -14
- package/dist/src/onchainRecovery/OnchainRecoveryService.cjs +1 -1
- package/dist/src/onchainRecovery/OnchainRecoveryService.js +38 -68
- package/dist/src/onchainRecovery/schema.cjs +1 -1
- package/dist/src/onchainRecovery/schema.js +35 -49
- package/dist/src/platform/isBraveBrowser.cjs +1 -1
- package/dist/src/platform/isBraveBrowser.js +8 -10
- package/dist/src/platform/isBrowser.cjs +1 -1
- package/dist/src/platform/isBrowser.js +17 -22
- package/dist/src/signer/mergeOwnerGuardianSignatures.cjs +1 -1
- package/dist/src/signer/mergeOwnerGuardianSignatures.js +28 -30
- package/dist/src/signer/multisigner.cjs +1 -1
- package/dist/src/signer/multisigner.js +16 -17
- package/dist/src/signer/seedphrase.cjs +1 -1
- package/dist/src/signer/seedphrase.js +7 -7
- package/dist/src/staking/schema.cjs +1 -1
- package/dist/src/staking/schema.js +146 -162
- package/dist/src/storage/base.cjs +1 -1
- package/dist/src/storage/base.js +33 -34
- package/dist/src/storage/utils.cjs +1 -1
- package/dist/src/storage/utils.js +19 -28
- package/dist/src/tokens/balances.cjs +1 -1
- package/dist/src/tokens/balances.js +34 -38
- package/dist/src/tokens/constants.cjs +1 -1
- package/dist/src/tokens/constants.js +4 -4
- package/dist/src/tokens/convertCurrencyValueToTokenAmount.cjs +1 -1
- package/dist/src/tokens/convertCurrencyValueToTokenAmount.js +8 -9
- package/dist/src/tokens/convertTokenAmountToCurrencyValue.cjs +1 -1
- package/dist/src/tokens/convertTokenAmountToCurrencyValue.js +14 -15
- package/dist/src/tokens/convertTokenUnitAmountWithDecimals.cjs +1 -1
- package/dist/src/tokens/convertTokenUnitAmountWithDecimals.js +8 -9
- package/dist/src/tokens/ensureDecimals.cjs +1 -1
- package/dist/src/tokens/ensureDecimals.js +4 -4
- package/dist/src/tokens/getCurrencySymbol.cjs +1 -1
- package/dist/src/tokens/getCurrencySymbol.js +14 -14
- package/dist/src/tokens/isUnlimitedAmount.cjs +1 -1
- package/dist/src/tokens/isUnlimitedAmount.js +5 -5
- package/dist/src/tokens/prettifyCurrencyValue.cjs +1 -1
- package/dist/src/tokens/prettifyCurrencyValue.js +13 -14
- package/dist/src/tokens/prettifyTokenAmount.cjs +1 -1
- package/dist/src/tokens/prettifyTokenAmount.js +22 -22
- package/dist/src/tokens/service/implementation.cjs +1 -1
- package/dist/src/tokens/service/implementation.js +28 -40
- package/dist/src/tokens/service/tokenError.cjs +1 -1
- package/dist/src/tokens/service/tokenError.js +11 -12
- package/dist/src/tokens/service/types/backend.model.cjs +1 -1
- package/dist/src/tokens/service/types/backend.model.js +128 -163
- package/dist/src/tokens/service/types/defiPosition.model.cjs +1 -1
- package/dist/src/tokens/service/types/defiPosition.model.js +83 -99
- package/dist/src/tokens/service/types/defiPositionType.model.cjs +1 -1
- package/dist/src/tokens/service/types/defiPositionType.model.js +9 -9
- package/dist/src/tokens/service/types/unclaimedRewards.model.cjs +1 -1
- package/dist/src/tokens/service/types/unclaimedRewards.model.js +15 -16
- package/dist/src/tokens/service/types/webToken.model.cjs +1 -1
- package/dist/src/tokens/service/types/webToken.model.js +28 -51
- package/dist/src/tokens/utils.cjs +1 -1
- package/dist/src/tokens/utils.js +5 -9
- package/dist/src/transactions/amount.cjs +1 -1
- package/dist/src/transactions/amount.js +17 -24
- package/dist/src/transactions/buildTransactions.cjs +1 -1
- package/dist/src/transactions/buildTransactions.js +30 -33
- package/dist/src/transactions/errors.cjs +1 -1
- package/dist/src/transactions/errors.js +11 -18
- package/dist/src/transactions/estimate/adjustment.cjs +1 -1
- package/dist/src/transactions/estimate/adjustment.js +6 -6
- package/dist/src/transactions/estimate/argentMaxFee.cjs +1 -1
- package/dist/src/transactions/estimate/argentMaxFee.js +10 -13
- package/dist/src/transactions/estimate/error.cjs +1 -1
- package/dist/src/transactions/estimate/error.js +12 -13
- package/dist/src/transactions/estimate/model.cjs +1 -1
- package/dist/src/transactions/estimate/model.js +18 -13
- package/dist/src/transactions/estimate/utils.cjs +1 -1
- package/dist/src/transactions/estimate/utils.js +139 -172
- package/dist/src/transactions/findTransfersAndApprovals.cjs +1 -1
- package/dist/src/transactions/findTransfersAndApprovals.js +34 -30
- package/dist/src/transactions/getPrettyRcpError.cjs +1 -1
- package/dist/src/transactions/getPrettyRcpError.js +8 -10
- package/dist/src/transactions/service/implementation.cjs +1 -1
- package/dist/src/transactions/service/implementation.js +187 -208
- package/dist/src/transactions/service/types.cjs +1 -1
- package/dist/src/transactions/service/types.js +9 -9
- package/dist/src/transactions/service/utils.cjs +1 -1
- package/dist/src/transactions/service/utils.js +24 -25
- package/dist/src/transactions/transactionExecuteTypes.cjs +1 -1
- package/dist/src/transactions/transactionExecuteTypes.js +8 -9
- package/dist/src/transactions/transactionReviewTypes.cjs +1 -1
- package/dist/src/transactions/transactionReviewTypes.js +9 -9
- package/dist/src/transactions/transactionVersion.cjs +1 -1
- package/dist/src/transactions/transactionVersion.js +8 -13
- package/dist/src/transactions/txv3.cjs +1 -1
- package/dist/src/transactions/txv3.js +10 -11
- package/dist/src/utils/address.cjs +1 -1
- package/dist/src/utils/address.js +4 -4
- package/dist/src/utils/arrays.cjs +1 -1
- package/dist/src/utils/arrays.js +4 -4
- package/dist/src/utils/avatarImage.cjs +4 -4
- package/dist/src/utils/avatarImage.js +35 -40
- package/dist/src/utils/base58.cjs +1 -1
- package/dist/src/utils/base58.js +12 -15
- package/dist/src/utils/bigNumber.cjs +1 -1
- package/dist/src/utils/bigNumber.d.ts +1 -1
- package/dist/src/utils/bigNumber.js +5 -7
- package/dist/src/utils/bips.cjs +1 -1
- package/dist/src/utils/bips.js +12 -10
- package/dist/src/utils/daysBetween.cjs +1 -1
- package/dist/src/utils/daysBetween.js +6 -6
- package/dist/src/utils/env.cjs +1 -1
- package/dist/src/utils/env.js +4 -4
- package/dist/src/utils/hex.cjs +1 -1
- package/dist/src/utils/hex.js +7 -8
- package/dist/src/utils/id.cjs +1 -1
- package/dist/src/utils/id.js +7 -7
- package/dist/src/utils/initials.cjs +1 -1
- package/dist/src/utils/initials.js +12 -15
- package/dist/src/utils/isContractDeployed.cjs +1 -1
- package/dist/src/utils/isContractDeployed.js +9 -9
- package/dist/src/utils/nonNullable.cjs +1 -1
- package/dist/src/utils/nonNullable.js +6 -6
- package/dist/src/utils/number/abbreviateNumber.cjs +1 -1
- package/dist/src/utils/number/abbreviateNumber.js +13 -14
- package/dist/src/utils/number/isAllowedAddressHexInputValue.cjs +1 -1
- package/dist/src/utils/number/isAllowedAddressHexInputValue.js +4 -7
- package/dist/src/utils/number/isAllowedNumericInputValue.cjs +1 -1
- package/dist/src/utils/number/isAllowedNumericInputValue.js +5 -5
- package/dist/src/utils/number/isNumeric.cjs +1 -1
- package/dist/src/utils/number/isNumeric.js +4 -4
- package/dist/src/utils/number/prettifyNumber.cjs +1 -1
- package/dist/src/utils/number/prettifyNumber.js +65 -75
- package/dist/src/utils/parseAmount.cjs +1 -1
- package/dist/src/utils/parseAmount.js +10 -11
- package/dist/src/utils/pluralise.cjs +1 -1
- package/dist/src/utils/pluralise.js +4 -4
- package/dist/src/utils/readFileAsString.cjs +1 -1
- package/dist/src/utils/readFileAsString.js +6 -6
- package/dist/src/utils/retryUntilInitialised.cjs +1 -1
- package/dist/src/utils/retryUntilInitialised.js +21 -20
- package/dist/src/utils/schemas.cjs +1 -1
- package/dist/src/utils/schemas.js +29 -26
- package/dist/src/utils/starknet/starknet.cjs +1 -1
- package/dist/src/utils/starknet/starknet.js +64 -77
- package/dist/src/utils/starknet/starknetLibTypes.cjs +1 -1
- package/dist/src/utils/starknet/starknetLibTypes.js +7 -7
- package/dist/src/utils/starknet/starknetSchemas.cjs +1 -1
- package/dist/src/utils/starknet/starknetSchemas.js +84 -99
- package/dist/src/utils/transactions.cjs +1 -1
- package/dist/src/utils/transactions.js +10 -10
- package/dist/src/utils/url/urlWithQuery.cjs +1 -1
- package/dist/src/utils/url/urlWithQuery.js +8 -8
- package/dist/src/utils/voidify.cjs +1 -1
- package/dist/src/utils/voidify.js +7 -7
- package/dist/swap.cjs +1 -1
- package/dist/swap.js +8 -22
- package/package.json +20 -19
- package/dist/.eslintrc.d.cts +0 -39
- package/dist/_virtual/_commonjsHelpers.cjs +0 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -6
- package/dist/_virtual/numeral.cjs +0 -1
- package/dist/_virtual/numeral.js +0 -7
- package/dist/_virtual/numeral2.cjs +0 -1
- package/dist/_virtual/numeral2.js +0 -4
- package/dist/_virtual/semver.cjs +0 -1
- package/dist/_virtual/semver.js +0 -7
- package/dist/_virtual/semver2.cjs +0 -1
- package/dist/_virtual/semver2.js +0 -4
|
@@ -1,85 +1,74 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
6
|
-
|
|
6
|
+
function o(e, t, n) {
|
|
7
|
+
return e & t ^ e & n ^ t & n;
|
|
7
8
|
}
|
|
8
|
-
class
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
81
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
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;
|