@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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseError as l } from "./baseErrors.js";
|
|
2
|
+
var r;
|
|
3
|
+
(function(o) {
|
|
4
|
+
o.NOT_VALID = "Invalid call";
|
|
5
|
+
})(r || (r = {}));
|
|
6
|
+
class t extends l {
|
|
7
|
+
constructor(a) {
|
|
8
|
+
super(a, r), this.name = "CallError";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
r as CALL_ERROR_MESSAGES,
|
|
13
|
+
t as CallError
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./baseErrors.cjs");exports.NETWORK_ERROR_MESSAGES=void 0;(function(r){r.NO_NETWORK_OR_MULTICALL="Missing networkId or multicall",r.NOT_FOUND="Network not found"})(exports.NETWORK_ERROR_MESSAGES||(exports.NETWORK_ERROR_MESSAGES={}));class t extends e.BaseError{constructor(o){super(o,exports.NETWORK_ERROR_MESSAGES),this.name="NetworkError"}}exports.NetworkError=t;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseError as e } from "./baseErrors.js";
|
|
2
|
+
var o;
|
|
3
|
+
(function(r) {
|
|
4
|
+
r.NO_NETWORK_OR_MULTICALL = "Missing networkId or multicall", r.NOT_FOUND = "Network not found";
|
|
5
|
+
})(o || (o = {}));
|
|
6
|
+
class s extends e {
|
|
7
|
+
constructor(t) {
|
|
8
|
+
super(t, o), this.name = "NetworkError";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
o as NETWORK_ERROR_MESSAGES,
|
|
13
|
+
s as NetworkError
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./baseErrors.cjs");exports.REVIEW_ERROR_MESSAGE=void 0;(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"})(exports.REVIEW_ERROR_MESSAGE||(exports.REVIEW_ERROR_MESSAGE={}));class o extends E.BaseError{constructor(r){super(r,exports.REVIEW_ERROR_MESSAGE),this.name="ReviewError"}}exports.ReviewError=o;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseError as t } from "./baseErrors.js";
|
|
2
|
+
var r;
|
|
3
|
+
(function(e) {
|
|
4
|
+
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";
|
|
5
|
+
})(r || (r = {}));
|
|
6
|
+
class i extends t {
|
|
7
|
+
constructor(o) {
|
|
8
|
+
super(o, r), this.name = "ReviewError";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
r as REVIEW_ERROR_MESSAGE,
|
|
13
|
+
i as ReviewError
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./baseErrors.cjs");exports.SWAP_ERROR_MESSAGE=void 0;(function(r){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"})(exports.SWAP_ERROR_MESSAGE||(exports.SWAP_ERROR_MESSAGE={}));class s extends o.BaseError{constructor(e){super(e,exports.SWAP_ERROR_MESSAGE),this.name="SwapError"}}exports.SwapError=s;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseError as s } from "./baseErrors.js";
|
|
2
|
+
var o;
|
|
3
|
+
(function(r) {
|
|
4
|
+
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";
|
|
5
|
+
})(o || (o = {}));
|
|
6
|
+
class n extends s {
|
|
7
|
+
constructor(e) {
|
|
8
|
+
super(e, o), this.name = "SwapError";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
o as SWAP_ERROR_MESSAGE,
|
|
13
|
+
n as SwapError
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./schema.cjs"),d=e=>e.map(c),c=e=>{var o,i,a,r;if(t.isActivitySummary(e))return t.activitySummarySchema.parse(e);const n=!!e.sent;if(e.token.type!=="ERC20"){const s={asset:{type:"nft",tokenAddress:e.token.address,tokenId:e.tokenId?parseInt(e.tokenId):0,amount:e.value,collectionName:e.token.name,collectionPreviewImage:(o=e.token.imageUrls)==null?void 0:o.preview,nftName:(i=e.tokenIdDetails)==null?void 0:i.name,nftPreviewImage:(r=(a=e.tokenIdDetails)==null?void 0:a.imageUrls)==null?void 0:r.preview},sent:n};return t.activitySummarySchema.parse(s)}const l={asset:{type:"token",tokenAddress:e.token.address,amount:e.value,fiatAmount:{currency:"USD",currencyAmount:e.usdValue||"0"}},sent:n};return t.activitySummarySchema.parse(l)};exports.normalizeActivitySummary=c;exports.normalizeActivitySummaryCollection=d;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { isActivitySummary as d, activitySummarySchema as n } from "./schema.js";
|
|
2
|
+
const p = (e) => e.map(s), s = (e) => {
|
|
3
|
+
var o, i, r, a;
|
|
4
|
+
if (d(e))
|
|
5
|
+
return n.parse(e);
|
|
6
|
+
const t = !!e.sent;
|
|
7
|
+
if (e.token.type !== "ERC20") {
|
|
8
|
+
const l = {
|
|
9
|
+
asset: {
|
|
10
|
+
type: "nft",
|
|
11
|
+
tokenAddress: e.token.address,
|
|
12
|
+
tokenId: e.tokenId ? parseInt(e.tokenId) : 0,
|
|
13
|
+
amount: e.value,
|
|
14
|
+
collectionName: e.token.name,
|
|
15
|
+
collectionPreviewImage: (o = e.token.imageUrls) == null ? void 0 : o.preview,
|
|
16
|
+
nftName: (i = e.tokenIdDetails) == null ? void 0 : i.name,
|
|
17
|
+
nftPreviewImage: (a = (r = e.tokenIdDetails) == null ? void 0 : r.imageUrls) == null ? void 0 : a.preview
|
|
18
|
+
},
|
|
19
|
+
sent: t
|
|
20
|
+
};
|
|
21
|
+
return n.parse(l);
|
|
22
|
+
}
|
|
23
|
+
const c = {
|
|
24
|
+
asset: {
|
|
25
|
+
type: "token",
|
|
26
|
+
tokenAddress: e.token.address,
|
|
27
|
+
amount: e.value,
|
|
28
|
+
fiatAmount: {
|
|
29
|
+
currency: "USD",
|
|
30
|
+
currencyAmount: e.usdValue || "0"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
sent: t
|
|
34
|
+
};
|
|
35
|
+
return n.parse(c);
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
s as normalizeActivitySummary,
|
|
39
|
+
p as normalizeActivitySummaryCollection
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),l=require("../transactionReview/schema.cjs"),e=require("../../../chains/starknet/address.cjs"),u=t.z.object({network:t.z.string(),hash:t.z.string(),status:t.z.string(),blockNumber:t.z.number().optional(),transactionIndex:t.z.number()}),n=t.z.object({type:t.z.enum(["token","nft"]),tokenAddress:e.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.number()}).optional().nullable()}),i=t.z.enum(["ethereum","starknet","zksync","zksync2"]),d=t.z.object({type:t.z.enum(["payment","gasFee"]),leg:t.z.enum(["credit","debit"]),asset:n,counterParty:e.addressSchemaArgentBackend.optional(),counterPartyNetwork:i.optional()}),j=t.z.object({address:e.addressSchemaArgentBackend,network:i,type:t.z.enum(["wallet","token"])}),f=t.z.object({chainId:t.z.enum(["TESTNET","MAINNET","SEPOLIA"]),ethereumNetwork:t.z.enum(["mainnet","sepolia"])}),N=t.z.enum(["approval","changePubKey","dappInteraction","deploy","gift","multicall","payment","security","trade"]),m=t.z.enum(["triggerEscapeGuardian","triggerEscapeSigner","escapeGuardian","escapeSigner","guardianChanged","guardianBackupChanged","signerChanged","cancelEscape","accountUpgraded","multisigConfigurationUpdated"]),w=t.z.object({name:t.z.string(),parameters:t.z.array(t.z.unknown()).optional()}),B=t.z.object({guid:t.z.string().optional(),signerType:t.z.string().optional(),signer:t.z.object({publicKey:t.z.string().optional()}).optional()}),T=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(B).optional()}),o=t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("deploy"),deployer:e.addressSchemaArgentBackend,contractAddress:e.addressSchemaArgentBackend}),t.z.object({type:t.z.literal("approval"),spender:e.addressSchemaArgentBackend,asset:n,approvalType:t.z.string()}),t.z.object({type:t.z.literal("payment"),counterparty:e.addressSchemaArgentBackend,leg:t.z.string(),asset:n,counterpartyNetwork:i.optional()}),t.z.object({type:t.z.literal("trade"),srcAsset:n,destAsset:n}),t.z.object({type:t.z.literal("security"),action:m,context:T.optional()}),t.z.object({type:t.z.literal("dappInteraction"),dappAddress:e.addressSchemaArgentBackend,function:w.optional().nullable()})]),p=t.z.union([o,t.z.object({type:t.z.literal("multicall"),calls:t.z.array(t.z.object({details:o}))})]),z=t.z.object({dappId:t.z.string(),name:t.z.string().optional().nullable()}),c=t.z.object({sent:t.z.boolean(),asset:t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("nft"),tokenAddress:e.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:e.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.coerce.string()}).optional().nullable()})])}),y=t.z.object({type:t.z.string(),to:e.addressSchemaArgentBackend,actualFee:t.z.object({type:t.z.string(),tokenAddress:e.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.number()}).optional().nullable()})}),g=t.z.enum(["pending","success","failure"]),s=t.z.object({compositeId:t.z.string(),id:t.z.string().uuid(),status:g,wallet:e.addressSchemaArgentBackend,txSender:e.addressSchemaArgentBackend,source:t.z.string(),type:N,group:t.z.enum(["finance","security"]),submitted:t.z.number(),lastModified:t.z.number(),transaction:u,transfers:t.z.array(d),fees:t.z.array(y).optional(),relatedAddresses:t.z.array(j).nullable(),network:t.z.string(),networkDetails:f.optional(),details:p,transferSummary:t.z.array(c).optional(),dapp:z.optional(),actions:t.z.array(l.actionSchema).optional(),title:t.z.string().optional(),multisigDetails:t.z.object({signers:t.z.array(e.addressSchemaArgentBackend)}).optional()}),S=t.z.object({title:t.z.string().optional(),shortTitle:t.z.string().optional(),subtitle:t.z.string().optional(),icon:t.z.string().optional()}),h="native",b="rejected",v="cancelled",A="queued",D=s.pick({status:!0,actions:!0,submitted:!0,lastModified:!0,transferSummary:!0,fees:!0,multisigDetails:!0}).extend({status:t.z.union([g,t.z.enum([b,v,A])]),type:t.z.literal(h),transaction:u.pick({hash:!0}),dapp:l.targetedDappSchema.optional(),meta:S.optional()}),k=t.z.array(s),I=t.z.object({activities:k,page:t.z.number(),pageSize:t.z.number(),totalElements:t.z.number(),totalPages:t.z.number()});function P(a){return m.safeParse(a).success}const r=a=>c.safeParse(a).success,E=a=>r(a)&&a.asset.type==="token",x=a=>r(a)&&a.asset.type==="nft";exports.NativeActivityStatusCancelled=v;exports.NativeActivityStatusQueued=A;exports.NativeActivityStatusRejected=b;exports.NativeActivityTypeNative=h;exports.activitiesSchema=k;exports.activityDappSchema=z;exports.activityDetailsSchema=p;exports.activityResponseSchema=I;exports.activitySchema=s;exports.activitySummarySchema=c;exports.activityTransferSchema=d;exports.feeSchema=y;exports.isActivityDetailsAction=P;exports.isActivitySummary=r;exports.isNftActivitySummary=x;exports.isTokenActivitySummary=E;exports.nativeActivityMetaSchema=S;exports.nativeActivitySchema=D;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { z as t } from "zod";
|
|
2
|
+
import { actionSchema as m, targetedDappSchema as d } from "../transactionReview/schema.js";
|
|
3
|
+
import { addressSchemaArgentBackend as e } from "../../../chains/starknet/address.js";
|
|
4
|
+
const r = t.object({
|
|
5
|
+
network: t.string(),
|
|
6
|
+
hash: t.string(),
|
|
7
|
+
status: t.string(),
|
|
8
|
+
blockNumber: t.number().optional(),
|
|
9
|
+
transactionIndex: t.number()
|
|
10
|
+
}), a = t.object({
|
|
11
|
+
type: t.enum(["token", "nft"]),
|
|
12
|
+
tokenAddress: e,
|
|
13
|
+
amount: t.string().optional(),
|
|
14
|
+
fiatAmount: t.object({
|
|
15
|
+
currency: t.string(),
|
|
16
|
+
currencyAmount: t.number()
|
|
17
|
+
}).optional().nullable()
|
|
18
|
+
}), i = t.enum(["ethereum", "starknet", "zksync", "zksync2"]), g = t.object({
|
|
19
|
+
type: t.enum(["payment", "gasFee"]),
|
|
20
|
+
leg: t.enum(["credit", "debit"]),
|
|
21
|
+
asset: a,
|
|
22
|
+
counterParty: e.optional(),
|
|
23
|
+
counterPartyNetwork: i.optional()
|
|
24
|
+
}), y = t.object({
|
|
25
|
+
address: e,
|
|
26
|
+
network: i,
|
|
27
|
+
type: t.enum(["wallet", "token"])
|
|
28
|
+
}), b = t.object({
|
|
29
|
+
chainId: t.enum(["TESTNET", "MAINNET", "SEPOLIA"]),
|
|
30
|
+
ethereumNetwork: t.enum(["mainnet", "sepolia"])
|
|
31
|
+
}), S = t.enum([
|
|
32
|
+
"approval",
|
|
33
|
+
"changePubKey",
|
|
34
|
+
"dappInteraction",
|
|
35
|
+
"deploy",
|
|
36
|
+
"gift",
|
|
37
|
+
"multicall",
|
|
38
|
+
"payment",
|
|
39
|
+
"security",
|
|
40
|
+
"trade"
|
|
41
|
+
]), s = t.enum([
|
|
42
|
+
"triggerEscapeGuardian",
|
|
43
|
+
"triggerEscapeSigner",
|
|
44
|
+
"escapeGuardian",
|
|
45
|
+
"escapeSigner",
|
|
46
|
+
"guardianChanged",
|
|
47
|
+
"guardianBackupChanged",
|
|
48
|
+
"signerChanged",
|
|
49
|
+
"cancelEscape",
|
|
50
|
+
"accountUpgraded",
|
|
51
|
+
"multisigConfigurationUpdated"
|
|
52
|
+
]), h = t.object({
|
|
53
|
+
name: t.string(),
|
|
54
|
+
parameters: t.array(t.unknown()).optional()
|
|
55
|
+
}), v = t.object({
|
|
56
|
+
guid: t.string().optional(),
|
|
57
|
+
signerType: t.string().optional(),
|
|
58
|
+
// StarknetKey, Secp256k1, Secp256r1, Eip191, Webauthn
|
|
59
|
+
signer: t.object({
|
|
60
|
+
publicKey: t.string().optional()
|
|
61
|
+
}).optional()
|
|
62
|
+
}), j = t.object({
|
|
63
|
+
activeAt: t.string().optional(),
|
|
64
|
+
newGuardian: t.string().optional(),
|
|
65
|
+
newImplementation: t.string().optional(),
|
|
66
|
+
newVersion: t.string().optional(),
|
|
67
|
+
signerGuid: t.string().optional(),
|
|
68
|
+
signers: t.array(v).optional()
|
|
69
|
+
}), o = t.discriminatedUnion("type", [
|
|
70
|
+
t.object({
|
|
71
|
+
type: t.literal("deploy"),
|
|
72
|
+
deployer: e,
|
|
73
|
+
contractAddress: e
|
|
74
|
+
}),
|
|
75
|
+
t.object({
|
|
76
|
+
type: t.literal("approval"),
|
|
77
|
+
spender: e,
|
|
78
|
+
asset: a,
|
|
79
|
+
approvalType: t.string()
|
|
80
|
+
}),
|
|
81
|
+
t.object({
|
|
82
|
+
type: t.literal("payment"),
|
|
83
|
+
counterparty: e,
|
|
84
|
+
leg: t.string(),
|
|
85
|
+
asset: a,
|
|
86
|
+
counterpartyNetwork: i.optional()
|
|
87
|
+
}),
|
|
88
|
+
t.object({
|
|
89
|
+
type: t.literal("trade"),
|
|
90
|
+
srcAsset: a,
|
|
91
|
+
destAsset: a
|
|
92
|
+
}),
|
|
93
|
+
t.object({
|
|
94
|
+
type: t.literal("security"),
|
|
95
|
+
action: s,
|
|
96
|
+
context: j.optional()
|
|
97
|
+
}),
|
|
98
|
+
t.object({
|
|
99
|
+
type: t.literal("dappInteraction"),
|
|
100
|
+
dappAddress: e,
|
|
101
|
+
function: h.optional().nullable()
|
|
102
|
+
// This object is often null. It happens when we were unable to get the ABI or failed decoding the function call
|
|
103
|
+
})
|
|
104
|
+
]), A = t.union([
|
|
105
|
+
o,
|
|
106
|
+
t.object({
|
|
107
|
+
type: t.literal("multicall"),
|
|
108
|
+
calls: t.array(t.object({
|
|
109
|
+
details: o
|
|
110
|
+
}))
|
|
111
|
+
})
|
|
112
|
+
]), f = t.object({
|
|
113
|
+
dappId: t.string(),
|
|
114
|
+
name: t.string().optional().nullable()
|
|
115
|
+
}), c = t.object({
|
|
116
|
+
sent: t.boolean(),
|
|
117
|
+
asset: t.discriminatedUnion("type", [
|
|
118
|
+
t.object({
|
|
119
|
+
type: t.literal("nft"),
|
|
120
|
+
tokenAddress: e,
|
|
121
|
+
tokenId: t.coerce.number().optional(),
|
|
122
|
+
amount: t.string().optional(),
|
|
123
|
+
collectionName: t.string().optional(),
|
|
124
|
+
collectionPreviewImage: t.string().optional().nullable(),
|
|
125
|
+
nftName: t.string().optional().nullable(),
|
|
126
|
+
nftPreviewImage: t.string().optional().nullable()
|
|
127
|
+
}),
|
|
128
|
+
t.object({
|
|
129
|
+
type: t.literal("token"),
|
|
130
|
+
tokenAddress: e,
|
|
131
|
+
amount: t.string().optional(),
|
|
132
|
+
fiatAmount: t.object({
|
|
133
|
+
currency: t.string(),
|
|
134
|
+
currencyAmount: t.coerce.string()
|
|
135
|
+
}).optional().nullable()
|
|
136
|
+
})
|
|
137
|
+
])
|
|
138
|
+
}), k = t.object({
|
|
139
|
+
type: t.string(),
|
|
140
|
+
// "gas" for example
|
|
141
|
+
to: e,
|
|
142
|
+
actualFee: t.object({
|
|
143
|
+
type: t.string(),
|
|
144
|
+
tokenAddress: e,
|
|
145
|
+
amount: t.string().optional(),
|
|
146
|
+
fiatAmount: t.object({
|
|
147
|
+
currency: t.string(),
|
|
148
|
+
currencyAmount: t.number()
|
|
149
|
+
}).optional().nullable()
|
|
150
|
+
})
|
|
151
|
+
}), l = t.enum(["pending", "success", "failure"]), u = t.object({
|
|
152
|
+
compositeId: t.string(),
|
|
153
|
+
id: t.string().uuid(),
|
|
154
|
+
status: l,
|
|
155
|
+
wallet: e,
|
|
156
|
+
txSender: e,
|
|
157
|
+
source: t.string(),
|
|
158
|
+
type: S,
|
|
159
|
+
group: t.enum(["finance", "security"]),
|
|
160
|
+
submitted: t.number(),
|
|
161
|
+
lastModified: t.number(),
|
|
162
|
+
transaction: r,
|
|
163
|
+
transfers: t.array(g),
|
|
164
|
+
// to be clarified
|
|
165
|
+
fees: t.array(k).optional(),
|
|
166
|
+
relatedAddresses: t.array(y).nullable(),
|
|
167
|
+
network: t.string(),
|
|
168
|
+
networkDetails: b.optional(),
|
|
169
|
+
details: A,
|
|
170
|
+
transferSummary: t.array(c).optional(),
|
|
171
|
+
dapp: f.optional(),
|
|
172
|
+
actions: t.array(m).optional(),
|
|
173
|
+
title: t.string().optional(),
|
|
174
|
+
multisigDetails: t.object({
|
|
175
|
+
signers: t.array(e)
|
|
176
|
+
}).optional()
|
|
177
|
+
}), w = t.object({
|
|
178
|
+
title: t.string().optional(),
|
|
179
|
+
shortTitle: t.string().optional(),
|
|
180
|
+
subtitle: t.string().optional(),
|
|
181
|
+
/** let's not import the keys from x-ui here */
|
|
182
|
+
icon: t.string().optional()
|
|
183
|
+
}), N = "native", I = "rejected", T = "cancelled", D = "queued", M = u.pick({
|
|
184
|
+
status: !0,
|
|
185
|
+
actions: !0,
|
|
186
|
+
submitted: !0,
|
|
187
|
+
lastModified: !0,
|
|
188
|
+
transferSummary: !0,
|
|
189
|
+
fees: !0,
|
|
190
|
+
multisigDetails: !0
|
|
191
|
+
}).extend({
|
|
192
|
+
status: t.union([
|
|
193
|
+
l,
|
|
194
|
+
t.enum([
|
|
195
|
+
I,
|
|
196
|
+
T,
|
|
197
|
+
D
|
|
198
|
+
])
|
|
199
|
+
]),
|
|
200
|
+
type: t.literal(N),
|
|
201
|
+
transaction: r.pick({
|
|
202
|
+
hash: !0
|
|
203
|
+
}),
|
|
204
|
+
dapp: d.optional(),
|
|
205
|
+
meta: w.optional()
|
|
206
|
+
}), E = t.array(u), z = t.object({
|
|
207
|
+
activities: E,
|
|
208
|
+
page: t.number(),
|
|
209
|
+
pageSize: t.number(),
|
|
210
|
+
totalElements: t.number(),
|
|
211
|
+
totalPages: t.number()
|
|
212
|
+
});
|
|
213
|
+
function G(n) {
|
|
214
|
+
return s.safeParse(n).success;
|
|
215
|
+
}
|
|
216
|
+
const p = (n) => c.safeParse(n).success, U = (n) => p(n) && n.asset.type === "token", B = (n) => p(n) && n.asset.type === "nft";
|
|
217
|
+
export {
|
|
218
|
+
T as NativeActivityStatusCancelled,
|
|
219
|
+
D as NativeActivityStatusQueued,
|
|
220
|
+
I as NativeActivityStatusRejected,
|
|
221
|
+
N as NativeActivityTypeNative,
|
|
222
|
+
E as activitiesSchema,
|
|
223
|
+
f as activityDappSchema,
|
|
224
|
+
A as activityDetailsSchema,
|
|
225
|
+
z as activityResponseSchema,
|
|
226
|
+
u as activitySchema,
|
|
227
|
+
c as activitySummarySchema,
|
|
228
|
+
g as activityTransferSchema,
|
|
229
|
+
k as feeSchema,
|
|
230
|
+
G as isActivityDetailsAction,
|
|
231
|
+
p as isActivitySummary,
|
|
232
|
+
B as isNftActivitySummary,
|
|
233
|
+
U as isTokenActivitySummary,
|
|
234
|
+
w as nativeActivityMetaSchema,
|
|
235
|
+
M as nativeActivitySchema
|
|
236
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("lodash-es"),f=require("../normalize.cjs"),m=require("../schema.cjs");function y(t){var n,a;const r=(a=(n=t.transactions)==null?void 0:n[0].reviewOfTransaction)==null?void 0:a.reviews;return r?r.map(c=>c.action):void 0}function p({simulateAndReview:t,...r}){var n,a;const i={type:m.NativeActivityTypeNative,...r};if(t&&!v.isEmpty(t.transactions)){const c=t.transactions[t.transactions.length-1],o=(n=c.simulation)==null?void 0:n.summary;if(o){const u=f.normalizeActivitySummaryCollection(o);i.transferSummary=u}const s=(a=c.reviewOfTransaction)==null?void 0:a.targetedDapp;s&&(i.dapp=s);const e=y(t);e&&(i.actions=e)}return m.nativeActivitySchema.parse(i)}exports.createNativeActivity=p;exports.normalizeActions=y;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { isEmpty as p } from "lodash-es";
|
|
2
|
+
import { normalizeActivitySummaryCollection as f } from "../normalize.js";
|
|
3
|
+
import { NativeActivityTypeNative as y, nativeActivitySchema as v } from "../schema.js";
|
|
4
|
+
function u(t) {
|
|
5
|
+
var i, r;
|
|
6
|
+
const a = (r = (i = t.transactions) == null ? void 0 : i[0].reviewOfTransaction) == null ? void 0 : r.reviews;
|
|
7
|
+
return a ? a.map((o) => o.action) : void 0;
|
|
8
|
+
}
|
|
9
|
+
function N({ simulateAndReview: t, ...a }) {
|
|
10
|
+
var i, r;
|
|
11
|
+
const n = {
|
|
12
|
+
type: y,
|
|
13
|
+
...a
|
|
14
|
+
};
|
|
15
|
+
if (t && !p(t.transactions)) {
|
|
16
|
+
const o = t.transactions[t.transactions.length - 1], c = (i = o.simulation) == null ? void 0 : i.summary;
|
|
17
|
+
if (c) {
|
|
18
|
+
const m = f(c);
|
|
19
|
+
n.transferSummary = m;
|
|
20
|
+
}
|
|
21
|
+
const s = (r = o.reviewOfTransaction) == null ? void 0 : r.targetedDapp;
|
|
22
|
+
s && (n.dapp = s);
|
|
23
|
+
const e = u(t);
|
|
24
|
+
e && (n.actions = e);
|
|
25
|
+
}
|
|
26
|
+
return v.parse(n);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
N as createNativeActivity,
|
|
30
|
+
u as normalizeActions
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../schema.cjs"),o=require("./isRejectOnChainActivity.cjs");function n(e,r=!1){var t,i;if(e.type===l.NativeActivityTypeNative){if(r&&((t=e.meta)!=null&&t.shortTitle))return e.meta.shortTitle;if((i=e.meta)!=null&&i.title)return e.meta.title}else{if(o.isRejectOnChainActivity(e))return"On-chain rejection";if(e.title)return e.title}return"Contract interaction"}function u(e){return n(e,!0)}exports.getAnyActivityShortTitle=u;exports.getAnyActivityTitle=n;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NativeActivityTypeNative as i } from "../schema.js";
|
|
2
|
+
import { isRejectOnChainActivity as o } from "./isRejectOnChainActivity.js";
|
|
3
|
+
function l(e, n = !1) {
|
|
4
|
+
var t, r;
|
|
5
|
+
if (e.type === i) {
|
|
6
|
+
if (n && ((t = e.meta) != null && t.shortTitle))
|
|
7
|
+
return e.meta.shortTitle;
|
|
8
|
+
if ((r = e.meta) != null && r.title)
|
|
9
|
+
return e.meta.title;
|
|
10
|
+
} else {
|
|
11
|
+
if (o(e))
|
|
12
|
+
return "On-chain rejection";
|
|
13
|
+
if (e.title)
|
|
14
|
+
return e.title;
|
|
15
|
+
}
|
|
16
|
+
return "Contract interaction";
|
|
17
|
+
}
|
|
18
|
+
function m(e) {
|
|
19
|
+
return l(e, !0);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
m as getAnyActivityShortTitle,
|
|
23
|
+
l as getAnyActivityTitle
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(e){return e.map(t=>t.lastModified).sort().pop()}exports.getOverallLastModified=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=a=>{var t,n;return!!((n=(t=a.details)==null?void 0:t.calls)==null?void 0:n.some(e=>{var i,o,s;return(o=(i=e==null?void 0:e.details)==null?void 0:i.function)!=null&&o.name?((s=e==null?void 0:e.details)==null?void 0:s.function.name)==="lock_and_delegate_by_sig":!1}))};exports.hasDelegationActivity=r;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const d = (a) => {
|
|
2
|
+
var t, n;
|
|
3
|
+
return !!((n = (t = a.details) == null ? void 0 : t.calls) == null ? void 0 : n.some((e) => {
|
|
4
|
+
var i, o, s;
|
|
5
|
+
return (o = (i = e == null ? void 0 : e.details) == null ? void 0 : i.function) != null && o.name ? ((s = e == null ? void 0 : e.details) == null ? void 0 : s.function.name) === "lock_and_delegate_by_sig" : !1;
|
|
6
|
+
}));
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
d as hasDelegationActivity
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../chains/starknet/address.cjs"),r=t=>{var s;return t.type==="multicall"&&"calls"in t.details&&((s=t.details.calls)==null?void 0:s.some(e=>{var i;return((i=e==null?void 0:e.details)==null?void 0:i.type)==="deploy"&&d.isEqualAddress((e==null?void 0:e.details.contractAddress)||"",t.wallet)}))};exports.isMulticallWithDeploymentActivity=r;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isEqualAddress as o } from "../../../../chains/starknet/address.js";
|
|
2
|
+
const i = (s) => {
|
|
3
|
+
var t;
|
|
4
|
+
return s.type === "multicall" && "calls" in s.details && ((t = s.details.calls) == null ? void 0 : t.some((e) => {
|
|
5
|
+
var d;
|
|
6
|
+
return ((d = e == null ? void 0 : e.details) == null ? void 0 : d.type) === "deploy" && o((e == null ? void 0 : e.details.contractAddress) || "", s.wallet);
|
|
7
|
+
}));
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
i as isMulticallWithDeploymentActivity
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../../../chains/starknet/address.cjs"),f=require("../../../../chains/starknet/constants.cjs");function u(s){const t=o(s),n=d(s);return t||n}const o=s=>{var c;if(!((c=s.actions)!=null&&c.length))return!1;const t=s.actions[0];if(t.name!=="ERC20_transfer")return!1;let n,i,a,r;return t.defaultProperties&&t.defaultProperties.forEach(e=>{e.type==="token_address"&&e.token.address===f.ETH_TOKEN_ADDRESS&&(i=!0),e.type==="calldata"&&(n=e.calldata[0])}),t.properties.length>1&&t.properties.forEach(e=>{e.type==="amount"&&e.label==="ERC20_transfer_amount"&&e.amount==="0"&&(a=!0),e.type==="address"&&e.label==="ERC20_transfer_recipient"&&l.isEqualAddress(e.address,n)&&(r=!0)}),i&&a&&r},d=s=>{var t,n;return!!("meta"in s&&(n=(t=s.meta)==null?void 0:t.title)!=null&&n.includes("On-chain rejection"))};exports.isRejectOnChainActivity=u;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { isEqualAddress as c } from "../../../../chains/starknet/address.js";
|
|
2
|
+
import { ETH_TOKEN_ADDRESS as l } from "../../../../chains/starknet/constants.js";
|
|
3
|
+
function m(s) {
|
|
4
|
+
const t = o(s), n = u(s);
|
|
5
|
+
return t || n;
|
|
6
|
+
}
|
|
7
|
+
const o = (s) => {
|
|
8
|
+
var f;
|
|
9
|
+
if (!((f = s.actions) != null && f.length))
|
|
10
|
+
return !1;
|
|
11
|
+
const t = s.actions[0];
|
|
12
|
+
if (t.name !== "ERC20_transfer")
|
|
13
|
+
return !1;
|
|
14
|
+
let n, i, a, r;
|
|
15
|
+
return t.defaultProperties && t.defaultProperties.forEach((e) => {
|
|
16
|
+
e.type === "token_address" && e.token.address === l && (i = !0), e.type === "calldata" && (n = e.calldata[0]);
|
|
17
|
+
}), t.properties.length > 1 && t.properties.forEach((e) => {
|
|
18
|
+
e.type === "amount" && e.label === "ERC20_transfer_amount" && e.amount === "0" && (a = !0), e.type === "address" && e.label === "ERC20_transfer_recipient" && c(e.address, n) && (r = !0);
|
|
19
|
+
}), i && a && r;
|
|
20
|
+
}, u = (s) => {
|
|
21
|
+
var t, n;
|
|
22
|
+
return !!("meta" in s && (n = (t = s.meta) == null ? void 0 : t.title) != null && n.includes("On-chain rejection"));
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
m as isRejectOnChainActivity
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function a(e){const t=n(e),i=s(e);return t||i}const n=e=>{var i;if(!((i=e.actions)!=null&&i.length))return!1;const t=e.actions[0];if(t.name!=="account_upgrade")return!1;t.defaultProperties&&t.defaultProperties.forEach(r=>{if(r.type==="calldata"&&r.entrypoint==="upgrade")return!0})},s=e=>{var t,i;return!!("meta"in e&&(i=(t=e.meta)==null?void 0:t.title)!=null&&i.includes("Upgrade account"))};exports.isUpgradeActivity=a;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function s(e) {
|
|
2
|
+
const t = r(e), n = i(e);
|
|
3
|
+
return t || n;
|
|
4
|
+
}
|
|
5
|
+
const r = (e) => {
|
|
6
|
+
var n;
|
|
7
|
+
if (!((n = e.actions) != null && n.length))
|
|
8
|
+
return !1;
|
|
9
|
+
const t = e.actions[0];
|
|
10
|
+
if (t.name !== "account_upgrade")
|
|
11
|
+
return !1;
|
|
12
|
+
t.defaultProperties && t.defaultProperties.forEach((a) => {
|
|
13
|
+
if (a.type === "calldata" && a.entrypoint === "upgrade")
|
|
14
|
+
return !0;
|
|
15
|
+
});
|
|
16
|
+
}, i = (e) => {
|
|
17
|
+
var t, n;
|
|
18
|
+
return !!("meta" in e && (n = (t = e.meta) == null ? void 0 : t.title) != null && n.includes("Upgrade account"));
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
s as isUpgradeActivity
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./isMulticallWithDeploymentActivity.cjs"),c=require("../../../../chains/starknet/address.cjs"),o=require("../../../../utils/arrays.cjs");function l({activities:n,accountAddressesOnNetwork:i}){const e={};return n.forEach(s=>{const r=s.wallet,t=s.type==="deploy"?s.type:s.details.type==="security"?s.details.action:void 0;s.group==="security"&&c.includesAddress(r,i)&&t&&(e[t]=e[t]||[],c.includesAddress(r,e[t])||(e[t]=o.ensureArray(e[t]).concat(r))),d.isMulticallWithDeploymentActivity(s)&&(e.deploy=o.ensureArray(e.deploy).concat(r))}),e}exports.parseAccountActivities=l;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { isMulticallWithDeploymentActivity as p } from "./isMulticallWithDeploymentActivity.js";
|
|
2
|
+
import { includesAddress as t } from "../../../../chains/starknet/address.js";
|
|
3
|
+
import { ensureArray as c } from "../../../../utils/arrays.js";
|
|
4
|
+
function f({ activities: n, accountAddressesOnNetwork: d }) {
|
|
5
|
+
const o = {};
|
|
6
|
+
return n.forEach((e) => {
|
|
7
|
+
const s = e.wallet, r = e.type === "deploy" ? e.type : e.details.type === "security" ? e.details.action : void 0;
|
|
8
|
+
e.group === "security" && t(s, d) && r && (o[r] = o[r] || [], t(s, o[r]) || (o[r] = c(o[r]).concat(s))), p(e) && (o.deploy = c(o.deploy).concat(s));
|
|
9
|
+
}), o;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
f as parseAccountActivities
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../../../chains/starknet/address.cjs");function r({activities:c,accountAddressesOnNetwork:o,tokenAddressesOnNetwork:i}){const s={tokenActivity:{accountAddresses:[],tokenAddresses:[],newTokenAddresses:[]},nftActivity:{accountAddresses:[],tokenAddresses:[]}};return c.forEach(d=>{if(d.group==="finance"&&d.relatedAddresses){const A=d.transfers.some(t=>t.asset.type==="token");d.relatedAddresses.forEach(({type:t,address:e})=>{t==="token"?n.includesAddress(e,i)&&(n.includesAddress(e,s.tokenActivity.tokenAddresses)||s.tokenActivity.tokenAddresses.push(e)):t==="wallet"&&n.includesAddress(e,o)&&(A?n.includesAddress(e,s.tokenActivity.accountAddresses)||s.tokenActivity.accountAddresses.push(e):n.includesAddress(e,s.nftActivity.accountAddresses)||s.nftActivity.accountAddresses.push(e))}),d.transfers.forEach(t=>{if(t.asset.type==="token"){const e=t.asset.tokenAddress;!n.includesAddress(e,i)&&!n.includesAddress(e,s.tokenActivity.newTokenAddresses)&&s.tokenActivity.newTokenAddresses.push(e)}else if(t.asset.type==="nft"){const e=t.asset.tokenAddress;n.includesAddress(e,s.nftActivity.tokenAddresses)||s.nftActivity.tokenAddresses.push(e)}})}}),s}exports.parseFinanceActivities=r;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { includesAddress as n } from "../../../../chains/starknet/address.js";
|
|
2
|
+
function k({ activities: A, accountAddressesOnNetwork: d, tokenAddressesOnNetwork: i }) {
|
|
3
|
+
const s = {
|
|
4
|
+
tokenActivity: {
|
|
5
|
+
accountAddresses: [],
|
|
6
|
+
tokenAddresses: [],
|
|
7
|
+
newTokenAddresses: []
|
|
8
|
+
},
|
|
9
|
+
nftActivity: {
|
|
10
|
+
accountAddresses: [],
|
|
11
|
+
tokenAddresses: []
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
return A.forEach((o) => {
|
|
15
|
+
if (o.group === "finance" && o.relatedAddresses) {
|
|
16
|
+
const c = o.transfers.some((t) => t.asset.type === "token");
|
|
17
|
+
o.relatedAddresses.forEach(({ type: t, address: e }) => {
|
|
18
|
+
t === "token" ? n(e, i) && (n(e, s.tokenActivity.tokenAddresses) || s.tokenActivity.tokenAddresses.push(e)) : t === "wallet" && n(e, d) && (c ? n(e, s.tokenActivity.accountAddresses) || s.tokenActivity.accountAddresses.push(e) : n(e, s.nftActivity.accountAddresses) || s.nftActivity.accountAddresses.push(e));
|
|
19
|
+
}), o.transfers.forEach((t) => {
|
|
20
|
+
if (t.asset.type === "token") {
|
|
21
|
+
const e = t.asset.tokenAddress;
|
|
22
|
+
!n(e, i) && !n(e, s.tokenActivity.newTokenAddresses) && s.tokenActivity.newTokenAddresses.push(e);
|
|
23
|
+
} else if (t.asset.type === "nft") {
|
|
24
|
+
const e = t.asset.tokenAddress;
|
|
25
|
+
n(e, s.nftActivity.tokenAddresses) || s.nftActivity.tokenAddresses.push(e);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}), s;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
k as parseFinanceActivities
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),i=require("../../../chains/starknet/address.cjs"),a=e.z.object({amount:e.z.bigint(),pricePerUnit:e.z.bigint()}).or(e.z.object({maxFee:e.z.bigint()})),t=e.z.object({feeTokenAddress:i.addressSchema,amount:e.z.bigint(),pricePerUnit:e.z.bigint(),max:a.optional(),dataGasConsumed:e.z.bigint().optional(),dataGasPrice:e.z.bigint().optional()}),o=e.z.object({deployment:t.optional(),transactions:t});exports.estimatedFeeSchema=t;exports.estimatedFeesSchema=o;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
import { addressSchema as i } from "../../../chains/starknet/address.js";
|
|
3
|
+
const o = e.object({
|
|
4
|
+
amount: e.bigint(),
|
|
5
|
+
pricePerUnit: e.bigint()
|
|
6
|
+
}).or(e.object({ maxFee: e.bigint() })), t = e.object({
|
|
7
|
+
feeTokenAddress: i,
|
|
8
|
+
amount: e.bigint(),
|
|
9
|
+
pricePerUnit: e.bigint(),
|
|
10
|
+
max: o.optional(),
|
|
11
|
+
dataGasConsumed: e.bigint().optional(),
|
|
12
|
+
dataGasPrice: e.bigint().optional()
|
|
13
|
+
}), m = e.object({
|
|
14
|
+
deployment: t.optional(),
|
|
15
|
+
transactions: t
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
t as estimatedFeeSchema,
|
|
19
|
+
m as estimatedFeesSchema
|
|
20
|
+
};
|
package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./getMessageFromSimulationError.cjs"),c=require("./schema.cjs"),g=require("../../../transactions/getPrettyRcpError.cjs");function u(o){if(!o)return;const e=o.transactions.flatMap(a=>c.isTransactionSimulationError(a)?a.simulationError:!1),r=e==null?void 0:e[e.length-1];if(!r)return;const n=l.getMessageFromSimulationError(r),s=r.message||r.error,t=g.getPrettyRpcError(s),i=t||r.label;return{message:t?s:n,label:i}}exports.getErrorMessageAndLabelFromSimulation=u;
|
package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getMessageFromSimulationError as m } from "./getMessageFromSimulationError.js";
|
|
2
|
+
import { isTransactionSimulationError as l } from "./schema.js";
|
|
3
|
+
import { getPrettyRpcError as c } from "../../../transactions/getPrettyRcpError.js";
|
|
4
|
+
function E(e) {
|
|
5
|
+
if (!e)
|
|
6
|
+
return;
|
|
7
|
+
const o = e.transactions.flatMap((a) => l(a) ? a.simulationError : !1), r = o == null ? void 0 : o[o.length - 1];
|
|
8
|
+
if (!r)
|
|
9
|
+
return;
|
|
10
|
+
const n = m(r), s = r.message || r.error, t = c(s), i = t || r.label;
|
|
11
|
+
return {
|
|
12
|
+
message: t ? s : n,
|
|
13
|
+
label: i
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
E as getErrorMessageAndLabelFromSimulation
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(e){return e.error?e.error:e.message&&e.code?`${e.code}: ${e.message}`:"Unknown error"}exports.getMessageFromSimulationError=r;
|