Integrate Para with Ethers.js (v5 or v6) to enable secure transaction signing while preserving the full Ethers API functionality.
Ethers.js is a library for interacting with Ethereum. This guide shows how to integrate Para’s secure signing with both v6 and v5 versions. Build transactions with Ethers API and sign them securely using Para.
To use Para, you need an API key. This key authenticates your requests to Para services and is essential for integration. Before integrating Para with your application, ensure you have:
Need an API key? Visit the Developer Portal to create API keys, manage billing, teams, and more.
Choose your package manager to install the Para Ethers integration along with Ethers.js:
Once you’ve set up the Para Ethers Signer, you can use it just like any standard Ethers signer. Para handles the secure signing process without changing how you construct transactions. An example of sending ETH and interacting with a smart contract is provided below.
As long as the Para client is authenticated and has wallets available, you can use the full Ethers.js API with the Para Ethers Signer without any additional changes.
The ParaEthersSigner
provides standard Ethers.js signer functionality, allowing you to use Para’s secure signing capabilities:
Para handles only the signing process. It does not modify your transaction in any way. All transaction construction, including gas estimations and parameter settings, is your responsibility through the Ethers.js API.
When working with the ParaEthersSigner
, keep in mind:
Authentication requirement: The Para client must have an authenticated account before attempting any signing operations.
Wallet availability: Ensure Para has wallets available for the EVM wallet type. If you encounter errors about missing wallets, check your developer portal settings for your API key is configured for EVM wallet types.
Transaction construction: Para only signs the raw bytes of the transaction you provide. Any issues related to transaction parameters (gas price, gas limit, etc.) or RPC interactions are not related to Para’s signing functionality. The RPC endpoint or the transaction itself may be the source of any issues.
Network configuration: Make sure your RPC endpoint matches the network configuration in your Para setup. Ensuring you set the correct RPC URL to match the transaction Chain ID is crucial for successful transaction signing and submission.
Para’s signers can also be used on the server-side using pregen wallets or an active client side session. To learn more about using para on the server, check out these guides:
If you’d like to learn more about how to use the ParaEthersSigner for different transaction types, check out this example in our Examples Hub:
Transaction Fails with RPC Error
If your transaction fails with an RPC error, the issue is likely related to transaction construction, not Para’s signing process. Common causes include:
Try constructing a simpler transaction first to verify the signing process works correctly.
No Wallets Available
If you receive an error about no wallets being available:
Signature Verification Issues
If signatures are not being verified correctly:
getAddress()
Now that you’ve completed signing transactions with Ethers.js, explore more advanced features like Permissions Popups. If you’re ready to kick off your project launch with Para, check out our Go Live Checklist.