Install
openclaw skills install blockpi-rpc-skillMulti-protocol BlockPI access skill for discovering documented methods, routing requests by protocol, mapping RU pricing, and calling BlockPI endpoints across JSON-RPC, HTTP, gRPC, and GraphQL where the official docs support them. Use when you need to validate whether a BlockPI method exists, estimate RU cost, pick the right protocol for a chain such as Sui or Solana, persist per-chain endpoints for jsonrpc/grpc/graphql, execute a live BlockPI call against a user-provided endpoint or token, or prepare protocol-aware designs like Sui gRPC and Solana Yellowstone gRPC.
openclaw skills install blockpi-rpc-skillUse this skill as a standalone packaged BlockPI toolkit on Windows, macOS, or Linux. The packaged skill runs from its bundled references.
references/rpc_summary.mdreferences/protocol_matrix.mdreferences/rpc_catalog.jsonpython scripts/call_blockpi.py --chain <chain> --method <method_or_path> --protocol <protocol> --endpoint <endpoint_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.
The packaged skill already includes:
references/rpc_catalog.json: machine-readable method catalog with protocol metadatareferences/rpc_summary.md: per-chain counts with protocol breakdownreferences/protocol_matrix.md: endpoint templates and protocol notesreferences/pricing_notes.md: RU pricing rules from the docsIf 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.
Read references/protocol_matrix.md first when the chain offers multiple transports.
Important routing rules from the official docs:
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.
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
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
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 } }"
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.
Official docs describe:
Practical recommendation:
Official docs describe:
json-rpc/ for normal JSON-RPC methodsyellowstone-grpc/ for geyser-based gRPC methods like subscribePractical recommendation:
Use the ru_price field in the catalog when present.
Pricing caveats from the docs:
eth_getLogs can incur extra RU when response size exceeds 200 KB.grpcurl plus local proto files. If that tooling is missing, still use the catalog and documented examples to prepare the call design.grpcurl (no shell mode) with explicit args; treat provided headers/tokens/proto paths as sensitive runtime input.call_blockpi.py: validate and execute protocol-aware BlockPI calls for jsonrpc, http, graphql, and grpc via grpcurlrpc_catalog.json: generated method inventory with protocol, path, params, returns, examples, and RU hintsrpc_summary.md: generated summary for quick inspectionprotocol_matrix.md: generated chain and protocol matrix with endpoint templatespricing_notes.md: RU pricing rules copied from the docssolana-yellowstone-design.md: design notes for using Yellowstone gRPC safely and portably