@cordystackx/cordy_minikit 0.2.8 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +88 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,27 +8,100 @@ MiniKit CordyStack is my tiny, power-packed dev setup. Perfect for coding, hacki
8
8
  - Web3 & Next.js ready 🚀
9
9
  - Easy to customize
10
10
 
11
- ## Usage
12
- 1. Import the Providers inside the layout.ts
11
+ ## Set Up
12
+ 1. Create .env
13
+
13
14
  ```bash
14
- import { ProvidersClientWrapper } from "@cordystackx/cordy_minikit";
15
-
16
- <ProvidersClientWrapper>
17
- {children}
18
- </ProvidersClientWrapper>
15
+ NEXT_PUBLIC_LINK_PROJECT_ID_SEPOLIA=
16
+ NEXT_PUBLIC_PLATFORM_ADDRESS=
17
+ NEXT_PUBLIC_TOKENADDRESS=
18
+ NEXT_PUBLIC_SYMBOL=
19
+ NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
19
20
 
20
21
  ```
21
- 2. Use of Connect Buttons
22
+ Get your Sepolia Project ID here: https://portal.cdp.coinbase.com/
23
+
24
+ Get your WalletConnect Project ID here: https://dashboard.reown.com/
25
+
26
+ Create your own wallet using:
27
+ * Based Extentions https://chromewebstore.google.com/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad?pli=1
28
+
29
+ * MetaMask Extentions https://chromewebstore.google.com/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn
30
+
31
+ Create your own token address using Hardhat or another Ethereum dev tool.
32
+
33
+ 2. Create a file name providers.tsx
34
+
22
35
  ```bash
23
- import { ConnectWalletBT } from "@cordystackx/cordy_minikit";
24
-
25
- <ConnectWalletBT/>
36
+ import { ReactNode } from "react";
37
+
38
+ import { ProvidersClientWrapper } from "@cordystackx/cordy_minikit";
39
+ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
40
+
41
+ const queryClient = new QueryClient();
42
+
43
+ export default function WalletProviders({ children }: { children: ReactNode }) {
26
44
 
45
+ return(
46
+ <QueryClientProvider client={queryClient}>
47
+ <ProvidersClientWrapper>
48
+ {children}
49
+ </ProvidersClientWrapper>
50
+ </QueryClientProvider>
51
+ );
52
+
53
+ }
27
54
  ```
28
- 2. Use of Transactions
55
+ 3. Then Create cliet_wrapper.tsx
56
+ ```bash
57
+ 'use client';
58
+ import { ReactNode } from 'react';
59
+ import dynamic from 'next/dynamic';
60
+
61
+ // Dynamically import WalletProviders with SSR disabled
62
+ const WalletProviders = dynamic(() => import('./providers'), {
63
+ ssr: false,
64
+ });
65
+
66
+ export default function ClientWrapper({ children }: { children: ReactNode }) {
67
+ return <WalletProviders>{children}</WalletProviders>;
68
+ }
69
+
70
+ ```
71
+ 4. Then inside your layout.tsx import all of the functions
72
+ ```bash
73
+ import { ClientWrapper } from "./services";
74
+ import '@cordystackx/cordy_minikit/dist/index.css';
75
+
76
+ export default function RootLayout({
77
+ children,
78
+ }: Readonly<{
79
+ children: React.ReactNode;
80
+ }>) {
81
+ return (
82
+ <html lang="en">
83
+ <body className={`${geistSans.variable} ${geistMono.variable}`}>
84
+ <ClientWrapper>
85
+ {children}
86
+ </ClientWrapper>
87
+ </body>
88
+ </html>
89
+ );
90
+ }
91
+ ```
92
+
93
+ ## Usage
94
+
95
+ ### Button Connect
96
+ ```bash
97
+ import { ConnectWalletBT } from "@cordystackx/cordy_minikit";
98
+
99
+ <ConnectWalletBT />
100
+ ```
101
+
102
+ ### Funtions Transactions
29
103
  ```bash
30
- import { CordyStackTrans } from "@cordystackx/cordy_minikit";
31
-
32
- CordyStackTrans(address: string, cost: number | string);
104
+ import { CordyStackTrans } from "@cordystackx/cordy_minikit";
33
105
 
106
+ CordyStackTrans(address: string, cost: number | string)
34
107
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cordystackx/cordy_minikit",
3
- "version": "0.2.8",
3
+ "version": "0.3.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",