@dogeos/dogeos-sdk 3.0.9-beta.0 → 3.0.10-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/README.md +24 -9
- package/dist/dogeos-sdk.css +1 -1
- package/dist/{features-animation-BsnToLWy.js → features-animation-CV9YPT-7.js} +1 -1
- package/dist/{index-DyerC0th.js → index-C3Wa2b52.js} +7614 -7608
- package/dist/index-DF0LHs_L.js +18 -0
- package/dist/index-HXXrwVr7.js +1423 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.js +2 -2
- package/dist/src-UW24ZMRV-Ci5cXeii.js +5 -0
- package/package.json +1 -1
- package/dist/index-BPgvjTgE.js +0 -18
- package/dist/index-DAH581QK.js +0 -1423
- package/dist/src-UW24ZMRV-DP6WuHRI.js +0 -5
package/README.md
CHANGED
|
@@ -43,13 +43,17 @@ First, wrap your app root component with `WalletConnectProvider`:
|
|
|
43
43
|
|
|
44
44
|
```tsx
|
|
45
45
|
// App.tsx
|
|
46
|
-
// App.tsx
|
|
47
46
|
import React from "react";
|
|
48
47
|
import { WalletConnectProvider } from "@dogeos/dogeos-sdk";
|
|
49
48
|
|
|
49
|
+
const dogeConfig = {
|
|
50
|
+
...config,
|
|
51
|
+
clientId: 'your-client-id'
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
export default function App() {
|
|
51
55
|
return (
|
|
52
|
-
<WalletConnectProvider config={
|
|
56
|
+
<WalletConnectProvider config={dogeConfig}>
|
|
53
57
|
<YourApp />
|
|
54
58
|
</WalletConnectProvider>
|
|
55
59
|
);
|
|
@@ -64,7 +68,6 @@ Use the `useWalletConnect` hook to open the wallet connection modal and manage c
|
|
|
64
68
|
// ConnectButton.tsx
|
|
65
69
|
import React from "react";
|
|
66
70
|
import { useWalletConnect } from "@dogeos/dogeos-sdk";
|
|
67
|
-
import { useWalletConnect } from "@dogeos/dogeos-sdk";
|
|
68
71
|
|
|
69
72
|
export function ConnectButton() {
|
|
70
73
|
const { openModal, isConnected, disconnect, isConnecting } =
|
|
@@ -90,7 +93,6 @@ Use the `useAccount` hook to get the currently connected account information:
|
|
|
90
93
|
// AccountInfo.tsx
|
|
91
94
|
import React from "react";
|
|
92
95
|
import { useAccount } from "@dogeos/dogeos-sdk";
|
|
93
|
-
import { useAccount } from "@dogeos/dogeos-sdk";
|
|
94
96
|
|
|
95
97
|
export function AccountInfo() {
|
|
96
98
|
const { address, chainId, chainType, currentWallet } = useAccount();
|
|
@@ -186,10 +188,11 @@ export function SignInButton() {
|
|
|
186
188
|
import { WalletConnectProvider } from "@dogeos/dogeos-sdk";
|
|
187
189
|
import type { WalletConnectKitConfig } from "@dogeos/dogeos-sdk";
|
|
188
190
|
|
|
189
|
-
const
|
|
191
|
+
const dogeConfig: WalletConnectKitConfig = {
|
|
190
192
|
// WalletConnect project ID (obtain from https://cloud.walletconnect.com)
|
|
191
193
|
walletConnectProjectId: "your-project-id",
|
|
192
194
|
|
|
195
|
+
clientId: "your-client-id",
|
|
193
196
|
// Application metadata
|
|
194
197
|
metadata: {
|
|
195
198
|
name: "My DApp",
|
|
@@ -201,7 +204,7 @@ const config: WalletConnectKitConfig = {
|
|
|
201
204
|
|
|
202
205
|
export function App() {
|
|
203
206
|
return (
|
|
204
|
-
<WalletConnectProvider config={
|
|
207
|
+
<WalletConnectProvider config={dogeConfig}>
|
|
205
208
|
<YourApp />
|
|
206
209
|
</WalletConnectProvider>
|
|
207
210
|
);
|
|
@@ -226,7 +229,7 @@ export function App() {
|
|
|
226
229
|
}, []);
|
|
227
230
|
|
|
228
231
|
return (
|
|
229
|
-
<WalletConnectProvider config={{ chains }}>
|
|
232
|
+
<WalletConnectProvider config={{ chains, clientId: "your-client-id", }}>
|
|
230
233
|
<YourApp />
|
|
231
234
|
</WalletConnectProvider>
|
|
232
235
|
);
|
|
@@ -251,7 +254,7 @@ export function App() {
|
|
|
251
254
|
}, []);
|
|
252
255
|
|
|
253
256
|
return (
|
|
254
|
-
<WalletConnectProvider config={{ connectors }}>
|
|
257
|
+
<WalletConnectProvider config={{ connectors , clientId: "your-client-id" }}>
|
|
255
258
|
<YourApp />
|
|
256
259
|
</WalletConnectProvider>
|
|
257
260
|
);
|
|
@@ -280,6 +283,7 @@ const config = {
|
|
|
280
283
|
},
|
|
281
284
|
],
|
|
282
285
|
},
|
|
286
|
+
clientId: "your-client-id",
|
|
283
287
|
};
|
|
284
288
|
|
|
285
289
|
export function App() {
|
|
@@ -324,6 +328,7 @@ const config = {
|
|
|
324
328
|
},
|
|
325
329
|
},
|
|
326
330
|
} as ThemeConfig,
|
|
331
|
+
clientId: "your-client-id"
|
|
327
332
|
};
|
|
328
333
|
|
|
329
334
|
export function App() {
|
|
@@ -369,7 +374,7 @@ export function App() {
|
|
|
369
374
|
const config: WalletConnectKitConfig = {
|
|
370
375
|
// WalletConnect configuration
|
|
371
376
|
walletConnectProjectId: "your-project-id",
|
|
372
|
-
|
|
377
|
+
clientId: "your-client-id",
|
|
373
378
|
// DApp application metadata
|
|
374
379
|
metadata: {
|
|
375
380
|
name: "My DApp",
|
|
@@ -735,6 +740,16 @@ type ChainType = "evm" | "solana" | "aptos" | "dogecoin";
|
|
|
735
740
|
|
|
736
741
|
## FAQ
|
|
737
742
|
|
|
743
|
+
### How to use with Next.js?
|
|
744
|
+
|
|
745
|
+
```js
|
|
746
|
+
"use client"; // add "use client" at your index router page
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
### Supported Next.js version
|
|
750
|
+
|
|
751
|
+
- Next.js 14/15 version had supported
|
|
752
|
+
|
|
738
753
|
### How to get WalletConnect Project ID?
|
|
739
754
|
|
|
740
755
|
1. Visit [WalletConnect Cloud](https://cloud.walletconnect.com)
|