@aomi-labs/react 0.2.3 → 0.2.4

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/index.cjs CHANGED
@@ -42,10 +42,12 @@ __export(index_exports, {
42
42
  ControlContextProvider: () => ControlContextProvider,
43
43
  EventContextProvider: () => EventContextProvider,
44
44
  NotificationContextProvider: () => NotificationContextProvider,
45
+ SUPPORTED_CHAINS: () => SUPPORTED_CHAINS,
45
46
  ThreadContextProvider: () => ThreadContextProvider,
46
47
  UserContextProvider: () => UserContextProvider,
47
48
  cn: () => cn,
48
49
  formatAddress: () => formatAddress,
50
+ getChainInfo: () => getChainInfo,
49
51
  getNetworkName: () => getNetworkName,
50
52
  initThreadControl: () => initThreadControl,
51
53
  useAomiRuntime: () => useAomiRuntime,
@@ -1394,6 +1396,15 @@ var getNetworkName = (chainId) => {
1394
1396
  }
1395
1397
  };
1396
1398
  var formatAddress = (addr) => addr ? `${addr.slice(0, 6)}...${addr.slice(-4)}` : "Connect Wallet";
1399
+ var SUPPORTED_CHAINS = [
1400
+ { id: 1, name: "Ethereum", ticker: "ETH" },
1401
+ { id: 137, name: "Polygon", ticker: "MATIC" },
1402
+ { id: 42161, name: "Arbitrum", ticker: "ARB" },
1403
+ { id: 8453, name: "Base", ticker: "BASE" },
1404
+ { id: 10, name: "Optimism", ticker: "OP" },
1405
+ { id: 11155111, name: "Sepolia", ticker: "SEP" }
1406
+ ];
1407
+ var getChainInfo = (chainId) => chainId === void 0 ? void 0 : SUPPORTED_CHAINS.find((c) => c.id === chainId);
1397
1408
 
1398
1409
  // packages/react/src/state/backend-state.ts
1399
1410
  function createBackendState() {
@@ -2555,10 +2566,12 @@ function useNotificationHandler({
2555
2566
  ControlContextProvider,
2556
2567
  EventContextProvider,
2557
2568
  NotificationContextProvider,
2569
+ SUPPORTED_CHAINS,
2558
2570
  ThreadContextProvider,
2559
2571
  UserContextProvider,
2560
2572
  cn,
2561
2573
  formatAddress,
2574
+ getChainInfo,
2562
2575
  getNetworkName,
2563
2576
  initThreadControl,
2564
2577
  useAomiRuntime,