跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
金融

venice-crypto-rpc

Use Venice as a pay-per-call JSON-RPC proxy to 27 EVM, Starknet, and Solana networks. Covers GET /crypto/rpc/networks, POST /crypto/rpc/{network}, chain families and per-family method allowlists, the 1×/2×/4× method-tier pricing model, per-minute + 24-hour credit rate limits, idempotency keys for safe retries, single vs batch requests, and the unsupported stateful/WebSocket methods (eth_subscribe, eth_newFilter, *Subscribe, etc.).

veniceai · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add veniceai/skills --skill venice-crypto-rpc

技能说明


name: venice-crypto-rpc description: Use Venice as a pay-per-call JSON-RPC proxy to 27 EVM, Starknet, and Solana networks. Covers GET /crypto/rpc/networks, POST /crypto/rpc/{network}, chain families and per-family method allowlists, the 1×/2×/4× method-tier pricing model, per-minute + 24-hour credit rate limits, idempotency keys for safe retries, single vs batch requests, and the unsupported stateful/WebSocket methods (eth_subscribe, eth_newFilter, *Subscribe, etc.).

Venice Crypto RPC (JSON-RPC proxy)

Venice exposes a multi-chain JSON-RPC proxy billed per call. Same request shape as Alchemy / Infura — just change the base URL and pay per credit.

EndpointAuthNotes
GET /crypto/rpc/networksBearer or SIWXReturns { "networks": [...] } (sorted).
POST /crypto/rpc/{network}Bearer or SIWX (x402)Forward a JSON-RPC 2.0 request (single or batch).

Supported networks

Call GET /crypto/rpc/networks for the current list. It currently returns 27 slugs (always verify — the catalog grows):

arbitrum-mainnet    arbitrum-sepolia
avalanche-mainnet   avalanche-fuji
base-mainnet        base-sepolia
blast-mainnet       blast-sepolia
bsc-mainnet         bsc-testnet
ethereum-mainnet    ethereum-sepolia    ethereum-holesky
linea-mainnet       linea-sepolia
optimism-mainnet    optimism-sepolia
polygon-mainnet     polygon-amoy
robinhood-mainnet   robinhood-testnet
solana-mainnet      solana-devnet
starknet-mainnet    starknet-sepolia
zksync-mainnet      zksync-sepolia

Use the slug as :network in the proxy path.

The network enum published in swagger.yaml currently lists only 25 of these: it omits blast-mainnet and blast-sepolia, which the proxy does route. Trust GET /crypto/rpc/networks over the spec enum, and don't build a client-side validator from the enum or it will reject working networks.

Chain families

Each network speaks exactly one method family, and the allowlist is enforced per family. Sending an EVM method to a Solana network (or the reverse) is a 400, not a pass-through.

FamilyNetworksMethods
evmEverything except Starknet and Solana, including Robinhood Chain (an Arbitrum Orbit L2).eth_*, net_*, web3_*, trace_*, debug_*, txpool_*, and chain extensions zks_*, linea_*, bor_*, arbtrace_*.
starknetstarknet-mainnet, starknet-sepoliastarknet_*.
solanasolana-mainnet, solana-devnetgetAccountInfo, getBalance, getLatestBlockhash, sendTransaction, and the rest of the Solana JSON-RPC allowlist.

Send a JSON-RPC request

Single call

curl -X POST https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
{ "jsonrpc": "2.0", "id": 1, "result": "0x1" }

Batch (up to 100 calls)

curl -X POST https://api.venice.ai/api/v1/crypto/rpc/base-mainnet \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1},
    {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":2}
  ]'

A single unsupported method in a batch ⇒ the entire batch fails with 400.

Drop-in with viem / ethers

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'

const client = createPublicClient({
  chain: mainnet,
  transport: http('https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet', {
    fetchOptions: { headers: { Authorization: `Bearer ${process.env.VENICE_API_KEY}` } },
  }),
})

Pricing

Credits per call = baseCredits[chain] × methodTier.

Base creditsChains
20Ethereum, Base, Optimism, Arbitrum, Polygon, Linea, Avalanche, BSC, Blast, Robinhood, Starknet.
30zkSync Era, Solana.
TierMultiplierMethods
Standard1×eth_call, eth_getBalance, eth_blockNumber, eth_sendRawTransaction, eth_getLogs, net_version, web3_clientVersion, ERC-4337 bundler (eth_sendUserOperation, …), chain-family extensions (zks_*, linea_*, bor_*, starknet_*), and Solana methods (getAccountInfo, getBalance, getLatestBlockhash, sendTransaction, …).
Advanced2×trace_*, debug_*, txpool_inspect, txpool_status, arbtrace_*.
Large4×trace_replayBlockTransactions, trace_replayTransaction, txpool_content, arbtrace_replay*, and Solana getLargestAccounts / getSupply.

At ~$7e-7 per credit:

  • Standard EVM call (20 × 1) ≈ $0.000014
  • Advanced trace on Ethereum (20 × 2) ≈ $0.000028
  • Large trace replay (20 × 4) ≈ $0.000056
  • zkSync standard call (30 × 1) ≈ $0.000021
  • Solana standard call (30 × 1) ≈ $0.000021
  • Solana getLargestAccounts (30 × 4) ≈ $0.000084

RPC-level errors (HTTP 200 with error object inside — e.g. method unsupported on that chain, bad params) are billed at a flat 5 credits regardless of tier.

Response headers on 200:

HeaderMeaning
X-Venice-RPC-CreditsTotal credits charged (sum over batch).
X-Venice-RPC-Cost-USDDollar cost to 8 decimal places.
X-Balance-RemainingRemaining x402 USD — set on routes whose middleware refreshes balance headers. The /crypto/rpc/* handler currently emits credits/cost/request headers; treat X-Balance-Remaining here as best-effort (may be absent on RPC). Use GET /x402/balance/{walletAddress} for an authoritative read.
X-Request-ID32-char correlation ID — include in support tickets.
Idempotent-Replayed"true" when served from the idempotency cache.

Unsupported methods

These always return 400:

  • Stateful filter methods — eth_newFilter, eth_newBlockFilter, eth_getFilterChanges, eth_getFilterLogs, `eth_uninstallFilt
阅读完整来源 ↗