eigen-skills 2.0.2 → 2.1.0
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 +115 -654
- package/bin/eigen-mcp.js +3 -0
- package/index.js +5 -14
- package/package.json +16 -8
- package/src/mcp-server.js +321 -0
- package/skills/eigen-avs/SKILL.md +0 -92
- package/skills/eigen-avs/scripts/avs-api.js +0 -117
- package/skills/eigen-da/SKILL.md +0 -148
- package/skills/eigen-da/scripts/da-api.js +0 -128
- package/skills/eigen-delegation/SKILL.md +0 -98
- package/skills/eigen-delegation/scripts/delegation-api.js +0 -102
- package/skills/eigen-restaking/SKILL.md +0 -92
- package/skills/eigen-restaking/scripts/eigen-api.js +0 -196
- package/skills/eigen-rewards/SKILL.md +0 -83
- package/skills/eigen-rewards/scripts/rewards-api.js +0 -73
package/README.md
CHANGED
|
@@ -1,424 +1,164 @@
|
|
|
1
1
|
# eigen-skills
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
[Installation](#installation) | [Skills](#skills-overview) | [Architecture](#architecture) | [Usage](#usage) | [API Reference](#api-reference)
|
|
3
|
+
**EigenCompute MCP Server & Agent Skill — Deploy and manage apps in Trusted Execution Environments (TEE)**
|
|
6
4
|
|
|
7
5
|
---
|
|
8
6
|
|
|
9
7
|
## What is this?
|
|
10
8
|
|
|
11
|
-
**eigen-skills**
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npx skills add zeeshan8281/eigen-skills
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
> Think of it like `npm install` but for AI agents — instead of code libraries, you're installing **knowledge and capabilities**.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Skills Overview
|
|
22
|
-
|
|
23
|
-
| Skill | Emoji | Domain | Data Source |
|
|
24
|
-
|-------|-------|--------|-------------|
|
|
25
|
-
| [`eigen-restaking`](#eigen-restaking) | 🔄 | Operators, TVL, stakers, deposits, withdrawals | EigenExplorer API |
|
|
26
|
-
| [`eigen-avs`](#eigen-avs) | 🛡️ | Actively Validated Services, registrations, operator-sets | EigenExplorer API |
|
|
27
|
-
| [`eigen-rewards`](#eigen-rewards) | 💰 | Rewards, APY rankings, yield strategies | EigenExplorer API |
|
|
28
|
-
| [`eigen-delegation`](#eigen-delegation) | 🤝 | Delegation events, staker positions, top operators | EigenExplorer API |
|
|
29
|
-
| [`eigen-compute`](#eigen-compute) | 🔒 | TEE deployment, attestation, lifecycle management | EigenCompute (ecloud CLI) |
|
|
30
|
-
| [`eigen-da`](#eigen-da) | 📦 | Blob storage & retrieval, data availability | EigenDA Proxy |
|
|
31
|
-
|
|
32
|
-
---
|
|
9
|
+
**eigen-skills** gives AI agents the ability to deploy and manage apps on [EigenCompute](https://eigencloud.xyz) — hardware-isolated TEEs powered by Intel TDX with encrypted secrets and cryptographic attestation.
|
|
33
10
|
|
|
34
|
-
|
|
11
|
+
Works with:
|
|
12
|
+
- **MCP Clients** — Cursor, Claude Desktop, Antigravity, Cline, etc.
|
|
13
|
+
- **Claude Code** — via SKILL.md standard
|
|
35
14
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
40
|
-
│ AI Agent │
|
|
41
|
-
│ (Claude Code / OpenClaw / Any Agent Skills-compatible) │
|
|
42
|
-
│ │
|
|
43
|
-
│ 1. User asks: "What are the top EigenLayer operators?" │
|
|
44
|
-
│ 2. Agent scans installed skills/ │
|
|
45
|
-
│ 3. Matches intent → eigen-restaking/SKILL.md │
|
|
46
|
-
│ 4. Reads SKILL.md for instructions │
|
|
47
|
-
│ 5. Executes the appropriate curl/CLI command │
|
|
48
|
-
│ 6. Formats and returns results │
|
|
49
|
-
└──────────────┬──────────────────────────────────────────────┘
|
|
50
|
-
│
|
|
51
|
-
▼
|
|
52
|
-
┌──────────────────────────────────────────────────────────────┐
|
|
53
|
-
│ eigen-skills/ │
|
|
54
|
-
│ │
|
|
55
|
-
│ skills/ │
|
|
56
|
-
│ ├── eigen-restaking/ │
|
|
57
|
-
│ │ ├── SKILL.md ← Agent reads this │
|
|
58
|
-
│ │ └── scripts/ │
|
|
59
|
-
│ │ └── eigen-api.js ← JS client (optional) │
|
|
60
|
-
│ ├── eigen-avs/ │
|
|
61
|
-
│ ├── eigen-rewards/ │
|
|
62
|
-
│ ├── eigen-delegation/ │
|
|
63
|
-
│ ├── eigen-compute/ │
|
|
64
|
-
│ └── eigen-da/ │
|
|
65
|
-
└──────────────┬──────────────────────────────────────────────┘
|
|
66
|
-
│
|
|
67
|
-
▼
|
|
68
|
-
┌──────────────────────────────────────────────────────────────┐
|
|
69
|
-
│ EigenLayer Ecosystem │
|
|
70
|
-
│ │
|
|
71
|
-
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
72
|
-
│ │ EigenExplorer │ │ EigenCompute │ │ EigenDA │ │
|
|
73
|
-
│ │ REST API │ │ (ecloud CLI)│ │ (Proxy) │ │
|
|
74
|
-
│ │ │ │ │ │ │ │
|
|
75
|
-
│ │ Operators │ │ TEE Deploy │ │ Blob Store │ │
|
|
76
|
-
│ │ AVS │ │ Attestation │ │ Blob Get │ │
|
|
77
|
-
│ │ Stakers │ │ KMS Signing │ │ KZG Verify │ │
|
|
78
|
-
│ │ Rewards │ │ Lifecycle │ │ Commitment │ │
|
|
79
|
-
│ │ Events │ │ Monitoring │ │ Explorer │ │
|
|
80
|
-
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
81
|
-
│ │ │ │ │
|
|
82
|
-
│ ▼ ▼ ▼ │
|
|
83
|
-
│ ┌─────────────────────────────────────────────────┐ │
|
|
84
|
-
│ │ EigenLayer Protocol (L1) │ │
|
|
85
|
-
│ │ DelegationManager · StrategyManager · AVSDir │ │
|
|
86
|
-
│ │ AllocationManager · RewardsCoordinator │ │
|
|
87
|
-
│ └─────────────────────────────────────────────────┘ │
|
|
88
|
-
└──────────────────────────────────────────────────────────────┘
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Data Flow
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
┌─────────────────┐
|
|
95
|
-
│ User Query │
|
|
96
|
-
│ "top operators" │
|
|
97
|
-
└────────┬────────┘
|
|
98
|
-
│
|
|
99
|
-
┌────────▼────────┐
|
|
100
|
-
│ AI Agent │
|
|
101
|
-
│ reads SKILL.md│
|
|
102
|
-
└────────┬────────┘
|
|
103
|
-
│
|
|
104
|
-
┌──────────────┼──────────────┐
|
|
105
|
-
│ │ │
|
|
106
|
-
┌────────▼─────┐ ┌─────▼──────┐ ┌─────▼──────┐
|
|
107
|
-
│ REST API │ │ ecloud CLI │ │ DA Proxy │
|
|
108
|
-
│ (curl) │ │ (shell) │ │ (curl) │
|
|
109
|
-
└────────┬─────┘ └─────┬──────┘ └─────┬──────┘
|
|
110
|
-
│ │ │
|
|
111
|
-
┌────────▼─────┐ ┌─────▼──────┐ ┌─────▼──────┐
|
|
112
|
-
│ EigenExplorer│ │ EigenCloud │ │ EigenDA │
|
|
113
|
-
│ Mainnet │ │ TEE │ │ Network │
|
|
114
|
-
└──────────────┘ └────────────┘ └────────────┘
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g eigen-skills@latest
|
|
115
17
|
```
|
|
116
18
|
|
|
117
19
|
---
|
|
118
20
|
|
|
119
|
-
##
|
|
120
|
-
|
|
121
|
-
### For Claude Code (one command)
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
npm install eigen-skills
|
|
125
|
-
```
|
|
21
|
+
## MCP Server Setup (Cursor, Claude Desktop, etc.)
|
|
126
22
|
|
|
127
|
-
|
|
23
|
+
### 1. Install
|
|
128
24
|
|
|
129
25
|
```bash
|
|
130
|
-
|
|
26
|
+
npm install -g eigen-skills
|
|
131
27
|
```
|
|
132
28
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
### Alternative: curl (no npm)
|
|
29
|
+
### 2. Configure your MCP client
|
|
136
30
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
31
|
+
**Cursor** (`~/.cursor/mcp.json`):
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"eigencompute": {
|
|
36
|
+
"command": "eigen-mcp"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
140
40
|
```
|
|
141
41
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
42
|
+
**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"mcpServers": {
|
|
46
|
+
"eigencompute": {
|
|
47
|
+
"command": "eigen-mcp"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
148
51
|
```
|
|
149
52
|
|
|
150
|
-
|
|
53
|
+
### 3. Available MCP Tools
|
|
151
54
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
55
|
+
| Tool | Description |
|
|
56
|
+
|------|-------------|
|
|
57
|
+
| `eigencompute_deploy` | Deploy Docker image to TEE |
|
|
58
|
+
| `eigencompute_list` | List all deployed apps |
|
|
59
|
+
| `eigencompute_info` | Get app status, IP, details |
|
|
60
|
+
| `eigencompute_logs` | View app logs |
|
|
61
|
+
| `eigencompute_start` | Start stopped app |
|
|
62
|
+
| `eigencompute_stop` | Stop running app |
|
|
63
|
+
| `eigencompute_terminate` | Destroy app permanently |
|
|
64
|
+
| `eigencompute_whoami` | Check CLI auth status |
|
|
65
|
+
| `eigencompute_env_set` | Set sealed secrets |
|
|
66
|
+
| `eigencompute_upgrade` | Upgrade running app |
|
|
157
67
|
|
|
158
68
|
---
|
|
159
69
|
|
|
160
70
|
## Prerequisites
|
|
161
71
|
|
|
162
|
-
### Data Skills (restaking, AVS, rewards, delegation)
|
|
163
|
-
|
|
164
|
-
| Requirement | How to Get |
|
|
165
|
-
|-------------|-----------|
|
|
166
|
-
| EigenExplorer API Key | Free at [developer.eigenexplorer.com](https://developer.eigenexplorer.com) |
|
|
167
|
-
| Set env var | `export EIGEN_API_KEY=your_key` |
|
|
168
|
-
|
|
169
|
-
### EigenCompute Skill
|
|
170
|
-
|
|
171
|
-
| Requirement | How to Get |
|
|
172
|
-
|-------------|-----------|
|
|
173
|
-
| ecloud CLI | `npm install -g @layr-labs/ecloud-cli` |
|
|
174
|
-
| Auth | `ecloud auth login` or `ecloud auth generate --store` |
|
|
175
|
-
|
|
176
|
-
### EigenDA Skill
|
|
177
|
-
|
|
178
|
-
| Requirement | How to Get |
|
|
179
|
-
|-------------|-----------|
|
|
180
|
-
| EigenDA Proxy | See [EigenDA Proxy Setup](#eigenda-proxy-setup) below |
|
|
181
|
-
| Ethereum RPC | Any Sepolia RPC endpoint |
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## Usage
|
|
186
|
-
|
|
187
|
-
### Agent Usage (SKILL.md driven)
|
|
188
|
-
|
|
189
|
-
When an agent has eigen-skills installed, it reads the `SKILL.md` files to know what to do:
|
|
190
|
-
|
|
191
|
-
**User:** "What are the top EigenLayer operators by TVL?"
|
|
192
|
-
**Agent reads:** `skills/eigen-restaking/SKILL.md`
|
|
193
|
-
**Agent runs:**
|
|
194
72
|
```bash
|
|
195
|
-
|
|
196
|
-
|
|
73
|
+
npm install -g @layr-labs/ecloud-cli@latest # minimum v0.4.3
|
|
74
|
+
ecloud auth login
|
|
75
|
+
ecloud auth whoami
|
|
197
76
|
```
|
|
198
|
-
**Agent formats:** Bold names, TVL in human-readable form, staker counts.
|
|
199
|
-
|
|
200
|
-
---
|
|
201
77
|
|
|
202
|
-
**
|
|
203
|
-
**Agent reads:** `skills/eigen-compute/SKILL.md`
|
|
204
|
-
**Agent runs:**
|
|
205
|
-
```bash
|
|
206
|
-
ecloud compute app deploy
|
|
207
|
-
# Selects "Build and deploy from Dockerfile"
|
|
208
|
-
# Selects Linux/AMD64
|
|
209
|
-
```
|
|
78
|
+
**CRITICAL:** CLI v0.4.3+ is required. Older versions have broken ITA attestation metadata causing deploy failures on all instance types.
|
|
210
79
|
|
|
211
80
|
---
|
|
212
81
|
|
|
213
|
-
|
|
214
|
-
**Agent reads:** `skills/eigen-da/SKILL.md`
|
|
215
|
-
**Agent runs:**
|
|
216
|
-
```bash
|
|
217
|
-
curl -s -X POST "http://127.0.0.1:3100/put?commitment_mode=standard" \
|
|
218
|
-
-H "Content-Type: application/json" \
|
|
219
|
-
-d '{"verified": true, "model": "gpt-oss-120b", "timestamp": "2025-01-01"}'
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### Programmatic Usage (JavaScript)
|
|
223
|
-
|
|
224
|
-
```javascript
|
|
225
|
-
const { EigenAPI, AVSAPI, RewardsAPI, DelegationAPI, EigenCompute, EigenDA } = require('eigen-skills');
|
|
226
|
-
|
|
227
|
-
// ─── Restaking Data ─────────────────────────────────
|
|
228
|
-
const eigen = new EigenAPI(process.env.EIGEN_API_KEY);
|
|
229
|
-
|
|
230
|
-
// Ecosystem overview
|
|
231
|
-
const metrics = await eigen.getMetrics();
|
|
232
|
-
console.log(`Total TVL: ${metrics.tvl}`);
|
|
233
|
-
console.log(`Operators: ${metrics.totalOperators}`);
|
|
234
|
-
console.log(`Stakers: ${metrics.totalStakers}`);
|
|
235
|
-
|
|
236
|
-
// Top operators
|
|
237
|
-
const ops = await eigen.getOperators({ sortByTvl: 'desc', take: 5 });
|
|
238
|
-
ops.data.forEach(op => {
|
|
239
|
-
console.log(`${op.metadataName} — TVL: ${op.tvl?.tvl} — Stakers: ${op.totalStakers}`);
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
// ─── AVS Data ───────────────────────────────────────
|
|
243
|
-
const avs = new AVSAPI(process.env.EIGEN_API_KEY);
|
|
244
|
-
|
|
245
|
-
// All services
|
|
246
|
-
const services = await avs.getAllAVS({ sortByTvl: 'desc', take: 10 });
|
|
247
|
-
|
|
248
|
-
// Operators securing a specific AVS
|
|
249
|
-
const avsOps = await avs.getAVSOperators('0xAVS_ADDRESS');
|
|
250
|
-
|
|
251
|
-
// ─── Rewards & Yield ────────────────────────────────
|
|
252
|
-
const rewards = new RewardsAPI(process.env.EIGEN_API_KEY);
|
|
253
|
-
|
|
254
|
-
// Best yield operators
|
|
255
|
-
const topYield = await rewards.getTopOperatorsByAPY(10);
|
|
256
|
-
|
|
257
|
-
// Rewards for a specific operator
|
|
258
|
-
const opRewards = await rewards.getOperatorRewards('0xOPERATOR');
|
|
259
|
-
|
|
260
|
-
// ─── Delegation ─────────────────────────────────────
|
|
261
|
-
const delegation = new DelegationAPI(process.env.EIGEN_API_KEY);
|
|
262
|
-
|
|
263
|
-
// Most delegated operators
|
|
264
|
-
const topDelegated = await delegation.getTopDelegatedOperators(10);
|
|
265
|
-
|
|
266
|
-
// Staker's delegation position
|
|
267
|
-
const stakerInfo = await delegation.getStakerDelegation('0xSTAKER');
|
|
268
|
-
|
|
269
|
-
// ─── TEE Compute ────────────────────────────────────
|
|
270
|
-
const compute = new EigenCompute();
|
|
271
|
-
|
|
272
|
-
// Check if running inside TEE
|
|
273
|
-
const health = compute.healthCheck();
|
|
274
|
-
console.log(`Inside TEE: ${health.insideTEE}`);
|
|
82
|
+
## Instance Types
|
|
275
83
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
// Store data
|
|
285
|
-
const commitment = await da.store({
|
|
286
|
-
proof: { verified: true, model: 'gpt-oss-120b' },
|
|
287
|
-
timestamp: new Date().toISOString(),
|
|
288
|
-
});
|
|
289
|
-
console.log(`Stored! Commitment: ${commitment}`);
|
|
290
|
-
console.log(`Explorer: ${da.getExplorerUrl(commitment)}`);
|
|
291
|
-
|
|
292
|
-
// Retrieve data
|
|
293
|
-
const data = await da.retrieve(commitment);
|
|
294
|
-
console.log(`Retrieved:`, data);
|
|
295
|
-
```
|
|
84
|
+
| Type | vCPUs | Memory | TEE | Notes |
|
|
85
|
+
|------|-------|--------|-----|-------|
|
|
86
|
+
| g1-micro-1v | 2 shared | 1 GB | Shielded VM | Cheapest, attestation can be flaky |
|
|
87
|
+
| g1-medium-1v | 2 shared | 4 GB | Shielded VM | |
|
|
88
|
+
| g1-custom-2-4096s | 2 | 4 GB | SEV-SNP | |
|
|
89
|
+
| g1-standard-2s | 2 | 8 GB | SEV-SNP | |
|
|
90
|
+
| g1-standard-4t | 4 | 16 GB | TDX | **Recommended — most reliable** |
|
|
91
|
+
| g1-standard-8t | 8 | 32 GB | TDX | |
|
|
296
92
|
|
|
297
93
|
---
|
|
298
94
|
|
|
299
|
-
##
|
|
95
|
+
## Deploy (Non-Interactive, Agent-Friendly)
|
|
300
96
|
|
|
301
|
-
|
|
97
|
+
`ecloud compute app deploy` has 6+ interactive prompts. Use the full flag set for CI/agent contexts:
|
|
302
98
|
|
|
303
|
-
|
|
99
|
+
### Step 1: Build & push Docker image (must be linux/amd64)
|
|
304
100
|
|
|
305
|
-
```
|
|
306
|
-
Operators ←→ Stakers ←→ Strategies ←→ TVL
|
|
307
|
-
│
|
|
308
|
-
└── Deposits / Withdrawals / Events
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
**Key endpoints:**
|
|
312
|
-
|
|
313
|
-
| Method | What |
|
|
314
|
-
|--------|------|
|
|
315
|
-
| `getMetrics()` | Ecosystem-wide TVL, operator count, staker count |
|
|
316
|
-
| `getOperators(opts)` | List operators with sorting/filtering |
|
|
317
|
-
| `getOperator(address)` | Single operator detail |
|
|
318
|
-
| `getStaker(address)` | Staker info and positions |
|
|
319
|
-
| `getDeposits()` | Recent deposit events |
|
|
320
|
-
| `getWithdrawals()` | Recent withdrawal events |
|
|
321
|
-
| `getHistoricalMetrics()` | TVL over time |
|
|
322
|
-
|
|
323
|
-
**Example queries:**
|
|
324
101
|
```bash
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
-H "x-api-token: $EIGEN_API_KEY"
|
|
328
|
-
|
|
329
|
-
# Search operator by name
|
|
330
|
-
curl -s "https://api.eigenexplorer.com/operators?searchByText=p2p&withTvl=true" \
|
|
331
|
-
-H "x-api-token: $EIGEN_API_KEY"
|
|
332
|
-
|
|
333
|
-
# Staker position
|
|
334
|
-
curl -s "https://api.eigenexplorer.com/stakers/0xADDRESS" \
|
|
335
|
-
-H "x-api-token: $EIGEN_API_KEY"
|
|
102
|
+
docker build --platform linux/amd64 -t <registry/image:tag> .
|
|
103
|
+
docker push <registry/image:tag>
|
|
336
104
|
```
|
|
337
105
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
### eigen-avs
|
|
106
|
+
### Step 2: Deploy
|
|
341
107
|
|
|
342
|
-
|
|
108
|
+
```bash
|
|
109
|
+
# Remove Dockerfile to avoid "Choose deployment method" prompt
|
|
110
|
+
rm -f Dockerfile
|
|
111
|
+
touch .env # create empty .env if no secrets
|
|
343
112
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
113
|
+
echo "n" | ecloud compute app deploy \
|
|
114
|
+
--name <app-name> \
|
|
115
|
+
--image-ref <registry/image:tag> \
|
|
116
|
+
--skip-profile \
|
|
117
|
+
--env-file .env \
|
|
118
|
+
--instance-type g1-standard-4t \
|
|
119
|
+
--log-visibility public \
|
|
120
|
+
--resource-usage-monitoring enable \
|
|
121
|
+
--verbose
|
|
350
122
|
```
|
|
351
123
|
|
|
352
|
-
|
|
124
|
+
### Dockerfile Requirements
|
|
353
125
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
| `getAVS(address)` | Single AVS detail |
|
|
358
|
-
| `getAVSOperators(address)` | Operators registered to an AVS |
|
|
359
|
-
| `getAVSStakers(address)` | Stakers delegated to an AVS |
|
|
360
|
-
| `getAVSRegistrationEvents(address)` | Registration/deregistration events |
|
|
361
|
-
| `getAVSOperatorSets(address)` | Operator-sets for an AVS |
|
|
126
|
+
- Use `EXPOSE <port>` to declare your port
|
|
127
|
+
- App must listen on `0.0.0.0`, not `localhost`
|
|
128
|
+
- EigenCompute wraps your CMD with `compute-source-env.sh` entrypoint — do NOT set your own ENTRYPOINT to source it manually
|
|
362
129
|
|
|
363
130
|
---
|
|
364
131
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
💰 **Query rewards and yield data**
|
|
132
|
+
## Manage Apps
|
|
368
133
|
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
│
|
|
377
|
-
▼
|
|
378
|
-
┌─────────┐
|
|
379
|
-
│ Staker │ ← receives remaining rewards
|
|
380
|
-
└─────────┘
|
|
134
|
+
```bash
|
|
135
|
+
ecloud compute app list
|
|
136
|
+
ecloud compute app info <APP_ID>
|
|
137
|
+
ecloud compute app logs <APP_ID>
|
|
138
|
+
ecloud compute app start <APP_ID>
|
|
139
|
+
ecloud compute app stop <APP_ID>
|
|
140
|
+
ecloud compute app upgrade <APP_ID>
|
|
381
141
|
```
|
|
382
142
|
|
|
383
|
-
|
|
143
|
+
### Terminate (interactive confirm — pipe "y")
|
|
384
144
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
| `getTopAVSByAPY(limit)` | Best yield AVS |
|
|
389
|
-
| `getOperatorRewards(address)` | Reward strategies for an operator |
|
|
390
|
-
| `getStakerRewards(address)` | Rewards earned by a staker |
|
|
391
|
-
| `getAVSRewards(address)` | Rewards distributed by an AVS |
|
|
145
|
+
```bash
|
|
146
|
+
echo "y" | ecloud compute app terminate <APP_ID>
|
|
147
|
+
```
|
|
392
148
|
|
|
393
149
|
---
|
|
394
150
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
🤝 **Query delegation relationships**
|
|
151
|
+
## Sealed Secrets
|
|
398
152
|
|
|
153
|
+
```bash
|
|
154
|
+
ecloud compute app env set MY_SECRET="value" API_KEY="key"
|
|
399
155
|
```
|
|
400
|
-
Staker ──delegates──▶ Operator ──registers──▶ AVS
|
|
401
|
-
│ │
|
|
402
|
-
└── withdrawals └── operator-sets
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
**Key endpoints:**
|
|
406
156
|
|
|
407
|
-
|
|
408
|
-
|--------|------|
|
|
409
|
-
| `getTopDelegatedOperators(limit)` | Most delegated by staker count |
|
|
410
|
-
| `getTopOperatorsByTVL(limit)` | Most capital delegated |
|
|
411
|
-
| `getOperatorDelegation(address)` | Operator's full delegation profile |
|
|
412
|
-
| `getOperatorStakers(address)` | Stakers delegating to an operator |
|
|
413
|
-
| `getStakerDelegation(address)` | Which operator a staker is delegated to |
|
|
414
|
-
| `getDelegationEvents()` | Recent delegation/undelegation events |
|
|
415
|
-
| `getOperatorSets()` | Operator-sets (slashing-era model) |
|
|
157
|
+
Secrets are encrypted and only decryptable inside the TEE via KMS attestation. At boot, `compute-source-env.sh` fetches them and writes to `/tmp/.env`.
|
|
416
158
|
|
|
417
159
|
---
|
|
418
160
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
🔒 **Deploy and manage TEE applications**
|
|
161
|
+
## TEE Internals
|
|
422
162
|
|
|
423
163
|
```
|
|
424
164
|
┌─────────────────────────────────────────┐
|
|
@@ -431,7 +171,6 @@ Staker ──delegates──▶ Operator ──registers──▶ AVS
|
|
|
431
171
|
│ │ • Encrypted memory │ │
|
|
432
172
|
│ │ • Sealed secrets │ │
|
|
433
173
|
│ │ • KMS signing key │ │
|
|
434
|
-
│ │ • Unique wallet identity │ │
|
|
435
174
|
│ │ • Cryptographic attestation │ │
|
|
436
175
|
│ └─────────────────────────────────┘ │
|
|
437
176
|
│ │
|
|
@@ -442,314 +181,36 @@ Staker ──delegates──▶ Operator ──registers──▶ AVS
|
|
|
442
181
|
└─────────────────────────────────────────┘
|
|
443
182
|
```
|
|
444
183
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
▼
|
|
451
|
-
ecloud compute app deploy ← builds Dockerfile in TEE
|
|
452
|
-
│
|
|
453
|
-
▼
|
|
454
|
-
ecloud compute app list ← check status + IP
|
|
455
|
-
│
|
|
456
|
-
▼
|
|
457
|
-
ecloud compute app logs <id> ← view logs
|
|
458
|
-
│
|
|
459
|
-
▼
|
|
460
|
-
ecloud compute app stop <id> ← pause
|
|
461
|
-
│
|
|
462
|
-
▼
|
|
463
|
-
ecloud compute app terminate <id> ← permanent destroy
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
**Key methods:**
|
|
467
|
-
|
|
468
|
-
| Method | What |
|
|
469
|
-
|--------|------|
|
|
470
|
-
| `whoami()` | Check authenticated address |
|
|
471
|
-
| `listApps()` | List all deployed apps |
|
|
472
|
-
| `getAppInfo(id)` | App status and details |
|
|
473
|
-
| `getAppLogs(id)` | View app logs |
|
|
474
|
-
| `startApp(id)` / `stopApp(id)` | Lifecycle control |
|
|
475
|
-
| `collectAttestation()` | Gather TEE attestation data |
|
|
476
|
-
| `computeConfigHash(files)` | Hash config files for integrity proof |
|
|
477
|
-
|
|
478
|
-
**Known issues:** See [Troubleshooting](#troubleshooting).
|
|
479
|
-
|
|
480
|
-
---
|
|
481
|
-
|
|
482
|
-
### eigen-da
|
|
483
|
-
|
|
484
|
-
📦 **Store and retrieve data blobs**
|
|
485
|
-
|
|
486
|
-
```
|
|
487
|
-
Your App ──POST /put──▶ EigenDA Proxy ──disperse──▶ EigenDA Network
|
|
488
|
-
│ │
|
|
489
|
-
commitment KZG commitment
|
|
490
|
-
│ stored on-chain
|
|
491
|
-
▼
|
|
492
|
-
┌──────────┐
|
|
493
|
-
│ Explorer │
|
|
494
|
-
│ blobs- │
|
|
495
|
-
│ sepolia. │
|
|
496
|
-
│eigenda. │
|
|
497
|
-
│ xyz │
|
|
498
|
-
└──────────┘
|
|
499
|
-
|
|
500
|
-
Your App ──GET /get/X──▶ EigenDA Proxy ──retrieve──▶ EigenDA Network
|
|
501
|
-
│
|
|
502
|
-
original data
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
**Proxy endpoints:**
|
|
506
|
-
|
|
507
|
-
| Endpoint | Method | What |
|
|
508
|
-
|----------|--------|------|
|
|
509
|
-
| `/put?commitment_mode=standard` | POST | Store a blob, returns commitment |
|
|
510
|
-
| `/get/<commitment>?commitment_mode=standard` | GET | Retrieve a blob by commitment |
|
|
511
|
-
| `/health` | GET | Proxy health check |
|
|
512
|
-
|
|
513
|
-
**Key methods:**
|
|
184
|
+
| Path | What |
|
|
185
|
+
|------|------|
|
|
186
|
+
| `/usr/local/bin/compute-source-env.sh` | Entrypoint — fetches secrets, then runs your CMD |
|
|
187
|
+
| `/usr/local/bin/kms-signing-public-key.pem` | KMS signing public key |
|
|
188
|
+
| `/usr/local/bin/kms-client` | KMS client binary |
|
|
514
189
|
|
|
515
|
-
|
|
516
|
-
|--------|------|
|
|
517
|
-
| `store(data)` | Store JSON on EigenDA, returns commitment |
|
|
518
|
-
| `retrieve(commitment)` | Retrieve JSON by commitment |
|
|
519
|
-
| `getExplorerUrl(commitment)` | Get blob explorer URL |
|
|
520
|
-
| `healthCheck()` | Check proxy availability |
|
|
521
|
-
|
|
522
|
-
**Networks:**
|
|
523
|
-
|
|
524
|
-
| Network | Disperser RPC | Service Manager |
|
|
525
|
-
|---------|---------------|-----------------|
|
|
526
|
-
| Sepolia | `disperser-sepolia.eigenda.xyz:443` | `0xD4A7E1Bd8015057293f0D0A557088c286942e84b` |
|
|
527
|
-
| Mainnet | `disperser.eigenda.xyz:443` | See EigenLayer docs |
|
|
528
|
-
|
|
529
|
-
### EigenDA Proxy Setup
|
|
530
|
-
|
|
531
|
-
```bash
|
|
532
|
-
docker run -d \
|
|
533
|
-
--name eigenda-proxy \
|
|
534
|
-
-p 3100:3100 \
|
|
535
|
-
ghcr.io/layr-labs/eigenda-proxy:latest \
|
|
536
|
-
--eigenda.disperser-rpc=disperser-sepolia.eigenda.xyz:443 \
|
|
537
|
-
--eigenda.service-manager-addr=0xD4A7E1Bd8015057293f0D0A557088c286942e84b \
|
|
538
|
-
--eigenda.eth-rpc=YOUR_SEPOLIA_RPC_URL \
|
|
539
|
-
--eigenda.status-query-timeout=45s \
|
|
540
|
-
--eigenda.signer-private-key-hex=YOUR_PRIVATE_KEY \
|
|
541
|
-
--memstore.enabled=false \
|
|
542
|
-
--eigenda.disable-tls=false
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
---
|
|
546
|
-
|
|
547
|
-
## API Reference
|
|
548
|
-
|
|
549
|
-
### Constructor Options
|
|
550
|
-
|
|
551
|
-
#### EigenAPI / AVSAPI / RewardsAPI / DelegationAPI
|
|
552
|
-
|
|
553
|
-
```javascript
|
|
554
|
-
new EigenAPI(apiKey, { network: 'mainnet' | 'holesky' })
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
| Param | Type | Default | Description |
|
|
558
|
-
|-------|------|---------|-------------|
|
|
559
|
-
| `apiKey` | string | **required** | EigenExplorer API key |
|
|
560
|
-
| `network` | string | `'mainnet'` | `'mainnet'` or `'holesky'` |
|
|
561
|
-
|
|
562
|
-
#### EigenDA
|
|
563
|
-
|
|
564
|
-
```javascript
|
|
565
|
-
new EigenDA({ proxyUrl, commitmentMode, timeout })
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
| Param | Type | Default | Description |
|
|
569
|
-
|-------|------|---------|-------------|
|
|
570
|
-
| `proxyUrl` | string | `'http://127.0.0.1:3100'` | EigenDA proxy URL |
|
|
571
|
-
| `commitmentMode` | string | `'standard'` | `'standard'` or `'optimistic'` |
|
|
572
|
-
| `timeout` | number | `60000` | Request timeout in ms |
|
|
573
|
-
|
|
574
|
-
#### EigenCompute
|
|
575
|
-
|
|
576
|
-
```javascript
|
|
577
|
-
new EigenCompute() // No args — wraps ecloud CLI
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
### Pagination
|
|
581
|
-
|
|
582
|
-
All list endpoints support pagination:
|
|
583
|
-
|
|
584
|
-
```javascript
|
|
585
|
-
const results = await eigen.getOperators({
|
|
586
|
-
skip: 0, // offset
|
|
587
|
-
take: 12, // page size (default: 12)
|
|
588
|
-
sortByTvl: 'desc',
|
|
589
|
-
});
|
|
590
|
-
|
|
591
|
-
console.log(results.meta.total); // total records
|
|
592
|
-
console.log(results.meta.skip); // current offset
|
|
593
|
-
console.log(results.meta.take); // page size
|
|
594
|
-
```
|
|
595
|
-
|
|
596
|
-
### Sorting Options
|
|
597
|
-
|
|
598
|
-
| Parameter | Valid Values | Available On |
|
|
599
|
-
|-----------|-------------|-------------|
|
|
600
|
-
| `sortByTvl` | `'asc'` / `'desc'` | Operators, AVS |
|
|
601
|
-
| `sortByApy` | `'asc'` / `'desc'` | Operators, AVS |
|
|
602
|
-
| `sortByTotalStakers` | `'asc'` / `'desc'` | Operators, AVS |
|
|
603
|
-
| `sortByTotalAvs` | `'asc'` / `'desc'` | Operators |
|
|
604
|
-
| `searchByText` | any string | Operators, AVS |
|
|
605
|
-
| `withTvl` | `true` / `false` | Operators, AVS |
|
|
606
|
-
|
|
607
|
-
---
|
|
608
|
-
|
|
609
|
-
## Environment Variables
|
|
610
|
-
|
|
611
|
-
| Variable | Required For | Description |
|
|
612
|
-
|----------|-------------|-------------|
|
|
613
|
-
| `EIGEN_API_KEY` | Data skills | EigenExplorer API key |
|
|
614
|
-
| `EIGENDA_PROXY_URL` | eigen-da | Proxy URL (default: `http://127.0.0.1:3100`) |
|
|
615
|
-
| `EIGENDA_COMMITMENT_MODE` | eigen-da | `standard` or `optimistic` |
|
|
616
|
-
| `EIGENDA_TIMEOUT` | eigen-da | Timeout in ms (default: `60000`) |
|
|
617
|
-
| `ECLOUD_APP_ID` | eigen-compute | Auto-set inside TEE |
|
|
618
|
-
|
|
619
|
-
---
|
|
620
|
-
|
|
621
|
-
## Demo
|
|
622
|
-
|
|
623
|
-
Run the interactive demo to verify all data skills work:
|
|
624
|
-
|
|
625
|
-
```bash
|
|
626
|
-
EIGEN_API_KEY=your_key npm run demo
|
|
627
|
-
```
|
|
628
|
-
|
|
629
|
-
Sample output:
|
|
630
|
-
```
|
|
631
|
-
🔄 Eigen Agent Skills — Demo
|
|
632
|
-
|
|
633
|
-
📡 Health check...
|
|
634
|
-
Status: ✅ Healthy
|
|
635
|
-
EigenLayer TVL: 4,754,266
|
|
636
|
-
|
|
637
|
-
👥 Top 5 Operators by TVL:
|
|
638
|
-
1. EigenYields — Stakers: 25,700 — AVS: 32
|
|
639
|
-
2. AltLayer — Stakers: 21,826 — AVS: 14
|
|
640
|
-
3. InfStones — Stakers: 21,617 — AVS: 11
|
|
641
|
-
|
|
642
|
-
🛡️ Top 5 AVS:
|
|
643
|
-
1. Brevis coChain AVS
|
|
644
|
-
2. DIN
|
|
645
|
-
3. Renzo wBTC DVN
|
|
646
|
-
|
|
647
|
-
💰 Top 5 by APY:
|
|
648
|
-
1. EigenYields — APY: 484.3%
|
|
649
|
-
2. Nodes.Guru — APY: 484.3%
|
|
650
|
-
|
|
651
|
-
✅ All skills working!
|
|
652
|
-
```
|
|
190
|
+
Verify your app: `https://verify-sepolia.eigencloud.xyz/app/<APP_ID>`
|
|
653
191
|
|
|
654
192
|
---
|
|
655
193
|
|
|
656
194
|
## Troubleshooting
|
|
657
195
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
|
661
|
-
|
|
662
|
-
| `
|
|
663
|
-
|
|
|
664
|
-
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
| Issue | Fix |
|
|
669
|
-
|-------|-----|
|
|
670
|
-
| `ecloud: command not found` | Run `npm install -g @layr-labs/ecloud-cli` |
|
|
671
|
-
| App stuck in `Status: Unknown` | Use "Build from Dockerfile" method instead of "Deploy from registry" |
|
|
672
|
-
| `app logs` returns 403 | Known issue — add HTTP logging endpoint in your app as workaround |
|
|
673
|
-
| 429 rate limiting after deploy | Wait 30-60 seconds before running `app list` or `app info` |
|
|
674
|
-
| IP changes on every deploy | No static IP available — use DNS/webhook updates in your entrypoint |
|
|
675
|
-
|
|
676
|
-
### EigenDA
|
|
677
|
-
|
|
678
|
-
| Issue | Fix |
|
|
679
|
-
|-------|-----|
|
|
680
|
-
| `ECONNREFUSED 127.0.0.1:3100` | Start the EigenDA proxy Docker container |
|
|
681
|
-
| Store timeout | Increase `EIGENDA_TIMEOUT` — dispersal can take 30-60s |
|
|
682
|
-
| Invalid commitment | Ensure `commitment_mode` matches between store and retrieve |
|
|
196
|
+
| Symptom | Cause | Fix |
|
|
197
|
+
|---------|-------|-----|
|
|
198
|
+
| `no ITA verifier client present` | CLI too old (< v0.4.3) | `sudo npm install -g @layr-labs/ecloud-cli@latest` |
|
|
199
|
+
| `failed to quote: error code 0x15` | CLI too old or flaky Shielded VM | Update CLI, use `g1-standard-4t` |
|
|
200
|
+
| `No space left on device` during layering | Docker disk full | `docker system prune -f && docker builder prune -f` |
|
|
201
|
+
| "Choose deployment method" prompt hangs | Dockerfile present in deploy dir | `rm -f Dockerfile` before deploying |
|
|
202
|
+
| App "Running" but port refuses connections | Attestation failed, app never started | Check `ecloud compute app logs <APP_ID>` |
|
|
203
|
+
| IP changes on every deploy | Expected behavior | Don't hardcode IPs |
|
|
204
|
+
| App ID changes on terminate + redeploy | Expected behavior | No persistent identity across deploys |
|
|
683
205
|
|
|
684
206
|
---
|
|
685
207
|
|
|
686
|
-
##
|
|
208
|
+
## Scaffold a New App (Optional)
|
|
687
209
|
|
|
210
|
+
```bash
|
|
211
|
+
ecloud compute app create --name my-app --language typescript --template-repo minimal
|
|
212
|
+
# Languages: typescript, python, golang, rust
|
|
688
213
|
```
|
|
689
|
-
eigen-skills/
|
|
690
|
-
├── package.json # npm package with "agents" field
|
|
691
|
-
├── index.js # programmatic entry point (all 6 modules)
|
|
692
|
-
├── README.md # this file
|
|
693
|
-
├── .gitignore
|
|
694
|
-
├── .npmignore
|
|
695
|
-
├── scripts/
|
|
696
|
-
│ └── demo.js # interactive demo
|
|
697
|
-
└── skills/
|
|
698
|
-
├── eigen-restaking/ # 🔄 Operators, TVL, stakers
|
|
699
|
-
│ ├── SKILL.md # agent instructions
|
|
700
|
-
│ └── scripts/
|
|
701
|
-
│ └── eigen-api.js # JS API client
|
|
702
|
-
│
|
|
703
|
-
├── eigen-avs/ # 🛡️ Actively Validated Services
|
|
704
|
-
│ ├── SKILL.md
|
|
705
|
-
│ └── scripts/
|
|
706
|
-
│ └── avs-api.js
|
|
707
|
-
│
|
|
708
|
-
├── eigen-rewards/ # 💰 Rewards & APY
|
|
709
|
-
│ ├── SKILL.md
|
|
710
|
-
│ └── scripts/
|
|
711
|
-
│ └── rewards-api.js
|
|
712
|
-
│
|
|
713
|
-
├── eigen-delegation/ # 🤝 Delegation & operator-sets
|
|
714
|
-
│ ├── SKILL.md
|
|
715
|
-
│ └── scripts/
|
|
716
|
-
│ └── delegation-api.js
|
|
717
|
-
│
|
|
718
|
-
├── eigen-compute/ # 🔒 TEE deployment & attestation
|
|
719
|
-
│ ├── SKILL.md
|
|
720
|
-
│ └── scripts/
|
|
721
|
-
│ └── compute-api.js
|
|
722
|
-
│
|
|
723
|
-
└── eigen-da/ # 📦 Blob storage & data availability
|
|
724
|
-
├── SKILL.md
|
|
725
|
-
└── scripts/
|
|
726
|
-
└── da-api.js
|
|
727
|
-
```
|
|
728
|
-
|
|
729
|
-
---
|
|
730
|
-
|
|
731
|
-
## How It Compares
|
|
732
|
-
|
|
733
|
-
| Feature | eigen-skills | Manual curl | Custom SDK |
|
|
734
|
-
|---------|-------------|-------------|------------|
|
|
735
|
-
| Agent-compatible | ✅ SKILL.md standard | ❌ | ❌ |
|
|
736
|
-
| Zero config | ✅ just add API key | ✅ | ❌ needs setup |
|
|
737
|
-
| Covers restaking data | ✅ | ✅ manual | ✅ |
|
|
738
|
-
| Covers TEE compute | ✅ | ❌ need CLI | ❌ |
|
|
739
|
-
| Covers data availability | ✅ | ✅ manual | ❌ |
|
|
740
|
-
| Programmatic JS API | ✅ | ❌ | ✅ |
|
|
741
|
-
| Works with Claude/OpenClaw | ✅ auto-discovered | ❌ | ❌ |
|
|
742
|
-
|
|
743
|
-
---
|
|
744
|
-
|
|
745
|
-
## Contributing
|
|
746
|
-
|
|
747
|
-
1. Fork the repo
|
|
748
|
-
2. Create a new skill directory under `skills/`
|
|
749
|
-
3. Add a `SKILL.md` following the [Agent Skills spec](https://github.com/anthropics/skills)
|
|
750
|
-
4. Add scripts in `scripts/` for programmatic use
|
|
751
|
-
5. Update `index.js` to export the new module
|
|
752
|
-
6. PR it
|
|
753
214
|
|
|
754
215
|
---
|
|
755
216
|
|
|
@@ -760,5 +221,5 @@ MIT
|
|
|
760
221
|
---
|
|
761
222
|
|
|
762
223
|
<p align="center">
|
|
763
|
-
Built
|
|
224
|
+
Built for <a href="https://eigencloud.xyz">EigenCompute</a> TEE
|
|
764
225
|
</p>
|