@cordystackx/cordy_minikit 0.3.5 β†’ 0.3.6

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -21
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Marc Giestin Louis Cordova
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,34 +1,139 @@
1
- # MiniKit CordyStack NPM Packages 😎
1
+ ---
2
+ Β© 2025 Cordy StackX (@cordystackx)
3
+ Licensed under the MIT License.
4
+ Unauthorized removal of this notice violates the license terms.
5
+ ---
6
+
7
+
8
+ # 🧩 cordy_minikit β€” Web3 Mini Kit by cordyStackX
9
+
10
+ A lightweight Web3 toolkit for building wallet UIs, controllers, and provider wrappers β€” designed for modern frameworks like **Next.js**, **Vite**, and **React-based browser extensions**.
11
+ Built with ⚑ **Wagmi**, πŸͺ„ **Viem**, and 🧠 **TypeScript** (compiled to JS for runtime).
12
+
13
+ ---
14
+
15
+ ## πŸš€ Features
16
+
17
+ - πŸ”— **Wallet Connect / Disconnect**
18
+ Simple connect button and hooks for EVM-based wallets.
19
+ - 🧰 **Prebuilt UI Components**
20
+ Reusable components like `ConnectWalletBT`, `UI_Comp`.
21
+ - βš™οΈ **Controllers**
22
+ Manage wallet actions, balances, and transactions.
23
+ - 🎨 **CSS Modules + CSS Variables**
24
+ Easy theming support for dark/light mode.
25
+ - πŸ“¦ **Tree-shakable, Typed, and Lightweight**
26
+ - 🧩 **Framework-Agnostic**
27
+ Works with Next.js, Vite, CRA, or React extensions.
28
+
29
+ ---
30
+
31
+ ## 🧭 SOA β€” System Overview & Architecture
32
+
33
+ > A concise overview of the library’s structure, purpose, and build/publish process.
34
+
35
+ ### 1. Purpose
36
+
37
+ `@cordystackx/cordy_minikit` provides modular Web3 utilities and UI components for dApp builders.
38
+ It’s designed to be embedded in frontend frameworks or browser extensions where you want instant Web3 wallet connectivity and a clean UI layer.
39
+
40
+ **Main Goals:**
41
+ - Simplify wallet integrations.
42
+ - Provide clean, framework-ready UI + controllers.
43
+ - Maintain portability for fullstack and extension apps.
44
+ - Keep theming customizable with CSS variables.
45
+
46
+ ---
47
+
48
+ ### 2. High-level Architecture
49
+
50
+ ```bash
51
+ root
52
+ β”œβ”€β”€ chains/ # chain definitions and helpers
53
+ β”œβ”€β”€ client__provider.tsx # provider client wrapper (wagmi/viem context)
54
+ β”œβ”€β”€ components/ # UI components (Connect_wallet_bt, UI_Comp)
55
+ β”œβ”€β”€ controllers/ # imperative components & logic (wallet ops)
56
+ β”œβ”€β”€ config/ # ABIs and static configuration
57
+ β”œβ”€β”€ css/ # CSS Modules and styles
58
+ β”œβ”€β”€ dist/ # compiled JS + .d.ts for publishing
59
+ β”œβ”€β”€ index.ts # main export aggregator
60
+ └── package.json
61
+ ```
2
62
 
3
- MiniKit CordyStack is my tiny, power-packed dev setup. Perfect for coding, hacking, and stacking cool stuff.
4
63
 
5
- ## Features
6
- - Lightweight & minimal
7
- - Optimized for Arch Linux 🐧
8
- - Web3 & Next.js ready πŸš€
9
- - Easy to customize
10
64
 
11
65
  ## Usage
12
- 1. Import the Providers inside the layout.ts
66
+ 1. Create env file
13
67
  ```bash
14
- import { ProvidersClientWrapper } from "@cordystackx/cordy_minikit";
15
-
16
- <ProvidersClientWrapper>
17
- {children}
18
- </ProvidersClientWrapper>
68
+ NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
69
+ NEXT_PUBLIC_LINK_PROJECT_ID_SEPOLIA=
70
+ NEXT_PUBLIC_TOKENADDRESS=
71
+ NEXT_PUBLIC_SYMBOL=
72
+ NEXT_PUBLIC_PLATFORM_ADDRESS=
73
+ ```
74
+
75
+ 2. Import the Providers inside the layout.ts
76
+ ```bash
77
+ import { ProvidersClientWrapper } from "@cordystackx/cordy_minikit";
78
+
79
+ <ProvidersClientWrapper>
80
+ {children}
81
+ </ProvidersClientWrapper>
19
82
 
20
83
  ```
21
- 2. Use of Connect Buttons
84
+ 3. Use of Connect Buttons
22
85
  ```bash
23
- import { ConnectWalletBT } from "@cordystackx/cordy_minikit";
24
-
25
- <ConnectWalletBT/>
86
+ import { ConnectWalletBT } from "@cordystackx/cordy_minikit";
87
+
88
+ <ConnectWalletBT/>
26
89
 
27
90
  ```
28
- 2. Use of Transactions
91
+ 4. Use of Transactions
29
92
  ```bash
30
- import { CordyStackTrans } from "@cordystackx/cordy_minikit";
31
-
32
- CordyStackTrans(address: string, cost: number | string);
93
+ import { CordyStackTrans } from "@cordystackx/cordy_minikit";
94
+
95
+ CordyStackTrans(address: string, cost: number | string);
96
+
97
+ ```
98
+
99
+
100
+ **Runtime contract:**
101
+ - Imports resolve to `dist/index.js`
102
+ - `.d.ts` shipped for TS projects
103
+ - Pure ESM/JS compatible with Next.js and Vite
104
+
105
+ ---
106
+
107
+ ### 3. File Responsibilities
108
+
109
+ | Folder/File | Description |
110
+ |--------------|-------------|
111
+ | `chains/*` | Chain configuration and utilities (Sepolia, Base, etc.) |
112
+ | `client__provider.tsx` | React provider wrapper for Wagmi/Viem clients |
113
+ | `components/*` | Connect wallet, UI components |
114
+ | `controllers/*` | Logic-based hooks and components for Web3 ops |
115
+ | `config/*` | ABIs, static configs |
116
+ | `css/*` | Scoped CSS Modules and base theme |
117
+ | `dist/*` | Compiled JS & type declarations (published bundle) |
118
+
119
+ ---
120
+
121
+ ### 4. Build & Publish (npm)
33
122
 
123
+ #### βœ… Setup `package.json`
124
+ ```json
125
+ {
126
+ "main": "dist/index.js",
127
+ "types": "dist/index.d.ts",
128
+ "files": ["dist"],
129
+ "scripts": {
130
+ "clean": "rm -rf dist",
131
+ "build": "tsc",
132
+ "prepublishOnly": "pnpm run build"
133
+ },
134
+ "publishConfig": {
135
+ "access": "public",
136
+ "registry": "https://registry.npmjs.org/"
137
+ }
138
+ }
34
139
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cordystackx/cordy_minikit",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"