@0xsquid/react-hooks 8.9.0 → 8.9.1-beta-canton-wallet-connection.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.
Files changed (68) hide show
  1. package/dist/core/canton/cantonConnector.d.ts +28 -0
  2. package/dist/core/canton/cip103Client.d.ts +20 -0
  3. package/dist/core/client/index.d.ts +1 -0
  4. package/dist/core/constants.d.ts +3 -0
  5. package/dist/core/fallbackWallets.d.ts +16 -0
  6. package/dist/core/providers/CantonProvider.d.ts +19 -0
  7. package/dist/core/types/canton.d.ts +58 -0
  8. package/dist/core/types/cosmos.d.ts +5 -0
  9. package/dist/core/types/wallet.d.ts +15 -7
  10. package/dist/core/wallets.d.ts +5 -0
  11. package/dist/hooks/canton/useCanton.d.ts +2 -0
  12. package/dist/hooks/canton/useCantonWallets.d.ts +8 -0
  13. package/dist/hooks/chains/useSquidChains.d.ts +1 -0
  14. package/dist/hooks/index.d.ts +1 -0
  15. package/dist/hooks/store/useDepositAddressStore.d.ts +18 -5
  16. package/dist/hooks/swap/useDepositAddress.d.ts +6 -7
  17. package/dist/hooks/tokens/useBalance.d.ts +1 -0
  18. package/dist/hooks/tokens/useNativeBalance.d.ts +1 -0
  19. package/dist/hooks/tokens/useSquidTokens.d.ts +1 -0
  20. package/dist/hooks/transaction/useDepositTransactionStatus.d.ts +20 -0
  21. package/dist/hooks/transaction/useSwapStatusQuery.d.ts +29 -0
  22. package/dist/hooks/wallet/useMultiChainWallet.d.ts +55 -29
  23. package/dist/hooks/wallet/useSigner.d.ts +1 -0
  24. package/dist/hooks/wallet/useWallet.d.ts +59 -29
  25. package/dist/hooks/xrpl/useXrplWallets.d.ts +2 -2
  26. package/dist/{index-BL_AUWQg.js → index-B8h1ypYK.js} +1364 -195
  27. package/dist/index-B8h1ypYK.js.map +1 -0
  28. package/dist/{index-DcBFug8t.js → index-doLvokYY.js} +1349 -177
  29. package/dist/index-doLvokYY.js.map +1 -0
  30. package/dist/{index.es-1XEAWjab.js → index.es-CuIvGVFi.js} +4 -3
  31. package/dist/index.es-CuIvGVFi.js.map +1 -0
  32. package/dist/{index.es-DSQHpime.js → index.es-reWGC10l.js} +4 -3
  33. package/dist/index.es-reWGC10l.js.map +1 -0
  34. package/dist/index.esm.js +3 -2
  35. package/dist/index.esm.js.map +1 -1
  36. package/dist/index.js +9 -5
  37. package/dist/index.js.map +1 -1
  38. package/dist/{secretService-B1SDXLS1.js → secretService-3g7QoMaM.js} +4 -3
  39. package/dist/{secretService-B1SDXLS1.js.map → secretService-3g7QoMaM.js.map} +1 -1
  40. package/dist/{secretService-DxQ78j5I.js → secretService-DMcFUD-e.js} +4 -3
  41. package/dist/{secretService-DxQ78j5I.js.map → secretService-DMcFUD-e.js.map} +1 -1
  42. package/dist/server.d.ts +1 -1
  43. package/dist/server.esm.js +7 -1
  44. package/dist/server.esm.js.map +1 -1
  45. package/dist/server.js +7 -0
  46. package/dist/server.js.map +1 -1
  47. package/dist/services/external/onrampAdapter.d.ts +3 -4
  48. package/dist/services/external/rpcService.d.ts +17 -0
  49. package/dist/services/internal/assetsService.d.ts +10 -1
  50. package/dist/services/internal/cantonDamlValue.d.ts +75 -0
  51. package/dist/services/internal/cantonService.d.ts +64 -0
  52. package/dist/services/internal/cantonTransferService.d.ts +93 -0
  53. package/dist/services/internal/transactionService.d.ts +5 -1
  54. package/dist/services/internal/walletService.d.ts +3 -6
  55. package/dist/{stellarService.client-C4TLBEpm.js → stellarService.client-DLPxIX3n.js} +5 -4
  56. package/dist/{stellarService.client-C4TLBEpm.js.map → stellarService.client-DLPxIX3n.js.map} +1 -1
  57. package/dist/{stellarService.client-CkP5ng2n.js → stellarService.client-DMdUVPJ8.js} +5 -4
  58. package/dist/{stellarService.client-CkP5ng2n.js.map → stellarService.client-DMdUVPJ8.js.map} +1 -1
  59. package/dist/tests/cantonService.test.d.ts +1 -0
  60. package/dist/tests/cantonTransferService.test.d.ts +1 -0
  61. package/dist/tests/cip103Client.test.d.ts +1 -0
  62. package/dist/tests/fallbackWallets.test.d.ts +1 -0
  63. package/dist/tests/wallets.test.d.ts +1 -0
  64. package/package.json +3 -2
  65. package/dist/index-BL_AUWQg.js.map +0 -1
  66. package/dist/index-DcBFug8t.js.map +0 -1
  67. package/dist/index.es-1XEAWjab.js.map +0 -1
  68. package/dist/index.es-DSQHpime.js.map +0 -1
@@ -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,eA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AAC,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO;;AAG3B,MAAA,gCAAgC,GAA8B;AACzE,IAAA,CAAC,SAAS,CAAC,GAAG,GAAG,qBAAqB;AACtC,IAAA,CAAC,SAAS,CAAC,MAAM,GAAG,wBAAwB;AAC5C,IAAA,CAAC,SAAS,CAAC,GAAG,GAAG,yBAAyB;AAC1C,IAAA,CAAC,SAAS,CAAC,MAAM,GAAG,wBAAwB;AAC5C,IAAA,CAAC,SAAS,CAAC,GAAG,GAAG,qBAAqB;AACtC,IAAA,CAAC,SAAS,CAAC,IAAI,GAAG,sBAAsB;AACxC,IAAA,CAAC,SAAS,CAAC,OAAO,GAAG,yBAAyB;;AAahD,IAAY,qBAGX;AAHD,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AAC3B,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;;;"}
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\";\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\n// TODO: pending confirmation with Backend team on final URL\nexport const CANTON_AMULET_REGISTRY_URL = \"/api/canton/scan-proxy\";\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,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,C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AAA,CAAC,SAAS,CAAC,GAAG,GAAG,qBAAqB;AACtC,IAAA,CAAC,SAAS,CAAC,IAAI,GAAG,sBAAsB;AACxC,IAAA,CAAC,SAAS,CAAC,OAAO,GAAG,yBAAyB;AAC9C,IAAA,CAAC,SAAS,CAAC,MAAM,GAAG,wBAAwB;;AAa9C,IAAY,qBAGX;AAHD,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,MAAA,CAAA,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,7 @@ const solanaZeroAddress = "11111111111111111111111111111111";
9
9
  const suiZeroAddress = "0x0000000000000000000000000000000000000000";
10
10
  const xrplZeroAddress = "rrrrrrrrrrrrrrrrrrrrrhoLvTp";
11
11
  const stellarZeroAddress = "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF";
12
+ const cantonZeroAddress = "none::12200000000000000000000000000000000000000000000000000000000000000000";
12
13
  const chainTypeToZeroAddressMap = {
13
14
  [squidTypes.ChainType.EVM]: viem.zeroAddress,
14
15
  [squidTypes.ChainType.COSMOS]: cosmosZeroAddress,
@@ -17,6 +18,7 @@ const chainTypeToZeroAddressMap = {
17
18
  [squidTypes.ChainType.SUI]: suiZeroAddress,
18
19
  [squidTypes.ChainType.XRPL]: xrplZeroAddress,
19
20
  [squidTypes.ChainType.STELLAR]: stellarZeroAddress,
21
+ [squidTypes.ChainType.CANTON]: cantonZeroAddress,
20
22
  };
21
23
  const nativeEvmTokenAddress = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
22
24
  const nativeCosmosTokenAddress = "uosmo";
@@ -25,6 +27,7 @@ const nativeBitcoinTokenAddress = "satoshi";
25
27
  const nativeSuiTokenAddress = "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
26
28
  const nativeXrplTokenAddress = "xrp";
27
29
  const nativeStellarTokenAddress = "CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA";
30
+ const nativeCantonTokenAddress = "DSO::1220b1431ef217342db44d516bb9befde802be7d8899637d290895fa58880f19accc";
28
31
  const CHAIN_IDS = {
29
32
  // Cosmos
30
33
  OSMOSIS: "osmosis-1",
@@ -76,6 +79,7 @@ const CHAIN_IDS = {
76
79
  XRPL_TESTNET: "xrpl-testnet",
77
80
  STELLAR: "stellar-mainnet",
78
81
  STELLAR_TESTNET: "stellar-testnet",
82
+ CANTON: "canton",
79
83
  };
80
84
  ({
81
85
  [squidTypes.ChainType.EVM]: CHAIN_IDS.ETHEREUM,
@@ -85,6 +89,7 @@ const CHAIN_IDS = {
85
89
  [squidTypes.ChainType.SUI]: CHAIN_IDS.SUI,
86
90
  [squidTypes.ChainType.XRPL]: CHAIN_IDS.XRPL,
87
91
  [squidTypes.ChainType.STELLAR]: CHAIN_IDS.STELLAR,
92
+ [squidTypes.ChainType.CANTON]: CHAIN_IDS.CANTON,
88
93
  });
89
94
  const chainTypeToNativeTokenAddressMap = {
90
95
  [squidTypes.ChainType.EVM]: nativeEvmTokenAddress,
@@ -94,6 +99,7 @@ const chainTypeToNativeTokenAddressMap = {
94
99
  [squidTypes.ChainType.SUI]: nativeSuiTokenAddress,
95
100
  [squidTypes.ChainType.XRPL]: nativeXrplTokenAddress,
96
101
  [squidTypes.ChainType.STELLAR]: nativeStellarTokenAddress,
102
+ [squidTypes.ChainType.CANTON]: nativeCantonTokenAddress,
97
103
  };
98
104
  var EvmPriorityConnectors;
99
105
  (function (EvmPriorityConnectors) {
@@ -105,6 +111,7 @@ exports.CHAIN_IDS = CHAIN_IDS;
105
111
  exports.chainTypeToNativeTokenAddressMap = chainTypeToNativeTokenAddressMap;
106
112
  exports.chainTypeToZeroAddressMap = chainTypeToZeroAddressMap;
107
113
  exports.nativeBitcoinTokenAddress = nativeBitcoinTokenAddress;
114
+ exports.nativeCantonTokenAddress = nativeCantonTokenAddress;
108
115
  exports.nativeCosmosTokenAddress = nativeCosmosTokenAddress;
109
116
  exports.nativeEvmTokenAddress = nativeEvmTokenAddress;
110
117
  exports.nativeSolanaTokenAddress = nativeSolanaTokenAddress;
@@ -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,e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AAI;AAChC,IAAA,CAACA,oBAAS,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO;;AAG3B,MAAA,gCAAgC,GAA8B;AACzE,IAAA,CAACA,oBAAS,CAAC,GAAG,GAAG,qBAAqB;AACtC,IAAA,CAACA,oBAAS,CAAC,MAAM,GAAG,wBAAwB;AAC5C,IAAA,CAACA,oBAAS,CAAC,GAAG,GAAG,yBAAyB;AAC1C,IAAA,CAACA,oBAAS,CAAC,MAAM,GAAG,wBAAwB;AAC5C,IAAA,CAACA,oBAAS,CAAC,GAAG,GAAG,qBAAqB;AACtC,IAAA,CAACA,oBAAS,CAAC,IAAI,GAAG,sBAAsB;AACxC,IAAA,CAACA,oBAAS,CAAC,OAAO,GAAG,yBAAyB;;AAahD,IAAY,qBAGX;AAHD,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AAC3B,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;;;;;;;;;;;;"}
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\";\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\n// TODO: pending confirmation with Backend team on final URL\nexport const CANTON_AMULET_REGISTRY_URL = \"/api/canton/scan-proxy\";\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":["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;AAC5D,MAAM,iBAAiB,GACrB,4EAA4E;AAEjE,MAAA,yBAAyB,GAA8B;AAClE,IAAA,CAACA,oBAAS,CAAC,GAAG,GAAGC,gBAAc;AAC/B,IAAA,CAACD,oBAAS,CAAC,MAAM,GAAG,iBAAiB;AACrC,IAAA,CAACA,oBAAS,CAAC,GAAG,GAAG,kBAAkB;AACnC,IAAA,CAACA,oBAAS,CAAC,MAAM,GAAG,iBAAiB;AACrC,IAAA,CAACA,oBAAS,CAAC,GAAG,GAAG,cAAc;AAC/B,IAAA,CAACA,oBAAS,CAAC,IAAI,GAAG,eAAe;AACjC,IAAA,CAACA,oBAAS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BAAyB;AAC1C,IAAA,CAACA,oBAAS,CAAC,MAAM,GAAG,wBAAwB;AAC5C,IAAA,CAACA,oBAAS,CAAC,GAAG,GAAG,qBAAqB;AACtC,IAAA,CAACA,oBAAS,CAAC,IAAI,GAAG,sBAAsB;AACxC,IAAA,CAACA,oBAAS,CAAC,OAAO,GAAG,yBAAyB;AAC9C,IAAA,CAACA,oBAAS,CAAC,MAAM,GAAG,wBAAwB;;AAa9C,IAAY,qBAGX;AAHD,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AAC3B,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;;;;;;;;;;;;;"}
@@ -1,12 +1,11 @@
1
- import { ChainData, Token } from "@0xsquid/squid-types";
2
- import { ExecuteFiatQuoteResult, ExecuteQuoteClient, OnrampConfigResponse, OnrampPaymentMethod, OnRampQuoteParams, OnrampQuoteResponse, OnRampTransactionStatus } from "../../core/types/onramps/onramp";
1
+ import { Token } from "@0xsquid/squid-types";
2
+ import { ExecuteFiatQuoteResult, ExecuteQuoteClient, OnRampQuoteParams, OnRampTransactionStatus, OnrampConfigResponse, OnrampPaymentMethod, OnrampQuoteResponse } from "../../core/types/onramps/onramp";
3
3
  export declare class OnrampService {
4
4
  private readonly baseUrl;
5
5
  getQuote(params: OnRampQuoteParams): Promise<OnrampQuoteResponse>;
6
6
  executeQuote(params: ExecuteQuoteClient): Promise<ExecuteFiatQuoteResult>;
7
7
  getTransactionStatus(transactionId: string, walletAddress: string, providerId: string): Promise<OnRampTransactionStatus>;
8
- getConfiguration({ chains, tokens, }: {
9
- chains: ChainData[];
8
+ getConfiguration({ tokens, }: {
10
9
  tokens: Token[];
11
10
  }): Promise<OnrampConfigResponse>;
12
11
  getPaymentTypes(fiatCurrency: string, cryptoCurrencyID: string, country?: string): Promise<OnrampPaymentMethod[]>;
@@ -1,4 +1,5 @@
1
1
  import { type ChainData, type CosmosChain, type Token } from "@0xsquid/squid-types";
2
+ import { CantonConnector } from "../../core/types/canton";
2
3
  import type { TokenWithBalance } from "../../core/types/tokens";
3
4
  export declare const getTokensSupportingMultiCall: (tokens: Token[], userAddress: string, chains: ChainData[]) => Promise<TokenWithBalance[]>;
4
5
  export declare const getAllEvmTokensBalance: (evmTokens: Token[], userAddress: string, chains: ChainData[]) => Promise<TokenWithBalance[]>;
@@ -57,6 +58,22 @@ export declare const getXrplTokenBalance: (userAddress: string, token: Pick<Toke
57
58
  export declare const getAllXrplTokensBalance: (userAddress: string, xrplTokens: Token[], xrplChains: ChainData[]) => Promise<TokenWithBalance[]>;
58
59
  export declare const getStellarTokenBalance: (userAddress: string, token: Token, chain: ChainData) => Promise<bigint>;
59
60
  export declare const getAllStellarTokensBalance: (userAddress: string, stellarTokens: Token[], stellarChains: ChainData[]) => Promise<TokenWithBalance[]>;
61
+ /**
62
+ * Canton balances are private: they can only be read with a wallet-authorized
63
+ * `ledgerApi` session (the connected wallet supplies a JWT that can read as the
64
+ * party). So balance is fetchable only when a Canton wallet is connected, and
65
+ * only for that wallet's party — there's no address-only read.
66
+ */
67
+ export declare const getCantonTokenBalance: (userAddress: string, token: Token, cantonConnector: CantonConnector) => Promise<string>;
68
+ /**
69
+ * Fetch balances for all Canton tokens in one ACS query. Canton balances are
70
+ * private, so this requires a connected wallet's authorized `ledgerApi`.
71
+ */
72
+ export declare function getAllCantonTokensBalance({ connector, partyId, tokens, }: {
73
+ connector: CantonConnector;
74
+ partyId: string;
75
+ tokens: Token[];
76
+ }): Promise<TokenWithBalance[]>;
60
77
  /**
61
78
  * Returns a promise that resolves when the given promise resolves or after the given timeout
62
79
  * @param ms - timeout in milliseconds
@@ -108,7 +108,16 @@ export type AssetsColors = {
108
108
  }>;
109
109
  };
110
110
  export declare function fetchAssetsColors(): Promise<AssetsColors>;
111
- export declare function initializeSquidWithAssetsColors(squid: Squid, assetsColors: AssetsColors): void;
111
+ export declare function isSupportedChainType(chainType: string): chainType is ChainType;
112
+ /**
113
+ * Normalizes SDK data after each init/refetch before the rest of hooks consumes it.
114
+ *
115
+ * - Removes chains whose chainType is not supported by the local package.
116
+ * - Drops tokens for those removed chains.
117
+ * - Converts Evmos chains/tokens to EVM.
118
+ * - Applies optional asset colors.
119
+ */
120
+ export declare function initializeSquidData(squid: Squid, assetsColors?: AssetsColors): void;
112
121
  export declare function isEmptyObject(obj: Record<string, unknown> | undefined): boolean;
113
122
  export declare const normalizeTokenSymbol: (symbol: string) => string;
114
123
  export declare const areTokenSymbolsCompatible: (symbol1: string, symbol2: string) => boolean;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Builders for Canton/Daml Ledger API Value JSON used in prepareExecute choice arguments.
3
+ * Canton wallets receive JSON shaped like protobuf-defined Daml `Value` nodes.
4
+ */
5
+ export type DamlValueJson = {
6
+ party: string;
7
+ } | {
8
+ text: string;
9
+ } | {
10
+ numeric: string;
11
+ } | {
12
+ contractId: string;
13
+ } | {
14
+ timestamp: string;
15
+ } | {
16
+ bool: boolean;
17
+ } | {
18
+ list: {
19
+ elements: DamlValueJson[];
20
+ };
21
+ } | {
22
+ record: {
23
+ fields: Array<{
24
+ label: string;
25
+ value: DamlValueJson;
26
+ }>;
27
+ };
28
+ } | {
29
+ textMap: {
30
+ entries: Array<{
31
+ key: string;
32
+ value: DamlValueJson;
33
+ }>;
34
+ };
35
+ } | {
36
+ variant: {
37
+ constructor: string;
38
+ value: DamlValueJson;
39
+ };
40
+ };
41
+ type DamlValueField = [label: string, value: DamlValueJson];
42
+ type ChoiceContextScalar = string | number | boolean | null;
43
+ type ChoiceContextObject = {
44
+ [key: string]: ChoiceContextScalar;
45
+ };
46
+ type TaggedChoiceContextValue = string | {
47
+ tag: "AV_Text";
48
+ value: string;
49
+ } | {
50
+ tag: "AV_ContractId";
51
+ value: string;
52
+ } | {
53
+ tag: "AV_Bool";
54
+ value: boolean;
55
+ } | {
56
+ tag: "AV_List";
57
+ value: TaggedChoiceContextValue[];
58
+ } | {
59
+ tag: string;
60
+ value: ChoiceContextScalar | TaggedChoiceContextValue[] | ChoiceContextObject;
61
+ };
62
+ export declare const vParty: (party: string) => DamlValueJson;
63
+ export declare const vText: (text: string) => DamlValueJson;
64
+ export declare const vNumeric: (numeric: string) => DamlValueJson;
65
+ export declare const vContractId: (contractId: string) => DamlValueJson;
66
+ export declare const vList: (elements: DamlValueJson[]) => DamlValueJson;
67
+ export declare const vRecord: (fields: DamlValueField[]) => DamlValueJson;
68
+ export declare const vTextMap: (entries: Array<{
69
+ key: string;
70
+ value: DamlValueJson;
71
+ }>) => DamlValueJson;
72
+ export declare const vTimestamp: (isoString: string) => DamlValueJson;
73
+ export declare function normalizeChoiceContextValue(value: unknown): TaggedChoiceContextValue | null;
74
+ export declare function choiceContextValueToAnyValue(value: TaggedChoiceContextValue): DamlValueJson;
75
+ export {};
@@ -0,0 +1,64 @@
1
+ import { CantonHolding, CantonInstrument } from "../../core/types/canton";
2
+ export declare const CANTON_PARTY_ID_SEPARATOR = "::";
3
+ /** Canton Coin's well-known token-standard instrument id (its address carries no id prefix). */
4
+ export declare const CANTON_AMULET_INSTRUMENT_ID = "Amulet";
5
+ export declare function isCantonAddressValid(address: string): boolean;
6
+ /**
7
+ * Splice token-standard Holding interface id. A party's balance for an
8
+ * instrument is the sum of `amount` across active contracts implementing this interface.
9
+ */
10
+ export declare const CANTON_HOLDING_INTERFACE_ID = "#splice-api-token-holding-v1:Splice.Api.Token.HoldingV1:Holding";
11
+ /**
12
+ * Derive the token-standard instrument `{ admin, id }` from a Squid Canton token
13
+ * address (use the case-sensitive `originalAddress`), or `null` when the address
14
+ * is not a valid Canton token address.
15
+ *
16
+ * The admin party is the last two `::` segments (`name::fingerprint`); the
17
+ * instrument id is everything before that. Canton Coin has no id prefix
18
+ * (`DSO::1220…`) and uses the well-known id `Amulet`.
19
+ * - `DSO::1220…` -> { admin: "DSO::1220…", id: "Amulet" }
20
+ * - `USDCx::decentralized-usdc-…::12208…` -> { admin: "decentralized-usdc-…::12208…", id: "USDCx" }
21
+ */
22
+ export declare function parseCantonInstrument(address: string): CantonInstrument | null;
23
+ /**
24
+ * Body for `POST /v2/state/active-contracts`, filtered to the party's Holding
25
+ * contracts with the interface view included (so we can read amount/instrument).
26
+ *
27
+ * ACS: Active Contract Set — the ledger's currently-active contracts (created and
28
+ * not yet archived) as of a ledger offset.
29
+ */
30
+ export declare function buildHoldingsAcsRequestBody(partyId: string, activeAtOffset: string): {
31
+ activeAtOffset: string;
32
+ eventFormat: {
33
+ verbose: boolean;
34
+ filtersByParty: {
35
+ [x: string]: {
36
+ cumulative: {
37
+ identifierFilter: {
38
+ InterfaceFilter: {
39
+ value: {
40
+ interfaceId: string;
41
+ includeInterfaceView: boolean;
42
+ includeCreatedEventBlob: boolean;
43
+ };
44
+ };
45
+ };
46
+ }[];
47
+ };
48
+ };
49
+ };
50
+ };
51
+ /**
52
+ * Parse the party's Holding contracts (with contract ids) from a raw
53
+ * `/v2/state/active-contracts` response
54
+ * Defensive: skips entries it can't parse.
55
+ */
56
+ export declare function parseCantonHoldings(acsResponse: unknown): CantonHolding[];
57
+ export declare function cantonInstrumentKey(instrument: CantonInstrument): string;
58
+ /**
59
+ * Group the (unlocked) Holding amounts by instrument from a raw
60
+ * `/v2/state/active-contracts` response. Returns a map of instrument key
61
+ * (`admin|id`) -> human-readable decimal string (the token-standard `amount`
62
+ * is already a Decimal, not base units).
63
+ */
64
+ export declare function groupCantonHoldingBalances(acsResponse: unknown): Record<string, string>;
@@ -0,0 +1,93 @@
1
+ import type { CantonConnector, CantonHolding, CantonInstrument, CantonPrepareExecuteParams } from "../../core/types/canton";
2
+ import type { Token } from "../../core/types/tokens";
3
+ import type { DamlValueJson } from "./cantonDamlValue";
4
+ /** Metadata key used by Splice token-standard transfers to carry our Squid orderhash memo. */
5
+ export declare const CANTON_MEMO_KEY = "splice.lfdecentralizedtrust.org/reason";
6
+ /** Interface id for the transfer factory contract returned by the token registry. */
7
+ export declare const TRANSFER_FACTORY_INTERFACE_ID = "#splice-api-token-transfer-instruction-v1:Splice.Api.Token.TransferInstructionV1:TransferFactory";
8
+ export declare function resolveCantonRegistryUrl(instrument: CantonInstrument): string;
9
+ type ChoiceContextData = {
10
+ values?: Record<string, unknown>;
11
+ } & Record<string, unknown>;
12
+ interface TransferChoiceArgs {
13
+ expectedAdmin: string;
14
+ transfer: {
15
+ sender: string;
16
+ receiver: string;
17
+ amount: string;
18
+ instrumentId: {
19
+ admin: string;
20
+ id: string;
21
+ };
22
+ requestedAt: string;
23
+ executeBefore: string;
24
+ /**
25
+ * The input holdings to transfer.
26
+ * Cids: Contract IDs
27
+ */
28
+ inputHoldingCids: string[];
29
+ meta: {
30
+ values: Record<string, string>;
31
+ };
32
+ };
33
+ extraArgs: {
34
+ context: ChoiceContextData;
35
+ meta: {
36
+ values: Record<string, string>;
37
+ };
38
+ };
39
+ }
40
+ /**
41
+ * Build the plain JSON arguments expected by the registry transfer-factory
42
+ * endpoint before it adds choice context and disclosed contracts.
43
+ */
44
+ export declare function buildTransferChoiceArgs({ sender, receiver, amount, instrument, inputHoldingCids, memo, nowMs, }: {
45
+ sender: string;
46
+ receiver: string;
47
+ amount: string;
48
+ instrument: CantonInstrument;
49
+ inputHoldingCids: string[];
50
+ memo: string;
51
+ nowMs: number;
52
+ }): TransferChoiceArgs;
53
+ /**
54
+ * Canton's Holding contracts follow Bitcoin-style UTXOs model.
55
+ *
56
+ * Pick Holding contract ids covering `amount` for the instrument: prefer a
57
+ * single exact-amount holding, else accumulate largest-first.
58
+ */
59
+ export declare function selectInputHoldingCids(holdings: CantonHolding[], instrument: CantonInstrument, amount: string): string[];
60
+ export declare function fetchInputHoldingCids(connector: CantonConnector, party: string, instrument: CantonInstrument, amount: string): Promise<string[]>;
61
+ interface TransferFactoryResponse {
62
+ factoryId: string;
63
+ transferKind?: string;
64
+ choiceContext: {
65
+ choiceContextData?: ChoiceContextData;
66
+ disclosedContracts?: Array<Record<string, unknown>>;
67
+ };
68
+ }
69
+ /**
70
+ * Ask the token registry for the transfer factory contract and extra context
71
+ * required to exercise its transfer choice.
72
+ */
73
+ export declare function fetchTransferFactory(registryUrl: string, choiceArgs: TransferChoiceArgs): Promise<TransferFactoryResponse>;
74
+ /**
75
+ * Convert transfer choice args into strict Daml Value JSON for the wallet's
76
+ * prepareExecute ExerciseCommand.
77
+ */
78
+ export declare function buildPrepareChoiceArgument(choiceArgs: TransferChoiceArgs): DamlValueJson;
79
+ /**
80
+ * Build a Splice token-standard transfer of `amount` of `token` from `sender`
81
+ * to `receiver`, carrying `memo`, ready to hand to a wallet's prepareExecute.
82
+ * Returns the full prepareExecute params (commandId + commands + actAs +
83
+ * disclosedContracts).
84
+ */
85
+ export declare function buildCantonTransfer(connector: CantonConnector, { sender, receiver, amount, token, memo, nowMs, }: {
86
+ sender: string;
87
+ receiver: string;
88
+ amount: string;
89
+ token: Token;
90
+ memo: string;
91
+ nowMs: number;
92
+ }): Promise<CantonPrepareExecuteParams>;
93
+ export {};
@@ -39,7 +39,7 @@ export declare function isCoralBridgeAction(action: SimplifiedRouteAction): bool
39
39
  */
40
40
  export declare function isActionCompletedOnSourceTx(action: Pick<RouteActionResponse, "type" | "fromChain" | "toChain">, fromChainId: string): boolean;
41
41
  export declare function sleep(ms: number): Promise<unknown>;
42
- export declare const isDepositRoute: (route?: RouteResponse["route"]) => boolean;
42
+ export declare const isChainflipDepositRoute: (route?: RouteResponse["route"]) => boolean;
43
43
  /**
44
44
  * Checks if the route contains a Chainflip bridge action
45
45
  */
@@ -50,5 +50,9 @@ export declare function isChainflipBridgeTransaction(actions?: SimplifiedRouteAc
50
50
  * On-chain routes require calling a smart contract to execute
51
51
  */
52
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;
53
57
  export declare function getHistoryTransactionId(tx: HistoryTransaction): string;
54
58
  export {};
@@ -2,6 +2,7 @@ import type { ChainData, Token } from "@0xsquid/squid-types";
2
2
  import { ChainType } from "@0xsquid/squid-types";
3
3
  import { Connector } from "@wagmi/core";
4
4
  import { IBitcoinContextData } from "../../core/providers/BitcoinProvider";
5
+ import { ICantonContextData } from "../../core/providers/CantonProvider";
5
6
  import { ICosmosContextData } from "../../core/providers/CosmosProvider";
6
7
  import { IEvmContextData } from "../../core/providers/EvmProvider";
7
8
  import { ISolanaContextData } from "../../core/providers/SolanaProvider";
@@ -17,14 +18,9 @@ type FormatHashParams = {
17
18
  export declare const formatHash: ({ chainType, hash }: FormatHashParams) => string;
18
19
  export declare const isWalletAddressValid: (chainData?: ChainData, address?: string) => boolean;
19
20
  export declare const redirectToExtensionsStore: (wallet: Wallet) => void;
20
- /**
21
- * Dynamically accesses a nested property of an object based on a dot-separated string path.
22
- * Returns the value of the property if found, otherwise undefined.
23
- * e.g. "xfi.keplr" will return window.xfi.keplr
24
- */
25
- export declare const accessProperty: (object: Record<string, any>, path: string) => any;
26
21
  export declare const definedInWindow: (path: string | undefined, clientWindow: Window | undefined) => boolean;
27
22
  export declare const populateWallets: <T extends Wallet>(window: Window | undefined, wallets: T[]) => T[];
23
+ export declare const buildFallbackWallets: (discovered: Wallet[]) => Wallet[];
28
24
  /**
29
25
  * Get the base chain to connect to
30
26
  * If only one chain type is selected, use that chain type
@@ -74,6 +70,7 @@ interface ConnectWalletMutations {
74
70
  connectSui: ISuiContextData["connectSui"];
75
71
  connectXrpl: IXrplContextData["connectXrpl"];
76
72
  connectStellar: IStellarContextData["connectStellar"];
73
+ connectCanton: ICantonContextData["connectCanton"];
77
74
  }
78
75
  type ConnectWalletParams = {
79
76
  wallet: Wallet;
@@ -3,7 +3,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-DcBFug8t.js');
6
+ var index = require('./index-doLvokYY.js');
7
7
  require('viem');
8
8
  require('react');
9
9
  require('@tanstack/react-query');
@@ -14,13 +14,13 @@ require('axios');
14
14
  require('@walletconnect/modal');
15
15
  require('@walletconnect/universal-provider');
16
16
  require('ripple-address-codec');
17
+ require('bignumber.js');
17
18
  require('@solana/spl-token');
18
19
  require('@solana/wallet-standard-wallet-adapter-base');
19
20
  require('@solana/web3.js');
20
21
  require('@stellar/stellar-sdk');
21
22
  require('@mysten/wallet-standard');
22
23
  require('ethers');
23
- require('bignumber.js');
24
24
  require('countries-list');
25
25
  require('currency-symbol-map');
26
26
  require('fuse.js');
@@ -28,6 +28,7 @@ require('zustand');
28
28
  require('zustand/middleware');
29
29
  require('wagmi');
30
30
  require('@safe-global/safe-apps-sdk');
31
+ require('@sigilry/dapp');
31
32
  require('@wallet-standard/core');
32
33
  require('@mysten/slush-wallet');
33
34
  require('@cosmjs/stargate');
@@ -93,9 +94,9 @@ function formatStellarWallet(connector, isAvailable) {
93
94
  : overrides?.isInstalled || (() => isAvailable),
94
95
  skipInstallCheck: overrides?.skipInstallCheck,
95
96
  connector,
96
- url: productUrl,
97
+ links: { website: productUrl },
97
98
  };
98
99
  }
99
100
 
100
101
  exports.formatStellarWallet = formatStellarWallet;
101
- //# sourceMappingURL=stellarService.client-C4TLBEpm.js.map
102
+ //# sourceMappingURL=stellarService.client-DLPxIX3n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stellarService.client-C4TLBEpm.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;AACxC,QAAA,WAAW,EAAE,MAAM,KAAK;AACxB,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,WAAW,EAAE,QAAQ;AACtB,KAAA;IACD,CAACC,8BAAY,GAAG;QACd,IAAI,EAAE,CAAG,EAAAD,uBAAiB,CAAW,SAAA,CAAA;QACrC,UAAU,EAAEE,sBAAgB,CAAC,SAAS;AACtC,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,WAAW,EAAE,WAAW;AACzB,KAAA;IACD,CAACC,0BAAQ,GAAG;QACV,IAAI,EAAE,CAAG,EAAAH,uBAAiB,CAAa,WAAA,CAAA;AACxC,KAAA;IACD,CAACI,uBAAS,GAAG;QACX,IAAI,EAAE,CAAG,EAAAJ,uBAAiB,CAA2B,yBAAA,CAAA;AACtD,KAAA;IACD,CAACK,0BAAQ,GAAG;QACV,IAAI,EAAE,CAAG,EAAAL,uBAAiB,CAAa,WAAA,CAAA;QACvC,UAAU,EAAEE,sBAAgB,CAAC,KAAK;AAClC,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,WAAW,EAAE,OAAO;AACrB,KAAA;IACD,CAACI,8BAAY,GAAG;AACd,QAAA,WAAW,EAAE,WAAW;AACzB,KAAA;IACD,CAACC,2BAAS,GAAG;AACX,QAAA,WAAW,EAAE,QAAQ;AACtB,KAAA;IACD,CAACC,yBAAO,GAAG;AACT,QAAA,WAAW,EAAE,YAAY;AAC1B,KAAA;CACF;AAEe,SAAA,mBAAmB,CACjC,SAA2B,EAC3B,WAAoB,EAAA;IAEpB,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,SAAS;AAErE,IAAA,MAAM,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;AAC5C,IAAA,MAAM,IAAI,GAAG,SAAS,EAAE,IAAI,IAAI,WAAW;AAC3C,IAAA,MAAM,WAAW,GAAG,SAAS,EAAE,WAAW,IAAK,SAAyB;IAExE,OAAO;QACL,WAAW;AACX,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;;;;"}
1
+ {"version":3,"file":"stellarService.client-DLPxIX3n.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 links: { website: 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":";;;;;;;;;;;;;;;;;;;;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,MAAM,IAAI,GAAG,SAAS,EAAE,IAAI,IAAI,WAAW;AAC3C,IAAA,MAAM,WAAW,GAAG,SAAS,EAAE,WAAW,IAAK,SAAyB;IAExE,OAAO;QACL,WAAW;AACX,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,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;KAC/B;AACH;;;;"}
@@ -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-BL_AUWQg.js';
4
+ import { a as WindowWalletFlag, w as walletIconBaseUrl, d as definedInWindow } from './index-B8h1ypYK.js';
5
5
  import 'viem';
6
6
  import 'react';
7
7
  import '@tanstack/react-query';
@@ -12,13 +12,13 @@ import 'axios';
12
12
  import '@walletconnect/modal';
13
13
  import '@walletconnect/universal-provider';
14
14
  import 'ripple-address-codec';
15
+ import 'bignumber.js';
15
16
  import '@solana/spl-token';
16
17
  import '@solana/wallet-standard-wallet-adapter-base';
17
18
  import '@solana/web3.js';
18
19
  import '@stellar/stellar-sdk';
19
20
  import '@mysten/wallet-standard';
20
21
  import 'ethers';
21
- import 'bignumber.js';
22
22
  import 'countries-list';
23
23
  import 'currency-symbol-map';
24
24
  import 'fuse.js';
@@ -26,6 +26,7 @@ import 'zustand';
26
26
  import 'zustand/middleware';
27
27
  import 'wagmi';
28
28
  import '@safe-global/safe-apps-sdk';
29
+ import '@sigilry/dapp';
29
30
  import '@wallet-standard/core';
30
31
  import '@mysten/slush-wallet';
31
32
  import '@cosmjs/stargate';
@@ -91,9 +92,9 @@ function formatStellarWallet(connector, isAvailable) {
91
92
  : overrides?.isInstalled || (() => isAvailable),
92
93
  skipInstallCheck: overrides?.skipInstallCheck,
93
94
  connector,
94
- url: productUrl,
95
+ links: { website: productUrl },
95
96
  };
96
97
  }
97
98
 
98
99
  export { formatStellarWallet };
99
- //# sourceMappingURL=stellarService.client-CkP5ng2n.js.map
100
+ //# sourceMappingURL=stellarService.client-DMdUVPJ8.js.map