@thorswap-lib/evm-web3-wallets
Advanced tools
Comparing version 1.0.0-development.43 to 1.0.0-development.44
import { Web3Provider as d } from "@ethersproject/providers"; | ||
var E = /* @__PURE__ */ ((_) => (_.INVALID_INPUT_PARAMETERS = "1000", _.UNKNOWN_PROVIDERS = "1001", _.CANNOT_FIND_INBOUND_ADDRESS = "1002", _.NO_INBOUND_ADDRESSES = "1003", _.CHAIN_HALTED_OR_UNSUPPORTED = "1004", _.MISSING_INPUT_PARAMETER = "1005", _.INVALID_TYPE_GENERIC = "1100", _.INVALID_NUMBER_STRING = "1101", _.INVALID_NUMBER = "1102", _.INVALID_BOOLEAN = "1103", _.INVALID_OBJECT = "1104", _.INVALID_ARRAY = "1105", _.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", _.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", _.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", _.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", _.AFF_ADDRESS_TOO_LONG = "2004", _.AFF_BPS_INTEGER_0_100 = "2005", _.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", _.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", _.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", _.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", _.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", _.SOURCE_ADDRESS_SMART_CONTRACT = "2011", _.INVALID_PROVIDER = "2100", _.MISSING_CROSS_CHAIN_PROVIDER = "2101", _.MISSING_AVAX_PROVIDER = "2102", _.MISSING_BSC_PROVIDER = "2103", _.MISSING_ETH_PROVIDER = "2104", _.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", _.MISSING_ARB_PROVIDER = "2106", _.INVALID_CHAIN = "2200", _.INVALID_ASSET = "2201", _.INVALID_ASSET_IDENTIFIER = "2202", _.UNSUPPORTED_CHAIN = "2204", _.UNSUPPORTED_ASSET = "2203", _.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", _.THORNODE_QUOTE_GENERIC_ERROR = "3000", _.NOT_ENOUGH_SYNTH_BALANCE = "3001", _.SYNTH_MINTING_CAP_REACHED = "3002", _.INVALID_QUOTE_MODE = "4000", _.NO_QUOTES = "4001", _.SERVICE_UNAVAILABLE_GENERIC = "5000", _.MISSING_GAS_DATA_GENERIC = "5100", _.MISSING_TOKEN_INFO_GENERIC = "5200", _.CANT_FIND_TOKEN_LIST = "5201", _.NO_PRICE = "5202", _.PRICE_IS_STALE = "5203", _.ADDRESS_NOT_WHITELISTED = "6000", _.ADDRESS_ALREADY_CLAIMED = "6001", _.TEMPORARY_ERROR = "9999", _))(E || {}); | ||
E.INVALID_INPUT_PARAMETERS + "", E.UNKNOWN_PROVIDERS + "", E.CANNOT_FIND_INBOUND_ADDRESS + "", E.NO_INBOUND_ADDRESSES + "", E.CHAIN_HALTED_OR_UNSUPPORTED + "", E.MISSING_INPUT_PARAMETER + "", E.INVALID_TYPE_GENERIC + "", E.INVALID_NUMBER_STRING + "", E.INVALID_NUMBER + "", E.INVALID_BOOLEAN + "", E.INVALID_OBJECT + "", E.INVALID_ARRAY + "", E.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER + "", E.SELL_BUY_ASSETS_ARE_THE_SAME + "", E.MISSING_SOURCE_ADDRESS_FOR_SYNTH + "", E.AFF_ADDRESS_AND_BPS_OR_NEITHER + "", E.AFF_ADDRESS_TOO_LONG + "", E.AFF_BPS_INTEGER_0_100 + "", E.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN + "", E.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN + "", E.PREFERRED_PROFVIDER_NOT_SUPPORTED + "", E.DESTINATION_ADDRESS_SMART_CONTRACT + "", E.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER + "", E.INVALID_PROVIDER + "", E.MISSING_CROSS_CHAIN_PROVIDER + "", E.MISSING_AVAX_PROVIDER + "", E.MISSING_BSC_PROVIDER + "", E.MISSING_ETH_PROVIDER + "", E.MISSING_ARB_PROVIDER + "", E.INVALID_PROVIDER_FOR_SWAP_OUT + "", E.INVALID_CHAIN + "", E.INVALID_ASSET + "", E.UNSUPPORTED_CHAIN + "", E.UNSUPPORTED_ASSET + "", E.UNSUPPORTED_ASSET_FOR_SWAPOUT + "", E.THORNODE_QUOTE_GENERIC_ERROR + "", E.NOT_ENOUGH_SYNTH_BALANCE + "", E.SYNTH_MINTING_CAP_REACHED + "", E.INVALID_QUOTE_MODE + "", E.NO_QUOTES + "", E.SERVICE_UNAVAILABLE_GENERIC + "", E.MISSING_GAS_DATA_GENERIC + "", E.MISSING_TOKEN_INFO_GENERIC + "", E.CANT_FIND_TOKEN_LIST + "", E.NO_PRICE + "", E.PRICE_IS_STALE + "", E.ADDRESS_NOT_WHITELISTED + "", E.ADDRESS_ALREADY_CLAIMED + ""; | ||
var i = /* @__PURE__ */ ((_) => (_.Arbitrum = "ARB", _.Avalanche = "AVAX", _.Binance = "BNB", _.BinanceSmartChain = "BSC", _.Bitcoin = "BTC", _.BitcoinCash = "BCH", _.Cosmos = "GAIA", _.Dogecoin = "DOGE", _.Ethereum = "ETH", _.Litecoin = "LTC", _.Optimism = "OP", _.Polygon = "MATIC", _.THORChain = "THOR", _))(i || {}), o = /* @__PURE__ */ ((_) => (_.Arbitrum = "42161", _.ArbitrumHex = "0xa4b1", _.Avalanche = "43114", _.AvalancheHex = "0xa86a", _.Binance = "Binance-Chain-Tigris", _.BinanceHex = "", _.BinanceSmartChain = "56", _.BinanceSmartChainHex = "0x38", _.Bitcoin = "bitcoin", _.BitcoinHex = "", _.BitcoinCash = "bitcoincash", _.BitcoinCashHex = "", _.Cosmos = "cosmoshub-4", _.CosmosHex = "", _.Dogecoin = "dogecoin", _.DogecoinHex = "", _.Ethereum = "1", _.EthereumHex = "0x1", _.Litecoin = "litecoin", _.LitecoinHex = "", _.Optimism = "10", _.OptimismHex = "0xa", _.Polygon = "137", _.PolygonHex = "0x89", _.THORChain = "thorchain-mainnet-v1", _.THORChainHex = "", _.THORChainStagenet = "thorchain-stagenet-v2", _))(o || {}), T = /* @__PURE__ */ ((_) => (_.Arbitrum = "https://arb1.arbitrum.io/rpc", _.Avalanche = "https://node-router.thorswap.net/avalanche-c", _.Binance = "", _.BinanceSmartChain = "https://bsc-dataseed.binance.org", _.Bitcoin = "https://node-router.thorswap.net/bitcoin", _.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", _.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", _.Dogecoin = "https://node-router.thorswap.net/dogecoin", _.Ethereum = "https://node-router.thorswap.net/ethereum", _.Litecoin = "https://node-router.thorswap.net/litecoin", _.Optimism = "https://mainnet.optimism.io", _.Polygon = "https://polygon-rpc.com", _.THORChain = "https://rpc.thorswap.net", _.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", _))(T || {}); | ||
var i = /* @__PURE__ */ ((_) => (_.Arbitrum = "ARB", _.Avalanche = "AVAX", _.Binance = "BNB", _.BinanceSmartChain = "BSC", _.Bitcoin = "BTC", _.BitcoinCash = "BCH", _.Cosmos = "GAIA", _.Dogecoin = "DOGE", _.Ethereum = "ETH", _.Litecoin = "LTC", _.Optimism = "OP", _.Polygon = "MATIC", _.THORChain = "THOR", _))(i || {}), o = /* @__PURE__ */ ((_) => (_.Arbitrum = "42161", _.ArbitrumHex = "0xa4b1", _.Avalanche = "43114", _.AvalancheHex = "0xa86a", _.Binance = "Binance-Chain-Tigris", _.BinanceHex = "", _.BinanceSmartChain = "56", _.BinanceSmartChainHex = "0x38", _.Bitcoin = "bitcoin", _.BitcoinHex = "", _.BitcoinCash = "bitcoincash", _.BitcoinCashHex = "", _.Cosmos = "cosmoshub-4", _.CosmosHex = "", _.Dogecoin = "dogecoin", _.DogecoinHex = "", _.Ethereum = "1", _.EthereumHex = "0x1", _.Litecoin = "litecoin", _.LitecoinHex = "", _.Optimism = "10", _.OptimismHex = "0xa", _.Polygon = "137", _.PolygonHex = "0x89", _.THORChain = "thorchain-mainnet-v1", _.THORChainHex = "", _.THORChainStagenet = "thorchain-stagenet-v2", _))(o || {}), e = /* @__PURE__ */ ((_) => (_.Arbitrum = "https://arb1.arbitrum.io/rpc", _.Avalanche = "https://node-router.thorswap.net/avalanche-c", _.Binance = "", _.BinanceSmartChain = "https://bsc-dataseed.binance.org", _.Bitcoin = "https://node-router.thorswap.net/bitcoin", _.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", _.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", _.Dogecoin = "https://node-router.thorswap.net/dogecoin", _.Ethereum = "https://node-router.thorswap.net/ethereum", _.Litecoin = "https://node-router.thorswap.net/litecoin", _.Optimism = "https://mainnet.optimism.io", _.Polygon = "https://polygon-rpc.com", _.THORChain = "https://rpc.thorswap.net", _.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", _))(e || {}); | ||
const S = Object.values(i), C = Object.keys(i), N = S.reduce( | ||
@@ -17,3 +17,3 @@ (_, t) => { | ||
S.reduce( | ||
(_, t) => (_[t] = T[N[t]], _), | ||
(_, t) => (_[t] = e[N[t]], _), | ||
{} | ||
@@ -26,3 +26,3 @@ ); | ||
var I = /* @__PURE__ */ ((_) => (_.KEYSTORE = "KEYSTORE", _.XDEFI = "XDEFI", _.METAMASK = "METAMASK", _.COINBASE_WEB = "COINBASE_WEB", _.TREZOR = "TREZOR", _.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", _.LEDGER = "LEDGER", _.KEPLR = "KEPLR", _.OKX = "OKX", _.BRAVE = "BRAVE", _.WALLETCONNECT = "WALLETCONNECT", _))(I || {}); | ||
const e = (_) => { | ||
const T = (_) => { | ||
switch (_) { | ||
@@ -43,3 +43,3 @@ case I.BRAVE: | ||
const O = A.map(async (R) => { | ||
const { getWeb3WalletMethods: D } = await import("@thorswap-lib/toolbox-evm"), s = new d(e(a), "any"); | ||
const { getWeb3WalletMethods: D } = await import("@thorswap-lib/toolbox-evm"), s = new d(T(a), "any"); | ||
await s.send("eth_requestAccounts", []); | ||
@@ -50,3 +50,3 @@ const r = await s.getSigner().getAddress(), c = await D({ | ||
covalentApiKey: t, | ||
ethereumWindowProvider: e(a) | ||
ethereumWindowProvider: T(a) | ||
}); | ||
@@ -53,0 +53,0 @@ _({ |
{ | ||
"author": "thorswap", | ||
"dependencies": { | ||
"@thorswap-lib/types": "1.0.0-development.105" | ||
"@thorswap-lib/types": "1.0.0-development.106" | ||
}, | ||
@@ -14,3 +14,3 @@ "description": "THORSwap Lib evm-web3-wallets", | ||
"@internal/config": "0.0.1-development.3", | ||
"@thorswap-lib/toolbox-evm": "1.0.0-development.165" | ||
"@thorswap-lib/toolbox-evm": "1.0.0-development.166" | ||
}, | ||
@@ -39,3 +39,3 @@ "eslintConfig": { | ||
"@ethersproject/providers": "^5.7.0", | ||
"@thorswap-lib/toolbox-evm": "1.0.0-development.165" | ||
"@thorswap-lib/toolbox-evm": "1.0.0-development.166" | ||
}, | ||
@@ -49,3 +49,3 @@ "publishConfig": { | ||
"types": "./dist/index.d.ts", | ||
"version": "1.0.0-development.43", | ||
"version": "1.0.0-development.44", | ||
"scripts": { | ||
@@ -52,0 +52,0 @@ "build": "vite build", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
+ Added@thorswap-lib/helpers@0.0.0-development.112(transitive)
+ Added@thorswap-lib/swapkit-entities@1.0.0-development.120(transitive)
+ Added@thorswap-lib/toolbox-evm@1.0.0-development.166(transitive)
+ Added@thorswap-lib/types@1.0.0-development.106(transitive)
- Removed@thorswap-lib/helpers@0.0.0-development.111(transitive)
- Removed@thorswap-lib/swapkit-entities@1.0.0-development.119(transitive)
- Removed@thorswap-lib/toolbox-evm@1.0.0-development.165(transitive)
- Removed@thorswap-lib/types@1.0.0-development.105(transitive)