@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.
- package/LICENSE +21 -0
- package/README.md +126 -21
- 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
|
-
|
|
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.
|
|
66
|
+
1. Create env file
|
|
13
67
|
```bash
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
84
|
+
3. Use of Connect Buttons
|
|
22
85
|
```bash
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
86
|
+
import { ConnectWalletBT } from "@cordystackx/cordy_minikit";
|
|
87
|
+
|
|
88
|
+
<ConnectWalletBT/>
|
|
26
89
|
|
|
27
90
|
```
|
|
28
|
-
|
|
91
|
+
4. Use of Transactions
|
|
29
92
|
```bash
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
```
|