starkfi 0.3.0 → 0.3.2
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/MCP.md +7 -7
- package/README.md +67 -66
- package/dist/commands/config/config.js +1 -1
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/brand.d.ts +5 -0
- package/dist/lib/brand.d.ts.map +1 -0
- package/dist/lib/brand.js +15 -0
- package/dist/lib/brand.js.map +1 -0
- package/dist/lib/format.d.ts.map +1 -1
- package/dist/lib/format.js +1 -4
- package/dist/lib/format.js.map +1 -1
- package/dist/services/staking/validators.d.ts +1 -2
- package/dist/services/staking/validators.d.ts.map +1 -1
- package/dist/services/staking/validators.js.map +1 -1
- package/package.json +6 -4
- package/scripts/patch-esm.mjs +151 -0
- package/skills/README.md +1 -1
- package/skills/balance/SKILL.md +1 -1
- package/skills/batch/SKILL.md +6 -6
- package/skills/config/SKILL.md +1 -1
- package/skills/multi-swap/SKILL.md +1 -1
- package/skills/portfolio/SKILL.md +1 -1
- package/skills/send/SKILL.md +1 -1
- package/skills/staking/SKILL.md +9 -9
- package/skills/trade/SKILL.md +1 -1
package/MCP.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Model Context Protocol (MCP) Integration
|
|
2
2
|
|
|
3
|
-
StarkFi operates as a fully-featured Model Context Protocol (MCP) server. By executing `npx starkfi mcp-start` over the `stdio` transport layer, AI development environments such as Cursor, Claude Desktop, and Antigravity can interact with the Starknet blockchain and execute decentralized finance operations through natural language commands.
|
|
3
|
+
StarkFi operates as a fully-featured Model Context Protocol (MCP) server. By executing `npx starkfi@latest mcp-start` over the `stdio` transport layer, AI development environments such as Cursor, Claude Desktop, and Antigravity can interact with the Starknet blockchain and execute decentralized finance operations through natural language commands.
|
|
4
4
|
|
|
5
5
|
## Client Configuration
|
|
6
6
|
|
|
@@ -11,13 +11,13 @@ To integrate StarkFi into your AI environment, configure your MCP client setting
|
|
|
11
11
|
"mcpServers": {
|
|
12
12
|
"starkfi": {
|
|
13
13
|
"command": "npx",
|
|
14
|
-
"args": ["-y", "starkfi", "mcp-start"]
|
|
14
|
+
"args": ["-y", "starkfi@latest", "mcp-start"]
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
**Authentication Requirement:** The StarkFi CLI must be authenticated locally (via `npx starkfi auth login`) before the MCP server can execute any state-mutating transactions on behalf of the user.
|
|
20
|
+
**Authentication Requirement:** The StarkFi CLI must be authenticated locally (via `npx starkfi@latest auth login`) before the MCP server can execute any state-mutating transactions on behalf of the user.
|
|
21
21
|
|
|
22
22
|
## Tool Registry
|
|
23
23
|
|
|
@@ -276,10 +276,10 @@ Atomically closes an active Vesu V2 lending position. Repays all outstanding deb
|
|
|
276
276
|
|
|
277
277
|
Views and modifies global CLI behavior: RPC routing, network selection, and Gas Abstraction.
|
|
278
278
|
|
|
279
|
-
| Parameter | Type | Required | Description
|
|
280
|
-
| --------- | ------ | -------- |
|
|
281
|
-
| `action` | enum | **Yes** | One of: `list`, `set-rpc`, `get-rpc`, `set-network`, `set-gasfree`, `set-gas-token`
|
|
282
|
-
| `value` | string | No | `set-gasfree`: `on`/`off`. `set-gas-token`: symbol (`USDC`, `ETH`) or `
|
|
279
|
+
| Parameter | Type | Required | Description |
|
|
280
|
+
| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
281
|
+
| `action` | enum | **Yes** | One of: `list`, `set-rpc`, `get-rpc`, `set-network`, `set-gasfree`, `set-gas-token` |
|
|
282
|
+
| `value` | string | No | `set-gasfree`: `on`/`off`. `set-gas-token`: symbol (`USDC`, `ETH`) or `reset`. `set-rpc`: URL string. `set-network`: `mainnet`/`sepolia`. |
|
|
283
283
|
|
|
284
284
|
---
|
|
285
285
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://starkfi.app">
|
|
3
|
-
<img src="
|
|
3
|
+
<img src="landing/favicon.svg" alt="StarkFi Logo" width="100" height="100"/>
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npx starkfi --help
|
|
16
|
+
npx starkfi@latest --help
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
---
|
|
@@ -33,35 +33,36 @@ Most DeFi tools are built for humans clicking buttons. StarkFi is built for **ag
|
|
|
33
33
|
## Architecture
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
|
|
37
|
-
│
|
|
38
|
-
│
|
|
39
|
-
│
|
|
40
|
-
│ │ CLI
|
|
41
|
-
│ │
|
|
42
|
-
│
|
|
43
|
-
│
|
|
44
|
-
│
|
|
45
|
-
│
|
|
46
|
-
│
|
|
47
|
-
│
|
|
48
|
-
│ │
|
|
49
|
-
│ │
|
|
50
|
-
│ │ │ Fibrous
|
|
51
|
-
│ │ │ Swap
|
|
52
|
-
│ │
|
|
53
|
-
│ │ │
|
|
54
|
-
│ │
|
|
55
|
-
│ │
|
|
56
|
-
│ │
|
|
57
|
-
│ │
|
|
58
|
-
│
|
|
59
|
-
│
|
|
60
|
-
│
|
|
61
|
-
│
|
|
62
|
-
│ │
|
|
63
|
-
│
|
|
64
|
-
|
|
36
|
+
┌──────────────────────────────────────────────────────────────────────────┐
|
|
37
|
+
│ StarkFi │
|
|
38
|
+
│ │
|
|
39
|
+
│ ┌──────────┐ ┌─────────────────────┐ ┌───────────────────────┐ │
|
|
40
|
+
│ │ CLI │ │ MCP Server │ │ Agent Skills │ │
|
|
41
|
+
│ │ (30+ │ │ (27 tools) │ │ (10 workflows) │ │
|
|
42
|
+
│ │ commands)│ │ stdio transport │ │ npx starkfi@latest │ │
|
|
43
|
+
│ └────┬─────┘ └──────────┬──────────┘ └──────────┬────────────┘ │
|
|
44
|
+
│ │ │ │ │
|
|
45
|
+
│ └──────────────────────┼───────────────────────────┘ │
|
|
46
|
+
│ ▼ │
|
|
47
|
+
│ ┌──────────────────────────────────────────────────────────────────┐ │
|
|
48
|
+
│ │ Service Layer │ │
|
|
49
|
+
│ │ ┌──────────┐ ┌──────────┐ ┌────────┐ ┌──────────┐ │ │
|
|
50
|
+
│ │ │ Fibrous │ │ Staking │ │ Vesu │ │ Batch │ │ │
|
|
51
|
+
│ │ │ Swap │ │ Lifecycle│ │ V2 │ │ Multicall│ │ │
|
|
52
|
+
│ │ └────┬─────┘ └────┬─────┘ └───┬────┘ └────┬─────┘ │ │
|
|
53
|
+
│ │ └─────────────┴────────────┴────────────┘ │ │
|
|
54
|
+
│ │ │ │ │
|
|
55
|
+
│ │ ┌───────────────┴───────────────────────────┐ │ │
|
|
56
|
+
│ │ │ Starkzap SDK (starkzap v1.0.0) │ │ │
|
|
57
|
+
│ │ │ Wallet · TxBuilder · Tokens · Paymaster │ │ │
|
|
58
|
+
│ │ └───────────────┬───────────────────────────┘ │ │
|
|
59
|
+
│ └───────────────────────┼──────────────────────────────────────────┘ │
|
|
60
|
+
│ ▼ │
|
|
61
|
+
│ ┌──────────────────────────────────────┐ ┌──────────────────────┐ │
|
|
62
|
+
│ │ Auth Server (Hono + Privy TEE) │ │ AVNU Paymaster │ │
|
|
63
|
+
│ │ Email OTP · Wallet · Sign · Gas │ │ Gas Abstraction │ │
|
|
64
|
+
│ └──────────────────────────────────────┘ └──────────────────────┘ │
|
|
65
|
+
└──────────────────────────────────────────────────────────────────────────┘
|
|
65
66
|
│
|
|
66
67
|
▼
|
|
67
68
|
┌──────────────────┐
|
|
@@ -92,8 +93,8 @@ StarkFi leverages **all core Starkzap modules**:
|
|
|
92
93
|
DEX-aggregated swaps with optimal routing. Single swaps, multi-swap (up to 3 pairs), and batch routing.
|
|
93
94
|
|
|
94
95
|
```bash
|
|
95
|
-
npx starkfi trade 100 USDC ETH --slippage 1
|
|
96
|
-
npx starkfi multi-swap "100 USDC>ETH, 50 USDT>ETH"
|
|
96
|
+
npx starkfi@latest trade 100 USDC ETH --slippage 1
|
|
97
|
+
npx starkfi@latest multi-swap "100 USDC>ETH, 50 USDT>ETH"
|
|
97
98
|
```
|
|
98
99
|
|
|
99
100
|
### ⚛️ Atomic Transaction Batching
|
|
@@ -101,7 +102,7 @@ npx starkfi multi-swap "100 USDC>ETH, 50 USDT>ETH"
|
|
|
101
102
|
Bundle multiple DeFi operations into a single Starknet multicall. Minimum 2 operations.
|
|
102
103
|
|
|
103
104
|
```bash
|
|
104
|
-
npx starkfi batch \
|
|
105
|
+
npx starkfi@latest batch \
|
|
105
106
|
--swap "100 USDC ETH" \
|
|
106
107
|
--stake "50 STRK karnot" \
|
|
107
108
|
--supply "200 USDC Prime" \
|
|
@@ -113,10 +114,10 @@ npx starkfi batch \
|
|
|
113
114
|
Full staking lifecycle across multiple validators with STRK, WBTC, tBTC, SolvBTC, and LBTC support.
|
|
114
115
|
|
|
115
116
|
```bash
|
|
116
|
-
npx starkfi stake 100 -v karnot
|
|
117
|
-
npx starkfi rewards -v karnot --compound
|
|
118
|
-
npx starkfi unstake intent -v karnot -a 50
|
|
119
|
-
npx starkfi unstake exit -v karnot
|
|
117
|
+
npx starkfi@latest stake 100 -v karnot
|
|
118
|
+
npx starkfi@latest rewards -v karnot --compound
|
|
119
|
+
npx starkfi@latest unstake intent -v karnot -a 50
|
|
120
|
+
npx starkfi@latest unstake exit -v karnot
|
|
120
121
|
```
|
|
121
122
|
|
|
122
123
|
### 🏦 Lending & Borrowing (Vesu V2)
|
|
@@ -124,12 +125,12 @@ npx starkfi unstake exit -v karnot
|
|
|
124
125
|
Supply collateral, borrow assets, monitor health factors, and atomically close positions.
|
|
125
126
|
|
|
126
127
|
```bash
|
|
127
|
-
npx starkfi lend-supply 100 -p Prime -t STRK
|
|
128
|
-
npx starkfi lend-borrow -p Prime \
|
|
128
|
+
npx starkfi@latest lend-supply 100 -p Prime -t STRK
|
|
129
|
+
npx starkfi@latest lend-borrow -p Prime \
|
|
129
130
|
--collateral-amount 200 --collateral-token STRK \
|
|
130
131
|
--borrow-amount 50 --borrow-token USDC
|
|
131
|
-
npx starkfi lend-status -p Prime --collateral-token STRK --borrow-token USDC
|
|
132
|
-
npx starkfi lend-close -p Prime --collateral-token STRK --borrow-token USDC
|
|
132
|
+
npx starkfi@latest lend-status -p Prime --collateral-token STRK --borrow-token USDC
|
|
133
|
+
npx starkfi@latest lend-close -p Prime --collateral-token STRK --borrow-token USDC
|
|
133
134
|
```
|
|
134
135
|
|
|
135
136
|
### 💸 Gas Abstraction
|
|
@@ -138,10 +139,10 @@ All transactions are gasless by default. Users pay gas fees in their preferred E
|
|
|
138
139
|
|
|
139
140
|
```bash
|
|
140
141
|
# Pay gas in USDC instead of STRK
|
|
141
|
-
npx starkfi config set-gas-token USDC
|
|
142
|
+
npx starkfi@latest config set-gas-token USDC
|
|
142
143
|
|
|
143
144
|
# Developer pays all gas (gasfree mode)
|
|
144
|
-
npx starkfi config set-gasfree on
|
|
145
|
+
npx starkfi@latest config set-gasfree on
|
|
145
146
|
```
|
|
146
147
|
|
|
147
148
|
| Mode | Who Pays | Gas Tokens | Description |
|
|
@@ -154,7 +155,7 @@ npx starkfi config set-gasfree on
|
|
|
154
155
|
Estimate fees and validate any transaction before broadcasting.
|
|
155
156
|
|
|
156
157
|
```bash
|
|
157
|
-
npx starkfi trade 100 USDC ETH --simulate
|
|
158
|
+
npx starkfi@latest trade 100 USDC ETH --simulate
|
|
158
159
|
# → mode: SIMULATION, estimatedFee: 0.000142 ETH ($0.52), callCount: 4
|
|
159
160
|
```
|
|
160
161
|
|
|
@@ -163,7 +164,7 @@ npx starkfi trade 100 USDC ETH --simulate
|
|
|
163
164
|
Consolidated view of all DeFi positions in one call.
|
|
164
165
|
|
|
165
166
|
```bash
|
|
166
|
-
npx starkfi portfolio
|
|
167
|
+
npx starkfi@latest portfolio
|
|
167
168
|
# → Token Balances (USD), Staking Positions, Lending Positions, Total Value
|
|
168
169
|
```
|
|
169
170
|
|
|
@@ -175,7 +176,7 @@ StarkFi exposes **27 MCP tools** via stdio transport, enabling AI assistants to
|
|
|
175
176
|
|
|
176
177
|
```bash
|
|
177
178
|
# Start the MCP server
|
|
178
|
-
npx starkfi mcp-start
|
|
179
|
+
npx starkfi@latest mcp-start
|
|
179
180
|
```
|
|
180
181
|
|
|
181
182
|
### Tool Categories
|
|
@@ -208,13 +209,13 @@ Add to your AI assistant's MCP config (Cursor, Claude, etc.):
|
|
|
208
209
|
"mcpServers": {
|
|
209
210
|
"starkfi": {
|
|
210
211
|
"command": "npx",
|
|
211
|
-
"args": ["-y", "starkfi", "mcp-start"]
|
|
212
|
+
"args": ["-y", "starkfi@latest", "mcp-start"]
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
216
|
```
|
|
216
217
|
|
|
217
|
-
For the complete tool registry and schemas, see [MCP Documentation](
|
|
218
|
+
For the complete tool registry and schemas, see [MCP Documentation](https://docs.starkfi.app/docs/mcp).
|
|
218
219
|
|
|
219
220
|
---
|
|
220
221
|
|
|
@@ -234,7 +235,7 @@ StarkFi ships with **10 agent skills** — structured instruction sets that teac
|
|
|
234
235
|
npx skills add ahmetenesdur/starkfi
|
|
235
236
|
```
|
|
236
237
|
|
|
237
|
-
See [Skills Documentation](skills
|
|
238
|
+
See [Skills Documentation](https://docs.starkfi.app/docs/skills) for details.
|
|
238
239
|
|
|
239
240
|
---
|
|
240
241
|
|
|
@@ -248,27 +249,27 @@ See [Skills Documentation](skills/README.md) for details.
|
|
|
248
249
|
### 1. Authenticate
|
|
249
250
|
|
|
250
251
|
```bash
|
|
251
|
-
npx starkfi auth login user@example.com
|
|
252
|
-
npx starkfi auth verify user@example.com <OTP_CODE>
|
|
252
|
+
npx starkfi@latest auth login user@example.com
|
|
253
|
+
npx starkfi@latest auth verify user@example.com <OTP_CODE>
|
|
253
254
|
```
|
|
254
255
|
|
|
255
256
|
### 2. Deploy Account
|
|
256
257
|
|
|
257
258
|
```bash
|
|
258
|
-
npx starkfi deploy
|
|
259
|
+
npx starkfi@latest deploy
|
|
259
260
|
```
|
|
260
261
|
|
|
261
262
|
### 3. Check Balance
|
|
262
263
|
|
|
263
264
|
```bash
|
|
264
|
-
npx starkfi balance
|
|
265
|
+
npx starkfi@latest balance
|
|
265
266
|
```
|
|
266
267
|
|
|
267
268
|
### 4. Start Trading
|
|
268
269
|
|
|
269
270
|
```bash
|
|
270
|
-
npx starkfi trade 10 STRK ETH --simulate # Preview first
|
|
271
|
-
npx starkfi trade 10 STRK ETH # Execute
|
|
271
|
+
npx starkfi@latest trade 10 STRK ETH --simulate # Preview first
|
|
272
|
+
npx starkfi@latest trade 10 STRK ETH # Execute
|
|
272
273
|
```
|
|
273
274
|
|
|
274
275
|
---
|
|
@@ -372,7 +373,7 @@ See [`server/README.md`](server/README.md) for setup instructions.
|
|
|
372
373
|
| **CLI** | [Commander.js](https://github.com/tj/commander.js) v14.0.3 |
|
|
373
374
|
| **MCP** | [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/sdk) v1.27.1 |
|
|
374
375
|
| **Schema** | [Zod](https://zod.dev/) v4.3.6 |
|
|
375
|
-
| **Auth Server** | [Hono](https://hono.dev/) v4.12.
|
|
376
|
+
| **Auth Server** | [Hono](https://hono.dev/) v4.12.7 + [Privy TEE](https://privy.io/) |
|
|
376
377
|
| **DEX Routing** | [Fibrous](https://fibrous.finance/) Aggregator |
|
|
377
378
|
| **Lending** | [Vesu](https://vesu.io/) V2 Protocol |
|
|
378
379
|
| **Gas** | [AVNU](https://avnu.fi/) Paymaster |
|
|
@@ -381,16 +382,16 @@ See [`server/README.md`](server/README.md) for setup instructions.
|
|
|
381
382
|
|
|
382
383
|
## Error Handling
|
|
383
384
|
|
|
384
|
-
StarkFi implements a robust error handling system with a custom `StarkfiError` class and **
|
|
385
|
+
StarkFi implements a robust error handling system with a custom `StarkfiError` class and **25 specific error codes** organized by domain:
|
|
385
386
|
|
|
386
|
-
| Domain | Error Codes
|
|
387
|
-
| -------------- |
|
|
388
|
-
| **Auth** | `
|
|
389
|
-
| **Wallet** | `
|
|
390
|
-
| **Network** | `NETWORK_ERROR`, `
|
|
391
|
-
| **Validation** | `
|
|
392
|
-
| **DeFi** | `SWAP_FAILED`, `STAKING_FAILED`, `LENDING_FAILED`, `POOL_NOT_FOUND`
|
|
393
|
-
| **System** | `
|
|
387
|
+
| Domain | Error Codes |
|
|
388
|
+
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
389
|
+
| **Auth** | `AUTH_REQUIRED`, `AUTH_FAILED`, `SESSION_EXPIRED` |
|
|
390
|
+
| **Wallet** | `WALLET_NOT_DEPLOYED`, `WALLET_NOT_FOUND`, `INSUFFICIENT_BALANCE` |
|
|
391
|
+
| **Network** | `NETWORK_ERROR`, `RATE_LIMITED`, `TX_FAILED`, `TX_NOT_FOUND`, `PAYMASTER_ERROR` |
|
|
392
|
+
| **Validation** | `INVALID_CONFIG`, `INVALID_ADDRESS`, `INVALID_AMOUNT` |
|
|
393
|
+
| **DeFi** | `SWAP_FAILED`, `NO_ROUTE_FOUND`, `SLIPPAGE_EXCEEDED`, `STAKING_FAILED`, `LENDING_FAILED`, `POOL_NOT_FOUND`, `EXIT_NOT_READY`, `VALIDATOR_NOT_FOUND` |
|
|
394
|
+
| **System** | `SIMULATION_FAILED`, `BATCH_LIMIT_EXCEEDED`, `UNKNOWN` |
|
|
394
395
|
|
|
395
396
|
All network operations include **automatic retry with exponential backoff** (500ms base, max 2 retries). Parallel operations use a **sliding-window concurrency pool** to prevent RPC rate-limiting.
|
|
396
397
|
|
|
@@ -21,7 +21,7 @@ export function registerConfigCommand(program) {
|
|
|
21
21
|
const configService = ConfigService.getInstance();
|
|
22
22
|
const rpcUrl = configService.get("rpcUrl");
|
|
23
23
|
console.log(formatResult({
|
|
24
|
-
rpcUrl: rpcUrl || "default (
|
|
24
|
+
rpcUrl: rpcUrl || "default (Starkzap preset)",
|
|
25
25
|
}));
|
|
26
26
|
});
|
|
27
27
|
configCmd
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { Command } from "commander";
|
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import { formatError } from "./lib/format.js";
|
|
6
6
|
import { startMcpServer } from "./mcp/server.js";
|
|
7
|
+
import { BLUE, MINT, LOGO_ROW_COLORS } from "./lib/brand.js";
|
|
7
8
|
import { registerLoginCommand } from "./commands/auth/login.js";
|
|
8
9
|
import { registerVerifyCommand } from "./commands/auth/verify.js";
|
|
9
10
|
import { registerLogoutCommand } from "./commands/auth/logout.js";
|
|
@@ -24,11 +25,6 @@ process.on("SIGINT", () => process.exit(0));
|
|
|
24
25
|
process.on("SIGTERM", () => process.exit(0));
|
|
25
26
|
const require = createRequire(import.meta.url);
|
|
26
27
|
const { version } = require("../package.json");
|
|
27
|
-
// Brand palette (matches docs/index.html)
|
|
28
|
-
const BLUE = "#a5b4fc";
|
|
29
|
-
const MINT = "#99f6e4";
|
|
30
|
-
// Blue → mint gradient, one shade per logo row
|
|
31
|
-
const LOGO_ROW_COLORS = ["#a5b4fc", "#adbcfc", "#b5c4fb", "#bdccfb", "#c6d4fa", "#99f6e4"];
|
|
32
28
|
const LOGO_LINES = [
|
|
33
29
|
"███████╗████████╗ █████╗ ██████╗ ██╗ ██╗███████╗██╗",
|
|
34
30
|
"██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║ ██╔╝██╔════╝██║",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,M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|
2
|
+
export declare const MINT = "#99f6e4";
|
|
3
|
+
export declare const SLATE = "#cbd5e1";
|
|
4
|
+
export declare const LOGO_ROW_COLORS: readonly ["#a5b4fc", "#adbcfc", "#b5c4fb", "#bdccfb", "#c6d4fa", "#99f6e4"];
|
|
5
|
+
//# sourceMappingURL=brand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/lib/brand.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,YAAY,CAAC;AAC9B,eAAO,MAAM,IAAI,YAAY,CAAC;AAC9B,eAAO,MAAM,KAAK,YAAY,CAAC;AAG/B,eAAO,MAAM,eAAe,6EAOlB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Single source of truth for CLI brand palette.
|
|
2
|
+
// Used by index.ts (banner) and lib/format.ts (output formatting).
|
|
3
|
+
export const BLUE = "#a5b4fc"; // pastel-blue — indigo-300
|
|
4
|
+
export const MINT = "#99f6e4"; // pastel-mint — teal-200
|
|
5
|
+
export const SLATE = "#cbd5e1"; // slate-300 — table even rows
|
|
6
|
+
// ASCII logo row colors (blue → mint gradient)
|
|
7
|
+
export const LOGO_ROW_COLORS = [
|
|
8
|
+
"#a5b4fc",
|
|
9
|
+
"#adbcfc",
|
|
10
|
+
"#b5c4fb",
|
|
11
|
+
"#bdccfb",
|
|
12
|
+
"#c6d4fa",
|
|
13
|
+
"#99f6e4",
|
|
14
|
+
];
|
|
15
|
+
//# sourceMappingURL=brand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/lib/brand.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,mEAAmE;AAEnE,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,4BAA4B;AAC3D,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,0BAA0B;AACzD,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,gCAAgC;AAEhE,+CAA+C;AAC/C,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;CACA,CAAC"}
|
package/dist/lib/format.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"AAuBA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAmBhG;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGlD;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,CAwBvE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,qCAKzC;AAGD,cAAM,aAAa;IAClB,IAAI,EAAE,MAAM,CAAC;gBACD,WAAW,EAAE,MAAM;IAG/B,KAAK,IAAI,IAAI;IAGb,IAAI,IAAI,IAAI;IAGZ,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIvB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAIvB"}
|
package/dist/lib/format.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import ora from "ora";
|
|
3
|
-
|
|
4
|
-
const BLUE = "#a5b4fc"; // pastel-blue
|
|
5
|
-
const MINT = "#99f6e4"; // pastel-mint
|
|
6
|
-
const SLATE = "#cbd5e1"; // slate-300 — table even rows
|
|
3
|
+
import { BLUE, MINT, SLATE } from "./brand.js";
|
|
7
4
|
function hyperlink(text, url) {
|
|
8
5
|
return `\x1b]8;;${url}\x07${text}\x1b]8;;\x07`;
|
|
9
6
|
}
|
package/dist/lib/format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/lib/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE/C,SAAS,SAAS,CAAC,IAAY,EAAE,GAAW;IAC3C,OAAO,WAAW,GAAG,OAAO,IAAI,cAAc,CAAC;AAChD,CAAC;AAED,sDAAsD;AACtD,SAAS,aAAa,CAAC,GAAW,EAAE,KAAa;IAChD,IAAI,GAAG,KAAK,UAAU;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAClE,IAAI,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxD,IAAI,GAAG,KAAK,cAAc;QAAE,OAAO,KAAK,CAAC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AAK,GAAG,EAAE,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,GAAW;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACzC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAC3B,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;AACvC,CAAC;AAED,4DAA4D;AAC5D,MAAM,aAAa;IAClB,IAAI,CAAS;IACb,YAAY,WAAmB;QAC9B,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IACzB,CAAC;IACD,KAAK;QACJ,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAI;QACH,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,CAAC,GAAW;QAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAI,CAAC,GAAW;QACf,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAI,CAAC,GAAW;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Validator } from "starkzap";
|
|
2
|
-
type Network
|
|
2
|
+
import type { Network } from "../../lib/types.js";
|
|
3
3
|
export declare function getValidators(network: Network): Validator[];
|
|
4
4
|
export declare function findValidator(query: string, network: Network): Validator | null;
|
|
5
|
-
export {};
|
|
6
5
|
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/services/staking/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/services/staking/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,CAG3D;AAGD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAW/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/services/staking/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAkB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/services/staking/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAkB,MAAM,UAAU,CAAC;AAGhF,uDAAuD;AACvD,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC7C,MAAM,OAAO,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAC9E,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,aAAa,CAAC,KAAa,EAAE,OAAgB;IAC5D,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAElC,OAAO,CACN,UAAU,CAAC,IAAI,CACd,CAAC,CAAC,EAAE,EAAE,CACL,CAAC,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,KAAK,KAAK;QAClD,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CACvC,IAAI,IAAI,CACT,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starkfi",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Starknet DeFi CLI + MCP Server — Swaps, multi-swap, batch (multicall), staking, lending, simulation, portfolio, gasless transactions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
18
|
+
"scripts",
|
|
18
19
|
"skills",
|
|
19
20
|
"README.md",
|
|
20
21
|
"MCP.md",
|
|
@@ -30,7 +31,8 @@
|
|
|
30
31
|
"format:check": "prettier --check src/",
|
|
31
32
|
"start": "node dist/index.js",
|
|
32
33
|
"mcp-start": "node dist/index.js mcp-start",
|
|
33
|
-
"prepublishOnly": "pnpm run build"
|
|
34
|
+
"prepublishOnly": "pnpm run build",
|
|
35
|
+
"postinstall": "node scripts/patch-esm.mjs"
|
|
34
36
|
},
|
|
35
37
|
"keywords": [
|
|
36
38
|
"starknet",
|
|
@@ -76,7 +78,7 @@
|
|
|
76
78
|
},
|
|
77
79
|
"devDependencies": {
|
|
78
80
|
"@eslint/js": "^10.0.1",
|
|
79
|
-
"@types/node": "^
|
|
81
|
+
"@types/node": "^25.5.0",
|
|
80
82
|
"eslint": "^10.0.3",
|
|
81
83
|
"eslint-config-prettier": "^10.1.8",
|
|
82
84
|
"globals": "^17.4.0",
|
|
@@ -84,6 +86,6 @@
|
|
|
84
86
|
"prettier": "^3.8.1",
|
|
85
87
|
"tsx": "^4.21.0",
|
|
86
88
|
"typescript": "^5.9.3",
|
|
87
|
-
"typescript-eslint": "^8.
|
|
89
|
+
"typescript-eslint": "^8.57.0"
|
|
88
90
|
}
|
|
89
91
|
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* patch-esm.mjs — Postinstall ESM compatibility fix for starkzap
|
|
3
|
+
*
|
|
4
|
+
* starkzap@1.0.0 publishes compiled JS files with extensionless relative
|
|
5
|
+
* imports (e.g. `from "./sdk"` instead of `from "./sdk.js"`). This is
|
|
6
|
+
* invalid under Node.js ESM resolution which requires explicit file
|
|
7
|
+
* extensions. The `tsx` runtime tolerates it, but bare `node` does not,
|
|
8
|
+
* causing `npx starkfi` to hang silently.
|
|
9
|
+
*
|
|
10
|
+
* This script runs as a postinstall hook and patches all relative imports
|
|
11
|
+
* inside `node_modules/starkzap/dist/` to include the correct `.js` or
|
|
12
|
+
* `/index.js` suffix. It is idempotent — running it multiple times
|
|
13
|
+
* produces the same result.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { readdir, readFile, writeFile, stat } from "node:fs/promises";
|
|
17
|
+
import { join, dirname } from "node:path";
|
|
18
|
+
import { fileURLToPath } from "node:url";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Dynamically locate starkzap's dist directory.
|
|
22
|
+
* Works both in local dev (`node scripts/patch-esm.mjs`) and when
|
|
23
|
+
* starkfi is installed as a dependency (`npm install starkfi`).
|
|
24
|
+
*/
|
|
25
|
+
async function findStarkzapDist() {
|
|
26
|
+
try {
|
|
27
|
+
// Use Node.js module resolution to find starkzap's entry point
|
|
28
|
+
const resolved = import.meta.resolve("starkzap");
|
|
29
|
+
const entryFile = fileURLToPath(resolved);
|
|
30
|
+
// starkzap entry is at .../starkzap/dist/src/index.js
|
|
31
|
+
// We need .../starkzap/dist
|
|
32
|
+
const distDir = dirname(dirname(entryFile));
|
|
33
|
+
return distDir;
|
|
34
|
+
} catch {
|
|
35
|
+
// Fallback: relative path from scripts/ directory (local dev)
|
|
36
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
37
|
+
return join(__dirname, "..", "node_modules", "starkzap", "dist");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const STARKZAP_DIST = await findStarkzapDist();
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Resolves a bare relative import to its correct ESM-compliant form.
|
|
45
|
+
* "./sdk" → "./sdk.js" (if sdk.js exists)
|
|
46
|
+
* "./account" → "./account/index.js" (if account/index.js exists)
|
|
47
|
+
* "./foo.js" → "./foo.js" (already has extension, skip)
|
|
48
|
+
*/
|
|
49
|
+
async function resolveImport(baseDir, importPath) {
|
|
50
|
+
// Already has a known JS file extension — leave it alone
|
|
51
|
+
if (/\.(?:js|mjs|cjs|json)$/.test(importPath)) return null;
|
|
52
|
+
|
|
53
|
+
// 1) Try <importPath>.js
|
|
54
|
+
try {
|
|
55
|
+
const asFile = join(baseDir, importPath + ".js");
|
|
56
|
+
const s = await stat(asFile);
|
|
57
|
+
if (s.isFile()) return importPath + ".js";
|
|
58
|
+
} catch {
|
|
59
|
+
/* not a file */
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// 2) Try <importPath>/index.js
|
|
63
|
+
try {
|
|
64
|
+
const asDir = join(baseDir, importPath, "index.js");
|
|
65
|
+
const s = await stat(asDir);
|
|
66
|
+
if (s.isFile()) return importPath + "/index.js";
|
|
67
|
+
} catch {
|
|
68
|
+
/* not a directory with index */
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return null; // Can't resolve — leave original
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Patches a single JS file, replacing extensionless relative imports.
|
|
76
|
+
* Returns true if the file was modified.
|
|
77
|
+
*/
|
|
78
|
+
async function patchFile(filePath) {
|
|
79
|
+
const content = await readFile(filePath, "utf-8");
|
|
80
|
+
const baseDir = dirname(filePath);
|
|
81
|
+
let modified = false;
|
|
82
|
+
|
|
83
|
+
// Collect all relative import specifiers
|
|
84
|
+
const importRegex = /((?:from|import)\s*["'])(\.\.?\/[^"']+)(["'])/g;
|
|
85
|
+
const replacements = [];
|
|
86
|
+
let match;
|
|
87
|
+
|
|
88
|
+
while ((match = importRegex.exec(content)) !== null) {
|
|
89
|
+
const [full, prefix, importPath, suffix] = match;
|
|
90
|
+
const resolved = await resolveImport(baseDir, importPath);
|
|
91
|
+
if (resolved) {
|
|
92
|
+
replacements.push({
|
|
93
|
+
start: match.index,
|
|
94
|
+
end: match.index + full.length,
|
|
95
|
+
replacement: `${prefix}${resolved}${suffix}`,
|
|
96
|
+
});
|
|
97
|
+
modified = true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (!modified) return false;
|
|
102
|
+
|
|
103
|
+
// Apply replacements from end to start to preserve indices
|
|
104
|
+
let patched = content;
|
|
105
|
+
for (let i = replacements.length - 1; i >= 0; i--) {
|
|
106
|
+
const r = replacements[i];
|
|
107
|
+
patched = patched.slice(0, r.start) + r.replacement + patched.slice(r.end);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
await writeFile(filePath, patched);
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Recursively walks a directory and patches all .js files.
|
|
116
|
+
*/
|
|
117
|
+
async function walkAndPatch(dir) {
|
|
118
|
+
let count = 0;
|
|
119
|
+
const entries = await readdir(dir, { withFileTypes: true });
|
|
120
|
+
|
|
121
|
+
for (const entry of entries) {
|
|
122
|
+
const fullPath = join(dir, entry.name);
|
|
123
|
+
if (entry.isDirectory()) {
|
|
124
|
+
count += await walkAndPatch(fullPath);
|
|
125
|
+
} else if (entry.name.endsWith(".js") && !entry.name.endsWith(".map")) {
|
|
126
|
+
if (await patchFile(fullPath)) count++;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return count;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ── Main ──────────────────────────────────────────────────────────────
|
|
134
|
+
try {
|
|
135
|
+
await stat(STARKZAP_DIST);
|
|
136
|
+
} catch {
|
|
137
|
+
// starkzap not installed or dist missing — nothing to patch
|
|
138
|
+
process.exit(0);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
try {
|
|
142
|
+
const count = await walkAndPatch(STARKZAP_DIST);
|
|
143
|
+
if (count > 0) {
|
|
144
|
+
console.log(
|
|
145
|
+
`[starkfi] Patched ${count} starkzap file${count > 1 ? "s" : ""} for ESM compatibility`
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
} catch (err) {
|
|
149
|
+
console.warn("[starkfi] ESM patch warning:", err.message);
|
|
150
|
+
// Don't fail the install — the CLI will still work via tsx
|
|
151
|
+
}
|
package/skills/README.md
CHANGED
|
@@ -49,7 +49,7 @@ npx skills add ahmetenesdur/starkfi
|
|
|
49
49
|
| "Swap 100 USDC for ETH" | `trade` |
|
|
50
50
|
| "Swap USDC to ETH and USDT to STRK" | `multi-swap` |
|
|
51
51
|
| "Swap ETH and then stake STRK" | `batch` |
|
|
52
|
-
| "Stake 1000 STRK with
|
|
52
|
+
| "Stake 1000 STRK with Karnot" | `staking` |
|
|
53
53
|
| "Supply 500 USDC to Prime pool" | `lending` |
|
|
54
54
|
| "Show me my portfolio" | `portfolio` |
|
|
55
55
|
| "I'm getting rate limit errors" | `config` |
|
package/skills/balance/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: balance
|
|
3
|
-
description: Check Starknet wallet token balances — STRK, ETH, and all ERC-20 tokens. Use this skill when the user asks about their balance, holdings, funds, tokens, or wants to know how much of something they have. Also use before any transaction to verify sufficient funds.
|
|
3
|
+
description: Check Starknet wallet token balances — STRK, ETH, and all ERC-20 tokens. Use this skill when the user asks about their balance, holdings, funds, tokens, wallet contents, or wants to know how much of something they have. Also use before any transaction to verify sufficient funds. Trigger whenever the user says "check my balance", "how much ETH do I have", "what's in my wallet", "do I have enough", "show my tokens", or any variation about checking available assets — even if they don't use the word "balance".
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 18+ and npx.
|
|
6
6
|
metadata:
|
package/skills/batch/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: batch
|
|
3
|
-
description: Execute multiple different DeFi operations in a single Starknet transaction — combine swaps, staking, lending supply, and token sends into one multicall. Use this skill when the user wants to batch, combine, or chain multiple diverse operations together, such as "swap ETH and then stake STRK" in one go.
|
|
3
|
+
description: Execute multiple different DeFi operations in a single Starknet transaction — combine swaps, staking, lending supply, and token sends into one multicall. Use this skill when the user wants to batch, combine, bundle, or chain multiple diverse operations together in one atomic transaction, such as "swap ETH and then stake STRK" or "swap and send in one go". Also trigger when the user mentions multicall, combining operations, doing multiple things at once, or wants to save gas by bundling actions — even if they don't use the word "batch".
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 18+ and npx.
|
|
6
6
|
metadata:
|
|
@@ -49,11 +49,11 @@ npx starkfi@latest batch [--simulate] [--json] \
|
|
|
49
49
|
| Flag | Format | Example |
|
|
50
50
|
| ---------- | ------------------------------------------ | ------------------------------- |
|
|
51
51
|
| `--swap` | `"<amount> <from> <to>"` | `--swap "100 USDC ETH"` |
|
|
52
|
-
| `--stake` | `"<amount> <token> <validator_or_0xPool>"` | `--stake "500 STRK
|
|
52
|
+
| `--stake` | `"<amount> <token> <validator_or_0xPool>"` | `--stake "500 STRK Karnot"` |
|
|
53
53
|
| `--supply` | `"<amount> <token> <0xPool>"` | `--supply "100 USDC 0x04a3..."` |
|
|
54
54
|
| `--send` | `"<amount> <token> <0xRecipient>"` | `--send "10 STRK 0x07b2..."` |
|
|
55
55
|
|
|
56
|
-
> **Note:** `--stake` accepts either a validator name (e.g. `
|
|
56
|
+
> **Note:** `--stake` accepts either a validator name (e.g. `Karnot`) or a pool contract address (starting with `0x`). The CLI auto-detects the format.
|
|
57
57
|
|
|
58
58
|
## Parameters
|
|
59
59
|
|
|
@@ -70,12 +70,12 @@ npx starkfi@latest batch [--simulate] [--json] \
|
|
|
70
70
|
|
|
71
71
|
## Examples
|
|
72
72
|
|
|
73
|
-
**User:** "Swap 100 USDC to ETH and stake 500 STRK with
|
|
73
|
+
**User:** "Swap 100 USDC to ETH and stake 500 STRK with Karnot in one transaction"
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
76
|
npx starkfi@latest status
|
|
77
77
|
npx starkfi@latest balance
|
|
78
|
-
npx starkfi@latest batch --swap "100 USDC ETH" --stake "500 STRK
|
|
78
|
+
npx starkfi@latest batch --swap "100 USDC ETH" --stake "500 STRK Karnot"
|
|
79
79
|
npx starkfi@latest tx-status <hash>
|
|
80
80
|
```
|
|
81
81
|
|
|
@@ -97,7 +97,7 @@ npx starkfi@latest tx-status <hash>
|
|
|
97
97
|
npx starkfi@latest batch --simulate \
|
|
98
98
|
--swap "100 USDC ETH" \
|
|
99
99
|
--swap "200 USDT STRK" \
|
|
100
|
-
--stake "500 STRK
|
|
100
|
+
--stake "500 STRK Karnot"
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
## Error Handling
|
package/skills/config/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: config
|
|
3
|
-
description: View and modify StarkFi CLI configuration — set custom RPC URLs, switch networks, manage gas settings, and check transaction status. Use this skill when the user mentions RPC, rate limits, network settings, gas mode, gas token, configuration, or wants to check a transaction hash.
|
|
3
|
+
description: View and modify StarkFi CLI configuration — set custom RPC URLs, switch networks, manage gas settings, and check transaction status. Use this skill when the user mentions RPC, rate limits, network settings, gas mode, gas token, configuration, settings, preferences, or wants to check a transaction hash. Also trigger when the user wants to customize their setup, troubleshoot connection issues, switch between mainnet and testnet, change how gas is paid, or verify whether a transaction succeeded — even if they don't say "config".
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 18+ and npx.
|
|
6
6
|
metadata:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: multi-swap
|
|
3
|
-
description: Execute multiple token swaps in a single Starknet transaction using Fibrous aggregation. Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps,
|
|
3
|
+
description: Execute multiple token swaps in a single Starknet transaction using Fibrous aggregation. Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 18+ and npx.
|
|
6
6
|
metadata:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: portfolio
|
|
3
|
-
description: View a comprehensive DeFi portfolio dashboard — token balances, staking positions, and lending positions with USD valuations. Use this skill when the user wants an overview, summary, total value, net worth, or wants to see all their positions across Starknet at once.
|
|
3
|
+
description: View a comprehensive DeFi portfolio dashboard — token balances, staking positions, and lending positions with USD valuations. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 18+ and npx.
|
|
6
6
|
metadata:
|
package/skills/send/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: send
|
|
3
|
-
description: Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to transfer,
|
|
3
|
+
description: Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 18+ and npx.
|
|
6
6
|
metadata:
|
package/skills/staking/SKILL.md
CHANGED
|
@@ -115,18 +115,18 @@ npx starkfi@latest rewards --compound --validator <name> [--token <symbol>]
|
|
|
115
115
|
npx starkfi@latest validators
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
**User:** "Show me pools for
|
|
118
|
+
**User:** "Show me pools for Karnot"
|
|
119
119
|
|
|
120
120
|
```bash
|
|
121
|
-
npx starkfi@latest pools
|
|
121
|
+
npx starkfi@latest pools Karnot
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
**User:** "Stake 1000 STRK with
|
|
124
|
+
**User:** "Stake 1000 STRK with Karnot"
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
127
|
npx starkfi@latest status
|
|
128
128
|
npx starkfi@latest balance --token STRK
|
|
129
|
-
npx starkfi@latest stake 1000 --validator
|
|
129
|
+
npx starkfi@latest stake 1000 --validator Karnot
|
|
130
130
|
npx starkfi@latest tx-status <hash>
|
|
131
131
|
```
|
|
132
132
|
|
|
@@ -138,10 +138,10 @@ npx starkfi@latest stake 0.5 --validator Karnot --token WBTC
|
|
|
138
138
|
npx starkfi@latest tx-status <hash>
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
**User:** "Compound my STRK rewards from
|
|
141
|
+
**User:** "Compound my STRK rewards from Karnot"
|
|
142
142
|
|
|
143
143
|
```bash
|
|
144
|
-
npx starkfi@latest rewards --compound --validator
|
|
144
|
+
npx starkfi@latest rewards --compound --validator Karnot
|
|
145
145
|
npx starkfi@latest tx-status <hash>
|
|
146
146
|
```
|
|
147
147
|
|
|
@@ -152,15 +152,15 @@ npx starkfi@latest rewards --claim --validator Karnot
|
|
|
152
152
|
npx starkfi@latest tx-status <hash>
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
**User:** "I want to unstake my STRK from
|
|
155
|
+
**User:** "I want to unstake my STRK from Karnot"
|
|
156
156
|
|
|
157
157
|
```bash
|
|
158
158
|
# Step 1: Start unstake cooldown
|
|
159
|
-
npx starkfi@latest unstake intent --validator
|
|
159
|
+
npx starkfi@latest unstake intent --validator Karnot --amount 1000
|
|
160
160
|
npx starkfi@latest tx-status <hash>
|
|
161
161
|
# Inform user about cooldown period
|
|
162
162
|
# Step 2: After cooldown, finalize
|
|
163
|
-
npx starkfi@latest unstake exit --validator
|
|
163
|
+
npx starkfi@latest unstake exit --validator Karnot
|
|
164
164
|
npx starkfi@latest tx-status <hash>
|
|
165
165
|
```
|
|
166
166
|
|
package/skills/trade/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: trade
|
|
3
|
-
description: Swap tokens on Starknet using Fibrous aggregation for optimal routing. Supports simulation (dry-run) before execution. Use this skill when the user wants to swap, exchange, trade, convert, or
|
|
3
|
+
description: Swap tokens on Starknet using Fibrous aggregation for optimal routing. Supports simulation (dry-run) before execution. Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Node.js 18+ and npx.
|
|
6
6
|
metadata:
|