cytracid 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 (2) hide show
  1. package/README.md +98 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ <div align="center">
2
+ <h1>🚀 CytraCID API SDK</h1>
3
+ <p><strong>The Official Node.js Wrapper for CytraCID Ecosystem</strong></p>
4
+
5
+ [![npm version](https://img.shields.io/npm/v/cytracid.svg?style=flat-square)](https://npmjs.org/package/cytracid)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
7
+ [![Node.js](https://img.shields.io/badge/Node.js-Ready-green.svg?style=flat-square)](https://nodejs.org)
8
+ </div>
9
+
10
+ <br />
11
+
12
+ CytraCID provides a seamless, programmatic interface for interacting with our ecosystem. This official SDK makes it incredibly easy to query balances, check live stocks, purchase tokens (reserved or instant), and trigger bypass automation with just a few lines of code.
13
+
14
+ ## 📦 Installation
15
+
16
+ Install the package via NPM:
17
+
18
+ ```bash
19
+ npm install cytracid
20
+ ```
21
+
22
+ ## 🔑 Authentication
23
+
24
+ To use this wrapper, you need an **API Key**. You can generate this from your CytraCID Dashboard -> Settings.
25
+ Keep your API key secure and never share it publicly!
26
+
27
+ ## ⚡ Quick Start
28
+
29
+ Here is a full example showing how to initialize the client, purchase a token, and run the bypass automation automatically.
30
+
31
+ ```javascript
32
+ const CytraCID = require('cytracid');
33
+
34
+ // 1. Initialize the Client
35
+ const client = new CytraCID('YOUR_API_KEY_HERE');
36
+
37
+ async function runExample() {
38
+ try {
39
+ // 2. Check Balance
40
+ const balanceInfo = await client.getBalance();
41
+ console.log(`Current Balance: ${balanceInfo.balance_wl} WL`);
42
+
43
+ // 3. Purchase a Product (Reserved = true holds the token)
44
+ console.log('Purchasing product...');
45
+ const buyRequest = await client.buy(true); // true = reserved
46
+
47
+ if (!buyRequest.success) {
48
+ return console.error('Purchase failed:', buyRequest.error);
49
+ }
50
+
51
+ const purchaseId = buyRequest.purchase_id;
52
+ console.log(`Purchase Successful! ID: ${purchaseId}`);
53
+
54
+ // 4. Run Bypass Automation
55
+ console.log('Running bypass...');
56
+ const bypassResult = await client.refresh(purchaseId);
57
+
58
+ console.log('Bypass Completed!');
59
+ console.log('Final Token:', bypassResult.token);
60
+
61
+ } catch (err) {
62
+ console.error('API Error:', err.response?.data?.error || err.message);
63
+ }
64
+ }
65
+
66
+ runExample();
67
+ ```
68
+
69
+ ## 📖 Available Methods
70
+
71
+ ### `client.getBalance()`
72
+ Fetches your current available World Lock (WL) balance.
73
+ * **Returns:** `Promise<{ success: boolean, balance_wl: number }>`
74
+
75
+ ### `client.getStock()`
76
+ Fetches the global available stock and current pricing.
77
+ * **Returns:** `Promise<{ success: boolean, stock_count: number, price_wl: number }>`
78
+
79
+ ### `client.buy(isReserved)`
80
+ Initiates a purchase.
81
+ * **`isReserved`** *(boolean)*: If `true`, reserves the token without immediately triggering the bypass bot. Default is `true`.
82
+ * **Returns:** `Promise<{ success: boolean, purchase_id: number, status: string }>`
83
+
84
+ ### `client.getPurchase(purchaseId)`
85
+ Checks the details and status of a specific past purchase.
86
+ * **`purchaseId`** *(number)*: The ID of the purchase.
87
+ * **Returns:** `Promise<{ success: boolean, purchase: Object }>`
88
+
89
+ ### `client.refresh(purchaseId)`
90
+ Triggers the bypass bot for a previously *reserved* purchase to fetch the final token.
91
+ * **`purchaseId`** *(number)*: The ID of the purchase.
92
+ * **Returns:** `Promise<{ success: boolean, status: string, token: string }>`
93
+
94
+ ---
95
+
96
+ <div align="center">
97
+ <p>© 2026 CytraCID. All rights reserved.</p>
98
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cytracid",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Official API Wrapper for CytraCID",
5
5
  "main": "index.js",
6
6
  "scripts": {