@argent/x-shared 1.37.0 → 1.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.eslintrc.d.cts +45 -0
- package/dist/_virtual/_commonjsHelpers.cjs +1 -0
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/semver.cjs +1 -0
- package/dist/_virtual/semver.js +4 -0
- package/dist/commitlint.config.d.cts +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -19
- package/dist/index.js +424 -4
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js +14 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js +88 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js +203 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.js +68 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js +166 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js +581 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js +48 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js +4 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js +42 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js +47 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.js +31 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.js +61 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.js +21 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.js +114 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.js +107 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js +38 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_assert.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_assert.js +32 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_u64.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/_u64.js +21 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/sha3.js +107 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.cjs +1 -0
- package/dist/node_modules/.pnpm/@noble_hashes@1.5.0/node_modules/@noble/hashes/esm/utils.js +44 -0
- package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs +1 -0
- package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +622 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js +20 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js +20 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js +20 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js +13 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.js +8 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.js +9 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js +10 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.js +9 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.js +9 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.js +6 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js +16 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.js +33 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.js +9 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +15 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js +12 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.js +9 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js +17 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js +12 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.js +5 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.cjs +1 -0
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.js +7 -0
- package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.cjs +1 -0
- package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.js +134 -0
- package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.cjs +1 -0
- package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js +629 -0
- package/dist/simulation.cjs +1 -0
- package/dist/simulation.d.ts +1 -1
- package/dist/simulation.js +69 -1
- package/dist/src/account/account.model.cjs +1 -0
- package/dist/src/account/account.model.js +45 -0
- package/dist/src/account/accountv4.cjs +1 -0
- package/dist/src/account/accountv4.js +14 -0
- package/dist/src/account/preferences.model.cjs +1 -0
- package/dist/src/account/preferences.model.js +11 -0
- package/dist/src/assets/tokens.json.cjs +1 -0
- package/dist/src/assets/tokens.json.js +181 -0
- package/dist/src/backend/schema.cjs +1 -0
- package/dist/src/backend/schema.js +14 -0
- package/dist/src/bigdecimal/constants.cjs +1 -0
- package/dist/src/bigdecimal/constants.js +4 -0
- package/dist/src/bigdecimal/createUnitsSchema.cjs +1 -0
- package/dist/src/bigdecimal/createUnitsSchema.js +8 -0
- package/dist/src/bigdecimal/formatUnits.cjs +1 -0
- package/dist/src/bigdecimal/formatUnits.js +11 -0
- package/dist/src/bigdecimal/index.cjs +1 -0
- package/dist/src/bigdecimal/index.js +33 -0
- package/dist/src/bigdecimal/lib.cjs +1 -0
- package/dist/src/bigdecimal/lib.js +53 -0
- package/dist/src/bigdecimal/parseUnits.cjs +1 -0
- package/dist/src/bigdecimal/parseUnits.js +11 -0
- package/dist/src/bigdecimal/utils.cjs +1 -0
- package/dist/src/bigdecimal/utils.js +37 -0
- package/dist/src/cache/CacheService.cjs +1 -0
- package/dist/src/cache/CacheService.js +37 -0
- package/dist/src/chains/starknet/address.cjs +1 -0
- package/dist/src/chains/starknet/address.js +64 -0
- package/dist/src/chains/starknet/addressDomain.cjs +1 -0
- package/dist/src/chains/starknet/addressDomain.js +29 -0
- package/dist/src/chains/starknet/addressInput.cjs +1 -0
- package/dist/src/chains/starknet/addressInput.js +7 -0
- package/dist/src/chains/starknet/argentName.cjs +1 -0
- package/dist/src/chains/starknet/argentName.js +14 -0
- package/dist/src/chains/starknet/cairoVersionSchema.cjs +1 -0
- package/dist/src/chains/starknet/cairoVersionSchema.js +5 -0
- package/dist/src/chains/starknet/constants.cjs +1 -0
- package/dist/src/chains/starknet/constants.js +10 -0
- package/dist/src/chains/starknet/getAddressFromArgentName.cjs +1 -0
- package/dist/src/chains/starknet/getAddressFromArgentName.js +48 -0
- package/dist/src/chains/starknet/getAddressFromStarkName.cjs +1 -0
- package/dist/src/chains/starknet/getAddressFromStarkName.js +70 -0
- package/dist/src/chains/starknet/network.cjs +1 -0
- package/dist/src/chains/starknet/network.js +20 -0
- package/dist/src/chains/starknet/services/address/StarknetAddressService.cjs +1 -0
- package/dist/src/chains/starknet/services/address/StarknetAddressService.js +38 -0
- package/dist/src/chains/starknet/services/deploymentData/constants.cjs +1 -0
- package/dist/src/chains/starknet/services/deploymentData/constants.js +22 -0
- package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.cjs +1 -0
- package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.js +19 -0
- package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs +1 -0
- package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.js +69 -0
- package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.cjs +1 -0
- package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.js +59 -0
- package/dist/src/chains/starknet/starknetId.cjs +1 -0
- package/dist/src/chains/starknet/starknetId.js +14 -0
- package/dist/src/errors/account.cjs +1 -0
- package/dist/src/errors/account.js +14 -0
- package/dist/src/errors/address.cjs +1 -0
- package/dist/src/errors/address.js +14 -0
- package/dist/src/errors/baseErrors.cjs +1 -0
- package/dist/src/errors/baseErrors.js +15 -0
- package/dist/src/errors/call.cjs +1 -0
- package/dist/src/errors/call.js +14 -0
- package/dist/src/errors/network.cjs +1 -0
- package/dist/src/errors/network.js +14 -0
- package/dist/src/errors/review.cjs +1 -0
- package/dist/src/errors/review.js +14 -0
- package/dist/src/errors/swap.cjs +1 -0
- package/dist/src/errors/swap.js +14 -0
- package/dist/src/features/simulation/activity/normalize.cjs +1 -0
- package/dist/src/features/simulation/activity/normalize.js +40 -0
- package/dist/src/features/simulation/activity/schema.cjs +1 -0
- package/dist/src/features/simulation/activity/schema.js +236 -0
- package/dist/src/features/simulation/activity/utils/createNativeActivity.cjs +1 -0
- package/dist/src/features/simulation/activity/utils/createNativeActivity.js +31 -0
- package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.cjs +1 -0
- package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.js +24 -0
- package/dist/src/features/simulation/activity/utils/getOverallLastModified.cjs +1 -0
- package/dist/src/features/simulation/activity/utils/getOverallLastModified.js +6 -0
- package/dist/src/features/simulation/activity/utils/hasDelegationActivity.cjs +1 -0
- package/dist/src/features/simulation/activity/utils/hasDelegationActivity.js +10 -0
- package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs +1 -0
- package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js +11 -0
- package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.cjs +1 -0
- package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.js +26 -0
- package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -0
- package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +22 -0
- package/dist/src/features/simulation/activity/utils/parseAccountActivities.cjs +1 -0
- package/dist/src/features/simulation/activity/utils/parseAccountActivities.js +13 -0
- package/dist/src/features/simulation/activity/utils/parseFinanceActivities.cjs +1 -0
- package/dist/src/features/simulation/activity/utils/parseFinanceActivities.js +33 -0
- package/dist/src/features/simulation/fees/schema.cjs +1 -0
- package/dist/src/features/simulation/fees/schema.js +20 -0
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -0
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +18 -0
- package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.cjs +1 -0
- package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.js +6 -0
- package/dist/src/features/simulation/transactionReview/schema.cjs +1 -0
- package/dist/src/features/simulation/transactionReview/schema.js +215 -0
- package/dist/src/features/simulation/warning/helper.cjs +1 -0
- package/dist/src/features/simulation/warning/helper.js +12 -0
- package/dist/src/features/simulation/warning/schema.cjs +1 -0
- package/dist/src/features/simulation/warning/schema.js +11 -0
- package/dist/src/features/swap/models/order.model.cjs +1 -0
- package/dist/src/features/swap/models/order.model.js +20 -0
- package/dist/src/features/swap/models/quote.model.cjs +1 -0
- package/dist/src/features/swap/models/quote.model.js +36 -0
- package/dist/src/features/swap/models/trade.model.cjs +1 -0
- package/dist/src/features/swap/models/trade.model.js +28 -0
- package/dist/src/features/swap/services/implementation.cjs +1 -0
- package/dist/src/features/swap/services/implementation.js +76 -0
- package/dist/src/features/swap/utils/slippage.cjs +1 -0
- package/dist/src/features/swap/utils/slippage.js +28 -0
- package/dist/src/features/swap/utils/totalFee.cjs +1 -0
- package/dist/src/features/swap/utils/totalFee.js +13 -0
- package/dist/src/http/DateService.cjs +1 -0
- package/dist/src/http/DateService.js +17 -0
- package/dist/src/http/HttpError.cjs +1 -0
- package/dist/src/http/HttpError.js +8 -0
- package/dist/src/http/HttpService.cjs +1 -0
- package/dist/src/http/HttpService.js +90 -0
- package/dist/src/http/IHttpService.cjs +1 -0
- package/dist/src/http/IHttpService.js +7 -0
- package/dist/src/http/SWRService.cjs +1 -0
- package/dist/src/http/SWRService.js +60 -0
- package/dist/src/http/fetcher.cjs +1 -0
- package/dist/src/http/fetcher.js +36 -0
- package/dist/{http → src/http}/index.d.ts +0 -1
- package/dist/src/http/time.cjs +1 -0
- package/dist/src/http/time.js +19 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/knownDapps/KnownDappsBackendService.cjs +1 -0
- package/dist/src/knownDapps/KnownDappsBackendService.js +16 -0
- package/dist/src/knownDapps/schema.cjs +1 -0
- package/dist/src/knownDapps/schema.js +44 -0
- package/dist/src/knownDapps/utils/getDapplandUrl.cjs +1 -0
- package/dist/src/knownDapps/utils/getDapplandUrl.js +12 -0
- package/dist/src/nameResolution/ResolveNameService.cjs +1 -0
- package/dist/src/nameResolution/ResolveNameService.js +42 -0
- package/dist/src/nameResolution/schema.cjs +1 -0
- package/dist/src/nameResolution/schema.js +25 -0
- package/dist/src/nfts/BackendNftService.cjs +1 -0
- package/dist/src/nfts/BackendNftService.js +119 -0
- package/dist/src/nfts/BackendPaginationError.cjs +1 -0
- package/dist/src/nfts/BackendPaginationError.js +13 -0
- package/dist/{nfts → src/nfts}/index.d.ts +0 -1
- package/dist/src/nfts/utils.cjs +1 -0
- package/dist/src/nfts/utils.js +14 -0
- package/dist/src/onchainRecovery/OnchainRecoveryService.cjs +1 -0
- package/dist/src/onchainRecovery/OnchainRecoveryService.js +69 -0
- package/dist/src/onchainRecovery/schema.cjs +1 -0
- package/dist/src/onchainRecovery/schema.js +49 -0
- package/dist/src/platform/isBraveBrowser.cjs +1 -0
- package/dist/src/platform/isBraveBrowser.js +11 -0
- package/dist/src/platform/isBrowser.cjs +1 -0
- package/dist/src/platform/isBrowser.js +28 -0
- package/dist/src/signer/multisigner.cjs +1 -0
- package/dist/src/signer/multisigner.js +19 -0
- package/dist/src/signer/seedphrase.cjs +1 -0
- package/dist/src/signer/seedphrase.js +7 -0
- package/dist/src/tokens/balances.cjs +1 -0
- package/dist/src/tokens/balances.js +38 -0
- package/dist/src/tokens/constants.cjs +1 -0
- package/dist/src/tokens/constants.js +4 -0
- package/dist/src/tokens/convertTokenAmountToCurrencyValue.cjs +1 -0
- package/dist/src/tokens/convertTokenAmountToCurrencyValue.js +16 -0
- package/dist/src/tokens/convertTokenUnitAmountWithDecimals.cjs +1 -0
- package/dist/src/tokens/convertTokenUnitAmountWithDecimals.js +11 -0
- package/dist/src/tokens/ensureDecimals.cjs +1 -0
- package/dist/src/tokens/ensureDecimals.js +5 -0
- package/dist/src/tokens/getCurrencySymbol.cjs +1 -0
- package/dist/src/tokens/getCurrencySymbol.js +15 -0
- package/dist/src/tokens/isUnlimitedAmount.cjs +1 -0
- package/dist/src/tokens/isUnlimitedAmount.js +5 -0
- package/dist/src/tokens/prettifyCurrencyValue.cjs +1 -0
- package/dist/src/tokens/prettifyCurrencyValue.js +11 -0
- package/dist/src/tokens/prettifyTokenAmount.cjs +1 -0
- package/dist/src/tokens/prettifyTokenAmount.js +23 -0
- package/dist/src/tokens/service/implementation.cjs +1 -0
- package/dist/{tokens → src/tokens}/service/implementation.d.ts +21 -2
- package/dist/src/tokens/service/implementation.js +64 -0
- package/dist/src/tokens/service/tokenError.cjs +1 -0
- package/dist/src/tokens/service/tokenError.js +14 -0
- package/dist/src/tokens/service/types/backend.model.cjs +1 -0
- package/dist/{tokens → src/tokens}/service/types/backend.model.d.ts +818 -73
- package/dist/src/tokens/service/types/backend.model.js +134 -0
- package/dist/src/tokens/service/types/defiPosition.model.cjs +1 -0
- package/dist/{tokens → src/tokens}/service/types/defiPosition.model.d.ts +1024 -64
- package/dist/src/tokens/service/types/defiPosition.model.js +75 -0
- package/dist/src/tokens/service/types/defiPositionType.model.cjs +1 -0
- package/dist/{tokens → src/tokens}/service/types/defiPositionType.model.d.ts +1 -1
- package/dist/src/tokens/service/types/defiPositionType.model.js +10 -0
- package/dist/src/tokens/service/types/unclaimedRewards.model.cjs +1 -0
- package/dist/src/tokens/service/types/unclaimedRewards.model.js +16 -0
- package/dist/src/tokens/service/types/webToken.model.cjs +1 -0
- package/dist/src/tokens/service/types/webToken.model.js +45 -0
- package/dist/src/transactions/amount.cjs +1 -0
- package/dist/src/transactions/amount.js +24 -0
- package/dist/src/transactions/buildTransactions.cjs +1 -0
- package/dist/src/transactions/buildTransactions.js +34 -0
- package/dist/src/transactions/errors.cjs +1 -0
- package/dist/src/transactions/errors.js +19 -0
- package/dist/src/transactions/estimate/argentMaxFee.cjs +1 -0
- package/dist/src/transactions/estimate/argentMaxFee.js +13 -0
- package/dist/src/transactions/estimate/error.cjs +1 -0
- package/dist/src/transactions/estimate/error.js +14 -0
- package/dist/src/transactions/estimate/model.cjs +1 -0
- package/dist/src/transactions/estimate/model.js +14 -0
- package/dist/src/transactions/estimate/utils.cjs +1 -0
- package/dist/src/transactions/estimate/utils.js +232 -0
- package/dist/src/transactions/findTransfersAndApprovals.cjs +1 -0
- package/dist/src/transactions/findTransfersAndApprovals.js +31 -0
- package/dist/src/transactions/getPrettyRcpError.cjs +1 -0
- package/dist/src/transactions/getPrettyRcpError.js +11 -0
- package/dist/src/transactions/getTransactionVersion.cjs +1 -0
- package/dist/src/transactions/getTransactionVersion.js +18 -0
- package/dist/{transactions → src/transactions}/index.d.ts +0 -6
- package/dist/src/transactions/service/implementation.cjs +1 -0
- package/dist/src/transactions/service/implementation.js +182 -0
- package/dist/src/transactions/service/types.cjs +1 -0
- package/dist/src/transactions/service/types.js +10 -0
- package/dist/src/transactions/transactionReviewTypes.cjs +1 -0
- package/dist/src/transactions/transactionReviewTypes.js +10 -0
- package/dist/src/transactions/transactionVersion.cjs +1 -0
- package/dist/src/transactions/transactionVersion.js +14 -0
- package/dist/src/transactions/txv3.cjs +1 -0
- package/dist/src/transactions/txv3.js +14 -0
- package/dist/src/utils/address.cjs +1 -0
- package/dist/src/utils/address.js +4 -0
- package/dist/src/utils/arrays.cjs +1 -0
- package/dist/src/utils/arrays.js +4 -0
- package/dist/src/utils/avatarImage.cjs +4 -0
- package/dist/src/utils/avatarImage.js +42 -0
- package/dist/src/utils/base58.cjs +1 -0
- package/dist/src/utils/base58.js +15 -0
- package/dist/src/utils/bigNumber.cjs +1 -0
- package/dist/src/utils/bigNumber.js +7 -0
- package/dist/src/utils/bips.cjs +1 -0
- package/dist/src/utils/bips.js +11 -0
- package/dist/src/utils/daysBetween.cjs +1 -0
- package/dist/src/utils/daysBetween.js +7 -0
- package/dist/src/utils/env.cjs +1 -0
- package/dist/src/utils/env.js +4 -0
- package/dist/src/utils/hex.cjs +1 -0
- package/dist/src/utils/hex.js +9 -0
- package/dist/src/utils/id.cjs +1 -0
- package/dist/src/utils/id.js +8 -0
- package/dist/{utils → src/utils}/index.d.ts +0 -1
- package/dist/src/utils/initials.cjs +1 -0
- package/dist/src/utils/initials.js +16 -0
- package/dist/src/utils/isContractDeployed.cjs +1 -0
- package/dist/src/utils/isContractDeployed.js +10 -0
- package/dist/src/utils/nonNullable.cjs +1 -0
- package/dist/src/utils/nonNullable.js +7 -0
- package/dist/src/utils/number/isAllowedAddressHexInputValue.cjs +1 -0
- package/dist/src/utils/number/isAllowedAddressHexInputValue.js +7 -0
- package/dist/src/utils/number/isAllowedNumericInputValue.cjs +1 -0
- package/dist/src/utils/number/isAllowedNumericInputValue.js +8 -0
- package/dist/src/utils/number/isNumeric.cjs +1 -0
- package/dist/src/utils/number/isNumeric.js +4 -0
- package/dist/src/utils/number/prettifyNumber.cjs +1 -0
- package/dist/src/utils/number/prettifyNumber.js +47 -0
- package/dist/src/utils/parseAmount.cjs +1 -0
- package/dist/src/utils/parseAmount.js +14 -0
- package/dist/src/utils/pluralise.cjs +1 -0
- package/dist/src/utils/pluralise.js +4 -0
- package/dist/src/utils/readFileAsString.cjs +1 -0
- package/dist/src/utils/readFileAsString.js +10 -0
- package/dist/src/utils/schemas.cjs +1 -0
- package/dist/src/utils/schemas.js +29 -0
- package/dist/src/utils/starknet/starknet.cjs +1 -0
- package/dist/src/utils/starknet/starknet.js +57 -0
- package/dist/src/utils/starknet/starknetLibTypes.cjs +1 -0
- package/dist/src/utils/starknet/starknetLibTypes.js +7 -0
- package/dist/src/utils/starknet/starknetSchemas.cjs +1 -0
- package/dist/src/utils/starknet/starknetSchemas.js +102 -0
- package/dist/src/utils/transactions.cjs +1 -0
- package/dist/src/utils/transactions.js +11 -0
- package/dist/src/utils/url/urlWithQuery.cjs +1 -0
- package/dist/src/utils/url/urlWithQuery.js +9 -0
- package/dist/src/utils/voidify.cjs +1 -0
- package/dist/src/utils/voidify.js +8 -0
- package/dist/swap.cjs +1 -0
- package/dist/swap.d.ts +1 -1
- package/dist/swap.js +20 -1
- package/package.json +14 -28
- package/dist/bips-DKbEGvGl.mjs +0 -114
- package/dist/bips-DxN0hSiY.js +0 -1
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/useDebounce.d.ts +0 -1
- package/dist/hooks/useDebouncedValue.d.ts +0 -1
- package/dist/http/swr.d.ts +0 -21
- package/dist/index.mjs +0 -4466
- package/dist/nfts/useNfts.d.ts +0 -23
- package/dist/providers/WebAmplitude/WebAmplitudeProvider.d.ts +0 -7
- package/dist/providers/WebAmplitude/index.d.ts +0 -2
- package/dist/providers/WebAmplitude/service.d.ts +0 -7
- package/dist/providers/WebAmplitude/types.d.ts +0 -6
- package/dist/providers/WebAmplitude/utils.d.ts +0 -2
- package/dist/providers/index.d.ts +0 -1
- package/dist/simulation.mjs +0 -255
- package/dist/swap.mjs +0 -183
- package/dist/transactionVersion-C7p_qk9x.js +0 -1
- package/dist/transactionVersion-Cjoucwcx.mjs +0 -793
- package/dist/transactions/useBalanceChange.d.ts +0 -5
- package/dist/transactions/useErc20Transactions.d.ts +0 -6
- package/dist/transactions/useErc721Transactions.d.ts +0 -5
- package/dist/transactions/useErc721Transfers.d.ts +0 -5
- package/dist/transactions/useMaxAmountTransaction.d.ts +0 -7
- package/dist/transactions/useTransactionReview.d.ts +0 -15
- package/dist/transactions/useTransactionReviewV2web.d.ts +0 -1004
- package/dist/utils/useEventEmitter.d.ts +0 -67
- package/dist/webToken.model-5HUiR8ER.js +0 -1
- package/dist/webToken.model-CpudLBp0.mjs +0 -1913
- package/dist/{account → src/account}/account.model.d.ts +0 -0
- package/dist/{account → src/account}/accountv4.d.ts +0 -0
- package/dist/{account → src/account}/index.d.ts +0 -0
- package/dist/{account → src/account}/preferences.model.d.ts +0 -0
- package/dist/{backend → src/backend}/index.d.ts +0 -0
- package/dist/{backend → src/backend}/schema.d.ts +0 -0
- package/dist/{backend → src/backend}/types.d.ts +0 -0
- package/dist/{bigdecimal → src/bigdecimal}/constants.d.ts +0 -0
- package/dist/{bigdecimal → src/bigdecimal}/createUnitsSchema.d.ts +0 -0
- package/dist/{bigdecimal → src/bigdecimal}/formatUnits.d.ts +0 -0
- package/dist/{bigdecimal → src/bigdecimal}/index.d.ts +0 -0
- package/dist/{bigdecimal → src/bigdecimal}/lib.d.ts +0 -0
- package/dist/{bigdecimal → src/bigdecimal}/parseUnits.d.ts +0 -0
- package/dist/{bigdecimal → src/bigdecimal}/type.d.ts +0 -0
- package/dist/{bigdecimal → src/bigdecimal}/types.d.ts +0 -0
- package/dist/{bigdecimal → src/bigdecimal}/utils.d.ts +0 -0
- package/dist/{cache → src/cache}/CacheService.d.ts +0 -0
- package/dist/{cache → src/cache}/ICacheService.d.ts +0 -0
- package/dist/{cache → src/cache}/index.d.ts +0 -0
- package/dist/{chains → src/chains}/index.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/address.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/addressDomain.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/addressInput.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/argentName.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/cairoVersionSchema.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/constants.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/getAddressFromArgentName.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/getAddressFromStarkName.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/index.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/network.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/services/address/IStarknetAddressService.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/services/address/StarknetAddressService.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/services/address/index.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/services/deploymentData/constants.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/services/deploymentData/deploymentData.schema.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/services/deploymentData/findImplementationForAccount.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/services/deploymentData/getAccountClassHash.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/services/deploymentData/index.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/services/index.d.ts +0 -0
- package/dist/{chains → src/chains}/starknet/starknetId.d.ts +0 -0
- package/dist/{errors → src/errors}/account.d.ts +0 -0
- package/dist/{errors → src/errors}/address.d.ts +0 -0
- package/dist/{errors → src/errors}/baseErrors.d.ts +0 -0
- package/dist/{errors → src/errors}/call.d.ts +0 -0
- package/dist/{errors → src/errors}/network.d.ts +0 -0
- package/dist/{errors → src/errors}/review.d.ts +0 -0
- package/dist/{errors → src/errors}/swap.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/index.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/normalize.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/schema.d.ts +200 -200
- package/dist/{features → src/features}/simulation/activity/utils/createNativeActivity.d.ts +6 -6
- package/dist/{features → src/features}/simulation/activity/utils/getAnyActivityTitle.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/utils/getOverallLastModified.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/utils/hasDelegationActivity.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/utils/index.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/utils/isMulticallWithDeploymentActivity.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/utils/isRejectOnChainActivity.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/utils/isUpgradeActivity.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/utils/parseAccountActivities.d.ts +0 -0
- package/dist/{features → src/features}/simulation/activity/utils/parseFinanceActivities.d.ts +0 -0
- package/dist/{features → src/features}/simulation/fees/index.d.ts +0 -0
- package/dist/{features → src/features}/simulation/fees/schema.d.ts +0 -0
- package/dist/{features → src/features}/simulation/index.d.ts +0 -0
- package/dist/{features → src/features}/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.d.ts +0 -0
- package/dist/{features → src/features}/simulation/transactionReview/getMessageFromSimulationError.d.ts +0 -0
- package/dist/{features → src/features}/simulation/transactionReview/index.d.ts +0 -0
- package/dist/{features → src/features}/simulation/transactionReview/schema.d.ts +1324 -1324
- package/dist/{features → src/features}/simulation/warning/helper.d.ts +0 -0
- package/dist/{features → src/features}/simulation/warning/index.d.ts +0 -0
- package/dist/{features → src/features}/simulation/warning/schema.d.ts +0 -0
- package/dist/{features → src/features}/swap/index.d.ts +0 -0
- package/dist/{features → src/features}/swap/models/index.d.ts +0 -0
- package/dist/{features → src/features}/swap/models/order.model.d.ts +0 -0
- package/dist/{features → src/features}/swap/models/quote.model.d.ts +0 -0
- package/dist/{features → src/features}/swap/models/trade.model.d.ts +0 -0
- package/dist/{features → src/features}/swap/services/implementation.d.ts +0 -0
- package/dist/{features → src/features}/swap/services/index.d.ts +0 -0
- package/dist/{features → src/features}/swap/services/interface.d.ts +0 -0
- package/dist/{features → src/features}/swap/services/order.mock.d.ts +0 -0
- package/dist/{features → src/features}/swap/services/quote.mock.d.ts +0 -0
- package/dist/{features → src/features}/swap/tests/token.mock.d.ts +0 -0
- package/dist/{features → src/features}/swap/tests/trade.mock.d.ts +0 -0
- package/dist/{features → src/features}/swap/tests/walletAccount.mock.d.ts +0 -0
- package/dist/{features → src/features}/swap/utils/index.d.ts +0 -0
- package/dist/{features → src/features}/swap/utils/slippage.d.ts +0 -0
- package/dist/{features → src/features}/swap/utils/totalFee.d.ts +0 -0
- package/dist/{http → src/http}/DateService.d.ts +0 -0
- package/dist/{http → src/http}/HttpError.d.ts +0 -0
- package/dist/{http → src/http}/HttpService.d.ts +0 -0
- package/dist/{http → src/http}/IDateService.d.ts +0 -0
- package/dist/{http → src/http}/IHttpService.d.ts +0 -0
- package/dist/{http → src/http}/SWRService.d.ts +0 -0
- package/dist/{http → src/http}/apiData.d.ts +0 -0
- package/dist/{http → src/http}/fetcher.d.ts +0 -0
- package/dist/{http → src/http}/time.d.ts +0 -0
- package/dist/{knownDapps → src/knownDapps}/IKnownDappsBackendService.d.ts +0 -0
- package/dist/{knownDapps → src/knownDapps}/KnownDappsBackendService.d.ts +0 -0
- package/dist/{knownDapps → src/knownDapps}/index.d.ts +0 -0
- package/dist/{knownDapps → src/knownDapps}/schema.d.ts +0 -0
- package/dist/{knownDapps → src/knownDapps}/utils/getDapplandUrl.d.ts +0 -0
- package/dist/{knownDapps → src/knownDapps}/utils/index.d.ts +0 -0
- package/dist/{nameResolution → src/nameResolution}/IResolveNameService.d.ts +0 -0
- package/dist/{nameResolution → src/nameResolution}/ResolveNameService.d.ts +0 -0
- package/dist/{nameResolution → src/nameResolution}/index.d.ts +0 -0
- package/dist/{nameResolution → src/nameResolution}/schema.d.ts +0 -0
- package/dist/{nfts → src/nfts}/BackendNftService.d.ts +0 -0
- package/dist/{nfts → src/nfts}/BackendPaginationError.d.ts +0 -0
- package/dist/{nfts → src/nfts}/INFTService.d.ts +0 -0
- package/dist/{nfts → src/nfts}/utils.d.ts +0 -0
- package/dist/{onchainRecovery → src/onchainRecovery}/IOnchainRecoveryService.d.ts +0 -0
- package/dist/{onchainRecovery → src/onchainRecovery}/OnchainRecoveryService.d.ts +0 -0
- package/dist/{onchainRecovery → src/onchainRecovery}/index.d.ts +0 -0
- package/dist/{onchainRecovery → src/onchainRecovery}/schema.d.ts +0 -0
- package/dist/{platform → src/platform}/index.d.ts +0 -0
- package/dist/{platform → src/platform}/isBraveBrowser.d.ts +0 -0
- package/dist/{platform → src/platform}/isBrowser.d.ts +0 -0
- package/dist/{signer → src/signer}/index.d.ts +0 -0
- package/dist/{signer → src/signer}/multisigner.d.ts +0 -0
- package/dist/{signer → src/signer}/seedphrase.d.ts +0 -0
- package/dist/{tokens → src/tokens}/balances.d.ts +0 -0
- package/dist/{tokens → src/tokens}/constants.d.ts +0 -0
- package/dist/{tokens → src/tokens}/convertTokenAmountToCurrencyValue.d.ts +0 -0
- package/dist/{tokens → src/tokens}/convertTokenUnitAmountWithDecimals.d.ts +0 -0
- package/dist/{tokens → src/tokens}/ensureDecimals.d.ts +0 -0
- package/dist/{tokens → src/tokens}/getCurrencySymbol.d.ts +0 -0
- package/dist/{tokens → src/tokens}/index.d.ts +0 -0
- package/dist/{tokens → src/tokens}/isUnlimitedAmount.d.ts +0 -0
- package/dist/{tokens → src/tokens}/prettifyCurrencyValue.d.ts +0 -0
- package/dist/{tokens → src/tokens}/prettifyTokenAmount.d.ts +0 -0
- package/dist/{tokens → src/tokens}/service/index.d.ts +0 -0
- package/dist/{tokens → src/tokens}/service/interface.d.ts +0 -0
- package/dist/{tokens → src/tokens}/service/tokenError.d.ts +0 -0
- package/dist/{tokens → src/tokens}/service/types/index.d.ts +0 -0
- package/dist/{tokens → src/tokens}/service/types/unclaimedRewards.model.d.ts +0 -0
- package/dist/{tokens → src/tokens}/service/types/webToken.model.d.ts +0 -0
- package/dist/{tokens → src/tokens}/token.d.ts +0 -0
- package/dist/{transactions → src/transactions}/aggregatedSimDataTypes.d.ts +0 -0
- package/dist/{transactions → src/transactions}/amount.d.ts +0 -0
- package/dist/{transactions → src/transactions}/buildTransactions.d.ts +0 -0
- package/dist/{transactions → src/transactions}/deployAccountTypes.d.ts +0 -0
- package/dist/{transactions → src/transactions}/errors.d.ts +0 -0
- package/dist/{transactions → src/transactions}/estimate/argentMaxFee.d.ts +0 -0
- package/dist/{transactions → src/transactions}/estimate/error.d.ts +0 -0
- package/dist/{transactions → src/transactions}/estimate/index.d.ts +0 -0
- package/dist/{transactions → src/transactions}/estimate/model.d.ts +0 -0
- package/dist/{transactions → src/transactions}/estimate/utils.d.ts +0 -0
- package/dist/{transactions → src/transactions}/findTransfersAndApprovals.d.ts +0 -0
- package/dist/{transactions → src/transactions}/getPrettyRcpError.d.ts +0 -0
- package/dist/{transactions → src/transactions}/getTransactionVersion.d.ts +0 -0
- package/dist/{transactions → src/transactions}/service/implementation.d.ts +0 -0
- package/dist/{transactions → src/transactions}/service/index.d.ts +0 -0
- package/dist/{transactions → src/transactions}/service/interface.d.ts +0 -0
- package/dist/{transactions → src/transactions}/service/types.d.ts +2 -2
- /package/dist/{transactions → src/transactions}/transactionAction.d.ts +0 -0
- /package/dist/{transactions → src/transactions}/transactionReviewTypes.d.ts +0 -0
- /package/dist/{transactions → src/transactions}/transactionSimulationTypes.d.ts +0 -0
- /package/dist/{transactions → src/transactions}/transactionVersion.d.ts +0 -0
- /package/dist/{transactions → src/transactions}/txv3.d.ts +0 -0
- /package/dist/{transactions → src/transactions}/types.d.ts +0 -0
- /package/dist/{utils → src/utils}/address.d.ts +0 -0
- /package/dist/{utils → src/utils}/arrays.d.ts +0 -0
- /package/dist/{utils → src/utils}/avatarImage.d.ts +0 -0
- /package/dist/{utils → src/utils}/base58.d.ts +0 -0
- /package/dist/{utils → src/utils}/bigNumber.d.ts +0 -0
- /package/dist/{utils → src/utils}/bips.d.ts +0 -0
- /package/dist/{utils → src/utils}/daysBetween.d.ts +0 -0
- /package/dist/{utils → src/utils}/env.d.ts +0 -0
- /package/dist/{utils → src/utils}/hex.d.ts +0 -0
- /package/dist/{utils → src/utils}/id.d.ts +0 -0
- /package/dist/{utils → src/utils}/initials.d.ts +0 -0
- /package/dist/{utils → src/utils}/isContractDeployed.d.ts +0 -0
- /package/dist/{utils → src/utils}/nonNullable.d.ts +0 -0
- /package/dist/{utils → src/utils}/number/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/number/isAllowedAddressHexInputValue.d.ts +0 -0
- /package/dist/{utils → src/utils}/number/isAllowedNumericInputValue.d.ts +0 -0
- /package/dist/{utils → src/utils}/number/isNumeric.d.ts +0 -0
- /package/dist/{utils → src/utils}/number/prettifyNumber.d.ts +0 -0
- /package/dist/{utils → src/utils}/parseAmount.d.ts +0 -0
- /package/dist/{utils → src/utils}/pluralise.d.ts +0 -0
- /package/dist/{utils → src/utils}/readFileAsString.d.ts +0 -0
- /package/dist/{utils → src/utils}/schemas.d.ts +0 -0
- /package/dist/{utils → src/utils}/starknet/starknet.d.ts +0 -0
- /package/dist/{utils → src/utils}/starknet/starknetLibTypes.d.ts +0 -0
- /package/dist/{utils → src/utils}/starknet/starknetSchemas.d.ts +0 -0
- /package/dist/{utils → src/utils}/transactions.d.ts +0 -0
- /package/dist/{utils → src/utils}/url/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/url/urlWithQuery.d.ts +0 -0
- /package/dist/{utils → src/utils}/voidify.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,424 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("zod"),k=require("./bips-DxN0hSiY.js"),i=require("./webToken.model-5HUiR8ER.js"),A=require("./transactionVersion-C7p_qk9x.js"),w=require("starknet"),L=require("react"),H=require("lodash-es"),Ne=require("swr"),Be=require("@scure/base"),Kr=require("ua-parser-js"),Zr=require("@scure/bip39"),Yr=require("@scure/bip39/wordlists/english"),Jr=require("object-hash"),Xr=require("react/jsx-runtime"),dn=f.z.object({name:f.z.string().optional(),address:f.z.string(),ownerAddress:f.z.string(),chain:f.z.enum(["ethereum","zksync","zksync2","starknet"]),deploymentStatus:f.z.enum(["notDeployed","deploying","deployed","deployError"]),application:f.z.enum(["mobile","webwallet","argentx"]),guardianAddresses:f.z.array(f.z.string()).optional(),enabledGuardianAddresses:f.z.array(f.z.string()).optional(),implClassHash:f.z.string().optional(),proxyClassHash:f.z.string().optional(),salt:f.z.string().optional(),created:f.z.string().optional(),contractVersion:f.z.string().optional(),contractName:f.z.string().optional(),version:f.z.number().optional(),owner:f.z.object({guid:f.z.string().optional(),signerType:f.z.enum(["StarknetKey","EthereumKey"]).optional()}).optional()}),Qr=f.z.object({address:f.z.string(),guardianAddress:f.z.string().optional(),account:dn}),es=f.z.object({ownerAddress:f.z.string(),signature:f.z.object({r:f.z.string(),s:f.z.string()}),implClassHash:f.z.string().optional(),name:f.z.string().optional(),icon:f.z.string().optional()});function ts(e){return"transactionVersion"in e}function ns(e){return"simulateTransaction"in e}function rs(e){return!("simulateTransaction"in e)}const un=f.z.object({value:f.z.string(),platform:f.z.enum(["ios","argentx","android","webwallet"]).nullable()}),ss=f.z.object({preferences:f.z.record(un)}),hn=f.z.enum(["mainnet-alpha","sepolia-alpha"]),fn=f.z.enum(["mainnet","sepolia"]);function os(e){return hn.safeParse(e).success}function as(e){return fn.safeParse(e).success}function is(e){return f.z.string().refine(t=>/^-?\d+(\.\d+)?$/.test(t),{message:"Invalid number format"}).transform(t=>i.parseUnits(t,e))}const cs=Object.freeze(Object.defineProperty({__proto__:null,ONE:k.ONE,abs:k.abs,absBigInt:k.absBigInt,add:k.add,createUnitsSchema:is,div:k.div,eq:k.eq,formatCurrency:k.formatCurrency,formatEther:k.formatEther,formatUnits:k.formatUnits,gt:k.gt,gte:k.gte,lt:k.lt,lte:k.lte,mod:k.mod,mul:k.mul,not:k.not,parseCurrency:k.parseCurrency,parseCurrencyAbs:k.parseCurrencyAbs,parseEther:k.parseEther,parseUnits:i.parseUnits,sub:k.sub,toBigDecimal:k.toBigDecimal,toFixedDecimals:k.toFixedDecimals,toTiniestPossibleDecimal:k.toTiniestPossibleDecimal},Symbol.toStringTag,{value:"Module"}));class ls{constructor(t,n){this.cachePromise=n.open(t).catch(r=>(console.error(new Error("Failed to open cache",{cause:r})),null))}async get(t){const n=await this.cachePromise;if(!n)throw new Error("No cache available");const r=await n.match(t).catch(()=>{throw new Error("Failed to match cache")});if(!r)throw new Error("Failed to match cache");return r.clone()}async set(t,n){const r=await this.cachePromise;r&&await r.put(t,n).catch(()=>{throw new Error("Failed to match cache")})}async delete(t){const n=await this.cachePromise;return n?n.delete(t):!1}async flush(){const t=await this.cachePromise;if(!t)return;const n=await t.keys();await Promise.allSettled(n.map(r=>t.delete(r)))}}class ds{constructor(t,n){this.httpService=t,this.baseUrl=n,this.offsetInS=0,this.syncIntervalInMs=60*1e3,this.initialSync=this.syncWithServer(),setInterval(()=>void this.syncWithServer(),this.syncIntervalInMs)}async now(){return await this.initialSync,new Date(Date.now()+this.offsetInS*1e3)}async syncWithServer(){if(typeof window>"u")return;const{time:t}=await this.httpService.get(`${this.baseUrl}/time`),n=Math.floor(Date.now()/1e3),r=t-n;this.offsetInS=r}}class wt{constructor(t,n="json"){this.requestInit=t,this.responseType=n}async get(t,n){const r=H.isFunction(this.requestInit)?await this.requestInit():this.requestInit,s={...r,...n,method:"GET",headers:{...r==null?void 0:r.headers,...n==null?void 0:n.headers}},o=await fetch(t,s).catch(()=>{throw new i.HttpError(i.HTTP_ERROR_MESSAGE.FAILED_TO_FETCH_URL,0)});if(this.responseType==="json"){if(!o.ok)throw new i.HttpError(o.statusText,o.status);return await o.json()}return o}async post(t,n,r){const s=H.isFunction(this.requestInit)?await this.requestInit():this.requestInit,o={...s,...n,method:"POST",headers:{...s==null?void 0:s.headers,...n==null?void 0:n.headers}},a=await fetch(t,o).catch(()=>{throw new i.HttpError(i.HTTP_ERROR_MESSAGE.FAILED_TO_POST_URL,0)});if(!a.ok)throw new i.HttpError(a.statusText,a.status,await a.json());if(a.status===204)return{};const c=await a.json();if(r)try{return r.parse(c)}catch(l){throw new i.HttpError(l.message,0)}return c}async put(t,n){const r=H.isFunction(this.requestInit)?await this.requestInit():this.requestInit,s={...r,...n,method:"PUT",headers:{...r==null?void 0:r.headers,...n==null?void 0:n.headers}},o=await fetch(t,s).catch(()=>{throw new i.HttpError("Failed to put url",0)});if(!o.ok)throw new i.HttpError(o.statusText,o.status);return await o.json()}async delete(t,n){const r=H.isFunction(this.requestInit)?await this.requestInit():this.requestInit,s={...r,...n,method:"DELETE",headers:{...r==null?void 0:r.headers,...n==null?void 0:n.headers}},o=await fetch(t,s).catch(()=>{throw new i.HttpError("Failed to delete url",0)});if(!o.ok)throw new i.HttpError(o.statusText,o.status)}}const $e=e=>{process.env.NODE_ENV};function us(e,t){const n=e.clone(),r=new Headers(n.headers);for(const[s,o]of Object.entries(t))r.set(s,o);return new Response(n.body,{status:n.status,statusText:e.statusText,headers:r})}class hs{constructor(t,n,r,s){this.dateService=t,this.cacheService=n,this.httpService=r,this.options=s,this.inFlightRequests=new Map}async rawGet(t,n){try{const r=await this.cacheService.get(t),s=await this.dateService.now(),o=new Date(r.headers.get("date")||""),a=s.getTime()-o.getTime();if(a<this.options.freshFor)return $e("🟢 [SWR] Using fresh cache"),r;if(a<this.options.staleFor)return this.fetchAndCache(t,n),$e("🟠 [SWR] Revalidating cache"),r;throw new Error("Cache too old")}catch(r){if(r instanceof i.HttpError)throw r;return $e(),await this.fetchAndCache(t,n)}}async get(t,n){const r=await this.rawGet(t,n);return this.parseResponse(r)}async fetchAndCache(t,n){const r=this.inFlightRequests.get(t);if(!r){const s=this.httpService.get(t,n).then(async o=>{const a=await this.dateService.now();return await this.cacheService.set(t,us(o,{date:a.toUTCString()})),o}).finally(()=>{this.inFlightRequests.delete(t)});return this.inFlightRequests.set(t,s),s}return $e(),r}parseResponse(t){if(t.ok)return t.json();throw new i.HttpError(t.statusText,t.status)}}const ke=(e,t,n)=>{const r=new Error(e);r.name="FetcherError",r.url=t.url,r.status=t.status,r.statusText=t.statusText,r.responseText=n;try{const s=JSON.parse(n);r.responseJson=s}catch{}return r},yt=async(e,t)=>{const n=await fetch(e,t),r=await n.text();if(!n.ok)throw ke("An error occurred while fetching",n,r);try{return JSON.parse(r)}catch{throw ke("An error occurred while parsing",n,r)}},fs=async(e,t)=>{const n=await fetch(e,{method:"POST",...t}),r=await n.text();if(!n.ok)throw ke("An error occurred while fetching",n,r);try{return JSON.parse(r)}catch{throw ke("An error occurred while parsing",n,r)}},ms=e=>({refreshInterval:e,dedupingInterval:e}),ps=e=>`${e.networkId}::${e.address}`,gs=()=>{};function mn(e,t,n,r){const{cache:s}=Ne.useSWRConfig(),o=Ne(e&&t,e?n:gs,r);return L.useEffect(()=>{e||(o.mutate(),s.delete(t))},[e]),o}const Ss={revalidateOnFocus:!1,revalidateOnMount:!0,revalidateOnReconnect:!1,refreshWhenOffline:!1,refreshWhenHidden:!1,refreshInterval:0},pn=async(e,t)=>{try{const{time:n}=await yt(i.urlJoin(e,"time"),{headers:t});return n}catch{throw new Error("failed to request time")}},ws=async(e,t)=>{const n=await pn(e,t);return Math.floor(n)};function gn(e){switch(e){case"mainnet-alpha":case w.constants.NetworkName.SN_MAIN:return w.constants.StarknetChainId.SN_MAIN;case"sepolia-alpha":case w.constants.NetworkName.SN_SEPOLIA:return w.constants.StarknetChainId.SN_SEPOLIA;default:throw new i.NetworkError({code:"NOT_FOUND",message:`Unknown networkId: ${e}`})}}function Sn(e){return e.replace(".stark","").split(".").map(r=>w.starknetId.useEncoded(r).toString(10))}function wn(e){const t=gn(e);return w.starknetId.getStarknetIdContract(t)}function yn(e,t){const n=wn(t),r=Sn(e);try{const o={domain:r,hint:[]};return i.callSchema.parse({contractAddress:n,entrypoint:"domain_to_address",calldata:o})}catch(s){throw new i.CallError({code:"NOT_VALID",options:{error:s}})}}async function bn(e,t,n){if(!t||!n)throw new i.NetworkError({code:"NO_NETWORK_OR_MULTICALL"});let r=null;try{r=yn(e,t)}catch(c){throw new i.CallError({code:"NOT_VALID",options:{error:c}})}let s,o;try{s=await n.callContract(r),o=s[0]}catch{throw new i.AddressError({code:"STARKNAME_ERROR"})}if(i.isZeroAddress(o))throw new i.AddressError({code:"STARKNAME_NOT_FOUND",message:`${e} not found`});if(!i.isValidAddress(o))throw new i.AddressError({code:"STARKNAME_INVALID_ADDRESS",message:`${e} resolved to an invalid address (${o})`});return i.normalizeAddress(o)}class ys{constructor(t,n,r){this.httpService=t,this.baseUrl=n,this.allowedArgentNameNetworkId=r}async parseAddressOrDomain(t,n,r){if(i.isAddress(t))return i.normalizeAddress(t);try{return await this.getAddressFromDomainName(t,n,r)}catch{throw new i.AddressError({code:"NOT_VALID"})}}async getAddressFromDomainName(t,n,r){if(i.isStarknetId(t))return bn(t,n,r);if(i.isArgentName(t)){if(n!==this.allowedArgentNameNetworkId)throw new i.AddressError({code:"ARGENT_NAME_INVALID_NETWORK",message:`Argent name is only enabled on "${this.allowedArgentNameNetworkId}"`});return i.getAddressFromArgentName(t,this.httpService,this.baseUrl)}throw new i.AddressError({code:"NO_ADDRESS_FROM_DOMAIN"})}}const En=["0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"],Q={"0.2.4":"0x033434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2","0.2.3":"0x1a7820094feaf82d53f53f214b81292d717e7bb9a92bb2488092cd306f3993f","0.2.2":"0x3e327de1c40540b98d05cbcb13552008e36f0ec8d61d46956d2f9752c294328","0.2.1":"0x7e28fb0161d10d1cf7fe1f13e7ca57bce062731a3bd04494dfd2d0412699727","0.4.0":"0x036078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f","0.3.1":"0x29927c8af6bccf3f6fda035981e765a7bdbf18a2dc0d630494f8758aa908e2b","0.3.0":"0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"},Oe={"0.1.1":"0x6e150953b26271a740bf2b6e9bca17cc52c68d765f761295de51ceb8526ee72","0.1.0":"0x737ee2f87ce571a58c6c8da558ec18a07ceb64a6172d5ec46171fbc80077a48"};var bs=typeof global=="object"&&global&&global.Object===Object&&global,Es=typeof self=="object"&&self&&self.Object===Object&&self,Ze=bs||Es||Function("return this")(),qe=Ze.Symbol,An=Object.prototype,As=An.hasOwnProperty,Ts=An.toString,xe=qe?qe.toStringTag:void 0;function vs(e){var t=As.call(e,xe),n=e[xe];try{e[xe]=void 0;var r=!0}catch{}var s=Ts.call(e);return r&&(t?e[xe]=n:delete e[xe]),s}var xs=Object.prototype,Is=xs.toString;function Cs(e){return Is.call(e)}var _s="[object Null]",Ns="[object Undefined]",Lt=qe?qe.toStringTag:void 0;function Bs(e){return e==null?e===void 0?Ns:_s:Lt&&Lt in Object(e)?vs(e):Cs(e)}function Tn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ks="[object AsyncFunction]",Os="[object Function]",Rs="[object GeneratorFunction]",Ps="[object Proxy]";function Fs(e){if(!Tn(e))return!1;var t=Bs(e);return t==Os||t==Rs||t==ks||t==Ps}var ot=Ze["__core-js_shared__"],Ht=function(){var e=/[^.]+$/.exec(ot&&ot.keys&&ot.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ds(e){return!!Ht&&Ht in e}var Us=Function.prototype,Ls=Us.toString;function Hs(e){if(e!=null){try{return Ls.call(e)}catch{}try{return e+""}catch{}}return""}var $s=/[\\^$.*+?()[\]{}|]/g,js=/^\[object .+?Constructor\]$/,zs=Function.prototype,Vs=Object.prototype,Ms=zs.toString,qs=Vs.hasOwnProperty,Gs=RegExp("^"+Ms.call(qs).replace($s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ws(e){if(!Tn(e)||Ds(e))return!1;var t=Fs(e)?Gs:js;return t.test(Hs(e))}function Ks(e,t){return e==null?void 0:e[t]}function bt(e,t){var n=Ks(e,t);return Ws(n)?n:void 0}var Re=bt(Object,"create");function Zs(){this.__data__=Re?Re(null):{},this.size=0}function Ys(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Js="__lodash_hash_undefined__",Xs=Object.prototype,Qs=Xs.hasOwnProperty;function eo(e){var t=this.__data__;if(Re){var n=t[e];return n===Js?void 0:n}return Qs.call(t,e)?t[e]:void 0}var to=Object.prototype,no=to.hasOwnProperty;function ro(e){var t=this.__data__;return Re?t[e]!==void 0:no.call(t,e)}var so="__lodash_hash_undefined__";function oo(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Re&&t===void 0?so:t,this}function he(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}he.prototype.clear=Zs;he.prototype.delete=Ys;he.prototype.get=eo;he.prototype.has=ro;he.prototype.set=oo;function ao(){this.__data__=[],this.size=0}function io(e,t){return e===t||e!==e&&t!==t}function Ye(e,t){for(var n=e.length;n--;)if(io(e[n][0],t))return n;return-1}var co=Array.prototype,lo=co.splice;function uo(e){var t=this.__data__,n=Ye(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lo.call(t,n,1),--this.size,!0}function ho(e){var t=this.__data__,n=Ye(t,e);return n<0?void 0:t[n][1]}function fo(e){return Ye(this.__data__,e)>-1}function mo(e,t){var n=this.__data__,r=Ye(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ae(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ae.prototype.clear=ao;Ae.prototype.delete=uo;Ae.prototype.get=ho;Ae.prototype.has=fo;Ae.prototype.set=mo;var po=bt(Ze,"Map");function go(){this.size=0,this.__data__={hash:new he,map:new(po||Ae),string:new he}}function So(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Je(e,t){var n=e.__data__;return So(t)?n[typeof t=="string"?"string":"hash"]:n.map}function wo(e){var t=Je(this,e).delete(e);return this.size-=t?1:0,t}function yo(e){return Je(this,e).get(e)}function bo(e){return Je(this,e).has(e)}function Eo(e,t){var n=Je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Te(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Te.prototype.clear=go;Te.prototype.delete=wo;Te.prototype.get=yo;Te.prototype.has=bo;Te.prototype.set=Eo;var Ao="__lodash_hash_undefined__";function To(e){return this.__data__.set(e,Ao),this}function vo(e){return this.__data__.has(e)}function Ge(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Te;++t<n;)this.add(e[t])}Ge.prototype.add=Ge.prototype.push=To;Ge.prototype.has=vo;function xo(e,t,n,r){for(var s=e.length,o=n+-1;++o<s;)if(t(e[o],o,e))return o;return-1}function Io(e){return e!==e}function Co(e,t,n){for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}function _o(e,t,n){return t===t?Co(e,t,n):xo(e,Io,n)}function No(e,t){var n=e==null?0:e.length;return!!n&&_o(e,t,0)>-1}function Bo(e,t,n){for(var r=-1,s=e==null?0:e.length;++r<s;)if(n(t,e[r]))return!0;return!1}function ko(e,t){return e.has(t)}var at=bt(Ze,"Set");function Oo(){}function vn(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Ro=1/0,Po=at&&1/vn(new at([,-0]))[1]==Ro?function(e){return new at(e)}:Oo,Fo=200;function Do(e,t,n){var r=-1,s=No,o=e.length,a=!0,c=[],l=c;if(n)a=!1,s=Bo;else if(o>=Fo){var d=Po(e);if(d)return vn(d);a=!1,s=ko,l=new Ge}else l=c;e:for(;++r<o;){var h=e[r],u=h;if(h=n||h!==0?h:0,a&&u===u){for(var b=l.length;b--;)if(l[b]===u)continue e;c.push(h)}else s(l,u,n)||(l!==c&&l.push(u),c.push(h))}return c}function Uo(e,t){return t=typeof t=="function"?t:void 0,e&&e.length?Do(e,void 0,t):[]}function ft(e){const t=Object.entries(Q),n=Object.entries(Oe);switch(e){case"cairo0":return t.filter(([r])=>i.semver.lt(r,"0.3.0")).map(([,r])=>r);case"cairo1":return t.filter(([r])=>i.semver.gte(r,"0.3.0")).map(([,r])=>r);case"multisig":return n.map(([,r])=>r);default:return t.map(([,r])=>r)}}function xn(){const e=i.semver.maxSatisfying(Object.keys(Q),"*");if(!e)throw new Error(`No argent account contract found: v${e} `);return Q[e]}function Lo(){const e=i.semver.maxSatisfying(Object.keys(Oe),"*");if(!e)throw new Error(`No argent multisig contract found: v${e} `);return Oe[e]}function In(){return Object.entries(Q).filter(([e])=>i.semver.gte(e,"0.4.0")).map(([,e])=>e)}function Ho(){const e=i.semver.maxSatisfying(Object.keys(Q),"<0.3.0");if(!e)throw new Error(`No argent account contract found: v${e} `);return Q[e]}function Cn(){const e=Object.entries(Q).filter(([n])=>i.semver.gte(n,"0.3.1")).map(([,n])=>n),t=Object.entries(Oe).filter(([n])=>i.semver.gte(n,"0.1.1")).map(([,n])=>n);return[...e,...t]}function $o(){return Object.entries(Q).filter(([e])=>i.semver.gte(e,"0.4.0")).map(([,e])=>e)}function jo(){const e=i.semver.maxSatisfying(Object.keys(Q),">=0.4.0");if(!e)throw new Error(`No ledger account contract found: v${e}`);return Q[e]}const _n=(e,t)=>e.cairoVersion===t.cairoVersion&&i.isEqualAddress(e.accountClassHash,t.accountClassHash);function zo(e,t,n=[]){if(t.type==="imported")throw new Error("Cannot find implementation for imported account");const r=i.implementationSchema.parse({cairoVersion:t.cairoVersion??"1",accountClassHash:t.classHash??xn()}),s=f.z.array(i.implementationSchema).parse(n),o=[...ft("cairo0").map(d=>({cairoVersion:"0",accountClassHash:d})),...ft("cairo1").map(d=>({cairoVersion:"1",accountClassHash:d}))],l=Uo([r,...s,...o],_n).map(d=>({implementation:d,address:kn(d.cairoVersion,d.accountClassHash,e,t.guardian,t.salt)})).find(d=>i.isEqualAddress(d.address,t.address));if(!l)throw new i.AccountError({code:"CALCULATED_ADDRESS_NO_MATCH"});return l.implementation}function Nn(e,t,n,r,s,o=En[0]){const a=Bn(e,t,n,r);return{classHash:e==="0"?o:t,constructorCalldata:w.CallData.compile(a),addressSalt:s||n}}function Bn(e,t,n,r){const s=e!=="0"&&i.isEqualAddress(A.STANDARD_DEVNET_ACCOUNT_CLASS_HASH,t),o={pubkey:n,...s?{}:{guardian:r||"0"}};if(In().some(c=>i.isEqualAddress(c,t))){const c=i.getSignerForMultiSigner(n,i.MultiSigner.Starknet),l=r?new w.CairoOption(w.CairoOptionVariant.Some,i.getSignerForMultiSigner(r,i.MultiSigner.Starknet)):new w.CairoOption(w.CairoOptionVariant.None,null);return{ownerSigner:c,guardianAsOption:l}}return e==="0"?i.constructorCallDataSchemaC0.parse({implementation:t,selector:w.hash.getSelectorFromName("initialize"),calldata:w.CallData.compile(o)}):i.constructorCallDataSchemaC1V1.parse({owner:n,guardian:r})}function kn(e,t,n,r,s){const o=Nn(e,t,n,r,s);return w.hash.calculateContractAddressFromHash(o.addressSalt,o.classHash,o.constructorCalldata,0)}function Vo(e,t){const n=L.useRef(e),r=L.useRef();return L.useEffect(()=>{n.current=e},[e]),L.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),(...s)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>n.current(...s),t)}}function Mo(e,t){const[n,r]=L.useState(e);return L.useEffect(()=>{const s=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(s)}},[e,t]),n}const On=f.z.object({name:f.z.enum(["dappland","discord","github","telegram","twitter","website"]),url:f.z.string(),position:f.z.number()}),Rn=f.z.object({address:i.addressSchemaArgentBackend,chain:f.z.enum(["ethereum","starknet"])}),qo=f.z.object({maxExpiryDays:f.z.number().positive(),allowList:f.z.array(f.z.object({contractAddress:i.addressSchemaArgentBackend,methods:f.z.array(f.z.string())}))}),Pn=f.z.object({dappId:f.z.string(),name:f.z.string(),description:f.z.string().optional(),logoUrl:f.z.string().optional(),dappUrl:f.z.string().optional(),inAppBrowserCompatible:f.z.boolean(),argentVerified:f.z.boolean(),links:f.z.array(On).optional(),contracts:f.z.array(Rn).optional(),categories:f.z.array(f.z.string()).optional(),supportedApps:f.z.array(f.z.string()).optional(),brandColor:f.z.string().optional(),executeFromOutsideAllowed:f.z.boolean().default(!1).optional(),sessionConfig:f.z.union([qo,f.z.object({})]).nullable().optional()}),Fn=f.z.array(Pn);class Go{constructor(t,n){this.apiBase=t,this.httpService=new wt(n,"json")}async getAll(){const t=await this.httpService.get(`${this.apiBase}/tokens/dapps`),n=Fn.safeParse(t);if(!n.success)throw new Error("Failed to parse known dapps");return n.data}}function Dn(e){var t;return(t=e==null?void 0:e.links)==null?void 0:t.find(n=>n.name==="dappland")}function Wo(e){var t;return(t=Dn(e))==null?void 0:t.url}const Et=f.object({domain:i.starknetIdSchema,address:i.addressSchema.optional(),avatar:f.string().optional(),status:f.union([f.literal("KNOWN"),f.literal("UNKNOWN")])}),Un=f.array(Et),Ln=f.object({provider:f.string(),name:f.string(),avatar:f.string().optional()}),Hn=f.object({address:i.addressSchema,status:f.union([f.literal("KNOWN"),f.literal("UNKNOWN")]),resolutions:f.array(Ln).optional()}),$n=f.array(f.string()),jn=Hn.array();class Ko{constructor(t,n){this.apiBase=t,this.headers=n,this.httpService=new wt(this.headers,"json")}async getAddressFromMultipleStarknetId(t,n,r){const s=new URLSearchParams(n.map(l=>["domain",l]));r&&s.set("includeAvatar","true");const o=i.urlJoin(this.apiBase,t,"starknet.id",`?${s}`),a=await this.httpService.get(o),c=Un.safeParse(a);if(!c.success)throw new Error("Failed to parse name resolution");return c.data}async getAddressFromStarknetId(t,n,r){const s=i.urlJoin(this.apiBase,t,"starknet.id",n,r?"?includeAvatar=true":""),o=await this.httpService.get(s),a=Et.safeParse(o);if(!a.success)throw new Error("Failed to parse name resolution");return a.data}async getStarknetIdFromAddress(t,n,r){const s=new URLSearchParams(n.map(l=>["address",l]));r&&s.set("includeAvatar","true");const o=i.urlJoin(this.apiBase,t,"addresses",`?${s}`),a=await this.httpService.get(o),c=jn.safeParse(a);if(!c.success)throw new Error("Failed to parse name resolution");return c.data}async getProvidersNames(t){const n=i.urlJoin(this.apiBase,t,"providers","name"),r=await this.httpService.get(n),s=$n.safeParse(r);if(!s.success)throw new Error("Failed to parse name resolution");return s.data}}const At=e=>e.slice(0,6)+"..."+e.slice(-4);function $t(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Zo(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Xe(e,...t){if(!Zo(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function jt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Yo(e,t){Xe(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const je=BigInt(2**32-1),zt=BigInt(32);function Jo(e,t=!1){return t?{h:Number(e&je),l:Number(e>>zt&je)}:{h:Number(e>>zt&je)|0,l:Number(e&je)|0}}function Xo(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let s=0;s<e.length;s++){const{h:o,l:a}=Jo(e[s],t);[n[s],r[s]]=[o,a]}return[n,r]}const Qo=(e,t,n)=>e<<n|t>>>32-n,ea=(e,t,n)=>t<<n|e>>>32-n,ta=(e,t,n)=>t<<n-32|e>>>64-n,na=(e,t,n)=>e<<n-32|t>>>64-n;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ra=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Vt=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,sa=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function Mt(e){for(let t=0;t<e.length;t++)e[t]=sa(e[t])}const oa=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function aa(e){Xe(e);let t="";for(let n=0;n<e.length;n++)t+=oa[e[n]];return t}function zn(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Vn(e){return typeof e=="string"&&(e=zn(e)),Xe(e),e}let ia=class{clone(){return this._cloneInto()}};function ca(e){const t=r=>e().update(Vn(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const Mn=[],qn=[],Gn=[],la=BigInt(0),Ie=BigInt(1),da=BigInt(2),ua=BigInt(7),ha=BigInt(256),fa=BigInt(113);for(let e=0,t=Ie,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Mn.push(2*(5*r+n)),qn.push((e+1)*(e+2)/2%64);let s=la;for(let o=0;o<7;o++)t=(t<<Ie^(t>>ua)*fa)%ha,t&da&&(s^=Ie<<(Ie<<BigInt(o))-Ie);Gn.push(s)}const[ma,pa]=Xo(Gn,!0),qt=(e,t,n)=>n>32?ta(e,t,n):Qo(e,t,n),Gt=(e,t,n)=>n>32?na(e,t,n):ea(e,t,n);function ga(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let a=0;a<10;a++)n[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){const c=(a+8)%10,l=(a+2)%10,d=n[l],h=n[l+1],u=qt(d,h,1)^n[c],b=Gt(d,h,1)^n[c+1];for(let g=0;g<50;g+=10)e[a+g]^=u,e[a+g+1]^=b}let s=e[2],o=e[3];for(let a=0;a<24;a++){const c=qn[a],l=qt(s,o,c),d=Gt(s,o,c),h=Mn[a];s=e[h],o=e[h+1],e[h]=l,e[h+1]=d}for(let a=0;a<50;a+=10){for(let c=0;c<10;c++)n[c]=e[a+c];for(let c=0;c<10;c++)e[a+c]^=~n[(c+2)%10]&n[(c+4)%10]}e[0]^=ma[r],e[1]^=pa[r]}n.fill(0)}let Sa=class Wn extends ia{constructor(t,n,r,s=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,$t(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=ra(this.state)}keccak(){Vt||Mt(this.state32),ga(this.state32,this.rounds),Vt||Mt(this.state32),this.posOut=0,this.pos=0}update(t){jt(this);const{blockLen:n,state:r}=this;t=Vn(t);const s=t.length;for(let o=0;o<s;){const a=Math.min(n-this.pos,s-o);for(let c=0;c<a;c++)r[this.pos++]^=t[o++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:s}=this;t[r]^=n,n&128&&r===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){jt(this,!1),Xe(t),this.finish();const n=this.state,{blockLen:r}=this;for(let s=0,o=t.length;s<o;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,o-s);t.set(n.subarray(this.posOut,this.posOut+a),s),this.posOut+=a,s+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return $t(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Yo(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:s,rounds:o,enableXOF:a}=this;return t||(t=new Wn(n,r,s,a,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=s,t.enableXOF=a,t.destroyed=this.destroyed,t}};const wa=(e,t,n)=>ca(()=>new Sa(t,e,n)),ya=wa(1,136,256/8);function Kn(e){return`0x${aa(ya(zn(e)))}`}const ba=e=>{if(!H.isString(e))return;const t=/(\d+)$/,n=e.match(t);if(n)return n[1]},Zn=(e,t=!1)=>{if(!H.isString(e))return"";const n=t?e.replace(/[^0-9a-z ]/gi,""):e,s=H.upperCase(n).split(" "),o=ba(n),a=s.map(c=>c[0]);return o&&o.length>1&&o.length<n.length?[a[0],o.substring(0,2)].join(""):s.length===1?s[0].substring(0,2):[a[0],a[a.length-1]].join("")},{toBigInt:Ea}=w.num,Wt=e=>{const t=e.replace("#","");if(!/^[0-9A-F]{6}$/i.test(t))throw new Error(`Invalid color ${e}`);return`#${t}`},Yn=(e,t)=>{const n=Wt(t.background),r=Wt(t.color??"#ffffff"),s=Zn(e,!0),o=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
</svg>`;return`data:image/svg+xml;base64,${btoa(o)}`},Kt=["02BBA8","29C5FF","0078A4","FFBF3D","FFA85C","FF875B","FF675C","FF5C72"],Jn=e=>{const t=Kn(e).slice(-2),n=parseInt(t,16)%Kt.length;return Kt[n]},Xn=e=>{try{return w.num.toHex(Ea(w.num.hexToDecimalString(e)))}catch{}return""},Aa=({accountName:e,networkId:t,accountAddress:n,backgroundColor:r})=>{const s=Xn(n),o=`${t}::${s}`,a=r||Jn(o);return Yn(e,{background:a})},Qn=e=>{const t=w.encode.removeHexPrefix(w.encode.sanitizeHex(w.num.toHex(e))),n=Be.hex.decode(t);return Be.base58.encode(n)},Ta=e=>e.map(Qn),er=e=>{const t=Be.base58.decode(e);return w.encode.sanitizeHex(Be.hex.encode(t))},va=e=>e.map(er);function xa(e,t){const n=e.getTime(),r=t.getTime(),s=Math.abs(n-r);return Math.floor(s/(1e3*60*60*24))}const Ia=e=>(e||"false")==="true",Ca=async(e,t)=>{try{return await e.getClassHashAt(t),!0}catch{return!1}};function _a(e){return!H.isNil(e)}const Na=e=>{const t=/^(0|0x([a-f0-9A-F]+)?)$/;return!!(e===""||t.test(e))},Y=e=>!isNaN(parseFloat(e))&&isFinite(Number(e)),Ba=(e,t=16)=>{const n=new RegExp(`^[0-9]*.?[0-9]{0,${t}}$`);return e===""?!0:Y(e)?!!n.test(e):!1},Qe={CURRENCY:{minDecimalPlaces:2,maxDecimalPlaces:10,minDecimalSignificantDigits:2,decimalPlacesWhenZero:2,allowLeadingZerosInDecimalPart:!0},TOKEN:{minDecimalPlaces:4,maxDecimalPlaces:16,minDecimalSignificantDigits:2,decimalPlacesWhenZero:1,allowLeadingZerosInDecimalPart:!0}},tr=(e,t)=>Tt(e,{...Qe.CURRENCY,...t||{}}),nr=(e,t)=>Tt(e,{...Qe.TOKEN,...t||{}}),Tt=(e,{minDecimalPlaces:t,maxDecimalPlaces:n,minDecimalSignificantDigits:r,decimalPlacesWhenZero:s,allowLeadingZerosInDecimalPart:o}=Qe.CURRENCY)=>{if(!Y(e))return null;const a=new i.BigNumber(typeof e=="bigint"?e.toString():e);let c;const l=`0.${"".padStart(s-1,"0")}1`;if(a.lt(new i.BigNumber(l))&&!o)c=`0.${"".padStart(s,"0")}`;else if(a.gte(1))c=a.toFormat(t);else{const g=a.toFormat(n).split(".")[1].match(/^0+/),T=o&&g&&g.length?g[0].length:0,m=Math.max(T+r,t);c=a.toFormat(m)}let d=c.replace(/0+$/,"");const h=1+c.indexOf(".")+s;return d.length<h&&(d=c.substring(0,h)),d},rr=(e,t=18)=>{const n=e.replace(",",".");return!e||!Y(n)?0n:i.parseUnits(n,Number(t)).value};function Ee(e){return w.uint256.bnToUint256(e)}const ka=(e,t)=>`${e} ${t}${e===1?"":"s"}`,Oa=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{var s;return r.result?t((s=r.result)==null?void 0:s.toString()):n(new Error("Could not read file"))},r.onerror=n,r.onabort=n.bind(null,new Error("User aborted")),r.readAsText(e)});function Ra(e){try{return H.upperFirst(H.lowerCase(e))}catch{return e}}function Pa(e){return(...t)=>{e(...t)}}class Fa extends Error{constructor(t,n){super(`${t}::${n}`),this.name=t,this.code=n,this.name=t}}class Zt extends Fa{constructor(t){super("BackendPaginationError",t)}}const Yt=32;class Da{constructor(t,n){this.apiBase=t,this.httpService=n}async getNfts(t,n,r,s=1){const o=this.normalizeAddress(r),a=i.urlJoin(this.apiBase,"pandora",t,n),c=this.pageToPageIndex(s),d=`${i.urlJoin(a,"profile",o,"nfts")}?page=${c}&size=${Yt}`,h=await this.httpService.get(d),u=h.content.map(b=>this.mapItem(b,r));return{totalPages:h.totalPages,page:h.number+1,count:u.length,nfts:u}}async getCollection(t,n,r){const s=this.normalizeAddress(r),o=i.urlJoin(this.apiBase,"pandora",t,n),a=i.urlJoin(o,"collection",s),c=`${o}/collection/${s}`,[l,d]=await Promise.all([this.httpService.get(a),this.httpService.get(c)]),h=it(l),u=d.content.map(b=>this.mapItem(b));return{...h,nfts:{totalPages:d.totalPages,page:d.number,count:u.length,data:u}}}async getNft(t,n,r,s){const o=this.normalizeAddress(r),a=i.urlJoin(this.apiBase,"pandora",t,n),c=i.urlJoin(a,"nft",o,s),l=await this.httpService.get(c);return this.mapItem(l)}async getProfileCollections(t,n,r,s=1,o=!1){const a=this.pageToPageIndex(s),c=this.normalizeAddress(r),l=i.urlJoin(this.apiBase,"pandora",t,n),d=i.urlJoin(l,"profile",c,"collections",`?page=${a}&size=${Yt}`),h=await this.httpService.get(d),u=[];for(const b of h.content)if(o){const g=await this.getCollectionMetrics(t,n,b.contractAddress);u.push(it(b,g))}else u.push(it(b));return{totalPages:h.totalPages,page:h.number+1,count:u.length,collections:u}}async getCollectionMetrics(t,n,r){const s=this.normalizeAddress(r),o=i.urlJoin(this.apiBase,"pandora",t,n),a=i.urlJoin(o,"collection",s,"metrics");return this.httpService.get(a)}normalizeAddress(t){return i.addressSchemaArgentBackend.parse(t)}pageToPageIndex(t){if(!Number.isInteger(t))throw new Zt("notANumber");const n=t-1;if(n<0)throw new Zt("tooLow");return n}mapItem(t,n){var s;const r=t.name??t.tokenId;return{token_id:t.tokenId,contract_address:t.contractAddress,name:r,spec:"spec"in t?Ua(t.spec):void 0,description:"",best_bid_order:{payment_amount:"bestListPrice"in t?BigInt(t.bestListPrice):void 0},properties:"properties"in t&&t.properties.map(o=>({key:o.key,value:o.value}))||[],image_uri:t.imageUrls.preview,image_url_copy:t.imageUrls.full,owner:{account_address:((s=t.owner)==null?void 0:s.address)||n},contract_name:At(t.contractAddress)}}}function Ua(e){switch(e){case"erc721":case"starknetErc721":return"ERC721";case"erc1155":case"starknetErc1155":return"ERC1155"}}function it(e,t){return{contractAddress:i.addressSchema.parse(e.contractAddress),name:e.name||At(e.contractAddress),description:e.description??"",imageUri:e.imageUrls.preview,...t&&{owners:{total:t.numberOfItems,unique:t.uniqueOwners},...t.floorPrice&&{floorPrice:BigInt(t.floorPrice)}}}}const sr=async(e,t,n,r,s=1)=>{const o=await e.getNfts(t,n,r,s);if(s<o.totalPages){const a=await sr(e,t,n,r,o.page+1);return{...o,nfts:o.nfts.concat(a.nfts)}}return o},La=(e,t,n,r,s)=>{const{data:o,...a}=Ne(r&&[r,"nfts"],()=>r&&sr(e,t,n,r),{refreshInterval:3e5,...s});return{nfts:o==null?void 0:o.nfts,...a}},Ha=(e,t,n,r,s)=>{const{data:o,...a}=Ne(r&&[`${r}`,"nfts-collection"],()=>r&&e.getCollection(t,n,r),{refreshInterval:6e4,...s});return{collection:o,...a}},$a=(e,t,n,r,s,o)=>{const{data:a,...c}=Ne(s&&r&&[`${r}:${s}`,"nft"],()=>s&&r?e.getNft(t,n,r,s):void 0,{refreshInterval:6e4,revalidateOnFocus:!1,revalidateOnMount:!1,...o});return{nft:a,...c}},ja=({image_uri:e,image_url_copy:t})=>{if(e&&t){if(!t.startsWith("ipfs://"))return t;if(!e.startsWith("ipfs://"))return e}return t||e},za=(e,t)=>e.token_id===t.token_id&&i.isEqualAddress(e.contract_address,t.contract_address);function Jt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Va(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function or(e,...t){if(!Va(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function We(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function ar(e,t){or(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const ze=BigInt(2**32-1),Xt=BigInt(32);function Ma(e,t=!1){return t?{h:Number(e&ze),l:Number(e>>Xt&ze)}:{h:Number(e>>Xt&ze)|0,l:Number(e&ze)|0}}function qa(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let s=0;s<e.length;s++){const{h:o,l:a}=Ma(e[s],t);[n[s],r[s]]=[o,a]}return[n,r]}const Ga=(e,t,n)=>e<<n|t>>>32-n,Wa=(e,t,n)=>t<<n|e>>>32-n,Ka=(e,t,n)=>t<<n-32|e>>>64-n,Za=(e,t,n)=>e<<n-32|t>>>64-n;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ya=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));function Ja(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}const ct=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),ee=(e,t)=>e<<32-t|e>>>t,Xa=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Xa)throw new Error("Non little-endian hardware is not supported");function ir(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function vt(e){if(typeof e=="string"&&(e=ir(e)),!Ja(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}let cr=class{clone(){return this._cloneInto()}};function lr(e){const t=r=>e().update(vt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const[dr,ur,hr]=[[],[],[]],Qa=BigInt(0),Ce=BigInt(1),ei=BigInt(2),ti=BigInt(7),ni=BigInt(256),ri=BigInt(113);for(let e=0,t=Ce,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],dr.push(2*(5*r+n)),ur.push((e+1)*(e+2)/2%64);let s=Qa;for(let o=0;o<7;o++)t=(t<<Ce^(t>>ti)*ri)%ni,t&ei&&(s^=Ce<<(Ce<<BigInt(o))-Ce);hr.push(s)}const[si,oi]=qa(hr,!0),Qt=(e,t,n)=>n>32?Ka(e,t,n):Ga(e,t,n),en=(e,t,n)=>n>32?Za(e,t,n):Wa(e,t,n);function ai(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let a=0;a<10;a++)n[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){const c=(a+8)%10,l=(a+2)%10,d=n[l],h=n[l+1],u=Qt(d,h,1)^n[c],b=en(d,h,1)^n[c+1];for(let g=0;g<50;g+=10)e[a+g]^=u,e[a+g+1]^=b}let s=e[2],o=e[3];for(let a=0;a<24;a++){const c=ur[a],l=Qt(s,o,c),d=en(s,o,c),h=dr[a];s=e[h],o=e[h+1],e[h]=l,e[h+1]=d}for(let a=0;a<50;a+=10){for(let c=0;c<10;c++)n[c]=e[a+c];for(let c=0;c<10;c++)e[a+c]^=~n[(c+2)%10]&n[(c+4)%10]}e[0]^=si[r],e[1]^=oi[r]}n.fill(0)}class xt extends cr{constructor(t,n,r,s=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Jt(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Ya(this.state)}keccak(){ai(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){We(this);const{blockLen:n,state:r}=this;t=vt(t);const s=t.length;for(let o=0;o<s;){const a=Math.min(n-this.pos,s-o);for(let c=0;c<a;c++)r[this.pos++]^=t[o++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:s}=this;t[r]^=n,n&128&&r===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){We(this,!1),or(t),this.finish();const n=this.state,{blockLen:r}=this;for(let s=0,o=t.length;s<o;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,o-s);t.set(n.subarray(this.posOut,this.posOut+a),s),this.posOut+=a,s+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Jt(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(ar(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:s,rounds:o,enableXOF:a}=this;return t||(t=new xt(n,r,s,a,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=s,t.enableXOF=a,t.destroyed=this.destroyed,t}}const ii=(e,t,n)=>lr(()=>new xt(t,e,n)),ci=ii(1,136,256/8);function li(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),o=BigInt(4294967295),a=Number(n>>s&o),c=Number(n&o),l=r?4:0,d=r?0:4;e.setUint32(t+l,a,r),e.setUint32(t+d,c,r)}class di extends cr{constructor(t,n,r,s){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ct(this.buffer)}update(t){We(this);const{view:n,buffer:r,blockLen:s}=this;t=vt(t);const o=t.length;for(let a=0;a<o;){const c=Math.min(s-this.pos,o-a);if(c===s){const l=ct(t);for(;s<=o-a;a+=s)this.process(l,a);continue}r.set(t.subarray(a,a+c),this.pos),this.pos+=c,a+=c,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){We(this),ar(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:o}=this;let{pos:a}=this;n[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>s-a&&(this.process(r,0),a=0);for(let u=a;u<s;u++)n[u]=0;li(r,s-8,BigInt(this.length*8),o),this.process(r,0);const c=ct(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=l/4,h=this.get();if(d>h.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<d;u++)c.setUint32(4*u,h[u],o)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:o,destroyed:a,pos:c}=this;return t.length=s,t.pos=c,t.finished=o,t.destroyed=a,s%n&&t.buffer.set(r),t}}const ui=(e,t,n)=>e&t^~e&n,hi=(e,t,n)=>e&t^e&n^t&n,fi=new Uint32Array([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]),ae=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ie=new Uint32Array(64);class mi extends di{constructor(){super(64,32,8,!1),this.A=ae[0]|0,this.B=ae[1]|0,this.C=ae[2]|0,this.D=ae[3]|0,this.E=ae[4]|0,this.F=ae[5]|0,this.G=ae[6]|0,this.H=ae[7]|0}get(){const{A:t,B:n,C:r,D:s,E:o,F:a,G:c,H:l}=this;return[t,n,r,s,o,a,c,l]}set(t,n,r,s,o,a,c,l){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=o|0,this.F=a|0,this.G=c|0,this.H=l|0}process(t,n){for(let u=0;u<16;u++,n+=4)ie[u]=t.getUint32(n,!1);for(let u=16;u<64;u++){const b=ie[u-15],g=ie[u-2],T=ee(b,7)^ee(b,18)^b>>>3,m=ee(g,17)^ee(g,19)^g>>>10;ie[u]=m+ie[u-7]+T+ie[u-16]|0}let{A:r,B:s,C:o,D:a,E:c,F:l,G:d,H:h}=this;for(let u=0;u<64;u++){const b=ee(c,6)^ee(c,11)^ee(c,25),g=h+b+ui(c,l,d)+fi[u]+ie[u]|0,m=(ee(r,2)^ee(r,13)^ee(r,22))+hi(r,s,o)|0;h=d,d=l,l=c,c=a+g|0,a=o,o=s,s=r,r=g+m|0}r=r+this.A|0,s=s+this.B|0,o=o+this.C|0,a=a+this.D|0,c=c+this.E|0,l=l+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,s,o,a,c,l,d,h)}roundClean(){ie.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const fr=lr(()=>new mi);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const mr=BigInt(0),et=BigInt(1),pi=BigInt(2),tt=e=>e instanceof Uint8Array,gi=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function fe(e){if(!tt(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=gi[e[n]];return t}function pr(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function It(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}function me(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(e.length%2)throw new Error("hex string is invalid: unpadded "+e.length);const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=n*2,s=e.slice(r,r+2),o=Number.parseInt(s,16);if(Number.isNaN(o)||o<0)throw new Error("invalid byte sequence");t[n]=o}return t}function X(e){return It(fe(e))}function Ct(e){if(!tt(e))throw new Error("Uint8Array expected");return It(fe(Uint8Array.from(e).reverse()))}const ye=(e,t)=>me(e.toString(16).padStart(t*2,"0")),gr=(e,t)=>ye(e,t).reverse(),Si=e=>me(pr(e));function q(e,t,n){let r;if(typeof t=="string")try{r=me(t)}catch(o){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${o}`)}else if(tt(t))r=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(`${e} expected ${n} bytes, got ${s}`);return r}function Pe(...e){const t=new Uint8Array(e.reduce((r,s)=>r+s.length,0));let n=0;return e.forEach(r=>{if(!tt(r))throw new Error("Uint8Array expected");t.set(r,n),n+=r.length}),t}function wi(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function yi(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}function bi(e){let t;for(t=0;e>mr;e>>=et,t+=1);return t}const Ei=(e,t)=>e>>BigInt(t)&et,Ai=(e,t,n)=>e|(n?et:mr)<<BigInt(t),nt=e=>(pi<<BigInt(e-1))-et,lt=e=>new Uint8Array(e),tn=e=>Uint8Array.from(e);function Sr(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=lt(e),s=lt(e),o=0;const a=()=>{r.fill(1),s.fill(0),o=0},c=(...u)=>n(s,r,...u),l=(u=lt())=>{s=c(tn([0]),u),r=c(),u.length!==0&&(s=c(tn([1]),u),r=c())},d=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const b=[];for(;u<t;){r=c();const g=r.slice();b.push(g),u+=r.length}return Pe(...b)};return(u,b)=>{a(),l(u);let g;for(;!(g=b(d()));)l();return a(),g}}const Ti={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Ue(e,t,n={}){const r=(s,o,a)=>{const c=Ti[o];if(typeof c!="function")throw new Error(`Invalid validator "${o}", expected function`);const l=e[s];if(!(a&&l===void 0)&&!c(l,e))throw new Error(`Invalid param ${String(s)}=${l} (${typeof l}), expected ${o}`)};for(const[s,o]of Object.entries(t))r(s,o,!1);for(const[s,o]of Object.entries(n))r(s,o,!0);return e}const vi=Object.freeze(Object.defineProperty({__proto__:null,bitGet:Ei,bitLen:bi,bitMask:nt,bitSet:Ai,bytesToHex:fe,bytesToNumberBE:X,bytesToNumberLE:Ct,concatBytes:Pe,createHmacDrbg:Sr,ensureBytes:q,equalBytes:wi,hexToBytes:me,hexToNumber:It,numberToBytesBE:ye,numberToBytesLE:gr,numberToHexUnpadded:pr,numberToVarBytesBE:Si,utf8ToBytes:yi,validateObject:Ue},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const $=BigInt(0),U=BigInt(1),le=BigInt(2),xi=BigInt(3),mt=BigInt(4),nn=BigInt(5),rn=BigInt(8);BigInt(9);BigInt(16);function G(e,t){const n=e%t;return n>=$?n:t+n}function Ii(e,t,n){if(n<=$||t<$)throw new Error("Expected power/modulo > 0");if(n===U)return $;let r=U;for(;t>$;)t&U&&(r=r*e%n),e=e*e%n,t>>=U;return r}function pt(e,t){if(e===$||t<=$)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=G(e,t),r=t,s=$,o=U;for(;n!==$;){const c=r/n,l=r%n,d=s-o*c;r=n,n=l,s=o,o=d}if(r!==U)throw new Error("invert: does not exist");return G(s,t)}function Ci(e){const t=(e-U)/le;let n,r,s;for(n=e-U,r=0;n%le===$;n/=le,r++);for(s=le;s<e&&Ii(s,t,e)!==e-U;s++);if(r===1){const a=(e+U)/mt;return function(l,d){const h=l.pow(d,a);if(!l.eql(l.sqr(h),d))throw new Error("Cannot find square root");return h}}const o=(n+U)/le;return function(c,l){if(c.pow(l,t)===c.neg(c.ONE))throw new Error("Cannot find square root");let d=r,h=c.pow(c.mul(c.ONE,s),n),u=c.pow(l,o),b=c.pow(l,n);for(;!c.eql(b,c.ONE);){if(c.eql(b,c.ZERO))return c.ZERO;let g=1;for(let m=c.sqr(b);g<d&&!c.eql(m,c.ONE);g++)m=c.sqr(m);const T=c.pow(h,U<<BigInt(d-g-1));h=c.sqr(T),u=c.mul(u,T),b=c.mul(b,h),d=g}return u}}function _i(e){if(e%mt===xi){const t=(e+U)/mt;return function(r,s){const o=r.pow(s,t);if(!r.eql(r.sqr(o),s))throw new Error("Cannot find square root");return o}}if(e%rn===nn){const t=(e-nn)/rn;return function(r,s){const o=r.mul(s,le),a=r.pow(o,t),c=r.mul(s,a),l=r.mul(r.mul(c,le),a),d=r.mul(c,r.sub(l,r.ONE));if(!r.eql(r.sqr(d),s))throw new Error("Cannot find square root");return d}}return Ci(e)}const Ni=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function _t(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=Ni.reduce((r,s)=>(r[s]="function",r),t);return Ue(e,n)}function wr(e,t,n){if(n<$)throw new Error("Expected power > 0");if(n===$)return e.ONE;if(n===U)return t;let r=e.ONE,s=t;for(;n>$;)n&U&&(r=e.mul(r,s)),s=e.sqr(s),n>>=U;return r}function Bi(e,t){const n=new Array(t.length),r=t.reduce((o,a,c)=>e.is0(a)?o:(n[c]=o,e.mul(o,a)),e.ONE),s=e.inv(r);return t.reduceRight((o,a,c)=>e.is0(a)?o:(n[c]=e.mul(o,n[c]),e.mul(o,a)),s),n}function Nt(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Bt(e,t,n=!1,r={}){if(e<=$)throw new Error(`Expected Fp ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:o}=Nt(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=_i(e),c=Object.freeze({ORDER:e,BITS:s,BYTES:o,MASK:nt(s),ZERO:$,ONE:U,create:l=>G(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return $<=l&&l<e},is0:l=>l===$,isOdd:l=>(l&U)===U,neg:l=>G(-l,e),eql:(l,d)=>l===d,sqr:l=>G(l*l,e),add:(l,d)=>G(l+d,e),sub:(l,d)=>G(l-d,e),mul:(l,d)=>G(l*d,e),pow:(l,d)=>wr(c,l,d),div:(l,d)=>G(l*pt(d,e),e),sqrN:l=>l*l,addN:(l,d)=>l+d,subN:(l,d)=>l-d,mulN:(l,d)=>l*d,inv:l=>pt(l,e),sqrt:r.sqrt||(l=>a(c,l)),invertBatch:l=>Bi(c,l),cmov:(l,d,h)=>h?d:l,toBytes:l=>n?gr(l,o):ye(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return n?Ct(l):X(l)}});return Object.freeze(c)}function ki(e,t,n=!1){e=q("privateHash",e);const r=e.length,s=Nt(t).nByteLength+8;if(s<24||r<s||r>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${r}`);const o=n?Ct(e):X(e);return G(o,t-U)+U}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Oi(e){const{Fp:t}=e;_t(t);for(const l of["t","roundsFull","roundsPartial"])if(typeof e[l]!="number"||!Number.isSafeInteger(e[l]))throw new Error(`Poseidon: invalid param ${l}=${e[l]} (${typeof e[l]})`);if(e.reversePartialPowIdx!==void 0&&typeof e.reversePartialPowIdx!="boolean")throw new Error(`Poseidon: invalid param reversePartialPowIdx=${e.reversePartialPowIdx}`);let n=e.sboxPower;if(n===void 0&&(n=5),typeof n!="number"||!Number.isSafeInteger(n))throw new Error(`Poseidon wrong sboxPower=${n}`);const r=BigInt(n);let s=l=>wr(t,l,r);if(n===3?s=l=>t.mul(t.sqrN(l),l):n===5&&(s=l=>t.mul(t.sqrN(t.sqrN(l)),l)),e.roundsFull%2!==0)throw new Error(`Poseidon roundsFull is not even: ${e.roundsFull}`);const o=e.roundsFull+e.roundsPartial;if(!Array.isArray(e.roundConstants)||e.roundConstants.length!==o)throw new Error("Poseidon: wrong round constants");const a=e.roundConstants.map(l=>{if(!Array.isArray(l)||l.length!==e.t)throw new Error(`Poseidon wrong round constants: ${l}`);return l.map(d=>{if(typeof d!="bigint"||!t.isValid(d))throw new Error(`Poseidon wrong round constant=${d}`);return t.create(d)})});if(!Array.isArray(e.mds)||e.mds.length!==e.t)throw new Error("Poseidon: wrong MDS matrix");const c=e.mds.map(l=>{if(!Array.isArray(l)||l.length!==e.t)throw new Error(`Poseidon MDS matrix row: ${l}`);return l.map(d=>{if(typeof d!="bigint")throw new Error(`Poseidon MDS matrix value=${d}`);return t.create(d)})});return Object.freeze({...e,rounds:o,sboxFn:s,roundConstants:a,mds:c})}function Ri(e){const{t,Fp:n,rounds:r,sboxFn:s,reversePartialPowIdx:o}=Oi(e),a=Math.floor(e.roundsFull/2),c=o?t-1:0,l=(h,u,b)=>(h=h.map((g,T)=>n.add(g,e.roundConstants[b][T])),u?h=h.map(g=>s(g)):h[c]=s(h[c]),h=e.mds.map(g=>g.reduce((T,m,S)=>n.add(T,n.mulN(m,h[S])),n.ZERO)),h),d=function(u){if(!Array.isArray(u)||u.length!==t)throw new Error(`Poseidon: wrong values (expected array of bigints with length ${t})`);u=u.map(g=>{if(typeof g!="bigint")throw new Error(`Poseidon: wrong value=${g} (${typeof g})`);return n.create(g)});let b=0;for(let g=0;g<a;g++)u=l(u,!0,b++);for(let g=0;g<e.roundsPartial;g++)u=l(u,!1,b++);for(let g=0;g<a;g++)u=l(u,!0,b++);if(b!==r)throw new Error(`Poseidon: wrong number of rounds: last round=${b}, total=${r}`);return u};return d.roundConstants=e.roundConstants,d}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Pi=BigInt(0),dt=BigInt(1);function Fi(e,t){const n=(s,o)=>{const a=o.negate();return s?a:o},r=s=>{const o=Math.ceil(t/s)+1,a=2**(s-1);return{windows:o,windowSize:a}};return{constTimeNegate:n,unsafeLadder(s,o){let a=e.ZERO,c=s;for(;o>Pi;)o&dt&&(a=a.add(c)),c=c.double(),o>>=dt;return a},precomputeWindow(s,o){const{windows:a,windowSize:c}=r(o),l=[];let d=s,h=d;for(let u=0;u<a;u++){h=d,l.push(h);for(let b=1;b<c;b++)h=h.add(d),l.push(h);d=h.double()}return l},wNAF(s,o,a){const{windows:c,windowSize:l}=r(s);let d=e.ZERO,h=e.BASE;const u=BigInt(2**s-1),b=2**s,g=BigInt(s);for(let T=0;T<c;T++){const m=T*l;let S=Number(a&u);a>>=g,S>l&&(S-=b,a+=dt);const y=m,v=m+Math.abs(S)-1,I=T%2!==0,O=S<0;S===0?h=h.add(n(I,o[y])):d=d.add(n(O,o[v]))}return{p:d,f:h}},wNAFCached(s,o,a,c){const l=s._WINDOW_SIZE||1;let d=o.get(s);return d||(d=this.precomputeWindow(s,l),l!==1&&o.set(s,c(d))),this.wNAF(l,d,a)}}}function yr(e){return _t(e.Fp),Ue(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Nt(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Di(e){const t=yr(e);Ue(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:s}=t;if(n){if(!r.eql(s,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:Ui,hexToBytes:Li}=vi,de={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=de;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Ui(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=de,n=typeof e=="string"?Li(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:s,l:o}=de._parseInt(n.subarray(2)),{d:a,l:c}=de._parseInt(o);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r:s,s:a}},hexFromSig(e){const t=d=>Number.parseInt(d[0],16)&8?"00"+d:d,n=d=>{const h=d.toString(16);return h.length&1?`0${h}`:h},r=t(n(e.s)),s=t(n(e.r)),o=r.length/2,a=s.length/2,c=n(o),l=n(a);return`30${n(a+o+4)}02${l}${s}02${c}${r}`}},te=BigInt(0),Z=BigInt(1);BigInt(2);const sn=BigInt(3);BigInt(4);function Hi(e){const t=Di(e),{Fp:n}=t,r=t.toBytes||((T,m,S)=>{const y=m.toAffine();return Pe(Uint8Array.from([4]),n.toBytes(y.x),n.toBytes(y.y))}),s=t.fromBytes||(T=>{const m=T.subarray(1),S=n.fromBytes(m.subarray(0,n.BYTES)),y=n.fromBytes(m.subarray(n.BYTES,2*n.BYTES));return{x:S,y}});function o(T){const{a:m,b:S}=t,y=n.sqr(T),v=n.mul(y,T);return n.add(n.add(v,n.mul(T,m)),S)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function a(T){return typeof T=="bigint"&&te<T&&T<t.n}function c(T){if(!a(T))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function l(T){const{allowedPrivateKeyLengths:m,nByteLength:S,wrapPrivateKey:y,n:v}=t;if(m&&typeof T!="bigint"){if(T instanceof Uint8Array&&(T=fe(T)),typeof T!="string"||!m.includes(T.length))throw new Error("Invalid key");T=T.padStart(S*2,"0")}let I;try{I=typeof T=="bigint"?T:X(q("private key",T,S))}catch{throw new Error(`private key must be ${S} bytes, hex or bigint, not ${typeof T}`)}return y&&(I=G(I,v)),c(I),I}const d=new Map;function h(T){if(!(T instanceof u))throw new Error("ProjectivePoint expected")}class u{constructor(m,S,y){if(this.px=m,this.py=S,this.pz=y,m==null||!n.isValid(m))throw new Error("x required");if(S==null||!n.isValid(S))throw new Error("y required");if(y==null||!n.isValid(y))throw new Error("z required")}static fromAffine(m){const{x:S,y}=m||{};if(!m||!n.isValid(S)||!n.isValid(y))throw new Error("invalid affine point");if(m instanceof u)throw new Error("projective point not allowed");const v=I=>n.eql(I,n.ZERO);return v(S)&&v(y)?u.ZERO:new u(S,y,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(m){const S=n.invertBatch(m.map(y=>y.pz));return m.map((y,v)=>y.toAffine(S[v])).map(u.fromAffine)}static fromHex(m){const S=u.fromAffine(s(q("pointHex",m)));return S.assertValidity(),S}static fromPrivateKey(m){return u.BASE.multiply(l(m))}_setWindowSize(m){this._WINDOW_SIZE=m,d.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:m,y:S}=this.toAffine();if(!n.isValid(m)||!n.isValid(S))throw new Error("bad point: x or y not FE");const y=n.sqr(S),v=o(m);if(!n.eql(y,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:m}=this.toAffine();if(n.isOdd)return!n.isOdd(m);throw new Error("Field doesn't support isOdd")}equals(m){h(m);const{px:S,py:y,pz:v}=this,{px:I,py:O,pz:B}=m,x=n.eql(n.mul(S,B),n.mul(I,v)),C=n.eql(n.mul(y,B),n.mul(O,v));return x&&C}negate(){return new u(this.px,n.neg(this.py),this.pz)}double(){const{a:m,b:S}=t,y=n.mul(S,sn),{px:v,py:I,pz:O}=this;let B=n.ZERO,x=n.ZERO,C=n.ZERO,N=n.mul(v,v),W=n.mul(I,I),D=n.mul(O,O),R=n.mul(v,I);return R=n.add(R,R),C=n.mul(v,O),C=n.add(C,C),B=n.mul(m,C),x=n.mul(y,D),x=n.add(B,x),B=n.sub(W,x),x=n.add(W,x),x=n.mul(B,x),B=n.mul(R,B),C=n.mul(y,C),D=n.mul(m,D),R=n.sub(N,D),R=n.mul(m,R),R=n.add(R,C),C=n.add(N,N),N=n.add(C,N),N=n.add(N,D),N=n.mul(N,R),x=n.add(x,N),D=n.mul(I,O),D=n.add(D,D),N=n.mul(D,R),B=n.sub(B,N),C=n.mul(D,W),C=n.add(C,C),C=n.add(C,C),new u(B,x,C)}add(m){h(m);const{px:S,py:y,pz:v}=this,{px:I,py:O,pz:B}=m;let x=n.ZERO,C=n.ZERO,N=n.ZERO;const W=t.a,D=n.mul(t.b,sn);let R=n.mul(S,I),z=n.mul(y,O),V=n.mul(v,B),ne=n.add(S,y),p=n.add(I,O);ne=n.mul(ne,p),p=n.add(R,z),ne=n.sub(ne,p),p=n.add(S,v);let E=n.add(I,B);return p=n.mul(p,E),E=n.add(R,V),p=n.sub(p,E),E=n.add(y,v),x=n.add(O,B),E=n.mul(E,x),x=n.add(z,V),E=n.sub(E,x),N=n.mul(W,p),x=n.mul(D,V),N=n.add(x,N),x=n.sub(z,N),N=n.add(z,N),C=n.mul(x,N),z=n.add(R,R),z=n.add(z,R),V=n.mul(W,V),p=n.mul(D,p),z=n.add(z,V),V=n.sub(R,V),V=n.mul(W,V),p=n.add(p,V),R=n.mul(z,p),C=n.add(C,R),R=n.mul(E,p),x=n.mul(ne,x),x=n.sub(x,R),R=n.mul(ne,z),N=n.mul(E,N),N=n.add(N,R),new u(x,C,N)}subtract(m){return this.add(m.negate())}is0(){return this.equals(u.ZERO)}wNAF(m){return g.wNAFCached(this,d,m,S=>{const y=n.invertBatch(S.map(v=>v.pz));return S.map((v,I)=>v.toAffine(y[I])).map(u.fromAffine)})}multiplyUnsafe(m){const S=u.ZERO;if(m===te)return S;if(c(m),m===Z)return this;const{endo:y}=t;if(!y)return g.unsafeLadder(this,m);let{k1neg:v,k1:I,k2neg:O,k2:B}=y.splitScalar(m),x=S,C=S,N=this;for(;I>te||B>te;)I&Z&&(x=x.add(N)),B&Z&&(C=C.add(N)),N=N.double(),I>>=Z,B>>=Z;return v&&(x=x.negate()),O&&(C=C.negate()),C=new u(n.mul(C.px,y.beta),C.py,C.pz),x.add(C)}multiply(m){c(m);let S=m,y,v;const{endo:I}=t;if(I){const{k1neg:O,k1:B,k2neg:x,k2:C}=I.splitScalar(S);let{p:N,f:W}=this.wNAF(B),{p:D,f:R}=this.wNAF(C);N=g.constTimeNegate(O,N),D=g.constTimeNegate(x,D),D=new u(n.mul(D.px,I.beta),D.py,D.pz),y=N.add(D),v=W.add(R)}else{const{p:O,f:B}=this.wNAF(S);y=O,v=B}return u.normalizeZ([y,v])[0]}multiplyAndAddUnsafe(m,S,y){const v=u.BASE,I=(B,x)=>x===te||x===Z||!B.equals(v)?B.multiplyUnsafe(x):B.multiply(x),O=I(this,S).add(I(m,y));return O.is0()?void 0:O}toAffine(m){const{px:S,py:y,pz:v}=this,I=this.is0();m==null&&(m=I?n.ONE:n.inv(v));const O=n.mul(S,m),B=n.mul(y,m),x=n.mul(v,m);if(I)return{x:n.ZERO,y:n.ZERO};if(!n.eql(x,n.ONE))throw new Error("invZ was invalid");return{x:O,y:B}}isTorsionFree(){const{h:m,isTorsionFree:S}=t;if(m===Z)return!0;if(S)return S(u,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:m,clearCofactor:S}=t;return m===Z?this:S?S(u,this):this.multiplyUnsafe(t.h)}toRawBytes(m=!0){return this.assertValidity(),r(u,this,m)}toHex(m=!0){return fe(this.toRawBytes(m))}}u.BASE=new u(t.Gx,t.Gy,n.ONE),u.ZERO=new u(n.ZERO,n.ONE,n.ZERO);const b=t.nBitLength,g=Fi(u,t.endo?Math.ceil(b/2):b);return{CURVE:t,ProjectivePoint:u,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:a}}function $i(e){const t=yr(e);return Ue(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function ji(e){const t=$i(e),{Fp:n,n:r}=t,s=n.BYTES+1,o=2*n.BYTES+1;function a(p){return te<p&&p<n.ORDER}function c(p){return G(p,r)}function l(p){return pt(p,r)}const{ProjectivePoint:d,normPrivateKeyToScalar:h,weierstrassEquation:u,isWithinCurveOrder:b}=Hi({...t,toBytes(p,E,_){const F=E.toAffine(),P=n.toBytes(F.x),j=Pe;return _?j(Uint8Array.from([E.hasEvenY()?2:3]),P):j(Uint8Array.from([4]),P,n.toBytes(F.y))},fromBytes(p){const E=p.length,_=p[0],F=p.subarray(1);if(E===s&&(_===2||_===3)){const P=X(F);if(!a(P))throw new Error("Point is not on curve");const j=u(P);let K=n.sqrt(j);const M=(K&Z)===Z;return(_&1)===1!==M&&(K=n.neg(K)),{x:P,y:K}}else if(E===o&&_===4){const P=n.fromBytes(F.subarray(0,n.BYTES)),j=n.fromBytes(F.subarray(n.BYTES,2*n.BYTES));return{x:P,y:j}}else throw new Error(`Point of length ${E} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`)}}),g=p=>fe(ye(p,t.nByteLength));function T(p){const E=r>>Z;return p>E}function m(p){return T(p)?c(-p):p}const S=(p,E,_)=>X(p.slice(E,_));class y{constructor(E,_,F){this.r=E,this.s=_,this.recovery=F,this.assertValidity()}static fromCompact(E){const _=t.nByteLength;return E=q("compactSignature",E,_*2),new y(S(E,0,_),S(E,_,2*_))}static fromDER(E){const{r:_,s:F}=de.toSig(q("DER",E));return new y(_,F)}assertValidity(){if(!b(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!b(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new y(this.r,this.s,E)}recoverPublicKey(E){const{r:_,s:F,recovery:P}=this,j=C(q("msgHash",E));if(P==null||![0,1,2,3].includes(P))throw new Error("recovery id invalid");const K=P===2||P===3?_+t.n:_;if(K>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const M=P&1?"03":"02",re=d.fromHex(M+g(K)),se=l(K),pe=c(-j*se),ve=c(F*se),oe=d.BASE.multiplyAndAddUnsafe(re,pe,ve);if(!oe)throw new Error("point at infinify");return oe.assertValidity(),oe}hasHighS(){return T(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return me(this.toDERHex())}toDERHex(){return de.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return me(this.toCompactHex())}toCompactHex(){return g(this.r)+g(this.s)}}const v={isValidPrivateKey(p){try{return h(p),!0}catch{return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const p=t.randomBytes(n.BYTES+8),E=ki(p,r);return ye(E,t.nByteLength)},precompute(p=8,E=d.BASE){return E._setWindowSize(p),E.multiply(BigInt(3)),E}};function I(p,E=!0){return d.fromPrivateKey(p).toRawBytes(E)}function O(p){const E=p instanceof Uint8Array,_=typeof p=="string",F=(E||_)&&p.length;return E?F===s||F===o:_?F===2*s||F===2*o:p instanceof d}function B(p,E,_=!0){if(O(p))throw new Error("first arg must be private key");if(!O(E))throw new Error("second arg must be public key");return d.fromHex(E).multiply(h(p)).toRawBytes(_)}const x=t.bits2int||function(p){const E=X(p),_=p.length*8-t.nBitLength;return _>0?E>>BigInt(_):E},C=t.bits2int_modN||function(p){return c(x(p))},N=nt(t.nBitLength);function W(p){if(typeof p!="bigint")throw new Error("bigint expected");if(!(te<=p&&p<N))throw new Error(`bigint expected < 2^${t.nBitLength}`);return ye(p,t.nByteLength)}function D(p,E,_=R){if(["recovered","canonical"].some(ce=>ce in _))throw new Error("sign() legacy options not supported");const{hash:F,randomBytes:P}=t;let{lowS:j,prehash:K,extraEntropy:M}=_;j==null&&(j=!0),p=q("msgHash",p),K&&(p=q("prehashed msgHash",F(p)));const re=C(p),se=h(E),pe=[W(se),W(re)];if(M!=null){const ce=M===!0?P(n.BYTES):M;pe.push(q("extraEntropy",ce,n.BYTES))}const ve=Pe(...pe),oe=re;function st(ce){const ge=x(ce);if(!b(ge))return;const Ft=l(ge),Se=d.BASE.multiply(ge).toAffine(),J=c(Se.x);if(J===te)return;const we=c(Ft*c(oe+J*se));if(we===te)return;let Dt=(Se.x===J?0:2)|Number(Se.y&Z),Ut=we;return j&&T(we)&&(Ut=m(we),Dt^=1),new y(J,Ut,Dt)}return{seed:ve,k2sig:st}}const R={lowS:t.lowS,prehash:!1},z={lowS:t.lowS,prehash:!1};function V(p,E,_=R){const{seed:F,k2sig:P}=D(p,E,_);return Sr(t.hash.outputLen,t.nByteLength,t.hmac)(F,P)}d.BASE._setWindowSize(8);function ne(p,E,_,F=z){var Se;const P=p;if(E=q("msgHash",E),_=q("publicKey",_),"strict"in F)throw new Error("options.strict was renamed to lowS");const{lowS:j,prehash:K}=F;let M,re;try{if(typeof P=="string"||P instanceof Uint8Array)try{M=y.fromDER(P)}catch(J){if(!(J instanceof de.Err))throw J;M=y.fromCompact(P)}else if(typeof P=="object"&&typeof P.r=="bigint"&&typeof P.s=="bigint"){const{r:J,s:we}=P;M=new y(J,we)}else throw new Error("PARSE");re=d.fromHex(_)}catch(J){if(J.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(j&&M.hasHighS())return!1;K&&(E=t.hash(E));const{r:se,s:pe}=M,ve=C(E),oe=l(pe),st=c(ve*oe),ce=c(se*oe),ge=(Se=d.BASE.multiplyAndAddUnsafe(re,st,ce))==null?void 0:Se.toAffine();return ge?c(ge.x)===se:!1}return{CURVE:t,getPublicKey:I,getSharedSecret:B,sign:V,verify:ne,ProjectivePoint:d,Signature:y,utils:v}}function gt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function zi(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function br(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Vi(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");gt(e.outputLen),gt(e.blockLen)}function Mi(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function qi(e,t){br(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const Ve={number:gt,bool:zi,bytes:br,hash:Vi,exists:Mi,output:qi},ut=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Gi=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Gi)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Wi(e){if(typeof e!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}function Ki(e){if(typeof e=="string"&&(e=Wi(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}function Zi(...e){if(!e.every(r=>r instanceof Uint8Array))throw new Error("Uint8Array list expected");if(e.length===1)return e[0];const t=e.reduce((r,s)=>r+s.length,0),n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const o=e[r];n.set(o,s),s+=o.length}return n}class Yi{clone(){return this._cloneInto()}}function Ji(e=32){if(ut&&typeof ut.getRandomValues=="function")return ut.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}class Er extends Yi{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Ve.hash(t);const r=Ki(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(r.length>s?t.create().update(r).digest():r);for(let a=0;a<o.length;a++)o[a]^=54;this.iHash.update(o),this.oHash=t.create();for(let a=0;a<o.length;a++)o[a]^=106;this.oHash.update(o),o.fill(0)}update(t){return Ve.exists(this),this.iHash.update(t),this}digestInto(t){Ve.exists(this),Ve.bytes(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:s,destroyed:o,blockLen:a,outputLen:c}=this;return t=t,t.finished=s,t.destroyed=o,t.blockLen=a,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Ar=(e,t,n)=>new Er(e,t).update(n).digest();Ar.create=(e,t)=>new Er(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Xi(e){return{hash:e,hmac:(t,...n)=>Ar(e,t,Zi(...n)),randomBytes:Ji}}const on=BigInt("3618502788666131213697322783095070105526743751716087489154079457884512865583"),Tr=252;function an(e){for(;e[0]===0;)e=e.subarray(1);const t=e.length*8-Tr,n=X(e);return t>0?n>>BigInt(t):n}function vr(e){return typeof e=="string"&&(e=tc(e),e.length&1&&(e="0"+e)),me(e)}const xr=ji({a:BigInt(1),b:BigInt("3141592653589793238462643383279502884197169399375105820974944592307816406665"),Fp:Bt(BigInt("0x800000000000011000000000000000000000000000000000000000000000001")),n:on,nBitLength:Tr,Gx:BigInt("874739451078007766457464989774322083649278607533249481151382481072868806602"),Gy:BigInt("152666792071518830868575557812948353041420400780739481342941381225525861407"),h:BigInt(1),lowS:!1,...Xi(fr),bits2int:an,bits2int_modN:e=>{const t=X(e).toString(16);return t.length===63&&(e=vr(t+"0")),G(an(e),on)}});function Qi(e){return q("",typeof e=="string"?vr(e):e)}const{CURVE:El,ProjectivePoint:_e,Signature:Al,utils:Tl}=xr;function ec(e){return`0x${fe(e.subarray(1)).replace(/^0+/gm,"")}`}function tc(e){return e.replace(/^0x/i,"")}const Fe=[new _e(2089986280348253421170679821480865132823066470938446095505822317253594081284n,1713931329540660377023406109199410414810705867260802078187082345529207694986n,1n),new _e(996781205833008774514500082376783249102396023663454813447423147977397232763n,1668503676786377725805489344771023921079126552019160156920634619255970485781n,1n),new _e(2251563274489750535117886426533222435294046428347329203627021249169616184184n,1798716007562728905295480679789526322175868328062420237419143593021674992973n,1n),new _e(2138414695194151160943305727036575959195309218611738193261179310511854807447n,113410276730064486255102093846540133784865286929052426931474106396135072156n,1n),new _e(2379962749567351885752724891227938183011949129833673362440656643086021394946n,776496453633298175483985398648758586525933812536653089401905292063708816422n,1n)];function Ir(e,t){const n=[];let r=e;for(let s=0;s<248;s++)n.push(r),r=r.double();r=t;for(let s=0;s<4;s++)n.push(r),r=r.double();return n}const nc=Ir(Fe[1],Fe[2]),rc=Ir(Fe[3],Fe[4]);function sc(e){let t;if(typeof e=="bigint")t=e;else if(typeof e=="number"){if(!Number.isSafeInteger(e))throw new Error(`Invalid pedersenArg: ${e}`);t=BigInt(e)}else t=X(Qi(e));if(!(0n<=t&&t<xr.CURVE.Fp.ORDER))throw new Error(`PedersenArg should be 0 <= value < CURVE.P: ${t}`);return t}function cn(e,t,n){let r=sc(t);for(let s=0;s<252;s++){const o=n[s];if(o.equals(e))throw new Error("Same point");(r&1n)!==0n&&(e=e.add(o)),r>>=1n}return e}function oc(e,t){let n=Fe[0];return n=cn(n,e,nc),n=cn(n,t,rc),ec(n.toRawBytes(!0))}const ac=nt(250),ic=e=>X(ci(e))∾Bt(BigInt("14474011154664525231415395255581126252639794253786371766033694892385558855681"));const cc=Bt(BigInt("3618502788666131213697322783095070105623107215331596699973092056135872020481"));function lc(e,t,n){const r=e.fromBytes(fr(ir(`${t}${n}`)));return e.create(r)}const dc=[[3,1,1],[1,-1,1],[1,1,-2]].map(e=>e.map(BigInt));function uc(e,t){if(_t(e.Fp),!Number.isSafeInteger(e.rate)||!Number.isSafeInteger(e.capacity))throw new Error(`Wrong poseidon opts: ${e}`);const n=e.rate+e.capacity,r=e.roundsFull+e.roundsPartial,s=[];for(let a=0;a<r;a++){const c=[];for(let l=0;l<n;l++)c.push(lc(e.Fp,"Hades",n*a+l));s.push(c)}const o=Ri({...e,t:n,sboxPower:3,reversePartialPowIdx:!0,mds:t,roundConstants:s});return o.m=n,o.rate=e.rate,o.capacity=e.capacity,o}uc({Fp:cc,rate:2,capacity:1,roundsFull:8,roundsPartial:83},dc);exports.RecoveryStatusEnum=void 0;(function(e){e.NOT_STARTED="NOT_STARTED",e.ONGOING="ONGOING",e.AWAITING_FUNDS="AWAITING_FUNDS",e.AWAITING_COMPLETION="AWAITING_COMPLETION",e.COMPLETED="COMPLETED",e.CANCELLED="CANCELLED",e.ERROR="ERROR"})(exports.RecoveryStatusEnum||(exports.RecoveryStatusEnum={}));const Cr=f.z.object({recoveryId:f.z.number()}),hc=f.z.object({feeToken:i.addressSchema,signerSignature:f.z.object({type:f.z.literal("StarknetKey"),signer:f.z.object({publicKey:i.hexSchema,r:i.hexSchema,s:i.hexSchema})})}),_r=f.z.nativeEnum(exports.RecoveryStatusEnum),kt=f.z.object({recoveryId:f.z.number(),status:_r,completionTime:f.z.array(f.z.number()).optional()}),Nr=f.z.object({activeRecovery:kt.optional().or(f.z.null()).optional(),minFees:f.z.record(f.z.number()).optional()}),Br=f.z.object({recovery:kt.optional().or(f.z.null()).optional(),minFees:f.z.record(f.z.number()).optional()});exports.StartOnchainRecoveryErrorStatusEnum=void 0;(function(e){e.UNDEPLOYED_ACCOUNT="undeployedAccount",e.NOT_ENOUGH_TO_PAY_FEES="notEnoughToPayFees",e.RECOVERY_ALREADY_EXISTS="recoveryAlreadyExists"})(exports.StartOnchainRecoveryErrorStatusEnum||(exports.StartOnchainRecoveryErrorStatusEnum={}));const kr=f.z.nativeEnum(exports.StartOnchainRecoveryErrorStatusEnum),fc=f.z.object({status:kr});class mc{constructor(t,n){this.apiBase=t,this.httpService=n}async getRecovery(t,n){const r=i.urlJoin(this.apiBase,"accounts","starknet",t,"recovery",`${n}`),s=await this.httpService.get(r),o=Br.safeParse(s);return o.error?null:o.data}async getActiveRecovery(t){const n=i.urlJoin(this.apiBase,"accounts","starknet",t,"recovery"),r=await this.httpService.get(n),s=Nr.safeParse(r);return s.error?null:s.data}async startRecovery(t,n,r,s){const{r:o,s:a}=w.ec.starkCurve.sign(oc(ic(Be.stringToBytes("utf8","starknet:recovery")),r),s),c={feeToken:n,signerSignature:{type:"StarknetKey",signer:{publicKey:r,r:w.encode.addHexPrefix(o.toString(16)),s:w.encode.addHexPrefix(a.toString(16))}}};return await this.httpService.post(`${this.apiBase}/accounts/starknet/${t}/recovery`,{body:JSON.stringify(c)},Cr)}async completeRecovery(t,n){const r=i.urlJoin(this.apiBase,"accounts","starknet",t,"recovery",`${n}`,"complete");return await this.httpService.post(r)}}async function pc(){if("brave"in navigator)try{return await navigator.brave.isBrave()}catch{}return!1}let ht;function Or(){return ht||(ht=new Kr.UAParser(navigator.userAgent).getResult()),ht}function Le(e){return Or().browser.name===e}function gc(){return Le("Firefox")}function Sc(){return Le("Chrome")}function wc(){return Le("Safari")}function yc(){return Le("Edge")}const bc=f.z.string().refine(e=>Zr.validateMnemonic(e,Yr.wordlist),"Invalid seedphrase"),Ot=[{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",name:"Ether",symbol:"ETH",decimals:18,networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/eth.png"},{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",name:"Ether",symbol:"ETH",decimals:18,networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/eth.png"},{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",name:"Ether",symbol:"ETH",decimals:18,networkId:"localhost",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/eth.png"},{address:"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",name:"Starknet",symbol:"STRK",decimals:"18",networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/strk.png"},{address:"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",name:"Starknet",symbol:"STRK",decimals:"18",networkId:"integration",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/strk.png"},{address:"0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",name:"Starknet",symbol:"STRK",decimals:"18",networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/strk.png"},{address:"0x00da114221cb83fa859dbdb4c44beeaa0bb37c7537ad5ae66fe5e0efd20e6eb3",name:"DAI",symbol:"DAI",decimals:18,networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/dai.png"},{address:"0x03e85bfbb8e2a42b7bead9e88e9a1b19dbccf661471061807292120462396ec9",name:"DAI",symbol:"DAI",decimals:18,networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/dai.png"},{address:"0x06f2a0dfeff180133de890ad69c6ba294574c5f34a67890fd22464f348c4d03c",name:"DAI",symbol:"DAI",decimals:18,networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/dai.png"},{address:"0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",name:"Wrapped BTC",symbol:"WBTC",decimals:8,networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/wbtc.png"},{address:"0x12d537dc323c439dc65c976fad242d5610d27cfb5f31689a0a319b8be7f3d56",name:"Wrapped BTC",symbol:"WBTC",decimals:8,networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/wbtc.png"},{address:"0x020d208b9e57a7f92bfa9f61135446e0961afc340378be97dbd317453c0950ae",name:"Wrapped BTC",symbol:"WBTC",decimals:8,networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/wbtc.png"},{address:"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",name:"USD Coin",symbol:"USDC",decimals:6,networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/usdc.png"},{address:"0x005a643907b9a4bc6a55e9069c4fd5fd1f5c79a22470690f75556c4736e34426",name:"USD Coin",symbol:"USDC",decimals:6,networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/usdc.png"},{address:"0x07ab0b8855a61f480b4423c46c32fa7c553f0aac3531bbddaa282d86244f7a23",name:"USD Coin",symbol:"USDC",decimals:6,networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/usdc.png"},{address:"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",name:"Tether USD",symbol:"USDT",decimals:6,networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/usdt.png"},{address:"0x386e8d061177f19b3b485c20e31137e6f6bc497cc635ccdfcab96fadf5add6a",name:"Tether USD",symbol:"USDT",decimals:6,networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/usdt.png"},{address:"0x00585c32b625999e6e5e78645ff8df7a9001cf5cf3eb6b80ccdd16cb64bd3a34",name:"zkLend Token",symbol:"ZEND",decimals:18,networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/zend.png"},{address:"0x06ea04cd7e40bfef07c3625e2b3472839093d966bf601568128436466f962fcf",name:"Baby Laika",symbol:"BABYLAIKA",decimals:18,networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/babylaika.png"},{address:"0x004a8ff6a7b121c55d5e21af478265c5798f574abaa41efadf569d6939705896",name:"Baby Laika",symbol:"BABYLAIKA",decimals:18,networkId:"sepolia-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/babylaika.png"},{address:"0x0782f0ddca11d9950bc3220e35ac82cf868778edb67a5e58b39838544bc4cd0f",name:"Starknet Voting Token",symbol:"vSTRK",decimals:18,networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/vstrk.png"},{address:"0x075afe6402ad5a5c20dd25e10ec3b3986acaa647b77e4ae24b0cbc9a54a27a87",name:"Ekubo Protocol",symbol:"EKUBO",decimals:18,networkId:"mainnet-alpha",image:"https://dv3jj1unlp2jl.cloudfront.net/128/color/ekubo.png"}],Rr=async(e,t,n)=>{const r=await n.callContract({contractAddress:e,entrypoint:"balanceOf",calldata:[t]});return BigInt(w.num.toHex(w.uint256.uint256ToBN({low:r[0],high:r[1]})))},Ec=async(e,t,n)=>{const r=Ot.filter(o=>o.networkId===e);return(await Promise.allSettled(r.map(o=>t.callContract({contractAddress:o.address,entrypoint:"balanceOf",calldata:[n]})))).reduce((o,a,c)=>{if(a.status==="fulfilled"&&H.isUndefined(a.value)||a.status==="rejected"||a.value[0]==="0x0"&&a.value[1]==="0x0")return o;const l=BigInt(w.num.toHex(w.uint256.uint256ToBN({low:a.value[0],high:a.value[1]}))),d={...r[c],balance:l};return o.push(d),o},[])},Ac=async()=>Ot,Tc=({address:e,networkId:t})=>Ot.find(r=>r.address===e&&r.networkId===t),vc=({amount:e,decimals:t,unitCurrencyValue:n})=>{if(!Y(e)||!Y(t)||!Y(n))return;const r=Number(t),s=BigInt(e)*k.parseCurrency(n.toString()).value;return k.formatUnits({value:s,decimals:r+k.DEFAULT_TOKEN_DECIMALS})},xc=({unitAmount:e,decimals:t})=>{if(e===void 0||!Y(e)||t===void 0||!Y(t))return;const n=Number(t);return i.parseUnits(e.toString(),n).value.toString()},Ic=e=>Y(e)?Number(e):18,{UINT_256_MAX:Cc}=w.uint256,Pr=e=>String(e)===String(Cc),_c=(e,t="$",n)=>{if(e===void 0||!Y(e))return null;const r=tr(e,n);return[t,r].filter(Boolean).join("")},Fr="Unlimited",Nc=({amount:e,decimals:t,symbol:n,showPlusSign:r=!1,withSymbol:s=!0,unlimitedText:o=Fr,prettyConfigOverrides:a})=>{if(!Y(e))return null;let c,l=!1;if(Pr(e))c=o;else{const h=Number(t),u=BigInt(e);l=u>0n;const b=h>0?k.formatUnits({value:u,decimals:h}):u.toString();c=h>0?nr(b,a):b}const d=[c,s&&n].filter(Boolean).join(" ");return r&&l?`+${d}`:d};function Bc(e){return{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"C$",AUD:"A$",CHF:"CHF",CNY:"CN¥"}[e.toUpperCase()]||"$"}var kc=A.retry,Oc=kc;function Rc(e,t){function n(r,s){var o=t||{},a;"randomize"in o||(o.randomize=!0),a=Oc.operation(o);function c(h){s(h||new Error("Aborted"))}function l(h,u){if(h.bail){c(h);return}a.retry(h)?o.onRetry&&o.onRetry(h,u):s(a.mainError())}function d(h){var u;try{u=e(c,h)}catch(b){l(b,h);return}Promise.resolve(u).then(r).catch(function(g){l(g,h)})}a.attempt(d)}return new Promise(n)}var Pc=Rc;const Fc=i.getDefaultExportFromCjs(Pc);class Dc{constructor(t,n){this.apiBase=t,this.httpService=n,this.TOKENS_INFO_URL="/tokens/info",this.TOKENS_DEFI_DECOMPOSITION_URL="/tokens/defi/decomposition"}async fetchTokensInfoFromBackend(t){const n=i.urlJoin(this.apiBase,this.TOKENS_INFO_URL,t??"","?chain=starknet"),r=await this.httpService.get(n),s=i.apiTokensInfoResponseSchema.safeParse(r);if(s.success)return s.data.tokens;const o=i.apiTokenInfoResponseSchema.safeParse(r);if(o.success)return[o.data]}async fetchAddressTokenBalancesFromBackend(t,n,r){const s=i.urlJoin(this.apiBase,"activity","starknet",n,"account",t,"balance");return(await Fc(async c=>{let l;try{l=await this.httpService.get(s)}catch{return c(new Error("Error fetching")),[]}const d=i.apiAccountTokenBalancesSchema.safeParse(l);if(!d.success)return c(new Error("Error parsing response")),[];if(d.data.status!=="initialised")throw new Error("Not initialised yet");return d.data.balances},{retries:5,minTimeout:5e3,...r})).map(c=>({address:c.tokenAddress,balance:c.tokenBalance,networkId:n}))}async fetchDefiDecomposition(t){const n=i.urlJoin(this.apiBase,this.TOKENS_DEFI_DECOMPOSITION_URL,t,"?chain=starknet"),r=await this.httpService.get(n);return i.safeParseAndWarn(i.apiDefiPositionsSchema,r).success||console.error("Backend schema has changed. Make the changes to the models to prevent unknown/unhandled errors."),r.dapps}}const Uc=(e,t,n,r)=>({contractAddress:e,entrypoint:"transfer",calldata:w.CallData.compile({recipient:t,amount:Ee(rr(n,r))})}),Lc=(e,t,n,r)=>({contractAddress:e,entrypoint:"transferFrom",calldata:w.CallData.compile({from_:t,to:n,tokenId:Ee(r)})}),Hc=(e,t,n,r)=>({contractAddress:e,entrypoint:"safeTransferFrom",calldata:w.CallData.compile({from_:t,to:n,tokenId:Ee(r),amount:Ee(1),data_len:"0"})});function Rt(e){return H.upperCase(e.unit)==="WEI"}function Dr(e){return H.upperCase(e.unit)==="FRI"}function ue(e,t){return Rt(e)?{...e,maxFee:t(e.maxFee),overallFee:t(e.overallFee),gasPrice:t(e.gasPrice),gasUsage:t(e.gasUsage)}:{...e,overallFee:t(e.overallFee),gasPrice:t(e.gasPrice),gasUsage:t(e.gasUsage),maxAmount:t(e.maxAmount),maxPricePerUnit:t(e.maxPricePerUnit)}}function be(e){return Rt(e)?{maxFee:e.maxFee}:{amount:e.maxAmount,pricePerUnit:e.maxPricePerUnit}}function Me(e){return Dr({unit:e})?A.STRK_TOKEN_ADDRESS:A.ETH_TOKEN_ADDRESS}function $c(e,t,n=2){const r=BigInt(10**n),s=BigInt(Math.round(t*10**n));return e*s/r}const jc=[A.STRK_TOKEN_ADDRESS],Ur=(e,t=zr)=>{if(e.max&&"amount"in e.max)return{...e,...e.max};const n=10000n,{amount:r,pricePerUnit:s,dataGasConsumed:o=0n,dataGasPrice:a=0n}=e,c=r*s+o*a;if(c<0)throw Error("Cannot calculate max fee for negative fee");const l=w.num.toBigInt(A.argentMaxFee({estimatedFee:c})),d=Number(l)/Number(c),h=t(d),u=BigInt(Math.trunc(h*Number(n)));return{...e,amount:r*u/n,pricePerUnit:s*u/n,dataGasConsumed:o*u/n,dataGasPrice:a*u/n}},De=e=>{const{amount:t,pricePerUnit:n,dataGasConsumed:r=0n,dataGasPrice:s=0n}=e;return t*n+r*s},Lr=e=>{if(e.max)return"maxFee"in e.max?e.max.maxFee:De(e.max)},Ke=e=>{const t=Lr(e);return t||De(Ur(e))},zc=e=>{if(e.deployment&&!i.isEqualAddress(e.deployment.feeTokenAddress,e.transactions.feeTokenAddress))throw Error("Cannot calculate estimated fees for different tokens");const t=De(e.transactions),n=e.deployment?De(e.deployment):0n;return t+n},Vc=e=>{if(e.deployment&&!i.isEqualAddress(e.deployment.feeTokenAddress,e.transactions.feeTokenAddress))throw Error("Cannot calculate estimated fees for different tokens");const t=e.deployment?Ke(e.deployment):0n,n=Ke(e.transactions);return t+n},Mc=(e,t)=>[{contractAddress:e,entrypoint:"transfer",calldata:w.CallData.compile(i.transferCalldataSchema.parse({recipient:t,amount:w.uint256.bnToUint256(BigInt(1))}))}],Hr=(e,t)=>{if(!e)return{transactions:{feeTokenAddress:t??A.ETH_TOKEN_ADDRESS,amount:0n,pricePerUnit:0n,dataGasConsumed:0n,dataGasPrice:0n}};if(!Array.isArray(e))throw Error(`Unexpected simulation response. Expected array. Got ${typeof e}`);if(e.length===1){const n=A.feeEstimationSchema.parse(e[0].feeEstimation);return{transactions:{feeTokenAddress:Me(n.unit),amount:w.num.toBigInt(n.gasUsage),pricePerUnit:w.num.toBigInt(n.gasPrice),max:be(ue(n,w.num.toBigInt)),dataGasConsumed:n.dataGasConsumed?w.num.toBigInt(n.dataGasConsumed):0n,dataGasPrice:n.dataGasPrice?w.num.toBigInt(n.dataGasPrice):0n}}}if(e.length===2){const n=A.feeEstimationSchema.parse(e[0].feeEstimation),r=A.feeEstimationSchema.parse(e[1].feeEstimation);return{deployment:{feeTokenAddress:Me(n.unit),amount:w.num.toBigInt(n.gasUsage),pricePerUnit:w.num.toBigInt(n.gasPrice),max:be(ue(n,w.num.toBigInt)),dataGasConsumed:n.dataGasConsumed?w.num.toBigInt(n.dataGasConsumed):0n,dataGasPrice:n.dataGasPrice?w.num.toBigInt(n.dataGasPrice):0n},transactions:{feeTokenAddress:Me(r.unit),amount:w.num.toBigInt(r.gasUsage),pricePerUnit:w.num.toBigInt(r.gasPrice),max:be(ue(r,w.num.toBigInt)),dataGasConsumed:r.dataGasConsumed?w.num.toBigInt(r.dataGasConsumed):0n,dataGasPrice:r.dataGasPrice?w.num.toBigInt(r.dataGasPrice):0n}}}throw Error("Unexpected simulation response length")},$r=({transaction:e,nonce:t,chainId:n,version:r,isDeploymentTransaction:s,cairoVersion:o,address:a,appDomain:c})=>{let l=t;s&&e.type!=="DEPLOY_ACCOUNT"&&(l=w.num.toHex(1));const d=i.ensureArray(e.calls);return{type:e.type,chainId:n,cairoVersion:o,nonce:l,version:r,account:a,calls:d,calldata:e.calldata,salt:e.salt,signature:e.signature,classHash:e.classHash,appDomain:c}},jr=(e,t)=>{const{transactions:n}=e,r=n.map(l=>{if(!l.simulation)throw new A.EstimateError({code:"SIMULATE_AND_REVIEW_FAILED"});return l}),s=r.map(l=>({...l.simulation,feeEstimation:ue(l.simulation.feeEstimation,Number)})),o=Hr(s,t),[a,c]=r.length===1?[r[0],void 0]:[r[1],r[0]];return{...o,transactions:{...o.transactions,dataGasConsumed:o.transactions.dataGasConsumed??0n,dataGasPrice:o.transactions.dataGasPrice??0n,max:be(ue(a.simulation.feeEstimation,w.num.toBigInt))},deployment:o.deployment&&c?{...o.deployment,dataGasConsumed:o.deployment.dataGasConsumed??0n,dataGasPrice:o.deployment.dataGasPrice??0n,max:be(ue(c.simulation.feeEstimation,w.num.toBigInt))}:void 0}},qc=e=>{const t=Ur(e),n=Ke(e);return{maxFee:n,resourceBounds:{l1_gas:{max_amount:w.num.toHex(n/e.pricePerUnit),max_price_per_unit:w.num.toHex(t.pricePerUnit)},l2_gas:{max_amount:"0x0",max_price_per_unit:"0x0"}}}},Gc=e=>{const t=Math.sqrt(e);return isNaN(t)?Math.sqrt(2):t},zr=e=>{const t=Math.cbrt(e);return isNaN(t)?Math.cbrt(2):t},Wc=e=>e<1||isNaN(e)?1.1:Math.log(e+1)+1,Kc=[A.STRK_TOKEN_ADDRESS];function rt({address:e}){return Kc.some(t=>i.isEqualAddress(e,t))}function Zc(e){return e?Cn().some(t=>i.isEqualAddress(t,e)):!1}function St(e){return rt({address:e})?w.constants.TRANSACTION_VERSION.V3:w.constants.TRANSACTION_VERSION.V1}function Yc(e){return rt({address:e})?w.constants.TRANSACTION_VERSION.F3:w.constants.TRANSACTION_VERSION.F1}function Jc(e,t){return w.isSierra(t.contract)?rt({address:e})?w.constants.TRANSACTION_VERSION.V3:w.constants.TRANSACTION_VERSION.V2:w.constants.TRANSACTION_VERSION.V1}class Xc{constructor(t,n){this.apiBase=t,this.httpService=n}async getLabels(){const t=i.urlJoin(this.apiBase,"reviewer","labels");return await this.httpService.get(t)}async getWarnings(){const t=i.urlJoin(this.apiBase,"reviewer","warnings/reasons");return await this.httpService.get(t)}async simulateAndReview(t,n,r,s,o,a){const c=n.some(l=>l.type==="DEPLOY_ACCOUNT");try{if(!("getChainId"in t))throw new Error("MISSING_METHOD");const l=St(r),d=c?"0x0":await t.getNonce(),h=await t.getChainId(),u={transactions:n.map(y=>({...$r({transaction:y,nonce:d,version:l,chainId:h,isDeploymentTransaction:c,appDomain:s,cairoVersion:t.cairoVersion,address:t.address}),type:y.type}))},b=i.urlJoin(this.apiBase,"reviewer","transactions","v2","review","starknet"),g=a?k.urlWithQuery(b,{delayedTransactions:"true"}):b,T=await this.httpService.post(g,{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(u)},A.simulateAndReviewSchema);if(T.transactions.some(y=>A.isTransactionSimulationError(y)))return T;const S=jr(T,r);return{...T,enrichedFeeEstimation:S}}catch(l){return console.error(l),this.fallbackToOnchainFeeEstimation({transactions:n,account:t,isDeploymentTransaction:c,feeTokenAddress:r,accountDeployTransaction:o})}}getCallsFromTx(t){let n;return t.calls&&(n=i.ensureArray(t.calls)),n}async fallbackToOnchainFeeEstimation({transactions:t,account:n,isDeploymentTransaction:r,feeTokenAddress:s,accountDeployTransaction:o}){try{const a=r?this.getCallsFromTx(t[1]):this.getCallsFromTx(t[0]);if(!a)throw new A.ReviewError({code:"NO_CALLS_FOUND"});const c=await this.fetchFeesOnchain({starknetAccount:n,calls:a,isDeployed:!r,feeTokenAddress:s,accountDeployTransaction:o});return{transactions:[],enrichedFeeEstimation:c,isBackendDown:!0}}catch(a){throw console.error(a),new A.ReviewError({message:`${a}`,code:"SIMULATE_AND_REVIEW_FAILED"})}}async fetchFeesOnchain({starknetAccount:t,calls:n,isDeployed:r,feeTokenAddress:s,accountDeployTransaction:o}){try{const a=St(s),c={transactions:{feeTokenAddress:s,amount:0n,pricePerUnit:0n,dataGasConsumed:0n,dataGasPrice:0n}};if(!r&&o){if("estimateFeeBulk"in t){const l=[{type:w.TransactionType.DEPLOY_ACCOUNT,payload:{classHash:o.classHash,addressSalt:o.salt,constructorCalldata:o.calldata,contractAddress:t.address}},{type:w.TransactionType.INVOKE,payload:n}],[d,h]=await t.estimateFeeBulk(l,{version:a}).catch(u=>{throw console.error(u),u});if(!d.gas_consumed||!d.gas_price||!h.gas_consumed||!h.gas_price)throw new A.ReviewError({code:"ONCHAIN_FEE_ESTIMATION_FAILED",message:"Missing gas_consumed or gas_price"});c.deployment={feeTokenAddress:s,amount:d.gas_consumed,pricePerUnit:d.gas_price,dataGasConsumed:d.data_gas_consumed,dataGasPrice:d.data_gas_price},c.transactions={feeTokenAddress:s,amount:h.gas_consumed,pricePerUnit:h.gas_price,dataGasConsumed:h.data_gas_consumed,dataGasPrice:h.data_gas_price}}}else{const{gas_consumed:l,gas_price:d,data_gas_consumed:h,data_gas_price:u}=await t.estimateFee(n,{skipValidate:!0,version:a});if(!l||!d)throw new A.ReviewError({code:"ONCHAIN_FEE_ESTIMATION_FAILED",message:"Missing gas_consumed or gas_price"});c.transactions={feeTokenAddress:s,amount:l,pricePerUnit:d,dataGasConsumed:h,dataGasPrice:u}}return c}catch(a){throw new A.ReviewError({code:"ONCHAIN_FEE_ESTIMATION_FAILED",message:`${a}`})}}}const Qc=["account-upgrade","approve","set-approval-for-all","swap","transfer"],el=e=>({showBalanceChange:L.useMemo(()=>{const n=e==null?void 0:e.some(s=>!H.isEmpty(s.transfers)),r=e==null?void 0:e.some(s=>!H.isEmpty(s.approvals));return e&&(n||r)},[e])}),He=e=>e?e.filter(t=>t.token.type==="erc20"):[],tl=e=>L.useMemo(()=>He(e),[e]),nl=e=>He(e).length>0,rl=e=>He(e).some(n=>n.amount>0n),sl=e=>He(e).some(n=>n.amount<0n),Pt=e=>e?e.filter(t=>t.token.type==="erc721"):[],ol=e=>L.useMemo(()=>Pt(e),[e]),Vr=e=>Pt(e).length>0,al=e=>L.useMemo(()=>Vr(e),[e]),il=(e,t)=>L.useMemo(()=>e&&t?[{contractAddress:e.address,entrypoint:"transfer",calldata:w.CallData.compile({recipient:t,amount:Ee(e.balance)})}]:[],[e,t]),cl=({apiData:{apiBaseUrl:e,apiHeaders:t},address:n,network:r,transactionReviewEnabled:s=!0,transactions:o})=>{const a=L.useCallback(async()=>{if(!n||!r)return;if(!e)throw"Transaction review endpoint is not defined";const l=i.urlJoin(e,"reviewer/transactions/review/starknet"),d=H.isArray(o)?o:[o],h={network:r,account:n,calls:d};return yt(l,{method:"POST",headers:{"Content-Type":"application/json",...t},body:JSON.stringify(h)})},[n,r,o]),c=L.useMemo(()=>Jr({transactions:o,address:n,network:r}),[o,n,r]);return mn(!!s,[c,"transactionReview"],a)},ll=e=>{if(!e)return{};const t=e.assessment==="warn"&&e.reason!=="contract_is_not_verified",n=e.reason?` (Reason: ${H.lowerCase(e.reason)})`:"",r=t?e.reason==="recipient_is_token_address"?"You are sending tokens to their own address. This is likely to burn them.":`This transaction has been flagged as dangerous. We recommend you reject this transaction unless you are sure.${n}`:void 0;return{warn:t,reason:r}},Mr=e=>{var t;if(e){for(const n of e.reviews)if(((t=n.activity)==null?void 0:t.type)==="swap")return n}},dl=e=>{},ul=(e,t)=>{var n;if(t){for(const r of t.reviews)if(((n=r.activity)==null?void 0:n.type)===e)return r.activity}},hl=e=>!!Mr(e),fl=e=>{var t,n;if(e){for(const r of e.reviews)if((t=r.activity)!=null&&t.type)return{...r,type:(n=r.activity)==null?void 0:n.type}}},qr=async({feeTokenAddress:e,calls:t,selectedAccount:n,transactionReviewService:r,appDomain:s,accountDeployTransaction:o,isDelayedTransaction:a})=>{const c={type:"INVOKE",calls:i.ensureArray(t)};if(!n||!e)return;const l=o?[o,c]:[c];return{result:await r.simulateAndReview(n,l,e,s,o,a)}},Gr=async(e,t,n,r)=>{var b,g,T,m,S,y;let s=!1;const o=t.transactions.find(v=>{var I,O;return(O=(I=v==null?void 0:v.simulation)==null?void 0:I.summary)==null?void 0:O.find(B=>B.sent)});if(!o||!((b=o.simulation)!=null&&b.summary))return s;const a=o.simulation.summary.filter(v=>v.sent).map(v=>v.token.address);if(!(((g=t.enrichedFeeEstimation)==null?void 0:g.transactions.feeTokenAddress)&&a.includes((T=t.enrichedFeeEstimation)==null?void 0:T.transactions.feeTokenAddress))||!((S=(m=t.enrichedFeeEstimation)==null?void 0:m.transactions)!=null&&S.max))return s;const l="amount"in t.enrichedFeeEstimation.transactions.max?t.enrichedFeeEstimation.transactions.max.amount*t.enrichedFeeEstimation.transactions.max.pricePerUnit:"maxFee"in t.enrichedFeeEstimation.transactions.max?t.enrichedFeeEstimation.transactions.max.maxFee:void 0,d=(y=o.simulation.summary.find(v=>v.sent&&v.token.address===n))==null?void 0:y.value;if(!l||!d)return s;const h=await Rr(n,e,r)??0n;return BigInt(h)>l+BigInt(d)||(s=!0),s},ml=()=>L.useCallback(async({feeTokenAddress:t,calls:n,selectedAccount:r,transactionReviewService:s,appDomain:o,accountDeployPayload:a,provider:c,isDelayedTransaction:l})=>{if(!r)return;const d=await qr({feeTokenAddress:t,calls:n,selectedAccount:r,transactionReviewService:s,appDomain:o,accountDeployTransaction:Wr(a),isDelayedTransaction:l});if(!d||!d.result||!t)return;const h=await Gr(r.address,d.result,t,c);return{...d.result,isSendingMoreThanBalanceAndGas:h}},[]),Wr=e=>e?{type:"DEPLOY_ACCOUNT",calldata:e.calldata,classHash:i.hexSchema.parse(e.class_hash),salt:i.hexSchema.parse(e.salt),signature:[]}:void 0;function ln(){return{promise:Promise.resolve()}}function pl(e){return class extends e{constructor({enabled:t,appVersion:n}){super(),this.enabled=t,this.appVersion=n}track(t,n){return!this.enabled||!super.isLoaded?ln():{promise:super.track(t,{app_version:this.appVersion,...n}).promise}}}}const gl=L.createContext({}),Sl=({enabled:e,initialize:t,children:n})=>{const[r,s]=L.useState(!1);return L.useEffect(()=>{!r&&e&&t().then(()=>s(!0))},[r,e,t]),Xr.jsx(gl.Provider,{value:{},children:n})};exports.DEFAULT_TOKEN_DECIMALS=k.DEFAULT_TOKEN_DECIMALS;exports.bipsToPercent=k.bipsToPercent;exports.urlWithQuery=k.urlWithQuery;exports.BaseError=i.BaseError;exports.EventEmitterProvider=i.EventEmitterProvider;Object.defineProperty(exports,"HTTP_ERROR_MESSAGE",{enumerable:!0,get:()=>i.HTTP_ERROR_MESSAGE});exports.HttpError=i.HttpError;Object.defineProperty(exports,"MultiSigner",{enumerable:!0,get:()=>i.MultiSigner});exports.abiEntrySchema=i.abiEntrySchema;exports.abiSchema=i.abiSchema;exports.addOwnersCalldataSchema=i.addOwnersCalldataSchema;exports.addPluginCalldataSchema=i.addPluginCalldataSchema;exports.addressInputCharactersAndLengthSchema=i.addressInputCharactersAndLengthSchema;exports.addressInputSchema=i.addressInputSchema;exports.addressOrDomainInputSchema=i.addressOrDomainInputSchema;exports.addressOrDomainSchema=i.addressOrDomainSchema;exports.addressOrEmptyUndefinedSchema=i.addressOrEmptyUndefinedSchema;exports.addressSchema=i.addressSchema;exports.addressSchemaArgentBackend=i.addressSchemaArgentBackend;exports.addressSchemaBase=i.addressSchemaBase;exports.addressSchemaLooseLength=i.addressSchemaLooseLength;exports.addressSchemaStrictLength=i.addressSchemaStrictLength;exports.apiAccountTokenBalancesSchema=i.apiAccountTokenBalancesSchema;exports.apiAirdropSchema=i.apiAirdropSchema;exports.apiCollateralizedDebtPositionSchema=i.apiCollateralizedDebtPositionSchema;exports.apiCollateralizedDebtPositionsSchema=i.apiCollateralizedDebtPositionsSchema;exports.apiConcentratedLiquidityPositionSchema=i.apiConcentratedLiquidityPositionSchema;exports.apiConcentratedLiquidityPositionsSchema=i.apiConcentratedLiquidityPositionsSchema;exports.apiDefiDecompositionProduct=i.apiDefiDecompositionProduct;exports.apiDefiDecompositionProducts=i.apiDefiDecompositionProducts;exports.apiDefiDecompositionSchema=i.apiDefiDecompositionSchema;exports.apiDefiDecompositionToken=i.apiDefiDecompositionToken;exports.apiDefiPositionsSchema=i.apiDefiPositionsSchema;exports.apiPriceDataResponseSchema=i.apiPriceDataResponseSchema;exports.apiPriceDetailsSchema=i.apiPriceDetailsSchema;exports.apiStakingPositionSchema=i.apiStakingPositionSchema;exports.apiStakingPositionsSchema=i.apiStakingPositionsSchema;exports.apiTokenInfoResponseSchema=i.apiTokenInfoResponseSchema;exports.apiTokenInfoSchema=i.apiTokenInfoSchema;exports.apiTokensInfoResponseSchema=i.apiTokensInfoResponseSchema;exports.apiUnclaimedRewardsSchema=i.apiUnclaimedRewardsSchema;exports.apiWalletResponseSchema=i.apiWalletResponseSchema;exports.argentNameSchema=i.argentNameSchema;exports.bigNumberSchema=i.bigNumberSchema;exports.bigNumberishSchema=i.bigNumberishSchema;exports.booleanToStringSchema=i.booleanToStringSchema;exports.builtinsSchema=i.builtinsSchema;exports.byteCodeSchema=i.byteCodeSchema;exports.cairo1EventSchema=i.cairo1EventSchema;exports.cairoAssemblySchema=i.cairoAssemblySchema;exports.cairoVersionSchema=i.cairoVersionSchema;exports.callDetailsSchema=i.callDetailsSchema;exports.callSchema=i.callSchema;exports.calldataSchema=i.calldataSchema;exports.changeGuardianCalldataSchema=i.changeGuardianCalldataSchema;exports.changeThresholdCalldataSchema=i.changeThresholdCalldataSchema;exports.compiledContractClassSchema=i.compiledContractClassSchema;exports.compiledSierraCasmSchema=i.compiledSierraCasmSchema;exports.compiledSierraSchema=i.compiledSierraSchema;exports.compressedProgramSchema=i.compressedProgramSchema;exports.constructorCallDataSchemaC0=i.constructorCallDataSchemaC0;exports.constructorCallDataSchemaC1V1=i.constructorCallDataSchemaC1V1;exports.contractEntryPointFieldsSchema=i.contractEntryPointFieldsSchema;exports.createSchemaWithWarnings=i.createSchemaWithWarnings;exports.defiPositionTypeSchema=i.defiPositionTypeSchema;exports.ensureArray=i.ensureArray;exports.entryPointsByTypeSchema=i.entryPointsByTypeSchema;exports.escapeGuardianCalldataSchema=i.escapeGuardianCalldataSchema;exports.eventAbiSchema=i.eventAbiSchema;exports.eventEntrySchema=i.eventEntrySchema;exports.executeOnPluginCalldataSchema=i.executeOnPluginCalldataSchema;exports.feltSchema=i.feltSchema;exports.formatFullAddress=i.formatFullAddress;exports.formatTruncatedAddress=i.formatTruncatedAddress;exports.formatTruncatedSignerKey=i.formatTruncatedSignerKey;exports.formatTruncatedString=i.formatTruncatedString;exports.functionAbiSchema=i.functionAbiSchema;exports.functionAbiTypeSchema=i.functionAbiTypeSchema;exports.getAddressFromArgentName=i.getAddressFromArgentName;exports.getSignerForMultiSigner=i.getSignerForMultiSigner;exports.hexSchema=i.hexSchema;exports.hexSchemaBase=i.hexSchemaBase;exports.implementationSchema=i.implementationSchema;exports.includesAddress=i.includesAddress;exports.isAddress=i.isAddress;exports.isArgentName=i.isArgentName;exports.isEqualAddress=i.isEqualAddress;exports.isEqualArgentName=i.isEqualArgentName;exports.isEqualStarknetDomainName=i.isEqualStarknetDomainName;exports.isEqualStarknetId=i.isEqualStarknetId;exports.isStarknetDomainName=i.isStarknetDomainName;exports.isStarknetId=i.isStarknetId;exports.isValidAddress=i.isValidAddress;exports.isZeroAddress=i.isZeroAddress;exports.legacyContractClassSchema=i.legacyContractClassSchema;exports.legacyEventSchema=i.legacyEventSchema;exports.looseCalldataSchema=i.looseCalldataSchema;exports.multiTypeSchema=i.multiTypeSchema;exports.normalizeAddress=i.normalizeAddress;exports.normalizeAddressOrDomain=i.normalizeAddressOrDomain;exports.normalizeArgentName=i.normalizeArgentName;exports.normalizeStarknetId=i.normalizeStarknetId;exports.programSchema=i.programSchema;exports.pythonicHintsSchema=i.pythonicHintsSchema;exports.rawArgsArraySchema=i.rawArgsArraySchema;exports.rawArgsObjectSchema=i.rawArgsObjectSchema;exports.rawArgsSchema=i.rawArgsSchema;exports.removeOwnersCalldataSchema=i.removeOwnersCalldataSchema;exports.removePluginCalldataSchema=i.removePluginCalldataSchema;exports.replaceSignerCalldataSchema=i.replaceSignerCalldataSchema;exports.safeParseAndWarn=i.safeParseAndWarn;exports.sierraContractEntryPointFieldsSchema=i.sierraContractEntryPointFieldsSchema;exports.sierraEntryPointsByTypeSchema=i.sierraEntryPointsByTypeSchema;exports.sierraProgramDebugInfoSchema=i.sierraProgramDebugInfoSchema;exports.starknetDomainNameSchema=i.starknetDomainNameSchema;exports.starknetIdSchema=i.starknetIdSchema;exports.stringToBooleanSchema=i.stringToBooleanSchema;exports.structAbiSchema=i.structAbiSchema;exports.transferCalldataSchema=i.transferCalldataSchema;exports.uint256Schema=i.uint256Schema;exports.useEmitEvent=i.useEmitEvent;exports.useEventEmitter=i.useEventEmitter;exports.useEventEmitterContext=i.useEventEmitterContext;exports.useEventListener=i.useEventListener;exports.useIsEventEmitterEnabled=i.useIsEventEmitterEnabled;exports.validChecksumAddressSchema=i.validChecksumAddressSchema;exports.validateAddressRangeSchema=i.validateAddressRangeSchema;exports.webBaseTokenSchema=i.webBaseTokenSchema;exports.webBaseTokenWithBalanceSchema=i.webBaseTokenWithBalanceSchema;exports.webTokenInfoDetailsSchema=i.webTokenInfoDetailsSchema;exports.webTokenPriceDetailsSchema=i.webTokenPriceDetailsSchema;exports.webTokenSchema=i.webTokenSchema;exports.webTokenWithBalanceAndPriceSchema=i.webTokenWithBalanceAndPriceSchema;exports.webTokenWithBalanceSchema=i.webTokenWithBalanceSchema;exports.webTokenWithPriceSchema=i.webTokenWithPriceSchema;exports.webTokensWithBalanceAndPriceSchema=i.webTokensWithBalanceAndPriceSchema;Object.defineProperty(exports,"ESTIMATE_ERROR_MESSAGES",{enumerable:!0,get:()=>A.ESTIMATE_ERROR_MESSAGES});exports.ETH_TOKEN_ADDRESS=A.ETH_TOKEN_ADDRESS;exports.EstimateError=A.EstimateError;exports.EventsBySelector=A.EventsBySelector;exports.FEE_OVERHEAD=A.FEE_OVERHEAD;exports.STANDARD_DEVNET_ACCOUNT_CLASS_HASH=A.STANDARD_DEVNET_ACCOUNT_CLASS_HASH;exports.STRK_TOKEN_ADDRESS=A.STRK_TOKEN_ADDRESS;Object.defineProperty(exports,"TOKEN_ERROR_MESSAGES",{enumerable:!0,get:()=>A.TOKEN_ERROR_MESSAGES});exports.TXV1_ACCOUNT_CLASS_HASH=A.TXV1_ACCOUNT_CLASS_HASH;exports.TXV1_MULTISIG_CLASS_HASH=A.TXV1_MULTISIG_CLASS_HASH;exports.TXV3_ACCOUNT_CLASS_HASH=A.TXV3_ACCOUNT_CLASS_HASH;exports.TXV3_MULTISIG_CLASS_HASH=A.TXV3_MULTISIG_CLASS_HASH;exports.TokenError=A.TokenError;exports.airdropSchema=A.airdropSchema;exports.argentMaxFee=A.argentMaxFee;exports.collateralizedDebtGroupSchema=A.collateralizedDebtGroupSchema;exports.collateralizedDebtPositionSchema=A.collateralizedDebtPositionSchema;exports.collateralizedDebtPositionsSchema=A.collateralizedDebtPositionsSchema;exports.concentratedLiquidityPositionSchema=A.concentratedLiquidityPositionSchema;exports.concentratedLiquidityPositionsSchema=A.concentratedLiquidityPositionsSchema;exports.defiDappsProductsSchema=A.defiDappsProductsSchema;exports.defiPositionSchema=A.defiPositionSchema;exports.defiProductSchema=A.defiProductSchema;exports.defiProductsSchema=A.defiProductsSchema;exports.denyTxV3=A.denyTxV3;exports.findTransfersAndApprovals=A.findTransfersAndApprovals;exports.getMessageFromTrpcError=A.getMessageFromTrpcError;exports.getPrettyRpcError=A.getPrettyRpcError;exports.inputAmountSchema=A.inputAmountSchema;exports.isValidInputAmount=A.isValidInputAmount;exports.modifySnjsFeeOverhead=A.modifySnjsFeeOverhead;exports.parseAmount=A.parseAmount;exports.productGroupsSchema=A.productGroupsSchema;exports.transactionReviewTransactionsSchema=A.transactionReviewTransactionsSchema;exports.transactionReviewWarningSchema=A.transactionReviewWarningSchema;exports.trpcErrorSchema=A.trpcErrorSchema;exports.txVersionSchema=A.txVersionSchema;exports.unclaimedRewardsSchema=A.unclaimedRewardsSchema;exports.ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES=Q;exports.ARGENT_MULTISIG_CONTRACT_CLASS_HASHES=Oe;exports.AddSmartAccountResponseSchema=Qr;exports.AddSmartAcountRequestSchema=es;exports.BackendAccountSchema=dn;exports.BackendNftService=Da;exports.C0_PROXY_CONTRACT_CLASS_HASHES=En;exports.CacheService=ls;exports.DateService=ds;exports.HTTPService=wt;exports.KnownDappsBackendService=Go;exports.OnchainRecoveryService=mc;exports.PRETTY_UNLIMITED=Fr;exports.ResolveNameService=Ko;exports.SWRService=hs;exports.StarknetAddressService=ys;exports.TokenServiceWeb=Dc;exports.TransactionReviewServiceWeb=Xc;exports.WebAmplitudeProvider=Sl;exports.WebAnalyticsServiceFactory=pl;exports.activeOnchainRecoverySchema=Nr;exports.apiTransactionReviewActivityType=Qc;exports.argentBackendNetworkIdSchema=fn;exports.argentNetworkIdSchema=hn;exports.bigDecimal=cs;exports.buildAccountDeployTransaction=Wr;exports.buildConstructorCalldata=Bn;exports.buildDummyTx=Mc;exports.calculateCubeRootAdjustment=zr;exports.calculateNonLinearAdjustment=Wc;exports.calculateSqrtAdjustment=Gc;exports.castFeeEstimation=ue;exports.checkGasFeeBalance=Gr;exports.classHashSupportsTxV3=Zc;exports.convertTokenAmountToCurrencyValue=vc;exports.convertTokenUnitAmountWithDecimals=xc;exports.dappContractSchema=Rn;exports.dappLinkSchema=On;exports.daysBetween=xa;exports.decodeBase58=er;exports.decodeBase58Array=va;exports.encodeBase58=Qn;exports.encodeBase58Array=Ta;exports.ensureDecimals=Ic;exports.entryPointToHumanReadable=Ra;exports.equalNft=za;exports.erc20TransferTransaction=Uc;exports.erc721SafeTransferFromTransaction=Hc;exports.erc721TransferFromTransaction=Lc;exports.estimatedFeeToMaxFeeTotal=Ke;exports.estimatedFeeToMaxResourceBounds=qc;exports.estimatedFeeToTotal=De;exports.estimatedFeesToMaxFeeTotal=Vc;exports.estimatedFeesToTotal=zc;exports.feeTokenNeedsTxV3Support=rt;exports.fetchData=yt;exports.fetcherError=ke;exports.findImplementationForAccount=zo;exports.formatAddress=At;exports.generateAvatarImage=Yn;exports.getAccountContractAddress=kn;exports.getAccountDeploymentPayload=Nn;exports.getAccountIdentifier=ps;exports.getAddressFromStarkName=bn;exports.getArgentAccountClassHashes=ft;exports.getArgentAccountClassHashesWithTxV3Support=Cn;exports.getArgentAccountWithMultiSignerClassHashes=In;exports.getBackendTimeNowSeconds=ws;exports.getBackendTimeSeconds=pn;exports.getCallFromStarkName=yn;exports.getChainIdFromNetworkId=gn;exports.getColor=Jn;exports.getCurrencySymbol=Bc;exports.getDapplandLinkForDapp=Dn;exports.getDapplandUrlForDapp=Wo;exports.getDisplayWarnAndReasonForTransactionReview=ll;exports.getERC20Transactions=He;exports.getERC721Transactions=Pt;exports.getEstimatedFeeFromBulkSimulation=Hr;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFee=jr;exports.getInitials=Zn;exports.getLastCairo0ArgentAccountClassHash=Ho;exports.getLatestArgentAccountClassHash=xn;exports.getLatestArgentMultisigClassHash=Lo;exports.getLatestLedgerAccountClassHash=jo;exports.getLedgerAccountClassHashes=$o;exports.getNFTTransferActivity=dl;exports.getNetworkAccountImageUrl=Aa;exports.getNftPicture=ja;exports.getPayloadFromTransaction=$r;exports.getReviewForTransactions=qr;exports.getSimulationTxVersionFromFeeToken=Yc;exports.getStarknetIdContractAddressFromNetworkId=wn;exports.getTokenBalance=Rr;exports.getTokens=Ac;exports.getTokensBalances=Ec;exports.getTransactionReviewActivityOfType=ul;exports.getTransactionReviewHasSwap=hl;exports.getTransactionReviewSwap=Mr;exports.getTransactionReviewWithType=fl;exports.getTxVersionFromFeeToken=St;exports.getTxVersionFromFeeTokenForDeclareContract=Jc;exports.getUAParserResult=Or;exports.getUint256CalldataFromBN=Ee;exports.getWatermarkedMaxFeeTotal=Lr;exports.hasERC20Transactions=nl;exports.hasERC721Transactions=Vr;exports.hasIncomingERC20Transactions=rl;exports.hasOutgoingERC20Transactions=sl;exports.id=Kn;exports.isAccountV4=rs;exports.isAccountV5=ns;exports.isAccountV6=ts;exports.isAllowedAddressHexInputValue=Na;exports.isAllowedNumericInputValue=Ba;exports.isArgentBackendNetworkId=as;exports.isArgentNetworkId=os;exports.isBraveBrowser=pc;exports.isBrowser=Le;exports.isChromeBrowser=Sc;exports.isContractDeployed=Ca;exports.isEdgeBrowser=yc;exports.isEqualImplementation=_n;exports.isFRI=Dr;exports.isFeatureEnabled=Ia;exports.isFirefoxBrowser=gc;exports.isNumeric=Y;exports.isSafariBrowser=wc;exports.isUnlimitedAmount=Pr;exports.isWEI=Rt;exports.knownDappSchema=Pn;exports.knownDappsSchema=Fn;exports.multiplyBigIntByFloat=$c;exports.nameProviderResolutionSchema=Ln;exports.nameResolutionAddressSchema=Hn;exports.nameResolutionAddressesSchema=jn;exports.nameResolutionStarknetIdSchema=Et;exports.nameResolutionStarknetIdsSchema=Un;exports.nonNullable=_a;exports.onchainRecoverySchema=Br;exports.parseAmountValue=rr;exports.pluralise=ka;exports.postData=fs;exports.preferencesEndpointPayload=ss;exports.preferencesSchema=un;exports.prettifyCurrencyNumber=tr;exports.prettifyCurrencyValue=_c;exports.prettifyNumber=Tt;exports.prettifyNumberConfig=Qe;exports.prettifyTokenAmount=Nc;exports.prettifyTokenNumber=nr;exports.providersNamesSchema=$n;exports.readFileAsString=Oa;exports.recoveryBaseSchema=kt;exports.recoveryBodySchema=hc;exports.recoveryStatusSchema=_r;exports.seedphraseSchema=bc;exports.starkNameToCallDataDomain=Sn;exports.startOnchainRecoveryErrorSchema=fc;exports.startOnchainRecoveryErrorStatusSchema=kr;exports.startOnchainRecoverySchema=Cr;exports.stripAddressZeroPadding=Xn;exports.swrRefetchDisabledConfig=Ss;exports.toMax=be;exports.tokensRequireTxV3Support=jc;exports.unitToFeeTokenAddress=Me;exports.useBalanceChange=el;exports.useCollection=Ha;exports.useConditionallyEnabledSWR=mn;exports.useDebounce=Vo;exports.useDebouncedValue=Mo;exports.useERC20Transactions=tl;exports.useERC721Transactions=ol;exports.useHasERC721Transaction=al;exports.useMaxAmountTransaction=il;exports.useNft=$a;exports.useNfts=La;exports.useToken=Tc;exports.useTransactionReview=cl;exports.useTransactionReviewV2webFetcher=ml;exports.voidify=Pa;exports.withPolling=ms;
|
|
1
|
+
import * as e from "./src/bigdecimal/index.js";
|
|
2
|
+
import { BaseError as o } from "./src/errors/baseErrors.js";
|
|
3
|
+
import { AddSmartAccountResponseSchema as m, AddSmartAcountRequestSchema as n, BackendAccountSchema as c } from "./src/account/account.model.js";
|
|
4
|
+
import { isAccountV4 as i, isAccountV5 as S, isAccountV6 as d } from "./src/account/accountv4.js";
|
|
5
|
+
import { preferencesEndpointPayload as l, preferencesSchema as h } from "./src/account/preferences.model.js";
|
|
6
|
+
import { argentBackendNetworkIdSchema as u, argentNetworkIdSchema as A, isArgentBackendNetworkId as x, isArgentNetworkId as T } from "./src/backend/schema.js";
|
|
7
|
+
import { CacheService as C } from "./src/cache/CacheService.js";
|
|
8
|
+
import { addressOrEmptyUndefinedSchema as y, addressSchema as E, addressSchemaArgentBackend as D, addressSchemaBase as R, addressSchemaLooseLength as N, addressSchemaStrictLength as F, formatFullAddress as P, formatTruncatedAddress as v, formatTruncatedSignerKey as b, formatTruncatedString as B, includesAddress as I, isAddress as _, isEqualAddress as w, isValidAddress as H, isZeroAddress as L, normalizeAddress as O, validChecksumAddressSchema as V, validateAddressRangeSchema as M } from "./src/chains/starknet/address.js";
|
|
9
|
+
import { addressOrDomainInputSchema as U, addressOrDomainSchema as q, isEqualStarknetDomainName as G, isStarknetDomainName as z, normalizeAddressOrDomain as K, starknetDomainNameSchema as j } from "./src/chains/starknet/addressDomain.js";
|
|
10
|
+
import { addressInputCharactersAndLengthSchema as Y, addressInputSchema as Z } from "./src/chains/starknet/addressInput.js";
|
|
11
|
+
import { argentNameSchema as J, isArgentName as $, isEqualArgentName as ee, normalizeArgentName as re } from "./src/chains/starknet/argentName.js";
|
|
12
|
+
import { cairoVersionSchema as oe } from "./src/chains/starknet/cairoVersionSchema.js";
|
|
13
|
+
import { ETH_TOKEN_ADDRESS as me, STANDARD_DEVNET_ACCOUNT_CLASS_HASH as ne, STRK_TOKEN_ADDRESS as ce, TXV1_ACCOUNT_CLASS_HASH as se, TXV1_MULTISIG_CLASS_HASH as ie, TXV3_ACCOUNT_CLASS_HASH as Se, TXV3_MULTISIG_CLASS_HASH as de } from "./src/chains/starknet/constants.js";
|
|
14
|
+
import { apiWalletResponseSchema as le, getAddressFromArgentName as he } from "./src/chains/starknet/getAddressFromArgentName.js";
|
|
15
|
+
import { getAddressFromStarkName as ue, getCallFromStarkName as Ae, getStarknetIdContractAddressFromNetworkId as xe, starkNameToCallDataDomain as Te } from "./src/chains/starknet/getAddressFromStarkName.js";
|
|
16
|
+
import { getChainIdFromNetworkId as Ce } from "./src/chains/starknet/network.js";
|
|
17
|
+
import { StarknetAddressService as ye } from "./src/chains/starknet/services/address/StarknetAddressService.js";
|
|
18
|
+
import { ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES as De, ARGENT_MULTISIG_CONTRACT_CLASS_HASHES as Re, C0_PROXY_CONTRACT_CLASS_HASHES as Ne } from "./src/chains/starknet/services/deploymentData/constants.js";
|
|
19
|
+
import { constructorCallDataSchemaC0 as Pe, constructorCallDataSchemaC1V1 as ve, implementationSchema as be } from "./src/chains/starknet/services/deploymentData/deploymentData.schema.js";
|
|
20
|
+
import { buildConstructorCalldata as Ie, findImplementationForAccount as _e, getAccountContractAddress as we, getAccountDeploymentPayload as He, isEqualImplementation as Le } from "./src/chains/starknet/services/deploymentData/findImplementationForAccount.js";
|
|
21
|
+
import { getArgentAccountClassHashes as Ve, getArgentAccountClassHashesWithTxV3Support as Me, getArgentAccountWithMultiSignerClassHashes as We, getLastCairo0ArgentAccountClassHash as Ue, getLatestArgentAccountClassHash as qe, getLatestArgentMultisigClassHash as Ge, getLatestLedgerAccountClassHash as ze, getLedgerAccountClassHashes as Ke } from "./src/chains/starknet/services/deploymentData/getAccountClassHash.js";
|
|
22
|
+
import { isEqualStarknetId as Xe, isStarknetId as Ye, normalizeStarknetId as Ze, starknetIdSchema as Qe } from "./src/chains/starknet/starknetId.js";
|
|
23
|
+
import { DateService as $e } from "./src/http/DateService.js";
|
|
24
|
+
import { HttpError as rr } from "./src/http/HttpError.js";
|
|
25
|
+
import { HTTPService as or } from "./src/http/HttpService.js";
|
|
26
|
+
import { HTTP_ERROR_MESSAGE as mr } from "./src/http/IHttpService.js";
|
|
27
|
+
import { SWRService as cr } from "./src/http/SWRService.js";
|
|
28
|
+
import { fetchData as ir, fetcherError as Sr, postData as dr } from "./src/http/fetcher.js";
|
|
29
|
+
import { getBackendTimeNowSeconds as lr, getBackendTimeSeconds as hr } from "./src/http/time.js";
|
|
30
|
+
import { KnownDappsBackendService as ur } from "./src/knownDapps/KnownDappsBackendService.js";
|
|
31
|
+
import { dappContractSchema as xr, dappLinkSchema as Tr, knownDappSchema as gr, knownDappsSchema as Cr } from "./src/knownDapps/schema.js";
|
|
32
|
+
import { getDapplandLinkForDapp as yr, getDapplandUrlForDapp as Er } from "./src/knownDapps/utils/getDapplandUrl.js";
|
|
33
|
+
import { ResolveNameService as Rr } from "./src/nameResolution/ResolveNameService.js";
|
|
34
|
+
import { nameProviderResolutionSchema as Fr, nameResolutionAddressSchema as Pr, nameResolutionAddressesSchema as vr, nameResolutionStarknetIdSchema as br, nameResolutionStarknetIdsSchema as Br, providersNamesSchema as Ir } from "./src/nameResolution/schema.js";
|
|
35
|
+
import { BackendNftService as wr } from "./src/nfts/BackendNftService.js";
|
|
36
|
+
import { equalNft as Lr, getNftPicture as Or } from "./src/nfts/utils.js";
|
|
37
|
+
import { OnchainRecoveryService as Mr } from "./src/onchainRecovery/OnchainRecoveryService.js";
|
|
38
|
+
import { RecoveryStatusEnum as Ur, StartOnchainRecoveryErrorStatusEnum as qr, activeOnchainRecoverySchema as Gr, onchainRecoverySchema as zr, recoveryBaseSchema as Kr, recoveryBodySchema as jr, recoveryStatusSchema as Xr, startOnchainRecoveryErrorSchema as Yr, startOnchainRecoveryErrorStatusSchema as Zr, startOnchainRecoverySchema as Qr } from "./src/onchainRecovery/schema.js";
|
|
39
|
+
import { isBraveBrowser as $r } from "./src/platform/isBraveBrowser.js";
|
|
40
|
+
import { getUAParserResult as ra, isBrowser as aa, isChromeBrowser as oa, isEdgeBrowser as ta, isFirefoxBrowser as ma, isSafariBrowser as na } from "./src/platform/isBrowser.js";
|
|
41
|
+
import { seedphraseSchema as sa } from "./src/signer/seedphrase.js";
|
|
42
|
+
import { MultiSigner as Sa, getSignerForMultiSigner as da } from "./src/signer/multisigner.js";
|
|
43
|
+
import { getTokenBalance as la, getTokens as ha, getTokensBalances as fa, useToken as ua } from "./src/tokens/balances.js";
|
|
44
|
+
import { DEFAULT_TOKEN_DECIMALS as xa } from "./src/tokens/constants.js";
|
|
45
|
+
import { convertTokenAmountToCurrencyValue as ga } from "./src/tokens/convertTokenAmountToCurrencyValue.js";
|
|
46
|
+
import { convertTokenUnitAmountWithDecimals as ka } from "./src/tokens/convertTokenUnitAmountWithDecimals.js";
|
|
47
|
+
import { ensureDecimals as Ea } from "./src/tokens/ensureDecimals.js";
|
|
48
|
+
import { isUnlimitedAmount as Ra } from "./src/tokens/isUnlimitedAmount.js";
|
|
49
|
+
import { prettifyCurrencyValue as Fa } from "./src/tokens/prettifyCurrencyValue.js";
|
|
50
|
+
import { PRETTY_UNLIMITED as va, prettifyTokenAmount as ba } from "./src/tokens/prettifyTokenAmount.js";
|
|
51
|
+
import { getCurrencySymbol as Ia } from "./src/tokens/getCurrencySymbol.js";
|
|
52
|
+
import { TokenServiceWeb as wa } from "./src/tokens/service/implementation.js";
|
|
53
|
+
import { TOKEN_ERROR_MESSAGES as La, TokenError as Oa } from "./src/tokens/service/tokenError.js";
|
|
54
|
+
import { apiAccountTokenBalancesSchema as Ma, apiAirdropSchema as Wa, apiCollateralizedDebtPositionSchema as Ua, apiCollateralizedDebtPositionsSchema as qa, apiConcentratedLiquidityPositionSchema as Ga, apiConcentratedLiquidityPositionsSchema as za, apiDefiDecompositionProduct as Ka, apiDefiDecompositionProducts as ja, apiDefiDecompositionSchema as Xa, apiDefiDecompositionToken as Ya, apiDefiPositionsSchema as Za, apiDelegatedTokensArraySchema as Qa, apiDelegatedTokensSchema as Ja, apiPriceDataResponseSchema as $a, apiPriceDetailsSchema as eo, apiStakingPositionSchema as ro, apiStakingPositionsSchema as ao, apiTokenInfoResponseSchema as oo, apiTokenInfoSchema as to, apiTokensInfoResponseSchema as mo, apiUnclaimedRewardsSchema as no } from "./src/tokens/service/types/backend.model.js";
|
|
55
|
+
import { collateralizedDebtGroupSchema as so, collateralizedDebtPositionSchema as io, collateralizedDebtPositionsSchema as So, concentratedLiquidityPositionSchema as po, concentratedLiquidityPositionsSchema as lo, defiDappsProductsSchema as ho, defiPositionSchema as fo, defiProductSchema as uo, defiProductsSchema as Ao, delegatedTokensArraySchema as xo, delegatedTokensSchema as To, productGroupsSchema as go } from "./src/tokens/service/types/defiPosition.model.js";
|
|
56
|
+
import { defiPositionTypeSchema as ko } from "./src/tokens/service/types/defiPositionType.model.js";
|
|
57
|
+
import { airdropSchema as Eo, unclaimedRewardsSchema as Do } from "./src/tokens/service/types/unclaimedRewards.model.js";
|
|
58
|
+
import { webBaseTokenSchema as No, webBaseTokenWithBalanceSchema as Fo, webTokenInfoDetailsSchema as Po, webTokenPriceDetailsSchema as vo, webTokenSchema as bo, webTokenWithBalanceAndPriceSchema as Bo, webTokenWithBalanceSchema as Io, webTokenWithPriceSchema as _o, webTokensWithBalanceAndPriceSchema as wo } from "./src/tokens/service/types/webToken.model.js";
|
|
59
|
+
import { inputAmountSchema as Lo, isValidInputAmount as Oo, parseAmount as Vo } from "./src/transactions/amount.js";
|
|
60
|
+
import { erc20TransferTransaction as Wo, erc721SafeTransferFromTransaction as Uo, erc721TransferFromTransaction as qo } from "./src/transactions/buildTransactions.js";
|
|
61
|
+
import { getMessageFromTrpcError as zo, trpcErrorSchema as Ko } from "./src/transactions/errors.js";
|
|
62
|
+
import { FEE_OVERHEAD as Xo, argentMaxFee as Yo, modifySnjsFeeOverhead as Zo } from "./src/transactions/estimate/argentMaxFee.js";
|
|
63
|
+
import { ESTIMATE_ERROR_MESSAGES as Jo, EstimateError as $o } from "./src/transactions/estimate/error.js";
|
|
64
|
+
import { transactionReviewTransactionsSchema as rt } from "./src/transactions/estimate/model.js";
|
|
65
|
+
import { buildDummyTx as ot, calculateCubeRootAdjustment as tt, calculateNonLinearAdjustment as mt, calculateSqrtAdjustment as nt, castFeeEstimation as ct, estimatedFeeToMaxFeeTotal as st, estimatedFeeToMaxResourceBounds as it, estimatedFeeToTotal as St, estimatedFeesToMaxFeeTotal as dt, estimatedFeesToTotal as pt, getEstimatedFeeFromBulkSimulation as lt, getEstimatedFeeFromSimulationAndRespectWatermarkFee as ht, getPayloadFromTransaction as ft, getWatermarkedMaxFeeTotal as ut, isFRI as At, isWEI as xt, multiplyBigIntByFloat as Tt, toMax as gt, tokensRequireTxV3Support as Ct, unitToFeeTokenAddress as kt } from "./src/transactions/estimate/utils.js";
|
|
66
|
+
import { EventsBySelector as Et, findTransfersAndApprovals as Dt } from "./src/transactions/findTransfersAndApprovals.js";
|
|
67
|
+
import { getPrettyRpcError as Nt } from "./src/transactions/getPrettyRcpError.js";
|
|
68
|
+
import { getSimulationTxVersionFromFeeToken as Pt, getTxVersionFromFeeToken as vt, getTxVersionFromFeeTokenForDeclareContract as bt } from "./src/transactions/getTransactionVersion.js";
|
|
69
|
+
import { TransactionReviewServiceWeb as It } from "./src/transactions/service/implementation.js";
|
|
70
|
+
import { transactionReviewWarningSchema as wt } from "./src/transactions/service/types.js";
|
|
71
|
+
import { apiTransactionReviewActivityType as Lt } from "./src/transactions/transactionReviewTypes.js";
|
|
72
|
+
import { denyTxV3 as Vt, txVersionSchema as Mt } from "./src/transactions/transactionVersion.js";
|
|
73
|
+
import { classHashSupportsTxV3 as Ut, feeTokenNeedsTxV3Support as qt } from "./src/transactions/txv3.js";
|
|
74
|
+
import { formatAddress as zt } from "./src/utils/address.js";
|
|
75
|
+
import { ensureArray as jt } from "./src/utils/arrays.js";
|
|
76
|
+
import { generateAvatarImage as Yt, getColor as Zt, getNetworkAccountImageUrl as Qt, stripAddressZeroPadding as Jt } from "./src/utils/avatarImage.js";
|
|
77
|
+
import { decodeBase58 as em, decodeBase58Array as rm, encodeBase58 as am, encodeBase58Array as om } from "./src/utils/base58.js";
|
|
78
|
+
import { bigNumberSchema as mm } from "./src/utils/bigNumber.js";
|
|
79
|
+
import { daysBetween as cm } from "./src/utils/daysBetween.js";
|
|
80
|
+
import { isFeatureEnabled as im } from "./src/utils/env.js";
|
|
81
|
+
import { hexSchema as dm, hexSchemaBase as pm } from "./src/utils/hex.js";
|
|
82
|
+
import { id as hm } from "./src/utils/id.js";
|
|
83
|
+
import { getInitials as um } from "./src/utils/initials.js";
|
|
84
|
+
import { isContractDeployed as xm } from "./src/utils/isContractDeployed.js";
|
|
85
|
+
import { nonNullable as gm } from "./src/utils/nonNullable.js";
|
|
86
|
+
import { isAllowedAddressHexInputValue as km } from "./src/utils/number/isAllowedAddressHexInputValue.js";
|
|
87
|
+
import { isAllowedNumericInputValue as Em } from "./src/utils/number/isAllowedNumericInputValue.js";
|
|
88
|
+
import { isNumeric as Rm } from "./src/utils/number/isNumeric.js";
|
|
89
|
+
import { prettifyCurrencyNumber as Fm, prettifyNumber as Pm, prettifyNumberConfig as vm, prettifyTokenNumber as bm } from "./src/utils/number/prettifyNumber.js";
|
|
90
|
+
import { getUint256CalldataFromBN as Im, parseAmountValue as _m } from "./src/utils/parseAmount.js";
|
|
91
|
+
import { pluralise as Hm } from "./src/utils/pluralise.js";
|
|
92
|
+
import { readFileAsString as Om } from "./src/utils/readFileAsString.js";
|
|
93
|
+
import { booleanToStringSchema as Mm, createSchemaWithWarnings as Wm, safeParseAndWarn as Um, stringToBooleanSchema as qm } from "./src/utils/schemas.js";
|
|
94
|
+
import { addOwnersCalldataSchema as zm, addPluginCalldataSchema as Km, bigNumberishSchema as jm, callDetailsSchema as Xm, callSchema as Ym, calldataSchema as Zm, changeGuardianCalldataSchema as Qm, changeThresholdCalldataSchema as Jm, escapeGuardianCalldataSchema as $m, executeOnPluginCalldataSchema as en, feltSchema as rn, looseCalldataSchema as an, multiTypeSchema as on, rawArgsArraySchema as tn, rawArgsObjectSchema as mn, rawArgsSchema as nn, removeOwnersCalldataSchema as cn, removePluginCalldataSchema as sn, replaceSignerCalldataSchema as Sn, transferCalldataSchema as dn, uint256Schema as pn } from "./src/utils/starknet/starknet.js";
|
|
95
|
+
import { abiEntrySchema as hn, abiSchema as fn, builtinsSchema as un, byteCodeSchema as An, cairo1EventSchema as xn, cairoAssemblySchema as Tn, compiledContractClassSchema as gn, compiledSierraCasmSchema as Cn, compiledSierraSchema as kn, compressedProgramSchema as yn, contractEntryPointFieldsSchema as En, entryPointsByTypeSchema as Dn, eventAbiSchema as Rn, eventEntrySchema as Nn, functionAbiSchema as Fn, functionAbiTypeSchema as Pn, legacyContractClassSchema as vn, legacyEventSchema as bn, programSchema as Bn, pythonicHintsSchema as In, sierraContractEntryPointFieldsSchema as _n, sierraEntryPointsByTypeSchema as wn, sierraProgramDebugInfoSchema as Hn, structAbiSchema as Ln } from "./src/utils/starknet/starknetSchemas.js";
|
|
96
|
+
import { entryPointToHumanReadable as Vn } from "./src/utils/transactions.js";
|
|
97
|
+
import { urlWithQuery as Wn } from "./src/utils/url/urlWithQuery.js";
|
|
98
|
+
import { voidify as qn } from "./src/utils/voidify.js";
|
|
99
|
+
import { bipsToPercent as zn } from "./src/utils/bips.js";
|
|
100
|
+
export {
|
|
101
|
+
De as ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES,
|
|
102
|
+
Re as ARGENT_MULTISIG_CONTRACT_CLASS_HASHES,
|
|
103
|
+
m as AddSmartAccountResponseSchema,
|
|
104
|
+
n as AddSmartAcountRequestSchema,
|
|
105
|
+
c as BackendAccountSchema,
|
|
106
|
+
wr as BackendNftService,
|
|
107
|
+
o as BaseError,
|
|
108
|
+
Ne as C0_PROXY_CONTRACT_CLASS_HASHES,
|
|
109
|
+
C as CacheService,
|
|
110
|
+
xa as DEFAULT_TOKEN_DECIMALS,
|
|
111
|
+
$e as DateService,
|
|
112
|
+
Jo as ESTIMATE_ERROR_MESSAGES,
|
|
113
|
+
me as ETH_TOKEN_ADDRESS,
|
|
114
|
+
$o as EstimateError,
|
|
115
|
+
Et as EventsBySelector,
|
|
116
|
+
Xo as FEE_OVERHEAD,
|
|
117
|
+
or as HTTPService,
|
|
118
|
+
mr as HTTP_ERROR_MESSAGE,
|
|
119
|
+
rr as HttpError,
|
|
120
|
+
ur as KnownDappsBackendService,
|
|
121
|
+
Sa as MultiSigner,
|
|
122
|
+
Mr as OnchainRecoveryService,
|
|
123
|
+
va as PRETTY_UNLIMITED,
|
|
124
|
+
Ur as RecoveryStatusEnum,
|
|
125
|
+
Rr as ResolveNameService,
|
|
126
|
+
ne as STANDARD_DEVNET_ACCOUNT_CLASS_HASH,
|
|
127
|
+
ce as STRK_TOKEN_ADDRESS,
|
|
128
|
+
cr as SWRService,
|
|
129
|
+
ye as StarknetAddressService,
|
|
130
|
+
qr as StartOnchainRecoveryErrorStatusEnum,
|
|
131
|
+
La as TOKEN_ERROR_MESSAGES,
|
|
132
|
+
se as TXV1_ACCOUNT_CLASS_HASH,
|
|
133
|
+
ie as TXV1_MULTISIG_CLASS_HASH,
|
|
134
|
+
Se as TXV3_ACCOUNT_CLASS_HASH,
|
|
135
|
+
de as TXV3_MULTISIG_CLASS_HASH,
|
|
136
|
+
Oa as TokenError,
|
|
137
|
+
wa as TokenServiceWeb,
|
|
138
|
+
It as TransactionReviewServiceWeb,
|
|
139
|
+
hn as abiEntrySchema,
|
|
140
|
+
fn as abiSchema,
|
|
141
|
+
Gr as activeOnchainRecoverySchema,
|
|
142
|
+
zm as addOwnersCalldataSchema,
|
|
143
|
+
Km as addPluginCalldataSchema,
|
|
144
|
+
Y as addressInputCharactersAndLengthSchema,
|
|
145
|
+
Z as addressInputSchema,
|
|
146
|
+
U as addressOrDomainInputSchema,
|
|
147
|
+
q as addressOrDomainSchema,
|
|
148
|
+
y as addressOrEmptyUndefinedSchema,
|
|
149
|
+
E as addressSchema,
|
|
150
|
+
D as addressSchemaArgentBackend,
|
|
151
|
+
R as addressSchemaBase,
|
|
152
|
+
N as addressSchemaLooseLength,
|
|
153
|
+
F as addressSchemaStrictLength,
|
|
154
|
+
Eo as airdropSchema,
|
|
155
|
+
Ma as apiAccountTokenBalancesSchema,
|
|
156
|
+
Wa as apiAirdropSchema,
|
|
157
|
+
Ua as apiCollateralizedDebtPositionSchema,
|
|
158
|
+
qa as apiCollateralizedDebtPositionsSchema,
|
|
159
|
+
Ga as apiConcentratedLiquidityPositionSchema,
|
|
160
|
+
za as apiConcentratedLiquidityPositionsSchema,
|
|
161
|
+
Ka as apiDefiDecompositionProduct,
|
|
162
|
+
ja as apiDefiDecompositionProducts,
|
|
163
|
+
Xa as apiDefiDecompositionSchema,
|
|
164
|
+
Ya as apiDefiDecompositionToken,
|
|
165
|
+
Za as apiDefiPositionsSchema,
|
|
166
|
+
Qa as apiDelegatedTokensArraySchema,
|
|
167
|
+
Ja as apiDelegatedTokensSchema,
|
|
168
|
+
$a as apiPriceDataResponseSchema,
|
|
169
|
+
eo as apiPriceDetailsSchema,
|
|
170
|
+
ro as apiStakingPositionSchema,
|
|
171
|
+
ao as apiStakingPositionsSchema,
|
|
172
|
+
oo as apiTokenInfoResponseSchema,
|
|
173
|
+
to as apiTokenInfoSchema,
|
|
174
|
+
mo as apiTokensInfoResponseSchema,
|
|
175
|
+
Lt as apiTransactionReviewActivityType,
|
|
176
|
+
no as apiUnclaimedRewardsSchema,
|
|
177
|
+
le as apiWalletResponseSchema,
|
|
178
|
+
u as argentBackendNetworkIdSchema,
|
|
179
|
+
Yo as argentMaxFee,
|
|
180
|
+
J as argentNameSchema,
|
|
181
|
+
A as argentNetworkIdSchema,
|
|
182
|
+
e as bigDecimal,
|
|
183
|
+
mm as bigNumberSchema,
|
|
184
|
+
jm as bigNumberishSchema,
|
|
185
|
+
zn as bipsToPercent,
|
|
186
|
+
Mm as booleanToStringSchema,
|
|
187
|
+
Ie as buildConstructorCalldata,
|
|
188
|
+
ot as buildDummyTx,
|
|
189
|
+
un as builtinsSchema,
|
|
190
|
+
An as byteCodeSchema,
|
|
191
|
+
xn as cairo1EventSchema,
|
|
192
|
+
Tn as cairoAssemblySchema,
|
|
193
|
+
oe as cairoVersionSchema,
|
|
194
|
+
tt as calculateCubeRootAdjustment,
|
|
195
|
+
mt as calculateNonLinearAdjustment,
|
|
196
|
+
nt as calculateSqrtAdjustment,
|
|
197
|
+
Xm as callDetailsSchema,
|
|
198
|
+
Ym as callSchema,
|
|
199
|
+
Zm as calldataSchema,
|
|
200
|
+
ct as castFeeEstimation,
|
|
201
|
+
Qm as changeGuardianCalldataSchema,
|
|
202
|
+
Jm as changeThresholdCalldataSchema,
|
|
203
|
+
Ut as classHashSupportsTxV3,
|
|
204
|
+
so as collateralizedDebtGroupSchema,
|
|
205
|
+
io as collateralizedDebtPositionSchema,
|
|
206
|
+
So as collateralizedDebtPositionsSchema,
|
|
207
|
+
gn as compiledContractClassSchema,
|
|
208
|
+
Cn as compiledSierraCasmSchema,
|
|
209
|
+
kn as compiledSierraSchema,
|
|
210
|
+
yn as compressedProgramSchema,
|
|
211
|
+
po as concentratedLiquidityPositionSchema,
|
|
212
|
+
lo as concentratedLiquidityPositionsSchema,
|
|
213
|
+
Pe as constructorCallDataSchemaC0,
|
|
214
|
+
ve as constructorCallDataSchemaC1V1,
|
|
215
|
+
En as contractEntryPointFieldsSchema,
|
|
216
|
+
ga as convertTokenAmountToCurrencyValue,
|
|
217
|
+
ka as convertTokenUnitAmountWithDecimals,
|
|
218
|
+
Wm as createSchemaWithWarnings,
|
|
219
|
+
xr as dappContractSchema,
|
|
220
|
+
Tr as dappLinkSchema,
|
|
221
|
+
cm as daysBetween,
|
|
222
|
+
em as decodeBase58,
|
|
223
|
+
rm as decodeBase58Array,
|
|
224
|
+
ho as defiDappsProductsSchema,
|
|
225
|
+
fo as defiPositionSchema,
|
|
226
|
+
ko as defiPositionTypeSchema,
|
|
227
|
+
uo as defiProductSchema,
|
|
228
|
+
Ao as defiProductsSchema,
|
|
229
|
+
xo as delegatedTokensArraySchema,
|
|
230
|
+
To as delegatedTokensSchema,
|
|
231
|
+
Vt as denyTxV3,
|
|
232
|
+
am as encodeBase58,
|
|
233
|
+
om as encodeBase58Array,
|
|
234
|
+
jt as ensureArray,
|
|
235
|
+
Ea as ensureDecimals,
|
|
236
|
+
Vn as entryPointToHumanReadable,
|
|
237
|
+
Dn as entryPointsByTypeSchema,
|
|
238
|
+
Lr as equalNft,
|
|
239
|
+
Wo as erc20TransferTransaction,
|
|
240
|
+
Uo as erc721SafeTransferFromTransaction,
|
|
241
|
+
qo as erc721TransferFromTransaction,
|
|
242
|
+
$m as escapeGuardianCalldataSchema,
|
|
243
|
+
st as estimatedFeeToMaxFeeTotal,
|
|
244
|
+
it as estimatedFeeToMaxResourceBounds,
|
|
245
|
+
St as estimatedFeeToTotal,
|
|
246
|
+
dt as estimatedFeesToMaxFeeTotal,
|
|
247
|
+
pt as estimatedFeesToTotal,
|
|
248
|
+
Rn as eventAbiSchema,
|
|
249
|
+
Nn as eventEntrySchema,
|
|
250
|
+
en as executeOnPluginCalldataSchema,
|
|
251
|
+
qt as feeTokenNeedsTxV3Support,
|
|
252
|
+
rn as feltSchema,
|
|
253
|
+
ir as fetchData,
|
|
254
|
+
Sr as fetcherError,
|
|
255
|
+
_e as findImplementationForAccount,
|
|
256
|
+
Dt as findTransfersAndApprovals,
|
|
257
|
+
zt as formatAddress,
|
|
258
|
+
P as formatFullAddress,
|
|
259
|
+
v as formatTruncatedAddress,
|
|
260
|
+
b as formatTruncatedSignerKey,
|
|
261
|
+
B as formatTruncatedString,
|
|
262
|
+
Fn as functionAbiSchema,
|
|
263
|
+
Pn as functionAbiTypeSchema,
|
|
264
|
+
Yt as generateAvatarImage,
|
|
265
|
+
we as getAccountContractAddress,
|
|
266
|
+
He as getAccountDeploymentPayload,
|
|
267
|
+
he as getAddressFromArgentName,
|
|
268
|
+
ue as getAddressFromStarkName,
|
|
269
|
+
Ve as getArgentAccountClassHashes,
|
|
270
|
+
Me as getArgentAccountClassHashesWithTxV3Support,
|
|
271
|
+
We as getArgentAccountWithMultiSignerClassHashes,
|
|
272
|
+
lr as getBackendTimeNowSeconds,
|
|
273
|
+
hr as getBackendTimeSeconds,
|
|
274
|
+
Ae as getCallFromStarkName,
|
|
275
|
+
Ce as getChainIdFromNetworkId,
|
|
276
|
+
Zt as getColor,
|
|
277
|
+
Ia as getCurrencySymbol,
|
|
278
|
+
yr as getDapplandLinkForDapp,
|
|
279
|
+
Er as getDapplandUrlForDapp,
|
|
280
|
+
lt as getEstimatedFeeFromBulkSimulation,
|
|
281
|
+
ht as getEstimatedFeeFromSimulationAndRespectWatermarkFee,
|
|
282
|
+
um as getInitials,
|
|
283
|
+
Ue as getLastCairo0ArgentAccountClassHash,
|
|
284
|
+
qe as getLatestArgentAccountClassHash,
|
|
285
|
+
Ge as getLatestArgentMultisigClassHash,
|
|
286
|
+
ze as getLatestLedgerAccountClassHash,
|
|
287
|
+
Ke as getLedgerAccountClassHashes,
|
|
288
|
+
zo as getMessageFromTrpcError,
|
|
289
|
+
Qt as getNetworkAccountImageUrl,
|
|
290
|
+
Or as getNftPicture,
|
|
291
|
+
ft as getPayloadFromTransaction,
|
|
292
|
+
Nt as getPrettyRpcError,
|
|
293
|
+
da as getSignerForMultiSigner,
|
|
294
|
+
Pt as getSimulationTxVersionFromFeeToken,
|
|
295
|
+
xe as getStarknetIdContractAddressFromNetworkId,
|
|
296
|
+
la as getTokenBalance,
|
|
297
|
+
ha as getTokens,
|
|
298
|
+
fa as getTokensBalances,
|
|
299
|
+
vt as getTxVersionFromFeeToken,
|
|
300
|
+
bt as getTxVersionFromFeeTokenForDeclareContract,
|
|
301
|
+
ra as getUAParserResult,
|
|
302
|
+
Im as getUint256CalldataFromBN,
|
|
303
|
+
ut as getWatermarkedMaxFeeTotal,
|
|
304
|
+
dm as hexSchema,
|
|
305
|
+
pm as hexSchemaBase,
|
|
306
|
+
hm as id,
|
|
307
|
+
be as implementationSchema,
|
|
308
|
+
I as includesAddress,
|
|
309
|
+
Lo as inputAmountSchema,
|
|
310
|
+
i as isAccountV4,
|
|
311
|
+
S as isAccountV5,
|
|
312
|
+
d as isAccountV6,
|
|
313
|
+
_ as isAddress,
|
|
314
|
+
km as isAllowedAddressHexInputValue,
|
|
315
|
+
Em as isAllowedNumericInputValue,
|
|
316
|
+
x as isArgentBackendNetworkId,
|
|
317
|
+
$ as isArgentName,
|
|
318
|
+
T as isArgentNetworkId,
|
|
319
|
+
$r as isBraveBrowser,
|
|
320
|
+
aa as isBrowser,
|
|
321
|
+
oa as isChromeBrowser,
|
|
322
|
+
xm as isContractDeployed,
|
|
323
|
+
ta as isEdgeBrowser,
|
|
324
|
+
w as isEqualAddress,
|
|
325
|
+
ee as isEqualArgentName,
|
|
326
|
+
Le as isEqualImplementation,
|
|
327
|
+
G as isEqualStarknetDomainName,
|
|
328
|
+
Xe as isEqualStarknetId,
|
|
329
|
+
At as isFRI,
|
|
330
|
+
im as isFeatureEnabled,
|
|
331
|
+
ma as isFirefoxBrowser,
|
|
332
|
+
Rm as isNumeric,
|
|
333
|
+
na as isSafariBrowser,
|
|
334
|
+
z as isStarknetDomainName,
|
|
335
|
+
Ye as isStarknetId,
|
|
336
|
+
Ra as isUnlimitedAmount,
|
|
337
|
+
H as isValidAddress,
|
|
338
|
+
Oo as isValidInputAmount,
|
|
339
|
+
xt as isWEI,
|
|
340
|
+
L as isZeroAddress,
|
|
341
|
+
gr as knownDappSchema,
|
|
342
|
+
Cr as knownDappsSchema,
|
|
343
|
+
vn as legacyContractClassSchema,
|
|
344
|
+
bn as legacyEventSchema,
|
|
345
|
+
an as looseCalldataSchema,
|
|
346
|
+
Zo as modifySnjsFeeOverhead,
|
|
347
|
+
on as multiTypeSchema,
|
|
348
|
+
Tt as multiplyBigIntByFloat,
|
|
349
|
+
Fr as nameProviderResolutionSchema,
|
|
350
|
+
Pr as nameResolutionAddressSchema,
|
|
351
|
+
vr as nameResolutionAddressesSchema,
|
|
352
|
+
br as nameResolutionStarknetIdSchema,
|
|
353
|
+
Br as nameResolutionStarknetIdsSchema,
|
|
354
|
+
gm as nonNullable,
|
|
355
|
+
O as normalizeAddress,
|
|
356
|
+
K as normalizeAddressOrDomain,
|
|
357
|
+
re as normalizeArgentName,
|
|
358
|
+
Ze as normalizeStarknetId,
|
|
359
|
+
zr as onchainRecoverySchema,
|
|
360
|
+
Vo as parseAmount,
|
|
361
|
+
_m as parseAmountValue,
|
|
362
|
+
Hm as pluralise,
|
|
363
|
+
dr as postData,
|
|
364
|
+
l as preferencesEndpointPayload,
|
|
365
|
+
h as preferencesSchema,
|
|
366
|
+
Fm as prettifyCurrencyNumber,
|
|
367
|
+
Fa as prettifyCurrencyValue,
|
|
368
|
+
Pm as prettifyNumber,
|
|
369
|
+
vm as prettifyNumberConfig,
|
|
370
|
+
ba as prettifyTokenAmount,
|
|
371
|
+
bm as prettifyTokenNumber,
|
|
372
|
+
go as productGroupsSchema,
|
|
373
|
+
Bn as programSchema,
|
|
374
|
+
Ir as providersNamesSchema,
|
|
375
|
+
In as pythonicHintsSchema,
|
|
376
|
+
tn as rawArgsArraySchema,
|
|
377
|
+
mn as rawArgsObjectSchema,
|
|
378
|
+
nn as rawArgsSchema,
|
|
379
|
+
Om as readFileAsString,
|
|
380
|
+
Kr as recoveryBaseSchema,
|
|
381
|
+
jr as recoveryBodySchema,
|
|
382
|
+
Xr as recoveryStatusSchema,
|
|
383
|
+
cn as removeOwnersCalldataSchema,
|
|
384
|
+
sn as removePluginCalldataSchema,
|
|
385
|
+
Sn as replaceSignerCalldataSchema,
|
|
386
|
+
Um as safeParseAndWarn,
|
|
387
|
+
sa as seedphraseSchema,
|
|
388
|
+
_n as sierraContractEntryPointFieldsSchema,
|
|
389
|
+
wn as sierraEntryPointsByTypeSchema,
|
|
390
|
+
Hn as sierraProgramDebugInfoSchema,
|
|
391
|
+
Te as starkNameToCallDataDomain,
|
|
392
|
+
j as starknetDomainNameSchema,
|
|
393
|
+
Qe as starknetIdSchema,
|
|
394
|
+
Yr as startOnchainRecoveryErrorSchema,
|
|
395
|
+
Zr as startOnchainRecoveryErrorStatusSchema,
|
|
396
|
+
Qr as startOnchainRecoverySchema,
|
|
397
|
+
qm as stringToBooleanSchema,
|
|
398
|
+
Jt as stripAddressZeroPadding,
|
|
399
|
+
Ln as structAbiSchema,
|
|
400
|
+
gt as toMax,
|
|
401
|
+
Ct as tokensRequireTxV3Support,
|
|
402
|
+
rt as transactionReviewTransactionsSchema,
|
|
403
|
+
wt as transactionReviewWarningSchema,
|
|
404
|
+
dn as transferCalldataSchema,
|
|
405
|
+
Ko as trpcErrorSchema,
|
|
406
|
+
Mt as txVersionSchema,
|
|
407
|
+
pn as uint256Schema,
|
|
408
|
+
Do as unclaimedRewardsSchema,
|
|
409
|
+
kt as unitToFeeTokenAddress,
|
|
410
|
+
Wn as urlWithQuery,
|
|
411
|
+
ua as useToken,
|
|
412
|
+
V as validChecksumAddressSchema,
|
|
413
|
+
M as validateAddressRangeSchema,
|
|
414
|
+
qn as voidify,
|
|
415
|
+
No as webBaseTokenSchema,
|
|
416
|
+
Fo as webBaseTokenWithBalanceSchema,
|
|
417
|
+
Po as webTokenInfoDetailsSchema,
|
|
418
|
+
vo as webTokenPriceDetailsSchema,
|
|
419
|
+
bo as webTokenSchema,
|
|
420
|
+
Bo as webTokenWithBalanceAndPriceSchema,
|
|
421
|
+
Io as webTokenWithBalanceSchema,
|
|
422
|
+
_o as webTokenWithPriceSchema,
|
|
423
|
+
wo as webTokensWithBalanceAndPriceSchema
|
|
424
|
+
};
|