@argent/x-shared 1.78.12 → 1.79.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/.ts-temp/tsconfig.tsbuildinfo +1 -1
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/_virtual/_rolldown/runtime.js +20 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +112 -488
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/_shortw_utils.js +11 -11
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/curve.js +62 -85
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/modular.js +153 -190
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/poseidon.js +56 -65
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/utils.js +125 -151
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_curves@1.0.0/node_modules/@noble/curves/esm/abstract/weierstrass.js +470 -575
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js +26 -40
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/crypto.js +4 -4
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/hmac.js +38 -42
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js +28 -42
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_assert.js +17 -26
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_sha2.js +52 -59
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/_u64.js +20 -19
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha256.js +118 -113
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/sha3.js +95 -105
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@1.3.3/node_modules/@noble/hashes/esm/utils.js +26 -32
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_md.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_md.js +71 -82
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_u64.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/_u64.js +20 -20
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha2.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha2.js +125 -124
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha3.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/sha3.js +102 -116
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/@noble_hashes@2.0.0/node_modules/@noble/hashes/utils.js +62 -76
- package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.cjs +1 -1
- package/dist/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +519 -614
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js +15 -19
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js +15 -19
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js +15 -19
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js +10 -12
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.js +6 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.js +6 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js +7 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.js +6 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +9 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js +10 -15
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.js +26 -32
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -4
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js +8 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +12 -13
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js +11 -11
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js +8 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js +9 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js +8 -11
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js +11 -11
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js +7 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js +4 -4
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +4 -4
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js +8 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.js +6 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js +14 -16
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js +5 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js +10 -11
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +6 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.js +4 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.js +6 -6
- package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.cjs +1 -1
- package/dist/node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.js +121 -118
- package/dist/node_modules/.pnpm/numeral@2.0.6/node_modules/numeral/numeral.cjs +1 -1
- package/dist/node_modules/.pnpm/numeral@2.0.6/node_modules/numeral/numeral.js +377 -417
- package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.cjs +1 -1
- package/dist/node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js +546 -635
- package/dist/paymaster.cjs +1 -1
- package/dist/paymaster.js +3 -9
- package/dist/simulation.cjs +1 -1
- package/dist/simulation.js +22 -90
- package/dist/src/account/account.model.cjs +1 -1
- package/dist/src/account/account.model.js +58 -52
- package/dist/src/account/accountv4.cjs +1 -1
- package/dist/src/account/accountv4.js +9 -11
- package/dist/src/account/preferences.model.cjs +1 -1
- package/dist/src/account/preferences.model.js +12 -10
- package/dist/src/accountNameGenerator/colors.cjs +1 -1
- package/dist/src/accountNameGenerator/colors.js +24 -24
- package/dist/src/accountNameGenerator/index.cjs +1 -1
- package/dist/src/accountNameGenerator/index.js +23 -23
- package/dist/src/accountNameGenerator/x-names.json.cjs +1 -1
- package/dist/src/accountNameGenerator/x-names.json.js +1922 -7
- package/dist/src/assets/tokens.json.cjs +1 -1
- package/dist/src/assets/tokens.json.js +180 -180
- package/dist/src/backend/schema.cjs +1 -1
- package/dist/src/backend/schema.js +9 -12
- package/dist/src/backend/sessionKeys/schema.cjs +1 -1
- package/dist/src/backend/sessionKeys/schema.js +27 -30
- package/dist/src/bigdecimal/constants.cjs +1 -1
- package/dist/src/bigdecimal/constants.js +6 -3
- package/dist/src/bigdecimal/createUnitsSchema.cjs +1 -1
- package/dist/src/bigdecimal/createUnitsSchema.js +7 -7
- package/dist/src/bigdecimal/formatUnits.cjs +1 -1
- package/dist/src/bigdecimal/formatUnits.js +9 -10
- package/dist/src/bigdecimal/index.cjs +1 -1
- package/dist/src/bigdecimal/index.js +45 -41
- package/dist/src/bigdecimal/lib.cjs +1 -1
- package/dist/src/bigdecimal/lib.js +105 -117
- package/dist/src/bigdecimal/parseUnits.cjs +1 -1
- package/dist/src/bigdecimal/parseUnits.js +18 -21
- package/dist/src/bigdecimal/utils.cjs +1 -1
- package/dist/src/bigdecimal/utils.js +33 -30
- package/dist/src/cache/CacheService.cjs +1 -1
- package/dist/src/cache/CacheService.js +32 -36
- package/dist/src/chains/starknet/address.cjs +1 -1
- package/dist/src/chains/starknet/address.js +73 -117
- package/dist/src/chains/starknet/addressDomain.cjs +1 -1
- package/dist/src/chains/starknet/addressDomain.js +14 -29
- package/dist/src/chains/starknet/addressInput.cjs +1 -1
- package/dist/src/chains/starknet/addressInput.js +6 -7
- package/dist/src/chains/starknet/argentName.cjs +1 -1
- package/dist/src/chains/starknet/argentName.js +10 -14
- package/dist/src/chains/starknet/cairoVersionSchema.cjs +1 -1
- package/dist/src/chains/starknet/cairoVersionSchema.js +5 -5
- package/dist/src/chains/starknet/constants.cjs +1 -1
- package/dist/src/chains/starknet/constants.js +4 -10
- package/dist/src/chains/starknet/getAddressFromArgentName.cjs +1 -1
- package/dist/src/chains/starknet/getAddressFromArgentName.js +38 -46
- package/dist/src/chains/starknet/getAddressFromStarkName.cjs +1 -1
- package/dist/src/chains/starknet/getAddressFromStarkName.js +59 -66
- package/dist/src/chains/starknet/network.cjs +1 -1
- package/dist/src/chains/starknet/network.js +20 -26
- package/dist/src/chains/starknet/services/address/StarknetAddressService.cjs +1 -1
- package/dist/src/chains/starknet/services/address/StarknetAddressService.js +31 -36
- package/dist/src/chains/starknet/services/deploymentData/constants.cjs +1 -1
- package/dist/src/chains/starknet/services/deploymentData/constants.js +14 -21
- package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.cjs +1 -1
- package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.js +15 -17
- package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs +1 -1
- package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.js +61 -65
- package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.cjs +1 -1
- package/dist/src/chains/starknet/services/deploymentData/getAccountClassHash.js +46 -65
- package/dist/src/chains/starknet/starknetId.cjs +1 -1
- package/dist/src/chains/starknet/starknetId.js +10 -14
- package/dist/src/currencyFetchService/CurrencyFetchService.cjs +1 -1
- package/dist/src/currencyFetchService/CurrencyFetchService.js +13 -18
- package/dist/src/currencyFetchService/types.ts.cjs +1 -1
- package/dist/src/currencyFetchService/types.ts.js +9 -12
- package/dist/src/errors/account.cjs +1 -1
- package/dist/src/errors/account.js +12 -13
- package/dist/src/errors/address.cjs +1 -1
- package/dist/src/errors/address.js +11 -12
- package/dist/src/errors/baseErrors.cjs +1 -1
- package/dist/src/errors/baseErrors.js +14 -14
- package/dist/src/errors/call.cjs +1 -1
- package/dist/src/errors/call.js +12 -13
- package/dist/src/errors/network.cjs +1 -1
- package/dist/src/errors/network.js +11 -12
- package/dist/src/errors/review.cjs +1 -1
- package/dist/src/errors/review.js +11 -12
- package/dist/src/errors/swap.cjs +1 -1
- package/dist/src/errors/swap.js +12 -13
- package/dist/src/features/paymaster/IPaymasterService.d.ts +2 -1
- package/dist/src/features/paymaster/PaymasterService.cjs +1 -1
- package/dist/src/features/paymaster/PaymasterService.d.ts +3 -1
- package/dist/src/features/paymaster/PaymasterService.js +73 -86
- package/dist/src/features/paymaster/types.cjs +1 -1
- package/dist/src/features/paymaster/types.d.ts +20 -2
- package/dist/src/features/paymaster/types.js +41 -39
- package/dist/src/features/simulation/activity/normalize.cjs +1 -1
- package/dist/src/features/simulation/activity/normalize.js +36 -38
- package/dist/src/features/simulation/activity/schema.cjs +1 -1
- package/dist/src/features/simulation/activity/schema.js +224 -250
- package/dist/src/features/simulation/activity/utils/createNativeActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/createNativeActivity.js +23 -27
- package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/getAnyActivityTitle.js +14 -21
- package/dist/src/features/simulation/activity/utils/getOverallLastModified.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/getOverallLastModified.js +5 -5
- package/dist/src/features/simulation/activity/utils/hasDelegationActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/hasDelegationActivity.js +4 -4
- package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isAddMultisigSignersActivity.js +15 -19
- package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.js +15 -19
- package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js +5 -5
- package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isRejectOnChainActivity.js +19 -21
- package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.js +15 -19
- package/dist/src/features/simulation/activity/utils/isSwapActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isSwapActivity.js +17 -18
- package/dist/src/features/simulation/activity/utils/isUpgradeActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/isUpgradeActivity.js +15 -19
- package/dist/src/features/simulation/activity/utils/parseAccountActivities.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/parseAccountActivities.js +12 -12
- package/dist/src/features/simulation/activity/utils/parseFinanceActivities.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/parseFinanceActivities.js +32 -32
- package/dist/src/features/simulation/fees/schema.cjs +1 -1
- package/dist/src/features/simulation/fees/schema.js +33 -47
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +15 -17
- package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/getMessageFromSimulationError.js +5 -5
- package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/schema.js +221 -242
- package/dist/src/features/simulation/warning/helper.cjs +1 -1
- package/dist/src/features/simulation/warning/helper.js +12 -11
- package/dist/src/features/simulation/warning/schema.cjs +1 -1
- package/dist/src/features/simulation/warning/schema.js +10 -11
- package/dist/src/features/swap/models/order.model.cjs +1 -1
- package/dist/src/features/swap/models/order.model.js +16 -19
- package/dist/src/features/swap/models/quote.model.cjs +1 -1
- package/dist/src/features/swap/models/quote.model.js +31 -35
- package/dist/src/features/swap/models/trade.model.cjs +1 -1
- package/dist/src/features/swap/models/trade.model.js +25 -27
- package/dist/src/features/swap/services/SwapSharedService.cjs +1 -1
- package/dist/src/features/swap/services/SwapSharedService.js +71 -75
- package/dist/src/features/swap/services/SwapTransactionService.cjs +1 -1
- package/dist/src/features/swap/services/SwapTransactionService.js +57 -63
- package/dist/src/features/swap/utils/slippage.cjs +1 -1
- package/dist/src/features/swap/utils/slippage.js +18 -25
- package/dist/src/features/swap/utils/totalFee.cjs +1 -1
- package/dist/src/features/swap/utils/totalFee.js +12 -12
- package/dist/src/http/DateService.cjs +1 -1
- package/dist/src/http/DateService.js +15 -18
- package/dist/src/http/HttpError.cjs +1 -1
- package/dist/src/http/HttpError.js +7 -7
- package/dist/src/http/HttpService.cjs +1 -1
- package/dist/src/http/HttpService.js +117 -134
- package/dist/src/http/IHttpService.cjs +1 -1
- package/dist/src/http/IHttpService.js +6 -6
- package/dist/src/http/SWRService.cjs +1 -1
- package/dist/src/http/SWRService.js +50 -57
- package/dist/src/http/fetcher.cjs +1 -1
- package/dist/src/http/fetcher.js +29 -35
- package/dist/src/http/time.cjs +1 -1
- package/dist/src/http/time.js +15 -18
- package/dist/src/knownDapps/KnownDappsBackendService.cjs +1 -1
- package/dist/src/knownDapps/KnownDappsBackendService.js +13 -14
- package/dist/src/knownDapps/schema.cjs +1 -1
- package/dist/src/knownDapps/schema.js +41 -44
- package/dist/src/knownDapps/utils/getDapplandUrl.cjs +1 -1
- package/dist/src/knownDapps/utils/getDapplandUrl.js +7 -8
- package/dist/src/nameResolution/ResolveNameService.cjs +1 -1
- package/dist/src/nameResolution/ResolveNameService.js +34 -41
- package/dist/src/nameResolution/schema.cjs +1 -1
- package/dist/src/nameResolution/schema.js +20 -25
- package/dist/src/nfts/BackendNftService.cjs +1 -1
- package/dist/src/nfts/BackendNftService.js +103 -116
- package/dist/src/nfts/BackendPaginationError.cjs +1 -1
- package/dist/src/nfts/BackendPaginationError.js +11 -12
- package/dist/src/nfts/utils.cjs +1 -1
- package/dist/src/nfts/utils.js +11 -14
- package/dist/src/onchainRecovery/OnchainRecoveryService.cjs +1 -1
- package/dist/src/onchainRecovery/OnchainRecoveryService.js +38 -68
- package/dist/src/onchainRecovery/schema.cjs +1 -1
- package/dist/src/onchainRecovery/schema.js +35 -49
- package/dist/src/platform/isBraveBrowser.cjs +1 -1
- package/dist/src/platform/isBraveBrowser.js +8 -10
- package/dist/src/platform/isBrowser.cjs +1 -1
- package/dist/src/platform/isBrowser.js +17 -22
- package/dist/src/signer/mergeOwnerGuardianSignatures.cjs +1 -1
- package/dist/src/signer/mergeOwnerGuardianSignatures.js +28 -30
- package/dist/src/signer/multisigner.cjs +1 -1
- package/dist/src/signer/multisigner.js +16 -17
- package/dist/src/signer/seedphrase.cjs +1 -1
- package/dist/src/signer/seedphrase.js +7 -7
- package/dist/src/staking/schema.cjs +1 -1
- package/dist/src/staking/schema.js +146 -162
- package/dist/src/storage/base.cjs +1 -1
- package/dist/src/storage/base.js +33 -34
- package/dist/src/storage/utils.cjs +1 -1
- package/dist/src/storage/utils.js +19 -28
- package/dist/src/tokens/balances.cjs +1 -1
- package/dist/src/tokens/balances.js +34 -38
- package/dist/src/tokens/constants.cjs +1 -1
- package/dist/src/tokens/constants.js +4 -4
- package/dist/src/tokens/convertCurrencyValueToTokenAmount.cjs +1 -1
- package/dist/src/tokens/convertCurrencyValueToTokenAmount.js +8 -9
- package/dist/src/tokens/convertTokenAmountToCurrencyValue.cjs +1 -1
- package/dist/src/tokens/convertTokenAmountToCurrencyValue.js +14 -15
- package/dist/src/tokens/convertTokenUnitAmountWithDecimals.cjs +1 -1
- package/dist/src/tokens/convertTokenUnitAmountWithDecimals.js +8 -9
- package/dist/src/tokens/ensureDecimals.cjs +1 -1
- package/dist/src/tokens/ensureDecimals.js +4 -4
- package/dist/src/tokens/getCurrencySymbol.cjs +1 -1
- package/dist/src/tokens/getCurrencySymbol.js +14 -14
- package/dist/src/tokens/isUnlimitedAmount.cjs +1 -1
- package/dist/src/tokens/isUnlimitedAmount.js +5 -5
- package/dist/src/tokens/prettifyCurrencyValue.cjs +1 -1
- package/dist/src/tokens/prettifyCurrencyValue.js +13 -14
- package/dist/src/tokens/prettifyTokenAmount.cjs +1 -1
- package/dist/src/tokens/prettifyTokenAmount.js +22 -22
- package/dist/src/tokens/service/implementation.cjs +1 -1
- package/dist/src/tokens/service/implementation.js +28 -40
- package/dist/src/tokens/service/tokenError.cjs +1 -1
- package/dist/src/tokens/service/tokenError.js +11 -12
- package/dist/src/tokens/service/types/backend.model.cjs +1 -1
- package/dist/src/tokens/service/types/backend.model.js +128 -163
- package/dist/src/tokens/service/types/defiPosition.model.cjs +1 -1
- package/dist/src/tokens/service/types/defiPosition.model.js +83 -99
- package/dist/src/tokens/service/types/defiPositionType.model.cjs +1 -1
- package/dist/src/tokens/service/types/defiPositionType.model.js +9 -9
- package/dist/src/tokens/service/types/unclaimedRewards.model.cjs +1 -1
- package/dist/src/tokens/service/types/unclaimedRewards.model.js +15 -16
- package/dist/src/tokens/service/types/webToken.model.cjs +1 -1
- package/dist/src/tokens/service/types/webToken.model.js +28 -51
- package/dist/src/tokens/utils.cjs +1 -1
- package/dist/src/tokens/utils.js +5 -9
- package/dist/src/transactions/amount.cjs +1 -1
- package/dist/src/transactions/amount.js +17 -24
- package/dist/src/transactions/buildTransactions.cjs +1 -1
- package/dist/src/transactions/buildTransactions.js +30 -33
- package/dist/src/transactions/errors.cjs +1 -1
- package/dist/src/transactions/errors.js +11 -18
- package/dist/src/transactions/estimate/adjustment.cjs +1 -1
- package/dist/src/transactions/estimate/adjustment.js +6 -6
- package/dist/src/transactions/estimate/argentMaxFee.cjs +1 -1
- package/dist/src/transactions/estimate/argentMaxFee.js +10 -13
- package/dist/src/transactions/estimate/error.cjs +1 -1
- package/dist/src/transactions/estimate/error.js +12 -13
- package/dist/src/transactions/estimate/model.cjs +1 -1
- package/dist/src/transactions/estimate/model.js +18 -13
- package/dist/src/transactions/estimate/utils.cjs +1 -1
- package/dist/src/transactions/estimate/utils.js +139 -172
- package/dist/src/transactions/findTransfersAndApprovals.cjs +1 -1
- package/dist/src/transactions/findTransfersAndApprovals.js +34 -30
- package/dist/src/transactions/getPrettyRcpError.cjs +1 -1
- package/dist/src/transactions/getPrettyRcpError.js +8 -10
- package/dist/src/transactions/service/implementation.cjs +1 -1
- package/dist/src/transactions/service/implementation.js +187 -208
- package/dist/src/transactions/service/types.cjs +1 -1
- package/dist/src/transactions/service/types.js +9 -9
- package/dist/src/transactions/service/utils.cjs +1 -1
- package/dist/src/transactions/service/utils.js +24 -25
- package/dist/src/transactions/transactionExecuteTypes.cjs +1 -1
- package/dist/src/transactions/transactionExecuteTypes.js +8 -9
- package/dist/src/transactions/transactionReviewTypes.cjs +1 -1
- package/dist/src/transactions/transactionReviewTypes.js +9 -9
- package/dist/src/transactions/transactionVersion.cjs +1 -1
- package/dist/src/transactions/transactionVersion.js +8 -13
- package/dist/src/transactions/txv3.cjs +1 -1
- package/dist/src/transactions/txv3.js +10 -11
- package/dist/src/utils/address.cjs +1 -1
- package/dist/src/utils/address.js +4 -4
- package/dist/src/utils/arrays.cjs +1 -1
- package/dist/src/utils/arrays.js +4 -4
- package/dist/src/utils/avatarImage.cjs +4 -4
- package/dist/src/utils/avatarImage.js +35 -40
- package/dist/src/utils/base58.cjs +1 -1
- package/dist/src/utils/base58.js +12 -15
- package/dist/src/utils/bigNumber.cjs +1 -1
- package/dist/src/utils/bigNumber.d.ts +1 -1
- package/dist/src/utils/bigNumber.js +5 -7
- package/dist/src/utils/bips.cjs +1 -1
- package/dist/src/utils/bips.js +12 -10
- package/dist/src/utils/daysBetween.cjs +1 -1
- package/dist/src/utils/daysBetween.js +6 -6
- package/dist/src/utils/env.cjs +1 -1
- package/dist/src/utils/env.js +4 -4
- package/dist/src/utils/hex.cjs +1 -1
- package/dist/src/utils/hex.js +7 -8
- package/dist/src/utils/id.cjs +1 -1
- package/dist/src/utils/id.js +7 -7
- package/dist/src/utils/initials.cjs +1 -1
- package/dist/src/utils/initials.js +12 -15
- package/dist/src/utils/isContractDeployed.cjs +1 -1
- package/dist/src/utils/isContractDeployed.js +9 -9
- package/dist/src/utils/nonNullable.cjs +1 -1
- package/dist/src/utils/nonNullable.js +6 -6
- package/dist/src/utils/number/abbreviateNumber.cjs +1 -1
- package/dist/src/utils/number/abbreviateNumber.js +13 -14
- package/dist/src/utils/number/isAllowedAddressHexInputValue.cjs +1 -1
- package/dist/src/utils/number/isAllowedAddressHexInputValue.js +4 -7
- package/dist/src/utils/number/isAllowedNumericInputValue.cjs +1 -1
- package/dist/src/utils/number/isAllowedNumericInputValue.js +5 -5
- package/dist/src/utils/number/isNumeric.cjs +1 -1
- package/dist/src/utils/number/isNumeric.js +4 -4
- package/dist/src/utils/number/prettifyNumber.cjs +1 -1
- package/dist/src/utils/number/prettifyNumber.js +65 -75
- package/dist/src/utils/parseAmount.cjs +1 -1
- package/dist/src/utils/parseAmount.js +10 -11
- package/dist/src/utils/pluralise.cjs +1 -1
- package/dist/src/utils/pluralise.js +4 -4
- package/dist/src/utils/readFileAsString.cjs +1 -1
- package/dist/src/utils/readFileAsString.js +6 -6
- package/dist/src/utils/retryUntilInitialised.cjs +1 -1
- package/dist/src/utils/retryUntilInitialised.js +21 -20
- package/dist/src/utils/schemas.cjs +1 -1
- package/dist/src/utils/schemas.js +29 -26
- package/dist/src/utils/starknet/starknet.cjs +1 -1
- package/dist/src/utils/starknet/starknet.js +64 -77
- package/dist/src/utils/starknet/starknetLibTypes.cjs +1 -1
- package/dist/src/utils/starknet/starknetLibTypes.js +7 -7
- package/dist/src/utils/starknet/starknetSchemas.cjs +1 -1
- package/dist/src/utils/starknet/starknetSchemas.js +84 -99
- package/dist/src/utils/transactions.cjs +1 -1
- package/dist/src/utils/transactions.js +10 -10
- package/dist/src/utils/url/urlWithQuery.cjs +1 -1
- package/dist/src/utils/url/urlWithQuery.js +8 -8
- package/dist/src/utils/voidify.cjs +1 -1
- package/dist/src/utils/voidify.js +7 -7
- package/dist/swap.cjs +1 -1
- package/dist/swap.js +8 -22
- package/package.json +15 -15
- package/dist/_virtual/_commonjsHelpers.cjs +0 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -6
- package/dist/_virtual/numeral.cjs +0 -1
- package/dist/_virtual/numeral.js +0 -7
- package/dist/_virtual/numeral2.cjs +0 -1
- package/dist/_virtual/numeral2.js +0 -4
- package/dist/_virtual/semver.cjs +0 -1
- package/dist/_virtual/semver.js +0 -7
- package/dist/_virtual/semver2.cjs +0 -1
- package/dist/_virtual/semver2.js +0 -4
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/features/simulation/activity/utils/isAddMultisigSignersActivity.ts
|
|
2
|
+
function e(e, r) {
|
|
3
|
+
let i = t(e), a = n(e, r);
|
|
4
|
+
return i || a;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return !1;
|
|
17
|
-
}, r = (t, e) => !!("meta" in t && t.meta?.title?.includes(e("transactionTitle.addMultisigOwner")));
|
|
18
|
-
export {
|
|
19
|
-
a as isAddMultisigSignersActivity
|
|
20
|
-
};
|
|
6
|
+
var t = (e) => {
|
|
7
|
+
if (!e.actions?.length) return !1;
|
|
8
|
+
let t = e.actions[0];
|
|
9
|
+
if (t.name !== "account_multisig_add_signers") return !1;
|
|
10
|
+
if (t.defaultProperties) {
|
|
11
|
+
for (let e of t.defaultProperties) if (e.type === "calldata" && e.entrypoint === "add_signers") return !0;
|
|
12
|
+
}
|
|
13
|
+
return !1;
|
|
14
|
+
}, n = (e, t) => !!("meta" in e && e.meta?.title?.includes(t("transactionTitle.addMultisigOwner")));
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as isAddMultisigSignersActivity };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e,r){let i=t(e),a=n(e,r);return i||a}var t=e=>{if(!e.actions?.length)return!1;let t=e.actions[0];if(t.name!==`account_multisig_change_threshold`)return!1;if(t.defaultProperties){for(let e of t.defaultProperties)if(e.type===`calldata`&&e.entrypoint===`change_threshold`)return!0}return!1},n=(e,t)=>!!(`meta`in e&&e.meta?.title?.includes(t(`transactionTitle.setConfirmations`)));exports.isChangeMultisigThresholdActivity=e;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.ts
|
|
2
|
+
function e(e, r) {
|
|
3
|
+
let i = t(e), a = n(e, r);
|
|
4
|
+
return i || a;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return !1;
|
|
17
|
-
}, r = (e, t) => !!("meta" in e && e.meta?.title?.includes(t("transactionTitle.setConfirmations")));
|
|
18
|
-
export {
|
|
19
|
-
a as isChangeMultisigThresholdActivity
|
|
20
|
-
};
|
|
6
|
+
var t = (e) => {
|
|
7
|
+
if (!e.actions?.length) return !1;
|
|
8
|
+
let t = e.actions[0];
|
|
9
|
+
if (t.name !== "account_multisig_change_threshold") return !1;
|
|
10
|
+
if (t.defaultProperties) {
|
|
11
|
+
for (let e of t.defaultProperties) if (e.type === "calldata" && e.entrypoint === "change_threshold") return !0;
|
|
12
|
+
}
|
|
13
|
+
return !1;
|
|
14
|
+
}, n = (e, t) => !!("meta" in e && e.meta?.title?.includes(t("transactionTitle.setConfirmations")));
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as isChangeMultisigThresholdActivity };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`../../../../chains/starknet/address.cjs`);var t=t=>t.type===`multicall`&&`calls`in t.details&&t.details.calls?.some(n=>n?.details?.type===`deploy`&&e.isEqualAddress(n?.details.contractAddress||``,t.wallet));exports.isMulticallWithDeploymentActivity=t;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isEqualAddress as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
1
|
+
import { isEqualAddress as e } from "../../../../chains/starknet/address.js";
|
|
2
|
+
//#region src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.ts
|
|
3
|
+
var t = (t) => t.type === "multicall" && "calls" in t.details && t.details.calls?.some((n) => n?.details?.type === "deploy" && e(n?.details.contractAddress || "", t.wallet));
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as isMulticallWithDeploymentActivity };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`../../../../chains/starknet/address.cjs`);require(`../../../../chains/starknet/constants.cjs`);function t(e){let t=n(e),i=r(e);return t||i}var n=t=>{if(!t.actions?.length)return!1;let n=t.actions[0];if(n.name!==`ERC20_transfer`)return!1;let r,i,a,o;return n.defaultProperties&&n.defaultProperties.forEach(e=>{e.type===`token_address`&&e.token.address===`0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7`&&(i=!0),e.type===`calldata`&&(r=e.calldata[0])}),n.properties.length>1&&n.properties.forEach(t=>{t.type===`amount`&&t.label===`ERC20_transfer_amount`&&t.amount===`0`&&(a=!0),t.type===`address`&&t.label===`ERC20_transfer_recipient`&&e.isEqualAddress(t.address,r)&&(o=!0)}),i&&a&&o},r=e=>!!(`meta`in e&&e.meta?.title?.includes(`On-chain rejection`));exports.isRejectOnChainActivity=t;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { isEqualAddress as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { isEqualAddress as e } from "../../../../chains/starknet/address.js";
|
|
2
|
+
import "../../../../chains/starknet/constants.js";
|
|
3
|
+
//#region src/features/simulation/activity/utils/isRejectOnChainActivity.ts
|
|
4
|
+
function t(e) {
|
|
5
|
+
let t = n(e), i = r(e);
|
|
6
|
+
return t || i;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
R as isRejectOnChainActivity
|
|
22
|
-
};
|
|
8
|
+
var n = (t) => {
|
|
9
|
+
if (!t.actions?.length) return !1;
|
|
10
|
+
let n = t.actions[0];
|
|
11
|
+
if (n.name !== "ERC20_transfer") return !1;
|
|
12
|
+
let r, i, a, o;
|
|
13
|
+
return n.defaultProperties && n.defaultProperties.forEach((e) => {
|
|
14
|
+
e.type === "token_address" && e.token.address === "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7" && (i = !0), e.type === "calldata" && (r = e.calldata[0]);
|
|
15
|
+
}), n.properties.length > 1 && n.properties.forEach((t) => {
|
|
16
|
+
t.type === "amount" && t.label === "ERC20_transfer_amount" && t.amount === "0" && (a = !0), t.type === "address" && t.label === "ERC20_transfer_recipient" && e(t.address, r) && (o = !0);
|
|
17
|
+
}), i && a && o;
|
|
18
|
+
}, r = (e) => !!("meta" in e && e.meta?.title?.includes("On-chain rejection"));
|
|
19
|
+
//#endregion
|
|
20
|
+
export { t as isRejectOnChainActivity };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e,r){let i=t(e),a=n(e,r);return i||a}var t=e=>{if(!e.actions?.length)return!1;let t=e.actions[0];if(t.name!==`account_multisig_remove_signers`)return!1;if(t.defaultProperties){for(let e of t.defaultProperties)if(e.type===`calldata`&&e.entrypoint===`remove_signers`)return!0}return!1},n=(e,t)=>!!(`meta`in e&&e.meta?.title?.includes(t(`transactionTitle.removeOwner`)));exports.isRemoveMultisigSignersActivity=e;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.ts
|
|
2
|
+
function e(e, r) {
|
|
3
|
+
let i = t(e), a = n(e, r);
|
|
4
|
+
return i || a;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return !1;
|
|
17
|
-
}, r = (e, t) => !!("meta" in e && e.meta?.title?.includes(t("transactionTitle.removeOwner")));
|
|
18
|
-
export {
|
|
19
|
-
o as isRemoveMultisigSignersActivity
|
|
20
|
-
};
|
|
6
|
+
var t = (e) => {
|
|
7
|
+
if (!e.actions?.length) return !1;
|
|
8
|
+
let t = e.actions[0];
|
|
9
|
+
if (t.name !== "account_multisig_remove_signers") return !1;
|
|
10
|
+
if (t.defaultProperties) {
|
|
11
|
+
for (let e of t.defaultProperties) if (e.type === "calldata" && e.entrypoint === "remove_signers") return !0;
|
|
12
|
+
}
|
|
13
|
+
return !1;
|
|
14
|
+
}, n = (e, t) => !!("meta" in e && e.meta?.title?.includes(t("transactionTitle.removeOwner")));
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as isRemoveMultisigSignersActivity };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e,r){let i=t(e),a=n(e,r);return i||a}var t=e=>{if(!e.actions?.length)return!1;let t=[`multi_route_swap`,`Jediswap_swap`,`Avnu_swap`,`multi_multihop_swap`,`swap`];return e.actions.some(e=>!t.includes(e.name)||!e.defaultProperties?!1:e.defaultProperties.some(e=>e.type===`calldata`&&e.entrypoint?.toLowerCase().includes(`swap`)))},n=(e,t)=>!!(`meta`in e&&e.meta?.title?.includes(t(`transactionTitle.swap`)));exports.isSwapActivity=e;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/features/simulation/activity/utils/isSwapActivity.ts
|
|
2
|
+
function e(e, r) {
|
|
3
|
+
let i = t(e), a = n(e, r);
|
|
4
|
+
return i || a;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
u as isSwapActivity
|
|
19
|
-
};
|
|
6
|
+
var t = (e) => {
|
|
7
|
+
if (!e.actions?.length) return !1;
|
|
8
|
+
let t = [
|
|
9
|
+
"multi_route_swap",
|
|
10
|
+
"Jediswap_swap",
|
|
11
|
+
"Avnu_swap",
|
|
12
|
+
"multi_multihop_swap",
|
|
13
|
+
"swap"
|
|
14
|
+
];
|
|
15
|
+
return e.actions.some((e) => !t.includes(e.name) || !e.defaultProperties ? !1 : e.defaultProperties.some((e) => e.type === "calldata" && e.entrypoint?.toLowerCase().includes("swap")));
|
|
16
|
+
}, n = (e, t) => !!("meta" in e && e.meta?.title?.includes(t("transactionTitle.swap")));
|
|
17
|
+
//#endregion
|
|
18
|
+
export { e as isSwapActivity };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e,r){let i=t(e),a=n(e,r);return i||a}var t=e=>{if(!e.actions?.length)return!1;let t=e.actions[0];if(t.name!==`account_upgrade`)return!1;if(t.defaultProperties){for(let e of t.defaultProperties)if(e.type===`calldata`&&e.entrypoint===`upgrade`)return!0}return!1},n=(e,t)=>!!(`meta`in e&&e.meta?.title?.includes(t(`accountUpgrade.upgradeAccount`)));exports.isUpgradeActivity=e;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/features/simulation/activity/utils/isUpgradeActivity.ts
|
|
2
|
+
function e(e, r) {
|
|
3
|
+
let i = t(e), a = n(e, r);
|
|
4
|
+
return i || a;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return !1;
|
|
17
|
-
}, s = (e, t) => !!("meta" in e && e.meta?.title?.includes(t("accountUpgrade.upgradeAccount")));
|
|
18
|
-
export {
|
|
19
|
-
i as isUpgradeActivity
|
|
20
|
-
};
|
|
6
|
+
var t = (e) => {
|
|
7
|
+
if (!e.actions?.length) return !1;
|
|
8
|
+
let t = e.actions[0];
|
|
9
|
+
if (t.name !== "account_upgrade") return !1;
|
|
10
|
+
if (t.defaultProperties) {
|
|
11
|
+
for (let e of t.defaultProperties) if (e.type === "calldata" && e.entrypoint === "upgrade") return !0;
|
|
12
|
+
}
|
|
13
|
+
return !1;
|
|
14
|
+
}, n = (e, t) => !!("meta" in e && e.meta?.title?.includes(t("accountUpgrade.upgradeAccount")));
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as isUpgradeActivity };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`../../../../chains/starknet/address.cjs`),t=require(`../../../../utils/arrays.cjs`),n=require(`./isMulticallWithDeploymentActivity.cjs`);function r({activities:r,accountAddressesOnNetwork:i}){let a={};return r.forEach(r=>{let o=r.wallet,s=r.type===`deploy`?r.type:r.details.type===`security`?r.details.action:void 0;r.group===`security`&&e.includesAddress(o,i)&&s&&(a[s]=a[s]||[],e.includesAddress(o,a[s])||(a[s]=t.ensureArray(a[s]).concat(o))),n.isMulticallWithDeploymentActivity(r)&&(a.deploy=t.ensureArray(a.deploy).concat(o))}),a}exports.parseAccountActivities=r;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { includesAddress as e } from "../../../../chains/starknet/address.js";
|
|
2
|
+
import { ensureArray as t } from "../../../../utils/arrays.js";
|
|
3
|
+
import { isMulticallWithDeploymentActivity as n } from "./isMulticallWithDeploymentActivity.js";
|
|
4
|
+
//#region src/features/simulation/activity/utils/parseAccountActivities.ts
|
|
5
|
+
function r({ activities: r, accountAddressesOnNetwork: i }) {
|
|
6
|
+
let a = {};
|
|
7
|
+
return r.forEach((r) => {
|
|
8
|
+
let o = r.wallet, s = r.type === "deploy" ? r.type : r.details.type === "security" ? r.details.action : void 0;
|
|
9
|
+
r.group === "security" && e(o, i) && s && (a[s] = a[s] || [], e(o, a[s]) || (a[s] = t(a[s]).concat(o))), n(r) && (a.deploy = t(a.deploy).concat(o));
|
|
10
|
+
}), a;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { r as parseAccountActivities };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`../../../../chains/starknet/address.cjs`);function t({activities:t,accountAddressesOnNetwork:n,tokenAddressesOnNetwork:r}){let i={tokenActivity:{accountAddresses:[],tokenAddresses:[],newTokenAddresses:[]},nftActivity:{accountAddresses:[],tokenAddresses:[]}};return t.forEach(t=>{if(t.group===`finance`&&t.relatedAddresses){let a=t.transfers.some(e=>e.asset.type===`token`);t.relatedAddresses.forEach(({type:t,address:o})=>{t===`token`?e.includesAddress(o,r)&&(e.includesAddress(o,i.tokenActivity.tokenAddresses)||i.tokenActivity.tokenAddresses.push(o)):t===`wallet`&&e.includesAddress(o,n)&&(a?e.includesAddress(o,i.tokenActivity.accountAddresses)||i.tokenActivity.accountAddresses.push(o):e.includesAddress(o,i.nftActivity.accountAddresses)||i.nftActivity.accountAddresses.push(o))}),t.transfers.forEach(t=>{if(t.asset.type===`token`){let n=t.asset.tokenAddress;!e.includesAddress(n,r)&&!e.includesAddress(n,i.tokenActivity.newTokenAddresses)&&i.tokenActivity.newTokenAddresses.push(n)}else if(t.asset.type===`nft`){let n=t.asset.tokenAddress;e.includesAddress(n,i.nftActivity.tokenAddresses)||i.nftActivity.tokenAddresses.push(n)}})}}),i}exports.parseFinanceActivities=t;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { includesAddress as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { includesAddress as e } from "../../../../chains/starknet/address.js";
|
|
2
|
+
//#region src/features/simulation/activity/utils/parseFinanceActivities.ts
|
|
3
|
+
function t({ activities: t, accountAddressesOnNetwork: n, tokenAddressesOnNetwork: r }) {
|
|
4
|
+
let i = {
|
|
5
|
+
tokenActivity: {
|
|
6
|
+
accountAddresses: [],
|
|
7
|
+
tokenAddresses: [],
|
|
8
|
+
newTokenAddresses: []
|
|
9
|
+
},
|
|
10
|
+
nftActivity: {
|
|
11
|
+
accountAddresses: [],
|
|
12
|
+
tokenAddresses: []
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
return t.forEach((t) => {
|
|
16
|
+
if (t.group === "finance" && t.relatedAddresses) {
|
|
17
|
+
let a = t.transfers.some((e) => e.asset.type === "token");
|
|
18
|
+
t.relatedAddresses.forEach(({ type: t, address: o }) => {
|
|
19
|
+
t === "token" ? e(o, r) && (e(o, i.tokenActivity.tokenAddresses) || i.tokenActivity.tokenAddresses.push(o)) : t === "wallet" && e(o, n) && (a ? e(o, i.tokenActivity.accountAddresses) || i.tokenActivity.accountAddresses.push(o) : e(o, i.nftActivity.accountAddresses) || i.nftActivity.accountAddresses.push(o));
|
|
20
|
+
}), t.transfers.forEach((t) => {
|
|
21
|
+
if (t.asset.type === "token") {
|
|
22
|
+
let n = t.asset.tokenAddress;
|
|
23
|
+
!e(n, r) && !e(n, i.tokenActivity.newTokenAddresses) && i.tokenActivity.newTokenAddresses.push(n);
|
|
24
|
+
} else if (t.asset.type === "nft") {
|
|
25
|
+
let n = t.asset.tokenAddress;
|
|
26
|
+
e(n, i.nftActivity.tokenAddresses) || i.nftActivity.tokenAddresses.push(n);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}), i;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { t as parseFinanceActivities };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../chains/starknet/address.cjs`);let t=require(`zod`);var n=t.z.object({gasConsumed:t.z.bigint(),gasPrice:t.z.bigint()}),r=t.z.object({type:t.z.literal(`native`),feeTokenAddress:e.addressSchema,l1Gas:n,l2Gas:n,l1DataGas:n,overallFee:t.z.bigint().optional(),tip:t.z.bigint().optional()}),i=t.z.object({type:t.z.literal(`paymaster`),feeTokenAddress:e.addressSchema,maxFee:t.z.bigint(),overallFee:t.z.bigint(),tip:t.z.bigint().optional()}),a=t.z.discriminatedUnion(`type`,[r,i]),o=t.z.object({type:t.z.literal(`native`),transactions:r.omit({type:!0}),deployment:r.omit({type:!0}).optional()}),s=t.z.object({type:t.z.literal(`paymaster`),transactions:i.omit({type:!0}),deployment:i.omit({type:!0}).optional()}),c=t.z.discriminatedUnion(`type`,[o,s]),l=t.z.object({native:o.omit({type:!0}),paymaster:s.omit({type:!0}).optional()});exports.estimatedFeeSchema=a,exports.estimatedFeesSchema=c,exports.feeEstimationResultSchema=l,exports.nativeEstimatedFeeSchema=r,exports.nativeEstimatedFeesSchema=o,exports.paymasterEstimatedFeeSchema=i,exports.paymasterEstimatedFeesSchema=s,exports.resourceBoundsSchema=n;
|
|
@@ -1,48 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}), i =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}), c = e.discriminatedUnion("type", [
|
|
33
|
-
s,
|
|
34
|
-
n
|
|
35
|
-
]), l = e.object({
|
|
36
|
-
native: s.omit({ type: !0 }),
|
|
37
|
-
paymaster: n.omit({ type: !0 }).optional()
|
|
1
|
+
import { addressSchema as e } from "../../../chains/starknet/address.js";
|
|
2
|
+
import { z as t } from "zod";
|
|
3
|
+
//#region src/features/simulation/fees/schema.ts
|
|
4
|
+
var n = t.object({
|
|
5
|
+
gasConsumed: t.bigint(),
|
|
6
|
+
gasPrice: t.bigint()
|
|
7
|
+
}), r = t.object({
|
|
8
|
+
type: t.literal("native"),
|
|
9
|
+
feeTokenAddress: e,
|
|
10
|
+
l1Gas: n,
|
|
11
|
+
l2Gas: n,
|
|
12
|
+
l1DataGas: n,
|
|
13
|
+
overallFee: t.bigint().optional(),
|
|
14
|
+
tip: t.bigint().optional()
|
|
15
|
+
}), i = t.object({
|
|
16
|
+
type: t.literal("paymaster"),
|
|
17
|
+
feeTokenAddress: e,
|
|
18
|
+
maxFee: t.bigint(),
|
|
19
|
+
overallFee: t.bigint(),
|
|
20
|
+
tip: t.bigint().optional()
|
|
21
|
+
}), a = t.discriminatedUnion("type", [r, i]), o = t.object({
|
|
22
|
+
type: t.literal("native"),
|
|
23
|
+
transactions: r.omit({ type: !0 }),
|
|
24
|
+
deployment: r.omit({ type: !0 }).optional()
|
|
25
|
+
}), s = t.object({
|
|
26
|
+
type: t.literal("paymaster"),
|
|
27
|
+
transactions: i.omit({ type: !0 }),
|
|
28
|
+
deployment: i.omit({ type: !0 }).optional()
|
|
29
|
+
}), c = t.discriminatedUnion("type", [o, s]), l = t.object({
|
|
30
|
+
native: o.omit({ type: !0 }),
|
|
31
|
+
paymaster: s.omit({ type: !0 }).optional()
|
|
38
32
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
c as estimatedFeesSchema,
|
|
42
|
-
l as feeEstimationResultSchema,
|
|
43
|
-
a as nativeEstimatedFeeSchema,
|
|
44
|
-
s as nativeEstimatedFeesSchema,
|
|
45
|
-
i as paymasterEstimatedFeeSchema,
|
|
46
|
-
n as paymasterEstimatedFeesSchema,
|
|
47
|
-
t as resourceBoundsSchema
|
|
48
|
-
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { a as estimatedFeeSchema, c as estimatedFeesSchema, l as feeEstimationResultSchema, r as nativeEstimatedFeeSchema, o as nativeEstimatedFeesSchema, i as paymasterEstimatedFeeSchema, s as paymasterEstimatedFeesSchema, n as resourceBoundsSchema };
|
package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`../../../transactions/getPrettyRcpError.cjs`),t=require(`./getMessageFromSimulationError.cjs`),n=require(`./schema.cjs`);function r(r){if(!r)return;let i=r.transactions?.flatMap(e=>n.isTransactionSimulationError(e)?e.simulationError:!1),a=i?.[i.length-1];if(!a)return;let o=t.getMessageFromSimulationError(a),s=a.message||a.error,c=e.getPrettyRpcError(s),l=c||a.label;return{message:c?s||`Unknown RPC error`:o,label:l}}exports.getErrorMessageAndLabelFromSimulation=r;
|
package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
1
|
+
import { getPrettyRpcError as e } from "../../../transactions/getPrettyRcpError.js";
|
|
2
|
+
import { getMessageFromSimulationError as t } from "./getMessageFromSimulationError.js";
|
|
3
|
+
import { isTransactionSimulationError as n } from "./schema.js";
|
|
4
|
+
//#region src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.ts
|
|
5
|
+
function r(r) {
|
|
6
|
+
if (!r) return;
|
|
7
|
+
let i = r.transactions?.flatMap((e) => n(e) ? e.simulationError : !1), a = i?.[i.length - 1];
|
|
8
|
+
if (!a) return;
|
|
9
|
+
let o = t(a), s = a.message || a.error, c = e(s), l = c || a.label;
|
|
10
|
+
return {
|
|
11
|
+
message: c ? s || "Unknown RPC error" : o,
|
|
12
|
+
label: l
|
|
13
|
+
};
|
|
15
14
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { r as getErrorMessageAndLabelFromSimulation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e){return e.error?e.error:e.message&&e.code?`${e.code}: ${e.message}`:`Unknown transaction simulation error`}exports.getMessageFromSimulationError=e;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/features/simulation/transactionReview/getMessageFromSimulationError.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e.error ? e.error : e.message && e.code ? `${e.code}: ${e.message}` : "Unknown transaction simulation error";
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
5
|
+
//#endregion
|
|
6
|
+
export { e as getMessageFromSimulationError };
|