@sodax/wallet-sdk-react 0.0.1-rc.5 → 0.0.1-rc.6

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/README.md CHANGED
@@ -12,7 +12,7 @@ A comprehensive React Wallet SDK tailored for the Sodax ecosystem that provides
12
12
  - ICON Wallets: ✅ (Hana Wallet and other ICON-compatible extensions)
13
13
 
14
14
  - Address and connection state management
15
- - EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon) ✅
15
+ - EVM (Arbitrum, Avalanche, Base, BSC, Optimism, Polygon, Sonic, HyperEVM, Lightlink) ✅
16
16
  - Sui ✅
17
17
  - Solana ✅
18
18
  - Stellar ✅
@@ -49,48 +49,34 @@ This package requires the following peer dependencies:
49
49
  ```typescript
50
50
  import { SodaxWalletProvider, useXConnectors, useXConnect, useXAccount } from '@sodax/wallet-sdk-react';
51
51
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
52
- import {
53
- ARBITRUM_MAINNET_CHAIN_ID,
54
- AVALANCHE_MAINNET_CHAIN_ID,
55
- BASE_MAINNET_CHAIN_ID,
56
- BSC_MAINNET_CHAIN_ID,
57
- OPTIMISM_MAINNET_CHAIN_ID,
58
- POLYGON_MAINNET_CHAIN_ID,
59
- SONIC_MAINNET_CHAIN_ID,
60
- } from '@sodax/types';
52
+ import type { RpcConfig } from '@sodax/types';
61
53
 
62
54
  // Create a QueryClient instance
63
55
  const queryClient = new QueryClient();
64
56
 
57
+ const rpcConfig: RpcConfig = {
58
+ // EVM chains
59
+ sonic: 'https://rpc.soniclabs.com',
60
+ '0xa86a.avax': 'https://api.avax.network/ext/bc/C/rpc',
61
+ '0xa4b1.arbitrum': 'https://arb1.arbitrum.io/rpc',
62
+ '0x2105.base': 'https://mainnet.base.org',
63
+ '0x38.bsc': 'https://bsc-dataseed1.binance.org',
64
+ '0xa.optimism': 'https://mainnet.optimism.io',
65
+ '0x89.polygon': 'https://polygon-rpc.com',
66
+
67
+ // Other chains
68
+ '0x1.icon': 'https://ctz.solidwallet.io/api/v3',
69
+ solana: 'https://solana-mainnet.g.alchemy.com/v2/your-api-key',
70
+ sui: 'https://fullnode.mainnet.sui.io',
71
+ 'injective-1': 'https://sentry.tm.injective.network:26657',
72
+ };
73
+
65
74
  function App() {
66
75
  return (
67
76
  <QueryClientProvider client={queryClient}>
68
- <SodaxWalletProvider
69
- config={{
70
- EVM: {
71
- chains: [
72
- ARBITRUM_MAINNET_CHAIN_ID,
73
- AVALANCHE_MAINNET_CHAIN_ID,
74
- BASE_MAINNET_CHAIN_ID,
75
- BSC_MAINNET_CHAIN_ID,
76
- OPTIMISM_MAINNET_CHAIN_ID,
77
- POLYGON_MAINNET_CHAIN_ID,
78
- SONIC_MAINNET_CHAIN_ID,
79
- ],
80
- },
81
- SUI: {
82
- isMainnet: true,
83
- },
84
- SOLANA: {
85
- endpoint: 'https://your-rpc-endpoint',
86
- },
87
- ICON: {},
88
- INJECTIVE: {},
89
- STELLAR: {},
90
- }}
91
- >
77
+ <SodaxWalletProvider rpcConfig={rpcConfig}>
92
78
  <WalletConnect />
93
- </SodaxWalletProvider>
79
+ </SodaxWalletProvider>
94
80
  </QueryClientProvider>
95
81
  );
96
82
  }