orrery-node 0.1.0 → 0.1.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 +117 -25
- package/package.json +17 -5
package/README.md
CHANGED
|
@@ -1,46 +1,138 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://orrerynode.com"><img src="https://raw.githubusercontent.com/orrery-node/orrery/main/assets/brand/social-preview.png" alt="Orrery — AI inference, peer to peer. Zero cut in between." width="100%"></a>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">orrery-node</h1>
|
|
4
6
|
|
|
7
|
+
<h3 align="center">AI inference, peer to peer. Zero cut in between.</h3>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
The router and provider node for <a href="https://orrerynode.com">Orrery</a>, a peer-to-peer AI inference network on Solana.<br>
|
|
11
|
+
Your computer sends each request straight to someone else's machine and pays it per answer, directly on chain.<br>
|
|
12
|
+
No server in the middle. No account. No API key to buy. The program takes nothing.
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://www.npmjs.com/package/orrery-node"><img src="https://img.shields.io/npm/v/orrery-node?style=for-the-badge&color=9945ff&labelColor=0c0c0c&label=npm" alt="npm version"></a>
|
|
17
|
+
<a href="https://github.com/orrery-node/orrery/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-14f195?style=for-the-badge&labelColor=0c0c0c" alt="MIT license"></a>
|
|
18
|
+
<a href="https://github.com/orrery-node/orrery"><img src="https://img.shields.io/badge/GitHub-orrery--node%2Forrery-f7f7f7?style=for-the-badge&logo=github&logoColor=white&labelColor=0c0c0c" alt="GitHub"></a>
|
|
19
|
+
<img src="https://img.shields.io/badge/program%20fee-0%25-14f195?style=for-the-badge&labelColor=0c0c0c" alt="0% program fee">
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="https://orrerynode.com"><b>Website</b></a> · <a href="https://orrerynode.com/docs"><b>Docs</b></a> · <a href="https://github.com/orrery-node/orrery"><b>GitHub</b></a> · <a href="https://github.com/orrery-node/orrery/blob/main/docs/PROTOCOL.md"><b>Protocol</b></a> · <a href="https://github.com/orrery-node/orrery/blob/main/SECURITY.md"><b>Security</b></a>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<img src="https://raw.githubusercontent.com/orrery-node/orrery/main/assets/readme/hero.gif" width="760" alt="Your router at the core, providers on its orbits, other routers in the sky, requests and payments crossing directly between them.">
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install -g orrery-node # Node.js 22 or newer
|
|
36
|
+
orrery help
|
|
5
37
|
```
|
|
6
|
-
your tool ──► router (127.0.0.1:7171) ──► provider's machine
|
|
7
|
-
│ │
|
|
8
|
-
└── Solana program: channel deposit · redeem ──┘
|
|
9
|
-
```
|
|
10
38
|
|
|
11
|
-
|
|
39
|
+
or run it once with `npx -y orrery-node router --wallet <keypair.json>`.
|
|
40
|
+
|
|
41
|
+
## Use the network in 30 seconds
|
|
12
42
|
|
|
13
43
|
```bash
|
|
14
|
-
|
|
15
|
-
|
|
44
|
+
orrery router --wallet ~/.config/solana/orrery.json --rpc <your RPC URL> --daily-cap 5
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Orrery router on http://127.0.0.1:7171/v1 · 3 providers · route auto · wallet 7xKXtg…
|
|
49
|
+
session key 9WzDXw…AWWM signs vouchers; console at http://127.0.0.1:7171/
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Point anything that speaks the OpenAI API at `http://127.0.0.1:7171/v1`. Any API key works: your wallet is the account.
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
from openai import OpenAI
|
|
56
|
+
|
|
57
|
+
client = OpenAI(base_url="http://127.0.0.1:7171/v1", api_key="unused")
|
|
58
|
+
reply = client.chat.completions.create(
|
|
59
|
+
model="llama-3.3-70b:cheap", # :cheap :fast :trusted :private
|
|
60
|
+
messages=[{"role": "user", "content": "Hello from the network"}],
|
|
61
|
+
)
|
|
16
62
|
```
|
|
17
63
|
|
|
18
|
-
|
|
64
|
+
Works unchanged with **Cursor, Continue, Aider, Open WebUI, LangChain** and the **OpenAI SDKs**. Every answer comes back with `x-orrery-provider`, `x-orrery-route` and `x-orrery-cost`.
|
|
65
|
+
|
|
66
|
+
## One word picks the route
|
|
19
67
|
|
|
20
68
|
| Suffix | Picks |
|
|
21
69
|
|---|---|
|
|
22
|
-
| (none) | a blend of
|
|
23
|
-
| `:cheap` | lowest expected cost |
|
|
24
|
-
| `:fast` | fastest first token this router has
|
|
25
|
-
| `:trusted` | most USDC settled on chain, bonded $OREY |
|
|
26
|
-
| `:private` |
|
|
70
|
+
| *(none)* | a blend of expected cost, first-token time and reputation |
|
|
71
|
+
| `:cheap` | lowest expected cost for this request |
|
|
72
|
+
| `:fast` | fastest first token this router has measured |
|
|
73
|
+
| `:trusted` | most USDC settled on chain, redemptions, age, bonded $OREY, local success rate |
|
|
74
|
+
| `:private` | only providers whose hardware enclave was verified; the prompt is sealed (X25519 → HKDF → AES-256-GCM) |
|
|
75
|
+
|
|
76
|
+
The router tries the top three providers in order, so a slow or dead one is skipped without your tool noticing.
|
|
77
|
+
|
|
78
|
+
## Pay per answer, not per account
|
|
27
79
|
|
|
28
|
-
|
|
80
|
+
- **One signature opens a channel.** Your wallet locks a small USDC deposit (`--deposit`, default 2) in an account only the channel controls.
|
|
81
|
+
- **Every answer is a signed running total.** A session key on your computer signs an 88-byte ed25519 voucher. The router prices each answer from the provider's published list and pays the smaller of its number and the provider's.
|
|
82
|
+
- **Nobody is ever owed more than one answer.** A provider serves the next request only once the last is paid.
|
|
83
|
+
- **The rest comes back.** `orrery close <channel> --wallet <keypair>`, then `--finish` after the grace period.
|
|
84
|
+
- **`--daily-cap`** (default $5) stops all spending for the day.
|
|
85
|
+
|
|
86
|
+
## Sell inference from your own machine
|
|
87
|
+
|
|
88
|
+
Put a node in front of any OpenAI-compatible server — **vLLM, SGLang, Ollama, llama.cpp**, or API capacity you hold — set your prices, and list it. Routers anywhere can then pay you per answer. No application, no stake, and nothing in the program can delist you.
|
|
29
89
|
|
|
30
90
|
```bash
|
|
31
|
-
orrery
|
|
32
|
-
orrery
|
|
91
|
+
orrery provider register --config provider.json --wallet wallet.json # list on chain; the wallet stays cold
|
|
92
|
+
orrery provider start --config provider.json # serve, check vouchers, redeem
|
|
33
93
|
```
|
|
34
94
|
|
|
35
|
-
|
|
95
|
+
```jsonc
|
|
96
|
+
{
|
|
97
|
+
"name": "My GPU", "region": "eu-west", "publicUrl": "https://gpu.example.org",
|
|
98
|
+
"rpcUrl": "https://your-rpc.example.com", "settleMint": "EPjFWJd5Wm8eUi4wSPdf8qJxQAXnmSeKEr5mVGYLm3CY",
|
|
99
|
+
"wallet": "~/.config/solana/provider-wallet.json",
|
|
100
|
+
"upstream": { "baseUrl": "http://127.0.0.1:8000/v1" },
|
|
101
|
+
"models": [{ "id": "llama-3.3-70b", "context": 131072, "maxOutput": 8192,
|
|
102
|
+
"price": { "input": 120000, "output": 300000 } }] // USDC base units per million tokens
|
|
103
|
+
}
|
|
104
|
+
```
|
|
36
105
|
|
|
37
|
-
|
|
106
|
+
Only standard chat fields reach your upstream, so a caller can never spend your key on models or tools your price list does not cover. The node runs on its own key, which can redeem but never send your earnings anywhere except your wallet.
|
|
38
107
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
108
|
+
## Commands
|
|
109
|
+
|
|
110
|
+
| Command | Does |
|
|
111
|
+
|---|---|
|
|
112
|
+
| `orrery router` | run the router on `127.0.0.1:7171` (`--wallet`, `--rpc`, `--route`, `--deposit`, `--daily-cap`, `--port`) |
|
|
113
|
+
| `orrery models` | every model on the network, cheapest price, provider count |
|
|
114
|
+
| `orrery providers` | every listing and what the chain says about it |
|
|
115
|
+
| `orrery channels` | your channels: deposit, what you signed, what was redeemed |
|
|
116
|
+
| `orrery close <channel> [--finish]` | close a channel; the rest comes back to you |
|
|
117
|
+
| `orrery provider register \| show \| start \| attest \| redeem` | run a provider |
|
|
118
|
+
|
|
119
|
+
The router also serves a live console at `http://127.0.0.1:7171/` with every request, the provider that answered and what it cost.
|
|
120
|
+
|
|
121
|
+
## How it fits together
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
your tool ──► router (your computer) ──────────────► provider's machine
|
|
125
|
+
│ request · answer · signed total │
|
|
126
|
+
└──── Solana program: channel deposit · redeem ─┘
|
|
42
127
|
```
|
|
43
128
|
|
|
44
|
-
|
|
129
|
+
The Solana program (`7UHevY47LgbJv9hz4iymecR8FURy27jX55KYb1sxytZS`) only holds channel deposits and pays out signed totals. It has no fee field and no third recipient, and nobody, including the admin, can delist a provider. Byte layouts and the threat table are in the [protocol spec](https://github.com/orrery-node/orrery/blob/main/docs/PROTOCOL.md).
|
|
130
|
+
|
|
131
|
+
## Links
|
|
132
|
+
|
|
133
|
+
- Website: https://orrerynode.com
|
|
134
|
+
- Docs: https://orrerynode.com/docs
|
|
135
|
+
- Source: https://github.com/orrery-node/orrery
|
|
136
|
+
- Security: https://github.com/orrery-node/orrery/blob/main/SECURITY.md
|
|
45
137
|
|
|
46
|
-
|
|
138
|
+
MIT licensed.
|
package/package.json
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orrery-node",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Peer-to-peer AI inference on Solana. An OpenAI-compatible router on localhost that sends every request straight to a provider's machine and pays it per answer through a payment channel. Zero cut in between.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"solana",
|
|
8
8
|
"ai",
|
|
9
|
+
"llm",
|
|
9
10
|
"inference",
|
|
10
11
|
"p2p",
|
|
12
|
+
"peer-to-peer",
|
|
13
|
+
"openai",
|
|
11
14
|
"openai-compatible",
|
|
12
15
|
"router",
|
|
13
|
-
"
|
|
14
|
-
"payment-channel"
|
|
16
|
+
"gateway",
|
|
17
|
+
"payment-channel",
|
|
18
|
+
"micropayments",
|
|
19
|
+
"usdc",
|
|
20
|
+
"decentralized",
|
|
21
|
+
"vllm",
|
|
22
|
+
"ollama",
|
|
23
|
+
"gpu",
|
|
24
|
+
"cursor",
|
|
25
|
+
"langchain"
|
|
15
26
|
],
|
|
16
27
|
"homepage": "https://orrerynode.com",
|
|
17
28
|
"repository": {
|
|
@@ -51,5 +62,6 @@
|
|
|
51
62
|
"@types/node": "22.19.1",
|
|
52
63
|
"tsx": "4.23.13",
|
|
53
64
|
"typescript": "5.9.3"
|
|
54
|
-
}
|
|
65
|
+
},
|
|
66
|
+
"author": "Orrery (https://orrerynode.com)"
|
|
55
67
|
}
|