@dogeos/dogeos-sdk 3.0.10 → 3.0.12

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,12 +1,19 @@
1
1
  import { AdaptorChainType } from '../../../wallet-adaptor-base';
2
2
  import { Chain as Chain_2 } from 'viem/chains';
3
+ import { ChainTypeEnum } from '@tomo-inc/wallet-utils';
4
+ import type { ConfigThemes } from '@heroui/theme';
3
5
  import { Connector } from '../../../wallet-adaptor-base';
6
+ import { ConnectorProvider } from '../../../wallet-adaptor-base';
7
+ import { ConnectorProviders } from '../../../../wallet-adaptor-base';
4
8
  import { default as default_2 } from 'react';
9
+ import type { DefaultThemeType } from '@heroui/theme';
5
10
  import { JSX as JSX_2 } from 'react/jsx-runtime';
11
+ import type { LayoutTheme } from '@heroui/theme';
6
12
  import { SignInParams } from '../../../wallet-adaptor-base';
7
13
  import { WalletConfig } from '../../../wallet-adaptor-base';
8
14
  import { WalletConfig as WalletConfig_2 } from '../../../../wallet-adaptor-base';
9
15
  import { WalletProvider } from '@tomo-inc/inject-providers';
16
+ import { WalletProvider as WalletProvider_3 } from '../../../../wallet-adaptor-base';
10
17
 
11
18
  export declare type BasicLoginType = "email" | "externalWallets";
12
19
 
@@ -42,11 +49,7 @@ export declare type ChainInfo = {
42
49
 
43
50
  export declare type ChainType = Exclude<AdaptorChainType, "all">;
44
51
 
45
- export declare enum ChainTypeEnum {
46
- All = "all",
47
- EVM = "evm",
48
- Dogecoin = "dogecoin"
49
- }
52
+ export { ChainTypeEnum }
50
53
 
51
54
  export declare interface ConnectData {
52
55
  address: string;
@@ -57,7 +60,7 @@ export declare interface ConnectData {
57
60
  export declare type ConnectErrorType = Error;
58
61
 
59
62
  export declare interface ConnectVariables {
60
- wallet: Connector;
63
+ wallet: WalletConnector;
61
64
  chainType: ChainType;
62
65
  chainId?: string;
63
66
  }
@@ -101,6 +104,20 @@ export declare enum ModalView {
101
104
  MyDogeSocialLogin = "MYDOGE_SOCIAL_LOGIN"
102
105
  }
103
106
 
107
+ /**
108
+ * Provider information stored in wallet state
109
+ */
110
+ export declare interface ProviderInfo {
111
+ /** Standard layer provider wrapper (from wallet-adaptor-base) */
112
+ provider: ConnectorProvider | null;
113
+ /** Connected wallet address */
114
+ address?: string;
115
+ /** Timestamp when the provider was connected */
116
+ connectedAt?: number;
117
+ /** UUID of the wallet that connected this provider */
118
+ walletId?: string;
119
+ }
120
+
104
121
  export { SignInParams }
105
122
 
106
123
  export declare interface SocialLoginProvider {
@@ -116,29 +133,27 @@ export declare type SwitchChainOptions = {
116
133
  chainInfo: Chain;
117
134
  };
118
135
 
119
- export declare type ThemeConfig = {
120
- themes?: {
121
- light?: {
122
- colors?: Record<string, string | Record<string, string>>;
123
- [key: string]: unknown;
124
- };
125
- dark?: {
126
- colors?: Record<string, string | Record<string, string>>;
127
- [key: string]: unknown;
128
- };
129
- [key: string]: unknown;
130
- };
131
- [key: string]: unknown;
132
- defaultTheme?: "dark" | "light";
136
+ export declare type ThemeConfig = ThemeConfig_2;
137
+
138
+ declare type ThemeConfig_2 = {
139
+ layout?: LayoutTheme;
140
+ themes?: ConfigThemes;
141
+ defaultTheme?: DefaultThemeType;
133
142
  };
134
143
 
144
+ /**
145
+ * Account information and actions exposed to users
146
+ *
147
+ * Note: currentProvider is the actual provider (WalletProviderType) for user convenience,
148
+ * while internally we use ConnectorProvider which wraps the actual provider.
149
+ */
135
150
  export declare type UseAccount = {
136
151
  address: string;
137
152
  balance?: string;
138
153
  chainType?: ChainType;
139
154
  chainId?: string;
140
155
  currentWallet?: Connector | null;
141
- currentProvider?: WalletProvider;
156
+ currentProvider?: WalletProvider_2 | null;
142
157
  switchChain: (options: SwitchChainOptions) => Promise<boolean>;
143
158
  signMessage?: (params: {
144
159
  message: string;
@@ -149,6 +164,11 @@ export declare type UseAccount = {
149
164
 
150
165
  export declare const useAccount: () => UseAccount;
151
166
 
167
+ export declare const useConnectors: () => {
168
+ connectors: ConnectorProviders | null;
169
+ currentProvider: WalletProvider_3 | null;
170
+ };
171
+
152
172
  export declare interface UserLoginConfig {
153
173
  basicLogins?: BasicLoginType[];
154
174
  socialLogins?: SocialLoginProvider[];
@@ -256,9 +276,25 @@ export declare interface WalletConnectKitConfig {
256
276
  };
257
277
  theme?: ThemeConfig;
258
278
  login?: UserLoginConfig;
259
- clientId?: string;
279
+ embeddedWalletConfig?: {
280
+ stage?: "dev" | "pre" | "prod";
281
+ };
260
282
  }
261
283
 
284
+ /**
285
+ * Extended Connector with business-specific fields
286
+ * Based on standard Connector from wallet-adaptor-base
287
+ */
288
+ export declare type WalletConnector = Connector & {
289
+ isEmbeddedWallet?: boolean;
290
+ logout?: () => Promise<boolean>;
291
+ };
292
+
293
+ /**
294
+ * Thin wrapper: only derives config and renders QueryClientProvider > Content.
295
+ * All wallet/context state and useEmbeddedWalletInternal (useQuery) run inside Content,
296
+ * so they are under QueryClientProvider and WalletConnectContext.Provider.
297
+ */
262
298
  export declare const WalletConnectProvider: ({ children, config }: WalletConnectProviderProps) => JSX_2.Element | null;
263
299
 
264
300
  declare interface WalletConnectProviderProps {
@@ -268,4 +304,34 @@ declare interface WalletConnectProviderProps {
268
304
 
269
305
  export { WalletProvider }
270
306
 
307
+ /**
308
+ * Wallet metadata information (business layer)
309
+ * Contains wallet display information like name, icon, links, etc.
310
+ * This is different from WalletProviderType (actual provider implementation)
311
+ */
312
+ declare interface WalletProvider_2 {
313
+ uuid: string;
314
+ name: string;
315
+ namespace?: string;
316
+ icon: string;
317
+ iconBackground?: string;
318
+ rdns?: string;
319
+ links: {
320
+ homepage?: string;
321
+ ios_install?: string;
322
+ android_install?: string;
323
+ chrome_install?: string;
324
+ mobile?: string;
325
+ qrCode?: string;
326
+ edge?: string;
327
+ firefox?: string;
328
+ opera?: string;
329
+ safari?: string;
330
+ macos?: string;
331
+ windows?: string;
332
+ linux?: string;
333
+ desktop?: string;
334
+ };
335
+ }
336
+
271
337
  export { }