@meshconnect/uwc-react 0.3.4 → 0.3.5

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 +1 @@
1
- {"version":3,"file":"ConnectionProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ConnectionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAA;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,mBAAmB,EACpB,MAAM,wBAAwB,CAAA;AAE/B,UAAU,sBAAsB;IAC9B,SAAS,EAAE,wBAAwB,CAAA;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,QAAA,MAAM,iBAAiB,8CAAqD,CAAA;AAE5E,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;CAC1C;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,sBAA8B,EAC9B,mBAAmB,EACpB,EAAE,uBAAuB,2CAwCzB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
1
+ {"version":3,"file":"ConnectionProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ConnectionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,mBAAmB,EACpB,MAAM,wBAAwB,CAAA;AAK/B,UAAU,sBAAsB;IAC9B,SAAS,EAAE,wBAAwB,CAAA;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,QAAA,MAAM,iBAAiB,8CAAqD,CAAA;AAE5E,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;CAC1C;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,sBAA8B,EAC9B,mBAAmB,EACpB,EAAE,uBAAuB,2CAqCzB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import React, { createContext, useEffect, useState, useRef } from 'react';
2
+ import React, { createContext, useEffect, useState } from 'react';
3
3
  import { UniversalWalletConnector } from '@meshconnect/uwc-core';
4
+ // Guard against double initialization
5
+ let sharedConnector = null;
4
6
  const ConnectionContext = createContext(null);
5
7
  export function ConnectionProvider({ children, networks, wallets, usingIntegratedBrowser = false, walletConnectConfig }) {
6
- // Create the connector instance only once using useRef
7
- const connectorRef = useRef(null);
8
- if (!connectorRef.current) {
9
- connectorRef.current = new UniversalWalletConnector(networks, wallets, usingIntegratedBrowser, walletConnectConfig);
8
+ if (!sharedConnector) {
9
+ sharedConnector = new UniversalWalletConnector(networks, wallets, usingIntegratedBrowser, walletConnectConfig);
10
10
  }
11
- const connector = connectorRef.current;
11
+ const connector = sharedConnector;
12
12
  const [session, setSession] = useState(() => connector.getSession());
13
13
  const [isReady, setIsReady] = useState(() => connector.isReady());
14
14
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionProvider.js","sourceRoot":"","sources":["../../src/providers/ConnectionProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAgBhE,MAAM,iBAAiB,GAAG,aAAa,CAAgC,IAAI,CAAC,CAAA;AAU5E,MAAM,UAAU,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,sBAAsB,GAAG,KAAK,EAC9B,mBAAmB,EACK;IACxB,uDAAuD;IACvD,MAAM,YAAY,GAAG,MAAM,CAAkC,IAAI,CAAC,CAAA;IAElE,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC1B,YAAY,CAAC,OAAO,GAAG,IAAI,wBAAwB,CACjD,QAAQ,EACR,OAAO,EACP,sBAAsB,EACtB,mBAAmB,CACpB,CAAA;IACH,CAAC;IAED,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAA;IAEtC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAU,GAAG,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAA;IAC7E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;IAEjE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE;YAC3C,UAAU,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAA;YAClC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;QACjC,CAAC,CAAC,CAAA;QAEF,OAAO,WAAW,CAAA;IACpB,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAEf,MAAM,KAAK,GAA2B;QACpC,SAAS;QACT,OAAO;QACP,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;QAC/B,QAAQ,EAAE,SAAS,CAAC,WAAW,EAAE;QACjC,OAAO;KACR,CAAA;IAED,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACrC,QAAQ,GACkB,CAC9B,CAAA;AACH,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
1
+ {"version":3,"file":"ConnectionProvider.js","sourceRoot":"","sources":["../../src/providers/ConnectionProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAQhE,sCAAsC;AACtC,IAAI,eAAe,GAAoC,IAAI,CAAA;AAU3D,MAAM,iBAAiB,GAAG,aAAa,CAAgC,IAAI,CAAC,CAAA;AAU5E,MAAM,UAAU,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,sBAAsB,GAAG,KAAK,EAC9B,mBAAmB,EACK;IACxB,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,eAAe,GAAG,IAAI,wBAAwB,CAC5C,QAAQ,EACR,OAAO,EACP,sBAAsB,EACtB,mBAAmB,CACpB,CAAA;IACH,CAAC;IAED,MAAM,SAAS,GAAG,eAAe,CAAA;IAEjC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAU,GAAG,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAA;IAC7E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;IAEjE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE;YAC3C,UAAU,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAA;YAClC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;QACjC,CAAC,CAAC,CAAA;QAEF,OAAO,WAAW,CAAA;IACpB,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAEf,MAAM,KAAK,GAA2B;QACpC,SAAS;QACT,OAAO;QACP,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;QAC/B,QAAQ,EAAE,SAAS,CAAC,WAAW,EAAE;QACjC,OAAO;KACR,CAAA;IAED,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACrC,QAAQ,GACkB,CAC9B,CAAA;AACH,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshconnect/uwc-react",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "React hooks and components for Universal Wallet Connector",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,100 @@
1
+ import React, { useContext } from 'react'
2
+ import { describe, it, expect, beforeEach, vi } from 'vitest'
3
+ import { createRoot } from 'react-dom/client'
4
+ import { act } from 'react-dom/test-utils'
5
+
6
+ describe('ConnectionProvider singleton behavior', () => {
7
+ beforeEach(async () => {
8
+ vi.resetModules()
9
+ })
10
+
11
+ it('creates only one UniversalWalletConnector across multiple providers', async () => {
12
+ vi.doMock('@meshconnect/uwc-core', () => {
13
+ class UniversalWalletConnector {
14
+ static calls = 0
15
+
16
+ constructor() {
17
+ UniversalWalletConnector.calls++
18
+ }
19
+
20
+ // Minimal API used by the provider
21
+ getSession() {
22
+ return {
23
+ isConnected: false,
24
+ walletId: undefined,
25
+ networkId: undefined
26
+ }
27
+ }
28
+
29
+ isReady() {
30
+ return true
31
+ }
32
+
33
+ subscribe() {
34
+ return () => {}
35
+ }
36
+
37
+ getWallets() {
38
+ return []
39
+ }
40
+
41
+ getNetworks() {
42
+ return []
43
+ }
44
+ }
45
+
46
+ return { UniversalWalletConnector }
47
+ })
48
+
49
+ const { ConnectionProvider, ConnectionContext } = await import(
50
+ './ConnectionProvider'
51
+ )
52
+ const { UniversalWalletConnector } = await import('@meshconnect/uwc-core')
53
+ const connectors: unknown[] = []
54
+
55
+ function Capture() {
56
+ const ctx = useContext(ConnectionContext)
57
+ if (ctx) {
58
+ connectors.push(ctx.connector)
59
+ }
60
+ return null
61
+ }
62
+
63
+ const container = document.createElement('div')
64
+ document.body.appendChild(container)
65
+ const root = createRoot(container)
66
+
67
+ await act(async () => {
68
+ root.render(
69
+ <>
70
+ <ConnectionProvider
71
+ networks={[]}
72
+ wallets={[]}
73
+ usingIntegratedBrowser={false}
74
+ >
75
+ <Capture />
76
+ </ConnectionProvider>
77
+ <ConnectionProvider
78
+ networks={[]}
79
+ wallets={[]}
80
+ usingIntegratedBrowser={false}
81
+ >
82
+ <Capture />
83
+ </ConnectionProvider>
84
+ </>
85
+ )
86
+ })
87
+
88
+ // Only one constructor call expected due to singleton guard
89
+ // @ts-expect-error test-only property
90
+ expect(UniversalWalletConnector.calls).toBe(1)
91
+
92
+ // Both providers should expose the same connector instance
93
+ expect(connectors.length).toBe(2)
94
+ expect(connectors[0]).toBe(connectors[1])
95
+
96
+ await act(async () => {
97
+ root.unmount()
98
+ })
99
+ })
100
+ })
@@ -1,4 +1,4 @@
1
- import React, { createContext, useEffect, useState, useRef } from 'react'
1
+ import React, { createContext, useEffect, useState } from 'react'
2
2
  import { UniversalWalletConnector } from '@meshconnect/uwc-core'
3
3
  import type {
4
4
  Session,
@@ -7,6 +7,9 @@ import type {
7
7
  WalletConnectConfig
8
8
  } from '@meshconnect/uwc-types'
9
9
 
10
+ // Guard against double initialization
11
+ let sharedConnector: UniversalWalletConnector | null = null
12
+
10
13
  interface ConnectionContextValue {
11
14
  connector: UniversalWalletConnector
12
15
  session: Session
@@ -32,11 +35,8 @@ export function ConnectionProvider({
32
35
  usingIntegratedBrowser = false,
33
36
  walletConnectConfig
34
37
  }: ConnectionProviderProps) {
35
- // Create the connector instance only once using useRef
36
- const connectorRef = useRef<UniversalWalletConnector | null>(null)
37
-
38
- if (!connectorRef.current) {
39
- connectorRef.current = new UniversalWalletConnector(
38
+ if (!sharedConnector) {
39
+ sharedConnector = new UniversalWalletConnector(
40
40
  networks,
41
41
  wallets,
42
42
  usingIntegratedBrowser,
@@ -44,7 +44,7 @@ export function ConnectionProvider({
44
44
  )
45
45
  }
46
46
 
47
- const connector = connectorRef.current
47
+ const connector = sharedConnector
48
48
 
49
49
  const [session, setSession] = useState<Session>(() => connector.getSession())
50
50
  const [isReady, setIsReady] = useState(() => connector.isReady())
@@ -1,10 +0,0 @@
1
- export * from './useConnection';
2
- export * from './useSwitchNetwork';
3
- export * from './useDisconnect';
4
- export * from './useSession';
5
- export * from './useWallets';
6
- export * from './useWallet';
7
- export * from './useNetworks';
8
- export * from './useSignMessage';
9
- export * from './useTransaction';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,22 +0,0 @@
1
- import type { UseConnectionReturn } from '@meshconnect/uwc-types';
2
- /**
3
- * Hook for managing wallet connections with both injected and WalletConnect modes
4
- * @param walletId - The ID of the wallet to connect to (e.g., 'metamask', 'trust')
5
- * @returns Connection methods and state for both injected and WalletConnect modes
6
- * @throws Error if used outside of ConnectionProvider
7
- * @example
8
- * ```tsx
9
- * const { walletConnect, injected } = useConnection('metamask')
10
- *
11
- * // Connect with browser extension
12
- * await injected.connect('eip155:1')
13
- *
14
- * // Connect with WalletConnect QR code
15
- * await walletConnect.connect('eip155:1')
16
- * if (walletConnect.connectionURI) {
17
- * // Display QR code with walletConnect.connectionURI
18
- * }
19
- * ```
20
- */
21
- export declare function useConnection(walletId: string): UseConnectionReturn;
22
- //# sourceMappingURL=useConnection.d.ts.map
@@ -1,27 +0,0 @@
1
- interface UseDisconnectReturn {
2
- disconnect: () => Promise<void>;
3
- isLoading: boolean;
4
- }
5
- /**
6
- * Hook for disconnecting the current wallet
7
- * @returns Disconnect function and loading state
8
- * @throws Error if used outside of ConnectionProvider
9
- * @example
10
- * ```tsx
11
- * const { disconnect, isLoading } = useDisconnect()
12
- *
13
- * const handleDisconnect = async () => {
14
- * await disconnect()
15
- * console.log('Wallet disconnected')
16
- * }
17
- *
18
- * return (
19
- * <button onClick={handleDisconnect} disabled={isLoading}>
20
- * {isLoading ? 'Disconnecting...' : 'Disconnect'}
21
- * </button>
22
- * )
23
- * ```
24
- */
25
- export declare function useDisconnect(): UseDisconnectReturn;
26
- export {};
27
- //# sourceMappingURL=useDisconnect.d.ts.map
@@ -1,16 +0,0 @@
1
- import type { Network } from '@meshconnect/uwc-types';
2
- /**
3
- * Hook for accessing the list of configured networks
4
- * @returns Array of network configurations
5
- * @throws Error if used outside of ConnectionProvider
6
- * @example
7
- * ```tsx
8
- * const networks = useNetworks()
9
- *
10
- * networks.forEach(network => {
11
- * console.log(`${network.name}: ${network.id}`)
12
- * })
13
- * ```
14
- */
15
- export declare function useNetworks(): Network[];
16
- //# sourceMappingURL=useNetworks.d.ts.map
@@ -1,18 +0,0 @@
1
- import type { UseSessionReturn } from '@meshconnect/uwc-types';
2
- /**
3
- * Hook for accessing the current wallet session state
4
- * @returns Session information including active address, network, and connection details
5
- * @throws Error if used outside of ConnectionProvider
6
- * @example
7
- * ```tsx
8
- * const { activeAddress, activeNetwork, availableNetworks } = useSession()
9
- *
10
- * if (activeAddress) {
11
- * console.log(`Connected: ${activeAddress}`)
12
- * console.log(`Network: ${activeNetwork?.name}`)
13
- * console.log(`Available networks: ${availableNetworks.length}`)
14
- * }
15
- * ```
16
- */
17
- export declare function useSession(): UseSessionReturn;
18
- //# sourceMappingURL=useSession.d.ts.map
@@ -1,22 +0,0 @@
1
- import type { UseSignMessageReturn } from '@meshconnect/uwc-types';
2
- /**
3
- * Hook for signing messages with the connected wallet
4
- * @returns Object containing signMessage function, loading state, and last signature
5
- * @throws Error if used outside of ConnectionProvider
6
- * @example
7
- * ```tsx
8
- * const { signMessage, isLoading, signature } = useSignMessage()
9
- *
10
- * const handleSign = async () => {
11
- * try {
12
- * const sig = await signMessage('Hello World')
13
- * console.log('Signature:', sig)
14
- * // signature state will also be updated with the result
15
- * } catch (error) {
16
- * console.error('Failed to sign:', error)
17
- * }
18
- * }
19
- * ```
20
- */
21
- export declare function useSignMessage(): UseSignMessageReturn;
22
- //# sourceMappingURL=useSignMessage.d.ts.map
@@ -1,28 +0,0 @@
1
- import type { UseSwitchNetworkReturn } from '@meshconnect/uwc-types';
2
- /**
3
- * Hook for switching networks on the connected wallet
4
- * @returns Network switching function and loading states
5
- * @throws Error if used outside of ConnectionProvider
6
- * @example
7
- * ```tsx
8
- * const { switchNetwork, isLoading, isWaitingForUserApproval } = useSwitchNetwork()
9
- *
10
- * const handleSwitch = async () => {
11
- * try {
12
- * await switchNetwork('eip155:8453') // Switch to Base
13
- * } catch (error) {
14
- * console.error('Network switch failed:', error)
15
- * }
16
- * }
17
- *
18
- * // Show loading UI
19
- * if (isWaitingForUserApproval) {
20
- * return <div>Please approve in your wallet...</div>
21
- * }
22
- * if (isLoading) {
23
- * return <div>Switching network...</div>
24
- * }
25
- * ```
26
- */
27
- export declare function useSwitchNetwork(): UseSwitchNetworkReturn;
28
- //# sourceMappingURL=useSwitchNetwork.d.ts.map
@@ -1,25 +0,0 @@
1
- import type { UseTransactionReturn } from '@meshconnect/uwc-types';
2
- /**
3
- * Hook for sending transactions with the connected wallet
4
- * @returns Object containing sendTransaction function, loading state, and transaction result
5
- * @throws Error if used outside of ConnectionProvider
6
- * @example
7
- * ```tsx
8
- * const { sendTransaction, isLoading, transactionResult } = useTransaction()
9
- *
10
- * const handleSend = async () => {
11
- * try {
12
- * const result = await sendTransaction({
13
- * to: '0x...',
14
- * amount: BigInt('1000000000000000000'),
15
- * from: session.activeAddress
16
- * })
17
- * console.log('Transaction hash:', result.hash)
18
- * } catch (error) {
19
- * console.error('Transaction failed:', error)
20
- * }
21
- * }
22
- * ```
23
- */
24
- export declare function useTransaction(): UseTransactionReturn;
25
- //# sourceMappingURL=useTransaction.d.ts.map
@@ -1,17 +0,0 @@
1
- import type { UseWalletReturn } from '@meshconnect/uwc-types';
2
- /**
3
- * Hook for accessing a specific wallet configuration
4
- * @param {string} walletId - The ID of the wallet to access
5
- * @returns {UseWalletReturn} Object containing the wallet metadata and error if no wallet was found
6
- * @throws {Error} when used outside of ConnectionProvider
7
- * @example
8
- * ```tsx
9
- * const { wallet, error } = useWallet('metamask')
10
- * if (wallet) {
11
- * console.log(wallet.name) // 'MetaMask'
12
- * } else {
13
- * console.log(error?.message) // 'Wallet not found'
14
- * }
15
- */
16
- export declare function useWallet(walletId: string): UseWalletReturn;
17
- //# sourceMappingURL=useWallet.d.ts.map
@@ -1,16 +0,0 @@
1
- import type { WalletMetadata } from '@meshconnect/uwc-types';
2
- /**
3
- * Hook for accessing the list of configured wallets
4
- * @returns Array of wallet metadata including names, IDs, and supported networks
5
- * @throws Error if used outside of ConnectionProvider
6
- * @example
7
- * ```tsx
8
- * const wallets = useWallets()
9
- *
10
- * wallets.forEach(wallet => {
11
- * console.log(`${wallet.name}: ${wallet.id}`)
12
- * })
13
- * ```
14
- */
15
- export declare function useWallets(): WalletMetadata[];
16
- //# sourceMappingURL=useWallets.d.ts.map
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './hooks';
2
- export * from './providers';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import { UniversalWalletConnector } from '@meshconnect/uwc-core';
3
- import type { Session, Network, WalletMetadata, WalletConnectConfig } from '@meshconnect/uwc-types';
4
- interface ConnectionContextValue {
5
- connector: UniversalWalletConnector;
6
- session: Session;
7
- wallets: WalletMetadata[];
8
- networks: Network[];
9
- isReady: boolean;
10
- }
11
- declare const ConnectionContext: React.Context<ConnectionContextValue | null>;
12
- interface ConnectionProviderProps {
13
- children: React.ReactNode;
14
- networks: Network[];
15
- wallets: WalletMetadata[];
16
- usingIntegratedBrowser?: boolean;
17
- walletConnectConfig?: WalletConnectConfig;
18
- }
19
- export declare function ConnectionProvider({ children, networks, wallets, usingIntegratedBrowser, walletConnectConfig }: ConnectionProviderProps): import("react/jsx-runtime").JSX.Element;
20
- export { ConnectionContext };
21
- //# sourceMappingURL=ConnectionProvider.d.ts.map
@@ -1,2 +0,0 @@
1
- export * from './ConnectionProvider';
2
- //# sourceMappingURL=index.d.ts.map