@dogeos/dogeos-sdk 3.2.0-beta.1 → 3.2.0-beta.3

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Dogeos Connect Kit
1
+ # DogeOS Connect Kit
2
2
 
3
3
  A lightweight React SDK for integrating crypto wallet connection functionality into your applications. It provides a configurable wallet list modal and basic account operations.
4
4
 
@@ -47,7 +47,6 @@ import React from "react";
47
47
  import { WalletConnectProvider } from "@dogeos/dogeos-sdk";
48
48
 
49
49
  const dogeConfig = {
50
- ...config,
51
50
  clientId: "your-client-id",
52
51
  };
53
52
 
@@ -275,12 +274,8 @@ const config = {
275
274
 
276
275
  // Social login methods
277
276
  socialLogins: [
278
- {
279
- type: "google",
280
- },
281
- {
282
- type: "x",
283
- },
277
+ { type: "google" },
278
+ { type: "x" },
284
279
  ],
285
280
  },
286
281
  clientId: "your-client-id",
@@ -295,6 +290,8 @@ export function App() {
295
290
  }
296
291
  ```
297
292
 
293
+ When a social login provider does not include a `clientId`, the SDK uses the default DogeOS Google and X client IDs configured for the embedded wallet.
294
+
298
295
  ### Configure Theme
299
296
 
300
297
  You can customize the UI theme:
@@ -776,8 +773,15 @@ interface WalletConnectKitConfig {
776
773
  url: string;
777
774
  icons: string[];
778
775
  };
776
+ clientId: string;
779
777
  theme?: ThemeConfig;
780
778
  login?: UserLoginConfig;
779
+ embeddedWalletConfig?: {
780
+ /**
781
+ * @default "prod-dogeos"
782
+ */
783
+ stage?: "prod-dogeos" | "prod" | "pre" | "dev";
784
+ };
781
785
  }
782
786
  ````
783
787
 
@@ -794,7 +798,7 @@ interface Chain {
794
798
  };
795
799
  rpcUrls: {
796
800
  default: {
797
- http: string[];
801
+ http: readonly string[];
798
802
  };
799
803
  };
800
804
  blockExplorers?: {
@@ -832,7 +836,18 @@ type ChainType = "evm" | "solana" | "aptos" | "dogecoin";
832
836
 
833
837
  ### Supported Next.js version
834
838
 
835
- - Next.js 14/15 version had supported
839
+ - Next.js 14 and 15 are supported.
840
+
841
+ ### What Content Security Policy entries are required?
842
+
843
+ If your app uses a restrictive CSP, allow the DogeOS embedded wallet iframe and Tomo social login relay:
844
+
845
+ ```html
846
+ <meta
847
+ http-equiv="Content-Security-Policy"
848
+ content="frame-src 'self' https://dogeos.embedded-wallet.tomo.inc; connect-src 'self' https://mydoge-wallet.tomo.inc https://social-relay.tomo.inc;"
849
+ />
850
+ ```
836
851
 
837
852
  ### How to get WalletConnect Project ID?
838
853
 
package/dist/index.d.ts CHANGED
@@ -6,9 +6,11 @@ import { ConnectorProvider } from '@tomo-inc/wallet-adaptor-base';
6
6
  import { ConnectorProviders } from '@tomo-inc/wallet-adaptor-base';
7
7
  import { default as default_2 } from 'react';
8
8
  import { EmbeddedWallet } from '@tomo-inc/embedded-wallet-providers';
9
+ import { EmbeddedWalletConfig } from '@tomo-inc/embedded-wallet-providers';
9
10
  import { JSX as JSX_2 } from 'react/jsx-runtime';
10
11
  import { SignInParams } from '@tomo-inc/wallet-adaptor-base';
11
12
  import { ThemeConfig as ThemeConfig_2 } from '@tomo-inc/tomo-ui';
13
+ import { TomoStage } from '@tomo-inc/wallet-utils';
12
14
  import { WalletConfig } from '@tomo-inc/wallet-adaptor-base';
13
15
  import { WalletInfo } from '@tomo-inc/wallet-adaptor-base';
14
16
  import { WalletProvider } from '@tomo-inc/inject-providers';
@@ -26,7 +28,7 @@ export declare type Chain = {
26
28
  };
27
29
  rpcUrls: {
28
30
  default: {
29
- http: string[];
31
+ http: readonly string[];
30
32
  };
31
33
  };
32
34
  blockExplorers?: {
@@ -66,6 +68,10 @@ export declare interface ConnectVariables {
66
68
  chainId?: string;
67
69
  }
68
70
 
71
+ export declare type DogeOSEmbeddedWalletConfig = Omit<EmbeddedWalletConfig, "stage"> & {
72
+ stage?: EmbeddedWalletStage;
73
+ };
74
+
69
75
  /**
70
76
  * Connected information from embedded wallet
71
77
  */
@@ -75,6 +81,8 @@ declare interface EmbeddedWalletConnectedInfo {
75
81
  dogeProvider?: ProviderConnectionInfo;
76
82
  }
77
83
 
84
+ export declare type EmbeddedWalletStage = TomoStage;
85
+
78
86
  declare interface EmbeddedWalletState {
79
87
  wallet: EmbeddedWallet | null;
80
88
  isAvailable: boolean;
@@ -302,7 +310,7 @@ export declare interface WalletConnectKitConfig {
302
310
  theme?: ThemeConfig;
303
311
  login?: UserLoginConfig;
304
312
  embeddedWalletConfig?: {
305
- stage?: "dev" | "pre" | "prod";
313
+ stage?: EmbeddedWalletStage;
306
314
  };
307
315
  }
308
316