Paymaster

In the Magmar SDK, you have the option to choose between Pimlico and Magmar as paymasters. Below are the steps to set up Pimlico as your paymaster.


🛠️ Steps to Set Up on Magmar Dashboard

  1. Visit the Magmar Dashboard Go to Magmar Dashboardarrow-up-right and sign in or create an account.

  2. Create an Account and Select Chain After signing in, create an account and go to create paymaster section

    • Example RPC Endpoint: https://api.magmar.xyz/v1/{chainId}/rpc?apiKey={apiKey} Replace <api_key> with your actual API key and chainId with chain you are using.

  3. Configure SDK with Magmar Paymaster Use the RPC endpoint provided by Magmar as the PaymasterEndpoint option when initializing the Magmar SDK.

  4. Add funds to Sponsor Transactions To sponsor Mainnet transactions, add balance to your paymaster in the Magmar dashboard.


🛠️ Steps to Set Up on Pimlico

  1. Visit the Pimlico Dashboard Go to Pimlico Dashboardarrow-up-right and sign in or create an account.

  2. Create an Account and Select Chain After signing in, create an account and select the blockchain network you want to work with. You’ll need to obtain an API key and RPC endpoints specific to your selected chain.

    • Example RPC Endpoint: https://api.pimlico.io/v2/mumbai/rpc?apikey=<api_key> Replace <api_key> with your actual API key.

  3. Configure SDK with Pimlico Paymaster Use the RPC endpoint provided by Pimlico as the PaymasterEndpoint option when initializing the Magmar SDK.

  4. Add Balance to Sponsor Transactions To sponsor Mainnet transactions, add balance to your account under the Payment Methods section in the Pimlico dashboard.


🎉 Conclusion

By following these steps, you can set up Pimlico as your paymaster, enabling sponsored transactions in your application using the Magmar SDK. Be sure to configure the SDK with the correct RPC endpoint and maintain a sufficient balance to support Mainnet transactions.

Last updated