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
Visit the Magmar Dashboard Go to Magmar Dashboard and sign in or create an account.
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.
Configure SDK with Magmar Paymaster Use the RPC endpoint provided by Magmar as the
PaymasterEndpointoption when initializing the Magmar SDK.Add funds to Sponsor Transactions To sponsor Mainnet transactions, add balance to your paymaster in the Magmar dashboard.
🛠️ Steps to Set Up on Pimlico
Visit the Pimlico Dashboard Go to Pimlico Dashboard and sign in or create an account.
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.
Configure SDK with Pimlico Paymaster Use the RPC endpoint provided by Pimlico as the
PaymasterEndpointoption when initializing the Magmar SDK.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