How to Configure Paymaster and Bundler URLs for Account Abstraction

This guide provides a step-by-step process to configure the Paymaster and Bundler URLs for Account Abstraction using thirdweb's services. Whether you're integrating with Privy or another smart wallet provider, these instructions will help you set up the necessary infrastructure to leverage thirdweb's Paymaster and Bundler services without relying on thirdweb SDKs.

Description

This guide provides a step-by-step process to configure the Paymaster and Bundler URLs for Account Abstraction using thirdweb's services. Whether you're integrating with Privy or another smart wallet provider, these instructions will help you set up the necessary infrastructure to leverage thirdweb's Paymaster and Bundler services without relying on thirdweb SDKs.

Steps

  1. Obtain Your Thirdweb Client ID
      • Navigate to the project you're working on.
      • Locate and copy your Thirdweb Client ID from the project settings or API credentials section.
  1. Construct the Paymaster and Bundler URLs
      • Use the following URL template to create your Paymaster and Bundler endpoints:
        • https://<chain_id>.bundler.thirdweb.com/v2/<thirdweb-client-id>
          
      • Replace <chain_id> with the appropriate blockchain network identifier (e.g., ethereum, polygon).
      • Replace <thirdweb-client-id> with the Client ID you obtained in the previous step.

      Example:

      <https://ethereum.bundler.thirdweb.com/v2/your-client-id-here>
      
  1. Integrate with Your Smart Wallet (e.g., Privy)
      • Enter the constructed Paymaster and Bundler URLs into the appropriate configuration fields within your wallet setup.
  1. Pass Client ID or Secret Key via Headers
      • When making requests to the Paymaster and Bundler URLs, include your Client ID or Secret Key in the request headers.
      • Use the following header fields:
        • x-client-id: For Client ID
        • x-secret-key: For Secret Key

      Example:

      GET <https://ethereum.bundler.thirdweb.com/v2/your-client-id>
      Headers:
        x-client-id: your-client-id
        x-secret-key: your-secret-key
  1. Verify the Configuration
      • Test the integration by initiating a transaction through your smart wallet.
      • Ensure that the Paymaster and Bundler services are correctly processing transactions without using thirdweb SDKs.

Additional Tips

  • Security Best Practices: Always keep your Secret Key confidential. Avoid exposing it in client-side code or public repositories.
  • Chain Compatibility: Ensure that the <chain_id> you use in the URL corresponds to the blockchain network you're targeting. Using an incorrect chain ID can lead to failed transactions.
  • Monitoring and Logs: Utilize thirdweb's dashboard to monitor the activities and logs related to your Paymaster and Bundler services. This can help in quickly diagnosing issues or optimizing performance.
  • Stay Updated: Regularly check the thirdweb Documentation for updates or changes to the Paymaster and Bundler services to ensure compatibility and leverage new features.

Can’t get this working? If you've followed the above and still have issues, contact our support team for help.

Did this answer your question?
😞
😐
🤩