@tomo-inc/wallet-connect-kit 0.0.19 → 0.0.21

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.d.ts CHANGED
@@ -7,7 +7,6 @@ import { ConnectorProvider } from '../../../wallet-adaptor-base';
7
7
  import { ConnectorProviders } from '../../../../wallet-adaptor-base';
8
8
  import { default as default_2 } from 'react';
9
9
  import type { DefaultThemeType } from '@heroui/theme';
10
- import { EmbeddedWallet } from '@tomo-inc/embedded-wallet-providers';
11
10
  import { JSX as JSX_2 } from 'react/jsx-runtime';
12
11
  import type { LayoutTheme } from '@heroui/theme';
13
12
  import { SignInParams } from '../../../wallet-adaptor-base';
@@ -62,29 +61,14 @@ export declare interface ConnectData {
62
61
 
63
62
  export declare type ConnectErrorType = Error;
64
63
 
64
+ export declare type ConnectionStatus = "disconnected" | "connecting" | "connected";
65
+
65
66
  export declare interface ConnectVariables {
66
67
  wallet: WalletConnector;
67
68
  chainType: ChainType;
68
69
  chainId?: string;
69
70
  }
70
71
 
71
- /**
72
- * Connected information from embedded wallet
73
- */
74
- declare interface EmbeddedWalletConnectedInfo {
75
- evmProvider?: ProviderConnectionInfo;
76
- solanaProvider?: ProviderConnectionInfo;
77
- dogeProvider?: ProviderConnectionInfo;
78
- }
79
-
80
- declare interface EmbeddedWalletState {
81
- wallet: EmbeddedWallet | null;
82
- isAvailable: boolean;
83
- message: string | null;
84
- connectedInfo: EmbeddedWalletConnectedInfo | null;
85
- isLoading: boolean;
86
- }
87
-
88
72
  export declare type EvmChain = Chain_2;
89
73
 
90
74
  /**
@@ -124,15 +108,6 @@ export declare enum ModalView {
124
108
  WalletHome = "WALLET_HOME"
125
109
  }
126
110
 
127
- /**
128
- * Provider connection information
129
- */
130
- declare interface ProviderConnectionInfo {
131
- chainType: ChainTypeEnum;
132
- connected: boolean;
133
- address?: string[];
134
- }
135
-
136
111
  /**
137
112
  * Provider information stored in wallet state
138
113
  */
@@ -199,25 +174,6 @@ export declare const useConnectors: () => {
199
174
  currentProvider: WalletProvider_3 | null;
200
175
  };
201
176
 
202
- /**
203
- * Hook to access embedded wallet from anywhere in the app
204
- * Make sure your component is wrapped with WalletConnectProvider
205
- *
206
- * @example
207
- * ```tsx
208
- * const { wallet, isAvailable, message, connectedInfo, isLoading } = useEmbeddedWallet();
209
- *
210
- * if (isLoading) {
211
- * return <div>Loading embedded wallet...</div>;
212
- * }
213
- *
214
- * if (isAvailable && wallet) {
215
- * // Use embedded wallet
216
- * }
217
- * ```
218
- */
219
- export declare const useEmbeddedWallet: () => EmbeddedWalletState;
220
-
221
177
  export declare interface UserLoginConfig {
222
178
  basicLogins?: BasicLoginType[];
223
179
  socialLogins?: SocialLoginProvider[];
@@ -225,25 +181,21 @@ export declare interface UserLoginConfig {
225
181
 
226
182
  export declare type UseWalletConnect = {
227
183
  isOpenModal: boolean;
184
+ connectionStatus: ConnectionStatus;
228
185
  isConnected: boolean;
229
186
  isConnecting: boolean;
187
+ isDisconnected: boolean;
230
188
  error: string;
189
+ walletStatus: WalletStatus;
190
+ isWalletReady: boolean;
191
+ isWalletLoading: boolean;
231
192
  connect: (variables: ConnectVariables) => Promise<ConnectData>;
232
193
  disconnect: () => Promise<void>;
233
194
  openModal: () => void;
234
195
  closeModal: () => void;
235
196
  };
236
197
 
237
- export declare const useWalletConnect: () => {
238
- isOpenModal: boolean;
239
- openModal: () => void;
240
- closeModal: () => void;
241
- isConnected: boolean;
242
- isConnecting: boolean;
243
- error: string;
244
- connect: (variables: ConnectVariables) => Promise<ConnectData>;
245
- disconnect: () => Promise<void>;
246
- };
198
+ export declare const useWalletConnect: () => UseWalletConnect;
247
199
 
248
200
  /**
249
201
  * Embedded wallet connect component that renders the modal content with proper context
@@ -351,4 +303,6 @@ export { WalletInfo }
351
303
 
352
304
  export { WalletProvider }
353
305
 
306
+ export declare type WalletStatus = "disabled" | "initializing" | "ready" | "unavailable" | "error";
307
+
354
308
  export { }