@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,60 @@
|
|
|
1
|
+
import { HttpError as r } from "./HttpError.js";
|
|
2
|
+
const o = (a) => {
|
|
3
|
+
process.env.NODE_ENV;
|
|
4
|
+
};
|
|
5
|
+
function h(a, e) {
|
|
6
|
+
const s = a.clone(), t = new Headers(s.headers);
|
|
7
|
+
for (const [n, i] of Object.entries(e))
|
|
8
|
+
t.set(n, i);
|
|
9
|
+
return new Response(s.body, {
|
|
10
|
+
status: s.status,
|
|
11
|
+
statusText: a.statusText,
|
|
12
|
+
headers: t
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
class p {
|
|
16
|
+
constructor(e, s, t, n) {
|
|
17
|
+
this.dateService = e, this.cacheService = s, this.httpService = t, this.options = n, this.inFlightRequests = /* @__PURE__ */ new Map();
|
|
18
|
+
}
|
|
19
|
+
async rawGet(e, s) {
|
|
20
|
+
try {
|
|
21
|
+
const t = await this.cacheService.get(e), n = await this.dateService.now(), i = new Date(t.headers.get("date") || ""), c = n.getTime() - i.getTime();
|
|
22
|
+
if (c < this.options.freshFor)
|
|
23
|
+
return o("🟢 [SWR] Using fresh cache"), t;
|
|
24
|
+
if (c < this.options.staleFor)
|
|
25
|
+
return this.fetchAndCache(e, s), o("🟠 [SWR] Revalidating cache"), t;
|
|
26
|
+
throw new Error("Cache too old");
|
|
27
|
+
} catch (t) {
|
|
28
|
+
if (t instanceof r)
|
|
29
|
+
throw t;
|
|
30
|
+
return o(), await this.fetchAndCache(e, s);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
async get(e, s) {
|
|
34
|
+
const t = await this.rawGet(e, s);
|
|
35
|
+
return this.parseResponse(t);
|
|
36
|
+
}
|
|
37
|
+
async fetchAndCache(e, s) {
|
|
38
|
+
const t = this.inFlightRequests.get(e);
|
|
39
|
+
if (!t) {
|
|
40
|
+
const n = this.httpService.get(e, s).then(async (i) => {
|
|
41
|
+
const c = await this.dateService.now();
|
|
42
|
+
return await this.cacheService.set(e, h(i, {
|
|
43
|
+
date: c.toUTCString()
|
|
44
|
+
})), i;
|
|
45
|
+
}).finally(() => {
|
|
46
|
+
this.inFlightRequests.delete(e);
|
|
47
|
+
});
|
|
48
|
+
return this.inFlightRequests.set(e, n), n;
|
|
49
|
+
}
|
|
50
|
+
return o(), t;
|
|
51
|
+
}
|
|
52
|
+
parseResponse(e) {
|
|
53
|
+
if (e.ok)
|
|
54
|
+
return e.json();
|
|
55
|
+
throw new r(e.statusText, e.status);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
p as SWRService
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=(o,e,t)=>{const r=new Error(o);r.name="FetcherError",r.url=e.url,r.status=e.status,r.statusText=e.statusText,r.responseText=t;try{const s=JSON.parse(t);r.responseJson=s}catch{}return r},n=async(o,e)=>{const t=await fetch(o,e),r=await t.text();if(!t.ok)throw c("An error occurred while fetching",t,r);try{return JSON.parse(r)}catch{throw c("An error occurred while parsing",t,r)}},a=async(o,e)=>{const t=await fetch(o,{method:"POST",...e}),r=await t.text();if(!t.ok)throw c("An error occurred while fetching",t,r);try{return JSON.parse(r)}catch{throw c("An error occurred while parsing",t,r)}};exports.fetchData=n;exports.fetcherError=c;exports.postData=a;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const n = (o, e, t) => {
|
|
2
|
+
const r = new Error(o);
|
|
3
|
+
r.name = "FetcherError", r.url = e.url, r.status = e.status, r.statusText = e.statusText, r.responseText = t;
|
|
4
|
+
try {
|
|
5
|
+
const s = JSON.parse(t);
|
|
6
|
+
r.responseJson = s;
|
|
7
|
+
} catch {
|
|
8
|
+
}
|
|
9
|
+
return r;
|
|
10
|
+
}, c = async (o, e) => {
|
|
11
|
+
const t = await fetch(o, e), r = await t.text();
|
|
12
|
+
if (!t.ok)
|
|
13
|
+
throw n("An error occurred while fetching", t, r);
|
|
14
|
+
try {
|
|
15
|
+
return JSON.parse(r);
|
|
16
|
+
} catch {
|
|
17
|
+
throw n("An error occurred while parsing", t, r);
|
|
18
|
+
}
|
|
19
|
+
}, a = async (o, e) => {
|
|
20
|
+
const t = await fetch(o, {
|
|
21
|
+
method: "POST",
|
|
22
|
+
...e
|
|
23
|
+
}), r = await t.text();
|
|
24
|
+
if (!t.ok)
|
|
25
|
+
throw n("An error occurred while fetching", t, r);
|
|
26
|
+
try {
|
|
27
|
+
return JSON.parse(r);
|
|
28
|
+
} catch {
|
|
29
|
+
throw n("An error occurred while parsing", t, r);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
c as fetchData,
|
|
34
|
+
n as fetcherError,
|
|
35
|
+
a as postData
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("url-join"),o=require("./fetcher.cjs"),c=async(t,r)=>{try{const{time:e}=await o.fetchData(n(t,"time"),{headers:r});return e}catch{throw new Error("failed to request time")}},a=async(t,r)=>{const e=await c(t,r);return Math.floor(e)};exports.getBackendTimeNowSeconds=a;exports.getBackendTimeSeconds=c;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import o from "url-join";
|
|
2
|
+
import { fetchData as n } from "./fetcher.js";
|
|
3
|
+
const a = async (t, r) => {
|
|
4
|
+
try {
|
|
5
|
+
const { time: e } = await n(o(t, "time"), {
|
|
6
|
+
headers: r
|
|
7
|
+
});
|
|
8
|
+
return e;
|
|
9
|
+
} catch {
|
|
10
|
+
throw new Error("failed to request time");
|
|
11
|
+
}
|
|
12
|
+
}, s = async (t, r) => {
|
|
13
|
+
const e = await a(t, r);
|
|
14
|
+
return Math.floor(e);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
s as getBackendTimeNowSeconds,
|
|
18
|
+
a as getBackendTimeSeconds
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './account';
|
|
2
|
+
export * from './backend';
|
|
3
|
+
export * as bigDecimal from './bigdecimal';
|
|
4
|
+
export * from './cache';
|
|
5
|
+
export * from './chains';
|
|
6
|
+
export * from './errors/baseErrors';
|
|
7
|
+
export * from './http';
|
|
8
|
+
export * from './knownDapps';
|
|
9
|
+
export * from './nameResolution';
|
|
10
|
+
export * from './nfts';
|
|
11
|
+
export * from './onchainRecovery';
|
|
12
|
+
export * from './platform';
|
|
13
|
+
export * from './signer';
|
|
14
|
+
export * from './tokens';
|
|
15
|
+
export * from './transactions';
|
|
16
|
+
export * from './utils';
|
|
17
|
+
export type { BigDecimal } from './bigdecimal/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./schema.cjs"),a=require("../http/HttpService.cjs");class r{constructor(s,e){this.apiBase=s,this.httpService=new a.HTTPService(e,"json")}async getAll(){const s=await this.httpService.get(`${this.apiBase}/tokens/dapps`),e=t.knownDappsSchema.safeParse(s);if(!e.success)throw new Error("Failed to parse known dapps");return e.data}}exports.KnownDappsBackendService=r;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { knownDappsSchema as t } from "./schema.js";
|
|
2
|
+
import { HTTPService as a } from "../http/HttpService.js";
|
|
3
|
+
class n {
|
|
4
|
+
constructor(s, e) {
|
|
5
|
+
this.apiBase = s, this.httpService = new a(e, "json");
|
|
6
|
+
}
|
|
7
|
+
async getAll() {
|
|
8
|
+
const s = await this.httpService.get(`${this.apiBase}/tokens/dapps`), e = t.safeParse(s);
|
|
9
|
+
if (!e.success)
|
|
10
|
+
throw new Error("Failed to parse known dapps");
|
|
11
|
+
return e.data;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
n as KnownDappsBackendService
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("zod"),e=require("../chains/starknet/address.cjs"),o=a.z.object({name:a.z.enum(["dappland","discord","github","telegram","twitter","website"]),url:a.z.string(),position:a.z.number()}),n=a.z.object({address:e.addressSchemaArgentBackend,chain:a.z.enum(["ethereum","starknet"])}),r=a.z.object({maxExpiryDays:a.z.number().positive(),allowList:a.z.array(a.z.object({contractAddress:e.addressSchemaArgentBackend,methods:a.z.array(a.z.string())}))}),t=a.z.object({dappId:a.z.string(),name:a.z.string(),description:a.z.string().optional(),logoUrl:a.z.string().optional(),dappUrl:a.z.string().optional(),inAppBrowserCompatible:a.z.boolean(),argentVerified:a.z.boolean(),links:a.z.array(o).optional(),contracts:a.z.array(n).optional(),categories:a.z.array(a.z.string()).optional(),supportedApps:a.z.array(a.z.string()).optional(),brandColor:a.z.string().optional(),executeFromOutsideAllowed:a.z.boolean().default(!1).optional(),sessionConfig:a.z.union([r,a.z.object({})]).nullable().optional()}),s=a.z.array(t);exports.dappContractSchema=n;exports.dappLinkSchema=o;exports.knownDappSchema=t;exports.knownDappsSchema=s;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z as o } from "zod";
|
|
2
|
+
import { addressSchemaArgentBackend as a } from "../chains/starknet/address.js";
|
|
3
|
+
const t = o.object({
|
|
4
|
+
name: o.enum([
|
|
5
|
+
"dappland",
|
|
6
|
+
"discord",
|
|
7
|
+
"github",
|
|
8
|
+
"telegram",
|
|
9
|
+
"twitter",
|
|
10
|
+
"website"
|
|
11
|
+
]),
|
|
12
|
+
url: o.string(),
|
|
13
|
+
position: o.number()
|
|
14
|
+
}), n = o.object({
|
|
15
|
+
address: a,
|
|
16
|
+
chain: o.enum(["ethereum", "starknet"])
|
|
17
|
+
}), e = o.object({
|
|
18
|
+
maxExpiryDays: o.number().positive(),
|
|
19
|
+
allowList: o.array(o.object({
|
|
20
|
+
contractAddress: a,
|
|
21
|
+
methods: o.array(o.string())
|
|
22
|
+
}))
|
|
23
|
+
}), r = o.object({
|
|
24
|
+
dappId: o.string(),
|
|
25
|
+
name: o.string(),
|
|
26
|
+
description: o.string().optional(),
|
|
27
|
+
logoUrl: o.string().optional(),
|
|
28
|
+
dappUrl: o.string().optional(),
|
|
29
|
+
inAppBrowserCompatible: o.boolean(),
|
|
30
|
+
argentVerified: o.boolean(),
|
|
31
|
+
links: o.array(t).optional(),
|
|
32
|
+
contracts: o.array(n).optional(),
|
|
33
|
+
categories: o.array(o.string()).optional(),
|
|
34
|
+
supportedApps: o.array(o.string()).optional(),
|
|
35
|
+
brandColor: o.string().optional(),
|
|
36
|
+
executeFromOutsideAllowed: o.boolean().default(!1).optional(),
|
|
37
|
+
sessionConfig: o.union([e, o.object({})]).nullable().optional()
|
|
38
|
+
}), p = o.array(r);
|
|
39
|
+
export {
|
|
40
|
+
n as dappContractSchema,
|
|
41
|
+
t as dappLinkSchema,
|
|
42
|
+
r as knownDappSchema,
|
|
43
|
+
p as knownDappsSchema
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(n){var r;return(r=n==null?void 0:n.links)==null?void 0:r.find(t=>t.name==="dappland")}function a(n){var r;return(r=e(n))==null?void 0:r.url}exports.getDapplandLinkForDapp=e;exports.getDapplandUrlForDapp=a;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function e(n) {
|
|
2
|
+
var r;
|
|
3
|
+
return (r = n == null ? void 0 : n.links) == null ? void 0 : r.find((t) => t.name === "dappland");
|
|
4
|
+
}
|
|
5
|
+
function l(n) {
|
|
6
|
+
var r;
|
|
7
|
+
return (r = e(n)) == null ? void 0 : r.url;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
e as getDapplandLinkForDapp,
|
|
11
|
+
l as getDapplandUrlForDapp
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("url-join"),c=require("./schema.cjs"),u=require("../http/HttpService.cjs");class h{constructor(s,r){this.apiBase=s,this.headers=r,this.httpService=new u.HTTPService(this.headers,"json")}async getAddressFromMultipleStarknetId(s,r,t){const e=new URLSearchParams(r.map(d=>["domain",d]));t&&e.set("includeAvatar","true");const n=o(this.apiBase,s,"starknet.id",`?${e}`),a=await this.httpService.get(n),i=c.nameResolutionStarknetIdsSchema.safeParse(a);if(!i.success)throw new Error("Failed to parse name resolution");return i.data}async getAddressFromStarknetId(s,r,t){const e=o(this.apiBase,s,"starknet.id",r,t?"?includeAvatar=true":""),n=await this.httpService.get(e),a=c.nameResolutionStarknetIdSchema.safeParse(n);if(!a.success)throw new Error("Failed to parse name resolution");return a.data}async getStarknetIdFromAddress(s,r,t){const e=new URLSearchParams(r.map(d=>["address",d]));t&&e.set("includeAvatar","true");const n=o(this.apiBase,s,"addresses",`?${e}`),a=await this.httpService.get(n),i=c.nameResolutionAddressesSchema.safeParse(a);if(!i.success)throw new Error("Failed to parse name resolution");return i.data}async getProvidersNames(s){const r=o(this.apiBase,s,"providers","name"),t=await this.httpService.get(r),e=c.providersNamesSchema.safeParse(t);if(!e.success)throw new Error("Failed to parse name resolution");return e.data}}exports.ResolveNameService=h;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import i from "url-join";
|
|
2
|
+
import { nameResolutionStarknetIdsSchema as d, nameResolutionStarknetIdSchema as h, nameResolutionAddressesSchema as m, providersNamesSchema as p } from "./schema.js";
|
|
3
|
+
import { HTTPService as u } from "../http/HttpService.js";
|
|
4
|
+
class f {
|
|
5
|
+
constructor(s, r) {
|
|
6
|
+
this.apiBase = s, this.headers = r, this.httpService = new u(this.headers, "json");
|
|
7
|
+
}
|
|
8
|
+
async getAddressFromMultipleStarknetId(s, r, t) {
|
|
9
|
+
const e = new URLSearchParams(r.map((c) => ["domain", c]));
|
|
10
|
+
t && e.set("includeAvatar", "true");
|
|
11
|
+
const o = i(this.apiBase, s, "starknet.id", `?${e}`), a = await this.httpService.get(o), n = d.safeParse(a);
|
|
12
|
+
if (!n.success)
|
|
13
|
+
throw new Error("Failed to parse name resolution");
|
|
14
|
+
return n.data;
|
|
15
|
+
}
|
|
16
|
+
async getAddressFromStarknetId(s, r, t) {
|
|
17
|
+
const e = i(this.apiBase, s, "starknet.id", r, t ? "?includeAvatar=true" : ""), o = await this.httpService.get(e), a = h.safeParse(o);
|
|
18
|
+
if (!a.success)
|
|
19
|
+
throw new Error("Failed to parse name resolution");
|
|
20
|
+
return a.data;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* getAddressFromStarknetId: retrieve address from starknetId
|
|
24
|
+
*/
|
|
25
|
+
async getStarknetIdFromAddress(s, r, t) {
|
|
26
|
+
const e = new URLSearchParams(r.map((c) => ["address", c]));
|
|
27
|
+
t && e.set("includeAvatar", "true");
|
|
28
|
+
const o = i(this.apiBase, s, "addresses", `?${e}`), a = await this.httpService.get(o), n = m.safeParse(a);
|
|
29
|
+
if (!n.success)
|
|
30
|
+
throw new Error("Failed to parse name resolution");
|
|
31
|
+
return n.data;
|
|
32
|
+
}
|
|
33
|
+
async getProvidersNames(s) {
|
|
34
|
+
const r = i(this.apiBase, s, "providers", "name"), t = await this.httpService.get(r), e = p.safeParse(t);
|
|
35
|
+
if (!e.success)
|
|
36
|
+
throw new Error("Failed to parse name resolution");
|
|
37
|
+
return e.data;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
f as ResolveNameService
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),a=require("../chains/starknet/address.cjs"),o=require("../chains/starknet/starknetId.cjs"),s=e.object({domain:o.starknetIdSchema,address:a.addressSchema.optional(),avatar:e.string().optional(),status:e.union([e.literal("KNOWN"),e.literal("UNKNOWN")])}),n=e.array(s),t=e.object({provider:e.string(),name:e.string(),avatar:e.string().optional()}),r=e.object({address:a.addressSchema,status:e.union([e.literal("KNOWN"),e.literal("UNKNOWN")]),resolutions:e.array(t).optional()}),i=e.array(e.string()),d=r.array();exports.nameProviderResolutionSchema=t;exports.nameResolutionAddressSchema=r;exports.nameResolutionAddressesSchema=d;exports.nameResolutionStarknetIdSchema=s;exports.nameResolutionStarknetIdsSchema=n;exports.providersNamesSchema=i;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import a from "zod";
|
|
2
|
+
import { addressSchema as t } from "../chains/starknet/address.js";
|
|
3
|
+
import { starknetIdSchema as o } from "../chains/starknet/starknetId.js";
|
|
4
|
+
const e = a.object({
|
|
5
|
+
domain: o,
|
|
6
|
+
address: t.optional(),
|
|
7
|
+
avatar: a.string().optional(),
|
|
8
|
+
status: a.union([a.literal("KNOWN"), a.literal("UNKNOWN")])
|
|
9
|
+
}), l = a.array(e), r = a.object({
|
|
10
|
+
provider: a.string(),
|
|
11
|
+
name: a.string(),
|
|
12
|
+
avatar: a.string().optional()
|
|
13
|
+
}), s = a.object({
|
|
14
|
+
address: t,
|
|
15
|
+
status: a.union([a.literal("KNOWN"), a.literal("UNKNOWN")]),
|
|
16
|
+
resolutions: a.array(r).optional()
|
|
17
|
+
}), c = a.array(a.string()), d = s.array();
|
|
18
|
+
export {
|
|
19
|
+
r as nameProviderResolutionSchema,
|
|
20
|
+
s as nameResolutionAddressSchema,
|
|
21
|
+
d as nameResolutionAddressesSchema,
|
|
22
|
+
e as nameResolutionStarknetIdSchema,
|
|
23
|
+
l as nameResolutionStarknetIdsSchema,
|
|
24
|
+
c as providersNamesSchema
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("url-join"),f=require("./BackendPaginationError.cjs"),A=require("../utils/address.cjs"),P=require("../chains/starknet/address.cjs"),u=32;class S{constructor(e,t){this.apiBase=e,this.httpService=t}async getNfts(e,t,r,s=1){const a=this.normalizeAddress(r),c=o(this.apiBase,"pandora",e,t),m=this.pageToPageIndex(s),l=`${o(c,"profile",a,"nfts")}?page=${m}&size=${u}`,i=await this.httpService.get(l),n=i.content.map(p=>this.mapItem(p,r));return{totalPages:i.totalPages,page:i.number+1,count:n.length,nfts:n}}async getCollection(e,t,r){const s=this.normalizeAddress(r),a=o(this.apiBase,"pandora",e,t),c=o(a,"collection",s),m=`${a}/collection/${s}`,[g,l]=await Promise.all([this.httpService.get(c),this.httpService.get(m)]),i=h(g),n=l.content.map(p=>this.mapItem(p));return{...i,nfts:{totalPages:l.totalPages,page:l.number,count:n.length,data:n}}}async getNft(e,t,r,s){const a=this.normalizeAddress(r),c=o(this.apiBase,"pandora",e,t),m=o(c,"nft",a,s),g=await this.httpService.get(m);return this.mapItem(g)}async getProfileCollections(e,t,r,s=1,a=!1){const c=this.pageToPageIndex(s),m=this.normalizeAddress(r),g=o(this.apiBase,"pandora",e,t),l=o(g,"profile",m,"collections",`?page=${c}&size=${u}`),i=await this.httpService.get(l),n=[];for(const p of i.content)if(a){const b=await this.getCollectionMetrics(e,t,p.contractAddress);n.push(h(p,b))}else n.push(h(p));return{totalPages:i.totalPages,page:i.number+1,count:n.length,collections:n}}async getCollectionMetrics(e,t,r){const s=this.normalizeAddress(r),a=o(this.apiBase,"pandora",e,t),c=o(a,"collection",s,"metrics");return this.httpService.get(c)}normalizeAddress(e){return P.addressSchemaArgentBackend.parse(e)}pageToPageIndex(e){if(!Number.isInteger(e))throw new f.BackendPaginationError("notANumber");const t=e-1;if(t<0)throw new f.BackendPaginationError("tooLow");return t}mapItem(e,t){var s;const r=e.name??e.tokenId;return{token_id:e.tokenId,contract_address:e.contractAddress,name:r,spec:"spec"in e?v(e.spec):void 0,description:"",best_bid_order:{payment_amount:"bestListPrice"in e?BigInt(e.bestListPrice):void 0},properties:"properties"in e&&e.properties.map(a=>({key:a.key,value:a.value}))||[],image_uri:e.imageUrls.preview,image_url_copy:e.imageUrls.full,owner:{account_address:((s=e.owner)==null?void 0:s.address)||t},contract_name:A.formatAddress(e.contractAddress)}}}function v(d){switch(d){case"erc721":case"starknetErc721":return"ERC721";case"erc1155":case"starknetErc1155":return"ERC1155"}}function h(d,e){return{contractAddress:P.addressSchema.parse(d.contractAddress),name:d.name||A.formatAddress(d.contractAddress),description:d.description??"",imageUri:d.imageUrls.preview,...e&&{owners:{total:e.numberOfItems,unique:e.uniqueOwners},...e.floorPrice&&{floorPrice:BigInt(e.floorPrice)}}}}exports.BackendNftService=S;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import n from "url-join";
|
|
2
|
+
import { BackendPaginationError as f } from "./BackendPaginationError.js";
|
|
3
|
+
import { formatAddress as b } from "../utils/address.js";
|
|
4
|
+
import { addressSchemaArgentBackend as P, addressSchema as S } from "../chains/starknet/address.js";
|
|
5
|
+
const A = 32;
|
|
6
|
+
class k {
|
|
7
|
+
constructor(e, t) {
|
|
8
|
+
this.apiBase = e, this.httpService = t;
|
|
9
|
+
}
|
|
10
|
+
async getNfts(e, t, a, s = 1) {
|
|
11
|
+
const o = this.normalizeAddress(a), c = n(this.apiBase, "pandora", e, t), m = this.pageToPageIndex(s), l = `${n(c, "profile", o, "nfts")}?page=${m}&size=${A}`, i = await this.httpService.get(l), r = i.content.map((p) => this.mapItem(p, a));
|
|
12
|
+
return {
|
|
13
|
+
totalPages: i.totalPages,
|
|
14
|
+
page: i.number + 1,
|
|
15
|
+
count: r.length,
|
|
16
|
+
nfts: r
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
async getCollection(e, t, a) {
|
|
20
|
+
const s = this.normalizeAddress(a), o = n(this.apiBase, "pandora", e, t), c = n(o, "collection", s), m = `${o}/collection/${s}`, [g, l] = await Promise.all([
|
|
21
|
+
this.httpService.get(c),
|
|
22
|
+
this.httpService.get(m)
|
|
23
|
+
]), i = h(g), r = l.content.map((p) => this.mapItem(p));
|
|
24
|
+
return {
|
|
25
|
+
...i,
|
|
26
|
+
nfts: {
|
|
27
|
+
totalPages: l.totalPages,
|
|
28
|
+
page: l.number,
|
|
29
|
+
count: r.length,
|
|
30
|
+
data: r
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
async getNft(e, t, a, s) {
|
|
35
|
+
const o = this.normalizeAddress(a), c = n(this.apiBase, "pandora", e, t), m = n(c, "nft", o, s), g = await this.httpService.get(m);
|
|
36
|
+
return this.mapItem(g);
|
|
37
|
+
}
|
|
38
|
+
async getProfileCollections(e, t, a, s = 1, o = !1) {
|
|
39
|
+
const c = this.pageToPageIndex(s), m = this.normalizeAddress(a), g = n(this.apiBase, "pandora", e, t), l = n(g, "profile", m, "collections", `?page=${c}&size=${A}`), i = await this.httpService.get(l), r = [];
|
|
40
|
+
for (const p of i.content)
|
|
41
|
+
if (o) {
|
|
42
|
+
const u = await this.getCollectionMetrics(e, t, p.contractAddress);
|
|
43
|
+
r.push(h(p, u));
|
|
44
|
+
} else
|
|
45
|
+
r.push(h(p));
|
|
46
|
+
return {
|
|
47
|
+
totalPages: i.totalPages,
|
|
48
|
+
page: i.number + 1,
|
|
49
|
+
count: r.length,
|
|
50
|
+
collections: r
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
async getCollectionMetrics(e, t, a) {
|
|
54
|
+
const s = this.normalizeAddress(a), o = n(this.apiBase, "pandora", e, t), c = n(o, "collection", s, "metrics");
|
|
55
|
+
return this.httpService.get(c);
|
|
56
|
+
}
|
|
57
|
+
normalizeAddress(e) {
|
|
58
|
+
return P.parse(e);
|
|
59
|
+
}
|
|
60
|
+
pageToPageIndex(e) {
|
|
61
|
+
if (!Number.isInteger(e))
|
|
62
|
+
throw new f("notANumber");
|
|
63
|
+
const t = e - 1;
|
|
64
|
+
if (t < 0)
|
|
65
|
+
throw new f("tooLow");
|
|
66
|
+
return t;
|
|
67
|
+
}
|
|
68
|
+
mapItem(e, t) {
|
|
69
|
+
var s;
|
|
70
|
+
const a = e.name ?? e.tokenId;
|
|
71
|
+
return {
|
|
72
|
+
token_id: e.tokenId,
|
|
73
|
+
contract_address: e.contractAddress,
|
|
74
|
+
name: a,
|
|
75
|
+
spec: "spec" in e ? w(e.spec) : void 0,
|
|
76
|
+
description: "",
|
|
77
|
+
best_bid_order: {
|
|
78
|
+
payment_amount: "bestListPrice" in e ? BigInt(e.bestListPrice) : void 0
|
|
79
|
+
},
|
|
80
|
+
properties: "properties" in e && e.properties.map((o) => ({ key: o.key, value: o.value })) || [],
|
|
81
|
+
image_uri: e.imageUrls.preview,
|
|
82
|
+
image_url_copy: e.imageUrls.full,
|
|
83
|
+
owner: {
|
|
84
|
+
account_address: ((s = e.owner) == null ? void 0 : s.address) || t
|
|
85
|
+
},
|
|
86
|
+
contract_name: b(e.contractAddress)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function w(d) {
|
|
91
|
+
switch (d) {
|
|
92
|
+
case "erc721":
|
|
93
|
+
case "starknetErc721":
|
|
94
|
+
return "ERC721";
|
|
95
|
+
case "erc1155":
|
|
96
|
+
case "starknetErc1155":
|
|
97
|
+
return "ERC1155";
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function h(d, e) {
|
|
101
|
+
return {
|
|
102
|
+
contractAddress: S.parse(d.contractAddress),
|
|
103
|
+
name: d.name || b(d.contractAddress),
|
|
104
|
+
description: d.description ?? "",
|
|
105
|
+
imageUri: d.imageUrls.preview,
|
|
106
|
+
...e && {
|
|
107
|
+
owners: {
|
|
108
|
+
total: e.numberOfItems,
|
|
109
|
+
unique: e.uniqueOwners
|
|
110
|
+
},
|
|
111
|
+
...e.floorPrice && {
|
|
112
|
+
floorPrice: BigInt(e.floorPrice)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
k as BackendNftService
|
|
119
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class e extends Error{constructor(r,t){super(`${r}::${t}`),this.name=r,this.code=t,this.name=r}}class s extends e{constructor(r){super("BackendPaginationError",r)}}exports.BackendPaginationError=s;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class o extends Error {
|
|
2
|
+
constructor(r, s) {
|
|
3
|
+
super(`${r}::${s}`), this.name = r, this.code = s, this.name = r;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
class n extends o {
|
|
7
|
+
constructor(r) {
|
|
8
|
+
super("BackendPaginationError", r);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
n as BackendPaginationError
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chains/starknet/address.cjs"),r=({image_uri:s,image_url_copy:t})=>{if(s&&t){if(!t.startsWith("ipfs://"))return t;if(!s.startsWith("ipfs://"))return s}return t||s},n=(s,t)=>s.token_id===t.token_id&&e.isEqualAddress(s.contract_address,t.contract_address);exports.equalNft=n;exports.getNftPicture=r;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isEqualAddress as r } from "../chains/starknet/address.js";
|
|
2
|
+
const f = ({ image_uri: s, image_url_copy: t }) => {
|
|
3
|
+
if (s && t) {
|
|
4
|
+
if (!t.startsWith("ipfs://"))
|
|
5
|
+
return t;
|
|
6
|
+
if (!s.startsWith("ipfs://"))
|
|
7
|
+
return s;
|
|
8
|
+
}
|
|
9
|
+
return t || s;
|
|
10
|
+
}, d = (s, t) => s.token_id === t.token_id && r(s.contract_address, t.contract_address);
|
|
11
|
+
export {
|
|
12
|
+
d as equalNft,
|
|
13
|
+
f as getNftPicture
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@scure/base"),i=require("../../node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.cjs"),n=require("starknet"),a=require("url-join"),o=require("./schema.cjs");class h{constructor(e,t){this.apiBase=e,this.httpService=t}async getRecovery(e,t){const r=a(this.apiBase,"accounts","starknet",e,"recovery",`${t}`),s=await this.httpService.get(r),c=o.onchainRecoverySchema.safeParse(s);return c.error?null:c.data}async getActiveRecovery(e){const t=a(this.apiBase,"accounts","starknet",e,"recovery"),r=await this.httpService.get(t),s=o.activeOnchainRecoverySchema.safeParse(r);return s.error?null:s.data}async startRecovery(e,t,r,s){const{r:c,s:v}=n.ec.starkCurve.sign(i.pedersen(i.keccak(u.stringToBytes("utf8","starknet:recovery")),r),s),y={feeToken:t,signerSignature:{type:"StarknetKey",signer:{publicKey:r,r:n.encode.addHexPrefix(c.toString(16)),s:n.encode.addHexPrefix(v.toString(16))}}};return await this.httpService.post(`${this.apiBase}/accounts/starknet/${e}/recovery`,{body:JSON.stringify(y)},o.startOnchainRecoverySchema)}async completeRecovery(e,t){const r=a(this.apiBase,"accounts","starknet",e,"recovery",`${t}`,"complete");return await this.httpService.post(r)}}exports.OnchainRecoveryService=h;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { stringToBytes as p } from "@scure/base";
|
|
2
|
+
import { pedersen as v, keccak as y } from "../../node_modules/.pnpm/micro-starknet@0.2.3/node_modules/micro-starknet/lib/esm/index.js";
|
|
3
|
+
import { ec as h, encode as a } from "starknet";
|
|
4
|
+
import o from "url-join";
|
|
5
|
+
import { onchainRecoverySchema as u, activeOnchainRecoverySchema as m, startOnchainRecoverySchema as S } from "./schema.js";
|
|
6
|
+
class x {
|
|
7
|
+
constructor(e, t) {
|
|
8
|
+
this.apiBase = e, this.httpService = t;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves the on-chain recovery details for a given address and recovery ID.
|
|
12
|
+
* If no recovery ID is provided, it retrieves the latest recovery details.
|
|
13
|
+
* @param address - The address to retrieve the recovery details.
|
|
14
|
+
* @param recoveryId - The recovery ID to retrieve the details.
|
|
15
|
+
* @returns A promise that resolves to the on-chain recovery details.
|
|
16
|
+
*/
|
|
17
|
+
async getRecovery(e, t) {
|
|
18
|
+
const r = o(this.apiBase, "accounts", "starknet", e, "recovery", `${t}`), s = await this.httpService.get(r), c = u.safeParse(s);
|
|
19
|
+
return c.error ? null : c.data;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves the on-chain recovery details for a given address and recovery ID.
|
|
23
|
+
* If no recovery ID is provided, it retrieves the latest recovery details.
|
|
24
|
+
* @param address - The address to retrieve the current active recovery details.
|
|
25
|
+
* @returns A promise that resolves to the on-chain recovery details.
|
|
26
|
+
*/
|
|
27
|
+
async getActiveRecovery(e) {
|
|
28
|
+
const t = o(this.apiBase, "accounts", "starknet", e, "recovery"), r = await this.httpService.get(t), s = m.safeParse(r);
|
|
29
|
+
return s.error ? null : s.data;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Starts the recovery process for a given address.
|
|
33
|
+
* @param address - The address to recover.
|
|
34
|
+
* @param feeToken - The token to be used for the recovery fee.
|
|
35
|
+
* @param publicKey - The public key of the signer.
|
|
36
|
+
* @param privateKey - The private key of the signer.
|
|
37
|
+
* @returns A promise that resolves to the recovery details.
|
|
38
|
+
*/
|
|
39
|
+
async startRecovery(e, t, r, s) {
|
|
40
|
+
const { r: c, s: n } = h.starkCurve.sign(v(y(p("utf8", "starknet:recovery")), r), s), i = {
|
|
41
|
+
feeToken: t,
|
|
42
|
+
signerSignature: {
|
|
43
|
+
type: "StarknetKey",
|
|
44
|
+
signer: {
|
|
45
|
+
publicKey: r,
|
|
46
|
+
r: a.addHexPrefix(c.toString(16)),
|
|
47
|
+
s: a.addHexPrefix(n.toString(16))
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
return await this.httpService.post(`${this.apiBase}/accounts/starknet/${e}/recovery`, {
|
|
52
|
+
body: JSON.stringify(i)
|
|
53
|
+
}, S);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Completes the recovery process for a given address and recovery ID.
|
|
57
|
+
* @param address - The address to recover.
|
|
58
|
+
* @param recoveryId - The recovery ID to complete.
|
|
59
|
+
* @returns A promise that resolves to the recovery details
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
async completeRecovery(e, t) {
|
|
63
|
+
const r = o(this.apiBase, "accounts", "starknet", e, "recovery", `${t}`, "complete");
|
|
64
|
+
return await this.httpService.post(r);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
x as OnchainRecoveryService
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),n=require("../chains/starknet/address.cjs"),c=require("../utils/hex.cjs");exports.RecoveryStatusEnum=void 0;(function(r){r.NOT_STARTED="NOT_STARTED",r.ONGOING="ONGOING",r.AWAITING_FUNDS="AWAITING_FUNDS",r.AWAITING_COMPLETION="AWAITING_COMPLETION",r.COMPLETED="COMPLETED",r.CANCELLED="CANCELLED",r.ERROR="ERROR"})(exports.RecoveryStatusEnum||(exports.RecoveryStatusEnum={}));const i=e.z.object({recoveryId:e.z.number()}),s=e.z.object({feeToken:n.addressSchema,signerSignature:e.z.object({type:e.z.literal("StarknetKey"),signer:e.z.object({publicKey:c.hexSchema,r:c.hexSchema,s:c.hexSchema})})}),t=e.z.nativeEnum(exports.RecoveryStatusEnum),o=e.z.object({recoveryId:e.z.number(),status:t,completionTime:e.z.array(e.z.number()).optional()}),h=e.z.object({activeRecovery:o.optional().or(e.z.null()).optional(),minFees:e.z.record(e.z.number()).optional()}),S=e.z.object({recovery:o.optional().or(e.z.null()).optional(),minFees:e.z.record(e.z.number()).optional()});exports.StartOnchainRecoveryErrorStatusEnum=void 0;(function(r){r.UNDEPLOYED_ACCOUNT="undeployedAccount",r.NOT_ENOUGH_TO_PAY_FEES="notEnoughToPayFees",r.RECOVERY_ALREADY_EXISTS="recoveryAlreadyExists"})(exports.StartOnchainRecoveryErrorStatusEnum||(exports.StartOnchainRecoveryErrorStatusEnum={}));const a=e.z.nativeEnum(exports.StartOnchainRecoveryErrorStatusEnum),E=e.z.object({status:a});exports.activeOnchainRecoverySchema=h;exports.onchainRecoverySchema=S;exports.recoveryBaseSchema=o;exports.recoveryBodySchema=s;exports.recoveryStatusSchema=t;exports.startOnchainRecoveryErrorSchema=E;exports.startOnchainRecoveryErrorStatusSchema=a;exports.startOnchainRecoverySchema=i;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
import { addressSchema as a } from "../chains/starknet/address.js";
|
|
3
|
+
import { hexSchema as r } from "../utils/hex.js";
|
|
4
|
+
var c;
|
|
5
|
+
(function(o) {
|
|
6
|
+
o.NOT_STARTED = "NOT_STARTED", o.ONGOING = "ONGOING", o.AWAITING_FUNDS = "AWAITING_FUNDS", o.AWAITING_COMPLETION = "AWAITING_COMPLETION", o.COMPLETED = "COMPLETED", o.CANCELLED = "CANCELLED", o.ERROR = "ERROR";
|
|
7
|
+
})(c || (c = {}));
|
|
8
|
+
const T = e.object({
|
|
9
|
+
recoveryId: e.number()
|
|
10
|
+
}), N = e.object({
|
|
11
|
+
feeToken: a,
|
|
12
|
+
signerSignature: e.object({
|
|
13
|
+
type: e.literal("StarknetKey"),
|
|
14
|
+
signer: e.object({
|
|
15
|
+
publicKey: r,
|
|
16
|
+
r,
|
|
17
|
+
s: r
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
}), i = e.nativeEnum(c), t = e.object({
|
|
21
|
+
recoveryId: e.number(),
|
|
22
|
+
status: i,
|
|
23
|
+
completionTime: e.array(e.number()).optional()
|
|
24
|
+
}), A = e.object({
|
|
25
|
+
activeRecovery: t.optional().or(e.null()).optional(),
|
|
26
|
+
minFees: e.record(e.number()).optional()
|
|
27
|
+
}), l = e.object({
|
|
28
|
+
recovery: t.optional().or(e.null()).optional(),
|
|
29
|
+
minFees: e.record(e.number()).optional()
|
|
30
|
+
});
|
|
31
|
+
var n;
|
|
32
|
+
(function(o) {
|
|
33
|
+
o.UNDEPLOYED_ACCOUNT = "undeployedAccount", o.NOT_ENOUGH_TO_PAY_FEES = "notEnoughToPayFees", o.RECOVERY_ALREADY_EXISTS = "recoveryAlreadyExists";
|
|
34
|
+
})(n || (n = {}));
|
|
35
|
+
const O = e.nativeEnum(n), h = e.object({
|
|
36
|
+
status: O
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
c as RecoveryStatusEnum,
|
|
40
|
+
n as StartOnchainRecoveryErrorStatusEnum,
|
|
41
|
+
A as activeOnchainRecoverySchema,
|
|
42
|
+
l as onchainRecoverySchema,
|
|
43
|
+
t as recoveryBaseSchema,
|
|
44
|
+
N as recoveryBodySchema,
|
|
45
|
+
i as recoveryStatusSchema,
|
|
46
|
+
h as startOnchainRecoveryErrorSchema,
|
|
47
|
+
O as startOnchainRecoveryErrorStatusSchema,
|
|
48
|
+
T as startOnchainRecoverySchema
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function r(){if("brave"in navigator)try{return await navigator.brave.isBrave()}catch{}return!1}exports.isBraveBrowser=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("ua-parser-js");let e;function s(){return e||(e=new t.UAParser(navigator.userAgent).getResult()),e}function r(o){return s().browser.name===o}function i(){return r("Firefox")}function n(){return r("Chrome")}function u(){return r("Safari")}function a(){return r("Edge")}exports.getUAParserResult=s;exports.isBrowser=r;exports.isChromeBrowser=n;exports.isEdgeBrowser=a;exports.isFirefoxBrowser=i;exports.isSafariBrowser=u;
|