@indigoprotocol/openclaw-indigo 0.1.3 → 0.2.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 +48 -79
- package/openclaw.plugin.json +14 -23
- package/package.json +17 -7
- package/src/index.ts +605 -60
- package/SKILL.md +0 -65
- package/src/alerts/cdp-alerts.ts +0 -38
- package/src/alerts/index.ts +0 -10
- package/src/alerts/price-alerts.ts +0 -44
- package/src/alerts/staking-alerts.ts +0 -36
- package/src/commands/cdp.ts +0 -58
- package/src/commands/index.ts +0 -11
- package/src/commands/portfolio.ts +0 -38
- package/src/commands/price.ts +0 -33
- package/src/commands/staking.ts +0 -38
- package/src/formatters/cdp-formatter.ts +0 -90
- package/src/formatters/index.ts +0 -9
- package/src/formatters/portfolio-formatter.ts +0 -91
- package/src/formatters/price-formatter.ts +0 -74
package/README.md
CHANGED
|
@@ -1,102 +1,71 @@
|
|
|
1
1
|
# @indigoprotocol/openclaw-indigo
|
|
2
2
|
|
|
3
|
-
OpenClaw plugin for the [Indigo Protocol](https://indigoprotocol.io) on Cardano.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
| Feature | Description |
|
|
8
|
-
|---------|-------------|
|
|
9
|
-
| MCP Integration | Indigo MCP server integration via OpenClaw |
|
|
10
|
-
| Chat Interfaces | Telegram, Discord, and Slack bot support |
|
|
11
|
-
| CDP Management | Create, adjust, and close CDPs from chat |
|
|
12
|
-
| Price Alerts | Configurable alerts for iAsset and INDY prices |
|
|
13
|
-
| Portfolio Tracking | Track wallet positions and get notifications |
|
|
14
|
-
| Staking | Manage INDY staking positions from chat |
|
|
3
|
+
OpenClaw plugin for the [Indigo Protocol](https://indigoprotocol.io) on Cardano. Provides read-only tools and auto-reply commands for iAsset prices, CDPs, staking, stability pools, governance, and wallet balances.
|
|
15
4
|
|
|
16
5
|
## Architecture
|
|
17
6
|
|
|
7
|
+
The plugin exports a `register(api)` function that the OpenClaw gateway calls at load time. It registers 16 agent tools and 8 auto-reply commands, all hitting the Indigo indexer REST API directly via axios.
|
|
8
|
+
|
|
18
9
|
```
|
|
19
10
|
src/
|
|
20
|
-
index.ts
|
|
21
|
-
commands/ — Chat command handlers
|
|
22
|
-
cdp.ts — CDP management commands
|
|
23
|
-
price.ts — Price query commands
|
|
24
|
-
staking.ts — Staking commands
|
|
25
|
-
portfolio.ts — Portfolio and stats commands
|
|
26
|
-
alerts/ — Notification alert definitions
|
|
27
|
-
price-alerts.ts — Price threshold notifications
|
|
28
|
-
cdp-alerts.ts — CDP health notifications
|
|
29
|
-
staking-alerts.ts — Staking and governance notifications
|
|
30
|
-
formatters/ — Platform-specific message formatters
|
|
31
|
-
cdp-formatter.ts — CDP data formatting
|
|
32
|
-
price-formatter.ts — Price data formatting
|
|
33
|
-
portfolio-formatter.ts — Portfolio summary formatting
|
|
11
|
+
index.ts — register(api) entry point, tools, commands, service
|
|
34
12
|
```
|
|
35
13
|
|
|
14
|
+
Formatting uses `@indigoprotocol/shared` adapters and formatters with the `markdownAdapter` (OpenClaw renders markdown through its IR pipeline for all platforms).
|
|
15
|
+
|
|
16
|
+
## Configuration
|
|
17
|
+
|
|
18
|
+
| Key | Type | Default | Description |
|
|
19
|
+
|-----|------|---------|-------------|
|
|
20
|
+
| `indexerUrl` | string | `https://analytics.indigoprotocol.io/api/v1` | Indigo indexer REST API base URL |
|
|
21
|
+
| `walletAddress` | string | — | Default Cardano wallet address for `/balance` and `/cdps` |
|
|
22
|
+
|
|
23
|
+
## Agent Tools
|
|
24
|
+
|
|
25
|
+
| Tool | Description |
|
|
26
|
+
|------|-------------|
|
|
27
|
+
| `indigo_assets` | List all iAssets with prices |
|
|
28
|
+
| `indigo_asset_price` | Get a specific iAsset price |
|
|
29
|
+
| `indigo_ada_price` | Get current ADA price |
|
|
30
|
+
| `indigo_indy_price` | Get current INDY price |
|
|
31
|
+
| `indigo_tvl` | Protocol total value locked |
|
|
32
|
+
| `indigo_protocol_stats` | Protocol stats (TVL, assets, CDPs) |
|
|
33
|
+
| `indigo_apr_rewards` | Current APR rewards |
|
|
34
|
+
| `indigo_dex_yields` | DEX yield farming opportunities |
|
|
35
|
+
| `indigo_cdps` | List CDPs (filter by owner/asset) |
|
|
36
|
+
| `indigo_cdp_health` | Analyze CDP health for an owner |
|
|
37
|
+
| `indigo_stability_pools` | Stability pool info |
|
|
38
|
+
| `indigo_staking_info` | Staking overview |
|
|
39
|
+
| `indigo_staking_positions` | List staking positions |
|
|
40
|
+
| `indigo_polls` | Governance polls |
|
|
41
|
+
| `indigo_wallet_balances` | Wallet token balances |
|
|
42
|
+
| `indigo_order_book` | Redemption order book |
|
|
43
|
+
|
|
36
44
|
## Commands
|
|
37
45
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### Prices
|
|
49
|
-
- `/price <asset>` — Get iAsset price
|
|
50
|
-
- `/price ada` — Get ADA price
|
|
51
|
-
- `/price indy` — Get INDY price
|
|
52
|
-
- `/price all` — Get all iAsset prices
|
|
53
|
-
|
|
54
|
-
### Staking
|
|
55
|
-
- `/stake info` — View staking overview and APR
|
|
56
|
-
- `/stake list` — List your staking positions
|
|
57
|
-
- `/stake open <amount>` — Open a new staking position
|
|
58
|
-
- `/stake adjust <address> <amount>` — Adjust position
|
|
59
|
-
- `/stake close <address>` — Close position
|
|
60
|
-
|
|
61
|
-
### Portfolio
|
|
62
|
-
- `/portfolio [address]` — Full portfolio summary
|
|
63
|
-
- `/balance [address]` — Check wallet balances
|
|
64
|
-
- `/tvl` — View protocol TVL
|
|
65
|
-
- `/stats` — View protocol statistics
|
|
66
|
-
|
|
67
|
-
## Alerts
|
|
68
|
-
|
|
69
|
-
Configure notifications for:
|
|
70
|
-
- **Price thresholds** — Alert when iAsset or INDY price crosses a threshold
|
|
71
|
-
- **Price changes** — Alert on significant percentage moves
|
|
72
|
-
- **iUSD depeg** — Alert when iUSD deviates from $1.00
|
|
73
|
-
- **CDP health** — Alert when collateral ratio drops
|
|
74
|
-
- **Liquidation risk** — Alert when CDP approaches liquidation
|
|
75
|
-
- **Staking rewards** — Alert on reward distributions
|
|
76
|
-
- **Governance** — Alert on new polls and ending votes
|
|
46
|
+
| Command | Description |
|
|
47
|
+
|---------|-------------|
|
|
48
|
+
| `/price <asset>` | Single asset price (ADA, INDY, or any iAsset) |
|
|
49
|
+
| `/prices` | All iAsset prices |
|
|
50
|
+
| `/tvl` | Protocol TVL |
|
|
51
|
+
| `/balance [addr]` | Wallet balances (falls back to config wallet) |
|
|
52
|
+
| `/cdps [owner]` | List CDPs (falls back to config wallet) |
|
|
53
|
+
| `/staking` | Staking overview |
|
|
54
|
+
| `/pools` | Stability pools |
|
|
55
|
+
| `/polls` | Governance polls |
|
|
77
56
|
|
|
78
57
|
## Setup
|
|
79
58
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{
|
|
86
|
-
"mcpServers": {
|
|
87
|
-
"indigo": {
|
|
88
|
-
"command": "npx",
|
|
89
|
-
"args": ["@indigoprotocol/indigo-mcp"]
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
59
|
+
```bash
|
|
60
|
+
openclaw plugin install @indigoprotocol/openclaw-indigo
|
|
61
|
+
openclaw gateway restart
|
|
93
62
|
```
|
|
94
63
|
|
|
95
64
|
## Development
|
|
96
65
|
|
|
97
66
|
```bash
|
|
98
67
|
npm install
|
|
99
|
-
npm run
|
|
68
|
+
npm run typecheck
|
|
100
69
|
```
|
|
101
70
|
|
|
102
71
|
## License
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "openclaw-indigo",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"command": "npx",
|
|
15
|
-
"args": ["@indigoprotocol/indigo-mcp"]
|
|
3
|
+
"configSchema": {
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"indexerUrl": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Indigo indexer REST API base URL"
|
|
9
|
+
},
|
|
10
|
+
"walletAddress": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Default Cardano wallet address"
|
|
13
|
+
}
|
|
16
14
|
}
|
|
17
15
|
},
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"staking": "src/commands/staking.ts",
|
|
22
|
-
"portfolio": "src/commands/portfolio.ts"
|
|
23
|
-
},
|
|
24
|
-
"alerts": {
|
|
25
|
-
"price": "src/alerts/price-alerts.ts",
|
|
26
|
-
"cdp": "src/alerts/cdp-alerts.ts",
|
|
27
|
-
"staking": "src/alerts/staking-alerts.ts"
|
|
16
|
+
"uiHints": {
|
|
17
|
+
"indexerUrl": { "label": "Indexer URL", "placeholder": "https://analytics.indigoprotocol.io/api/v1" },
|
|
18
|
+
"walletAddress": { "label": "Wallet Address", "placeholder": "addr1..." }
|
|
28
19
|
}
|
|
29
20
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigoprotocol/openclaw-indigo",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "OpenClaw plugin for Indigo Protocol",
|
|
5
|
-
"keywords": ["indigo", "openclaw", "plugin", "cardano", "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "OpenClaw plugin for Indigo Protocol — read-only tools and commands",
|
|
5
|
+
"keywords": ["indigo", "openclaw", "plugin", "cardano", "defi"],
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "src/index.ts",
|
|
8
|
-
"files": ["
|
|
8
|
+
"files": ["src", "README.md", "openclaw.plugin.json"],
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -13,8 +13,18 @@
|
|
|
13
13
|
"directory": "packages/plugins/openclaw-indigo"
|
|
14
14
|
},
|
|
15
15
|
"openclaw": {
|
|
16
|
-
"extensions": [
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
"extensions": ["./src/index.ts"]
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"typecheck": "tsc --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@indigoprotocol/shared": "^0.1.0",
|
|
23
|
+
"@sinclair/typebox": "^0.34.0",
|
|
24
|
+
"axios": "^1.7.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^22.0.0",
|
|
28
|
+
"typescript": "^5.7.0"
|
|
19
29
|
}
|
|
20
30
|
}
|