usePortoSmartAccount hook handles the entire upgrade flow — wrapping the Para signer, registering admin keys, and submitting the upgrade to Porto’s relay — so you can focus on your application logic.
What You Get
| Feature | Para EOA | Porto Smart Account |
|---|---|---|
| Address | Single address | Same address (preserved) |
| Signing Keys | 1 (MPC-secured) | Multiple authorized keys |
| Session Keys | Not supported | Supported |
| Batched Transactions | Not supported | Supported |
| Gas Sponsorship | Not supported | Supported |
| Programmable Permissions | Not supported | Supported |
Integration Pattern
Para handles:- Authentication (social login, email, SMS)
- Key custody (MPC security)
- Cross-app identity
- Raw message signing
- Smart account operations (EIP-7702)
- Transaction batching
- Gas sponsorship
- Session key management
Prerequisites
- Para API key from the Para Developer Portal
- Basic React and Next.js knowledge
- Node.js 18+
Installation
Setup Para Provider
Configure the Para provider:Gas Sponsorship
On testnets, Porto’s relay sponsors gas by default — no configuration needed. For mainnet, you must set up a Porto merchant account to cover gas fees for your users:- Run
pnpx porto onboard --admin-keyto create a merchant account - Deploy a server-side merchant route using
porto/server - Pass your endpoint URL as
merchantUrlin the hook config
Usage
Use theusePortoSmartAccount hook to create and manage a Porto smart account. The hook handles Para signer creation, admin key registration, EOA upgrade, and Porto relay configuration internally.
Accessing the Porto Client Directly
For advanced use cases like session key management, access the underlying Porto client:How It Works
TheusePortoSmartAccount hook performs these steps internally:
- Resolves the Para wallet — finds the user’s EVM wallet address
- Creates a viem account — wraps the Para signer for raw ECDSA signing
- Connects to Porto’s relay — creates a client pointed at
https://rpc.porto.sh - Registers an admin key — creates a secp256k1 admin key from the Para signer
- Upgrades the EOA — submits a 7702 delegation via
prepareUpgradeAccount+upgradeAccount - Returns a unified SmartAccount — with
sendTransaction,sendBatchTransaction, and access to the underlying Porto client
Next Steps
Porto Documentation
Explore Porto’s smart account features and SDK documentation
Account Abstraction Guide
See all supported AA providers and the unified SmartAccount interface
Example Repository
View the complete working example
Para React SDK
Learn more about Para’s React SDK features and configuration