@dogeos/dogeos-sdk 3.0.10-beta.0 → 3.0.11

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