@dogeos/dogeos-sdk 3.0.9-beta.0 → 3.0.9

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
@@ -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={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 config: WalletConnectKitConfig = {
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={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)
@@ -1,4 +1,4 @@
1
- import { G as Ct, H as Z, I as Ie, d as q, J as Ee, e as Mt, K as Mn, p as Ae, N as Fn, O as Dn, Q as Rn, a as P, R as le, T as On, U as In, V as Ne, W as H, X as Ft, b as Y, Y as En, Z as Nn, f as ne, w as Dt, B as ue, n as I, c as se, _ as ce, $ as Kn, h as Bn, r as Rt, a0 as Ke, a1 as Ln, x as kn, a2 as _n, j as O, a3 as Ot, a4 as It, a5 as Et, a6 as He, a7 as Nt, E as Gn, a8 as Un, a9 as $n, aa as qe, ab as jn, ac as Wn, ad as zn, ae as Hn, af as qn, ag as Yn, ah as Xn, ai as Zn, aj as Jn, ak as Qn, al as es } from "./index-DyerC0th.js";
1
+ import { G as Ct, H as Z, I as Ie, d as q, J as Ee, e as Mt, K as Mn, p as Ae, N as Fn, O as Dn, Q as Rn, a as P, R as le, T as On, U as In, V as Ne, W as H, X as Ft, b as Y, Y as En, Z as Nn, f as ne, w as Dt, B as ue, n as I, c as se, _ as ce, $ as Kn, h as Bn, r as Rt, a0 as Ke, a1 as Ln, x as kn, a2 as _n, j as O, a3 as Ot, a4 as It, a5 as Et, a6 as He, a7 as Nt, E as Gn, a8 as Un, a9 as $n, aa as qe, ab as jn, ac as Wn, ad as zn, ae as Hn, af as qn, ag as Yn, ah as Xn, ai as Zn, aj as Jn, ak as Qn, al as es } from "./index-CgMq2-0F.js";
2
2
  import { Fragment as ts } from "react";
3
3
  function Kt(t, e) {
4
4
  if (!Array.isArray(e))
@@ -11,10 +11,10 @@
11
11
  }
12
12
  })();
13
13
 
14
- import { f as T, a as R, c as O, b as Ot, i as F, p as z, d as le, n as M, P as he, e as Ft, L as ce, S as ue, g as de, m as Nt, h as Gt, r as Wt, j as me, s as $, k as H, l as et } from "./index-DyerC0th.js";
15
- import { A as Zi, q as Ki, M as Ji, z as Qi, y as ts, w as es, v as is, u as ss, C as os, E as ns, t as as, o as rs, D as ls, x as hs, F as cs, B as us } from "./index-DyerC0th.js";
16
- import { i as fe, e as _t, p as pe, a as b, s as ge, m as ye, b as v, c as J, d as y, f as ve, g as xe, h as Pe, j as zt, k as it, l as $t, n as Te, F as Ht, o as st, q as De, r as ot, t as Xt, u as Se, S as Ee, v as Ae, w as V, x as N, y as G, z as nt, A as Re, B as Le, C as Ce, D as B, E as je, G as Ve } from "./features-animation-BsnToLWy.js";
17
- import { K as ms, N as fs, V as ps, a4 as gs, H as ys, a2 as vs, P as xs, Q as Ps, R as Ts, T as Ds, U as Ss, W as Es, J as As, _ as Rs, X as Ls, Y as Cs, Z as js, M as Vs, a1 as Bs, a3 as Ms, $ as ws, O as ks, a0 as bs, L as Us, I as Is } from "./features-animation-BsnToLWy.js";
14
+ import { f as T, a as R, c as O, b as Ot, i as F, p as z, d as le, n as M, P as he, e as Ft, L as ce, S as ue, g as de, m as Nt, h as Gt, r as Wt, j as me, s as $, k as H, l as et } from "./index-CgMq2-0F.js";
15
+ import { A as Zi, q as Ki, M as Ji, z as Qi, y as ts, w as es, v as is, u as ss, C as os, E as ns, t as as, o as rs, D as ls, x as hs, F as cs, B as us } from "./index-CgMq2-0F.js";
16
+ import { i as fe, e as _t, p as pe, a as b, s as ge, m as ye, b as v, c as J, d as y, f as ve, g as xe, h as Pe, j as zt, k as it, l as $t, n as Te, F as Ht, o as st, q as De, r as ot, t as Xt, u as Se, S as Ee, v as Ae, w as V, x as N, y as G, z as nt, A as Re, B as Le, C as Ce, D as B, E as je, G as Ve } from "./features-animation-FaUBRR8C.js";
17
+ import { K as ms, N as fs, V as ps, a4 as gs, H as ys, a2 as vs, P as xs, Q as Ps, R as Ts, T as Ds, U as Ss, W as Es, J as As, _ as Rs, X as Ls, Y as Cs, Z as js, M as Vs, a1 as Bs, a3 as Ms, $ as ws, O as ks, a0 as bs, L as Us, I as Is } from "./features-animation-FaUBRR8C.js";
18
18
  import { jsx as Be } from "react/jsx-runtime";
19
19
  import { useContext as Q, useId as Me, useEffect as we, useCallback as ke, Component as be } from "react";
20
20
  const at = (t, e) => Math.abs(t - e);