@layerswap/wallets 2.3.1 → 2.4.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.
@@ -1,4 +1,5 @@
1
1
  import KnownInternalNames from '@layerswap/utils/known-ids';
2
+ import { stellarWalletConnectChain } from '@layerswap/wallet-stellar';
2
3
  import { defineWalletDescriptor } from './defineWalletDescriptor';
3
4
  import { readStorageJson } from './persistedSession';
4
5
  const STELLAR_NETWORKS = [KnownInternalNames.Networks.StellarMainnet, KnownInternalNames.Networks.StellarTestnet];
@@ -10,7 +11,7 @@ export function createStellarDescriptor(walletConnect, options) {
10
11
  name: 'Stellar',
11
12
  capabilities: walletConnect?.projectId ? {
12
13
  walletConnectRegistry: {
13
- networkTypes: ['stellar'],
14
+ networkTypes: [stellarWalletConnectChain.networkType],
14
15
  },
15
16
  } : undefined,
16
17
  autofillSupportedNetworks: supportedNetworks,
@@ -1,4 +1,5 @@
1
1
  import KnownInternalNames from "@layerswap/utils/known-ids";
2
+ import { solanaWalletConnectChain } from '@layerswap/wallet-svm';
2
3
  import { defineWalletDescriptor } from "./defineWalletDescriptor";
3
4
  import { hasStorageKey } from "./persistedSession";
4
5
  // SVM's runtime list is built dynamically from `NetworkType.Solana` networks
@@ -25,7 +26,7 @@ export function createSVMDescriptor(walletConnectConfigs, options) {
25
26
  // Keep widget and wallet imports type-only to preserve lazy loading.
26
27
  capabilities: {
27
28
  walletConnectRegistry: {
28
- networkTypes: ['solana'],
29
+ networkTypes: [solanaWalletConnectChain.networkType],
29
30
  },
30
31
  },
31
32
  autofillSupportedNetworks: supportedNetworks,
package/dist/esm/index.js CHANGED
@@ -17,6 +17,8 @@ import { createSVMDescriptor } from "./descriptors/svm";
17
17
  import { createTONDescriptor } from "./descriptors/ton";
18
18
  import { createTronDescriptor } from "./descriptors/tron";
19
19
  import { createStellarDescriptor } from "./descriptors/stellar";
20
+ import { registerDefaultWalletConnectChains } from './walletConnectRegistry';
21
+ export { registerDefaultWalletConnectChains };
20
22
  export { defineWalletDescriptor } from "./descriptors/defineWalletDescriptor";
21
23
  export { createBitcoinDescriptor };
22
24
  export { createEVMProvider };
@@ -73,6 +75,7 @@ export { createStellarDescriptor };
73
75
  * ```
74
76
  */
75
77
  export function getDefaultProviders(config = {}) {
78
+ registerDefaultWalletConnectChains();
76
79
  const { walletConnect, ton, immutablePassport } = config;
77
80
  const providers = [
78
81
  // EVM — eager (common case, kept on the initial bundle).
@@ -0,0 +1,9 @@
1
+ import { defaultWalletConnectChainRegistry } from '@layerswap/wallet-core';
2
+ import { registerEvmWalletConnectChain } from '@layerswap/wallet-evm';
3
+ import { registerSolanaWalletConnectChain } from '@layerswap/wallet-svm';
4
+ import { registerStellarWalletConnectChain } from '@layerswap/wallet-stellar';
5
+ export function registerDefaultWalletConnectChains(registry = defaultWalletConnectChainRegistry) {
6
+ registerEvmWalletConnectChain(registry);
7
+ registerSolanaWalletConnectChain(registry);
8
+ registerStellarWalletConnectChain(registry);
9
+ }