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 Native 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

Provider43377702Chain 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

Provider Guides

Select a provider below for installation and usage instructions.
Alchemy Account Kit 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 Alchemy account and obtain your API key and Gas Policy ID from the Alchemy dashboard.
  2. Install the required dependencies:
npm install @getpara/react-native-wallet @getpara/aa-alchemy viem

Usage

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

const ALCHEMY_API_KEY = process.env.EXPO_PUBLIC_ALCHEMY_API_KEY!;
const GAS_POLICY_ID = process.env.EXPO_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 <Text>Setting up smart account...</Text>;
  if (error) return <Text>Error: {error.message}</Text>;
  if (!smartAccount) return null;

  return (
    <View>
      <Text>Smart Account: {smartAccount.smartAccountAddress}</Text>
      <Text>Mode: {smartAccount.mode}</Text>
      <Button
        title={isSending ? "Sending..." : "Send Transaction"}
        onPress={() => sendTransaction()}
        disabled={isSending}
      />
      {sendError && <Text>Send failed: {sendError.message}</Text>}
      <Button
        title={isBatching ? "Batching..." : "Send Batch"}
        onPress={() => sendBatch()}
        disabled={isBatching}
      />
      {batchError && <Text>Batch failed: {batchError.message}</Text>}
    </View>
  );
}
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 Alchemy Dashboard and pass the policy ID as gasPolicyId.

Next Steps