cocoon-sdk 0.1.2 → 0.1.4

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 +20 -26
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -57,38 +57,32 @@ for await (const chunk of stream) {
57
57
 
58
58
  ## One-Time Setup (Repo Helper Scripts)
59
59
 
60
- The npm package is a library.
61
- If you want the fully automated setup flow (cert/key generation + register + secret hash), use repo scripts:
60
+ The npm package is a **library only** (no bundled `scripts/setup.ts` files inside `node_modules`).
62
61
 
63
- - `https://github.com/indie-cto/telegram-cocoon-ts-sdk`
64
- - `scripts/setup.ts`
65
- - `scripts/inference.ts`
66
-
67
- Important for users integrating from another project:
68
-
69
- - The intended path is to run `scripts/setup.ts` once and copy `SECRET` + TLS paths.
70
- - Do **not** rely on ad-hoc certificate generation commands from agents.
71
- - A generic command like `openssl req -x509 -newkey ec ...` is not the tested/default SDK path.
72
-
73
- If you cannot run `scripts/setup.ts`, use this tested certificate generation format:
62
+ If you want the fully automated setup flow (cert/key generation + register + secret hash), run helper scripts from the GitHub repo:
74
63
 
75
64
  ```bash
76
- openssl genpkey -algorithm ed25519 -out /tmp/cocoon-client.key.pem
77
- openssl req -x509 \
78
- -key /tmp/cocoon-client.key.pem \
79
- -out /tmp/cocoon-client-cert.pem \
80
- -days 1 \
81
- -subj "/C=AE/ST=DUBAI/O=TDLib Development/OU=Security/CN=localhost"
65
+ git clone https://github.com/indie-cto/telegram-cocoon-ts-sdk.git
66
+ cd telegram-cocoon-ts-sdk
67
+ npm install
68
+ cp .env.example .env
69
+ # fill MNEMONIC in .env
70
+ npm run cocoon:setup
82
71
  ```
83
72
 
84
- Then set:
73
+ After setup, copy printed values (`SECRET`, TLS paths, `PROXY_URL`) into your app env.
85
74
 
86
- ```env
87
- COCOON_TLS_CERT_PATH=/tmp/cocoon-client-cert.pem
88
- COCOON_TLS_KEY_PATH=/tmp/cocoon-client.key.pem
89
- ```
75
+ Quick links:
76
+
77
+ - `https://github.com/indie-cto/telegram-cocoon-ts-sdk`
78
+ - `scripts/setup.ts`
79
+ - `scripts/inference.ts`
80
+
81
+ Important for users integrating from another project:
90
82
 
91
- Note: this only covers TLS material. You still need a valid `SECRET` (recommended via setup flow).
83
+ - The intended and supported path is to run `scripts/setup.ts` once and copy `SECRET` + TLS paths.
84
+ - Manual certificate generation is intentionally not documented here.
85
+ - If you skip setup, the full flow usually won't work (missing secret/state initialization/top-up context).
92
86
 
93
87
  ## TON Balance Guidance
94
88
 
@@ -106,7 +100,7 @@ Practical guidance:
106
100
 
107
101
  - smoke setup: typically `2-3 TON` can be enough
108
102
  - stable usage: plan around `15-20 TON` total working balance
109
- - verify live values with repo helper: `scripts/discover.ts`
103
+ - verify live values with repo helper (`scripts/discover.ts`)
110
104
 
111
105
  ## Security
112
106
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cocoon-sdk",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "TypeScript SDK for Telegram Cocoon — decentralized GPU network for AI inference on TON",
5
5
  "keywords": [
6
6
  "cocoon",