starkfi 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MCP.md +1 -1
- package/README.md +52 -42
- package/dist/index.js +69 -69
- package/package.json +1 -1
- package/skills/batch/SKILL.md +4 -3
package/MCP.md
CHANGED
|
@@ -279,7 +279,7 @@ Views and modifies global CLI behavior: RPC routing, network selection, and Gas
|
|
|
279
279
|
| Parameter | Type | Required | Description |
|
|
280
280
|
| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
281
281
|
| `action` | enum | **Yes** | One of: `list`, `reset`, `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`. |
|
|
282
|
+
| `value` | string | No | `set-gasfree`: `on`/`off`. `set-gas-token`: symbol (`USDC`, `ETH`) or `reset`/`off`. `set-rpc`: URL string. `set-network`: `mainnet`/`sepolia`. |
|
|
283
283
|
|
|
284
284
|
---
|
|
285
285
|
|
package/README.md
CHANGED
|
@@ -36,14 +36,14 @@ Most DeFi tools are built for humans clicking buttons. StarkFi is built for **ag
|
|
|
36
36
|
|
|
37
37
|
```
|
|
38
38
|
┌─────────────────────────────────────────────────────────────────────────────────────┐
|
|
39
|
-
│ StarkFi
|
|
40
|
-
│
|
|
41
|
-
│ ┌──────────┐
|
|
42
|
-
│ │ CLI │ │ MCP Server
|
|
43
|
-
│ │ (30+ │ │ (27 tools)
|
|
39
|
+
│ StarkFi │
|
|
40
|
+
│ │
|
|
41
|
+
│ ┌──────────┐ ┌────────────────┐ ┌────────────────┐ ┌─────────────────────────┐ │
|
|
42
|
+
│ │ CLI │ │ MCP Server │ │ Agent Skills │ │ Telegram Bot │ │
|
|
43
|
+
│ │ (30+ │ │ (27 tools) │ │ (10 workflows) │ │ (BYOAI · Chat DeFi) │ │
|
|
44
44
|
│ │ commands)│ │ stdio transport│ │ npx starkfi │ │ OpenAI / Claude / │ │
|
|
45
|
-
│ └────┬─────┘
|
|
46
|
-
│ │ │ │
|
|
45
|
+
│ └────┬─────┘ └──────┬─────────┘ └─────┬──────────┘ │ Gemini │ │
|
|
46
|
+
│ │ │ │ └───────────┬─────────────┘ │
|
|
47
47
|
│ └───────────────┼──────────────────┼─────────────────────────┘ │
|
|
48
48
|
│ ▼ ▼ │
|
|
49
49
|
│ ┌──────────────────────────────────────────────────────────────────────────────┐ │
|
|
@@ -52,13 +52,13 @@ Most DeFi tools are built for humans clicking buttons. StarkFi is built for **ag
|
|
|
52
52
|
│ │ │ Fibrous │ │ Staking │ │ Vesu │ │ Batch │ │ Portfolio │ │ │
|
|
53
53
|
│ │ │ Swap │ │ Lifecycle│ │ V2 │ │ Multicall│ │ Dashboard │ │ │
|
|
54
54
|
│ │ └────┬─────┘ └────┬─────┘ └───┬────┘ └────┬─────┘ └──────┬───────┘ │ │
|
|
55
|
-
│ │ └─────────────┴────────────┴────────────┴───────────────┘
|
|
56
|
-
│ │ │
|
|
57
|
-
│ │ ┌───────────────┴───────────────────────────┐
|
|
58
|
-
│ │ │ Starkzap SDK (starkzap v1.0.0) │
|
|
59
|
-
│ │ │ Wallet · TxBuilder · Tokens · Paymaster │
|
|
60
|
-
│ │ └───────────────┬───────────────────────────┘
|
|
61
|
-
│
|
|
55
|
+
│ │ └─────────────┴────────────┴────────────┴───────────────┘ │ │
|
|
56
|
+
│ │ │ │ │
|
|
57
|
+
│ │ ┌───────────────┴───────────────────────────┐ │ │
|
|
58
|
+
│ │ │ Starkzap SDK (starkzap v1.0.0) │ │ │
|
|
59
|
+
│ │ │ Wallet · TxBuilder · Tokens · Paymaster │ │ │
|
|
60
|
+
│ │ └───────────────┬───────────────────────────┘ │ │
|
|
61
|
+
│ └───────────────────────┼──────────────────────────────────────────────────────┘ │
|
|
62
62
|
│ ▼ │
|
|
63
63
|
│ ┌──────────────────────────────────────┐ ┌──────────────────────┐ │
|
|
64
64
|
│ │ Auth Server (Hono + Privy TEE) │ │ AVNU Paymaster │ │
|
|
@@ -312,22 +312,22 @@ npx starkfi@latest trade 10 STRK ETH # Execute
|
|
|
312
312
|
| ----------------------------------------------------------------------------- | ---------------------- |
|
|
313
313
|
| `validators [--json]` | List active validators |
|
|
314
314
|
| `pools <validator> [--json]` | Show delegation pools |
|
|
315
|
-
| `stake <amount> --validator <name> [--token <symbol>] [--simulate] [--json]`
|
|
315
|
+
| `stake <amount> --validator <name> [--token <symbol>] [--simulate] [--json]` | Stake tokens |
|
|
316
316
|
| `stake-status [validator] [--json]` | Staking dashboard |
|
|
317
317
|
| `rewards --validator <name> [--token <symbol>] <--claim\|--compound>` | Manage rewards |
|
|
318
318
|
| `unstake <intent\|exit> --validator <name> [--token <symbol>] [--amount <n>]` | Unstake (2-step) |
|
|
319
319
|
|
|
320
320
|
### Lending (Vesu V2)
|
|
321
321
|
|
|
322
|
-
| Command | Description
|
|
323
|
-
| ------------------------------------------------------------------------------------------------------------------------------ |
|
|
324
|
-
| `lend-pools [name]` | List lending pools
|
|
325
|
-
| `lend-supply <amount> -p <pool> -t <token>` | Supply assets
|
|
326
|
-
| `lend-withdraw <amount> -p <pool> -t <token>` | Withdraw assets
|
|
327
|
-
| `lend-borrow -p <pool> --collateral-amount <n> --collateral-token <t> --borrow-amount <n> --borrow-token <t> [--use-supplied]` | Borrow
|
|
328
|
-
| `lend-repay <amount> -p <pool> -t <token> --collateral-token <t>` | Repay debt
|
|
322
|
+
| Command | Description |
|
|
323
|
+
| ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- |
|
|
324
|
+
| `lend-pools [name]` | List lending pools |
|
|
325
|
+
| `lend-supply <amount> -p <pool> -t <token>` | Supply assets |
|
|
326
|
+
| `lend-withdraw <amount> -p <pool> -t <token>` | Withdraw assets |
|
|
327
|
+
| `lend-borrow -p <pool> --collateral-amount <n> --collateral-token <t> --borrow-amount <n> --borrow-token <t> [--use-supplied]` | Borrow |
|
|
328
|
+
| `lend-repay <amount> -p <pool> -t <token> --collateral-token <t>` | Repay debt |
|
|
329
329
|
| `lend-status [-p <pool> --collateral-token <t> [--borrow-token <t>]]` | Position status (auto-scan if no args) |
|
|
330
|
-
| `lend-close -p <pool> --collateral-token <t> --borrow-token <t>` | Close position atomically
|
|
330
|
+
| `lend-close -p <pool> --collateral-token <t> --borrow-token <t>` | Close position atomically |
|
|
331
331
|
|
|
332
332
|
### Configuration
|
|
333
333
|
|
|
@@ -375,23 +375,24 @@ StarkFi has a dedicated **[Telegram bot](https://github.com/ahmetenesdur/starkfi
|
|
|
375
375
|
|
|
376
376
|
**BYOAI Model** — each user provides their own API key (OpenAI, Claude, or Gemini). No shared keys, no centralized billing.
|
|
377
377
|
|
|
378
|
-
| Feature
|
|
379
|
-
|
|
|
380
|
-
| **Swap**
|
|
381
|
-
| **Stake**
|
|
382
|
-
| **Lend**
|
|
383
|
-
| **Portfolio** | Balances with USD valuations and position health
|
|
384
|
-
| **Batch**
|
|
378
|
+
| Feature | Description |
|
|
379
|
+
| ------------- | --------------------------------------------------------- |
|
|
380
|
+
| **Swap** | DEX-aggregated trading via Fibrous |
|
|
381
|
+
| **Stake** | Multi-token staking (STRK, WBTC, tBTC, SolvBTC, LBTC) |
|
|
382
|
+
| **Lend** | Supply, borrow, repay, withdraw, close on Vesu V2 |
|
|
383
|
+
| **Portfolio** | Balances with USD valuations and position health |
|
|
384
|
+
| **Batch** | Combine swap + stake + supply + send in one transaction |
|
|
385
385
|
| **Gas Modes** | Gasless (pay in ERC-20) and gasfree (developer-sponsored) |
|
|
386
386
|
|
|
387
387
|
```bash
|
|
388
388
|
git clone https://github.com/ahmetenesdur/starkfi-telegram-bot.git
|
|
389
|
-
cd starkfi-telegram-bot
|
|
389
|
+
cd starkfi-telegram-bot
|
|
390
|
+
pnpm install
|
|
390
391
|
cp .env.example .env # Configure TELEGRAM_BOT_TOKEN, BOT_ENCRYPTION_SECRET
|
|
391
392
|
pnpm dev
|
|
392
393
|
```
|
|
393
394
|
|
|
394
|
-
See
|
|
395
|
+
See [`starkfi-telegram-bot/`](https://github.com/ahmetenesdur/starkfi-telegram-bot) for full setup and deployment (Docker support included).
|
|
395
396
|
|
|
396
397
|
---
|
|
397
398
|
|
|
@@ -427,16 +428,25 @@ All network operations include **automatic retry with exponential backoff** (500
|
|
|
427
428
|
|
|
428
429
|
### Readable Starknet Errors
|
|
429
430
|
|
|
430
|
-
Raw Starknet JSON-RPC errors (hex-encoded Cairo strings like `u256_sub Overflow`) are automatically parsed into human-readable messages:
|
|
431
|
-
|
|
432
|
-
| Raw Error
|
|
433
|
-
|
|
434
|
-
| `u256_sub Overflow`
|
|
435
|
-
| `
|
|
436
|
-
| `
|
|
437
|
-
| `
|
|
438
|
-
| `
|
|
439
|
-
| `
|
|
431
|
+
Raw Starknet JSON-RPC errors (hex-encoded Cairo strings like `u256_sub Overflow`) are automatically parsed into human-readable messages (15 patterns):
|
|
432
|
+
|
|
433
|
+
| Raw Error | Displayed Message |
|
|
434
|
+
| ---------------------------------------- | --------------------------------------------------------------------------------------- |
|
|
435
|
+
| `u256_sub Overflow` | Insufficient balance — you don't have enough tokens (including gas fees) |
|
|
436
|
+
| `u256_add Overflow` | Amount overflow — the value is too large |
|
|
437
|
+
| `ERC20: transfer amount exceeds balance` | Insufficient token balance for this transfer |
|
|
438
|
+
| `ERC20: burn amount exceeds balance` | Insufficient token balance to burn |
|
|
439
|
+
| `ERC20: insufficient allowance` | Token approval required — not enough allowance for this operation |
|
|
440
|
+
| `argent/multicall-failed` | One or more calls in the transaction failed |
|
|
441
|
+
| `argent/invalid-signature` | Invalid signature — try re-authenticating with: starkfi auth login |
|
|
442
|
+
| `argent/invalid-timestamp` | Transaction expired — please retry |
|
|
443
|
+
| `is_valid_signature` | Signature validation failed — try re-authenticating |
|
|
444
|
+
| `assert_not_zero` | Operation failed — a required value was zero |
|
|
445
|
+
| `Contract not found` | Contract not found — the target contract does not exist on this network |
|
|
446
|
+
| `UNAUTHORIZED` | Unauthorized — session may have expired, try: starkfi auth login |
|
|
447
|
+
| `nonce` | Transaction nonce error — please retry |
|
|
448
|
+
| `dusty-collateral-balance` | Collateral amount is below the pool's minimum (dust limit). Please increase the amount. |
|
|
449
|
+
| `dusty-debt-balance` | Borrow amount is below the pool's minimum (dust limit). Please increase the amount. |
|
|
440
450
|
|
|
441
451
|
This applies to both CLI output (`formatError`) and MCP responses (`withErrorHandling`).
|
|
442
452
|
|