@0xsquid/react-hooks 8.7.2 → 8.8.1-beta-canton.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/dist/core/client/index.d.ts +1 -0
- package/dist/core/constants.d.ts +2 -0
- package/dist/core/types/canton.d.ts +2 -0
- package/dist/core/types/cosmos.d.ts +5 -0
- package/dist/core/types/wallet.d.ts +9 -6
- package/dist/hooks/chains/useSquidChains.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/store/useDepositAddressStore.d.ts +15 -3
- package/dist/hooks/swap/useDepositAddress.d.ts +2 -4
- package/dist/hooks/tokens/useSquidTokens.d.ts +1 -0
- package/dist/hooks/transaction/useDepositTransactionStatus.d.ts +25 -0
- package/dist/hooks/transaction/useSwapStatusQuery.d.ts +26 -0
- package/dist/hooks/wallet/useMultiChainWallet.d.ts +41 -15
- package/dist/hooks/wallet/useWallet.d.ts +45 -15
- package/dist/{index-DaYYG81O.js → index-CtTVUC-R.js} +331 -169
- package/dist/index-CtTVUC-R.js.map +1 -0
- package/dist/{index-D3bbd13Z.js → index-D1udDcRZ.js} +334 -169
- package/dist/index-D1udDcRZ.js.map +1 -0
- package/dist/{index.es-Bn83pLT9.js → index.es-DFjaMQJG.js} +2 -2
- package/dist/{index.es-Bn83pLT9.js.map → index.es-DFjaMQJG.js.map} +1 -1
- package/dist/{index.es-Ds1lt_e4.js → index.es-Q71H7cJa.js} +2 -2
- package/dist/{index.es-Ds1lt_e4.js.map → index.es-Q71H7cJa.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/{secretService-CM6noWhX.js → secretService-BJNdJc-J.js} +2 -2
- package/dist/{secretService-CM6noWhX.js.map → secretService-BJNdJc-J.js.map} +1 -1
- package/dist/{secretService-CKReaNYo.js → secretService-Dg5_VwtW.js} +2 -2
- package/dist/{secretService-CKReaNYo.js.map → secretService-Dg5_VwtW.js.map} +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.esm.js +8 -1
- package/dist/server.esm.js.map +1 -1
- package/dist/server.js +8 -0
- package/dist/server.js.map +1 -1
- package/dist/services/internal/assetsService.d.ts +1 -1
- package/dist/services/internal/cantonService.d.ts +2 -0
- package/dist/services/internal/estimateService.d.ts +18 -8
- package/dist/services/internal/transactionService.d.ts +12 -2
- package/dist/{stellarService.client-Ko2roGXL.js → stellarService.client-B9xCCNV0.js} +2 -2
- package/dist/{stellarService.client-Ko2roGXL.js.map → stellarService.client-B9xCCNV0.js.map} +1 -1
- package/dist/{stellarService.client-0dfuo3PJ.js → stellarService.client-BFUfF3-j.js} +2 -2
- package/dist/{stellarService.client-0dfuo3PJ.js.map → stellarService.client-BFUfF3-j.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-D3bbd13Z.js.map +0 -1
- package/dist/index-DaYYG81O.js.map +0 -1
package/dist/server.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.esm.js","sources":["../src/core/constants.ts"],"sourcesContent":["\"use client\";\n\nimport { ChainType } from \"@0xsquid/squid-types\";\nimport { zeroAddress as evmZeroAddress } from \"viem\";\nimport { squidApiBaseUrl } from \"./externalLinks\";\nimport type { AppConfig, SlippageOption } from \"./types/config\";\n\nexport const WALLETCONNECT_PROJECT_ID = \"db6a4f6ff58e4172b2fd52f01360bc49\";\nexport const WALLETCONNECT_WALLET_IDS = {\n joey: \"d9f5432e932c6fad8e19a0cea9d4a3372a84aed16e98a52e6655dd2821a63404\",\n girin: \"994824d1e0b935f48ec3570c9d51fe5af9bbd9246b6f57210906f8b853ad2196\",\n bifrost: \"37a686ab6223cd42e2886ed6e5477fce100a4fb565dcd57ed4f81f7c12e93053\",\n} as const;\nexport const DEFAULT_LOCALE = \"en-US\";\nexport const SQUID_METADATA = {\n name: \"Squid\",\n url: \"https://app.squidrouter.com\",\n icon: \"https://squidrouter.com/favicon.ico\",\n description: \"Swap, send, and bridge across chains.\",\n};\n\nconst bitcoinZeroAddress = \"1111111111111111111114oLvT2\";\nconst cosmosZeroAddress =\n \"osmo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq65mj83\";\nconst solanaZeroAddress = \"11111111111111111111111111111111\";\nconst suiZeroAddress = \"0x0000000000000000000000000000000000000000\";\nconst xrplZeroAddress = \"rrrrrrrrrrrrrrrrrrrrrhoLvTp\";\nconst stellarZeroAddress =\n \"GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF\";\n\nexport const chainTypeToZeroAddressMap: Record<ChainType, string> = {\n [ChainType.EVM]: evmZeroAddress,\n [ChainType.COSMOS]: cosmosZeroAddress,\n [ChainType.BTC]: bitcoinZeroAddress,\n [ChainType.SOLANA]: solanaZeroAddress,\n [ChainType.SUI]: suiZeroAddress,\n [ChainType.XRPL]: xrplZeroAddress,\n [ChainType.STELLAR]: stellarZeroAddress,\n};\n\nexport const nativeEvmTokenAddress =\n \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\nexport const nativeCosmosTokenAddress = \"uosmo\";\nexport const nativeSolanaTokenAddress =\n \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\nexport const nativeBitcoinTokenAddress = \"satoshi\";\nexport const nativeSuiTokenAddress =\n \"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI\";\nexport const nativeXrplTokenAddress = \"xrp\";\nexport const nativeStellarTokenAddress =\n \"CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA\";\n\n// by setting slippage to undefined, it's set to \"auto\"\nexport const defaultSlippage: SlippageOption = undefined;\nexport const destinationAddressResetValue = \"null\";\nexport const fallbackAddressResetValue = \"null\";\nexport const gasRefundMultiplier = 25;\nexport const internalSquidApiBaseUrl = \"https://app.squidrouter.com/api\";\nexport const XAMAN_API_URL = `${internalSquidApiBaseUrl}/xaman/`;\nexport const TOKEN_PRICE_API_URL = `${internalSquidApiBaseUrl}/coingecko`;\nexport const DEFAULT_ROUTE_REFETCH_INTERVAL = 30_000;\n\nexport const SOLANA_RPC_URL =\n \"https://meredith-ute2ko-fast-mainnet.helius-rpc.com\";\nexport const INTEGRATOR_ID =\n \"squid-widget-playground-local-cd33cba6-7e12-4fcc-8d5d-35e286f655ea\";\n\nexport const DEFAULT_COUNTRY_CODE = \"US\";\n\nexport const CHAIN_IDS = {\n // Cosmos\n OSMOSIS: \"osmosis-1\",\n INJECTIVE: \"injective-1\",\n SECRET: \"secret-4\",\n ARCHWAY: \"archway-1\",\n XION: \"xion-mainnet-1\",\n NOBLE: \"noble-1\",\n AGORIC: \"agoric-3\",\n\n // EVM\n ETHEREUM: \"1\",\n ETHEREUM_SEPOLIA: \"11155111\",\n ARBITRUM: \"42161\",\n BSC: \"56\",\n BASE: \"8453\",\n OPTIMISM: \"10\",\n LINEA: \"59144\",\n BLAST: \"81457\",\n CELO: \"42220\",\n POLYGON: \"137\",\n AVALANCHE: \"43114\",\n IMMUTABLE: \"13371\",\n SCROLL: \"534352\",\n MOONBEAM: \"1284\",\n MANTLE: \"5000\",\n FANTOM: \"250\",\n KAVA: \"2222\",\n FILECOIN: \"314\",\n BERACHAIN: \"80094\",\n SAGA_EVM: \"5464\",\n XRPL_EVM: \"1440000\",\n XRPL_EVM_TESTNET: \"1449000\",\n GNOSIS: \"100\",\n SONIC: \"146\",\n HYPER_EVM: \"999\",\n DCHAIN: \"2716446429837000\",\n SONEIUM: \"1868\",\n PEAQ: \"3338\",\n HEDERA: \"295\",\n MANTRA: \"5888\",\n CITREA: \"4114\",\n TEMPO: \"4217\",\n\n // others\n BITCOIN: \"bitcoin\",\n SOLANA: \"solana-mainnet-beta\",\n SUI: \"sui-mainnet\",\n SUI_TESTNET: \"sui-testnet\",\n XRPL: \"xrpl-mainnet\",\n XRPL_TESTNET: \"xrpl-testnet\",\n STELLAR: \"stellar-mainnet\",\n STELLAR_TESTNET: \"stellar-testnet\",\n} as const;\n\nexport const chainTypeToDefaultChainIdMap: Record<ChainType, string> = {\n [ChainType.EVM]: CHAIN_IDS.ETHEREUM,\n [ChainType.COSMOS]: CHAIN_IDS.OSMOSIS,\n [ChainType.BTC]: CHAIN_IDS.BITCOIN,\n [ChainType.SOLANA]: CHAIN_IDS.SOLANA,\n [ChainType.SUI]: CHAIN_IDS.SUI,\n [ChainType.XRPL]: CHAIN_IDS.XRPL,\n [ChainType.STELLAR]: CHAIN_IDS.STELLAR,\n};\n\nexport const chainTypeToNativeTokenAddressMap: Record<ChainType, string> = {\n [ChainType.EVM]: nativeEvmTokenAddress,\n [ChainType.COSMOS]: nativeCosmosTokenAddress,\n [ChainType.BTC]: nativeBitcoinTokenAddress,\n [ChainType.SOLANA]: nativeSolanaTokenAddress,\n [ChainType.SUI]: nativeSuiTokenAddress,\n [ChainType.XRPL]: nativeXrplTokenAddress,\n [ChainType.STELLAR]: nativeStellarTokenAddress,\n};\n\nexport const defaultConfigValues: AppConfig = {\n integratorId: INTEGRATOR_ID,\n slippage: defaultSlippage,\n apiUrl: squidApiBaseUrl,\n priceImpactWarnings: {\n warning: 3,\n critical: 5,\n },\n};\n\nexport enum EvmPriorityConnectors {\n Safe = \"safe\",\n LedgerLive = \"ledgerLive\",\n}\n\n// Success\nconst cctpSuccessStatuses = [\"complete\"];\nconst chainflipSuccessStatuses = [\"COMPLETE\"];\nconst solanaSameChainSuccessStatuses = [\"finalized\"];\nconst axelarSuccessStatuses = [\n \"destination_executed\",\n \"executed\",\n \"express_executed\",\n \"success\",\n];\n\n// Error\nconst axelarErrorStatuses = [\n \"error_fetching_status\",\n \"error\",\n \"failed_on_destination\",\n];\nconst chainflipErrorStatuses = [\"BROADCAST_ABORTED\"];\n\n// Refunded\nexport const transactionRefundedStatuses = [\"refunded\"];\n\nexport const transactionErrorStatuses = [\n ...axelarErrorStatuses,\n ...chainflipErrorStatuses,\n];\nexport const transactionSuccessStatuses = [\n ...cctpSuccessStatuses,\n ...axelarSuccessStatuses,\n ...chainflipSuccessStatuses,\n ...solanaSameChainSuccessStatuses,\n];\nexport const transactionEndStatuses = [\n ...transactionSuccessStatuses,\n ...transactionRefundedStatuses,\n ...transactionErrorStatuses,\n];\n"],"names":["evmZeroAddress"],"mappings":";;;AAqBA,MAAM,kBAAkB,GAAG,6BAA6B;AACxD,MAAM,iBAAiB,GACrB,iEAAiE;AACnE,MAAM,iBAAiB,GAAG,kCAAkC;AAC5D,MAAM,cAAc,GAAG,4CAA4C;AACnE,MAAM,eAAe,GAAG,6BAA6B;AACrD,MAAM,kBAAkB,GACtB,0DAA0D;
|
|
1
|
+
{"version":3,"file":"server.esm.js","sources":["../src/core/constants.ts"],"sourcesContent":["\"use client\";\n\nimport { ChainType } from \"@0xsquid/squid-types\";\nimport { zeroAddress as evmZeroAddress } from \"viem\";\nimport { squidApiBaseUrl } from \"./externalLinks\";\nimport type { AppConfig, SlippageOption } from \"./types/config\";\n\nexport const WALLETCONNECT_PROJECT_ID = \"db6a4f6ff58e4172b2fd52f01360bc49\";\nexport const WALLETCONNECT_WALLET_IDS = {\n joey: \"d9f5432e932c6fad8e19a0cea9d4a3372a84aed16e98a52e6655dd2821a63404\",\n girin: \"994824d1e0b935f48ec3570c9d51fe5af9bbd9246b6f57210906f8b853ad2196\",\n bifrost: \"37a686ab6223cd42e2886ed6e5477fce100a4fb565dcd57ed4f81f7c12e93053\",\n} as const;\nexport const DEFAULT_LOCALE = \"en-US\";\nexport const SQUID_METADATA = {\n name: \"Squid\",\n url: \"https://app.squidrouter.com\",\n icon: \"https://squidrouter.com/favicon.ico\",\n description: \"Swap, send, and bridge across chains.\",\n};\n\nconst bitcoinZeroAddress = \"1111111111111111111114oLvT2\";\nconst cosmosZeroAddress =\n \"osmo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq65mj83\";\nconst solanaZeroAddress = \"11111111111111111111111111111111\";\nconst suiZeroAddress = \"0x0000000000000000000000000000000000000000\";\nconst xrplZeroAddress = \"rrrrrrrrrrrrrrrrrrrrrhoLvTp\";\nconst stellarZeroAddress =\n \"GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF\";\n// TODO: check\nconst cantonZeroAddress =\n \"none::12200000000000000000000000000000000000000000000000000000000000000000\";\n\nexport const chainTypeToZeroAddressMap: Record<ChainType, string> = {\n [ChainType.EVM]: evmZeroAddress,\n [ChainType.COSMOS]: cosmosZeroAddress,\n [ChainType.BTC]: bitcoinZeroAddress,\n [ChainType.SOLANA]: solanaZeroAddress,\n [ChainType.SUI]: suiZeroAddress,\n [ChainType.XRPL]: xrplZeroAddress,\n [ChainType.STELLAR]: stellarZeroAddress,\n [ChainType.CANTON]: cantonZeroAddress,\n};\n\nexport const nativeEvmTokenAddress =\n \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\nexport const nativeCosmosTokenAddress = \"uosmo\";\nexport const nativeSolanaTokenAddress =\n \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\nexport const nativeBitcoinTokenAddress = \"satoshi\";\nexport const nativeSuiTokenAddress =\n \"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI\";\nexport const nativeXrplTokenAddress = \"xrp\";\nexport const nativeStellarTokenAddress =\n \"CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA\";\nexport const nativeCantonTokenAddress =\n \"DSO::1220b1431ef217342db44d516bb9befde802be7d8899637d290895fa58880f19accc\";\n\n// by setting slippage to undefined, it's set to \"auto\"\nexport const defaultSlippage: SlippageOption = undefined;\nexport const destinationAddressResetValue = \"null\";\nexport const fallbackAddressResetValue = \"null\";\nexport const gasRefundMultiplier = 25;\nexport const internalSquidApiBaseUrl = \"https://app.squidrouter.com/api\";\nexport const XAMAN_API_URL = `${internalSquidApiBaseUrl}/xaman/`;\nexport const TOKEN_PRICE_API_URL = `${internalSquidApiBaseUrl}/coingecko`;\nexport const DEFAULT_ROUTE_REFETCH_INTERVAL = 30_000;\n\nexport const SOLANA_RPC_URL =\n \"https://meredith-ute2ko-fast-mainnet.helius-rpc.com\";\nexport const INTEGRATOR_ID =\n \"squid-widget-playground-local-cd33cba6-7e12-4fcc-8d5d-35e286f655ea\";\n\nexport const DEFAULT_COUNTRY_CODE = \"US\";\n\nexport const CHAIN_IDS = {\n // Cosmos\n OSMOSIS: \"osmosis-1\",\n INJECTIVE: \"injective-1\",\n SECRET: \"secret-4\",\n ARCHWAY: \"archway-1\",\n XION: \"xion-mainnet-1\",\n NOBLE: \"noble-1\",\n AGORIC: \"agoric-3\",\n\n // EVM\n ETHEREUM: \"1\",\n ETHEREUM_SEPOLIA: \"11155111\",\n ARBITRUM: \"42161\",\n BSC: \"56\",\n BASE: \"8453\",\n OPTIMISM: \"10\",\n LINEA: \"59144\",\n BLAST: \"81457\",\n CELO: \"42220\",\n POLYGON: \"137\",\n AVALANCHE: \"43114\",\n IMMUTABLE: \"13371\",\n SCROLL: \"534352\",\n MOONBEAM: \"1284\",\n MANTLE: \"5000\",\n FANTOM: \"250\",\n KAVA: \"2222\",\n FILECOIN: \"314\",\n BERACHAIN: \"80094\",\n SAGA_EVM: \"5464\",\n XRPL_EVM: \"1440000\",\n XRPL_EVM_TESTNET: \"1449000\",\n GNOSIS: \"100\",\n SONIC: \"146\",\n HYPER_EVM: \"999\",\n DCHAIN: \"2716446429837000\",\n SONEIUM: \"1868\",\n PEAQ: \"3338\",\n HEDERA: \"295\",\n MANTRA: \"5888\",\n CITREA: \"4114\",\n TEMPO: \"4217\",\n\n // others\n BITCOIN: \"bitcoin\",\n SOLANA: \"solana-mainnet-beta\",\n SUI: \"sui-mainnet\",\n SUI_TESTNET: \"sui-testnet\",\n XRPL: \"xrpl-mainnet\",\n XRPL_TESTNET: \"xrpl-testnet\",\n STELLAR: \"stellar-mainnet\",\n STELLAR_TESTNET: \"stellar-testnet\",\n CANTON: \"canton\",\n} as const;\n\nexport const chainTypeToDefaultChainIdMap: Record<ChainType, string> = {\n [ChainType.EVM]: CHAIN_IDS.ETHEREUM,\n [ChainType.COSMOS]: CHAIN_IDS.OSMOSIS,\n [ChainType.BTC]: CHAIN_IDS.BITCOIN,\n [ChainType.SOLANA]: CHAIN_IDS.SOLANA,\n [ChainType.SUI]: CHAIN_IDS.SUI,\n [ChainType.XRPL]: CHAIN_IDS.XRPL,\n [ChainType.STELLAR]: CHAIN_IDS.STELLAR,\n [ChainType.CANTON]: CHAIN_IDS.CANTON,\n};\n\nexport const chainTypeToNativeTokenAddressMap: Record<ChainType, string> = {\n [ChainType.EVM]: nativeEvmTokenAddress,\n [ChainType.COSMOS]: nativeCosmosTokenAddress,\n [ChainType.BTC]: nativeBitcoinTokenAddress,\n [ChainType.SOLANA]: nativeSolanaTokenAddress,\n [ChainType.SUI]: nativeSuiTokenAddress,\n [ChainType.XRPL]: nativeXrplTokenAddress,\n [ChainType.STELLAR]: nativeStellarTokenAddress,\n [ChainType.CANTON]: nativeCantonTokenAddress,\n};\n\nexport const defaultConfigValues: AppConfig = {\n integratorId: INTEGRATOR_ID,\n slippage: defaultSlippage,\n apiUrl: squidApiBaseUrl,\n priceImpactWarnings: {\n warning: 3,\n critical: 5,\n },\n};\n\nexport enum EvmPriorityConnectors {\n Safe = \"safe\",\n LedgerLive = \"ledgerLive\",\n}\n\n// Success\nconst cctpSuccessStatuses = [\"complete\"];\nconst chainflipSuccessStatuses = [\"COMPLETE\"];\nconst solanaSameChainSuccessStatuses = [\"finalized\"];\nconst axelarSuccessStatuses = [\n \"destination_executed\",\n \"executed\",\n \"express_executed\",\n \"success\",\n];\n\n// Error\nconst axelarErrorStatuses = [\n \"error_fetching_status\",\n \"error\",\n \"failed_on_destination\",\n];\nconst chainflipErrorStatuses = [\"BROADCAST_ABORTED\"];\n\n// Refunded\nexport const transactionRefundedStatuses = [\"refunded\"];\n\nexport const transactionErrorStatuses = [\n ...axelarErrorStatuses,\n ...chainflipErrorStatuses,\n];\nexport const transactionSuccessStatuses = [\n ...cctpSuccessStatuses,\n ...axelarSuccessStatuses,\n ...chainflipSuccessStatuses,\n ...solanaSameChainSuccessStatuses,\n];\nexport const transactionEndStatuses = [\n ...transactionSuccessStatuses,\n ...transactionRefundedStatuses,\n ...transactionErrorStatuses,\n];\n"],"names":["evmZeroAddress"],"mappings":";;;AAqBA,MAAM,kBAAkB,GAAG,6BAA6B;AACxD,MAAM,iBAAiB,GACrB,iEAAiE;AACnE,MAAM,iBAAiB,GAAG,kCAAkC;AAC5D,MAAM,cAAc,GAAG,4CAA4C;AACnE,MAAM,eAAe,GAAG,6BAA6B;AACrD,MAAM,kBAAkB,GACtB,0DAA0D;AAC5D;AACA,MAAM,iBAAiB,GACrB,4EAA4E;AAEjE,MAAA,yBAAyB,GAA8B;AAClE,IAAA,CAAC,SAAS,CAAC,GAAG,GAAGA,WAAc;AAC/B,IAAA,CAAC,SAAS,CAAC,MAAM,GAAG,iBAAiB;AACrC,IAAA,CAAC,SAAS,CAAC,GAAG,GAAG,kBAAkB;AACnC,IAAA,CAAC,SAAS,CAAC,MAAM,GAAG,iBAAiB;AACrC,IAAA,CAAC,SAAS,CAAC,GAAG,GAAG,cAAc;AAC/B,IAAA,CAAC,SAAS,CAAC,IAAI,GAAG,eAAe;AACjC,IAAA,CAAC,SAAS,CAAC,OAAO,GAAG,kBAAkB;AACvC,IAAA,CAAC,SAAS,CAAC,MAAM,GAAG,iBAAiB;;AAGhC,MAAM,qBAAqB,GAChC;AACK,MAAM,wBAAwB,GAAG;AACjC,MAAM,wBAAwB,GACnC;AACK,MAAM,yBAAyB,GAAG;AAClC,MAAM,qBAAqB,GAChC;AACK,MAAM,sBAAsB,GAAG;AAC/B,MAAM,yBAAyB,GACpC;AACK,MAAM,wBAAwB,GACnC;AAmBW,MAAA,SAAS,GAAG;;AAEvB,IAAA,OAAO,EAA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AA,GAAA,MAAa;AACb,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AAC3B,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;;;"}
|
package/dist/server.js
CHANGED
|
@@ -9,6 +9,8 @@ const solanaZeroAddress = "11111111111111111111111111111111";
|
|
|
9
9
|
const suiZeroAddress = "0x0000000000000000000000000000000000000000";
|
|
10
10
|
const xrplZeroAddress = "rrrrrrrrrrrrrrrrrrrrrhoLvTp";
|
|
11
11
|
const stellarZeroAddress = "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF";
|
|
12
|
+
// TODO: check
|
|
13
|
+
const cantonZeroAddress = "none::12200000000000000000000000000000000000000000000000000000000000000000";
|
|
12
14
|
const chainTypeToZeroAddressMap = {
|
|
13
15
|
[squidTypes.ChainType.EVM]: viem.zeroAddress,
|
|
14
16
|
[squidTypes.ChainType.COSMOS]: cosmosZeroAddress,
|
|
@@ -17,6 +19,7 @@ const chainTypeToZeroAddressMap = {
|
|
|
17
19
|
[squidTypes.ChainType.SUI]: suiZeroAddress,
|
|
18
20
|
[squidTypes.ChainType.XRPL]: xrplZeroAddress,
|
|
19
21
|
[squidTypes.ChainType.STELLAR]: stellarZeroAddress,
|
|
22
|
+
[squidTypes.ChainType.CANTON]: cantonZeroAddress,
|
|
20
23
|
};
|
|
21
24
|
const nativeEvmTokenAddress = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
22
25
|
const nativeCosmosTokenAddress = "uosmo";
|
|
@@ -25,6 +28,7 @@ const nativeBitcoinTokenAddress = "satoshi";
|
|
|
25
28
|
const nativeSuiTokenAddress = "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
|
|
26
29
|
const nativeXrplTokenAddress = "xrp";
|
|
27
30
|
const nativeStellarTokenAddress = "CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA";
|
|
31
|
+
const nativeCantonTokenAddress = "DSO::1220b1431ef217342db44d516bb9befde802be7d8899637d290895fa58880f19accc";
|
|
28
32
|
const CHAIN_IDS = {
|
|
29
33
|
// Cosmos
|
|
30
34
|
OSMOSIS: "osmosis-1",
|
|
@@ -76,6 +80,7 @@ const CHAIN_IDS = {
|
|
|
76
80
|
XRPL_TESTNET: "xrpl-testnet",
|
|
77
81
|
STELLAR: "stellar-mainnet",
|
|
78
82
|
STELLAR_TESTNET: "stellar-testnet",
|
|
83
|
+
CANTON: "canton",
|
|
79
84
|
};
|
|
80
85
|
({
|
|
81
86
|
[squidTypes.ChainType.EVM]: CHAIN_IDS.ETHEREUM,
|
|
@@ -85,6 +90,7 @@ const CHAIN_IDS = {
|
|
|
85
90
|
[squidTypes.ChainType.SUI]: CHAIN_IDS.SUI,
|
|
86
91
|
[squidTypes.ChainType.XRPL]: CHAIN_IDS.XRPL,
|
|
87
92
|
[squidTypes.ChainType.STELLAR]: CHAIN_IDS.STELLAR,
|
|
93
|
+
[squidTypes.ChainType.CANTON]: CHAIN_IDS.CANTON,
|
|
88
94
|
});
|
|
89
95
|
const chainTypeToNativeTokenAddressMap = {
|
|
90
96
|
[squidTypes.ChainType.EVM]: nativeEvmTokenAddress,
|
|
@@ -94,6 +100,7 @@ const chainTypeToNativeTokenAddressMap = {
|
|
|
94
100
|
[squidTypes.ChainType.SUI]: nativeSuiTokenAddress,
|
|
95
101
|
[squidTypes.ChainType.XRPL]: nativeXrplTokenAddress,
|
|
96
102
|
[squidTypes.ChainType.STELLAR]: nativeStellarTokenAddress,
|
|
103
|
+
[squidTypes.ChainType.CANTON]: nativeCantonTokenAddress,
|
|
97
104
|
};
|
|
98
105
|
var EvmPriorityConnectors;
|
|
99
106
|
(function (EvmPriorityConnectors) {
|
|
@@ -105,6 +112,7 @@ exports.CHAIN_IDS = CHAIN_IDS;
|
|
|
105
112
|
exports.chainTypeToNativeTokenAddressMap = chainTypeToNativeTokenAddressMap;
|
|
106
113
|
exports.chainTypeToZeroAddressMap = chainTypeToZeroAddressMap;
|
|
107
114
|
exports.nativeBitcoinTokenAddress = nativeBitcoinTokenAddress;
|
|
115
|
+
exports.nativeCantonTokenAddress = nativeCantonTokenAddress;
|
|
108
116
|
exports.nativeCosmosTokenAddress = nativeCosmosTokenAddress;
|
|
109
117
|
exports.nativeEvmTokenAddress = nativeEvmTokenAddress;
|
|
110
118
|
exports.nativeSolanaTokenAddress = nativeSolanaTokenAddress;
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sources":["../src/core/constants.ts"],"sourcesContent":["\"use client\";\n\nimport { ChainType } from \"@0xsquid/squid-types\";\nimport { zeroAddress as evmZeroAddress } from \"viem\";\nimport { squidApiBaseUrl } from \"./externalLinks\";\nimport type { AppConfig, SlippageOption } from \"./types/config\";\n\nexport const WALLETCONNECT_PROJECT_ID = \"db6a4f6ff58e4172b2fd52f01360bc49\";\nexport const WALLETCONNECT_WALLET_IDS = {\n joey: \"d9f5432e932c6fad8e19a0cea9d4a3372a84aed16e98a52e6655dd2821a63404\",\n girin: \"994824d1e0b935f48ec3570c9d51fe5af9bbd9246b6f57210906f8b853ad2196\",\n bifrost: \"37a686ab6223cd42e2886ed6e5477fce100a4fb565dcd57ed4f81f7c12e93053\",\n} as const;\nexport const DEFAULT_LOCALE = \"en-US\";\nexport const SQUID_METADATA = {\n name: \"Squid\",\n url: \"https://app.squidrouter.com\",\n icon: \"https://squidrouter.com/favicon.ico\",\n description: \"Swap, send, and bridge across chains.\",\n};\n\nconst bitcoinZeroAddress = \"1111111111111111111114oLvT2\";\nconst cosmosZeroAddress =\n \"osmo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq65mj83\";\nconst solanaZeroAddress = \"11111111111111111111111111111111\";\nconst suiZeroAddress = \"0x0000000000000000000000000000000000000000\";\nconst xrplZeroAddress = \"rrrrrrrrrrrrrrrrrrrrrhoLvTp\";\nconst stellarZeroAddress =\n \"GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF\";\n\nexport const chainTypeToZeroAddressMap: Record<ChainType, string> = {\n [ChainType.EVM]: evmZeroAddress,\n [ChainType.COSMOS]: cosmosZeroAddress,\n [ChainType.BTC]: bitcoinZeroAddress,\n [ChainType.SOLANA]: solanaZeroAddress,\n [ChainType.SUI]: suiZeroAddress,\n [ChainType.XRPL]: xrplZeroAddress,\n [ChainType.STELLAR]: stellarZeroAddress,\n};\n\nexport const nativeEvmTokenAddress =\n \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\nexport const nativeCosmosTokenAddress = \"uosmo\";\nexport const nativeSolanaTokenAddress =\n \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\nexport const nativeBitcoinTokenAddress = \"satoshi\";\nexport const nativeSuiTokenAddress =\n \"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI\";\nexport const nativeXrplTokenAddress = \"xrp\";\nexport const nativeStellarTokenAddress =\n \"CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA\";\n\n// by setting slippage to undefined, it's set to \"auto\"\nexport const defaultSlippage: SlippageOption = undefined;\nexport const destinationAddressResetValue = \"null\";\nexport const fallbackAddressResetValue = \"null\";\nexport const gasRefundMultiplier = 25;\nexport const internalSquidApiBaseUrl = \"https://app.squidrouter.com/api\";\nexport const XAMAN_API_URL = `${internalSquidApiBaseUrl}/xaman/`;\nexport const TOKEN_PRICE_API_URL = `${internalSquidApiBaseUrl}/coingecko`;\nexport const DEFAULT_ROUTE_REFETCH_INTERVAL = 30_000;\n\nexport const SOLANA_RPC_URL =\n \"https://meredith-ute2ko-fast-mainnet.helius-rpc.com\";\nexport const INTEGRATOR_ID =\n \"squid-widget-playground-local-cd33cba6-7e12-4fcc-8d5d-35e286f655ea\";\n\nexport const DEFAULT_COUNTRY_CODE = \"US\";\n\nexport const CHAIN_IDS = {\n // Cosmos\n OSMOSIS: \"osmosis-1\",\n INJECTIVE: \"injective-1\",\n SECRET: \"secret-4\",\n ARCHWAY: \"archway-1\",\n XION: \"xion-mainnet-1\",\n NOBLE: \"noble-1\",\n AGORIC: \"agoric-3\",\n\n // EVM\n ETHEREUM: \"1\",\n ETHEREUM_SEPOLIA: \"11155111\",\n ARBITRUM: \"42161\",\n BSC: \"56\",\n BASE: \"8453\",\n OPTIMISM: \"10\",\n LINEA: \"59144\",\n BLAST: \"81457\",\n CELO: \"42220\",\n POLYGON: \"137\",\n AVALANCHE: \"43114\",\n IMMUTABLE: \"13371\",\n SCROLL: \"534352\",\n MOONBEAM: \"1284\",\n MANTLE: \"5000\",\n FANTOM: \"250\",\n KAVA: \"2222\",\n FILECOIN: \"314\",\n BERACHAIN: \"80094\",\n SAGA_EVM: \"5464\",\n XRPL_EVM: \"1440000\",\n XRPL_EVM_TESTNET: \"1449000\",\n GNOSIS: \"100\",\n SONIC: \"146\",\n HYPER_EVM: \"999\",\n DCHAIN: \"2716446429837000\",\n SONEIUM: \"1868\",\n PEAQ: \"3338\",\n HEDERA: \"295\",\n MANTRA: \"5888\",\n CITREA: \"4114\",\n TEMPO: \"4217\",\n\n // others\n BITCOIN: \"bitcoin\",\n SOLANA: \"solana-mainnet-beta\",\n SUI: \"sui-mainnet\",\n SUI_TESTNET: \"sui-testnet\",\n XRPL: \"xrpl-mainnet\",\n XRPL_TESTNET: \"xrpl-testnet\",\n STELLAR: \"stellar-mainnet\",\n STELLAR_TESTNET: \"stellar-testnet\",\n} as const;\n\nexport const chainTypeToDefaultChainIdMap: Record<ChainType, string> = {\n [ChainType.EVM]: CHAIN_IDS.ETHEREUM,\n [ChainType.COSMOS]: CHAIN_IDS.OSMOSIS,\n [ChainType.BTC]: CHAIN_IDS.BITCOIN,\n [ChainType.SOLANA]: CHAIN_IDS.SOLANA,\n [ChainType.SUI]: CHAIN_IDS.SUI,\n [ChainType.XRPL]: CHAIN_IDS.XRPL,\n [ChainType.STELLAR]: CHAIN_IDS.STELLAR,\n};\n\nexport const chainTypeToNativeTokenAddressMap: Record<ChainType, string> = {\n [ChainType.EVM]: nativeEvmTokenAddress,\n [ChainType.COSMOS]: nativeCosmosTokenAddress,\n [ChainType.BTC]: nativeBitcoinTokenAddress,\n [ChainType.SOLANA]: nativeSolanaTokenAddress,\n [ChainType.SUI]: nativeSuiTokenAddress,\n [ChainType.XRPL]: nativeXrplTokenAddress,\n [ChainType.STELLAR]: nativeStellarTokenAddress,\n};\n\nexport const defaultConfigValues: AppConfig = {\n integratorId: INTEGRATOR_ID,\n slippage: defaultSlippage,\n apiUrl: squidApiBaseUrl,\n priceImpactWarnings: {\n warning: 3,\n critical: 5,\n },\n};\n\nexport enum EvmPriorityConnectors {\n Safe = \"safe\",\n LedgerLive = \"ledgerLive\",\n}\n\n// Success\nconst cctpSuccessStatuses = [\"complete\"];\nconst chainflipSuccessStatuses = [\"COMPLETE\"];\nconst solanaSameChainSuccessStatuses = [\"finalized\"];\nconst axelarSuccessStatuses = [\n \"destination_executed\",\n \"executed\",\n \"express_executed\",\n \"success\",\n];\n\n// Error\nconst axelarErrorStatuses = [\n \"error_fetching_status\",\n \"error\",\n \"failed_on_destination\",\n];\nconst chainflipErrorStatuses = [\"BROADCAST_ABORTED\"];\n\n// Refunded\nexport const transactionRefundedStatuses = [\"refunded\"];\n\nexport const transactionErrorStatuses = [\n ...axelarErrorStatuses,\n ...chainflipErrorStatuses,\n];\nexport const transactionSuccessStatuses = [\n ...cctpSuccessStatuses,\n ...axelarSuccessStatuses,\n ...chainflipSuccessStatuses,\n ...solanaSameChainSuccessStatuses,\n];\nexport const transactionEndStatuses = [\n ...transactionSuccessStatuses,\n ...transactionRefundedStatuses,\n ...transactionErrorStatuses,\n];\n"],"names":["ChainType","evmZeroAddress"],"mappings":";;;;;AAqBA,MAAM,kBAAkB,GAAG,6BAA6B;AACxD,MAAM,iBAAiB,GACrB,iEAAiE;AACnE,MAAM,iBAAiB,GAAG,kCAAkC;AAC5D,MAAM,cAAc,GAAG,4CAA4C;AACnE,MAAM,eAAe,GAAG,6BAA6B;AACrD,MAAM,kBAAkB,GACtB,0DAA0D;
|
|
1
|
+
{"version":3,"file":"server.js","sources":["../src/core/constants.ts"],"sourcesContent":["\"use client\";\n\nimport { ChainType } from \"@0xsquid/squid-types\";\nimport { zeroAddress as evmZeroAddress } from \"viem\";\nimport { squidApiBaseUrl } from \"./externalLinks\";\nimport type { AppConfig, SlippageOption } from \"./types/config\";\n\nexport const WALLETCONNECT_PROJECT_ID = \"db6a4f6ff58e4172b2fd52f01360bc49\";\nexport const WALLETCONNECT_WALLET_IDS = {\n joey: \"d9f5432e932c6fad8e19a0cea9d4a3372a84aed16e98a52e6655dd2821a63404\",\n girin: \"994824d1e0b935f48ec3570c9d51fe5af9bbd9246b6f57210906f8b853ad2196\",\n bifrost: \"37a686ab6223cd42e2886ed6e5477fce100a4fb565dcd57ed4f81f7c12e93053\",\n} as const;\nexport const DEFAULT_LOCALE = \"en-US\";\nexport const SQUID_METADATA = {\n name: \"Squid\",\n url: \"https://app.squidrouter.com\",\n icon: \"https://squidrouter.com/favicon.ico\",\n description: \"Swap, send, and bridge across chains.\",\n};\n\nconst bitcoinZeroAddress = \"1111111111111111111114oLvT2\";\nconst cosmosZeroAddress =\n \"osmo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq65mj83\";\nconst solanaZeroAddress = \"11111111111111111111111111111111\";\nconst suiZeroAddress = \"0x0000000000000000000000000000000000000000\";\nconst xrplZeroAddress = \"rrrrrrrrrrrrrrrrrrrrrhoLvTp\";\nconst stellarZeroAddress =\n \"GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF\";\n// TODO: check\nconst cantonZeroAddress =\n \"none::12200000000000000000000000000000000000000000000000000000000000000000\";\n\nexport const chainTypeToZeroAddressMap: Record<ChainType, string> = {\n [ChainType.EVM]: evmZeroAddress,\n [ChainType.COSMOS]: cosmosZeroAddress,\n [ChainType.BTC]: bitcoinZeroAddress,\n [ChainType.SOLANA]: solanaZeroAddress,\n [ChainType.SUI]: suiZeroAddress,\n [ChainType.XRPL]: xrplZeroAddress,\n [ChainType.STELLAR]: stellarZeroAddress,\n [ChainType.CANTON]: cantonZeroAddress,\n};\n\nexport const nativeEvmTokenAddress =\n \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\nexport const nativeCosmosTokenAddress = \"uosmo\";\nexport const nativeSolanaTokenAddress =\n \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\nexport const nativeBitcoinTokenAddress = \"satoshi\";\nexport const nativeSuiTokenAddress =\n \"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI\";\nexport const nativeXrplTokenAddress = \"xrp\";\nexport const nativeStellarTokenAddress =\n \"CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA\";\nexport const nativeCantonTokenAddress =\n \"DSO::1220b1431ef217342db44d516bb9befde802be7d8899637d290895fa58880f19accc\";\n\n// by setting slippage to undefined, it's set to \"auto\"\nexport const defaultSlippage: SlippageOption = undefined;\nexport const destinationAddressResetValue = \"null\";\nexport const fallbackAddressResetValue = \"null\";\nexport const gasRefundMultiplier = 25;\nexport const internalSquidApiBaseUrl = \"https://app.squidrouter.com/api\";\nexport const XAMAN_API_URL = `${internalSquidApiBaseUrl}/xaman/`;\nexport const TOKEN_PRICE_API_URL = `${internalSquidApiBaseUrl}/coingecko`;\nexport const DEFAULT_ROUTE_REFETCH_INTERVAL = 30_000;\n\nexport const SOLANA_RPC_URL =\n \"https://meredith-ute2ko-fast-mainnet.helius-rpc.com\";\nexport const INTEGRATOR_ID =\n \"squid-widget-playground-local-cd33cba6-7e12-4fcc-8d5d-35e286f655ea\";\n\nexport const DEFAULT_COUNTRY_CODE = \"US\";\n\nexport const CHAIN_IDS = {\n // Cosmos\n OSMOSIS: \"osmosis-1\",\n INJECTIVE: \"injective-1\",\n SECRET: \"secret-4\",\n ARCHWAY: \"archway-1\",\n XION: \"xion-mainnet-1\",\n NOBLE: \"noble-1\",\n AGORIC: \"agoric-3\",\n\n // EVM\n ETHEREUM: \"1\",\n ETHEREUM_SEPOLIA: \"11155111\",\n ARBITRUM: \"42161\",\n BSC: \"56\",\n BASE: \"8453\",\n OPTIMISM: \"10\",\n LINEA: \"59144\",\n BLAST: \"81457\",\n CELO: \"42220\",\n POLYGON: \"137\",\n AVALANCHE: \"43114\",\n IMMUTABLE: \"13371\",\n SCROLL: \"534352\",\n MOONBEAM: \"1284\",\n MANTLE: \"5000\",\n FANTOM: \"250\",\n KAVA: \"2222\",\n FILECOIN: \"314\",\n BERACHAIN: \"80094\",\n SAGA_EVM: \"5464\",\n XRPL_EVM: \"1440000\",\n XRPL_EVM_TESTNET: \"1449000\",\n GNOSIS: \"100\",\n SONIC: \"146\",\n HYPER_EVM: \"999\",\n DCHAIN: \"2716446429837000\",\n SONEIUM: \"1868\",\n PEAQ: \"3338\",\n HEDERA: \"295\",\n MANTRA: \"5888\",\n CITREA: \"4114\",\n TEMPO: \"4217\",\n\n // others\n BITCOIN: \"bitcoin\",\n SOLANA: \"solana-mainnet-beta\",\n SUI: \"sui-mainnet\",\n SUI_TESTNET: \"sui-testnet\",\n XRPL: \"xrpl-mainnet\",\n XRPL_TESTNET: \"xrpl-testnet\",\n STELLAR: \"stellar-mainnet\",\n STELLAR_TESTNET: \"stellar-testnet\",\n CANTON: \"canton\",\n} as const;\n\nexport const chainTypeToDefaultChainIdMap: Record<ChainType, string> = {\n [ChainType.EVM]: CHAIN_IDS.ETHEREUM,\n [ChainType.COSMOS]: CHAIN_IDS.OSMOSIS,\n [ChainType.BTC]: CHAIN_IDS.BITCOIN,\n [ChainType.SOLANA]: CHAIN_IDS.SOLANA,\n [ChainType.SUI]: CHAIN_IDS.SUI,\n [ChainType.XRPL]: CHAIN_IDS.XRPL,\n [ChainType.STELLAR]: CHAIN_IDS.STELLAR,\n [ChainType.CANTON]: CHAIN_IDS.CANTON,\n};\n\nexport const chainTypeToNativeTokenAddressMap: Record<ChainType, string> = {\n [ChainType.EVM]: nativeEvmTokenAddress,\n [ChainType.COSMOS]: nativeCosmosTokenAddress,\n [ChainType.BTC]: nativeBitcoinTokenAddress,\n [ChainType.SOLANA]: nativeSolanaTokenAddress,\n [ChainType.SUI]: nativeSuiTokenAddress,\n [ChainType.XRPL]: nativeXrplTokenAddress,\n [ChainType.STELLAR]: nativeStellarTokenAddress,\n [ChainType.CANTON]: nativeCantonTokenAddress,\n};\n\nexport const defaultConfigValues: AppConfig = {\n integratorId: INTEGRATOR_ID,\n slippage: defaultSlippage,\n apiUrl: squidApiBaseUrl,\n priceImpactWarnings: {\n warning: 3,\n critical: 5,\n },\n};\n\nexport enum EvmPriorityConnectors {\n Safe = \"safe\",\n LedgerLive = \"ledgerLive\",\n}\n\n// Success\nconst cctpSuccessStatuses = [\"complete\"];\nconst chainflipSuccessStatuses = [\"COMPLETE\"];\nconst solanaSameChainSuccessStatuses = [\"finalized\"];\nconst axelarSuccessStatuses = [\n \"destination_executed\",\n \"executed\",\n \"express_executed\",\n \"success\",\n];\n\n// Error\nconst axelarErrorStatuses = [\n \"error_fetching_status\",\n \"error\",\n \"failed_on_destination\",\n];\nconst chainflipErrorStatuses = [\"BROADCAST_ABORTED\"];\n\n// Refunded\nexport const transactionRefundedStatuses = [\"refunded\"];\n\nexport const transactionErrorStatuses = [\n ...axelarErrorStatuses,\n ...chainflipErrorStatuses,\n];\nexport const transactionSuccessStatuses = [\n ...cctpSuccessStatuses,\n ...axelarSuccessStatuses,\n ...chainflipSuccessStatuses,\n ...solanaSameChainSuccessStatuses,\n];\nexport const transactionEndStatuses = [\n ...transactionSuccessStatuses,\n ...transactionRefundedStatuses,\n ...transactionErrorStat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|
|
|
62
62
|
connectedSourceAddress?: string | undefined;
|
|
63
63
|
}) => SwapParams;
|
|
64
64
|
export declare const sortAllTokens: (tokenA: Pick<Token, "address" | "symbol" | "chainId">, tokenB: Pick<Token, "address" | "symbol" | "chainId">) => number;
|
|
65
|
-
export declare const findToken: <T extends Token
|
|
65
|
+
export declare const findToken: <T extends Pick<Token, "address" | "chainId">>(tokens: T[], chainId?: string, address?: string) => T | undefined;
|
|
66
66
|
export declare const findNativeToken: (tokens: Token[], chain: Pick<ChainData, "chainId"> & {
|
|
67
67
|
nativeCurrency: Pick<ChainData["nativeCurrency"], "symbol">;
|
|
68
68
|
}) => Token | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RouteResponse } from "@0xsquid/sdk/dist/types";
|
|
2
|
-
import { ChainData, ChainType, FeeCost, GasCost, Token } from "@0xsquid/squid-types";
|
|
2
|
+
import { ChainData, ChainType, Estimate, FeeCost, GasCost, Token } from "@0xsquid/squid-types";
|
|
3
3
|
import { SimplifiedRouteAction } from "../../core/types/transaction";
|
|
4
4
|
import { ChainFeeParams } from "./tempoService";
|
|
5
5
|
export type PartialFeeCost = Pick<FeeCost, "amount"> & {
|
|
@@ -58,16 +58,26 @@ export declare const formatEstimatedRouteDuration: ({ estimatedRouteDuration, is
|
|
|
58
58
|
* @returns {Object} An object containing various estimate results and calculations, including token information,
|
|
59
59
|
* amounts, fees, gas costs, and other relevant data for the transaction.
|
|
60
60
|
*/
|
|
61
|
-
export
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
export type EstimateRouteInput = {
|
|
62
|
+
params: Pick<RouteResponse["route"]["params"], "fromChain" | "fromToken">;
|
|
63
|
+
estimate: Pick<Estimate, "fromAmount" | "toAmount" | "toAmountMin" | "toAmountUSD" | "toAmountMinUSD" | "exchangeRate" | "estimatedRouteDuration" | "feeCosts"> & {
|
|
64
|
+
toToken: Pick<Token, "decimals">;
|
|
65
|
+
gasCosts: (Omit<GasCost, "token"> & {
|
|
66
|
+
token: Pick<Token, "chainId" | "address" | "decimals">;
|
|
67
|
+
})[];
|
|
68
|
+
actions?: Estimate["actions"];
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export declare const calculateEstimateResults: <T extends Pick<Token, "address" | "chainId" | "decimals"> = Token>({ squidRoute, tokens, fromChain, toChain, collectFees, chainFeeParams, gasToken, }: {
|
|
72
|
+
squidRoute: EstimateRouteInput | undefined;
|
|
73
|
+
tokens: T[];
|
|
74
|
+
fromChain?: Pick<ChainData, "chainType" | "chainId"> | undefined;
|
|
75
|
+
toChain?: Pick<ChainData, "chainType" | "chainId"> | undefined;
|
|
66
76
|
collectFees: boolean;
|
|
67
77
|
chainFeeParams: ChainFeeParams | null;
|
|
68
|
-
gasToken: Token | undefined;
|
|
78
|
+
gasToken: Pick<Token, "decimals"> | undefined;
|
|
69
79
|
}) => {
|
|
70
|
-
fromToken:
|
|
80
|
+
fromToken: T | undefined;
|
|
71
81
|
fromAmount: string | undefined;
|
|
72
82
|
fromAmountFormatted: string;
|
|
73
83
|
toAmountUSD: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnChainExecutionData, RouteResponse, SquidData, type ChainData, type StatusResponse } from "@0xsquid/squid-types";
|
|
1
|
+
import { OnChainExecutionData, RouteActionResponse, RouteResponse, SquidData, type ChainData, type StatusResponse } from "@0xsquid/squid-types";
|
|
2
2
|
import { HistoryTransaction, SwapTransactionHistory } from "../../core/types/history";
|
|
3
3
|
import { PatchedRouteActionResponse, SimplifiedRouteAction, SwapTransactionForHistoryStore, SwapTransactionForStatus, TransactionParams } from "../../core/types/transaction";
|
|
4
4
|
export declare const formatTransactionHistoryDate: (transaction: SwapTransactionForHistoryStore | undefined) => {
|
|
@@ -32,8 +32,14 @@ interface Locale {
|
|
|
32
32
|
* Checks if the provided action is Coral bridge action
|
|
33
33
|
*/
|
|
34
34
|
export declare function isCoralBridgeAction(action: SimplifiedRouteAction): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Determines if a given action completes as part of the user's source transaction.
|
|
37
|
+
* Action types like RFQ are fulfilled by a solver in a separate transaction,
|
|
38
|
+
* so they are NOT completed on source even if they share the same chain.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isActionCompletedOnSourceTx(action: Pick<RouteActionResponse, "type" | "fromChain" | "toChain">, fromChainId: string): boolean;
|
|
35
41
|
export declare function sleep(ms: number): Promise<unknown>;
|
|
36
|
-
export declare const
|
|
42
|
+
export declare const isChainflipDepositRoute: (route?: RouteResponse["route"]) => boolean;
|
|
37
43
|
/**
|
|
38
44
|
* Checks if the route contains a Chainflip bridge action
|
|
39
45
|
*/
|
|
@@ -44,5 +50,9 @@ export declare function isChainflipBridgeTransaction(actions?: SimplifiedRouteAc
|
|
|
44
50
|
* On-chain routes require calling a smart contract to execute
|
|
45
51
|
*/
|
|
46
52
|
export declare function isOnChainTxData(squidData: SquidData): squidData is OnChainExecutionData;
|
|
53
|
+
/**
|
|
54
|
+
* Checks if a route is of type DepositAddressDirectTransfer
|
|
55
|
+
*/
|
|
56
|
+
export declare function isDepositAddressDirectTransferRoute(squidData: SquidData): squidData is OnChainExecutionData;
|
|
47
57
|
export declare function getHistoryTransactionId(tx: HistoryTransaction): string;
|
|
48
58
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChainType } from '@0xsquid/squid-types';
|
|
2
2
|
import { HANA_ID, LOBSTR_ID, FREIGHTER_ID, XBULL_ID, RABET_ID, HOTWALLET_ID, ALBEDO_ID } from '@creit.tech/stellar-wallets-kit';
|
|
3
3
|
import { LEDGER_ID } from '@creit.tech/stellar-wallets-kit/modules/ledger.module.mjs';
|
|
4
|
-
import { a as WindowWalletFlag, w as walletIconBaseUrl, d as definedInWindow } from './index-
|
|
4
|
+
import { a as WindowWalletFlag, w as walletIconBaseUrl, d as definedInWindow } from './index-CtTVUC-R.js';
|
|
5
5
|
import 'viem';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '@tanstack/react-query';
|
|
@@ -96,4 +96,4 @@ function formatStellarWallet(connector, isAvailable) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
export { formatStellarWallet };
|
|
99
|
-
//# sourceMappingURL=stellarService.client-
|
|
99
|
+
//# sourceMappingURL=stellarService.client-B9xCCNV0.js.map
|
package/dist/{stellarService.client-Ko2roGXL.js.map → stellarService.client-B9xCCNV0.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stellarService.client-
|
|
1
|
+
{"version":3,"file":"stellarService.client-B9xCCNV0.js","sources":["../src/services/internal/stellarService.client.ts"],"sourcesContent":["import { ChainType } from \"@0xsquid/squid-types\";\nimport {\n ALBEDO_ID,\n FREIGHTER_ID,\n HANA_ID,\n HOTWALLET_ID,\n LOBSTR_ID,\n RABET_ID,\n XBULL_ID,\n} from \"@creit.tech/stellar-wallets-kit\";\nimport { LEDGER_ID } from \"@creit.tech/stellar-wallets-kit/modules/ledger.module\";\nimport { StellarConnector } from \"../../core/types/stellar\";\nimport {\n ConnectorID,\n StellarWallet,\n WindowWalletFlag,\n} from \"../../core/types/wallet\";\nimport { walletIconBaseUrl } from \"../../core/wallets\";\nimport { definedInWindow } from \"./walletService\";\n\ntype WalletOverride = Partial<\n Pick<\n StellarWallet,\n \"icon\" | \"windowFlag\" | \"skipInstallCheck\" | \"isInstalled\" | \"connectorId\"\n >\n>;\n\nconst walletOverrides: Partial<Record<string, WalletOverride>> = {\n [ALBEDO_ID]: {\n icon: `${walletIconBaseUrl}/albedo.webp`,\n isInstalled: () => false,\n skipInstallCheck: true,\n connectorId: \"albedo\",\n },\n [HOTWALLET_ID]: {\n icon: `${walletIconBaseUrl}/hot.webp`,\n windowFlag: WindowWalletFlag.HotWallet,\n skipInstallCheck: true,\n connectorId: \"hotWallet\",\n },\n [RABET_ID]: {\n icon: `${walletIconBaseUrl}/rabet.webp`,\n },\n [LEDGER_ID]: {\n icon: `${walletIconBaseUrl}/ledger_stellar_snap.webp`,\n },\n [XBULL_ID]: {\n icon: `${walletIconBaseUrl}/xbull.webp`,\n windowFlag: WindowWalletFlag.XBull,\n skipInstallCheck: true,\n connectorId: \"xBull\",\n },\n [FREIGHTER_ID]: {\n connectorId: \"freighter\",\n },\n [LOBSTR_ID]: {\n connectorId: \"lobstr\",\n },\n [HANA_ID]: {\n connectorId: \"hanaWallet\",\n },\n};\n\nexport function formatStellarWallet(\n connector: StellarConnector,\n isAvailable: boolean\n): StellarWallet {\n const { productName, productId, productIcon, productUrl } = connector;\n\n const overrides = walletOverrides[productId];\n const icon = overrides?.icon || productIcon;\n const connectorId = overrides?.connectorId || (productId as ConnectorID);\n\n return {\n connectorId,\n name: productName,\n connectorName: productName,\n type: ChainType.STELLAR,\n icon,\n windowFlag: productName as WindowWalletFlag,\n isMobile: false,\n isInstalled: overrides?.windowFlag\n ? () => definedInWindow(overrides.windowFlag, window)\n : overrides?.isInstalled || (() => isAvailable),\n skipInstallCheck: overrides?.skipInstallCheck,\n connector,\n url: productUrl,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,eAAe,GAA4C;IAC/D,CAAC,SAAS,GAAG;QACX,IAAI,EAAE,CAAG,EAAA,iBAAiB,CAAc,YAAA,CAAA;AACxC,QAAA,WAAW,EAAE,MAAM,KAAK;AACxB,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,WAAW,EAAE,QAAQ;AACtB,KAAA;IACD,CAAC,YAAY,GAAG;QACd,IAAI,EAAE,CAAG,EAAA,iBAAiB,CAAW,SAAA,CAAA;QACrC,UAAU,EAAE,gBAAgB,CAAC,SAAS;AACtC,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,WAAW,EAAE,WAAW;AACzB,KAAA;IACD,CAAC,QAAQ,GAAG;QACV,IAAI,EAAE,CAAG,EAAA,iBAAiB,CAAa,WAAA,CAAA;AACxC,KAAA;IACD,CAA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7 @@
|
|
|
3
3
|
var squidTypes = require('@0xsquid/squid-types');
|
|
4
4
|
var stellarWalletsKit = require('@creit.tech/stellar-wallets-kit');
|
|
5
5
|
var ledger_module = require('@creit.tech/stellar-wallets-kit/modules/ledger.module.mjs');
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-D1udDcRZ.js');
|
|
7
7
|
require('viem');
|
|
8
8
|
require('react');
|
|
9
9
|
require('@tanstack/react-query');
|
|
@@ -98,4 +98,4 @@ function formatStellarWallet(connector, isAvailable) {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
exports.formatStellarWallet = formatStellarWallet;
|
|
101
|
-
//# sourceMappingURL=stellarService.client-
|
|
101
|
+
//# sourceMappingURL=stellarService.client-BFUfF3-j.js.map
|
package/dist/{stellarService.client-0dfuo3PJ.js.map → stellarService.client-BFUfF3-j.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stellarService.client-
|
|
1
|
+
{"version":3,"file":"stellarService.client-BFUfF3-j.js","sources":["../src/services/internal/stellarService.client.ts"],"sourcesContent":["import { ChainType } from \"@0xsquid/squid-types\";\nimport {\n ALBEDO_ID,\n FREIGHTER_ID,\n HANA_ID,\n HOTWALLET_ID,\n LOBSTR_ID,\n RABET_ID,\n XBULL_ID,\n} from \"@creit.tech/stellar-wallets-kit\";\nimport { LEDGER_ID } from \"@creit.tech/stellar-wallets-kit/modules/ledger.module\";\nimport { StellarConnector } from \"../../core/types/stellar\";\nimport {\n ConnectorID,\n StellarWallet,\n WindowWalletFlag,\n} from \"../../core/types/wallet\";\nimport { walletIconBaseUrl } from \"../../core/wallets\";\nimport { definedInWindow } from \"./walletService\";\n\ntype WalletOverride = Partial<\n Pick<\n StellarWallet,\n \"icon\" | \"windowFlag\" | \"skipInstallCheck\" | \"isInstalled\" | \"connectorId\"\n >\n>;\n\nconst walletOverrides: Partial<Record<string, WalletOverride>> = {\n [ALBEDO_ID]: {\n icon: `${walletIconBaseUrl}/albedo.webp`,\n isInstalled: () => false,\n skipInstallCheck: true,\n connectorId: \"albedo\",\n },\n [HOTWALLET_ID]: {\n icon: `${walletIconBaseUrl}/hot.webp`,\n windowFlag: WindowWalletFlag.HotWallet,\n skipInstallCheck: true,\n connectorId: \"hotWallet\",\n },\n [RABET_ID]: {\n icon: `${walletIconBaseUrl}/rabet.webp`,\n },\n [LEDGER_ID]: {\n icon: `${walletIconBaseUrl}/ledger_stellar_snap.webp`,\n },\n [XBULL_ID]: {\n icon: `${walletIconBaseUrl}/xbull.webp`,\n windowFlag: WindowWalletFlag.XBull,\n skipInstallCheck: true,\n connectorId: \"xBull\",\n },\n [FREIGHTER_ID]: {\n connectorId: \"freighter\",\n },\n [LOBSTR_ID]: {\n connectorId: \"lobstr\",\n },\n [HANA_ID]: {\n connectorId: \"hanaWallet\",\n },\n};\n\nexport function formatStellarWallet(\n connector: StellarConnector,\n isAvailable: boolean\n): StellarWallet {\n const { productName, productId, productIcon, productUrl } = connector;\n\n const overrides = walletOverrides[productId];\n const icon = overrides?.icon || productIcon;\n const connectorId = overrides?.connectorId || (productId as ConnectorID);\n\n return {\n connectorId,\n name: productName,\n connectorName: productName,\n type: ChainType.STELLAR,\n icon,\n windowFlag: productName as WindowWalletFlag,\n isMobile: false,\n isInstalled: overrides?.windowFlag\n ? () => definedInWindow(overrides.windowFlag, window)\n : overrides?.isInstalled || (() => isAvailable),\n skipInstallCheck: overrides?.skipInstallCheck,\n connector,\n url: productUrl,\n };\n}\n"],"names":["ALBEDO_ID","walletIconBaseUrl","HOTWALLET_ID","WindowWalletFlag","RABET_ID","LEDGER_ID","XBULL_ID","FREIGHTER_ID","LOBSTR_ID","HANA_ID","ChainType","definedInWindow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,eAAe,GAA4C;IAC/D,CAACA,2BAAS,GAAG;QACX,IAAI,EAAE,CAAG,EAAAC,uBAAiB,CAAc,YAAA,CAAA;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X,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,aAAa,EAAE,WAAW;QAC1B,IAAI,EAAEC,oBAAS,CAAC,OAAO;QACvB,IAAI;AACJ,QAAA,UAAU,EAAE,WAA+B;AAC3C,QAAA,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,SAAS,EAAE;cACpB,MAAMC,qBAAe,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM;cAClD,SAAS,EAAE,WAAW,KAAK,MAAM,WAAW,CAAC;QACjD,gBAAgB,EAAE,SAAS,EAAE,gBAAgB;QAC7C,SAAS;AACT,QAAA,GAAG,EAAE,UAAU;KAChB;AACH;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsquid/react-hooks",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.8.1-beta-canton.0",
|
|
4
4
|
"description": "Squid hooks monorepo",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@0xsquid/sdk": "2.13.0",
|
|
50
|
-
"@0xsquid/squid-types": "0.1.
|
|
50
|
+
"@0xsquid/squid-types": "0.1.227",
|
|
51
51
|
"@bitcoinerlab/secp256k1": "1.1.1",
|
|
52
52
|
"@cosmjs/cosmwasm-stargate": "0.32.4",
|
|
53
53
|
"@cosmjs/encoding": "0.32.4",
|