技能详情(站内镜像,无评论)
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v2.0.1
统计:⭐ 1 · 542 · 2 current installs · 2 all-time installs
⭐ 1
安装量(当前) 2
🛡 VirusTotal :良性 · OpenClaw :良性
Package:aviclaw/lighter
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :良性
OpenClaw 评估
The skill's code, instructions, and required secrets are generally consistent with a DEX client for Lighter, but there are minor metadata inconsistencies and a few things to double-check before using it with real funds.
目的
The name/description (Lighter DEX client) aligns with the included scripts (market queries, account, positions, order placement). However, the registry metadata states 'required env vars: none' while SKILL.md and the scripts require LIGHTER_API_KEY and LIGHTER_ACCOUNT_INDEX; this mismatch should be resolved.
说明范围
SKILL.md and USAGE.md limit actions to the Lighter API and optional official SDK signing. The instructions are explicit about which endpoints are used and warn about reviewing external SDK code and using burner wallets. No instructions request unrelated system files or unrelated credentials.
安装机制
There is no install spec (instruction-only), which reduces install-time risk. The package includes scripts and a requirements.txt that lists requests and comments the lighter-sdk as optional — but scripts/order.py imports 'lighter' (the SDK) and will fail if the SDK isn't installed. The skill correctly warns to review the external SDK on GitHub before installing it.
证书
The only secrets the skill uses are LIGHTER_API_KEY and LIGHTER_ACCOUNT_INDEX (plus optional LIGHTER_L1_ADDRESS), which are proportionate to trading/account queries. The inconsistency is that the registry metadata listed no required env vars while SKILL.md and the scripts require them. USAGE.md suggests storing keys in ~/.openclaw/secrets.env — a convenience but not enforced by the code; consider secure storage advice.
持久
The skill does not request persistent/always-on privileges (always:false) and does not modify other skills or system-wide settings. Autonomous invocation is allowed (platform default) but not excessive by itself.
综合结论
This skill appears to be a straightforward Lighter protocol client. Before installing or using it with real funds: 1) Verify the SDK repository (https://github.com/elliottech/lighter-python) and confirm the package you install matches that repo; 2) Use a burner/dedicated trading key or account (do not use your main wallet); 3) Confirm what the Lighter API key actually is/permits (API key vs private signing key) and never paste private keys int…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Lighter」。简介:Interact with Lighter protocol - a ZK rollup orderbook DEX. Use when you need t…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/aviclaw/lighter/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: lighter
description: Interact with Lighter protocol - a ZK rollup orderbook DEX. Use when you need to trade on Lighter, check prices, manage positions, or query account data.
env:
required:
- LIGHTER_API_KEY
- LIGHTER_ACCOUNT_INDEX
optional:
- LIGHTER_L1_ADDRESS
---
# Lighter Protocol
Trade on Lighter - a zero-knowledge rollup orderbook DEX with millisecond latency and zero fees.
## Quick Start (Read-Only)
```bash
# Markets are public - no credentials needed
curl "https://mainnet.zklighter.elliot.ai/api/v1/orderBooks"
```
## What is Lighter?
- Zero fees for retail traders
- Millisecond latency
- ZK proofs of all operations
- Backed by Founders Fund, Robinhood, Coinbase Ventures
**API Endpoint:** https://mainnet.zklighter.elliot.ai
**Chain ID:** 300
## ⚠️ Security Considerations
### Third-Party Dependencies
This skill can work with **just requests library** for read-only operations. For signing orders, you have two options:
**Option A: Minimal (Read-Only)**
```bash
pip install requests
```
Only for public data (markets, order books, prices).
**Option B: Full Trading**
Requires the official Lighter SDK. Review and verify before installing:
- SDK Repository: https://github.com/elliottech/lighter-python
- Verify the repository owner, stars, and code before running any setup
### External Code
**Only proceed with external SDK if you:**
1. Have reviewed the GitHub repository
2. Understand what the code does
3. Use a dedicated burner wallet, not your main wallet
## Environment Variables
| Variable | Required | Description | Where to Find |
|----------|----------|-------------|---------------|
| `LIGHTER_API_KEY` | For orders | API key from Lighter SDK setup | See "Getting an API Key" section below |
| `LIGHTER_ACCOUNT_INDEX` | For orders | Your Lighter subaccount index (0-252) | See "Getting Your Account Index" section below |
| `LIGHTER_L1_ADDRESS` | Optional | Your ETH address (0x...) used on Lighter | Your MetaMask/Wallet address |
### Setting Up Your Credentials
**Step 1: Get your L1 Address**
- This is your Ethereum address (e.g., `0x1234...abcd`)
- Use the same wallet you connect to Lighter dashboard
**Step 2: Get your Account Index**
```bash
curl "https://mainnet.zklighter.elliot.ai/api/v1/accountsByL1Address?l1_address=YOUR_ETH_ADDRESS"
```
Response returns `sub_accounts[].index` — that's your account index (typically 0 for main account).
**Step 3: Get your API Key**
1. Install Lighter Python SDK: `pip install lighter-python`
2. Follow the setup guide: https://github.com/elliottech/lighter-python/blob/main/examples/system_setup.py
3. The SDK generates API keys tied to your account
4. Store the private key securely — never commit to git
**Quick test (read-only, no credentials):**
```bash
curl "https://mainnet.zklighter.elliot.ai/api/v1/orderBooks"
```
## API Usage
### Public Endpoints (No Auth)
```bash
# List all markets
curl "https://mainnet.zklighter.elliot.ai/api/v1/orderBooks"
# Get order book
curl "https://mainnet.zklighter.elliot.ai/api/v1/orderBook?market_id=1"
# Get recent trades
curl "https://mainnet.zklighter.elliot.ai/api/v1/trades?market_id=1"
```
### Authenticated Endpoints
```bash
# Account balance (requires API key in header)
curl -H "x-api-key: $LIGHTER_API_KEY"
"https://mainnet.zklighter.elliot.ai/api/v1/account?by=index&value=$LIGHTER_ACCOUNT_INDEX"
```
## Getting Your Account Index
See "Setting Up Your Credentials" table above for the quick curl command.
## Getting an API Key
See "Setting Up Your Credentials" table above for the step-by-step guide.
## Common Issues
**"Restricted jurisdiction":**
- Lighter has geographic restrictions - ensure compliance with their terms
**SDK signing issues:**
- Use create_market_order() instead of create_order() for more reliable execution
## Market IDs
| ID | Symbol |
|----|--------|
| 1 | ETH-USD |
| 2 | BTC-USD |
| 3 | SOL-USD |
## Links
- API: https://mainnet.zklighter.elliot.ai
- Dashboard: https://dashboard.zklighter.io
- SDK: https://github.com/elliottech/lighter-python
---
## Additional Examples
See `USAGE.md` in this skill folder for:
- Detailed curl commands for all endpoints
- Order book and trade queries
- Account and position checks
- Signed transaction flow (nonce → sign → broadcast)
**Disclaimer:** Review all external code before running. Use dedicated wallets for trading.