@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/simulation.js
CHANGED
|
@@ -1 +1,69 @@
|
|
|
1
|
-
|
|
1
|
+
import { normalizeActivitySummary as i, normalizeActivitySummaryCollection as a } from "./src/features/simulation/activity/normalize.js";
|
|
2
|
+
import { NativeActivityStatusCancelled as m, NativeActivityStatusQueued as c, NativeActivityStatusRejected as o, NativeActivityTypeNative as s, activitiesSchema as v, activityDappSchema as n, activityDetailsSchema as S, activityResponseSchema as y, activitySchema as h, activitySummarySchema as p, activityTransferSchema as A, feeSchema as l, isActivityDetailsAction as f, isActivitySummary as u, isNftActivitySummary as x, isTokenActivitySummary as g, nativeActivityMetaSchema as d, nativeActivitySchema as N } from "./src/features/simulation/activity/schema.js";
|
|
3
|
+
import { createNativeActivity as T, normalizeActions as w } from "./src/features/simulation/activity/utils/createNativeActivity.js";
|
|
4
|
+
import { getAnyActivityShortTitle as F, getAnyActivityTitle as M } from "./src/features/simulation/activity/utils/getAnyActivityTitle.js";
|
|
5
|
+
import { getOverallLastModified as z } from "./src/features/simulation/activity/utils/getOverallLastModified.js";
|
|
6
|
+
import { hasDelegationActivity as j } from "./src/features/simulation/activity/utils/hasDelegationActivity.js";
|
|
7
|
+
import { isMulticallWithDeploymentActivity as O } from "./src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js";
|
|
8
|
+
import { isRejectOnChainActivity as k } from "./src/features/simulation/activity/utils/isRejectOnChainActivity.js";
|
|
9
|
+
import { isUpgradeActivity as Q } from "./src/features/simulation/activity/utils/isUpgradeActivity.js";
|
|
10
|
+
import { parseAccountActivities as W } from "./src/features/simulation/activity/utils/parseAccountActivities.js";
|
|
11
|
+
import { parseFinanceActivities as B } from "./src/features/simulation/activity/utils/parseFinanceActivities.js";
|
|
12
|
+
import { estimatedFeeSchema as I, estimatedFeesSchema as J } from "./src/features/simulation/fees/schema.js";
|
|
13
|
+
import { getErrorMessageAndLabelFromSimulation as P } from "./src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js";
|
|
14
|
+
import { getMessageFromSimulationError as X } from "./src/features/simulation/transactionReview/getMessageFromSimulationError.js";
|
|
15
|
+
import { actionSchema as Z, assessmentSchema as _, enrichedSimulateAndReviewSchema as $, feeEstimationSchema as tt, isNotTransactionSimulationError as et, isTransactionSimulationError as it, propertySchema as at, reviewSchema as rt, simulateAndReviewSchema as mt, targetedDappSchema as ct, warningDetailsSchema as ot, warningSchema as st } from "./src/features/simulation/transactionReview/schema.js";
|
|
16
|
+
import { reasonsSchema as nt, severitySchema as St } from "./src/features/simulation/warning/schema.js";
|
|
17
|
+
import { getHighestSeverity as ht } from "./src/features/simulation/warning/helper.js";
|
|
18
|
+
export {
|
|
19
|
+
m as NativeActivityStatusCancelled,
|
|
20
|
+
c as NativeActivityStatusQueued,
|
|
21
|
+
o as NativeActivityStatusRejected,
|
|
22
|
+
s as NativeActivityTypeNative,
|
|
23
|
+
Z as actionSchema,
|
|
24
|
+
v as activitiesSchema,
|
|
25
|
+
n as activityDappSchema,
|
|
26
|
+
S as activityDetailsSchema,
|
|
27
|
+
y as activityResponseSchema,
|
|
28
|
+
h as activitySchema,
|
|
29
|
+
p as activitySummarySchema,
|
|
30
|
+
A as activityTransferSchema,
|
|
31
|
+
_ as assessmentSchema,
|
|
32
|
+
T as createNativeActivity,
|
|
33
|
+
$ as enrichedSimulateAndReviewSchema,
|
|
34
|
+
I as estimatedFeeSchema,
|
|
35
|
+
J as estimatedFeesSchema,
|
|
36
|
+
tt as feeEstimationSchema,
|
|
37
|
+
l as feeSchema,
|
|
38
|
+
F as getAnyActivityShortTitle,
|
|
39
|
+
M as getAnyActivityTitle,
|
|
40
|
+
P as getErrorMessageAndLabelFromSimulation,
|
|
41
|
+
ht as getHighestSeverity,
|
|
42
|
+
X as getMessageFromSimulationError,
|
|
43
|
+
z as getOverallLastModified,
|
|
44
|
+
j as hasDelegationActivity,
|
|
45
|
+
f as isActivityDetailsAction,
|
|
46
|
+
u as isActivitySummary,
|
|
47
|
+
O as isMulticallWithDeploymentActivity,
|
|
48
|
+
x as isNftActivitySummary,
|
|
49
|
+
et as isNotTransactionSimulationError,
|
|
50
|
+
k as isRejectOnChainActivity,
|
|
51
|
+
g as isTokenActivitySummary,
|
|
52
|
+
it as isTransactionSimulationError,
|
|
53
|
+
Q as isUpgradeActivity,
|
|
54
|
+
d as nativeActivityMetaSchema,
|
|
55
|
+
N as nativeActivitySchema,
|
|
56
|
+
w as normalizeActions,
|
|
57
|
+
i as normalizeActivitySummary,
|
|
58
|
+
a as normalizeActivitySummaryCollection,
|
|
59
|
+
W as parseAccountActivities,
|
|
60
|
+
B as parseFinanceActivities,
|
|
61
|
+
at as propertySchema,
|
|
62
|
+
nt as reasonsSchema,
|
|
63
|
+
rt as reviewSchema,
|
|
64
|
+
St as severitySchema,
|
|
65
|
+
mt as simulateAndReviewSchema,
|
|
66
|
+
ct as targetedDappSchema,
|
|
67
|
+
ot as warningDetailsSchema,
|
|
68
|
+
st as warningSchema
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("zod"),t=n.z.object({name:n.z.string().optional(),address:n.z.string(),ownerAddress:n.z.string(),chain:n.z.enum(["ethereum","zksync","zksync2","starknet"]),deploymentStatus:n.z.enum(["notDeployed","deploying","deployed","deployError"]),application:n.z.enum(["mobile","webwallet","argentx"]),guardianAddresses:n.z.array(n.z.string()).optional(),enabledGuardianAddresses:n.z.array(n.z.string()).optional(),implClassHash:n.z.string().optional(),proxyClassHash:n.z.string().optional(),salt:n.z.string().optional(),created:n.z.string().optional(),contractVersion:n.z.string().optional(),contractName:n.z.string().optional(),version:n.z.number().optional(),owner:n.z.object({guid:n.z.string().optional(),signerType:n.z.enum(["StarknetKey","EthereumKey"]).optional()}).optional()}),e=n.z.object({address:n.z.string(),guardianAddress:n.z.string().optional(),account:t}),o=n.z.object({ownerAddress:n.z.string(),signature:n.z.object({r:n.z.string(),s:n.z.string()}),implClassHash:n.z.string().optional(),name:n.z.string().optional(),icon:n.z.string().optional()});exports.AddSmartAccountResponseSchema=e;exports.AddSmartAcountRequestSchema=o;exports.BackendAccountSchema=t;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z as n } from "zod";
|
|
2
|
+
const t = n.object({
|
|
3
|
+
name: n.string().optional(),
|
|
4
|
+
address: n.string(),
|
|
5
|
+
ownerAddress: n.string(),
|
|
6
|
+
chain: n.enum(["ethereum", "zksync", "zksync2", "starknet"]),
|
|
7
|
+
deploymentStatus: n.enum([
|
|
8
|
+
"notDeployed",
|
|
9
|
+
"deploying",
|
|
10
|
+
"deployed",
|
|
11
|
+
"deployError"
|
|
12
|
+
]),
|
|
13
|
+
application: n.enum(["mobile", "webwallet", "argentx"]),
|
|
14
|
+
guardianAddresses: n.array(n.string()).optional(),
|
|
15
|
+
enabledGuardianAddresses: n.array(n.string()).optional(),
|
|
16
|
+
implClassHash: n.string().optional(),
|
|
17
|
+
proxyClassHash: n.string().optional(),
|
|
18
|
+
salt: n.string().optional(),
|
|
19
|
+
created: n.string().optional(),
|
|
20
|
+
contractVersion: n.string().optional(),
|
|
21
|
+
contractName: n.string().optional(),
|
|
22
|
+
version: n.number().optional(),
|
|
23
|
+
owner: n.object({
|
|
24
|
+
guid: n.string().optional(),
|
|
25
|
+
signerType: n.enum(["StarknetKey", "EthereumKey"]).optional()
|
|
26
|
+
}).optional()
|
|
27
|
+
}), e = n.object({
|
|
28
|
+
address: n.string(),
|
|
29
|
+
guardianAddress: n.string().optional(),
|
|
30
|
+
account: t
|
|
31
|
+
}), s = n.object({
|
|
32
|
+
ownerAddress: n.string(),
|
|
33
|
+
signature: n.object({
|
|
34
|
+
r: n.string(),
|
|
35
|
+
s: n.string()
|
|
36
|
+
}),
|
|
37
|
+
implClassHash: n.string().optional(),
|
|
38
|
+
name: n.string().optional(),
|
|
39
|
+
icon: n.string().optional()
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
e as AddSmartAccountResponseSchema,
|
|
43
|
+
s as AddSmartAcountRequestSchema,
|
|
44
|
+
t as BackendAccountSchema
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(n){return"transactionVersion"in n}function i(n){return"simulateTransaction"in n}function c(n){return!("simulateTransaction"in n)}exports.isAccountV4=c;exports.isAccountV5=i;exports.isAccountV6=t;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function t(n) {
|
|
2
|
+
return "transactionVersion" in n;
|
|
3
|
+
}
|
|
4
|
+
function i(n) {
|
|
5
|
+
return "simulateTransaction" in n;
|
|
6
|
+
}
|
|
7
|
+
function c(n) {
|
|
8
|
+
return !("simulateTransaction" in n);
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
c as isAccountV4,
|
|
12
|
+
i as isAccountV5,
|
|
13
|
+
t as isAccountV6
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),r=e.z.object({value:e.z.string(),platform:e.z.enum(["ios","argentx","android","webwallet"]).nullable()}),n=e.z.object({preferences:e.z.record(r)});exports.preferencesEndpointPayload=n;exports.preferencesSchema=r;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
const r = e.object({
|
|
3
|
+
value: e.string(),
|
|
4
|
+
platform: e.enum(["ios", "argentx", "android", "webwallet"]).nullable()
|
|
5
|
+
}), n = e.object({
|
|
6
|
+
preferences: e.record(r)
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
n as preferencesEndpointPayload,
|
|
10
|
+
r as preferencesSchema
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=[{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"}];exports.default=e;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
const a = [
|
|
2
|
+
{
|
|
3
|
+
address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
|
|
4
|
+
name: "Ether",
|
|
5
|
+
symbol: "ETH",
|
|
6
|
+
decimals: 18,
|
|
7
|
+
networkId: "mainnet-alpha",
|
|
8
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/eth.png"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
|
|
12
|
+
name: "Ether",
|
|
13
|
+
symbol: "ETH",
|
|
14
|
+
decimals: 18,
|
|
15
|
+
networkId: "sepolia-alpha",
|
|
16
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/eth.png"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
|
|
20
|
+
name: "Ether",
|
|
21
|
+
symbol: "ETH",
|
|
22
|
+
decimals: 18,
|
|
23
|
+
networkId: "localhost",
|
|
24
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/eth.png"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
address: "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
|
|
28
|
+
name: "Starknet",
|
|
29
|
+
symbol: "STRK",
|
|
30
|
+
decimals: "18",
|
|
31
|
+
networkId: "mainnet-alpha",
|
|
32
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/strk.png"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
address: "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
|
|
36
|
+
name: "Starknet",
|
|
37
|
+
symbol: "STRK",
|
|
38
|
+
decimals: "18",
|
|
39
|
+
networkId: "integration",
|
|
40
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/strk.png"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
address: "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
|
|
44
|
+
name: "Starknet",
|
|
45
|
+
symbol: "STRK",
|
|
46
|
+
decimals: "18",
|
|
47
|
+
networkId: "sepolia-alpha",
|
|
48
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/strk.png"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
address: "0x00da114221cb83fa859dbdb4c44beeaa0bb37c7537ad5ae66fe5e0efd20e6eb3",
|
|
52
|
+
name: "DAI",
|
|
53
|
+
symbol: "DAI",
|
|
54
|
+
decimals: 18,
|
|
55
|
+
networkId: "mainnet-alpha",
|
|
56
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/dai.png"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
address: "0x03e85bfbb8e2a42b7bead9e88e9a1b19dbccf661471061807292120462396ec9",
|
|
60
|
+
name: "DAI",
|
|
61
|
+
symbol: "DAI",
|
|
62
|
+
decimals: 18,
|
|
63
|
+
networkId: "sepolia-alpha",
|
|
64
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/dai.png"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
address: "0x06f2a0dfeff180133de890ad69c6ba294574c5f34a67890fd22464f348c4d03c",
|
|
68
|
+
name: "DAI",
|
|
69
|
+
symbol: "DAI",
|
|
70
|
+
decimals: 18,
|
|
71
|
+
networkId: "sepolia-alpha",
|
|
72
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/dai.png"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
address: "0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac",
|
|
76
|
+
name: "Wrapped BTC",
|
|
77
|
+
symbol: "WBTC",
|
|
78
|
+
decimals: 8,
|
|
79
|
+
networkId: "mainnet-alpha",
|
|
80
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/wbtc.png"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
address: "0x12d537dc323c439dc65c976fad242d5610d27cfb5f31689a0a319b8be7f3d56",
|
|
84
|
+
name: "Wrapped BTC",
|
|
85
|
+
symbol: "WBTC",
|
|
86
|
+
decimals: 8,
|
|
87
|
+
networkId: "sepolia-alpha",
|
|
88
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/wbtc.png"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
address: "0x020d208b9e57a7f92bfa9f61135446e0961afc340378be97dbd317453c0950ae",
|
|
92
|
+
name: "Wrapped BTC",
|
|
93
|
+
symbol: "WBTC",
|
|
94
|
+
decimals: 8,
|
|
95
|
+
networkId: "sepolia-alpha",
|
|
96
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/wbtc.png"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
address: "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
|
|
100
|
+
name: "USD Coin",
|
|
101
|
+
symbol: "USDC",
|
|
102
|
+
decimals: 6,
|
|
103
|
+
networkId: "mainnet-alpha",
|
|
104
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/usdc.png"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
address: "0x005a643907b9a4bc6a55e9069c4fd5fd1f5c79a22470690f75556c4736e34426",
|
|
108
|
+
name: "USD Coin",
|
|
109
|
+
symbol: "USDC",
|
|
110
|
+
decimals: 6,
|
|
111
|
+
networkId: "sepolia-alpha",
|
|
112
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/usdc.png"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
address: "0x07ab0b8855a61f480b4423c46c32fa7c553f0aac3531bbddaa282d86244f7a23",
|
|
116
|
+
name: "USD Coin",
|
|
117
|
+
symbol: "USDC",
|
|
118
|
+
decimals: 6,
|
|
119
|
+
networkId: "sepolia-alpha",
|
|
120
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/usdc.png"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
address: "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",
|
|
124
|
+
name: "Tether USD",
|
|
125
|
+
symbol: "USDT",
|
|
126
|
+
decimals: 6,
|
|
127
|
+
networkId: "mainnet-alpha",
|
|
128
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/usdt.png"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
address: "0x386e8d061177f19b3b485c20e31137e6f6bc497cc635ccdfcab96fadf5add6a",
|
|
132
|
+
name: "Tether USD",
|
|
133
|
+
symbol: "USDT",
|
|
134
|
+
decimals: 6,
|
|
135
|
+
networkId: "sepolia-alpha",
|
|
136
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/usdt.png"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
address: "0x00585c32b625999e6e5e78645ff8df7a9001cf5cf3eb6b80ccdd16cb64bd3a34",
|
|
140
|
+
name: "zkLend Token",
|
|
141
|
+
symbol: "ZEND",
|
|
142
|
+
decimals: 18,
|
|
143
|
+
networkId: "mainnet-alpha",
|
|
144
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/zend.png"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
address: "0x06ea04cd7e40bfef07c3625e2b3472839093d966bf601568128436466f962fcf",
|
|
148
|
+
name: "Baby Laika",
|
|
149
|
+
symbol: "BABYLAIKA",
|
|
150
|
+
decimals: 18,
|
|
151
|
+
networkId: "mainnet-alpha",
|
|
152
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/babylaika.png"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
address: "0x004a8ff6a7b121c55d5e21af478265c5798f574abaa41efadf569d6939705896",
|
|
156
|
+
name: "Baby Laika",
|
|
157
|
+
symbol: "BABYLAIKA",
|
|
158
|
+
decimals: 18,
|
|
159
|
+
networkId: "sepolia-alpha",
|
|
160
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/babylaika.png"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
address: "0x0782f0ddca11d9950bc3220e35ac82cf868778edb67a5e58b39838544bc4cd0f",
|
|
164
|
+
name: "Starknet Voting Token",
|
|
165
|
+
symbol: "vSTRK",
|
|
166
|
+
decimals: 18,
|
|
167
|
+
networkId: "mainnet-alpha",
|
|
168
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/vstrk.png"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
address: "0x075afe6402ad5a5c20dd25e10ec3b3986acaa647b77e4ae24b0cbc9a54a27a87",
|
|
172
|
+
name: "Ekubo Protocol",
|
|
173
|
+
symbol: "EKUBO",
|
|
174
|
+
decimals: 18,
|
|
175
|
+
networkId: "mainnet-alpha",
|
|
176
|
+
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/ekubo.png"
|
|
177
|
+
}
|
|
178
|
+
];
|
|
179
|
+
export {
|
|
180
|
+
a as default
|
|
181
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),n=t.z.enum(["mainnet-alpha","sepolia-alpha"]),r=t.z.enum(["mainnet","sepolia"]);function a(e){return n.safeParse(e).success}function s(e){return r.safeParse(e).success}exports.argentBackendNetworkIdSchema=r;exports.argentNetworkIdSchema=n;exports.isArgentBackendNetworkId=s;exports.isArgentNetworkId=a;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z as n } from "zod";
|
|
2
|
+
const a = n.enum(["mainnet-alpha", "sepolia-alpha"]), t = n.enum(["mainnet", "sepolia"]);
|
|
3
|
+
function s(e) {
|
|
4
|
+
return a.safeParse(e).success;
|
|
5
|
+
}
|
|
6
|
+
function o(e) {
|
|
7
|
+
return t.safeParse(e).success;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
t as argentBackendNetworkIdSchema,
|
|
11
|
+
a as argentNetworkIdSchema,
|
|
12
|
+
o as isArgentBackendNetworkId,
|
|
13
|
+
s as isArgentNetworkId
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={value:1n,decimals:0};exports.ONE=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("zod"),n=require("./parseUnits.cjs");function s(t){return r.z.string().refine(e=>/^-?\d+(\.\d+)?$/.test(e),{message:"Invalid number format"}).transform(e=>n.parseUnits(e,t))}exports.createUnitsSchema=s;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
import { parseUnits as n } from "./parseUnits.js";
|
|
3
|
+
function s(t) {
|
|
4
|
+
return e.string().refine((r) => /^-?\d+(\.\d+)?$/.test(r), { message: "Invalid number format" }).transform((r) => n(r, t));
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
s as createUnitsSchema
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c({value:t,decimals:n}){if(n===0)return t.toString();const r=t<0n;t=r?-t:t;const o=t.toString().padStart(n,"0"),e=o.slice(0,-n)||"0",i=o.slice(-n).replace(/0+$/,"");return`${r?"-":""}${e}${i?`.${i}`:""}`}exports.formatUnits=c;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function s({ value: t, decimals: n }) {
|
|
2
|
+
if (n === 0)
|
|
3
|
+
return t.toString();
|
|
4
|
+
const r = t < 0n;
|
|
5
|
+
t = r ? -t : t;
|
|
6
|
+
const o = t.toString().padStart(n, "0"), i = o.slice(0, -n) || "0", c = o.slice(-n).replace(/0+$/, "");
|
|
7
|
+
return `${r ? "-" : ""}${i}${c ? `.${c}` : ""}`;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
s as formatUnits
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./utils.cjs"),e=require("./lib.cjs"),r=require("./parseUnits.cjs"),s=require("./formatUnits.cjs"),i=require("./constants.cjs"),a=require("./createUnitsSchema.cjs");exports.absBigInt=t.absBigInt;exports.formatCurrency=t.formatCurrency;exports.formatEther=t.formatEther;exports.parseCurrency=t.parseCurrency;exports.parseCurrencyAbs=t.parseCurrencyAbs;exports.parseEther=t.parseEther;exports.toBigDecimal=t.toBigDecimal;exports.abs=e.abs;exports.add=e.add;exports.div=e.div;exports.eq=e.eq;exports.gt=e.gt;exports.gte=e.gte;exports.lt=e.lt;exports.lte=e.lte;exports.mod=e.mod;exports.mul=e.mul;exports.not=e.not;exports.sub=e.sub;exports.toFixedDecimals=e.toFixedDecimals;exports.toTiniestPossibleDecimal=e.toTiniestPossibleDecimal;exports.parseUnits=r.parseUnits;exports.formatUnits=s.formatUnits;exports.ONE=i.ONE;exports.createUnitsSchema=a.createUnitsSchema;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { absBigInt as t, formatCurrency as o, formatEther as a, parseCurrency as m, parseCurrencyAbs as s, parseEther as i, toBigDecimal as p } from "./utils.js";
|
|
2
|
+
import { abs as n, add as c, div as l, eq as x, gt as b, gte as d, lt as u, lte as g, mod as h, mul as y, not as C, sub as D, toFixedDecimals as E, toTiniestPossibleDecimal as U } from "./lib.js";
|
|
3
|
+
import { parseUnits as q } from "./parseUnits.js";
|
|
4
|
+
import { formatUnits as A } from "./formatUnits.js";
|
|
5
|
+
import { ONE as I } from "./constants.js";
|
|
6
|
+
import { createUnitsSchema as O } from "./createUnitsSchema.js";
|
|
7
|
+
export {
|
|
8
|
+
I as ONE,
|
|
9
|
+
n as abs,
|
|
10
|
+
t as absBigInt,
|
|
11
|
+
c as add,
|
|
12
|
+
O as createUnitsSchema,
|
|
13
|
+
l as div,
|
|
14
|
+
x as eq,
|
|
15
|
+
o as formatCurrency,
|
|
16
|
+
a as formatEther,
|
|
17
|
+
A as formatUnits,
|
|
18
|
+
b as gt,
|
|
19
|
+
d as gte,
|
|
20
|
+
u as lt,
|
|
21
|
+
g as lte,
|
|
22
|
+
h as mod,
|
|
23
|
+
y as mul,
|
|
24
|
+
C as not,
|
|
25
|
+
m as parseCurrency,
|
|
26
|
+
s as parseCurrencyAbs,
|
|
27
|
+
i as parseEther,
|
|
28
|
+
q as parseUnits,
|
|
29
|
+
D as sub,
|
|
30
|
+
p as toBigDecimal,
|
|
31
|
+
E as toFixedDecimals,
|
|
32
|
+
U as toTiniestPossibleDecimal
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=(e,t)=>({decimals:t,value:t>=e.decimals?e.value*BigInt(10)**BigInt(t-e.decimals):e.value/BigInt(10)**BigInt(e.decimals-t)}),d=e=>{const t=e.value.toString().split("").reverse();let s=0;for(let i=0;i<t.length&&t[i]==="0";i++)s++;const l=e.decimals-s;return a(e,l)},r=(e,t)=>{const s=Math.max(e.decimals,t.decimals),[l,i]=[e,t].map(o=>a(o,s));return[l.value,i.value,s]},c=e=>(t,s)=>{const[l,i,o]=r(t,s);return{decimals:o,value:e(l,i,o)}},n=e=>(t,s)=>{const[l,i]=r(t,s);return e(l,i)},v=c((e,t)=>e+t),g=c((e,t)=>e-t),m=c((e,t,s)=>{if(t===BigInt(0))throw new Error("Division by zero is not allowed");return e*BigInt(10)**BigInt(s)/t}),B=(e,t)=>d({decimals:e.decimals+t.decimals,value:e.value*t.value}),I=c((e,t)=>{if(t===BigInt(0))throw new Error("Modulus by zero is not allowed");return e%t}),j=e=>({decimals:e.decimals,value:e.value>=BigInt(0)?e.value:-e.value}),u=n((e,t)=>e===t),b=n((e,t)=>e<t),w=n((e,t)=>e>t),p=n((e,t)=>e<=t),D=n((e,t)=>e>=t),f=(e,t)=>!u(e,t);exports.abs=j;exports.add=v;exports.div=m;exports.eq=u;exports.gt=w;exports.gte=D;exports.lt=b;exports.lte=p;exports.mod=I;exports.mul=B;exports.not=f;exports.sub=g;exports.toFixedDecimals=a;exports.toTiniestPossibleDecimal=d;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const a = (e, t) => ({
|
|
2
|
+
decimals: t,
|
|
3
|
+
value: t >= e.decimals ? e.value * BigInt(10) ** BigInt(t - e.decimals) : e.value / BigInt(10) ** BigInt(e.decimals - t)
|
|
4
|
+
}), d = (e) => {
|
|
5
|
+
const t = e.value.toString().split("").reverse();
|
|
6
|
+
let s = 0;
|
|
7
|
+
for (let i = 0; i < t.length && t[i] === "0"; i++)
|
|
8
|
+
s++;
|
|
9
|
+
const l = e.decimals - s;
|
|
10
|
+
return a(e, l);
|
|
11
|
+
}, r = (e, t) => {
|
|
12
|
+
const s = Math.max(e.decimals, t.decimals), [l, i] = [e, t].map((c) => a(c, s));
|
|
13
|
+
return [l.value, i.value, s];
|
|
14
|
+
}, o = (e) => (t, s) => {
|
|
15
|
+
const [l, i, c] = r(t, s);
|
|
16
|
+
return {
|
|
17
|
+
decimals: c,
|
|
18
|
+
value: e(l, i, c)
|
|
19
|
+
};
|
|
20
|
+
}, n = (e) => (t, s) => {
|
|
21
|
+
const [l, i] = r(t, s);
|
|
22
|
+
return e(l, i);
|
|
23
|
+
}, v = o((e, t) => e + t), g = o((e, t) => e - t), B = o((e, t, s) => {
|
|
24
|
+
if (t === BigInt(0))
|
|
25
|
+
throw new Error("Division by zero is not allowed");
|
|
26
|
+
return e * BigInt(10) ** BigInt(s) / t;
|
|
27
|
+
}), m = (e, t) => d({
|
|
28
|
+
decimals: e.decimals + t.decimals,
|
|
29
|
+
value: e.value * t.value
|
|
30
|
+
}), I = o((e, t) => {
|
|
31
|
+
if (t === BigInt(0))
|
|
32
|
+
throw new Error("Modulus by zero is not allowed");
|
|
33
|
+
return e % t;
|
|
34
|
+
}), j = (e) => ({
|
|
35
|
+
decimals: e.decimals,
|
|
36
|
+
value: e.value >= BigInt(0) ? e.value : -e.value
|
|
37
|
+
}), u = n((e, t) => e === t), w = n((e, t) => e < t), p = n((e, t) => e > t), h = n((e, t) => e <= t), A = n((e, t) => e >= t), f = (e, t) => !u(e, t);
|
|
38
|
+
export {
|
|
39
|
+
j as abs,
|
|
40
|
+
v as add,
|
|
41
|
+
B as div,
|
|
42
|
+
u as eq,
|
|
43
|
+
p as gt,
|
|
44
|
+
A as gte,
|
|
45
|
+
w as lt,
|
|
46
|
+
h as lte,
|
|
47
|
+
I as mod,
|
|
48
|
+
m as mul,
|
|
49
|
+
f as not,
|
|
50
|
+
g as sub,
|
|
51
|
+
a as toFixedDecimals,
|
|
52
|
+
d as toTiniestPossibleDecimal
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(r,n){let[e,t=""]=r.split(".");const i=e.startsWith("-");return i&&(e=e.slice(1)),t.length>n?Number(t[n])>=5?t=(BigInt(t.slice(0,n))+1n).toString().padStart(n,"0"):t=t.slice(0,n):t=t.padEnd(n,"0"),{value:BigInt(`${i?"-":""}${e}${t}`),decimals:n}}exports.parseUnits=s;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function g(r, n) {
|
|
2
|
+
let [e, t = ""] = r.split(".");
|
|
3
|
+
const i = e.startsWith("-");
|
|
4
|
+
return i && (e = e.slice(1)), t.length > n ? Number(t[n]) >= 5 ? t = (BigInt(t.slice(0, n)) + 1n).toString().padStart(n, "0") : t = t.slice(0, n) : t = t.padEnd(n, "0"), {
|
|
5
|
+
value: BigInt(`${i ? "-" : ""}${e}${t}`),
|
|
6
|
+
decimals: n
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
g as parseUnits
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../tokens/constants.cjs"),t=require("./formatUnits.cjs"),n=require("./lib.cjs"),a=require("./parseUnits.cjs");function u(r){return t.formatUnits({value:r,decimals:e.DEFAULT_TOKEN_DECIMALS})}function c(r){return a.parseUnits(r,e.DEFAULT_TOKEN_DECIMALS)}function o(r){return t.formatUnits({value:r,decimals:e.DEFAULT_TOKEN_DECIMALS})}function s(r){return a.parseUnits(r,e.DEFAULT_TOKEN_DECIMALS)}function E(r){return n.abs({value:r,decimals:0}).value}function f(r){return n.abs(s(r))}function l(r,i){return{value:BigInt(r),decimals:i}}exports.absBigInt=E;exports.formatCurrency=o;exports.formatEther=u;exports.parseCurrency=s;exports.parseCurrencyAbs=f;exports.parseEther=c;exports.toBigDecimal=l;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DEFAULT_TOKEN_DECIMALS as t } from "../tokens/constants.js";
|
|
2
|
+
import { formatUnits as n } from "./formatUnits.js";
|
|
3
|
+
import { abs as e } from "./lib.js";
|
|
4
|
+
import { parseUnits as u } from "./parseUnits.js";
|
|
5
|
+
function s(r) {
|
|
6
|
+
return n({ value: r, decimals: t });
|
|
7
|
+
}
|
|
8
|
+
function p(r) {
|
|
9
|
+
return u(r, t);
|
|
10
|
+
}
|
|
11
|
+
function l(r) {
|
|
12
|
+
return n({ value: r, decimals: t });
|
|
13
|
+
}
|
|
14
|
+
function o(r) {
|
|
15
|
+
return u(r, t);
|
|
16
|
+
}
|
|
17
|
+
function E(r) {
|
|
18
|
+
return e({ value: r, decimals: 0 }).value;
|
|
19
|
+
}
|
|
20
|
+
function v(r) {
|
|
21
|
+
return e(o(r));
|
|
22
|
+
}
|
|
23
|
+
function C(r, i) {
|
|
24
|
+
return {
|
|
25
|
+
value: BigInt(r),
|
|
26
|
+
decimals: i
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
E as absBigInt,
|
|
31
|
+
l as formatCurrency,
|
|
32
|
+
s as formatEther,
|
|
33
|
+
o as parseCurrency,
|
|
34
|
+
v as parseCurrencyAbs,
|
|
35
|
+
p as parseEther,
|
|
36
|
+
C as toBigDecimal
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class t{constructor(e,c){this.cachePromise=c.open(e).catch(a=>(console.error(new Error("Failed to open cache",{cause:a})),null))}async get(e){const c=await this.cachePromise;if(!c)throw new Error("No cache available");const a=await c.match(e).catch(()=>{throw new Error("Failed to match cache")});if(!a)throw new Error("Failed to match cache");return a.clone()}async set(e,c){const a=await this.cachePromise;a&&await a.put(e,c).catch(()=>{throw new Error("Failed to match cache")})}async delete(e){const c=await this.cachePromise;return c?c.delete(e):!1}async flush(){const e=await this.cachePromise;if(!e)return;const c=await e.keys();await Promise.allSettled(c.map(a=>e.delete(a)))}}exports.CacheService=t;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
class r {
|
|
2
|
+
constructor(e, c) {
|
|
3
|
+
this.cachePromise = c.open(e).catch((a) => (console.error(new Error("Failed to open cache", { cause: a })), null));
|
|
4
|
+
}
|
|
5
|
+
async get(e) {
|
|
6
|
+
const c = await this.cachePromise;
|
|
7
|
+
if (!c)
|
|
8
|
+
throw new Error("No cache available");
|
|
9
|
+
const a = await c.match(e).catch(() => {
|
|
10
|
+
throw new Error("Failed to match cache");
|
|
11
|
+
});
|
|
12
|
+
if (!a)
|
|
13
|
+
throw new Error("Failed to match cache");
|
|
14
|
+
return a.clone();
|
|
15
|
+
}
|
|
16
|
+
async set(e, c) {
|
|
17
|
+
const a = await this.cachePromise;
|
|
18
|
+
a && await a.put(e, c).catch(() => {
|
|
19
|
+
throw new Error("Failed to match cache");
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
async delete(e) {
|
|
23
|
+
const c = await this.cachePromise;
|
|
24
|
+
return c ? c.delete(e) : !1;
|
|
25
|
+
}
|
|
26
|
+
// should be called on logout
|
|
27
|
+
async flush() {
|
|
28
|
+
const e = await this.cachePromise;
|
|
29
|
+
if (!e)
|
|
30
|
+
return;
|
|
31
|
+
const c = await e.keys();
|
|
32
|
+
await Promise.allSettled(c.map((a) => e.delete(a)));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
r as CacheService
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("lodash-es"),t=require("starknet"),c=require("zod"),l=c.z.string().refine(e=>{if(e.toLowerCase()===e)return!0;try{return t.validateChecksumAddress(e)&&L(e)}catch{}return!1},"Invalid address (checksum error)"),A=c.z.string().refine(e=>{try{return t.validateAndParseAddress(e)}catch{}return!1},"Invalid address (validation error)"),n=c.z.string().regex(/^0x[0-9a-fA-F]+$/,"Invalid address"),u=n.min(50,"Addresses must at least be 50 characters long").max(66,"Addresses must at most be 66 characters long"),S=n.length(66,"Address must be 66 characters long"),o=u.pipe(l).transform(e=>`0x${(e.startsWith("0x")?e.slice(2):e).padStart(64,"0")}`),g=o.or(c.z.literal("")).transform(e=>e===""?void 0:e).optional(),x=n.transform(e=>`0x${e.replace(/^0x/,"").toLowerCase().padStart(64,"0")}`),h=e=>o.safeParse(e).success,p=h,i=e=>t.getChecksumAddress(e),$=e=>{const s=i(e),r=s.slice(0,2),a=s.slice(2,6),d=s.slice(-4);return`${r}${a}…${d}`},z=e=>{const s=i(e),r=s.slice(0,2),d=s.slice(2).match(/.{1,4}/g)||[];return`${r} ${d.join(" ")}`},L=e=>!/^0x[0-9a-f]{63,64}$/.test(e),f=(e,s)=>{try{return!e||!s?!1:t.num.hexToDecimalString(e)===t.num.hexToDecimalString(s)}catch{}return!1},T=e=>{try{return t.num.toBigInt(n.parse(e))===t.constants.ZERO}catch{}return!1},w=(e,s)=>!!(s!=null&&s.some(r=>f(r,e))),C=m.memoize(e=>{const s=e.slice(0,6),r=e.slice(-4);return`${s}…${r}`}),E=m.memoize((e,s)=>{if(e.length<s)return e;const r=Math.floor((s-1)/2),a=e.slice(0,r),d=e.slice(-r);return`${a}…${d}`});exports.addressOrEmptyUndefinedSchema=g;exports.addressSchema=o;exports.addressSchemaArgentBackend=x;exports.addressSchemaBase=n;exports.addressSchemaLooseLength=u;exports.addressSchemaStrictLength=S;exports.formatFullAddress=z;exports.formatTruncatedAddress=$;exports.formatTruncatedSignerKey=C;exports.formatTruncatedString=E;exports.includesAddress=w;exports.isAddress=h;exports.isEqualAddress=f;exports.isValidAddress=p;exports.isZeroAddress=T;exports.normalizeAddress=i;exports.validChecksumAddressSchema=l;exports.validateAddressRangeSchema=A;
|