Skip to main content
The planned createPaymasterClient will check whether a paymaster sponsors a transaction and send the signed transaction to it. Until it ships, you can make the same two calls with viem.
In development. This describes the planned API. It is not published yet and details may change. Follow progress on GitHub.

Planned function

createPaymasterClient

The name comes from the SDK plan. Parameters and return types aren’t final. One rule is set:
string
required
The paymaster endpoint. No endpoint is confirmed for BOT Chain, so there’s no default. If you leave it out, the client is planned to throw MissingConfigError.
The client is planned to give you two operations:
  • A sponsor check. It sends pm_isSponsorable with the transaction’s to, from, value, data and gas, every value hex-encoded. BOT Chain’s docs say the reply has Sponsorable, a boolean, and SponsorPolicy, the name of the policy that matched.
  • A send. It takes a transaction you’ve signed and posts it to the paymaster’s eth_sendRawTransaction.

The signing flow

Signing stays with your wallet. The SDK won’t hold keys.
1

Build the transaction

Encode the call and estimate gas against a normal RPC.
2

Check sponsorship

Ask the paymaster. If it says no, send a normal paid transaction instead.
3

Sign with a gas price of 0

Sign a legacy transaction with gasPrice: 0n. The paymaster design sets the gas price directly, so don’t use an EIP-1559 transaction.
4

Send to the paymaster

Send the signed bytes to the paymaster URL. The public RPC rejects them with gasPrice too low.
If the paymaster never includes the transaction, its nonce stays unused. You can replace it with a normal paid transaction that uses the same nonce.

Do it today

EOA paymaster has a viem script that does all four steps against a PAYMASTER_URL you provide. It’s typechecked but untested, because there’s no endpoint to run it against. For gasless transactions that work on BOT Chain now, use meta-transactions with a relayer.

Paymaster module

Why the URL is required.

Errors

The errors this client will throw.
Last modified on October 2, 2026