@dogeos/dogeos-sdk 3.0.19-beta.5 → 3.1.0-beta.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.
package/dist/index.d.ts CHANGED
@@ -1,22 +1,18 @@
1
- import { AdaptorChainType } from '../../../wallet-adaptor-base';
1
+ import { AdaptorChainType } from '@tomo-inc/wallet-adaptor-base';
2
2
  import { Chain as Chain_2 } from 'viem/chains';
3
3
  import { ChainTypeEnum } from '@tomo-inc/wallet-utils';
4
- import type { ConfigThemes } from '@heroui/theme';
5
- import { Connector } from '../../../wallet-adaptor-base';
6
- import { ConnectorProvider } from '../../../wallet-adaptor-base';
7
- import { ConnectorProviders } from '../../../../wallet-adaptor-base';
4
+ import { Connector } from '@tomo-inc/wallet-adaptor-base';
5
+ import { ConnectorProvider } from '@tomo-inc/wallet-adaptor-base';
6
+ import { ConnectorProviders } from '@tomo-inc/wallet-adaptor-base';
8
7
  import { default as default_2 } from 'react';
9
- import type { DefaultThemeType } from '@heroui/theme';
10
8
  import { EmbeddedWallet } from '@tomo-inc/embedded-wallet-providers';
11
9
  import { JSX as JSX_2 } from 'react/jsx-runtime';
12
- import type { LayoutTheme } from '@heroui/theme';
13
- import { SignInParams } from '../../../wallet-adaptor-base';
14
- import { WalletConfig } from '../../../wallet-adaptor-base';
15
- import { WalletConfig as WalletConfig_2 } from '../../../../wallet-adaptor-base';
16
- import { WalletInfo } from '../../../wallet-adaptor-base';
10
+ import { SignInParams } from '@tomo-inc/wallet-adaptor-base';
11
+ import { ThemeConfig as ThemeConfig_2 } from '@tomo-inc/tomo-ui';
12
+ import { WalletConfig } from '@tomo-inc/wallet-adaptor-base';
13
+ import { WalletInfo } from '@tomo-inc/wallet-adaptor-base';
17
14
  import { WalletProvider } from '@tomo-inc/inject-providers';
18
- import { WalletProvider as WalletProvider_2 } from '../../../wallet-adaptor-base';
19
- import { WalletProvider as WalletProvider_3 } from '../../../../wallet-adaptor-base';
15
+ import { WalletProvider as WalletProvider_2 } from '@tomo-inc/wallet-adaptor-base';
20
16
 
21
17
  export declare type BasicLoginType = "email" | "externalWallets";
22
18
 
@@ -62,6 +58,8 @@ export declare interface ConnectData {
62
58
 
63
59
  export declare type ConnectErrorType = Error;
64
60
 
61
+ export declare type ConnectionStatus = "disconnected" | "connecting" | "connected";
62
+
65
63
  export declare interface ConnectVariables {
66
64
  wallet: WalletConnector;
67
65
  chainType: ChainType;
@@ -83,6 +81,7 @@ declare interface EmbeddedWalletState {
83
81
  message: string | null;
84
82
  connectedInfo: EmbeddedWalletConnectedInfo | null;
85
83
  isLoading: boolean;
84
+ error: Error | null;
86
85
  }
87
86
 
88
87
  export declare type EvmChain = Chain_2;
@@ -103,7 +102,7 @@ export declare type GetChainsReturnType = Promise<Partial<Record<ChainType, EvmC
103
102
  *
104
103
  * @returns Returns all available wallet connectors
105
104
  */
106
- export declare function getConnectors(): Promise<WalletConfig_2[]>;
105
+ export declare function getConnectors(): Promise<WalletConfig[]>;
107
106
 
108
107
  export declare type GetConnectorsReturnType = Promise<WalletConfig[]>;
109
108
 
@@ -164,13 +163,6 @@ export declare type SwitchChainOptions = {
164
163
 
165
164
  export declare type ThemeConfig = ThemeConfig_2;
166
165
 
167
- declare type ThemeConfig_2 = {
168
- prefix?: string;
169
- layout?: LayoutTheme;
170
- themes?: ConfigThemes;
171
- defaultTheme?: DefaultThemeType;
172
- };
173
-
174
166
  /**
175
167
  * Account information and actions exposed to users
176
168
  *
@@ -196,25 +188,12 @@ export declare const useAccount: () => UseAccount;
196
188
 
197
189
  export declare const useConnectors: () => {
198
190
  connectors: ConnectorProviders | null;
199
- currentProvider: WalletProvider_3 | null;
191
+ currentProvider: WalletProvider_2 | null;
200
192
  };
201
193
 
202
194
  /**
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
- * ```
195
+ * Internal hook to access embedded wallet state.
196
+ * NOT part of the public API — use `useWalletConnect()` for readiness.
218
197
  */
219
198
  export declare const useEmbeddedWallet: () => EmbeddedWalletState;
220
199
 
@@ -225,25 +204,21 @@ export declare interface UserLoginConfig {
225
204
 
226
205
  export declare type UseWalletConnect = {
227
206
  isOpenModal: boolean;
207
+ connectionStatus: ConnectionStatus;
228
208
  isConnected: boolean;
229
209
  isConnecting: boolean;
210
+ isDisconnected: boolean;
230
211
  error: string;
212
+ walletStatus: WalletStatus;
213
+ isWalletReady: boolean;
214
+ isWalletLoading: boolean;
231
215
  connect: (variables: ConnectVariables) => Promise<ConnectData>;
232
216
  disconnect: () => Promise<void>;
233
217
  openModal: () => void;
234
218
  closeModal: () => void;
235
219
  };
236
220
 
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
- };
221
+ export declare const useWalletConnect: () => UseWalletConnect;
247
222
 
248
223
  /**
249
224
  * Embedded wallet connect component that renders the modal content with proper context
@@ -352,4 +327,6 @@ export { WalletInfo }
352
327
 
353
328
  export { WalletProvider }
354
329
 
330
+ export declare type WalletStatus = "disabled" | "initializing" | "ready" | "unavailable" | "error";
331
+
355
332
  export { }