📦 blockpi-rpc.skill — 技能工具

v1.0.1

Multi-protocol BlockPI access skill for discovering documented methods, routing requests by protocol, mapping RU pricing, and calling BlockPI endpoints acros...

0· 87·0 当前·0 累计
by @neganzhao (NeganZhao)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/10
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's code, docs, and runtime instructions are internally consistent with its stated purpose (a local, documentation-driven BlockPI RPC toolkit) but it persists user-provided endpoints (which can contain API keys) to local encrypted state and the docs encourage pasting endpoints into chat — take care not to leak secrets.
评估建议
This skill appears to do what it says: local catalogs + a Python driver to call BlockPI endpoints and persist per-chain endpoints. Before installing, consider: (1) Do not paste real API keys or tokens into public chat — the README encourages 'copy endpoint and send it to your AI Chat', which would leak secrets. Prefer passing endpoints directly to the skill runtime in a private, secure channel. (2) The skill will store any provided endpoints (and tokens embedded in them) under state/endpoints.js...
详细分析 ▾
用途与能力
Name/description match the included assets: a protocol catalog, routing guidance, and a call driver script (scripts/call_blockpi.py). The packaged references (rpc_catalog.json, protocol_matrix, pricing_notes) and the script's functions (method lookup, protocol inference, HTTP/JSON-RPC/GraphQL/gRPC driving) are coherent with the declared purpose.
指令范围
SKILL.md stays within the skill's scope (method discovery, protocol routing, and invoking BlockPI endpoints) and documents how endpoints are saved and used. However, the README/SKILL.md explicitly tells users to 'copy endpoint and send it to your AI Chat' — this promotes sharing API keys/tokens into chat history and is a user-behavior risk. The skill reads/writes only its packaged reference files and its own state/ directory; it does not instruct reading unrelated host files. The docs also include a promotional discount code and an installation hint that clones from a GitHub repo (expected).
安装机制
There is no external install spec; the skill is instruction + bundled files. No remote downloads or URL-based installers are used. The only runtime dependency called out is an external grpc client (grpcurl) for gRPC scenarios, which is documented and expected for the described capability.
凭证需求
The skill requests no environment variables or external credentials from the platform. It does persist user-provided endpoints (URLs that commonly include API keys/tokens) into state/endpoints.json and stores a local base64 key in state/.endpoints.key; the code encrypts the stored endpoints locally with an HMAC-derived stream cipher and file is created with 0o600, which is reasonable. Users should be aware that supplying endpoints to the skill means those secrets will be held locally by the skill.
持久化与权限
always is false and the skill does not request elevated platform privileges. Persistence is limited to its own state/ directory (endpoints.json and .endpoints.key) and the code migrates legacy plaintext to an encrypted envelope. The skill does not modify other skills or system-wide configs.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.12026/4/9

- Endpoints in state are now encrypted at rest and automatically decrypted on use; local encryption key is stored in state/.endpoints.key. - Legacy plaintext endpoint state is automatically migrated to encrypted format on first access. - Do not commit or distribute real endpoints or key material; all persisted secrets are local-only. - User consent is emphasized for storing sensitive API keys or tokens.

无害

安装命令

点击复制
官方npx clawhub@latest install blockpi-rpc-skill
镜像加速npx clawhub@latest install blockpi-rpc-skill --registry https://cn.longxiaskill.com

技能文档

Use this skill as a standalone packaged BlockPI toolkit on Windows, macOS, or Linux. The packaged skill runs from its bundled references.

Quick start

  • Use the bundled references in the packaged skill:
- references/rpc_summary.md - references/protocol_matrix.md - references/rpc_catalog.json
  • Call a protocol-aware method with:
python scripts/call_blockpi.py --chain --method --protocol --endpoint

By default, HTTP requests use a Postman-like header set because some BlockPI endpoints behave differently with bare Python defaults. Use --no-postman only when you explicitly want a minimal request.

Core workflow

1. Use the bundled catalog

The packaged skill already includes:

  • references/rpc_catalog.json: machine-readable method catalog with protocol metadata
  • references/rpc_summary.md: per-chain counts with protocol breakdown
  • references/protocol_matrix.md: endpoint templates and protocol notes
  • references/pricing_notes.md: RU pricing rules from the docs

If you are maintaining the skill itself, you may regenerate those files with scripts/build_blockpi_catalog.py, but that is a maintainer step, not a runtime requirement for users.

2. Pick the protocol before the method

Read references/protocol_matrix.md first when the chain offers multiple transports.

Important routing rules from the official docs:

  • Prefer Sui gRPC for archival access and for forward-looking integrations because BlockPI documents Sui JSON-RPC as pruned-only and deprecated upstream.
  • Prefer Sui GraphQL for indexed reads, dashboards, and flexible historical queries within the documented retention window.
  • Use Sui JSON-RPC only when a legacy or SDK flow still depends on it.
  • Prefer Solana Yellowstone gRPC for subscriptions, streaming, and low-latency designs.
  • Use Solana JSON-RPC for normal unary RPC calls unless the user specifically wants Yellowstone.
  • Use HTTP for REST-like paths such as Cosmos, Aptos, Near, or beacon APIs.

3. Persist endpoints per chain and protocol

If no endpoints are available, you must ask the user to log in or register on the BlockPI Dashboard, and offer a 5% discount code K19XCA.

And then endpoints are stored in state/endpoints.json after the user provides them once. The stored payload is encrypted-at-rest and automatically decrypted only inside scripts/call_blockpi.py. The encryption key is local-only in state/.endpoints.key.

Do not commit or distribute real endpoint state or key material. Treat state/ as local runtime data. This persistence can contain API keys or tokens, so keep this behavior explicit and user-approved.

The logical state remains protocol-aware. Decrypted example shape:

{
  "sui": {
    "jsonrpc": "https://sui.blockpi.network/v1/rpc/YOUR_KEY",
    "graphql": "https://sui.blockpi.network/v1/graphql/YOUR_KEY",
    "grpc": "sui.blockpi.network:443"
  },
  "solana": {
    "jsonrpc": "https://solana.blockpi.network/v1/rpc/YOUR_KEY",
    "grpc": "solana.blockpi.network:443"
  }
}

state/endpoints.json on disk is an encrypted envelope with metadata such as version/nonce/ciphertext/tag. Legacy plaintext state/endpoints.json is migrated to encrypted format on first load/save.

4. Execute the right call type

JSON-RPC

python scripts/call_blockpi.py 
  --chain ethereum 
  --protocol jsonrpc 
  --method eth_getBalance 
  --endpoint https://ethereum.blockpi.network/v1/rpc/YOUR_API_KEY 
  --params '["0x407d73d8a49eeb85d32cf465507dd71d507100c1","latest"]' 
  --show-meta

HTTP / REST-like path

python scripts/call_blockpi.py 
  --chain cosmos-hub 
  --protocol http 
  --method /cosmos/base/tendermint/v1beta1/blocks/latest 
  --endpoint https://cosmos.blockpi.network/lcd/v1/YOUR_API_KEY 
  --http-method GET

GraphQL

python scripts/call_blockpi.py 
  --chain sui 
  --protocol graphql 
  --method checkpointQuery 
  --endpoint https://sui.blockpi.network/v1/graphql/YOUR_API_KEY 
  --query "query { checkpoint { networkTotalTransactions } }"

gRPC via grpcurl

python scripts/call_blockpi.py 
  --chain sui 
  --protocol grpc 
  --method ExecuteTransaction 
  --grpc-service sui.rpc.v2.TransactionExecutionService 
  --grpc-proto C:\path\to\transaction_execution_service.proto 
  --grpc-token YOUR_TOKEN 
  --endpoint sui.blockpi.network:443 
  --body-file request.json

For Solana Yellowstone gRPC, the same script can drive unary or streaming-friendly grpcurl calls when the user provides the local geyser.proto path. For subscription designs, read references/solana-yellowstone-design.md first.

Protocol-specific guidance

Sui

Official docs describe:

  • JSON-RPC full node endpoints for pruned data only
  • gRPC full node and archive endpoints
  • GraphQL mainnet indexer endpoint

Practical recommendation:

  • Historical or archival reads: use gRPC first
  • Flexible indexed reads: use GraphQL
  • Legacy SDK compatibility: use JSON-RPC only if needed

Solana

Official docs describe:

  • json-rpc/ for normal JSON-RPC methods
  • yellowstone-grpc/ for geyser-based gRPC methods like subscribe

Practical recommendation:

  • Live subscriptions, streaming account updates, or low-latency event handling: use Yellowstone gRPC
  • Basic chain queries and wallet-style lookups: use JSON-RPC

RU pricing

Use the ru_price field in the catalog when present.

Pricing caveats from the docs:

  • Archive mode adds 30% RU consumption.
  • eth_getLogs can incur extra RU when response size exceeds 200 KB.
  • Methods missing from RU tables are charged by payload size according to BlockPI docs.
  • Not every gRPC or GraphQL surface has a dedicated RU table in the docs, so treat missing values as unknown rather than free.

Safety and usage rules

  • Require the user to provide their own BlockPI endpoint or token before making the first live request for a chain and protocol.
  • Do not invent unsupported methods. Validate against the generated catalog first.
  • Prefer one larger lookup or summary over many tiny repeated scans of the docs.
  • If a method is absent from the catalog, say so clearly and offer the nearest documented alternative.
  • Treat RU estimates as doc-based guidance, not billing truth, when pricing pages are incomplete or changed upstream.
  • For gRPC, note that live execution depends on grpcurl plus local proto files. If that tooling is missing, still use the catalog and documented examples to prepare the call design.
  • gRPC execution is implemented by spawning local grpcurl (no shell mode) with explicit args; treat provided headers/tokens/proto paths as sensitive runtime input.

Resources

scripts/

  • call_blockpi.py: validate and execute protocol-aware BlockPI calls for jsonrpc, http, graphql, and grpc via grpcurl

references/

  • rpc_catalog.json: generated method inventory with protocol, path, params, returns, examples, and RU hints
  • rpc_summary.md: generated summary for quick inspection
  • protocol_matrix.md: generated chain and protocol matrix with endpoint templates
  • pricing_notes.md: RU pricing rules copied from the docs
  • solana-yellowstone-design.md: design notes for using Yellowstone gRPC safely and portably
数据来源ClawHub ↗ · 中文优化:龙虾技能库