@dogeos/dogeos-sdk 3.2.0-beta.4 → 3.2.0-beta.5
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 +10 -25
- package/dist/index.d.ts +2 -14
- package/dist/index.js +517 -501
- package/package.json +6 -8
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
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,6 +47,7 @@ import React from "react";
|
|
|
47
47
|
import { WalletConnectProvider } from "@dogeos/dogeos-sdk";
|
|
48
48
|
|
|
49
49
|
const dogeConfig = {
|
|
50
|
+
...config,
|
|
50
51
|
clientId: "your-client-id",
|
|
51
52
|
};
|
|
52
53
|
|
|
@@ -274,8 +275,12 @@ const config = {
|
|
|
274
275
|
|
|
275
276
|
// Social login methods
|
|
276
277
|
socialLogins: [
|
|
277
|
-
{
|
|
278
|
-
|
|
278
|
+
{
|
|
279
|
+
type: "google",
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
type: "x",
|
|
283
|
+
},
|
|
279
284
|
],
|
|
280
285
|
},
|
|
281
286
|
clientId: "your-client-id",
|
|
@@ -290,8 +295,6 @@ export function App() {
|
|
|
290
295
|
}
|
|
291
296
|
```
|
|
292
297
|
|
|
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
|
-
|
|
295
298
|
### Configure Theme
|
|
296
299
|
|
|
297
300
|
You can customize the UI theme:
|
|
@@ -773,15 +776,8 @@ interface WalletConnectKitConfig {
|
|
|
773
776
|
url: string;
|
|
774
777
|
icons: string[];
|
|
775
778
|
};
|
|
776
|
-
clientId: string;
|
|
777
779
|
theme?: ThemeConfig;
|
|
778
780
|
login?: UserLoginConfig;
|
|
779
|
-
embeddedWalletConfig?: {
|
|
780
|
-
/**
|
|
781
|
-
* @default "prod-dogeos"
|
|
782
|
-
*/
|
|
783
|
-
stage?: "prod-dogeos" | "prod" | "pre" | "dev";
|
|
784
|
-
};
|
|
785
781
|
}
|
|
786
782
|
````
|
|
787
783
|
|
|
@@ -798,7 +794,7 @@ interface Chain {
|
|
|
798
794
|
};
|
|
799
795
|
rpcUrls: {
|
|
800
796
|
default: {
|
|
801
|
-
http:
|
|
797
|
+
http: string[];
|
|
802
798
|
};
|
|
803
799
|
};
|
|
804
800
|
blockExplorers?: {
|
|
@@ -836,18 +832,7 @@ type ChainType = "evm" | "solana" | "aptos" | "dogecoin";
|
|
|
836
832
|
|
|
837
833
|
### Supported Next.js version
|
|
838
834
|
|
|
839
|
-
- Next.js 14
|
|
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
|
-
```tsx
|
|
846
|
-
<meta
|
|
847
|
-
httpEquiv="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
|
-
```
|
|
835
|
+
- Next.js 14/15 version had supported
|
|
851
836
|
|
|
852
837
|
### How to get WalletConnect Project ID?
|
|
853
838
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,9 @@ 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';
|
|
10
9
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
11
10
|
import { SignInParams } from '@tomo-inc/wallet-adaptor-base';
|
|
12
11
|
import { ThemeConfig as ThemeConfig_2 } from '@tomo-inc/tomo-ui';
|
|
13
|
-
import { TomoStage } from '@tomo-inc/wallet-utils';
|
|
14
12
|
import { WalletConfig } from '@tomo-inc/wallet-adaptor-base';
|
|
15
13
|
import { WalletInfo } from '@tomo-inc/wallet-adaptor-base';
|
|
16
14
|
import { WalletProvider } from '@tomo-inc/inject-providers';
|
|
@@ -28,7 +26,7 @@ export declare type Chain = {
|
|
|
28
26
|
};
|
|
29
27
|
rpcUrls: {
|
|
30
28
|
default: {
|
|
31
|
-
http:
|
|
29
|
+
http: string[];
|
|
32
30
|
};
|
|
33
31
|
};
|
|
34
32
|
blockExplorers?: {
|
|
@@ -68,14 +66,6 @@ export declare interface ConnectVariables {
|
|
|
68
66
|
chainId?: string;
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
export declare type DogeOSEmbeddedWalletConfig = Omit<DogeOSEmbeddedWalletInitConfig, "stage"> & {
|
|
72
|
-
stage?: EmbeddedWalletStage;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export declare type DogeOSEmbeddedWalletInitConfig = Omit<EmbeddedWalletConfig, "stage"> & {
|
|
76
|
-
stage: EmbeddedWalletStage;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
69
|
/**
|
|
80
70
|
* Connected information from embedded wallet
|
|
81
71
|
*/
|
|
@@ -85,8 +75,6 @@ declare interface EmbeddedWalletConnectedInfo {
|
|
|
85
75
|
dogeProvider?: ProviderConnectionInfo;
|
|
86
76
|
}
|
|
87
77
|
|
|
88
|
-
export declare type EmbeddedWalletStage = TomoStage;
|
|
89
|
-
|
|
90
78
|
declare interface EmbeddedWalletState {
|
|
91
79
|
wallet: EmbeddedWallet | null;
|
|
92
80
|
isAvailable: boolean;
|
|
@@ -314,7 +302,7 @@ export declare interface WalletConnectKitConfig {
|
|
|
314
302
|
theme?: ThemeConfig;
|
|
315
303
|
login?: UserLoginConfig;
|
|
316
304
|
embeddedWalletConfig?: {
|
|
317
|
-
stage?:
|
|
305
|
+
stage?: "dev" | "pre" | "prod";
|
|
318
306
|
};
|
|
319
307
|
}
|
|
320
308
|
|