Skip to content

Agent

Relay a gas-sponsored user operation

The token-gated ERC-4337 bundler and paymaster relay that sponsors the gas for an invest.

POST /api/pimlico is the ERC-4337 bundler and paymaster relay that pays the gas for a Monvera invest. It forwards a whitelisted set of JSON-RPC methods to Pimlico with the server-held API key attached, so the browser never sees the key. This is why investing is free to the user: the paymaster covers the network cost.

POST /api/pimlico · requires a Privy bearer token · 600 requests per 60 seconds per account. Base URL, rate limits, and error shapes: conventions.

You usually do not call this directly: the smart-account client points its bundler and paymaster transport here, so the ERC-4337 stack calls it for you during an invest. Call it yourself only if you are building your own account-abstraction transport against Monvera.

The upstream Pimlico JSON-RPC envelope, unchanged. The relay accepts a single JSON-RPC object or a batch array, checks every method against the allowlist, forwards allowed requests to https://api.pimlico.io/v2/4663/rpc, and returns Pimlico’s body and status verbatim. Upstream JSON-RPC errors come back as-is for your RPC layer to interpret; upstream headers are never leaked.

Any method outside this set is rejected with 400, and an empty batch is rejected too.

eth_chainId
eth_supportedEntryPoints
eth_estimateUserOperationGas
eth_sendUserOperation
eth_getUserOperationByHash
eth_getUserOperationReceipt
pimlico_getUserOperationGasPrice
pimlico_getUserOperationStatus
pm_sponsorUserOperation
pm_getPaymasterData
pm_getPaymasterStubData

The body is a raw JSON-RPC 2.0 payload — a single object or a batch array. There is no Monvera-specific schema beyond the allowlist.

Field Type Required Description
jsonrpc string yes "2.0".
id number | string yes Request id, echoed in the response.
method string yes One of the allowed methods above.
params array yes The method’s parameters, per the ERC-4337 bundler and paymaster spec.

Read the current user-operation gas price — a safe, side-effect-free call:

Terminal window
curl -X POST https://monvera.best/api/pimlico \
-H "Authorization: Bearer $MONVERA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"pimlico_getUserOperationGasPrice","params":[]}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"slow": { "maxFeePerGas": "0x5f5e100", "maxPriorityFeePerGas": "0x5f5e100" },
"standard": { "maxFeePerGas": "0x77359400", "maxPriorityFeePerGas": "0x77359400" },
"fast": { "maxFeePerGas": "0x8f0d1800", "maxPriorityFeePerGas": "0x8f0d1800" }
}
}
Status Body When
400 {"error":"Invalid JSON-RPC body."} The body is not valid JSON.
400 {"error":"Unsupported RPC method."} No method, or any method outside the allowlist.
502 {"error":"Something went wrong. Please try again."} The upstream Pimlico call failed.
503 {"error":"Something went wrong. Please try again."} No Pimlico API key configured on the server.

There is no open gas-sponsorship relay: a missing or bad token is always a 401.

A 200 only means the relay forwarded your request — a userOp can still fail inside the JSON-RPC result or error object, so check the envelope. The invest itself is atomic on-chain: if the batched VeraRecord.record(...) verify reverts, the whole userOp reverts and no assets are bought.

© 2026 Aibora · Documentation interface. Original Monvera materials retain their upstream attribution andMIT license.