openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > Solana

Query Solana blockchain data with USD pricing — wallet balances, token portfolios with values, transaction details, NFTs, whale detection, and live network s...

开发与 DevOps

作者:Agung Prabowo @AgungPrabowo123

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v0.1.0

统计:⭐ 0 · 97 · 0 current installs · 0 all-time installs

0

安装量(当前) 0

🛡 VirusTotal :良性 · OpenClaw :良性

Package:agungprabowo123/solana-2

安全扫描(ClawHub)

  • VirusTotal :良性
  • OpenClaw :良性

OpenClaw 评估

The skill is internally consistent with its stated purpose (querying Solana RPC + CoinGecko); no unexplained credentials or installs, but it will send queried addresses/mint IDs to public RPC and CoinGecko (privacy / rate-limit implications).

目的

Name/description (Solana data + USD pricing) matches the included script and SKILL.md. The code uses Solana JSON-RPC and CoinGecko for prices — exactly what the skill claims. No unrelated binaries, credentials, or install steps are requested.

说明范围

Instructions and script operate within the advertised scope (wallet, tx, token, NFTs, whales, stats, price). They perform network calls to the Solana RPC endpoint and CoinGecko. This means wallet addresses, token mint addresses, and transaction signatures you query will be sent to those third-party services (default RPC: api.mainnet-beta.solana.com; CoinGecko endpoints used as documented). That network exposure is expected for this functionali…

安装机制

No install spec; this is instruction-only with an included Python script. The script only uses the Python standard library (urllib, json, argparse) and writes nothing to disk at runtime beyond normal output. No external packages or downloads are requested.

证书

The skill requests no environment variables by default. It optionally reads SOLANA_RPC_URL to override the RPC endpoint, which is appropriate and proportional. No secrets or unrelated credentials are requested.

持久

always is false and the skill does not request persistent or elevated privileges. It does not attempt to modify other skills or system-wide settings. Runtime behavior is limited to outgoing network calls and local printing.

综合结论

This skill appears to do what it says, but be aware of privacy and rate-limit implications before using it: (1) queries you run (wallet addresses, token mints, transaction signatures) are sent to the configured Solana RPC provider and to CoinGecko for price lookups — if you care about privacy, set SOLANA_RPC_URL to a private RPC provider you trust; (2) use the --no-prices flag to avoid sending many token-mint lookups to CoinGecko (also helps w…

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Solana」。简介:Query Solana blockchain data with USD pricing — wallet balances, token portfoli…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/agungprabowo123/solana-2/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: solana
description: Query Solana blockchain data with USD pricing — wallet balances, token portfolios with values, transaction details, NFTs, whale detection, and live network stats. Uses Solana RPC + CoinGecko. No API key required.
version: 0.2.0
author: Deniz Alagoz (gizdusum), enhanced by Hermes Agent
license: MIT
metadata:
  hermes:
    tags: [Solana, Blockchain, Crypto, Web3, RPC, DeFi, NFT]
    related_skills: []
---

# Solana Blockchain Skill

Query Solana on-chain data enriched with USD pricing via CoinGecko.
8 commands: wallet portfolio, token info, transactions, activity, NFTs,
whale detection, network stats, and price lookup.

No API key needed. Uses only Python standard library (urllib, json, argparse).

---

## When to Use

- User asks for a Solana wallet balance, token holdings, or portfolio value
- User wants to inspect a specific transaction by signature
- User wants SPL token metadata, price, supply, or top holders
- User wants recent transaction history for an address
- User wants NFTs owned by a wallet
- User wants to find large SOL transfers (whale detection)
- User wants Solana network health, TPS, epoch, or SOL price
- User asks "what's the price of BONK/JUP/SOL?"

---

## Prerequisites

The helper script uses only Python standard library (urllib, json, argparse).
No external packages required.

Pricing data comes from CoinGecko's free API (no key needed, rate-limited
to ~10-30 requests/minute). For faster lookups, use `--no-prices` flag.

---

## Quick Reference

RPC endpoint (default): https://api.mainnet-beta.solana.com
Override: export SOLANA_RPC_URL=https://your-private-rpc.com

Helper script path: ~/.hermes/skills/blockchain/solana/scripts/solana_client.py

```
python3 solana_client.py wallet   <address> [--limit N] [--all] [--no-prices]
python3 solana_client.py tx       <signature>
python3 solana_client.py token    <mint_address>
python3 solana_client.py activity <address> [--limit N]
python3 solana_client.py nft      <address>
python3 solana_client.py whales   [--min-sol N]
python3 solana_client.py stats
python3 solana_client.py price    <mint_or_symbol>
```

---

## Procedure

### 0. Setup Check

```bash
python3 --version

# Optional: set a private RPC for better rate limits
export SOLANA_RPC_URL="https://api.mainnet-beta.solana.com"

# Confirm connectivity
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py stats
```

### 1. Wallet Portfolio

Get SOL balance, SPL token holdings with USD values, NFT count, and
portfolio total. Tokens sorted by value, dust filtered, known tokens
labeled by name (BONK, JUP, USDC, etc.).

```bash
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py 
  wallet 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
```

Flags:
- `--limit N` — show top N tokens (default: 20)
- `--all` — show all tokens, no dust filter, no limit
- `--no-prices` — skip CoinGecko price lookups (faster, RPC-only)

Output includes: SOL balance + USD value, token list with prices sorted
by value, dust count, NFT summary, total portfolio value in USD.

### 2. Transaction Details

Inspect a full transaction by its base58 signature. Shows balance changes
in both SOL and USD.

```bash
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py 
  tx 5j7s8K...your_signature_here
```

Output: slot, timestamp, fee, status, balance changes (SOL + USD),
program invocations.

### 3. Token Info

Get SPL token metadata, current price, market cap, supply, decimals,
mint/freeze authorities, and top 5 holders.

```bash
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py 
  token DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263
```

Output: name, symbol, decimals, supply, price, market cap, top 5
holders with percentages.

### 4. Recent Activity

List recent transactions for an address (default: last 10, max: 25).

```bash
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py 
  activity 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM --limit 25
```

### 5. NFT Portfolio

List NFTs owned by a wallet (heuristic: SPL tokens with amount=1, decimals=0).

```bash
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py 
  nft 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
```

Note: Compressed NFTs (cNFTs) are not detected by this heuristic.

### 6. Whale Detector

Scan the most recent block for large SOL transfers with USD values.

```bash
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py 
  whales --min-sol 500
```

Note: scans the latest block only — point-in-time snapshot, not historical.

### 7. Network Stats

Live Solana network health: current slot, epoch, TPS, supply, validator
version, SOL price, and market cap.

```bash
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py stats
```

### 8. Price Lookup

Quick price check for any token by mint address or known symbol.

```bash
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py price BONK
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py price JUP
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py price SOL
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py price DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263
```

Known symbols: SOL, USDC, USDT, BONK, JUP, WETH, JTO, mSOL, stSOL,
PYTH, HNT, RNDR, WEN, W, TNSR, DRIFT, bSOL, JLP, WIF, MEW, BOME, PENGU.

---

## Pitfalls

- **CoinGecko rate-limits** — free tier allows ~10-30 requests/minute.
  Price lookups use 1 request per token. Wallets with many tokens may
  not get prices for all of them. Use `--no-prices` for speed.
- **Public RPC rate-limits** — Solana mainnet public RPC limits requests.
  For production use, set SOLANA_RPC_URL to a private endpoint
  (Helius, QuickNode, Triton).
- **NFT detection is heuristic** — amount=1 + decimals=0. Compressed
  NFTs (cNFTs) and Token-2022 NFTs won't appear.
- **Whale detector scans latest block only** — not historical. Results
  vary by the moment you query.
- **Transaction history** — public RPC keeps ~2 days. Older transactions
  may not be available.
- **Token names** — ~25 well-known tokens are labeled by name. Others
  show abbreviated mint addresses. Use the `token` command for full info.
- **Retry on 429** — both RPC and CoinGecko calls retry up to 2 times
  with exponential backoff on rate-limit errors.

---

## Verification

```bash
# Should print current Solana slot, TPS, and SOL price
python3 ~/.hermes/skills/blockchain/solana/scripts/solana_client.py stats
```