lightnode-sdk 0.3.0 → 0.3.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.
- package/README.md +21 -12
- package/dist/cli.js +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# lightnode-sdk
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
registration
|
|
5
|
-
|
|
3
|
+
TypeScript client for **LightChain AI**: read workers, jobs, models, on-chain
|
|
4
|
+
registration and per-model analytics, **and run encrypted inference end to end**
|
|
5
|
+
(prepare session, submit prompt, decrypt the streamed response). The SDK is
|
|
6
|
+
non-custodial - it never holds your private key; on-chain calls are signed by
|
|
7
|
+
your wallet via viem. Single peer dep: `viem`.
|
|
6
8
|
|
|
7
9
|
> Independent, community-built. Not an official LightChain package.
|
|
10
|
+
> Live-verified end-to-end on both **mainnet** (chain 9200) and **testnet** (chain 8200)
|
|
11
|
+
> with real LCAI - example transactions in the "Submitting inference" section below.
|
|
8
12
|
|
|
9
13
|
## Install
|
|
10
14
|
|
|
@@ -78,16 +82,21 @@ npx lightnode analytics --csv # per-model performance (CSV)
|
|
|
78
82
|
npx lightnode reliability --csv # per-worker reliability (CSV)
|
|
79
83
|
```
|
|
80
84
|
|
|
81
|
-
## Submitting inference
|
|
85
|
+
## Submitting inference
|
|
82
86
|
|
|
83
|
-
`v0.3
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
`v0.3+` ships the encrypted inference-submit flow end to end. Wire-compatible with
|
|
88
|
+
the reference client [`lcai-chat-v2`](https://github.com/lightchain-protocol/lcai-chat-v2)
|
|
89
|
+
(same ECDH-P256 + AES-256-GCM, same gateway endpoints, same `JobRegistry` calls).
|
|
90
|
+
**Live-verified** with real LCAI on both networks before this release:
|
|
91
|
+
|
|
92
|
+
| Network | Tx | Decrypted model output (excerpt) |
|
|
93
|
+
| --- | --- | --- |
|
|
94
|
+
| testnet (8200) | createSession `0x77686f3f…ef2bc587` · submitJob `0xba9d48c4…293b2bd96` | "Did you know that the deepest part of the ocean, the Mariana Trench, is so deep that if you were to drop Mount Everest into it, its peak would still be more than 1 mile underwater?!" |
|
|
95
|
+
| mainnet (9200) | createSession `0xf091957f…57d4a6ca` · submitJob `0x6ff44a4a…79846bb89` | "Did you know there is a type of jellyfish called the 'Upside-Down Jellyfish' that actually swims on its back, using its tentacles to catch prey and defend itself from predators?" |
|
|
96
|
+
|
|
97
|
+
The pieces that talk to the chain (`createSession` / `submitJob`) are signed by
|
|
98
|
+
**your** wallet via viem; the SDK only prepares the data, does the crypto, and
|
|
99
|
+
talks to the consumer gateway.
|
|
91
100
|
|
|
92
101
|
### Auth (your responsibility)
|
|
93
102
|
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lightnode-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Read-only TypeScript client for LightChain AI: workers, jobs, models, on-chain registration, and per-model network analytics. Independent, community-built (not an official LightChain package).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|