ryt-sdk 1.0.0 โ†’ 1.0.1

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 +301 -3
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 RYT Core Team
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,8 +1,306 @@
1
- # ryt-sdk
1
+ # ๐Ÿš€ RYT SDK
2
2
 
3
3
  RYT blockchain SDK for provider, wallet, and smart contract interactions.
4
4
 
5
- ## Install
5
+ ## โš™๏ธ Install
6
6
 
7
7
  ```bash
8
- npm install ryt-sdk
8
+ npm install ryt-sdk
9
+ ```
10
+ or
11
+
12
+ ```bash
13
+ yarn add ryt-sdk
14
+ ```
15
+
16
+ ## ๐Ÿ” Environment Setup
17
+
18
+ Create a .env file:
19
+
20
+ ```bash
21
+ PRIVATE_KEY=your_private_key
22
+ RPC_URL=https://your-rpc-url
23
+ CHAIN_ID=1234
24
+
25
+ TOKEN_URI=https://metadata.example.com
26
+ CREATE2_FACTORY=0xFactoryAddress
27
+ SALT=random_salt
28
+ MATH_LIB_ADDRESS=0xLibraryAddress
29
+ ```
30
+
31
+ ## โšก 30-Second Quickstart
32
+
33
+ ```bash
34
+ import RYTProvider from "ryt-sdk/provider";
35
+ import RYTWallet from "ryt-sdk/wallet";
36
+ import RYTContract from "ryt-sdk/contract";
37
+
38
+ const provider = new RYTProvider({
39
+ chainId: process.env.CHAIN_ID,
40
+ rpcUrls: [process.env.RPC_URL]
41
+ });
42
+
43
+ const wallet = new RYTWallet(process.env.PRIVATE_KEY, provider);
44
+
45
+ const contract = new RYTContract(address, abi, wallet);
46
+
47
+ const tx = await contract.write("transfer", to, 100n);
48
+ await tx.wait();
49
+ ```
50
+
51
+
52
+ ## ๐Ÿ“Œ Overview
53
+
54
+ RYT SDK is a modular blockchain development toolkit designed to simplify:
55
+
56
+ - Smart contract interaction
57
+ - Wallet management
58
+ - Contract deployment (CREATE / CREATE2)
59
+ - ERC20 / ERC721 / ERC1155 support
60
+ - Proxy patterns (UUPS)
61
+ - Cloning (EIP-1167)
62
+ - Library-linked contracts
63
+
64
+ ## ๐Ÿง  Architecture
65
+
66
+ ```bash
67
+ Your App
68
+ โ”‚
69
+ โ–ผ
70
+ RYT SDK Core
71
+ โ”œโ”€โ”€ Provider
72
+ โ”œโ”€โ”€ Wallet
73
+ โ”œโ”€โ”€ Contract
74
+ โ”œโ”€โ”€ Deployment Engine
75
+ โ”‚
76
+ โ–ผ
77
+ RYT/ Ethereum / EVM Chain
78
+ ```
79
+
80
+ ## ๐Ÿงฉ Core Modules
81
+
82
+ #### Provider
83
+
84
+ ```bash
85
+ import RYTProvider from "ryt-sdk/provider";
86
+
87
+ const provider = new RYTProvider({
88
+ chainId: 1234,
89
+ rpcUrls: ["https://rpc-url"]
90
+ });
91
+ ```
92
+
93
+ #### Wallet
94
+
95
+ ```bash
96
+ import RYTWallet from "ryt-sdk/wallet";
97
+
98
+ const wallet = new RYTWallet(PRIVATE_KEY, provider);
99
+
100
+ console.log(wallet.getAddress());
101
+ ```
102
+
103
+ #### Contract
104
+
105
+ ```bash
106
+ import RYTContract from "ryt-sdk/contract";
107
+
108
+ const contract = new RYTContract(address, abi, wallet);
109
+ ```
110
+
111
+ ### ๐Ÿ“– Read Contract Data
112
+
113
+ ```bash
114
+ const name = await contract.read("name");
115
+ const symbol = await contract.read("symbol");
116
+ const decimals = await contract.read("decimals");
117
+ ```
118
+
119
+ ### โœ๏ธ Write Transactions
120
+
121
+ ```bash
122
+ const tx = await contract.write("transfer", to, 100n);
123
+ await tx.wait();
124
+ ```
125
+
126
+
127
+ ### ๐Ÿช™ ERC20 Example
128
+
129
+ ```bash
130
+ const token = new RYTContract(address, ERC20.abi, wallet);
131
+
132
+ await token.write("transfer", recipient, 100n);
133
+ await token.write("approve", spender, 100n);
134
+ ```
135
+
136
+
137
+ ### ๐ŸŽจ ERC721 Mint
138
+
139
+ ```bash
140
+ const nft = new RYTContract(address, ERC721.abi, wallet);
141
+
142
+ await nft.write("safeMint", wallet.getAddress(), TOKEN_URI);
143
+ ```
144
+
145
+
146
+ ### ๐Ÿงฉ ERC1155 Mint
147
+
148
+ ```bash
149
+ const multi = new RYTContract(address, ERC1155.abi, wallet);
150
+
151
+ await multi.write("mint", wallet.getAddress(), 1, 20);
152
+ ```
153
+
154
+
155
+ ### ๐Ÿ—๏ธ Deploy Contracts
156
+
157
+ ```bash
158
+ const contract = await deployer.deploy({
159
+ abi: ERC20.abi,
160
+ bytecode: ERC20.bytecode,
161
+ args: ["My Token", "MTK", 18, 1000000]
162
+ });
163
+ ```
164
+
165
+ ### ๐Ÿญ Factory Deployments
166
+
167
+ #### Master Factory
168
+
169
+ ```bash
170
+ const factory = await deployer.deploy({
171
+ abi: MasterFactory.abi,
172
+ bytecode: MasterFactory.bytecode,
173
+ args: [100]
174
+ });
175
+ ```
176
+
177
+ #### Create
178
+
179
+ ```bash
180
+ const tx = await factory.write("deploySimple", 777);
181
+ await tx.wait();
182
+ ```
183
+
184
+ #### Create2
185
+
186
+ ```bash
187
+ const tx = await factory.write("deployCreate2", 999, salt);
188
+ await tx.wait();
189
+ ```
190
+
191
+ #### Cloning (EIP-1167)
192
+
193
+ ```bash
194
+ const tx = await factory.write("deployClone", childAddr);
195
+ await tx.wait();
196
+ ```
197
+
198
+ ### ๐Ÿงฌ Cloning (EIP-1167) without factory
199
+
200
+ ```bash
201
+ const clone = await deployer.deployClone(address);
202
+ ```
203
+
204
+ ### ๐Ÿ” UUPS Proxy
205
+
206
+ ```bash
207
+ const proxy = await deployer.deployUUPS({
208
+ implementationAbi,
209
+ implementationBytecode,
210
+ initData
211
+ });
212
+
213
+ await proxy.write("setValue", 100);
214
+ ```
215
+
216
+ ### CREATE2
217
+
218
+ ```bash
219
+ const result = await deployer.deployCreate2({
220
+ factoryAddress: CREATE2_FACTORY,
221
+ abi: ERC20.abi,
222
+ bytecode: ERC20.bytecode,
223
+ salt,
224
+ args: ["My Token", "MTK", 18, 1000000]
225
+ });
226
+ ```
227
+
228
+ ### ๐Ÿ“ฆ Library Linking
229
+
230
+ ```bash
231
+ const lib = await deployer.deployWithLibraries({
232
+ abi: Calculator.abi,
233
+ bytecode: Calculator.bytecode,
234
+ linkReferences: {
235
+ "contracts/ryt/MathLib.sol": {
236
+ MathLib: [{ length: 20, start: 283 }]
237
+ }
238
+ },
239
+ libraries: {
240
+ MathLib: MATH_LIB_ADDRESS
241
+ }
242
+ });
243
+ ```
244
+
245
+ ## ๐Ÿšจ Error Handling
246
+
247
+ ```bash
248
+ try {
249
+ await contract.write("transfer", to, amount);
250
+ } catch (err) {
251
+ console.error(err);
252
+ }
253
+ ```
254
+
255
+ ## ๐Ÿ“Š Feature Support
256
+
257
+ | Category | Feature | Status | Description |
258
+ |----------------------|------------------------|--------|-------------|
259
+ | Core | Provider | โœ… | RPC connection & chain interaction layer |
260
+ | Core | Wallet | โœ… | Private key management & signing |
261
+ | Core | Contract Read/Write | โœ… | Unified smart contract interaction API |
262
+ | Tokens | ERC20 | โœ… | Fungible token standard support |
263
+ | Tokens | ERC721 | โœ… | NFT (non-fungible token) support |
264
+ | Tokens | ERC1155 | โœ… | Multi-token standard support |
265
+ | Deployment | CREATE | โœ… | Standard contract deployment |
266
+ | Deployment | CREATE2 | โœ… | Deterministic contract deployment |
267
+ | Proxy Systems | UUPS Proxy | โœ… | Upgradeable contract architecture |
268
+ | Proxy Systems | Cloning (EIP-1167) | โœ… | Minimal proxy factory cloning |
269
+ | Advanced | Library Linking | โœ… | Solidity library linking support |
270
+ | Advanced | Internal Transactions | โœ… | Internal execution tracing support |
271
+ | Advanced | Payable Functions | โœ… | ETH value transfer support |
272
+
273
+
274
+ ## ๐Ÿงช Full Test Suite
275
+
276
+ To run tests, run the following command
277
+
278
+ ```bash
279
+ npm test
280
+ npm run contractsTest
281
+ ```
282
+
283
+ Includes:
284
+
285
+ - ERC20 / ERC721 / ERC1155
286
+ - CREATE / CREATE2 deployments
287
+ - Proxy patterns (UUPS)
288
+ - Cloning (EIP-1167)
289
+ - Payable functions
290
+ - Library linking
291
+ - Internal transaction validation
292
+
293
+
294
+ ## ๐ŸŒŸ Why RYT SDK?
295
+
296
+ - ๐Ÿงฉ Modular blockchain architecture
297
+ - ๐Ÿ—๏ธ Supports advanced EVM patterns
298
+ - ๐Ÿง  Designed for real-world production systems
299
+ - ๐Ÿ”Œ Works with any EVM chain
300
+
301
+ ## ๐Ÿ“œ License
302
+
303
+ [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)ยฉ 2026 RYT Core Team
304
+
305
+
306
+ ![Logo](https://kresus.mypinata.cloud/ipfs/bafkreiexrumjdyahbtlxomgy5fnuue4vhlfnytzxvkonvianmsrzmug6wy)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ryt-sdk",
3
3
  "type": "module",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "description": "RYT blockchain SDK for provider, wallet, and smart contract interactions",
6
6
  "author": "Muhammad Hammad Mubeen",
7
7
  "license": "MIT",