Call RPC methods and send events to your URL with ERPC CLI
erpc rpc call sends one JSON-RPC request from your terminal with your signed-in ERPC account, or pays per call with x402. erpc webhook POSTs RPC events to your URL.This page describes ERPC CLI
v0.1.0-rc.4, a pre-release.Call an RPC method
Use your signed-in ERPC account to call Solana or Ethereum mainnet. The CLI selects the shared endpoint from the method, or you can select the network.
sh
- Params are a JSON array or object, a file with
--params-file, or-for standard input. Without them, a call sends[]. - Networks are
solana-mainnetandethereum-mainnet(alsoeth-mainnet).erpc rpc list-networkslists the networks with ERPC shared and x402 RPC. - Your own endpoint:
--endpoint-urluses only the credentials in that URL. It must be a secure URL or loopback, without user information.
Which of the account's keys a call uses
An account can have several RPC keys.
erpc rpc call and erpc webhook run try them in order, the primary one first, with one getHealth call for each key before the call of their own. The key is judged at the shared Solana RPC, whatever chain is then called.When the RPC takes no key and could not be asked about one of them, the command goes on with the first key it could not be asked about, and its own call tells. When every key is refused, the command fails with
the shared RPC takes none of the account's API keys from this machine (<n> tried): see When it fails.Pay per call with x402
For pay-per-call access without an account, request an x402 quote.
--quote prints the quote without reading a wallet or making a payment.To pay, run the command without
--quote at a terminal. The CLI shows the amount, asks for confirmation, and signs the quoted Base EURC payment with the wallet erpc wallet create configured. Keep EURC on Base in that wallet (Pay from a wallet).sh
Send events to your URL
A local webhook subscribes to the RPC WebSocket and POSTs events to your URL. Start a receiver, create the subscription, then run the ID that
create returns, in a terminal or under your process supervisor.sh
For wallet activity on Solana, use
--template solana-wallet --wallet ADDRESS in place of --method. For Ethereum contract logs, use --template evm-contract-events --address CONTRACT. The callback URL is HTTPS or loopback HTTP, and the networks are the same as erpc rpc call's.What your receiver gets
- Each POST contains
webhook_id,networkand the original JSON-RPCnotification. Return HTTP 2xx to accept it. - Delivery starts at the current live subscription. Restarting the runner subscribes to new events.
- A disconnect or a failed callback ends the runner with a nonzero status.
erpc webhook runtakes--onceto test a single delivery, and--endpoint-urlto use your own WebSocket RPC.
Manage webhooks
These inspect and change local configuration only. Pass
--yes to pause, activate and delete in scripts.





