Skip to main content

Account Abstraction

Account abstraction (AA) replaces traditional externally owned accounts (EOAs) with programmable smart contract accounts. This unlocks capabilities that EOAs alone cannot provide:
  • Gas sponsorship — let users transact without holding native tokens for gas fees
  • Batched transactions — bundle multiple operations into a single atomic transaction
  • Session keys — grant temporary, scoped permissions without exposing the primary key
  • Custom authorization — implement multi-factor auth, spending limits, or recovery logic at the account level
  • Programmable accounts — create accounts with built-in rules for corporate or multi-user scenarios
Two standards are currently in use for AA on EVM-based chains:
EIP-4337EIP-7702
How it worksUserOperations processed by bundlers via an EntryPoint contractEOA delegates to a smart contract via a type-4 transaction
Account addressNew smart contract address (different from EOA)Same as your EOA
Chain supportAll EVM chainsRequires chain-level support
InfrastructureBundler + PaymasterProvider-dependent
Gas overheadHigher (extra validation steps)Lower (native execution)
MaturityProduction-readyEmerging
Best forMaximum compatibility, dedicated smart walletKeeping EOA address, simpler flows
Both standards support gas sponsorship and batched transactions.
Learn more about EIP-4337 and EIP-7702 on the Ethereum Improvement Proposals site.

Para Integrations

Para acts as the signer (EOA) that controls smart contract wallets — it is not a smart wallet itself. Para handles secure key management via MPC, while the AA provider deploys and manages the smart contract account on-chain. This means your users’ private keys remain secure and under their control regardless of which provider you choose. Para wraps each provider in a shared SmartAccount interface. Whether you use EIP-4337 or EIP-7702 mode, your application code stays the same — you can swap providers or switch between standards without rewriting transaction logic. Every provider integration is available as an action function (createXxxSmartAccount) — an imperative async function you can call anywhere, including outside React components, inside custom hooks, or in server-side code. React applications also get a hook (useXxxSmartAccount) — a declarative wrapper powered by React Query that handles initialization, caching, and automatic re-creation when config changes. Both return the same SmartAccount object:
import type { Chain, Hex, LocalAccount, TransactionReceipt } from "viem";

interface SmartAccount {
  smartAccountAddress: Hex;              // On-chain account address
  signer: LocalAccount;                 // Para viem signer
  chain: Chain;                          // Configured chain
  mode: "4337" | "7702";                // Account type
  provider: string;                      // Provider name

  // Send a single transaction and wait for receipt
  sendTransaction(params: {
    to: Hex;
    value?: bigint;
    data?: Hex;
  }): Promise<TransactionReceipt>;

  // Send batched transactions atomically
  sendBatchTransaction(calls: Array<{
    to: Hex;
    value?: bigint;
    data?: Hex;
  }>): Promise<TransactionReceipt>;

  client: any;                           // Provider-specific client for advanced usage
}
When using mode: "7702", the return type narrows to include an optional delegationAddress field — the smart contract the EOA delegates to. When using mode: "4337", smartAccountAddress is the counterfactual smart contract address (different from signer.address).

Provider Comparison

Provider43377702External WalletsChain RestrictionsKey Feature
AlchemyAlchemy-supported chainsModular accounts, gas policies
ZeroDevAny EVM chainKernel accounts, session keys, plugins
PimlicoAny EVM chainPermissionless SDK, flexible paymaster
BiconomyMEE-supported chainsCross-chain orchestration via MEE
ThirdwebAny EVM chainSmart wallets, gas sponsorship
GelatoAny EVM chainNative 7702, built-in gas sponsorship
PortoMultiple chains7702-native relay, merchant-based gas sponsorship
SafeAny EVM chainMulti-sig, modular accounts
RhinestoneAny EVM chainCross-chain orchestration
Coinbase Developer PlatformBase, Base Sepolia onlyCoinbase smart accounts

Using with External Wallets

If your user signs in with a supported browser wallet (MetaMask, Rainbow, etc.) and has no embedded wallets in their session, invoking any of the hooks and not specifying an address (or specifying the external wallet’s address) will use that wallet as the smart account signer, with no extra configuration needed.
  • External wallets can only use EIP-4337 mode. EIP-7702 requires signAuthorization, which most browser wallets currently don’t support — attempting it throws a SmartAccountError with code INVALID_CONFIG.
  • The external wallet must be on the same chain as the smart account before calling sendTransaction. A mismatch throws a SmartAccountError with code CHAIN_MISMATCH. You can use wagmi’s useSwitchChain to manage your connection state before attempting a transaction.

Provider Guides

Select a provider below for installation and usage instructions.
provides modular smart accounts with built-in gas sponsorship via Alchemy’s Gas Manager. Create and manage smart accounts, submit gasless transactions, and execute batched UserOperations — all without requiring users to leave your application. Supports both EIP-4337 and EIP-7702 modes.

Setup

  1. Create an and obtain your API key and Gas Policy ID from the Alchemy dashboard.
  2. Install the required dependencies:
npm install @getpara/react-sdk viem

Usage

The simplest way to integrate Alchemy smart accounts into your Para React application. The hook manages initialization, caching, and re-creation automatically via React Query.
AlchemySmartAccount.tsx
import { useAlchemySmartAccount } from "@getpara/react-sdk";
import { useMutation } from "@tanstack/react-query";
import { sepolia } from "viem/chains";
import { parseEther } from "viem";

const ALCHEMY_API_KEY = process.env.NEXT_PUBLIC_ALCHEMY_API_KEY!;
const GAS_POLICY_ID = process.env.NEXT_PUBLIC_ALCHEMY_GAS_POLICY_ID!;

export function AlchemySmartAccount() {
  // Initialize the smart account. The hook handles Para signer creation,
  // account client setup, and paymaster configuration internally.
  // It re-creates the account automatically if any config value changes.
  const { smartAccount, isLoading, error } = useAlchemySmartAccount({
    apiKey: ALCHEMY_API_KEY,
    chain: sepolia,
    gasPolicyId: GAS_POLICY_ID, // enables gas sponsorship
    mode: "4337", // or "7702" — see EIP comparison above
  });

  // Wrap sendTransaction in a mutation for loading/error state management.
  const {
    mutate: sendTransaction,
    isPending: isSending,
    error: sendError,
  } = useMutation({
    mutationFn: async () => {
      if (!smartAccount) throw new Error("Smart account not ready");
      return smartAccount.sendTransaction({
        to: "0xRecipient",
        value: parseEther("0.01"),
      });
    },
    onSuccess: (receipt) => {
      console.log("Transaction hash:", receipt.transactionHash);
    },
  });

  // Wrap sendBatchTransaction for executing multiple calls atomically.
  // All calls are bundled into a single on-chain transaction.
  const {
    mutate: sendBatch,
    isPending: isBatching,
    error: batchError,
  } = useMutation({
    mutationFn: async () => {
      if (!smartAccount) throw new Error("Smart account not ready");
      return smartAccount.sendBatchTransaction([
        { to: "0xRecipientA", value: parseEther("0.01") },
        { to: "0xRecipientB", data: "0xencodedCallData" },
      ]);
    },
    onSuccess: (receipt) => {
      console.log("Batch tx hash:", receipt.transactionHash);
    },
  });

  if (isLoading) return <p>Setting up smart account...</p>;
  if (error) return <p>Error: {error.message}</p>;
  if (!smartAccount) return null;

  return (
    <div>
      <p>Smart Account: {smartAccount.smartAccountAddress}</p>
      <p>Mode: {smartAccount.mode}</p>

      {/* Single transaction */}
      <button onClick={() => sendTransaction()} disabled={isSending}>
        {isSending ? "Sending..." : "Send Transaction"}
      </button>
      {sendError && <p>Send failed: {sendError.message}</p>}

      {/* Batched transactions */}
      <button onClick={() => sendBatch()} disabled={isBatching}>
        {isBatching ? "Batching..." : "Send Batch"}
      </button>
      {batchError && <p>Batch failed: {batchError.message}</p>}
    </div>
  );
}
Alchemy requires chains from @account-kit/infra (e.g. sepolia, baseSepolia). Plain viem chains are automatically mapped if an Alchemy equivalent exists. For gasless transactions, set up a Gas Manager Policy in your and pass the policy ID as gasPolicyId.
External wallet support: Alchemy supports external wallets (e.g. MetaMask, Rainbow) as signers via the signer parameter in 4337 mode. Requesting mode: "7702" with an external wallet will throw a SmartAccountError — external wallets cannot produce the raw signAuthorization needed for EIP-7702.

Examples

Explore working examples of Para with AA providers: