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.
- package/README.md +20 -26
- 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
|
-
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
73
|
+
After setup, copy printed values (`SECRET`, TLS paths, `PROXY_URL`) into your app env.
|
|
85
74
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
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
|
|
103
|
+
- verify live values with repo helper (`scripts/discover.ts`)
|
|
110
104
|
|
|
111
105
|
## Security
|
|
112
106
|
|