← 返回 Skills 市场
neganzhao

blockpi-rpc.skill

作者 NeganZhao · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
129
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install blockpi-rpc-skill
功能描述
Multi-protocol BlockPI access skill for discovering documented methods, routing requests by protocol, mapping RU pricing, and calling BlockPI endpoints acros...
使用说明 (SKILL.md)

BlockPI multi-protocol access

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

Quick start

  1. Use the bundled references in the packaged skill:
    • references/rpc_summary.md
    • references/protocol_matrix.md
    • references/rpc_catalog.json
  2. Call a protocol-aware method with: python scripts/call_blockpi.py --chain \x3Cchain> --method \x3Cmethod_or_path> --protocol \x3Cprotocol> --endpoint \x3Cendpoint_or_host>

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	o	ransaction_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
安全使用建议
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.json (encrypted) and a local key at state/.endpoints.key — keep that directory private and do not commit it to source control. (3) If you rely on gRPC calls, install and vet grpcurl yourself; the script spawns subprocesses for grpcurl (documented as non-shell invocation, but verify on your platform). (4) Review the large rpc_catalog.json if you need to ensure the catalog content is appropriate. If you want stronger assurance, inspect the remainder of call_blockpi.py not shown here to confirm subprocess argument handling and network behavior, and avoid sending secrets into chat history.
功能分析
Type: OpenClaw Skill Name: blockpi-rpc-skill Version: 1.0.1 The skill is a legitimate toolkit for interacting with BlockPI blockchain RPC services across multiple protocols (JSON-RPC, gRPC, GraphQL, and HTTP). It includes a Python script (`scripts/call_blockpi.py`) that manages local endpoint persistence using a custom encryption-at-rest implementation for API keys and executes network calls via `urllib` or `grpcurl` (safely using subprocess argument lists to avoid shell injection). While the instructions in `SKILL.md` direct the agent to offer a specific discount code (K19XCA), this appears to be standard affiliate marketing rather than malicious intent, and the overall design prioritizes local security and protocol-aware routing.
能力标签
cryptorequires-walletcan-make-purchasescan-sign-transactions
能力评估
Purpose & Capability
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.
Instruction Scope
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).
Install Mechanism
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.
Credentials
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.
Persistence & Privilege
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install blockpi-rpc-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /blockpi-rpc-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- 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.
v1.0.0
Initial release of blockpi-blockchain-rpc skill. - Provides multi-protocol access to BlockPI endpoints (JSON-RPC, HTTP, gRPC, GraphQL) with protocol-aware routing and documentation lookups. - Bundles reference guides and method catalogs for validated request construction, RU pricing estimates, and protocol selection (e.g., Sui gRPC/GraphQL, Solana Yellowstone gRPC). - Includes a script (call_blockpi.py) for executing live, user-configured requests across supported chains and protocols. - Supports per-chain, per-protocol endpoint persistence for easy reuse and user privacy of API keys or tokens. - Offers usage guidance and practical workflow for integrating BlockPI endpoints across ecosystems. - Provides protocol-specific recommendations and best practices based on official BlockPI documentation.
元数据
Slug blockpi-rpc-skill
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

blockpi-rpc.skill 是什么?

Multi-protocol BlockPI access skill for discovering documented methods, routing requests by protocol, mapping RU pricing, and calling BlockPI endpoints acros... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 129 次。

如何安装 blockpi-rpc.skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install blockpi-rpc-skill」即可一键安装,无需额外配置。

blockpi-rpc.skill 是免费的吗?

是的,blockpi-rpc.skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

blockpi-rpc.skill 支持哪些平台?

blockpi-rpc.skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 blockpi-rpc.skill?

由 NeganZhao(@neganzhao)开发并维护,当前版本 v1.0.1。

💬 留言讨论