@cordystackx/cordy_minikit 0.2.7 → 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.
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/dist/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* css/UI_Comp/styles.module.css */
1
+ /* cordy_css/index.css */
2
2
  .container,
3
3
  .connector,
4
4
  .connector div,
@@ -93,8 +93,6 @@
93
93
  bottom: 0;
94
94
  }
95
95
  }
96
-
97
- /* css/Buttons/styles.module.css */
98
96
  :root {
99
97
  --foreground_wagmi: #171717;
100
98
  --background_wagmi: #FAFAFA;
package/dist/index.js CHANGED
@@ -2069,12 +2069,6 @@ var Image_default = {
2069
2069
  logo: "https://cordy-stack-x.vercel.app/logo.svg"
2070
2070
  };
2071
2071
 
2072
- // css/UI_Comp/styles.module.css
2073
- var styles_default = {};
2074
-
2075
- // css/Buttons/styles.module.css
2076
- var styles_default2 = {};
2077
-
2078
2072
  // controllers/WagmiButton.tsx
2079
2073
  var import_react = __toESM(require("react"));
2080
2074
  var import_wagmi2 = require("wagmi");
@@ -2235,9 +2229,9 @@ function UI_Comp() {
2235
2229
  if (balance === "") {
2236
2230
  Get_Balance();
2237
2231
  }
2238
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: styles_default.container, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: styles_default.connector, children: [
2239
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: styles_default.closed, onClick: closeModal, children: "\u2715" }),
2240
- isConnected && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: styles_default.info, children: balance ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { children: [
2232
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "container", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "connector", children: [
2233
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "closed", onClick: closeModal, children: "\u2715" }),
2234
+ isConnected && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "info", children: balance ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { children: [
2241
2235
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_fa.FaUser, { size: 70 }),
2242
2236
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: { color: "#0f0" }, children: "Connected" }),
2243
2237
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { style: { color: "#0ff" }, children: [
@@ -2252,8 +2246,8 @@ function UI_Comp() {
2252
2246
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("a", { href: "https://cordy-stack-x.vercel.app/", children: "Powered By CordyStackX" })
2253
2247
  ] }) });
2254
2248
  }
2255
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: styles_default.container, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: styles_default.connector, children: [
2256
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: styles_default.closed, onClick: closeModal, children: "\u2715" }),
2249
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "container", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "connector", children: [
2250
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "closed", onClick: closeModal, children: "\u2715" }),
2257
2251
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("img", { src: Image_default.logo, width: 50, height: 50 }),
2258
2252
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { children: "Cordy MiniKit" }),
2259
2253
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
@@ -2282,7 +2276,7 @@ function ConnectWalletBT() {
2282
2276
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2283
2277
  "button",
2284
2278
  {
2285
- className: styles_default2.button__button,
2279
+ className: "button__button",
2286
2280
  onClick: openModal,
2287
2281
  children: isConnected ? `Connected ${address}` : "Connect Wallet"
2288
2282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cordystackx/cordy_minikit",
3
- "version": "0.2.7",
3
+ "version": "0.3.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "css"
10
10
  ],
11
11
  "scripts": {
12
- "build": "tsup index.ts --dts && cp -r css dist/"
12
+ "build": "tsup index.ts --dts"
13
13
  },
14
14
  "peerDependencies": {
15
15
  "ethers": ">=6",
@@ -1,40 +0,0 @@
1
- :root {
2
- --foreground_wagmi: #171717;
3
- --background_wagmi: #FAFAFA;
4
- --invert-cordy-image: invert(1);
5
- --invert-cordy-image_1: invert(0);
6
- }
7
-
8
- @media (prefers-color-scheme: dark) {
9
- :root {
10
- --foreground_wagmi: #ededed;
11
- --background_wagmi: #121212;
12
- --invert-cordy-image: invert(0);
13
- --invert-cordy-image_1: invert(1);
14
- }
15
- }
16
-
17
- .button__button {
18
- width: 150px;
19
- padding: 0.8rem;
20
- background-color: var(--foreground_wagmi);
21
- color: var(--background_wagmi);
22
- font-weight: bold;
23
- cursor: pointer;
24
- border: transparent;
25
- transition: all 0.5s ease-in-out;
26
- overflow: hidden;
27
- white-space: nowrap;
28
- text-overflow: ellipsis;
29
- text-align: center;
30
- }
31
- .button__button img {
32
- filter: var(--invert-cordy-image_1);
33
- }
34
-
35
- .button__button:hover {
36
- opacity: 0.5;
37
- }
38
- .button__button:active {
39
- transform: scale(0.6);
40
- }
@@ -1,99 +0,0 @@
1
- .container,
2
- .connector,
3
- .connector div,
4
- .info,
5
- .info span {
6
- display: flex;
7
- justify-content: center;
8
- align-items: center;
9
- }
10
-
11
- .container {
12
- width: 100dvw;
13
- height: 100dvh;
14
- backdrop-filter: blur(10px);
15
- z-index: 999;
16
- position: fixed;
17
- top: 50%;
18
- left: 50%;
19
- transform: translate(-50%, -50%);
20
- }
21
-
22
- .connector {
23
- width: min(400px, 100dvw);
24
- height: 500px;
25
- background-color: var(--background_wagmi);
26
- position: fixed;
27
- border: 2px solid var(--foreground_wagmi);
28
- flex-flow: column;
29
- overflow: hidden;
30
- animation: fadeIn 0.5s ease forwards;
31
- }
32
- .connector div {
33
- flex-flow: column;
34
- padding: 1rem 0;
35
- width: 90%;
36
- }
37
-
38
- .connector div p {
39
- color: #f00;
40
- text-align: center;
41
- }
42
-
43
- @keyframes fadeIn {
44
- from {
45
- opacity: 0;
46
- transform: scale(0.9);
47
- }
48
- to {
49
- opacity: 1;
50
- transform: scale(1);
51
- }
52
- }
53
- .connector img {
54
- margin: 1rem 0;
55
- filter: var(--invert-cordy-image);
56
- }
57
- .connector button {
58
- width: 300px;
59
- padding: 1rem;
60
- background-color: var(--foreground_wagmi);
61
- color: var(--background_wagmi);
62
- font-weight: bold;
63
- cursor: pointer;
64
- border: transparent;
65
- transition: all 0.5s ease;
66
- margin: 1rem 0;
67
- transition: all 0.5s ease-in-out;
68
- }
69
- .connector button:hover {
70
- opacity: 0.5;
71
- }
72
- .connector button:active {
73
- transform: scale(0.5);
74
- }
75
- .info span {
76
- flex-flow: column;
77
- }
78
- .info span p {
79
- width: 80%;
80
- overflow: hidden;
81
- white-space: nowrap;
82
- text-overflow: ellipsis;
83
- margin: 1rem 0;
84
- font-weight: bolder;
85
- }
86
- .closed {
87
- padding: 1rem;
88
- position: absolute;
89
- top: 0;
90
- right: 0;
91
- font-weight: bolder;
92
- cursor: pointer;
93
- }
94
- @media (max-width: 800px) {
95
- .connector {
96
- bottom: 0;
97
- }
98
- }
99
-
package/css/index.ts DELETED
@@ -1,9 +0,0 @@
1
-
2
- import UI_Comp__css from "./UI_Comp/styles.module.css";
3
-
4
- import Buttons__css from "./Buttons/styles.module.css";
5
-
6
- export {
7
- Buttons__css,
8
- UI_Comp__css
9
- };
@@ -1,40 +0,0 @@
1
- :root {
2
- --foreground_wagmi: #171717;
3
- --background_wagmi: #FAFAFA;
4
- --invert-cordy-image: invert(1);
5
- --invert-cordy-image_1: invert(0);
6
- }
7
-
8
- @media (prefers-color-scheme: dark) {
9
- :root {
10
- --foreground_wagmi: #ededed;
11
- --background_wagmi: #121212;
12
- --invert-cordy-image: invert(0);
13
- --invert-cordy-image_1: invert(1);
14
- }
15
- }
16
-
17
- .button__button {
18
- width: 150px;
19
- padding: 0.8rem;
20
- background-color: var(--foreground_wagmi);
21
- color: var(--background_wagmi);
22
- font-weight: bold;
23
- cursor: pointer;
24
- border: transparent;
25
- transition: all 0.5s ease-in-out;
26
- overflow: hidden;
27
- white-space: nowrap;
28
- text-overflow: ellipsis;
29
- text-align: center;
30
- }
31
- .button__button img {
32
- filter: var(--invert-cordy-image_1);
33
- }
34
-
35
- .button__button:hover {
36
- opacity: 0.5;
37
- }
38
- .button__button:active {
39
- transform: scale(0.6);
40
- }
@@ -1,99 +0,0 @@
1
- .container,
2
- .connector,
3
- .connector div,
4
- .info,
5
- .info span {
6
- display: flex;
7
- justify-content: center;
8
- align-items: center;
9
- }
10
-
11
- .container {
12
- width: 100dvw;
13
- height: 100dvh;
14
- backdrop-filter: blur(10px);
15
- z-index: 999;
16
- position: fixed;
17
- top: 50%;
18
- left: 50%;
19
- transform: translate(-50%, -50%);
20
- }
21
-
22
- .connector {
23
- width: min(400px, 100dvw);
24
- height: 500px;
25
- background-color: var(--background_wagmi);
26
- position: fixed;
27
- border: 2px solid var(--foreground_wagmi);
28
- flex-flow: column;
29
- overflow: hidden;
30
- animation: fadeIn 0.5s ease forwards;
31
- }
32
- .connector div {
33
- flex-flow: column;
34
- padding: 1rem 0;
35
- width: 90%;
36
- }
37
-
38
- .connector div p {
39
- color: #f00;
40
- text-align: center;
41
- }
42
-
43
- @keyframes fadeIn {
44
- from {
45
- opacity: 0;
46
- transform: scale(0.9);
47
- }
48
- to {
49
- opacity: 1;
50
- transform: scale(1);
51
- }
52
- }
53
- .connector img {
54
- margin: 1rem 0;
55
- filter: var(--invert-cordy-image);
56
- }
57
- .connector button {
58
- width: 300px;
59
- padding: 1rem;
60
- background-color: var(--foreground_wagmi);
61
- color: var(--background_wagmi);
62
- font-weight: bold;
63
- cursor: pointer;
64
- border: transparent;
65
- transition: all 0.5s ease;
66
- margin: 1rem 0;
67
- transition: all 0.5s ease-in-out;
68
- }
69
- .connector button:hover {
70
- opacity: 0.5;
71
- }
72
- .connector button:active {
73
- transform: scale(0.5);
74
- }
75
- .info span {
76
- flex-flow: column;
77
- }
78
- .info span p {
79
- width: 80%;
80
- overflow: hidden;
81
- white-space: nowrap;
82
- text-overflow: ellipsis;
83
- margin: 1rem 0;
84
- font-weight: bolder;
85
- }
86
- .closed {
87
- padding: 1rem;
88
- position: absolute;
89
- top: 0;
90
- right: 0;
91
- font-weight: bolder;
92
- cursor: pointer;
93
- }
94
- @media (max-width: 800px) {
95
- .connector {
96
- bottom: 0;
97
- }
98
- }
99
-
package/dist/css/index.ts DELETED
@@ -1,9 +0,0 @@
1
-
2
- import UI_Comp__css from "./UI_Comp/styles.module.css";
3
-
4
- import Buttons__css from "./Buttons/styles.module.css";
5
-
6
- export {
7
- Buttons__css,
8
- UI_Comp__css
9
- };