@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/nfts/useNfts.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ArgentBackendNetworkId } from '../backend';
|
|
2
|
-
import { Address } from '../chains';
|
|
3
|
-
import { SWRConfigCommon } from '../http/swr';
|
|
4
|
-
import { BackendNftService } from './BackendNftService';
|
|
5
|
-
import { PaginatedItems } from './INFTService';
|
|
6
|
-
export declare const useNfts: (nftService: BackendNftService, chain: string, network: ArgentBackendNetworkId, address?: Address, config?: SWRConfigCommon) => {
|
|
7
|
-
error?: any;
|
|
8
|
-
mutate: import('swr').KeyedMutator<PaginatedItems | undefined>;
|
|
9
|
-
isValidating: boolean;
|
|
10
|
-
nfts: import('./INFTService').NftItem[] | undefined;
|
|
11
|
-
};
|
|
12
|
-
export declare const useCollection: (nftService: BackendNftService, chain: string, network: ArgentBackendNetworkId, collectionAddress?: Address, config?: SWRConfigCommon) => {
|
|
13
|
-
error?: any;
|
|
14
|
-
mutate: import('swr').KeyedMutator<import('./INFTService').Collection | undefined>;
|
|
15
|
-
isValidating: boolean;
|
|
16
|
-
collection: import('./INFTService').Collection | undefined;
|
|
17
|
-
};
|
|
18
|
-
export declare const useNft: (nftService: BackendNftService, chain: string, network: ArgentBackendNetworkId, collectionAddress?: Address, tokenId?: string, config?: SWRConfigCommon) => {
|
|
19
|
-
error?: any;
|
|
20
|
-
mutate: import('swr').KeyedMutator<import('./INFTService').NftItem | undefined>;
|
|
21
|
-
isValidating: boolean;
|
|
22
|
-
nft: import('./INFTService').NftItem | undefined;
|
|
23
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
interface AmplitudeContextProviderProps extends PropsWithChildren {
|
|
3
|
-
enabled: boolean;
|
|
4
|
-
initialize: () => Promise<void>;
|
|
5
|
-
}
|
|
6
|
-
declare const WebAmplitudeProvider: FC<AmplitudeContextProviderProps>;
|
|
7
|
-
export { WebAmplitudeProvider };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AmplitudeInstance } from './types';
|
|
2
|
-
interface AnalyticsServiceProps {
|
|
3
|
-
enabled: boolean;
|
|
4
|
-
appVersion: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function WebAnalyticsServiceFactory<T extends new (...args: never[]) => AmplitudeInstance>(Base: T): new (props: AnalyticsServiceProps) => InstanceType<T> & AnalyticsServiceProps;
|
|
7
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AmplitudeReturn as _AmplitudeReturn, Event, EventOptions, Result } from '@amplitude/analytics-types';
|
|
2
|
-
export type AmplitudeReturn = _AmplitudeReturn<void | Result>;
|
|
3
|
-
export interface AmplitudeInstance {
|
|
4
|
-
isLoaded: boolean;
|
|
5
|
-
track(event: Event, options?: EventOptions): AmplitudeReturn;
|
|
6
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './WebAmplitude';
|
package/dist/simulation.mjs
DELETED
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { i as m, K as h, O as v, P as f, Q as l, U as S, E as g } from "./transactionVersion-Cjoucwcx.mjs";
|
|
2
|
-
import { a0 as J, a1 as I, $ as ee, aa as te, a2 as se, X as ne, W as ae, a3 as ie, Z as re, V as oe, ab as ce, ag as de, a7 as fe, a8 as ue, f as le, Y as pe, a4 as Ae, a6 as me, ah as he, a5 as ve, _ as Se, a9 as ge, aj as ye, ae as ke, ai as Te, s as Ee, af as Oe, ac as we, ad as De } from "./transactionVersion-Cjoucwcx.mjs";
|
|
3
|
-
import { isEmpty as y } from "lodash-es";
|
|
4
|
-
import { h as p, S as c, G as u } from "./webToken.model-CpudLBp0.mjs";
|
|
5
|
-
import "starknet";
|
|
6
|
-
import "zod";
|
|
7
|
-
import "@scure/base";
|
|
8
|
-
import "react";
|
|
9
|
-
import "object-hash";
|
|
10
|
-
import "swr";
|
|
11
|
-
function k(e) {
|
|
12
|
-
return e.error ? e.error : e.message && e.code ? `${e.code}: ${e.message}` : "Unknown error";
|
|
13
|
-
}
|
|
14
|
-
function W(e) {
|
|
15
|
-
if (!e)
|
|
16
|
-
return;
|
|
17
|
-
const n = e.transactions.flatMap((d) => m(d) ? d.simulationError : !1), t = n == null ? void 0 : n[n.length - 1];
|
|
18
|
-
if (!t)
|
|
19
|
-
return;
|
|
20
|
-
const s = k(t), i = t.message || t.error, r = h(i), o = r || t.label;
|
|
21
|
-
return {
|
|
22
|
-
message: r ? i : s,
|
|
23
|
-
label: o
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const T = (e) => e.map(E), E = (e) => {
|
|
27
|
-
var s, i, r, o;
|
|
28
|
-
if (v(e))
|
|
29
|
-
return f.parse(e);
|
|
30
|
-
const n = !!e.sent;
|
|
31
|
-
if (e.token.type !== "ERC20") {
|
|
32
|
-
const a = {
|
|
33
|
-
asset: {
|
|
34
|
-
type: "nft",
|
|
35
|
-
tokenAddress: e.token.address,
|
|
36
|
-
tokenId: e.tokenId ? parseInt(e.tokenId) : 0,
|
|
37
|
-
amount: e.value,
|
|
38
|
-
collectionName: e.token.name,
|
|
39
|
-
collectionPreviewImage: (s = e.token.imageUrls) == null ? void 0 : s.preview,
|
|
40
|
-
nftName: (i = e.tokenIdDetails) == null ? void 0 : i.name,
|
|
41
|
-
nftPreviewImage: (o = (r = e.tokenIdDetails) == null ? void 0 : r.imageUrls) == null ? void 0 : o.preview
|
|
42
|
-
},
|
|
43
|
-
sent: n
|
|
44
|
-
};
|
|
45
|
-
return f.parse(a);
|
|
46
|
-
}
|
|
47
|
-
const t = {
|
|
48
|
-
asset: {
|
|
49
|
-
type: "token",
|
|
50
|
-
tokenAddress: e.token.address,
|
|
51
|
-
amount: e.value,
|
|
52
|
-
fiatAmount: {
|
|
53
|
-
currency: "USD",
|
|
54
|
-
currencyAmount: e.usdValue || "0"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
sent: n
|
|
58
|
-
};
|
|
59
|
-
return f.parse(t);
|
|
60
|
-
};
|
|
61
|
-
function O(e) {
|
|
62
|
-
var s, i;
|
|
63
|
-
const n = (i = (s = e.transactions) == null ? void 0 : s[0].reviewOfTransaction) == null ? void 0 : i.reviews;
|
|
64
|
-
return n ? n.map((r) => r.action) : void 0;
|
|
65
|
-
}
|
|
66
|
-
function $({ simulateAndReview: e, ...n }) {
|
|
67
|
-
var s, i;
|
|
68
|
-
const t = {
|
|
69
|
-
type: l,
|
|
70
|
-
...n
|
|
71
|
-
};
|
|
72
|
-
if (e && !y(e.transactions)) {
|
|
73
|
-
const r = e.transactions[e.transactions.length - 1], o = (s = r.simulation) == null ? void 0 : s.summary;
|
|
74
|
-
if (o) {
|
|
75
|
-
const A = T(o);
|
|
76
|
-
t.transferSummary = A;
|
|
77
|
-
}
|
|
78
|
-
const a = (i = r.reviewOfTransaction) == null ? void 0 : i.targetedDapp;
|
|
79
|
-
a && (t.dapp = a);
|
|
80
|
-
const d = O(e);
|
|
81
|
-
d && (t.actions = d);
|
|
82
|
-
}
|
|
83
|
-
return S.parse(t);
|
|
84
|
-
}
|
|
85
|
-
function w(e) {
|
|
86
|
-
const n = D(e), t = M(e);
|
|
87
|
-
return n || t;
|
|
88
|
-
}
|
|
89
|
-
const D = (e) => {
|
|
90
|
-
var o;
|
|
91
|
-
if (!((o = e.actions) != null && o.length))
|
|
92
|
-
return !1;
|
|
93
|
-
const n = e.actions[0];
|
|
94
|
-
if (n.name !== "ERC20_transfer")
|
|
95
|
-
return !1;
|
|
96
|
-
let t, s, i, r;
|
|
97
|
-
return n.defaultProperties && n.defaultProperties.forEach((a) => {
|
|
98
|
-
a.type === "token_address" && a.token.address === g && (s = !0), a.type === "calldata" && (t = a.calldata[0]);
|
|
99
|
-
}), n.properties.length > 1 && n.properties.forEach((a) => {
|
|
100
|
-
a.type === "amount" && a.label === "ERC20_transfer_amount" && a.amount === "0" && (i = !0), a.type === "address" && a.label === "ERC20_transfer_recipient" && p(a.address, t) && (r = !0);
|
|
101
|
-
}), s && i && r;
|
|
102
|
-
}, M = (e) => {
|
|
103
|
-
var n, t;
|
|
104
|
-
return !!("meta" in e && (t = (n = e.meta) == null ? void 0 : n.title) != null && t.includes("On-chain rejection"));
|
|
105
|
-
};
|
|
106
|
-
function R(e, n = !1) {
|
|
107
|
-
var t, s;
|
|
108
|
-
if (e.type === l) {
|
|
109
|
-
if (n && ((t = e.meta) != null && t.shortTitle))
|
|
110
|
-
return e.meta.shortTitle;
|
|
111
|
-
if ((s = e.meta) != null && s.title)
|
|
112
|
-
return e.meta.title;
|
|
113
|
-
} else {
|
|
114
|
-
if (w(e))
|
|
115
|
-
return "On-chain rejection";
|
|
116
|
-
if (e.title)
|
|
117
|
-
return e.title;
|
|
118
|
-
}
|
|
119
|
-
return "Contract interaction";
|
|
120
|
-
}
|
|
121
|
-
function H(e) {
|
|
122
|
-
return R(e, !0);
|
|
123
|
-
}
|
|
124
|
-
function K(e) {
|
|
125
|
-
return e.map((s) => s.lastModified).sort().pop();
|
|
126
|
-
}
|
|
127
|
-
const Q = (e) => {
|
|
128
|
-
var t, s;
|
|
129
|
-
return !!((s = (t = e.details) == null ? void 0 : t.calls) == null ? void 0 : s.some((i) => {
|
|
130
|
-
var r, o, a;
|
|
131
|
-
return (o = (r = i == null ? void 0 : i.details) == null ? void 0 : r.function) != null && o.name ? ((a = i == null ? void 0 : i.details) == null ? void 0 : a.function.name) === "lock_and_delegate_by_sig" : !1;
|
|
132
|
-
}));
|
|
133
|
-
}, _ = (e) => {
|
|
134
|
-
var n;
|
|
135
|
-
return e.type === "multicall" && "calls" in e.details && ((n = e.details.calls) == null ? void 0 : n.some((t) => {
|
|
136
|
-
var s;
|
|
137
|
-
return ((s = t == null ? void 0 : t.details) == null ? void 0 : s.type) === "deploy" && p((t == null ? void 0 : t.details.contractAddress) || "", e.wallet);
|
|
138
|
-
}));
|
|
139
|
-
};
|
|
140
|
-
function V(e) {
|
|
141
|
-
const n = N(e), t = B(e);
|
|
142
|
-
return n || t;
|
|
143
|
-
}
|
|
144
|
-
const N = (e) => {
|
|
145
|
-
var t;
|
|
146
|
-
if (!((t = e.actions) != null && t.length))
|
|
147
|
-
return !1;
|
|
148
|
-
const n = e.actions[0];
|
|
149
|
-
if (n.name !== "account_upgrade")
|
|
150
|
-
return !1;
|
|
151
|
-
n.defaultProperties && n.defaultProperties.forEach((s) => {
|
|
152
|
-
if (s.type === "calldata" && s.entrypoint === "upgrade")
|
|
153
|
-
return !0;
|
|
154
|
-
});
|
|
155
|
-
}, B = (e) => {
|
|
156
|
-
var n, t;
|
|
157
|
-
return !!("meta" in e && (t = (n = e.meta) == null ? void 0 : n.title) != null && t.includes("Upgrade account"));
|
|
158
|
-
};
|
|
159
|
-
function Z({ activities: e, accountAddressesOnNetwork: n }) {
|
|
160
|
-
const t = {};
|
|
161
|
-
return e.forEach((s) => {
|
|
162
|
-
const i = s.wallet, r = s.type === "deploy" ? s.type : s.details.type === "security" ? s.details.action : void 0;
|
|
163
|
-
s.group === "security" && c(i, n) && r && (t[r] = t[r] || [], c(i, t[r]) || (t[r] = u(t[r]).concat(i))), _(s) && (t.deploy = u(t.deploy).concat(i));
|
|
164
|
-
}), t;
|
|
165
|
-
}
|
|
166
|
-
function q({ activities: e, accountAddressesOnNetwork: n, tokenAddressesOnNetwork: t }) {
|
|
167
|
-
const s = {
|
|
168
|
-
tokenActivity: {
|
|
169
|
-
accountAddresses: [],
|
|
170
|
-
tokenAddresses: [],
|
|
171
|
-
newTokenAddresses: []
|
|
172
|
-
},
|
|
173
|
-
nftActivity: {
|
|
174
|
-
accountAddresses: [],
|
|
175
|
-
tokenAddresses: []
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
return e.forEach((i) => {
|
|
179
|
-
if (i.group === "finance" && i.relatedAddresses) {
|
|
180
|
-
const r = i.transfers.some((o) => o.asset.type === "token");
|
|
181
|
-
i.relatedAddresses.forEach(({ type: o, address: a }) => {
|
|
182
|
-
o === "token" ? c(a, t) && (c(a, s.tokenActivity.tokenAddresses) || s.tokenActivity.tokenAddresses.push(a)) : o === "wallet" && c(a, n) && (r ? c(a, s.tokenActivity.accountAddresses) || s.tokenActivity.accountAddresses.push(a) : c(a, s.nftActivity.accountAddresses) || s.nftActivity.accountAddresses.push(a));
|
|
183
|
-
}), i.transfers.forEach((o) => {
|
|
184
|
-
if (o.asset.type === "token") {
|
|
185
|
-
const a = o.asset.tokenAddress;
|
|
186
|
-
!c(a, t) && !c(a, s.tokenActivity.newTokenAddresses) && s.tokenActivity.newTokenAddresses.push(a);
|
|
187
|
-
} else if (o.asset.type === "nft") {
|
|
188
|
-
const a = o.asset.tokenAddress;
|
|
189
|
-
c(a, s.nftActivity.tokenAddresses) || s.nftActivity.tokenAddresses.push(a);
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
}), s;
|
|
194
|
-
}
|
|
195
|
-
const G = (e) => {
|
|
196
|
-
if (e.length === 0)
|
|
197
|
-
return null;
|
|
198
|
-
const n = ["critical", "high", "caution", "info"];
|
|
199
|
-
return e.reduce((t, s) => {
|
|
200
|
-
const i = n.indexOf(s.severity), r = n.indexOf(t.severity);
|
|
201
|
-
return i < r ? s : t;
|
|
202
|
-
}, e[0]);
|
|
203
|
-
};
|
|
204
|
-
export {
|
|
205
|
-
J as NativeActivityStatusCancelled,
|
|
206
|
-
I as NativeActivityStatusQueued,
|
|
207
|
-
ee as NativeActivityStatusRejected,
|
|
208
|
-
l as NativeActivityTypeNative,
|
|
209
|
-
te as actionSchema,
|
|
210
|
-
se as activitiesSchema,
|
|
211
|
-
ne as activityDappSchema,
|
|
212
|
-
ae as activityDetailsSchema,
|
|
213
|
-
ie as activityResponseSchema,
|
|
214
|
-
re as activitySchema,
|
|
215
|
-
f as activitySummarySchema,
|
|
216
|
-
oe as activityTransferSchema,
|
|
217
|
-
ce as assessmentSchema,
|
|
218
|
-
$ as createNativeActivity,
|
|
219
|
-
de as enrichedSimulateAndReviewSchema,
|
|
220
|
-
fe as estimatedFeeSchema,
|
|
221
|
-
ue as estimatedFeesSchema,
|
|
222
|
-
le as feeEstimationSchema,
|
|
223
|
-
pe as feeSchema,
|
|
224
|
-
H as getAnyActivityShortTitle,
|
|
225
|
-
R as getAnyActivityTitle,
|
|
226
|
-
W as getErrorMessageAndLabelFromSimulation,
|
|
227
|
-
G as getHighestSeverity,
|
|
228
|
-
k as getMessageFromSimulationError,
|
|
229
|
-
K as getOverallLastModified,
|
|
230
|
-
Q as hasDelegationActivity,
|
|
231
|
-
Ae as isActivityDetailsAction,
|
|
232
|
-
v as isActivitySummary,
|
|
233
|
-
_ as isMulticallWithDeploymentActivity,
|
|
234
|
-
me as isNftActivitySummary,
|
|
235
|
-
he as isNotTransactionSimulationError,
|
|
236
|
-
w as isRejectOnChainActivity,
|
|
237
|
-
ve as isTokenActivitySummary,
|
|
238
|
-
m as isTransactionSimulationError,
|
|
239
|
-
V as isUpgradeActivity,
|
|
240
|
-
Se as nativeActivityMetaSchema,
|
|
241
|
-
S as nativeActivitySchema,
|
|
242
|
-
O as normalizeActions,
|
|
243
|
-
E as normalizeActivitySummary,
|
|
244
|
-
T as normalizeActivitySummaryCollection,
|
|
245
|
-
Z as parseAccountActivities,
|
|
246
|
-
q as parseFinanceActivities,
|
|
247
|
-
ge as propertySchema,
|
|
248
|
-
ye as reasonsSchema,
|
|
249
|
-
ke as reviewSchema,
|
|
250
|
-
Te as severitySchema,
|
|
251
|
-
Ee as simulateAndReviewSchema,
|
|
252
|
-
Oe as targetedDappSchema,
|
|
253
|
-
we as warningDetailsSchema,
|
|
254
|
-
De as warningSchema
|
|
255
|
-
};
|
package/dist/swap.mjs
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { a8 as b, t as s, c as w, ar as g, u as I } from "./webToken.model-CpudLBp0.mjs";
|
|
2
|
-
import { z as e } from "zod";
|
|
3
|
-
import "starknet";
|
|
4
|
-
import "lodash-es";
|
|
5
|
-
import "@scure/base";
|
|
6
|
-
import { c as d, p as T, f as v, x as S, O as h, n as C, d as F, w as E } from "./bips-DKbEGvGl.mjs";
|
|
7
|
-
var l;
|
|
8
|
-
(function(r) {
|
|
9
|
-
r.NO_SWAP_URL = "Swap base url not provided", r.INVALID_QUOTE_RESPONSE = "Invalid quote response", r.NO_NETWORK_FOR_SWAP = "Network for swap not found", r.INVALID_SWAP_TOKENS = "Invalid swap tokens", r.INVALID_SWAP_ORDER_RESPONSE = "Invalid swap order response";
|
|
10
|
-
})(l || (l = {}));
|
|
11
|
-
class p extends b {
|
|
12
|
-
constructor(n) {
|
|
13
|
-
super(n, l), this.name = "SwapError";
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
const y = e.object({
|
|
17
|
-
quoteId: e.string()
|
|
18
|
-
}), A = e.lazy(() => e.object({
|
|
19
|
-
name: e.string(),
|
|
20
|
-
percent: e.number(),
|
|
21
|
-
sellToken: s,
|
|
22
|
-
buyToken: s,
|
|
23
|
-
routes: e.array(A)
|
|
24
|
-
})), P = e.object({
|
|
25
|
-
sellToken: s,
|
|
26
|
-
sellAmount: e.string(),
|
|
27
|
-
sellAmountInCurrency: e.string(),
|
|
28
|
-
buyToken: s,
|
|
29
|
-
buyAmount: e.string(),
|
|
30
|
-
buyAmountInCurrency: e.string(),
|
|
31
|
-
expiresAt: e.number(),
|
|
32
|
-
expiresIn: e.number(),
|
|
33
|
-
dexCount: e.number(),
|
|
34
|
-
routes: e.array(A),
|
|
35
|
-
providerName: e.string(),
|
|
36
|
-
providerFee: e.string(),
|
|
37
|
-
providerFeeInCurrency: e.string(),
|
|
38
|
-
providerFeePercentage: e.number(),
|
|
39
|
-
argentFee: e.string(),
|
|
40
|
-
argentFeeInCurrency: e.string(),
|
|
41
|
-
argentFeePercentage: e.number(),
|
|
42
|
-
feeToken: s,
|
|
43
|
-
data: y
|
|
44
|
-
}), _ = e.object({
|
|
45
|
-
chain: e.literal("starknet"),
|
|
46
|
-
sellToken: s,
|
|
47
|
-
buyToken: s,
|
|
48
|
-
sellAmount: e.string(),
|
|
49
|
-
buyAmount: e.string(),
|
|
50
|
-
accountAddress: s,
|
|
51
|
-
slippage: e.number().transform((r) => r.toString()),
|
|
52
|
-
data: y
|
|
53
|
-
}), f = e.object({
|
|
54
|
-
calls: e.array(w)
|
|
55
|
-
});
|
|
56
|
-
var i;
|
|
57
|
-
(function(r) {
|
|
58
|
-
r.EXACT_PAY = "EXACT_PAY", r.EXACT_RECEIVE = "EXACT_RECEIVE";
|
|
59
|
-
})(i || (i = {}));
|
|
60
|
-
const k = e.nativeEnum(i), O = e.object({
|
|
61
|
-
payToken: g,
|
|
62
|
-
receiveToken: g,
|
|
63
|
-
tradeType: k.default(i.EXACT_PAY),
|
|
64
|
-
payAmount: e.string(),
|
|
65
|
-
receiveAmount: e.string(),
|
|
66
|
-
payAmountInCurrency: e.string(),
|
|
67
|
-
receiveAmountInCurrency: e.string(),
|
|
68
|
-
totalFee: e.string(),
|
|
69
|
-
totalFeeInCurrency: e.string().optional(),
|
|
70
|
-
totalFeePercentage: e.number(),
|
|
71
|
-
expiresAt: e.number(),
|
|
72
|
-
expiresIn: e.number(),
|
|
73
|
-
route: A,
|
|
74
|
-
data: y
|
|
75
|
-
});
|
|
76
|
-
function N(r) {
|
|
77
|
-
const n = BigInt(r.providerFee) + BigInt(r.argentFee), t = d(T(r.argentFeeInCurrency), T(r.providerFeeInCurrency)), o = v(t.value), a = r.argentFeePercentage + r.providerFeePercentage;
|
|
78
|
-
return {
|
|
79
|
-
totalFee: n.toString(),
|
|
80
|
-
totalFeePercentage: a,
|
|
81
|
-
totalFeeInCurrency: o
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function j(r, n) {
|
|
85
|
-
const t = S(n), o = {
|
|
86
|
-
value: BigInt(r.payAmount),
|
|
87
|
-
decimals: r.payToken.decimals
|
|
88
|
-
};
|
|
89
|
-
if (r.tradeType === i.EXACT_PAY || t.value <= 0n)
|
|
90
|
-
return o;
|
|
91
|
-
const a = d(h, t);
|
|
92
|
-
return C(o, a);
|
|
93
|
-
}
|
|
94
|
-
function X(r, n) {
|
|
95
|
-
const t = S(n), o = {
|
|
96
|
-
value: BigInt(r.receiveAmount),
|
|
97
|
-
decimals: r.receiveToken.decimals
|
|
98
|
-
};
|
|
99
|
-
if (r.tradeType === i.EXACT_RECEIVE)
|
|
100
|
-
return o;
|
|
101
|
-
const a = d(h, t);
|
|
102
|
-
return F(o, a);
|
|
103
|
-
}
|
|
104
|
-
class W {
|
|
105
|
-
constructor(n, t) {
|
|
106
|
-
if (this.httpService = n, !t)
|
|
107
|
-
throw new p({ code: "NO_SWAP_URL" });
|
|
108
|
-
this.swapQuoteUrl = I(t, "/quote"), this.swapOrderUrl = I(t, "/order");
|
|
109
|
-
}
|
|
110
|
-
async getSwapQuoteForPay(n, t, o, a, c = "USD") {
|
|
111
|
-
const u = E(this.swapQuoteUrl, {
|
|
112
|
-
accountAddress: a,
|
|
113
|
-
currency: c,
|
|
114
|
-
chain: "starknet",
|
|
115
|
-
sellToken: n,
|
|
116
|
-
buyToken: t,
|
|
117
|
-
sellAmount: o
|
|
118
|
-
});
|
|
119
|
-
try {
|
|
120
|
-
const m = await this.httpService.get(u);
|
|
121
|
-
return await P.parseAsync(m);
|
|
122
|
-
} catch (m) {
|
|
123
|
-
throw console.error(m), new p({ code: "INVALID_QUOTE_RESPONSE" });
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
async getSwapTradeFromQuote(n, t, o) {
|
|
127
|
-
if (!t || !o)
|
|
128
|
-
throw new p({ code: "INVALID_SWAP_TOKENS" });
|
|
129
|
-
const { totalFee: a, totalFeeInCurrency: c, totalFeePercentage: u } = N(n);
|
|
130
|
-
return O.parse({
|
|
131
|
-
payToken: t,
|
|
132
|
-
receiveToken: o,
|
|
133
|
-
payAmount: n.sellAmount,
|
|
134
|
-
receiveAmount: n.buyAmount,
|
|
135
|
-
payAmountInCurrency: n.sellAmountInCurrency,
|
|
136
|
-
receiveAmountInCurrency: n.buyAmountInCurrency,
|
|
137
|
-
totalFee: a,
|
|
138
|
-
totalFeeInCurrency: c,
|
|
139
|
-
totalFeePercentage: u,
|
|
140
|
-
expiresAt: n.expiresAt,
|
|
141
|
-
expiresIn: n.expiresIn,
|
|
142
|
-
route: n.routes[0],
|
|
143
|
-
data: n.data
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
async getSwapOrderFromTrade(n, t, o) {
|
|
147
|
-
const a = _.parse({
|
|
148
|
-
chain: "starknet",
|
|
149
|
-
sellToken: t.payToken.address,
|
|
150
|
-
buyToken: t.receiveToken.address,
|
|
151
|
-
sellAmount: t.payAmount,
|
|
152
|
-
buyAmount: t.receiveAmount,
|
|
153
|
-
accountAddress: n,
|
|
154
|
-
slippage: o / 1e4,
|
|
155
|
-
data: t.data
|
|
156
|
-
});
|
|
157
|
-
try {
|
|
158
|
-
const c = await this.httpService.post(this.swapOrderUrl, {
|
|
159
|
-
body: JSON.stringify(a),
|
|
160
|
-
headers: {
|
|
161
|
-
"Content-Type": "application/json"
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
return await f.parseAsync(c);
|
|
165
|
-
} catch (c) {
|
|
166
|
-
throw console.error(c), new p({ code: "INVALID_SWAP_ORDER_RESPONSE" });
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
export {
|
|
171
|
-
W as SharedSwapService,
|
|
172
|
-
y as SwapDataSchema,
|
|
173
|
-
_ as SwapOrderRequestSchema,
|
|
174
|
-
f as SwapOrderResponseSchema,
|
|
175
|
-
P as SwapQuoteResponseSchema,
|
|
176
|
-
A as SwapQuoteRouteSchema,
|
|
177
|
-
O as TradeSchema,
|
|
178
|
-
i as TradeType,
|
|
179
|
-
k as TradeTypeSchema,
|
|
180
|
-
N as calculateTotalFee,
|
|
181
|
-
j as maximumAmountInForTrade,
|
|
182
|
-
X as minimumAmountOutFromTrade
|
|
183
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("zod"),a=require("./webToken.model-5HUiR8ER.js"),l=require("starknet"),C=require("lodash-es");require("@scure/base");require("react");require("object-hash");require("swr");const vt="0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",Et="0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",kt="0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003",It="0x036078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f",Nt="0x737ee2f87ce571a58c6c8da558ec18a07ceb64a6172d5ec46171fbc80077a48",wt="0x6e150953b26271a740bf2b6e9bca17cc52c68d765f761295de51ceb8526ee72",jt="0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f";var B={};function m(e,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var Dt=m;m.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};m.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};m.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var n=new Date().getTime();if(e&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var i=this._timeouts.shift();if(i===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),i=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},i),this._options.unref&&this._timer.unref(),!0};m.prototype.attempt=function(e,n){this._fn=e,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var i=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){i._operationTimeoutCb()},i._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};m.prototype.try=function(e){this.attempt(e)};m.prototype.start=function(e){this.attempt(e)};m.prototype.start=m.prototype.try;m.prototype.errors=function(){return this._errors};m.prototype.attempts=function(){return this._attempts};m.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},n=null,i=0,r=0;r<this._errors.length;r++){var s=this._errors[r],c=s.message,o=(e[c]||0)+1;e[c]=o,o>=i&&(n=s,i=o)}return n};(function(e){var n=Dt;e.operation=function(i){var r=e.timeouts(i);return new n(r,{forever:i&&(i.forever||i.retries===1/0),unref:i&&i.unref,maxRetryTime:i&&i.maxRetryTime})},e.timeouts=function(i){if(i instanceof Array)return[].concat(i);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var s in i)r[s]=i[s];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var c=[],o=0;o<r.retries;o++)c.push(this.createTimeout(o,r));return i&&i.forever&&!c.length&&c.push(this.createTimeout(o,r)),c.sort(function(u,g){return u-g}),c},e.createTimeout=function(i,r){var s=r.randomize?Math.random()+1:1,c=Math.round(s*Math.max(r.minTimeout,1)*Math.pow(r.factor,i));return c=Math.min(c,r.maxTimeout),c},e.wrap=function(i,r,s){if(r instanceof Array&&(s=r,r=null),!s){s=[];for(var c in i)typeof i[c]=="function"&&s.push(c)}for(var o=0;o<s.length;o++){var u=s[o],g=i[u];i[u]=(function(_t){var h=e.operation(r),S=Array.prototype.slice.call(arguments,1),Tt=S.pop();S.push(function(P){h.retry(P)||(P&&(arguments[0]=h.mainError()),Tt.apply(this,arguments))}),h.attempt(function(){_t.apply(i,S)})}).bind(i,g),i[u].options=r}}})(B);exports.TOKEN_ERROR_MESSAGES=void 0;(function(e){e.NO_TOKEN_API_URL="NO_TOKEN_API_URL is not defined",e.NO_TOKEN_PRICE_API_URL="NO_TOKEN_PRICE_API_URL is not defined",e.TOKENS_DEFI_DECOMPOSITION_URL="TOKENS_DEFI_DECOMPOSITION_URL is not defined",e.TOKENS_AIRDROPS_API_URL="TOKENS_AIRDROPS_API_URL is not defined",e.TOKEN_PARSING_ERROR="Unable to parse token data response",e.TOKEN_PRICE_PARSING_ERROR="Unable to parse token price response",e.TOKEN_DEFI_DECOMPOSITION_PARSING_ERROR="Unable to parse token defi decomposition response",e.TOKEN_PRICE_NOT_FOUND="Token price not found",e.TOKEN_NOT_FOUND="Token not found",e.TOKEN_DETAILS_NOT_FOUND="Token details not found",e.FEE_TOKEN_NOT_FOUND="Fee token not found",e.UNABLE_TO_CALCULATE_CURRENCY_VALUE="Unable to calculate currency value",e.UNSAFE_DECIMALS="Unsafe decimals in token"})(exports.TOKEN_ERROR_MESSAGES||(exports.TOKEN_ERROR_MESSAGES={}));class Ot extends a.BaseError{constructor(n){super(n,exports.TOKEN_ERROR_MESSAGES),this.name="TokenError"}}const U=a.webTokenWithBalanceAndPriceSchema.extend({accruedFees:t.z.string(),currentPrice:t.z.string(),maxPrice:t.z.string(),minPrice:t.z.string(),principal:t.z.string()}),L=t.z.object({address:a.addressSchema.optional(),currencyValue:t.z.string().default("0")}),T=L.extend({poolFeePercentage:t.z.string(),tickSpacingPercentage:t.z.string().optional(),tokenId:t.z.string().optional(),unitCurrencyValueToken0:t.z.string().optional(),unitCurrencyValueToken1:t.z.string().optional(),token0:U,token1:U}),Rt=t.z.array(T),Pt=t.z.object({name:t.z.string().optional(),healthRatio:t.z.string().optional(),accountAddress:a.addressSchema.optional()}),v=L.extend({totalBalances:t.z.record(t.z.string()),collateral:t.z.boolean(),debt:t.z.boolean(),lending:t.z.boolean(),apy:t.z.string().optional(),group:t.z.string().optional(),unitCurrencyValue:t.z.string().optional(),positionToken:a.apiTokenInfoSchema.or(t.z.undefined()),token:a.webTokenWithBalanceAndPriceSchema.optional(),accountAddress:a.addressSchema.optional(),accountAddressGroup:t.z.string().optional()}),Ct=t.z.array(v),V=T.or(v),H=t.z.record(t.z.object({name:t.z.string().optional(),healthRatio:t.z.string().optional(),accountAddress:a.addressSchema.optional()})),M=t.z.object({type:a.defiPositionTypeSchema,manageUrl:t.z.string().url().optional(),name:t.z.string(),positions:t.z.array(V),positionsTotalValue:t.z.string(),brandColor:t.z.string().optional(),groups:H.optional(),accountAddress:a.addressSchema}),K=t.z.array(M),Ut=t.z.object({dappId:t.z.string(),products:K}),G=t.z.object({name:t.z.string().optional(),tokenAddress:a.addressSchema,token:a.apiTokenInfoSchema.optional(),amount:t.z.string().optional(),claimUrl:t.z.string().optional(),claimStart:t.z.number(),claimEnd:t.z.number().optional()}),Ft=t.z.array(G),q=(e,n=18)=>a.parseUnits(e.replace(",","."),Number(n)),X=t.z.string().trim().refine(e=>e!=="",{message:"Amount is required"}).refine(e=>{try{const n=q(e).value;if(n<0n)throw new Error("Amount must be positive");if(n===0n)throw new Error("Amount can not be zero");if(n>l.uint256.UINT_256_MAX)throw new Error("Amount is too big")}catch{throw new Error("Amount should be a number")}return!0},{message:"Invalid amount"}),xt=e=>!!X.parse(e),W=t.z.object({data:t.z.object({code:t.z.string().optional(),name:t.z.string().optional(),message:t.z.string()})}),Bt=e=>{const n=W.safeParse(e);if(n.success)return n.data.data.message},Lt=3,E=process.env.FEE_OVERHEAD?parseFloat(process.env.FEE_OVERHEAD):Lt,Vt=1.5,z=10,J=({estimatedFee:e,overheadMultiplier:n=E})=>{const r=l.num.toBigInt(e)*BigInt(n*z)/BigInt(z);return l.num.toHex(r)},Ht=({suggestedMaxFee:e,overheadMultiplier:n=E,starknetJsOverheadMultiplier:i=Vt})=>{const s=l.num.toBigInt(e)*BigInt(z)/BigInt(i*z);return J({estimatedFee:s,overheadMultiplier:n})};exports.ESTIMATE_ERROR_MESSAGES=void 0;(function(e){e.SIMULATE_AND_REVIEW_FAILED="Missing simulation"})(exports.ESTIMATE_ERROR_MESSAGES||(exports.ESTIMATE_ERROR_MESSAGES={}));class Mt extends a.BaseError{constructor(n){super(n,exports.ESTIMATE_ERROR_MESSAGES),this.name="EstimateError"}}const Kt=t.z.object({type:t.z.enum(["DECLARE","DEPLOY","DEPLOY_ACCOUNT","INVOKE"]).default("INVOKE"),calls:t.z.array(a.callSchema).or(a.callSchema).optional(),calldata:t.z.array(t.z.string()).optional(),classHash:a.hexSchema.optional(),salt:a.hexSchema.optional(),signature:t.z.array(t.z.string()).optional()}),Gt=t.z.object({amount:t.z.bigint(),pricePerUnit:t.z.bigint()}).or(t.z.object({maxFee:t.z.bigint()})),y=t.z.object({feeTokenAddress:a.addressSchema,amount:t.z.bigint(),pricePerUnit:t.z.bigint(),max:Gt.optional(),dataGasConsumed:t.z.bigint().optional(),dataGasPrice:t.z.bigint().optional()}),Y=t.z.object({deployment:y.optional(),transactions:y}),Q=t.z.union([t.z.literal("critical"),t.z.literal("high"),t.z.literal("caution"),t.z.literal("info")]),$=t.z.string(),qt=t.z.object({name:t.z.string(),url:t.z.string(),position:t.z.number()}),f=t.z.object({address:t.z.string(),name:t.z.string(),symbol:t.z.string().optional(),decimals:t.z.number().optional(),unknown:t.z.boolean(),iconUrl:t.z.string().optional(),type:t.z.string()}),b=t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("amount"),label:t.z.string(),token:f,amount:t.z.string(),usd:t.z.string(),editable:t.z.boolean()}),t.z.object({type:t.z.literal("address"),label:t.z.string(),address:t.z.string(),addressName:t.z.string().optional(),verified:t.z.boolean().optional()}),t.z.object({type:t.z.literal("timestamp"),label:t.z.string(),value:t.z.string()}),t.z.object({type:t.z.literal("token_address"),label:t.z.string(),token:f}),t.z.object({type:t.z.literal("calldata"),label:t.z.string(),entrypoint:t.z.string(),calldata:t.z.array(t.z.string())}),t.z.object({type:t.z.literal("text"),label:t.z.string(),text:t.z.string()}),t.z.object({type:t.z.literal("nft"),label:t.z.string(),token:f})]),k=t.z.object({name:t.z.string(),properties:t.z.array(b),defaultProperties:t.z.array(b).optional()}),Z=t.z.union([t.z.literal("verified"),t.z.literal("neutral"),t.z.literal("partial"),t.z.literal("warn")]),tt=t.z.object({unknown_token:t.z.unknown().optional(),date_of_addition:t.z.string().optional(),contract_address:a.addressSchema.optional(),reason:t.z.string().optional(),value:t.z.string().or(t.z.number()).optional()}),I=t.z.object({reason:$,details:tt.optional(),severity:Q}),et=t.z.object({assessment:Z,warnings:t.z.array(I).optional(),assessmentReasons:t.z.array(t.z.string()).optional(),assessmentDetails:t.z.object({contract_address:t.z.string()}).optional(),action:k}),N=t.z.object({name:t.z.string(),description:t.z.string(),logoUrl:t.z.string(),iconUrl:t.z.string(),argentVerified:t.z.boolean(),links:t.z.array(qt)}),nt=t.z.object({assessment:t.z.union([t.z.literal("verified"),t.z.literal("neutral"),t.z.literal("partial"),t.z.literal("warn")]),warnings:t.z.array(I).optional(),assessmentDetails:t.z.object({contract_address:t.z.string()}).optional(),targetedDapp:N.optional(),reviews:t.z.array(et)}).optional(),at=t.z.object({banner:t.z.string().nullable().optional(),preview:t.z.string().nullable().optional(),full:t.z.string().nullable().optional(),original:t.z.string().nullable().optional()}),Xt=t.z.object({twitter:t.z.string().optional(),external:t.z.string().optional(),discord:t.z.string().optional()}),w=t.z.object({address:a.addressSchemaArgentBackend,decimals:t.z.number().optional(),symbol:t.z.string().optional(),name:t.z.string(),description:t.z.string().optional(),type:t.z.string().optional(),usdValue:t.z.string().optional(),iconUrl:t.z.string().optional(),unknown:t.z.boolean().optional(),imageUrls:at.optional(),links:Xt.optional()}),Wt=t.z.object({tokenAddress:a.addressSchemaArgentBackend,owner:a.addressSchemaArgentBackend,spender:a.addressSchemaArgentBackend,value:t.z.string().optional(),approvalForAll:t.z.boolean(),details:w.optional()}),Jt=t.z.object({tokenAddress:a.addressSchemaArgentBackend,from:a.addressSchemaArgentBackend,to:a.addressSchemaArgentBackend,tokenId:t.z.string().optional(),value:t.z.string().optional(),details:w.optional()}),d=t.z.union([t.z.string(),t.z.number(),t.z.bigint()]).transform(e=>parseInt(e.toString(),10)),F={overallFee:d,gasPrice:d,gasUsage:d,dataGasPrice:d.optional(),dataGasConsumed:d.optional()},it=t.z.object({...F,unit:t.z.string().transform(e=>e.toUpperCase()).pipe(t.z.literal("WEI")),maxFee:d}).or(t.z.object({...F,unit:t.z.string().transform(e=>e.toUpperCase()).pipe(t.z.literal("FRI")),maxAmount:d,maxPricePerUnit:d})),Yt=t.z.object({type:t.z.string(),label:t.z.string(),tokenId:t.z.string().optional(),value:t.z.string().optional(),usdValue:t.z.string().optional(),token:w,sent:t.z.boolean().optional(),tokenIdDetails:t.z.object({name:t.z.string().optional(),description:t.z.string().optional(),imageUrls:at.optional()}).optional()}),Qt=t.z.object({approvals:t.z.array(Wt).optional(),transfers:t.z.array(Jt).optional(),calculatedNonce:t.z.string().optional(),feeEstimation:it,summary:t.z.array(Yt).optional()}),$t=t.z.object({label:t.z.string().optional(),code:t.z.number().optional(),message:t.z.string().optional(),error:t.z.string().optional()}),rt=t.z.object({reviewOfTransaction:nt,simulation:Qt,simulationError:t.z.undefined()}),ot=t.z.object({reviewOfTransaction:nt,simulation:t.z.undefined(),simulationError:$t}),st=rt.or(ot),Zt=t.z.object({transactions:t.z.array(st)}),te=t.z.object({transactions:t.z.array(st),enrichedFeeEstimation:Y.optional(),isBackendDown:t.z.boolean().default(!1).optional()});function ee(e){return rt.safeParse(e).success}function ne(e){return ot.safeParse(e).success}const ct=t.z.object({network:t.z.string(),hash:t.z.string(),status:t.z.string(),blockNumber:t.z.number().optional(),transactionIndex:t.z.number()}),p=t.z.object({type:t.z.enum(["token","nft"]),tokenAddress:a.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.number()}).optional().nullable()}),j=t.z.enum(["ethereum","starknet","zksync","zksync2"]),lt=t.z.object({type:t.z.enum(["payment","gasFee"]),leg:t.z.enum(["credit","debit"]),asset:p,counterParty:a.addressSchemaArgentBackend.optional(),counterPartyNetwork:j.optional()}),ae=t.z.object({address:a.addressSchemaArgentBackend,network:j,type:t.z.enum(["wallet","token"])}),ie=t.z.object({chainId:t.z.enum(["TESTNET","MAINNET","SEPOLIA"]),ethereumNetwork:t.z.enum(["mainnet","sepolia"])}),re=t.z.enum(["approval","changePubKey","dappInteraction","deploy","gift","multicall","payment","security","trade"]),mt=t.z.enum(["triggerEscapeGuardian","triggerEscapeSigner","escapeGuardian","escapeSigner","guardianChanged","guardianBackupChanged","signerChanged","cancelEscape","accountUpgraded","multisigConfigurationUpdated"]),oe=t.z.object({name:t.z.string(),parameters:t.z.array(t.z.unknown()).optional()}),se=t.z.object({guid:t.z.string().optional(),signerType:t.z.string().optional(),signer:t.z.object({publicKey:t.z.string().optional()}).optional()}),ce=t.z.object({activeAt:t.z.string().optional(),newGuardian:t.z.string().optional(),newImplementation:t.z.string().optional(),newVersion:t.z.string().optional(),signerGuid:t.z.string().optional(),signers:t.z.array(se).optional()}),x=t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("deploy"),deployer:a.addressSchemaArgentBackend,contractAddress:a.addressSchemaArgentBackend}),t.z.object({type:t.z.literal("approval"),spender:a.addressSchemaArgentBackend,asset:p,approvalType:t.z.string()}),t.z.object({type:t.z.literal("payment"),counterparty:a.addressSchemaArgentBackend,leg:t.z.string(),asset:p,counterpartyNetwork:j.optional()}),t.z.object({type:t.z.literal("trade"),srcAsset:p,destAsset:p}),t.z.object({type:t.z.literal("security"),action:mt,context:ce.optional()}),t.z.object({type:t.z.literal("dappInteraction"),dappAddress:a.addressSchemaArgentBackend,function:oe.optional().nullable()})]),ut=t.z.union([x,t.z.object({type:t.z.literal("multicall"),calls:t.z.array(t.z.object({details:x}))})]),dt=t.z.object({dappId:t.z.string(),name:t.z.string().optional().nullable()}),D=t.z.object({sent:t.z.boolean(),asset:t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("nft"),tokenAddress:a.addressSchemaArgentBackend,tokenId:t.z.coerce.number().optional(),amount:t.z.string().optional(),collectionName:t.z.string().optional(),collectionPreviewImage:t.z.string().optional().nullable(),nftName:t.z.string().optional().nullable(),nftPreviewImage:t.z.string().optional().nullable()}),t.z.object({type:t.z.literal("token"),tokenAddress:a.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.coerce.string()}).optional().nullable()})])}),pt=t.z.object({type:t.z.string(),to:a.addressSchemaArgentBackend,actualFee:t.z.object({type:t.z.string(),tokenAddress:a.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.number()}).optional().nullable()})}),zt=t.z.enum(["pending","success","failure"]),O=t.z.object({compositeId:t.z.string(),id:t.z.string().uuid(),status:zt,wallet:a.addressSchemaArgentBackend,txSender:a.addressSchemaArgentBackend,source:t.z.string(),type:re,group:t.z.enum(["finance","security"]),submitted:t.z.number(),lastModified:t.z.number(),transaction:ct,transfers:t.z.array(lt),fees:t.z.array(pt).optional(),relatedAddresses:t.z.array(ae).nullable(),network:t.z.string(),networkDetails:ie.optional(),details:ut,transferSummary:t.z.array(D).optional(),dapp:dt.optional(),actions:t.z.array(k).optional(),title:t.z.string().optional(),multisigDetails:t.z.object({signers:t.z.array(a.addressSchemaArgentBackend)}).optional()}),gt=t.z.object({title:t.z.string().optional(),shortTitle:t.z.string().optional(),subtitle:t.z.string().optional(),icon:t.z.string().optional()}),ht="native",St="rejected",ft="cancelled",yt="queued",le=O.pick({status:!0,actions:!0,submitted:!0,lastModified:!0,transferSummary:!0,fees:!0,multisigDetails:!0}).extend({status:t.z.union([zt,t.z.enum([St,ft,yt])]),type:t.z.literal(ht),transaction:ct.pick({hash:!0}),dapp:N.optional(),meta:gt.optional()}),bt=t.z.array(O),me=t.z.object({activities:bt,page:t.z.number(),pageSize:t.z.number(),totalElements:t.z.number(),totalPages:t.z.number()});function ue(e){return mt.safeParse(e).success}const R=e=>D.safeParse(e).success,de=e=>R(e)&&e.asset.type==="token",pe=e=>R(e)&&e.asset.type==="nft",A={Transfer:l.hash.getSelectorFromName("Transfer"),Approval:l.hash.getSelectorFromName("Approval")},At=(e,n,i)=>{for(const r of e){const{events:s,internal_calls:c}=r;for(const o of s)for(const u of o.keys)u===A.Approval&&n.push({tokenAddress:a.addressSchema.parse(r.contract_address),owner:o.data[0],spender:o.data[1],value:l.uint256.uint256ToBN({low:o.data[2],high:o.data[3]}).toString()}),u===A.Transfer&&i.push({tokenAddress:a.addressSchema.parse(r.contract_address),from:o.data[0],to:o.data[1],value:l.uint256.uint256ToBN({low:o.data[2],high:o.data[3]}).toString()});c&&At(c,n,i)}return{approvals:n,transfers:i}},ze=/(0x[a-fA-F0-9]+)\s*\('(.*?)'\)/,ge=e=>{if(!C.isString(e))return;const n=e.match(ze);if(n&&!C.isEmpty(n[2]))return n[2]};var _;(function(e){e.SIMULATE_AND_REVIEW_FAILED="Something went wrong fetching review",e.NO_CALLS_FOUND="No calls found",e.ONCHAIN_FEE_ESTIMATION_FAILED="Failed to estimate fees onchain"})(_||(_={}));class he extends a.BaseError{constructor(n){super(n,_),this.name="ReviewError"}}const Se=t.z.object({reason:t.z.string(),severity:t.z.string().optional(),title:t.z.string(),description:t.z.string().optional()}),fe=Object.values(l.constants.TRANSACTION_VERSION),ye=t.z.string().default("0x3").refine(e=>{const n=l.num.toBigInt(e);return fe.map(i=>l.num.toBigInt(i)).includes(n)}).transform(e=>l.num.toHex(e));function be(e){if(e===l.constants.TRANSACTION_VERSION.V3||e===l.constants.TRANSACTION_VERSION.F3)throw Error("Only txv1 is supported")}exports.ETH_TOKEN_ADDRESS=vt;exports.EstimateError=Mt;exports.EventsBySelector=A;exports.FEE_OVERHEAD=E;exports.NativeActivityStatusCancelled=ft;exports.NativeActivityStatusQueued=yt;exports.NativeActivityStatusRejected=St;exports.NativeActivityTypeNative=ht;exports.ReviewError=he;exports.STANDARD_DEVNET_ACCOUNT_CLASS_HASH=jt;exports.STRK_TOKEN_ADDRESS=Et;exports.TXV1_ACCOUNT_CLASS_HASH=kt;exports.TXV1_MULTISIG_CLASS_HASH=Nt;exports.TXV3_ACCOUNT_CLASS_HASH=It;exports.TXV3_MULTISIG_CLASS_HASH=wt;exports.TokenError=Ot;exports.actionSchema=k;exports.activitiesSchema=bt;exports.activityDappSchema=dt;exports.activityDetailsSchema=ut;exports.activityResponseSchema=me;exports.activitySchema=O;exports.activitySummarySchema=D;exports.activityTransferSchema=lt;exports.airdropSchema=G;exports.argentMaxFee=J;exports.assessmentSchema=Z;exports.collateralizedDebtGroupSchema=Pt;exports.collateralizedDebtPositionSchema=v;exports.collateralizedDebtPositionsSchema=Ct;exports.concentratedLiquidityPositionSchema=T;exports.concentratedLiquidityPositionsSchema=Rt;exports.defiDappsProductsSchema=Ut;exports.defiPositionSchema=V;exports.defiProductSchema=M;exports.defiProductsSchema=K;exports.denyTxV3=be;exports.enrichedSimulateAndReviewSchema=te;exports.estimatedFeeSchema=y;exports.estimatedFeesSchema=Y;exports.feeEstimationSchema=it;exports.feeSchema=pt;exports.findTransfersAndApprovals=At;exports.getMessageFromTrpcError=Bt;exports.getPrettyRpcError=ge;exports.inputAmountSchema=X;exports.isActivityDetailsAction=ue;exports.isActivitySummary=R;exports.isNftActivitySummary=pe;exports.isNotTransactionSimulationError=ee;exports.isTokenActivitySummary=de;exports.isTransactionSimulationError=ne;exports.isValidInputAmount=xt;exports.modifySnjsFeeOverhead=Ht;exports.nativeActivityMetaSchema=gt;exports.nativeActivitySchema=le;exports.parseAmount=q;exports.productGroupsSchema=H;exports.propertySchema=b;exports.reasonsSchema=$;exports.retry=B;exports.reviewSchema=et;exports.severitySchema=Q;exports.simulateAndReviewSchema=Zt;exports.targetedDappSchema=N;exports.transactionReviewTransactionsSchema=Kt;exports.transactionReviewWarningSchema=Se;exports.trpcErrorSchema=W;exports.txVersionSchema=ye;exports.unclaimedRewardsSchema=Ft;exports.warningDetailsSchema=tt;exports.warningSchema=I;
|