@yaswap/wallet-core 2.0.0
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/CHANGELOG.md +804 -0
- package/README.md +163 -0
- package/dist/package.json +76 -0
- package/dist/src/build.config.d.ts +46 -0
- package/dist/src/build.config.js +237 -0
- package/dist/src/build.config.js.map +1 -0
- package/dist/src/factory/client/clients.d.ts +11 -0
- package/dist/src/factory/client/clients.js +119 -0
- package/dist/src/factory/client/clients.js.map +1 -0
- package/dist/src/factory/client/evm.d.ts +6 -0
- package/dist/src/factory/client/evm.js +71 -0
- package/dist/src/factory/client/evm.js.map +1 -0
- package/dist/src/factory/client/index.d.ts +11 -0
- package/dist/src/factory/client/index.js +38 -0
- package/dist/src/factory/client/index.js.map +1 -0
- package/dist/src/factory/client/nft.d.ts +4 -0
- package/dist/src/factory/client/nft.js +26 -0
- package/dist/src/factory/client/nft.js.map +1 -0
- package/dist/src/factory/index.d.ts +3 -0
- package/dist/src/factory/index.js +7 -0
- package/dist/src/factory/index.js.map +1 -0
- package/dist/src/factory/settings.d.ts +4 -0
- package/dist/src/factory/settings.js +27 -0
- package/dist/src/factory/settings.js.map +1 -0
- package/dist/src/factory/swap/index.d.ts +4 -0
- package/dist/src/factory/swap/index.js +66 -0
- package/dist/src/factory/swap/index.js.map +1 -0
- package/dist/src/index.d.ts +1619 -0
- package/dist/src/index.js +38 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.test.d.ts +1 -0
- package/dist/src/index.test.js +187 -0
- package/dist/src/index.test.js.map +1 -0
- package/dist/src/nameResolvers/nameResolver.d.ts +7 -0
- package/dist/src/nameResolvers/nameResolver.js +3 -0
- package/dist/src/nameResolvers/nameResolver.js.map +1 -0
- package/dist/src/nameResolvers/uns.d.ts +12 -0
- package/dist/src/nameResolvers/uns.js +83 -0
- package/dist/src/nameResolvers/uns.js.map +1 -0
- package/dist/src/nameResolvers/uns.test.d.ts +1 -0
- package/dist/src/nameResolvers/uns.test.js +29 -0
- package/dist/src/nameResolvers/uns.test.js.map +1 -0
- package/dist/src/store/actions/acceptTermsAndConditions.d.ts +4 -0
- package/dist/src/store/actions/acceptTermsAndConditions.js +17 -0
- package/dist/src/store/actions/acceptTermsAndConditions.js.map +1 -0
- package/dist/src/store/actions/acceptTermsAndConditions.test.d.ts +1 -0
- package/dist/src/store/actions/acceptTermsAndConditions.test.js +22 -0
- package/dist/src/store/actions/acceptTermsAndConditions.test.js.map +1 -0
- package/dist/src/store/actions/accounts/createAccount.d.ts +7 -0
- package/dist/src/store/actions/accounts/createAccount.js +27 -0
- package/dist/src/store/actions/accounts/createAccount.js.map +1 -0
- package/dist/src/store/actions/accounts/createAccount.test.d.ts +1 -0
- package/dist/src/store/actions/accounts/createAccount.test.js +29 -0
- package/dist/src/store/actions/accounts/createAccount.test.js.map +1 -0
- package/dist/src/store/actions/accounts/index.d.ts +5 -0
- package/dist/src/store/actions/accounts/index.js +9 -0
- package/dist/src/store/actions/accounts/index.js.map +1 -0
- package/dist/src/store/actions/accounts/removeAccount.d.ts +7 -0
- package/dist/src/store/actions/accounts/removeAccount.js +12 -0
- package/dist/src/store/actions/accounts/removeAccount.js.map +1 -0
- package/dist/src/store/actions/accounts/removeAccount.test.d.ts +1 -0
- package/dist/src/store/actions/accounts/removeAccount.test.js +53 -0
- package/dist/src/store/actions/accounts/removeAccount.test.js.map +1 -0
- package/dist/src/store/actions/accounts/toggleAccount.d.ts +8 -0
- package/dist/src/store/actions/accounts/toggleAccount.js +19 -0
- package/dist/src/store/actions/accounts/toggleAccount.js.map +1 -0
- package/dist/src/store/actions/accounts/toggleAccount.test.d.ts +1 -0
- package/dist/src/store/actions/accounts/toggleAccount.test.js +44 -0
- package/dist/src/store/actions/accounts/toggleAccount.test.js.map +1 -0
- package/dist/src/store/actions/accounts/toggleBlockchain.d.ts +9 -0
- package/dist/src/store/actions/accounts/toggleBlockchain.js +14 -0
- package/dist/src/store/actions/accounts/toggleBlockchain.js.map +1 -0
- package/dist/src/store/actions/accounts/updateAccount.d.ts +26 -0
- package/dist/src/store/actions/accounts/updateAccount.js +14 -0
- package/dist/src/store/actions/accounts/updateAccount.js.map +1 -0
- package/dist/src/store/actions/addCustomToken.d.ts +12 -0
- package/dist/src/store/actions/addCustomToken.js +12 -0
- package/dist/src/store/actions/addCustomToken.js.map +1 -0
- package/dist/src/store/actions/addCustomToken.test.d.ts +1 -0
- package/dist/src/store/actions/addCustomToken.test.js +59 -0
- package/dist/src/store/actions/addCustomToken.test.js.map +1 -0
- package/dist/src/store/actions/addExternalConnection.d.ts +9 -0
- package/dist/src/store/actions/addExternalConnection.js +13 -0
- package/dist/src/store/actions/addExternalConnection.js.map +1 -0
- package/dist/src/store/actions/addExternalConnection.test.d.ts +1 -0
- package/dist/src/store/actions/addExternalConnection.test.js +100 -0
- package/dist/src/store/actions/addExternalConnection.test.js.map +1 -0
- package/dist/src/store/actions/analytics.d.ts +21 -0
- package/dist/src/store/actions/analytics.js +58 -0
- package/dist/src/store/actions/analytics.js.map +1 -0
- package/dist/src/store/actions/analytics.test.d.ts +1 -0
- package/dist/src/store/actions/analytics.test.js +33 -0
- package/dist/src/store/actions/analytics.test.js.map +1 -0
- package/dist/src/store/actions/changeActiveNetwork.d.ts +5 -0
- package/dist/src/store/actions/changeActiveNetwork.js +13 -0
- package/dist/src/store/actions/changeActiveNetwork.js.map +1 -0
- package/dist/src/store/actions/changeActiveWalletId.d.ts +5 -0
- package/dist/src/store/actions/changeActiveWalletId.js +11 -0
- package/dist/src/store/actions/changeActiveWalletId.js.map +1 -0
- package/dist/src/store/actions/changeActiveWalletId.test.d.ts +1 -0
- package/dist/src/store/actions/changeActiveWalletId.test.js +40 -0
- package/dist/src/store/actions/changeActiveWalletId.test.js.map +1 -0
- package/dist/src/store/actions/changePassword.d.ts +4 -0
- package/dist/src/store/actions/changePassword.js +13 -0
- package/dist/src/store/actions/changePassword.js.map +1 -0
- package/dist/src/store/actions/changePassword.test.d.ts +1 -0
- package/dist/src/store/actions/changePassword.test.js +22 -0
- package/dist/src/store/actions/changePassword.test.js.map +1 -0
- package/dist/src/store/actions/checkPendingActions.d.ts +5 -0
- package/dist/src/store/actions/checkPendingActions.js +25 -0
- package/dist/src/store/actions/checkPendingActions.js.map +1 -0
- package/dist/src/store/actions/clearErrorLog.d.ts +2 -0
- package/dist/src/store/actions/clearErrorLog.js +10 -0
- package/dist/src/store/actions/clearErrorLog.js.map +1 -0
- package/dist/src/store/actions/createWallet.d.ts +7 -0
- package/dist/src/store/actions/createWallet.js +90 -0
- package/dist/src/store/actions/createWallet.js.map +1 -0
- package/dist/src/store/actions/createWallet.test.d.ts +1 -0
- package/dist/src/store/actions/createWallet.test.js +41 -0
- package/dist/src/store/actions/createWallet.test.js.map +1 -0
- package/dist/src/store/actions/customChainSettings.d.ts +15 -0
- package/dist/src/store/actions/customChainSettings.js +37 -0
- package/dist/src/store/actions/customChainSettings.js.map +1 -0
- package/dist/src/store/actions/disableAssets.d.ts +7 -0
- package/dist/src/store/actions/disableAssets.js +28 -0
- package/dist/src/store/actions/disableAssets.js.map +1 -0
- package/dist/src/store/actions/disableEthereumInjection.d.ts +2 -0
- package/dist/src/store/actions/disableEthereumInjection.js +11 -0
- package/dist/src/store/actions/disableEthereumInjection.js.map +1 -0
- package/dist/src/store/actions/disableEthereumInjection.test.d.ts +1 -0
- package/dist/src/store/actions/disableEthereumInjection.test.js +24 -0
- package/dist/src/store/actions/disableEthereumInjection.test.js.map +1 -0
- package/dist/src/store/actions/enableAssets.d.ts +7 -0
- package/dist/src/store/actions/enableAssets.js +65 -0
- package/dist/src/store/actions/enableAssets.js.map +1 -0
- package/dist/src/store/actions/enableAssets.test.d.ts +1 -0
- package/dist/src/store/actions/enableAssets.test.js +37 -0
- package/dist/src/store/actions/enableAssets.test.js.map +1 -0
- package/dist/src/store/actions/enableDisableAssets.test.d.ts +1 -0
- package/dist/src/store/actions/enableDisableAssets.test.js +79 -0
- package/dist/src/store/actions/enableDisableAssets.test.js.map +1 -0
- package/dist/src/store/actions/enableEthereumInjection.d.ts +2 -0
- package/dist/src/store/actions/enableEthereumInjection.js +11 -0
- package/dist/src/store/actions/enableEthereumInjection.js.map +1 -0
- package/dist/src/store/actions/exportPrivateKey.d.ts +9 -0
- package/dist/src/store/actions/exportPrivateKey.js +12 -0
- package/dist/src/store/actions/exportPrivateKey.js.map +1 -0
- package/dist/src/store/actions/exportPrivateKey.test.d.ts +1 -0
- package/dist/src/store/actions/exportPrivateKey.test.js +36 -0
- package/dist/src/store/actions/exportPrivateKey.test.js.map +1 -0
- package/dist/src/store/actions/fetchTokenDetails.d.ts +11 -0
- package/dist/src/store/actions/fetchTokenDetails.js +22 -0
- package/dist/src/store/actions/fetchTokenDetails.js.map +1 -0
- package/dist/src/store/actions/forgetDappConnections.d.ts +2 -0
- package/dist/src/store/actions/forgetDappConnections.js +11 -0
- package/dist/src/store/actions/forgetDappConnections.js.map +1 -0
- package/dist/src/store/actions/getLockForAsset.d.ts +8 -0
- package/dist/src/store/actions/getLockForAsset.js +34 -0
- package/dist/src/store/actions/getLockForAsset.js.map +1 -0
- package/dist/src/store/actions/getQuotes.d.ts +13 -0
- package/dist/src/store/actions/getQuotes.js +70 -0
- package/dist/src/store/actions/getQuotes.js.map +1 -0
- package/dist/src/store/actions/getQuotes.test.d.ts +1 -0
- package/dist/src/store/actions/getQuotes.test.js +30 -0
- package/dist/src/store/actions/getQuotes.test.js.map +1 -0
- package/dist/src/store/actions/getUnusedAddresses.d.ts +8 -0
- package/dist/src/store/actions/getUnusedAddresses.js +51 -0
- package/dist/src/store/actions/getUnusedAddresses.js.map +1 -0
- package/dist/src/store/actions/hardware-wallet/getLedgerAccounts.d.ts +16 -0
- package/dist/src/store/actions/hardware-wallet/getLedgerAccounts.js +57 -0
- package/dist/src/store/actions/hardware-wallet/getLedgerAccounts.js.map +1 -0
- package/dist/src/store/actions/hardware-wallet/index.d.ts +1 -0
- package/dist/src/store/actions/hardware-wallet/index.js +5 -0
- package/dist/src/store/actions/hardware-wallet/index.js.map +1 -0
- package/dist/src/store/actions/index.d.ts +47 -0
- package/dist/src/store/actions/index.js +51 -0
- package/dist/src/store/actions/index.js.map +1 -0
- package/dist/src/store/actions/initializeAddresses.d.ts +6 -0
- package/dist/src/store/actions/initializeAddresses.js +26 -0
- package/dist/src/store/actions/initializeAddresses.js.map +1 -0
- package/dist/src/store/actions/initializeAddresses.test.d.ts +1 -0
- package/dist/src/store/actions/initializeAddresses.test.js +58 -0
- package/dist/src/store/actions/initializeAddresses.test.js.map +1 -0
- package/dist/src/store/actions/lockWallet.d.ts +2 -0
- package/dist/src/store/actions/lockWallet.js +11 -0
- package/dist/src/store/actions/lockWallet.js.map +1 -0
- package/dist/src/store/actions/lockWallet.test.d.ts +1 -0
- package/dist/src/store/actions/lockWallet.test.js +24 -0
- package/dist/src/store/actions/lockWallet.test.js.map +1 -0
- package/dist/src/store/actions/logError.d.ts +3 -0
- package/dist/src/store/actions/logError.js +10 -0
- package/dist/src/store/actions/logError.js.map +1 -0
- package/dist/src/store/actions/logError.test.d.ts +1 -0
- package/dist/src/store/actions/logError.test.js +27 -0
- package/dist/src/store/actions/logError.test.js.map +1 -0
- package/dist/src/store/actions/newSwap.d.ts +12 -0
- package/dist/src/store/actions/newSwap.js +34 -0
- package/dist/src/store/actions/newSwap.js.map +1 -0
- package/dist/src/store/actions/performNextAction/index.d.ts +7 -0
- package/dist/src/store/actions/performNextAction/index.js +65 -0
- package/dist/src/store/actions/performNextAction/index.js.map +1 -0
- package/dist/src/store/actions/performNextAction/send.d.ts +7 -0
- package/dist/src/store/actions/performNextAction/send.js +54 -0
- package/dist/src/store/actions/performNextAction/send.js.map +1 -0
- package/dist/src/store/actions/performNextAction/sendNFT.d.ts +7 -0
- package/dist/src/store/actions/performNextAction/sendNFT.js +50 -0
- package/dist/src/store/actions/performNextAction/sendNFT.js.map +1 -0
- package/dist/src/store/actions/performNextAction/utils.d.ts +11 -0
- package/dist/src/store/actions/performNextAction/utils.js +42 -0
- package/dist/src/store/actions/performNextAction/utils.js.map +1 -0
- package/dist/src/store/actions/proxyMutation.d.ts +5 -0
- package/dist/src/store/actions/proxyMutation.js +9 -0
- package/dist/src/store/actions/proxyMutation.js.map +1 -0
- package/dist/src/store/actions/removeCustomToken.d.ts +7 -0
- package/dist/src/store/actions/removeCustomToken.js +11 -0
- package/dist/src/store/actions/removeCustomToken.js.map +1 -0
- package/dist/src/store/actions/retrySwap.d.ts +5 -0
- package/dist/src/store/actions/retrySwap.js +23 -0
- package/dist/src/store/actions/retrySwap.js.map +1 -0
- package/dist/src/store/actions/sendNFTTransaction.d.ts +4 -0
- package/dist/src/store/actions/sendNFTTransaction.js +47 -0
- package/dist/src/store/actions/sendNFTTransaction.js.map +1 -0
- package/dist/src/store/actions/sendTransaction.d.ts +17 -0
- package/dist/src/store/actions/sendTransaction.js +51 -0
- package/dist/src/store/actions/sendTransaction.js.map +1 -0
- package/dist/src/store/actions/sendTransaction.test.d.ts +1 -0
- package/dist/src/store/actions/sendTransaction.test.js +80 -0
- package/dist/src/store/actions/sendTransaction.test.js.map +1 -0
- package/dist/src/store/actions/setEthereumInjectionChain.d.ts +5 -0
- package/dist/src/store/actions/setEthereumInjectionChain.js +11 -0
- package/dist/src/store/actions/setEthereumInjectionChain.js.map +1 -0
- package/dist/src/store/actions/setEthereumInjectionChain.test.d.ts +1 -0
- package/dist/src/store/actions/setEthereumInjectionChain.test.js +20 -0
- package/dist/src/store/actions/setEthereumInjectionChain.test.js.map +1 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.d.ts +4 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.js +10 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.js.map +1 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.test.d.ts +1 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.test.js +24 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.test.js.map +1 -0
- package/dist/src/store/actions/showNotification.d.ts +2 -0
- package/dist/src/store/actions/showNotification.js +10 -0
- package/dist/src/store/actions/showNotification.js.map +1 -0
- package/dist/src/store/actions/toggleExperiment.d.ts +5 -0
- package/dist/src/store/actions/toggleExperiment.js +10 -0
- package/dist/src/store/actions/toggleExperiment.js.map +1 -0
- package/dist/src/store/actions/toggleExperiment.test.d.ts +1 -0
- package/dist/src/store/actions/toggleExperiment.test.js +34 -0
- package/dist/src/store/actions/toggleExperiment.test.js.map +1 -0
- package/dist/src/store/actions/toggleNFTStarred.d.ts +8 -0
- package/dist/src/store/actions/toggleNFTStarred.js +10 -0
- package/dist/src/store/actions/toggleNFTStarred.js.map +1 -0
- package/dist/src/store/actions/unlockWallet.d.ts +4 -0
- package/dist/src/store/actions/unlockWallet.js +22 -0
- package/dist/src/store/actions/unlockWallet.js.map +1 -0
- package/dist/src/store/actions/updateAccountBalance.d.ts +7 -0
- package/dist/src/store/actions/updateAccountBalance.js +29 -0
- package/dist/src/store/actions/updateAccountBalance.js.map +1 -0
- package/dist/src/store/actions/updateBalances.d.ts +9 -0
- package/dist/src/store/actions/updateBalances.js +169 -0
- package/dist/src/store/actions/updateBalances.js.map +1 -0
- package/dist/src/store/actions/updateBalances.test.d.ts +1 -0
- package/dist/src/store/actions/updateBalances.test.js +43 -0
- package/dist/src/store/actions/updateBalances.test.js.map +1 -0
- package/dist/src/store/actions/updateCurrenciesInfo.d.ts +5 -0
- package/dist/src/store/actions/updateCurrenciesInfo.js +14 -0
- package/dist/src/store/actions/updateCurrenciesInfo.js.map +1 -0
- package/dist/src/store/actions/updateFees.d.ts +6 -0
- package/dist/src/store/actions/updateFees.js +16 -0
- package/dist/src/store/actions/updateFees.js.map +1 -0
- package/dist/src/store/actions/updateFees.test.d.ts +1 -0
- package/dist/src/store/actions/updateFees.test.js +86 -0
- package/dist/src/store/actions/updateFees.test.js.map +1 -0
- package/dist/src/store/actions/updateFiatRates.d.ts +5 -0
- package/dist/src/store/actions/updateFiatRates.js +15 -0
- package/dist/src/store/actions/updateFiatRates.js.map +1 -0
- package/dist/src/store/actions/updateFiatRates.test.d.ts +1 -0
- package/dist/src/store/actions/updateFiatRates.test.js +43 -0
- package/dist/src/store/actions/updateFiatRates.test.js.map +1 -0
- package/dist/src/store/actions/updateMarketData.d.ts +8 -0
- package/dist/src/store/actions/updateMarketData.js +28 -0
- package/dist/src/store/actions/updateMarketData.js.map +1 -0
- package/dist/src/store/actions/updateMarketData.test.d.ts +1 -0
- package/dist/src/store/actions/updateMarketData.test.js +49 -0
- package/dist/src/store/actions/updateMarketData.test.js.map +1 -0
- package/dist/src/store/actions/updateNFTs.d.ts +7 -0
- package/dist/src/store/actions/updateNFTs.js +39 -0
- package/dist/src/store/actions/updateNFTs.js.map +1 -0
- package/dist/src/store/actions/updateNFTs.test.d.ts +1 -0
- package/dist/src/store/actions/updateNFTs.test.js +32 -0
- package/dist/src/store/actions/updateNFTs.test.js.map +1 -0
- package/dist/src/store/actions/updateTransactionFee.d.ts +11 -0
- package/dist/src/store/actions/updateTransactionFee.js +81 -0
- package/dist/src/store/actions/updateTransactionFee.js.map +1 -0
- package/dist/src/store/broker/notification.d.ts +4 -0
- package/dist/src/store/broker/notification.js +84 -0
- package/dist/src/store/broker/notification.js.map +1 -0
- package/dist/src/store/getters.d.ts +59 -0
- package/dist/src/store/getters.js +350 -0
- package/dist/src/store/getters.js.map +1 -0
- package/dist/src/store/index.d.ts +3524 -0
- package/dist/src/store/index.js +24 -0
- package/dist/src/store/index.js.map +1 -0
- package/dist/src/store/migrations/10_analytics_settings.d.ts +4 -0
- package/dist/src/store/migrations/10_analytics_settings.js +19 -0
- package/dist/src/store/migrations/10_analytics_settings.js.map +1 -0
- package/dist/src/store/migrations/11_12_rsk_legacy_derivation_path.d.ts +8 -0
- package/dist/src/store/migrations/11_12_rsk_legacy_derivation_path.js +22 -0
- package/dist/src/store/migrations/11_12_rsk_legacy_derivation_path.js.map +1 -0
- package/dist/src/store/migrations/13_rsk_fish_token.d.ts +4 -0
- package/dist/src/store/migrations/13_rsk_fish_token.js +19 -0
- package/dist/src/store/migrations/13_rsk_fish_token.js.map +1 -0
- package/dist/src/store/migrations/14_account_set_derivation_path.d.ts +4 -0
- package/dist/src/store/migrations/14_account_set_derivation_path.js +56 -0
- package/dist/src/store/migrations/14_account_set_derivation_path.js.map +1 -0
- package/dist/src/store/migrations/15_accounts_chains_set_enabled.d.ts +4 -0
- package/dist/src/store/migrations/15_accounts_chains_set_enabled.js +25 -0
- package/dist/src/store/migrations/15_accounts_chains_set_enabled.js.map +1 -0
- package/dist/src/store/migrations/16_enable_terra_chain.d.ts +4 -0
- package/dist/src/store/migrations/16_enable_terra_chain.js +10 -0
- package/dist/src/store/migrations/16_enable_terra_chain.js.map +1 -0
- package/dist/src/store/migrations/17_remove_injection_enabled.d.ts +4 -0
- package/dist/src/store/migrations/17_remove_injection_enabled.js +12 -0
- package/dist/src/store/migrations/17_remove_injection_enabled.js.map +1 -0
- package/dist/src/store/migrations/18_enable_avalanche_chain.d.ts +4 -0
- package/dist/src/store/migrations/18_enable_avalanche_chain.js +10 -0
- package/dist/src/store/migrations/18_enable_avalanche_chain.js.map +1 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts.d.ts +4 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts.js +25 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts.js.map +1 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts.state.pre.json +1944 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts_test.d.ts +1 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts_test.js +7 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts_test.js.map +1 -0
- package/dist/src/store/migrations/1_first_migration.d.ts +4 -0
- package/dist/src/store/migrations/1_first_migration.js +11 -0
- package/dist/src/store/migrations/1_first_migration.js.map +1 -0
- package/dist/src/store/migrations/20_fix_accounts.d.ts +4 -0
- package/dist/src/store/migrations/20_fix_accounts.js +68 -0
- package/dist/src/store/migrations/20_fix_accounts.js.map +1 -0
- package/dist/src/store/migrations/21_enable_solana_chain.d.ts +4 -0
- package/dist/src/store/migrations/21_enable_solana_chain.js +10 -0
- package/dist/src/store/migrations/21_enable_solana_chain.js.map +1 -0
- package/dist/src/store/migrations/22_enable_optimism_chain.d.ts +4 -0
- package/dist/src/store/migrations/22_enable_optimism_chain.js +10 -0
- package/dist/src/store/migrations/22_enable_optimism_chain.js.map +1 -0
- package/dist/src/store/migrations/2_set_default_assets.d.ts +4 -0
- package/dist/src/store/migrations/2_set_default_assets.js +20 -0
- package/dist/src/store/migrations/2_set_default_assets.js.map +1 -0
- package/dist/src/store/migrations/3_add_network_custom_tokens.d.ts +4 -0
- package/dist/src/store/migrations/3_add_network_custom_tokens.js +21 -0
- package/dist/src/store/migrations/3_add_network_custom_tokens.js.map +1 -0
- package/dist/src/store/migrations/4_fix_rsk_token_injected_asset.d.ts +4 -0
- package/dist/src/store/migrations/4_fix_rsk_token_injected_asset.js +15 -0
- package/dist/src/store/migrations/4_fix_rsk_token_injected_asset.js.map +1 -0
- package/dist/src/store/migrations/5_multiple_account_support.d.ts +4 -0
- package/dist/src/store/migrations/5_multiple_account_support.js +96 -0
- package/dist/src/store/migrations/5_multiple_account_support.js.map +1 -0
- package/dist/src/store/migrations/6_use_ledger_live_default.d.ts +4 -0
- package/dist/src/store/migrations/6_use_ledger_live_default.js +11 -0
- package/dist/src/store/migrations/6_use_ledger_live_default.js.map +1 -0
- package/dist/src/store/migrations/7_multi_provider_swaps.d.ts +4 -0
- package/dist/src/store/migrations/7_multi_provider_swaps.js +27 -0
- package/dist/src/store/migrations/7_multi_provider_swaps.js.map +1 -0
- package/dist/src/store/migrations/8_remove_use_ledger_live.d.ts +4 -0
- package/dist/src/store/migrations/8_remove_use_ledger_live.js +12 -0
- package/dist/src/store/migrations/8_remove_use_ledger_live.js.map +1 -0
- package/dist/src/store/migrations/9_inject_ethereum_asset_chain.d.ts +4 -0
- package/dist/src/store/migrations/9_inject_ethereum_asset_chain.js +14 -0
- package/dist/src/store/migrations/9_inject_ethereum_asset_chain.js.map +1 -0
- package/dist/src/store/migrations/before_after_migration_script.test.d.ts +1 -0
- package/dist/src/store/migrations/before_after_migration_script.test.js +92 -0
- package/dist/src/store/migrations/before_after_migration_script.test.js.map +1 -0
- package/dist/src/store/migrations/enable_chain.d.ts +3 -0
- package/dist/src/store/migrations/enable_chain.js +71 -0
- package/dist/src/store/migrations/enable_chain.js.map +1 -0
- package/dist/src/store/migrations/index.d.ts +5 -0
- package/dist/src/store/migrations/index.js +78 -0
- package/dist/src/store/migrations/index.js.map +1 -0
- package/dist/src/store/migrations/migration_script.test.d.ts +1 -0
- package/dist/src/store/migrations/migration_script.test.js +59 -0
- package/dist/src/store/migrations/migration_script.test.js.map +1 -0
- package/dist/src/store/mutations.d.ts +209 -0
- package/dist/src/store/mutations.js +348 -0
- package/dist/src/store/mutations.js.map +1 -0
- package/dist/src/store/state.d.ts +3 -0
- package/dist/src/store/state.js +46 -0
- package/dist/src/store/state.js.map +1 -0
- package/dist/src/store/types.d.ts +249 -0
- package/dist/src/store/types.js +64 -0
- package/dist/src/store/types.js.map +1 -0
- package/dist/src/store/utils.d.ts +38 -0
- package/dist/src/store/utils.js +194 -0
- package/dist/src/store/utils.js.map +1 -0
- package/dist/src/swaps/EvmSwapProvider.d.ts +32 -0
- package/dist/src/swaps/EvmSwapProvider.js +118 -0
- package/dist/src/swaps/EvmSwapProvider.js.map +1 -0
- package/dist/src/swaps/SwapProvider.d.ts +35 -0
- package/dist/src/swaps/SwapProvider.js +89 -0
- package/dist/src/swaps/SwapProvider.js.map +1 -0
- package/dist/src/swaps/astroport/AstroportSwapProvider.d.ts +67 -0
- package/dist/src/swaps/astroport/AstroportSwapProvider.js +251 -0
- package/dist/src/swaps/astroport/AstroportSwapProvider.js.map +1 -0
- package/dist/src/swaps/astroport/info.json +7 -0
- package/dist/src/swaps/astroport/queries.d.ts +108 -0
- package/dist/src/swaps/astroport/queries.js +227 -0
- package/dist/src/swaps/astroport/queries.js.map +1 -0
- package/dist/src/swaps/debridge/DeBridgeSwapProvider.d.ts +98 -0
- package/dist/src/swaps/debridge/DeBridgeSwapProvider.js +553 -0
- package/dist/src/swaps/debridge/DeBridgeSwapProvider.js.map +1 -0
- package/dist/src/swaps/debridge/abi/DeBridgeGate.json +1958 -0
- package/dist/src/swaps/debridge/abi/SignatureVerifier.json +925 -0
- package/dist/src/swaps/debridge/info.json +13 -0
- package/dist/src/swaps/fastbtc/FastBTCDepositSwapProvider.d.ts +103 -0
- package/dist/src/swaps/fastbtc/FastBTCDepositSwapProvider.js +292 -0
- package/dist/src/swaps/fastbtc/FastBTCDepositSwapProvider.js.map +1 -0
- package/dist/src/swaps/fastbtc/FastBTCWithdrawSwapProvider.d.ts +108 -0
- package/dist/src/swaps/fastbtc/FastBTCWithdrawSwapProvider.js +306 -0
- package/dist/src/swaps/fastbtc/FastBTCWithdrawSwapProvider.js.map +1 -0
- package/dist/src/swaps/fastbtc/fastBtcBridgeContract.d.ts +19 -0
- package/dist/src/swaps/fastbtc/fastBtcBridgeContract.js +24 -0
- package/dist/src/swaps/fastbtc/fastBtcBridgeContract.js.map +1 -0
- package/dist/src/swaps/fastbtc/info.json +7 -0
- package/dist/src/swaps/hop/HopSwapProvider.d.ts +124 -0
- package/dist/src/swaps/hop/HopSwapProvider.js +479 -0
- package/dist/src/swaps/hop/HopSwapProvider.js.map +1 -0
- package/dist/src/swaps/hop/info.json +12 -0
- package/dist/src/swaps/hop/queries.d.ts +2 -0
- package/dist/src/swaps/hop/queries.js +61 -0
- package/dist/src/swaps/hop/queries.js.map +1 -0
- package/dist/src/swaps/jupiter/JupiterSwapProvider.d.ts +46 -0
- package/dist/src/swaps/jupiter/JupiterSwapProvider.js +189 -0
- package/dist/src/swaps/jupiter/JupiterSwapProvider.js.map +1 -0
- package/dist/src/swaps/jupiter/info.json +7 -0
- package/dist/src/swaps/lifi/LifiSwapProvider.d.ts +76 -0
- package/dist/src/swaps/lifi/LifiSwapProvider.js +313 -0
- package/dist/src/swaps/lifi/LifiSwapProvider.js.map +1 -0
- package/dist/src/swaps/lifi/info.json +7 -0
- package/dist/src/swaps/liquality/LiqualitySwapProvider.d.ts +104 -0
- package/dist/src/swaps/liquality/LiqualitySwapProvider.js +704 -0
- package/dist/src/swaps/liquality/LiqualitySwapProvider.js.map +1 -0
- package/dist/src/swaps/liquality/info.json +7 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/LiqualityBoostERC20toNative.d.ts +124 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/LiqualityBoostERC20toNative.js +239 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/LiqualityBoostERC20toNative.js.map +1 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/info.json +7 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/LiqualityBoostNativeToERC20.d.ts +52 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/LiqualityBoostNativeToERC20.js +213 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/LiqualityBoostNativeToERC20.js.map +1 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/info.json +7 -0
- package/dist/src/swaps/liqualityboost/types.d.ts +17 -0
- package/dist/src/swaps/liqualityboost/types.js +3 -0
- package/dist/src/swaps/liqualityboost/types.js.map +1 -0
- package/dist/src/swaps/oneinch/OneinchSwapProvider.d.ts +86 -0
- package/dist/src/swaps/oneinch/OneinchSwapProvider.js +369 -0
- package/dist/src/swaps/oneinch/OneinchSwapProvider.js.map +1 -0
- package/dist/src/swaps/oneinch/info.json +13 -0
- package/dist/src/swaps/sovryn/SovrynSwapProvider.d.ts +110 -0
- package/dist/src/swaps/sovryn/SovrynSwapProvider.js +369 -0
- package/dist/src/swaps/sovryn/SovrynSwapProvider.js.map +1 -0
- package/dist/src/swaps/sovryn/info.json +7 -0
- package/dist/src/swaps/teleswap/TeleSwapSwapProvider.d.ts +167 -0
- package/dist/src/swaps/teleswap/TeleSwapSwapProvider.js +874 -0
- package/dist/src/swaps/teleswap/TeleSwapSwapProvider.js.map +1 -0
- package/dist/src/swaps/teleswap/info.json +7 -0
- package/dist/src/swaps/thorchain/ThorchainSwapProvider.d.ts +194 -0
- package/dist/src/swaps/thorchain/ThorchainSwapProvider.js +534 -0
- package/dist/src/swaps/thorchain/ThorchainSwapProvider.js.map +1 -0
- package/dist/src/swaps/thorchain/info.json +7 -0
- package/dist/src/swaps/types.d.ts +87 -0
- package/dist/src/swaps/types.js +9 -0
- package/dist/src/swaps/types.js.map +1 -0
- package/dist/src/swaps/uniswap/UniswapSwapProvider.d.ts +117 -0
- package/dist/src/swaps/uniswap/UniswapSwapProvider.js +438 -0
- package/dist/src/swaps/uniswap/UniswapSwapProvider.js.map +1 -0
- package/dist/src/swaps/uniswap/info.json +7 -0
- package/dist/src/swaps/utils.d.ts +92 -0
- package/dist/src/swaps/utils.js +57 -0
- package/dist/src/swaps/utils.js.map +1 -0
- package/dist/src/tsconfig.json +30 -0
- package/dist/src/types.d.ts +29 -0
- package/dist/src/types.js +3 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/accounts.d.ts +16 -0
- package/dist/src/utils/accounts.js +89 -0
- package/dist/src/utils/accounts.js.map +1 -0
- package/dist/src/utils/address.d.ts +8 -0
- package/dist/src/utils/address.js +17 -0
- package/dist/src/utils/address.js.map +1 -0
- package/dist/src/utils/address.test.d.ts +1 -0
- package/dist/src/utils/address.test.js +12 -0
- package/dist/src/utils/address.test.js.map +1 -0
- package/dist/src/utils/asset.d.ts +22 -0
- package/dist/src/utils/asset.js +198 -0
- package/dist/src/utils/asset.js.map +1 -0
- package/dist/src/utils/asset.test.d.ts +1 -0
- package/dist/src/utils/asset.test.js +42 -0
- package/dist/src/utils/asset.test.js.map +1 -0
- package/dist/src/utils/chainify.d.ts +3 -0
- package/dist/src/utils/chainify.js +41 -0
- package/dist/src/utils/chainify.js.map +1 -0
- package/dist/src/utils/coinFormatter.d.ts +13 -0
- package/dist/src/utils/coinFormatter.js +58 -0
- package/dist/src/utils/coinFormatter.js.map +1 -0
- package/dist/src/utils/crypto.d.ts +6 -0
- package/dist/src/utils/crypto.js +70 -0
- package/dist/src/utils/crypto.js.map +1 -0
- package/dist/src/utils/cryptoassets.d.ts +5 -0
- package/dist/src/utils/cryptoassets.js +26 -0
- package/dist/src/utils/cryptoassets.js.map +1 -0
- package/dist/src/utils/derivationPath.d.ts +6 -0
- package/dist/src/utils/derivationPath.js +75 -0
- package/dist/src/utils/derivationPath.js.map +1 -0
- package/dist/src/utils/derivationPath.spec.d.ts +1 -0
- package/dist/src/utils/derivationPath.spec.js +37 -0
- package/dist/src/utils/derivationPath.spec.js.map +1 -0
- package/dist/src/utils/export.d.ts +5 -0
- package/dist/src/utils/export.js +24 -0
- package/dist/src/utils/export.js.map +1 -0
- package/dist/src/utils/fees.d.ts +43 -0
- package/dist/src/utils/fees.js +222 -0
- package/dist/src/utils/fees.js.map +1 -0
- package/dist/src/utils/fees.test.d.ts +1 -0
- package/dist/src/utils/fees.test.js +40 -0
- package/dist/src/utils/fees.test.js.map +1 -0
- package/dist/src/utils/fetchTokenDetails.d.ts +1 -0
- package/dist/src/utils/fetchTokenDetails.js +19 -0
- package/dist/src/utils/fetchTokenDetails.js.map +1 -0
- package/dist/src/utils/history.d.ts +66 -0
- package/dist/src/utils/history.js +135 -0
- package/dist/src/utils/history.js.map +1 -0
- package/dist/src/utils/isTransactionNotFoundError.d.ts +1 -0
- package/dist/src/utils/isTransactionNotFoundError.js +16 -0
- package/dist/src/utils/isTransactionNotFoundError.js.map +1 -0
- package/dist/src/utils/ledger.d.ts +12 -0
- package/dist/src/utils/ledger.js +38 -0
- package/dist/src/utils/ledger.js.map +1 -0
- package/dist/src/utils/moment.d.ts +2 -0
- package/dist/src/utils/moment.js +8 -0
- package/dist/src/utils/moment.js.map +1 -0
- package/dist/src/utils/networks.d.ts +10 -0
- package/dist/src/utils/networks.js +43 -0
- package/dist/src/utils/networks.js.map +1 -0
- package/dist/src/utils/parseTokenTx.d.ts +2 -0
- package/dist/src/utils/parseTokenTx.js +10 -0
- package/dist/src/utils/parseTokenTx.js.map +1 -0
- package/dist/src/utils/quotes.d.ts +5 -0
- package/dist/src/utils/quotes.js +20 -0
- package/dist/src/utils/quotes.js.map +1 -0
- package/dist/src/utils/quotes.test.d.ts +1 -0
- package/dist/src/utils/quotes.test.js +85 -0
- package/dist/src/utils/quotes.test.js.map +1 -0
- package/dist/src/utils/timeline.d.ts +71 -0
- package/dist/src/utils/timeline.js +176 -0
- package/dist/src/utils/timeline.js.map +1 -0
- package/dist/src/walletOptions/defaultOptions.d.ts +3 -0
- package/dist/src/walletOptions/defaultOptions.js +36 -0
- package/dist/src/walletOptions/defaultOptions.js.map +1 -0
- package/dist/src/walletOptions/index.d.ts +7 -0
- package/dist/src/walletOptions/index.js +11 -0
- package/dist/src/walletOptions/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Network, SwapProviderType } from '../store/types';
|
|
2
|
+
declare function getSwapProviderConfig(network: Network, providerId: SwapProviderType): import("../build.config").SwapProviderDefinition | undefined;
|
|
3
|
+
declare function getSwapProviderInfo(network: Network, providerId: SwapProviderType): {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
pros: string[];
|
|
7
|
+
cons: string[];
|
|
8
|
+
fees: string[];
|
|
9
|
+
} | {
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
pros: string[];
|
|
13
|
+
cons: string[];
|
|
14
|
+
fees: string[];
|
|
15
|
+
} | {
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
pros: string[];
|
|
19
|
+
cons: string[];
|
|
20
|
+
fees: string[];
|
|
21
|
+
} | {
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
pros: string[];
|
|
25
|
+
cons: string[];
|
|
26
|
+
fees: string[];
|
|
27
|
+
} | {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
pros: string[];
|
|
31
|
+
cons: string[];
|
|
32
|
+
fees: string[];
|
|
33
|
+
} | {
|
|
34
|
+
title: string;
|
|
35
|
+
description: string;
|
|
36
|
+
pros: string[];
|
|
37
|
+
cons: string[];
|
|
38
|
+
fees: string[];
|
|
39
|
+
} | {
|
|
40
|
+
title: string;
|
|
41
|
+
description: string;
|
|
42
|
+
pros: string[];
|
|
43
|
+
cons: string[];
|
|
44
|
+
fees: string[];
|
|
45
|
+
} | {
|
|
46
|
+
title: string;
|
|
47
|
+
description: string;
|
|
48
|
+
pros: string[];
|
|
49
|
+
cons: string[];
|
|
50
|
+
fees: string[];
|
|
51
|
+
} | {
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
pros: string[];
|
|
55
|
+
cons: string[];
|
|
56
|
+
fees: string[];
|
|
57
|
+
} | {
|
|
58
|
+
title: string;
|
|
59
|
+
description: string;
|
|
60
|
+
pros: string[];
|
|
61
|
+
cons: string[];
|
|
62
|
+
fees: string[];
|
|
63
|
+
} | {
|
|
64
|
+
title: string;
|
|
65
|
+
description: string;
|
|
66
|
+
pros: string[];
|
|
67
|
+
cons: string[];
|
|
68
|
+
fees: string[];
|
|
69
|
+
} | {
|
|
70
|
+
title: string;
|
|
71
|
+
description: string;
|
|
72
|
+
pros: string[];
|
|
73
|
+
cons: string[];
|
|
74
|
+
fees: string[];
|
|
75
|
+
} | {
|
|
76
|
+
title: string;
|
|
77
|
+
description: string;
|
|
78
|
+
pros: string[];
|
|
79
|
+
cons: string[];
|
|
80
|
+
fees: string[];
|
|
81
|
+
} | {
|
|
82
|
+
title: string;
|
|
83
|
+
description: string;
|
|
84
|
+
pros: string[];
|
|
85
|
+
cons: string[];
|
|
86
|
+
fees: string[];
|
|
87
|
+
};
|
|
88
|
+
declare const getLiqualityLiquidityForAsset: ({ asset, network, }: {
|
|
89
|
+
asset: string;
|
|
90
|
+
network: Network;
|
|
91
|
+
}) => Promise<number>;
|
|
92
|
+
export { getSwapProviderConfig, getSwapProviderInfo, getLiqualityLiquidityForAsset };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLiqualityLiquidityForAsset = exports.getSwapProviderInfo = exports.getSwapProviderConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const build_config_1 = tslib_1.__importDefault(require("../build.config"));
|
|
6
|
+
const factory_1 = require("../factory");
|
|
7
|
+
const types_1 = require("../store/types");
|
|
8
|
+
const info_json_1 = tslib_1.__importDefault(require("./astroport/info.json"));
|
|
9
|
+
const info_json_2 = tslib_1.__importDefault(require("./fastbtc/info.json"));
|
|
10
|
+
const info_json_3 = tslib_1.__importDefault(require("./hop/info.json"));
|
|
11
|
+
const info_json_4 = tslib_1.__importDefault(require("./lifi/info.json"));
|
|
12
|
+
const info_json_5 = tslib_1.__importDefault(require("./jupiter/info.json"));
|
|
13
|
+
const info_json_6 = tslib_1.__importDefault(require("./liquality/info.json"));
|
|
14
|
+
const info_json_7 = tslib_1.__importDefault(require("./liqualityboost/liqualityBoostERC20toNative/info.json"));
|
|
15
|
+
const info_json_8 = tslib_1.__importDefault(require("./liqualityboost/liqualityBoostNativeToERC20/info.json"));
|
|
16
|
+
const info_json_9 = tslib_1.__importDefault(require("./oneinch/info.json"));
|
|
17
|
+
const info_json_10 = tslib_1.__importDefault(require("./sovryn/info.json"));
|
|
18
|
+
const info_json_11 = tslib_1.__importDefault(require("./thorchain/info.json"));
|
|
19
|
+
const info_json_12 = tslib_1.__importDefault(require("./uniswap/info.json"));
|
|
20
|
+
const info_json_13 = tslib_1.__importDefault(require("./debridge/info.json"));
|
|
21
|
+
const info_json_14 = tslib_1.__importDefault(require("./teleswap/info.json"));
|
|
22
|
+
const error_parser_1 = require("@yaswap/error-parser");
|
|
23
|
+
const swapProviderInfo = {
|
|
24
|
+
[types_1.SwapProviderType.Liquality]: info_json_6.default,
|
|
25
|
+
[types_1.SwapProviderType.UniswapV2]: info_json_12.default,
|
|
26
|
+
[types_1.SwapProviderType.OneInch]: info_json_9.default,
|
|
27
|
+
[types_1.SwapProviderType.Thorchain]: info_json_11.default,
|
|
28
|
+
[types_1.SwapProviderType.FastBTCDeposit]: info_json_2.default,
|
|
29
|
+
[types_1.SwapProviderType.FastBTCWithdraw]: info_json_2.default,
|
|
30
|
+
[types_1.SwapProviderType.LiqualityBoostNativeToERC20]: info_json_8.default,
|
|
31
|
+
[types_1.SwapProviderType.LiqualityBoostERC20ToNative]: info_json_7.default,
|
|
32
|
+
[types_1.SwapProviderType.Sovryn]: info_json_10.default,
|
|
33
|
+
[types_1.SwapProviderType.Astroport]: info_json_1.default,
|
|
34
|
+
[types_1.SwapProviderType.Hop]: info_json_3.default,
|
|
35
|
+
[types_1.SwapProviderType.Jupiter]: info_json_5.default,
|
|
36
|
+
[types_1.SwapProviderType.DeBridge]: info_json_13.default,
|
|
37
|
+
[types_1.SwapProviderType.LiFi]: info_json_4.default,
|
|
38
|
+
[types_1.SwapProviderType.TeleSwap]: info_json_14.default,
|
|
39
|
+
};
|
|
40
|
+
function getSwapProviderConfig(network, providerId) {
|
|
41
|
+
return build_config_1.default.swapProviders[network][providerId];
|
|
42
|
+
}
|
|
43
|
+
exports.getSwapProviderConfig = getSwapProviderConfig;
|
|
44
|
+
function getSwapProviderInfo(network, providerId) {
|
|
45
|
+
const config = getSwapProviderConfig(network, providerId);
|
|
46
|
+
if (!config) {
|
|
47
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.SwapProvider.Config(providerId, network));
|
|
48
|
+
}
|
|
49
|
+
return swapProviderInfo[config.type];
|
|
50
|
+
}
|
|
51
|
+
exports.getSwapProviderInfo = getSwapProviderInfo;
|
|
52
|
+
const getLiqualityLiquidityForAsset = ({ asset, network, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
+
const swapProvider = (0, factory_1.getSwapProvider)(network, types_1.SwapProviderType.Liquality);
|
|
54
|
+
return swapProvider.getAssetLiquidity(asset);
|
|
55
|
+
});
|
|
56
|
+
exports.getLiqualityLiquidityForAsset = getLiqualityLiquidityForAsset;
|
|
57
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/swaps/utils.ts"],"names":[],"mappings":";;;;AAAA,2EAA0C;AAC1C,wCAA6C;AAC7C,0CAA2D;AAC3D,8EAAkD;AAClD,4EAA8C;AAC9C,wEAAsC;AACtC,yEAAwC;AACxC,4EAA8C;AAC9C,8EAAkD;AAClD,+GAAqG;AACrG,+GAAqG;AACrG,4EAA8C;AAC9C,4EAA4C;AAC5C,+EAAkD;AAClD,6EAA8C;AAC9C,8EAAgD;AAChD,8EAAgD;AAEhD,uDAA0E;AAE1E,MAAM,gBAAgB,GAAG;IACvB,CAAC,wBAAgB,CAAC,SAAS,CAAC,EAAE,mBAAa;IAC3C,CAAC,wBAAgB,CAAC,SAAS,CAAC,EAAE,oBAAW;IACzC,CAAC,wBAAgB,CAAC,OAAO,CAAC,EAAE,mBAAW;IACvC,CAAC,wBAAgB,CAAC,SAAS,CAAC,EAAE,oBAAa;IAC3C,CAAC,wBAAgB,CAAC,cAAc,CAAC,EAAE,mBAAW;IAC9C,CAAC,wBAAgB,CAAC,eAAe,CAAC,EAAE,mBAAW;IAC/C,CAAC,wBAAgB,CAAC,2BAA2B,CAAC,EAAE,mBAA+B;IAC/E,CAAC,wBAAgB,CAAC,2BAA2B,CAAC,EAAE,mBAA+B;IAC/E,CAAC,wBAAgB,CAAC,MAAM,CAAC,EAAE,oBAAU;IACrC,CAAC,wBAAgB,CAAC,SAAS,CAAC,EAAE,mBAAa;IAC3C,CAAC,wBAAgB,CAAC,GAA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terop": true,
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"importHelpers": true,
|
|
11
|
+
"alwaysStrict": true,
|
|
12
|
+
"sourceMap": true,
|
|
13
|
+
"forceConsistentCasingInFileNames": true,
|
|
14
|
+
"noFallthroughCasesInSwitch": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noImplicitAny": true,
|
|
18
|
+
"noImplicitThis": true,
|
|
19
|
+
"strictNullChecks": true,
|
|
20
|
+
"rootDir": ".",
|
|
21
|
+
"outDir": "../dist/",
|
|
22
|
+
"removeComments": true,
|
|
23
|
+
"resolveJsonModule": true,
|
|
24
|
+
"skipLibCheck": true
|
|
25
|
+
},
|
|
26
|
+
"include": ["**/*"],
|
|
27
|
+
"references": [
|
|
28
|
+
{ "path": "../" }
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TransportCreator } from '@yaswap/hw-ledger';
|
|
2
|
+
import { Network } from '@yaswap/types';
|
|
3
|
+
import { RootState } from './store/types';
|
|
4
|
+
export interface ParsedCipherText {
|
|
5
|
+
ct: string;
|
|
6
|
+
iv: string;
|
|
7
|
+
s: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Notification {
|
|
10
|
+
title: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
export interface WalletOptions {
|
|
14
|
+
initialState?: RootState;
|
|
15
|
+
crypto: {
|
|
16
|
+
pbkdf2(password: string, salt: string, iterations: number, length: number, digest: string): Promise<string>;
|
|
17
|
+
encrypt(value: string, key: string): Promise<any>;
|
|
18
|
+
decrypt(value: any, key: string): Promise<any>;
|
|
19
|
+
};
|
|
20
|
+
createNotification(notification: Notification): void;
|
|
21
|
+
ledgerTransportCreator?: TransportCreator;
|
|
22
|
+
}
|
|
23
|
+
export interface ChainifyNetwork extends Network {
|
|
24
|
+
yacoinEsploraApis?: string;
|
|
25
|
+
yacoinEsploraSwapApis?: string;
|
|
26
|
+
scraperUrl?: string;
|
|
27
|
+
batchScraperUrl?: string;
|
|
28
|
+
feeProviderUrl?: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChainId } from '@yaswap/cryptoassets';
|
|
2
|
+
import { Account, AccountDefinition, Network, WalletId } from '../store/types';
|
|
3
|
+
export declare const accountCreator: (payload: {
|
|
4
|
+
network: Network;
|
|
5
|
+
walletId: WalletId;
|
|
6
|
+
account: AccountDefinition;
|
|
7
|
+
}) => Account;
|
|
8
|
+
export declare const accountColors: string[];
|
|
9
|
+
export declare const getNextAccountColor: (chain: ChainId, index: number) => string;
|
|
10
|
+
export declare const ACCOUNT_TYPE_OPTIONS: {
|
|
11
|
+
name: string;
|
|
12
|
+
label: string;
|
|
13
|
+
type: string;
|
|
14
|
+
chain: ChainId;
|
|
15
|
+
blockchain: string;
|
|
16
|
+
}[];
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ACCOUNT_TYPE_OPTIONS = exports.getNextAccountColor = exports.accountColors = exports.accountCreator = void 0;
|
|
4
|
+
const cryptoassets_1 = require("@yaswap/cryptoassets");
|
|
5
|
+
const error_parser_1 = require("@yaswap/error-parser");
|
|
6
|
+
const uuid_1 = require("uuid");
|
|
7
|
+
const types_1 = require("../store/types");
|
|
8
|
+
const derivationPath_1 = require("./derivationPath");
|
|
9
|
+
const accountCreator = (payload) => {
|
|
10
|
+
const { network, walletId, account } = payload;
|
|
11
|
+
const { name, alias, chain, index, addresses, assets, balances, type, color, chainCode, publicKey } = account;
|
|
12
|
+
const enabled = account.enabled !== null && account.enabled !== undefined ? account.enabled : true;
|
|
13
|
+
const _addresses = addresses.map((a) => {
|
|
14
|
+
return (0, cryptoassets_1.getChain)(network, chain).formatAddress(a);
|
|
15
|
+
});
|
|
16
|
+
const derivationPath = account.derivationPath
|
|
17
|
+
? account.derivationPath
|
|
18
|
+
: (0, derivationPath_1.getDerivationPath)(chain, network, index, type);
|
|
19
|
+
const id = (0, uuid_1.v4)();
|
|
20
|
+
const createdAt = Date.now();
|
|
21
|
+
return {
|
|
22
|
+
id,
|
|
23
|
+
walletId,
|
|
24
|
+
type,
|
|
25
|
+
name,
|
|
26
|
+
alias,
|
|
27
|
+
chain,
|
|
28
|
+
index,
|
|
29
|
+
derivationPath,
|
|
30
|
+
addresses: _addresses,
|
|
31
|
+
assets,
|
|
32
|
+
balances: balances || {},
|
|
33
|
+
createdAt,
|
|
34
|
+
color,
|
|
35
|
+
enabled,
|
|
36
|
+
chainCode,
|
|
37
|
+
publicKey,
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
exports.accountCreator = accountCreator;
|
|
41
|
+
exports.accountColors = [
|
|
42
|
+
'#000000',
|
|
43
|
+
'#1CE5C3',
|
|
44
|
+
'#007AFF',
|
|
45
|
+
'#4F67E4',
|
|
46
|
+
'#9D4DFA',
|
|
47
|
+
'#D421EB',
|
|
48
|
+
'#FF287D',
|
|
49
|
+
'#FE7F6B',
|
|
50
|
+
'#EAB300',
|
|
51
|
+
'#F7CA4F',
|
|
52
|
+
'#A1E44A',
|
|
53
|
+
'#3AB24D',
|
|
54
|
+
'#8247E5',
|
|
55
|
+
'#bf0205',
|
|
56
|
+
];
|
|
57
|
+
const getNextAccountColor = (chain, index) => {
|
|
58
|
+
const defaultColor = (0, cryptoassets_1.getChain)(types_1.Network.Mainnet, chain).color;
|
|
59
|
+
if (!defaultColor) {
|
|
60
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.Chain.DefaultColor(chain));
|
|
61
|
+
}
|
|
62
|
+
const defaultIndex = exports.accountColors.findIndex((c) => c === defaultColor);
|
|
63
|
+
if (defaultIndex === -1) {
|
|
64
|
+
return defaultColor;
|
|
65
|
+
}
|
|
66
|
+
const finalIndex = index + defaultIndex;
|
|
67
|
+
if (finalIndex >= exports.accountColors.length) {
|
|
68
|
+
return exports.accountColors[defaultIndex];
|
|
69
|
+
}
|
|
70
|
+
return exports.accountColors[finalIndex];
|
|
71
|
+
};
|
|
72
|
+
exports.getNextAccountColor = getNextAccountColor;
|
|
73
|
+
exports.ACCOUNT_TYPE_OPTIONS = [
|
|
74
|
+
{
|
|
75
|
+
name: 'ETH',
|
|
76
|
+
label: 'ETH',
|
|
77
|
+
type: 'ethereum_imported',
|
|
78
|
+
chain: cryptoassets_1.ChainId.Ethereum,
|
|
79
|
+
blockchain: 'Ethereum Blockchain',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'BTC',
|
|
83
|
+
label: 'BTC',
|
|
84
|
+
type: 'bitcoin_imported',
|
|
85
|
+
chain: cryptoassets_1.ChainId.Bitcoin,
|
|
86
|
+
blockchain: 'Bitcoin Blockchain',
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
//# sourceMappingURL=accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/utils/accounts.ts"],"names":[],"mappings":";;;AAAA,uDAAyD;AACzD,uDAA0E;AAC1E,+BAAoC;AACpC,0CAA+E;AAC/E,qDAAqD;AAE9C,MAAM,cAAc,GAAG,CAAC,OAI9B,EAAW,EAAE;IACZ,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC/C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAE9G,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,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AAM,IAAA,kCAAmB,EAAC,4BAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;KAC7E;IACD,MAAM,YAAY,GAAG,qBAAa,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC;IACxE,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE;QACvB,OAAO,YAAY,CAAC;KACrB;IACD,MAAM,UAAU,GAAG,KAAK,GAAG,YAAY,CAAC;IACxC,IAAI,UAAU,IAAI,qBAAa,CAAC,MAAM,EAAE;QACtC,OAAO,qBAAa,CAAC,YAAY,CAAC,CAAC;KACpC;IACD,OAAO,qBAAa,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC,CAAC;AAdW,QAAA,mBAAmB,uBAc9B;AAEW,QAAA,oBAAoB,GAAG;IAClC;QACE,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,sBAAO,CAAC,QAAQ;QACvB,UAAU,EAAE,qBAAqB;KAClC;IACD;QACE,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,sBAAO,CAAC,OAAO;QACtB,UAAU,EAAE,oBAAoB;KACjC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BitcoinTypes } from '@yaswap/bitcoin';
|
|
2
|
+
export declare function shortenAddress(address: string): string;
|
|
3
|
+
export declare const BitcoinAddressType: typeof BitcoinTypes.AddressType;
|
|
4
|
+
export declare const BTC_ADDRESS_TYPE_TO_PREFIX: {
|
|
5
|
+
legacy: number;
|
|
6
|
+
"p2sh-segwit": number;
|
|
7
|
+
bech32: number;
|
|
8
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BTC_ADDRESS_TYPE_TO_PREFIX = exports.BitcoinAddressType = exports.shortenAddress = void 0;
|
|
4
|
+
const bitcoin_1 = require("@yaswap/bitcoin");
|
|
5
|
+
function shortenAddress(address) {
|
|
6
|
+
const prefix = address.startsWith('0x') ? '0x' : '';
|
|
7
|
+
const isTerra = address.startsWith('terra');
|
|
8
|
+
return `${prefix}${address.replace('0x', '').substring(0, prefix ? 4 : 6)}...${address.substring(isTerra ? address.length - 6 : address.length - 4)}`;
|
|
9
|
+
}
|
|
10
|
+
exports.shortenAddress = shortenAddress;
|
|
11
|
+
exports.BitcoinAddressType = bitcoin_1.BitcoinTypes.AddressType;
|
|
12
|
+
exports.BTC_ADDRESS_TYPE_TO_PREFIX = {
|
|
13
|
+
[exports.BitcoinAddressType.LEGACY]: 44,
|
|
14
|
+
[exports.BitcoinAddressType.P2SH_SEGWIT]: 49,
|
|
15
|
+
[exports.BitcoinAddressType.BECH32]: 84,
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../src/utils/address.ts"],"names":[],"mappings":";;;AAAA,6CAA+C;AAE/C,SAAgB,cAAc,CAAC,OAAe;IAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACpD,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5C,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,SAAS,CAC9F,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAClD,EAAE,CAAC;AACN,CAAC;AAND,wCAMC;AAEY,QAAA,kBAAkB,GAAG,sBAAY,CAAC,WAAW,CAAC;AAE9C,QAAA,0BAA0B,GAAG;IACxC,CAAC,0BAAkB,CAAC,MAAM,CAAC,EAAE,EAAE;IAC/B,CAAC,0BAAkB,CAAC,WAAW,CAAC,EAAE,EAAE;IACpC,CAAC,0BAAkB,CAAC,MAAM,CAAC,EAAE,EAAE;CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const address_1 = require("./address");
|
|
5
|
+
test('should be able to validate short address', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
6
|
+
expect((0, address_1.shortenAddress)('0x0d1f4b24cc8e8e9c0a8b0e8d8c8d8e8e8e8e8e8e8e')).toContain('...');
|
|
7
|
+
}));
|
|
8
|
+
test('should be able to validate terra short address', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
9
|
+
expect((0, address_1.shortenAddress)('0xterra1u4sntjr03074wdxtqvsamltzd2ynrsfra3502u')).toContain('...');
|
|
10
|
+
expect((0, address_1.shortenAddress)('0xterra1u4sntjr03074wdxtqvsamltzd2ynrsfra3502u')).toContain('terr');
|
|
11
|
+
}));
|
|
12
|
+
//# sourceMappingURL=address.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.test.js","sourceRoot":"","sources":["../../../src/utils/address.test.ts"],"names":[],"mappings":";;;AAAA,uCAA2C;AAE3C,IAAI,CAAC,0CAA0C,EAAE,GAAS,EAAE;IAC1D,MAAM,CAAC,IAAA,wBAAc,EAAC,8CAA8C,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC1F,CAAC,CAAA,CAAC,CAAC;AAEH,IAAI,CAAC,gDAAgD,EAAE,GAAS,EAAE;IAChE,MAAM,CAAC,IAAA,wBAAc,EAAC,gDAAgD,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC1F,MAAM,CAAC,IAAA,wBAAc,EAAC,gDAAgD,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAC7F,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as ethers from 'ethers';
|
|
2
|
+
import { Asset, Network } from '../store/types';
|
|
3
|
+
export declare const isERC20: (asset: Asset) => boolean;
|
|
4
|
+
export declare const isChainEvmCompatible: (asset: Asset, network?: Network) => boolean;
|
|
5
|
+
export declare const isAssetEvmNativeAsset: (asset: Asset, network?: Network) => boolean;
|
|
6
|
+
export declare const getNativeAsset: (asset: Asset, network?: Network) => string;
|
|
7
|
+
export declare const getFeeAsset: (asset: Asset) => string | undefined;
|
|
8
|
+
export declare const getAssetColorStyle: (asset: Asset) => {
|
|
9
|
+
color: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const getTransactionExplorerLink: (hash: string, asset: Asset, network: Network) => string;
|
|
12
|
+
export declare const getAddressExplorerLink: (address: string, asset: Asset, network: Network) => string;
|
|
13
|
+
export declare const getExplorerTransactionHash: (asset: Asset, hash: string) => string;
|
|
14
|
+
export declare const estimateGas: ({ data, to, value }: {
|
|
15
|
+
data: string;
|
|
16
|
+
to: string;
|
|
17
|
+
value: ethers.BigNumber;
|
|
18
|
+
}) => Promise<ethers.ethers.BigNumber>;
|
|
19
|
+
export declare const getMarketplaceName: (asset: Asset, network: Network) => string;
|
|
20
|
+
export declare const getNftTransferLink: (asset: Asset, network: Network, tokenId: string, contract_address: string) => string;
|
|
21
|
+
export declare const getNftLink: (asset: Asset, network: Network) => string;
|
|
22
|
+
export declare const openseaLink: (network: Network) => string;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.openseaLink = exports.getNftLink = exports.getNftTransferLink = exports.getMarketplaceName = exports.estimateGas = exports.getExplorerTransactionHash = exports.getAddressExplorerLink = exports.getTransactionExplorerLink = exports.getAssetColorStyle = exports.getFeeAsset = exports.getNativeAsset = exports.isAssetEvmNativeAsset = exports.isChainEvmCompatible = exports.isERC20 = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cryptoassets_1 = require("@yaswap/cryptoassets");
|
|
6
|
+
const error_parser_1 = require("@yaswap/error-parser");
|
|
7
|
+
const ethers = tslib_1.__importStar(require("ethers"));
|
|
8
|
+
const types_1 = require("../store/types");
|
|
9
|
+
const cryptoassets_2 = tslib_1.__importDefault(require("./cryptoassets"));
|
|
10
|
+
function getChainExplorer(chainId, network) {
|
|
11
|
+
const chain = (0, cryptoassets_1.getChain)(network, chainId);
|
|
12
|
+
const chainExplorer = chain.explorerViews[0];
|
|
13
|
+
if (!chainExplorer) {
|
|
14
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.Chain.Explorer(chainId));
|
|
15
|
+
}
|
|
16
|
+
return chainExplorer;
|
|
17
|
+
}
|
|
18
|
+
const isERC20 = (asset) => {
|
|
19
|
+
var _a;
|
|
20
|
+
return ((_a = cryptoassets_2.default[asset]) === null || _a === void 0 ? void 0 : _a.type) === cryptoassets_1.AssetTypes.erc20;
|
|
21
|
+
};
|
|
22
|
+
exports.isERC20 = isERC20;
|
|
23
|
+
const isChainEvmCompatible = (asset, network = types_1.Network.Mainnet) => {
|
|
24
|
+
var _a;
|
|
25
|
+
const chainId = (_a = cryptoassets_2.default[asset]) === null || _a === void 0 ? void 0 : _a.chain;
|
|
26
|
+
return (0, cryptoassets_1.isEvmChain)(network, chainId);
|
|
27
|
+
};
|
|
28
|
+
exports.isChainEvmCompatible = isChainEvmCompatible;
|
|
29
|
+
const isAssetEvmNativeAsset = (asset, network = types_1.Network.Mainnet) => {
|
|
30
|
+
var _a;
|
|
31
|
+
const chainId = (_a = cryptoassets_2.default[asset]) === null || _a === void 0 ? void 0 : _a.chain;
|
|
32
|
+
if (chainId) {
|
|
33
|
+
const chain = (0, cryptoassets_1.getChain)(network, chainId);
|
|
34
|
+
if (chain.isEVM && chain.nativeAsset[0].code === asset) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
};
|
|
40
|
+
exports.isAssetEvmNativeAsset = isAssetEvmNativeAsset;
|
|
41
|
+
const getNativeAsset = (asset, network = types_1.Network.Mainnet) => {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
if (((_a = cryptoassets_2.default[asset]) === null || _a === void 0 ? void 0 : _a.type) === cryptoassets_1.AssetTypes.native) {
|
|
44
|
+
return asset;
|
|
45
|
+
}
|
|
46
|
+
const chainId = (_b = cryptoassets_2.default[asset]) === null || _b === void 0 ? void 0 : _b.chain;
|
|
47
|
+
return chainId ? (0, cryptoassets_1.getNativeAssetCode)(network, chainId) : asset;
|
|
48
|
+
};
|
|
49
|
+
exports.getNativeAsset = getNativeAsset;
|
|
50
|
+
const getFeeAsset = (asset) => {
|
|
51
|
+
if (!cryptoassets_2.default[asset]) {
|
|
52
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.Asset.Default);
|
|
53
|
+
}
|
|
54
|
+
return cryptoassets_2.default[asset].feeAsset;
|
|
55
|
+
};
|
|
56
|
+
exports.getFeeAsset = getFeeAsset;
|
|
57
|
+
const getAssetColorStyle = (asset) => {
|
|
58
|
+
const assetData = cryptoassets_2.default[asset];
|
|
59
|
+
if (assetData && assetData.color) {
|
|
60
|
+
return { color: assetData.color };
|
|
61
|
+
}
|
|
62
|
+
return { color: '#000000' };
|
|
63
|
+
};
|
|
64
|
+
exports.getAssetColorStyle = getAssetColorStyle;
|
|
65
|
+
const getTransactionExplorerLink = (hash, asset, network) => {
|
|
66
|
+
const transactionHash = (0, exports.getExplorerTransactionHash)(asset, hash);
|
|
67
|
+
const chain = cryptoassets_2.default[asset].chain;
|
|
68
|
+
const link = `${getChainExplorer(chain, network).tx}`;
|
|
69
|
+
return link.replace('{hash}', transactionHash);
|
|
70
|
+
};
|
|
71
|
+
exports.getTransactionExplorerLink = getTransactionExplorerLink;
|
|
72
|
+
const getAddressExplorerLink = (address, asset, network) => {
|
|
73
|
+
const chain = cryptoassets_2.default[asset].chain;
|
|
74
|
+
const link = `${getChainExplorer(chain, network).address}`;
|
|
75
|
+
return link.replace('{address}', address);
|
|
76
|
+
};
|
|
77
|
+
exports.getAddressExplorerLink = getAddressExplorerLink;
|
|
78
|
+
const getExplorerTransactionHash = (asset, hash) => {
|
|
79
|
+
switch (asset) {
|
|
80
|
+
case 'NEAR':
|
|
81
|
+
return hash.split('_')[0];
|
|
82
|
+
default:
|
|
83
|
+
return hash;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
exports.getExplorerTransactionHash = getExplorerTransactionHash;
|
|
87
|
+
const estimateGas = ({ data, to, value }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
88
|
+
const paramsForGasEstimate = {
|
|
89
|
+
data,
|
|
90
|
+
to,
|
|
91
|
+
value,
|
|
92
|
+
};
|
|
93
|
+
const provider = ethers.getDefaultProvider();
|
|
94
|
+
return yield provider.estimateGas(paramsForGasEstimate);
|
|
95
|
+
});
|
|
96
|
+
exports.estimateGas = estimateGas;
|
|
97
|
+
const NFT_ASSETS_MAP = {
|
|
98
|
+
ethereum: {
|
|
99
|
+
testnet: {
|
|
100
|
+
marketplaceName: 'OpenSea',
|
|
101
|
+
url: `https://testnet.opensea.io/`,
|
|
102
|
+
transfer: `https://testnets.opensea.io/assets/{contract_address}/{token_id}`,
|
|
103
|
+
},
|
|
104
|
+
mainnet: {
|
|
105
|
+
marketplaceName: 'OpenSea',
|
|
106
|
+
url: `https://opensea.io/`,
|
|
107
|
+
transfer: `https://opensea.io/assets/{chain}/{contract_address}/{token_id}`,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
polygon: {
|
|
111
|
+
testnet: {
|
|
112
|
+
marketplaceName: 'OpenSea',
|
|
113
|
+
url: `https://testnet.opensea.io/`,
|
|
114
|
+
transfer: `https://testnets.opensea.io/assets/{contract_address}/{token_id}`,
|
|
115
|
+
},
|
|
116
|
+
mainnet: {
|
|
117
|
+
marketplaceName: 'OpenSea',
|
|
118
|
+
url: `https://opensea.io/`,
|
|
119
|
+
transfer: `https://opensea.io/assets/{asset}/{contract_address}/{token_id}`,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
arbitrum: {
|
|
123
|
+
testnet: {
|
|
124
|
+
marketplaceName: 'StratosNFT',
|
|
125
|
+
url: `https://testnet.stratosnft.io/`,
|
|
126
|
+
transfer: `https://testnets.stratosnft.io/asset/{contract_address}/{token_id}`,
|
|
127
|
+
},
|
|
128
|
+
mainnet: {
|
|
129
|
+
marketplaceName: 'StratosNFT',
|
|
130
|
+
url: `https://stratosnft.io/`,
|
|
131
|
+
transfer: `https://stratosnft.io/asset/{contract_address}/{token_id}`,
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
solana: {
|
|
135
|
+
testnet: {
|
|
136
|
+
marketplaceName: 'Magic Eden',
|
|
137
|
+
url: `https://magiceden.io/`,
|
|
138
|
+
transfer: `https://magiceden.io/item-details/{contract_address}`,
|
|
139
|
+
},
|
|
140
|
+
mainnet: {
|
|
141
|
+
marketplaceName: 'Magic Eden',
|
|
142
|
+
url: `https://magiceden.io/`,
|
|
143
|
+
transfer: `https://magiceden.io/item-details/{contract_address}`,
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
const getNftAssetsMap = (chainId, network) => {
|
|
148
|
+
const nftAssetsMap = NFT_ASSETS_MAP[chainId];
|
|
149
|
+
if (!nftAssetsMap) {
|
|
150
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.Unsupported.NftAssetMap(chainId, network));
|
|
151
|
+
}
|
|
152
|
+
return nftAssetsMap;
|
|
153
|
+
};
|
|
154
|
+
const getMarketplaceName = (asset, network) => {
|
|
155
|
+
const chainId = cryptoassets_2.default[asset].chain;
|
|
156
|
+
const nftAssetsMap = getNftAssetsMap(chainId, network);
|
|
157
|
+
const marketplaceName = nftAssetsMap[network].marketplaceName;
|
|
158
|
+
if (!marketplaceName) {
|
|
159
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.Nft.MarketPlaceName(chainId, network));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
return marketplaceName;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
exports.getMarketplaceName = getMarketplaceName;
|
|
166
|
+
const getNftTransferLink = (asset, network, tokenId, contract_address) => {
|
|
167
|
+
const chainId = cryptoassets_2.default[asset].chain;
|
|
168
|
+
const nftAssetsMap = getNftAssetsMap(chainId, network);
|
|
169
|
+
const transferLink = nftAssetsMap[network].transfer;
|
|
170
|
+
if (!transferLink) {
|
|
171
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.Nft.TransferLink(chainId, network));
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
return transferLink
|
|
175
|
+
.replace('{contract_address}', contract_address)
|
|
176
|
+
.replace('{chain}', chainId)
|
|
177
|
+
.replace('{asset}', asset)
|
|
178
|
+
.replace('{token_id}', tokenId);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
exports.getNftTransferLink = getNftTransferLink;
|
|
182
|
+
const getNftLink = (asset, network) => {
|
|
183
|
+
const chainId = cryptoassets_2.default[asset].chain;
|
|
184
|
+
const nftAssetsMap = getNftAssetsMap(chainId, network);
|
|
185
|
+
const url = nftAssetsMap[network].url;
|
|
186
|
+
if (!url) {
|
|
187
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.Nft.ExplorerLink(chainId, network));
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
return url;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
exports.getNftLink = getNftLink;
|
|
194
|
+
const openseaLink = (network) => {
|
|
195
|
+
return `https://${network === 'testnet' ? 'testnets.' : ''}opensea.io/`;
|
|
196
|
+
};
|
|
197
|
+
exports.openseaLink = openseaLink;
|
|
198
|
+
//# sourceMappingURL=asset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset.js","sourceRoot":"","sources":["../../../src/utils/asset.ts"],"names":[],"mappings":";;;;AAAA,uDAAqG;AACrG,uDAA0E;AAC1E,uDAAiC;AACjC,0CAAgD;AAChD,0EAA0C;AAE1C,SAAS,gBAAgB,CAAC,OAAgB,EAAE,OAAgB;IAC1D,MAAM,KAAK,GAAG,IAAA,uBAAQ,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzC,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,IAAA,kCAAmB,EAAC,4BAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;KAC3E;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAEM,MAAM,OAAO,GAAG,CAAC,KAAY,EAAE,EAAE;;IACtC,OAAO,CAAA,MAAA,sBAAY,CAAC,KAAK,CAAC,0CAAE,IAAI,MAAK,yBAAU,CAAC,KAAK,CAAC;AACxD,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB;AAEK,MAAM,oBAAoB,GAAG,CAAC,KAAY,EAAE,OAAO,GAAG,eAAO,CAAC,OAAO,EAAE,EAAE;;IAC9E,MAAM,OAAO,GAAG,MAAA,sBAAY,CAAC,KAAK,CAAC,0CAAE,KAAK,CAAC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