Public Endpoint
Pimlico provides a public bundler endpoint for developers to test and prototype their applications without requiring an API key.
Endpoint URL
https://public.pimlico.io/v2/{chain_id}/rpcReplace {chain_id} with the chain ID of the network you want to use (e.g., 1 for Ethereum mainnet, 137 for Polygon).
Supported Methods
The public endpoint supports all standard ERC-4337 bundler methods and Pimlico specific methods:
eth_sendUserOperationeth_estimateUserOperationGaseth_getUserOperationReceipteth_getUserOperationByHasheth_supportedEntryPointspimlico_getUserOperationGasPricepimlico_getUserOperationStatus
Rate Limits
The public endpoint has the following rate limits:
- 20 requests per minute per IP address
Example Usage
import { createSmartAccountClient } from "permissionless";
import { toSafeSmartAccount } from "permissionless/accounts";
import { createPublicClient, http, zeroAddress } from "viem";
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
import { createPimlicoClient } from "permissionless/clients/pimlico";
import { base } from "viem/chains";
const publicClient = createPublicClient({
chain: base,
transport: http(),
});
const account = await toSafeSmartAccount({
owners: [privateKeyToAccount(privateKey)],
client: publicClient,
version: "1.4.1",
});
const pimlicoClient = createPimlicoClient({
transport: http(`https://public.pimlico.io/v2/${base.id}/rpc`),
chain: base,
});
const smartAccountClient = createSmartAccountClient({
userOperation: {
estimateFeesPerGas: async () =>
(await pimlicoClient.getUserOperationGasPrice()).fast,
},
account,
chain: base,
bundlerTransport: http(`https://public.pimlico.io/v2/${base.id}/rpc`),
});
const txHash = await smartAccountClient.sendTransaction({
calls: [
{
to: zeroAddress,
value: 0n,
data: "0x",
},
],
});
console.log(txHash);