API Reference

Paymaster API Quickstart

The Paymaster API consists of two parts: the Policy Management API and the PaymasterAndData Request API.

The Policy Management APIs is Restful APIs used to create, update, delete, and query policies for ZAN Verifying Paymaster. Policies define sponsor rules, such as sponsor gas limits, whitelist/blacklist, and Webhook configurations.

The PaymasterAndData Request APIs is JSON-RPC APIs used to request paymasterAndData from ZAN Verifying Paymaster. The paymasterAndData, serving as a voucher for supporting gas payments, is integrated into UserOperation.

The ZAN Verifying Paymaster is in beta version currently. The only supported chain network is Eth Sepolia. Every account has 0.5 SepoliaETH limit in every month.

Policy Management APIs

API NameCommunication ProtocolsMethodUrl
Create PolicyRestfulPOSThttps://api.zan.top/paymaster/v1/policy/{ak}
Get PolicyRestfulGEThttps://api.zan.top/paymaster/v1/policy/{id}
Update PolicyRestfulPUThttps://api.zan.top/paymaster/v1/policy/{id}
Delete PolicyRestfulDELETEhttps://api.zan.top/paymaster/v1/policy/{id}
Get All PoliciesRestfulGEThttps://api.zan.top/paymaster/v1/policies
Get Policy StatusRestfulGEThttps://api.zan.top/paymaster/v1/policy/{id}/status
Update Policy StatusRestfulPUThttps://api.zan.top/paymaster/v1/policy/{id}/status

PaymasterAndData Request APIs

API NameCommunication ProtocolsMethodUrl
zan_getPaymasterAddressJSON-RPCPOSThttps://api.zan.top/node/v1/{chain}/{newtwork}/{ak}
zan_requestPaymasterAndDataJSON-RPCPOSThttps://api.zan.top/node/v1/{chain}/{newtwork}/{ak}