Skip to main content
The React SDK grouped account abstraction under a single useSmartWallets() hook, created the smart account for you, and only ever displayed the smart wallet (and its underlying signer) inside the widget — there were no dedicated smart-wallet screens. The JavaScript SDK makes account abstraction explicit: you enable it with the ZeroDev extension, build user operations yourself, and sponsor gas with EVM functions.

Enabling smart wallets

useSmartWallets() becomes the ZeroDev extension. Register it once when you configure the client (alongside your chain extensions); it adds the smart-wallet provider so accounts and user operations are available. See Adding the ZeroDev extension for the full setup, and ZeroDev → native gas sponsorship if you’re moving off a previous ZeroDev integration.
In React, register the extension before rendering DynamicProvider — the call is the same.

Smart account and its signer

getOwnerWalletAccountForSmartWalletAccount({ smartWalletAccount }) returns the WalletAccount that signs for a smart wallet — use it to show the smart wallet address alongside its owner, the one display the widget used to render.
In React, read the wallet list with useGetWalletAccounts() and pass the smart wallet into these same functions.

Sponsoring gas

Sponsorship is explicit and lives in the chain packages. On EVM you check whether it’s enabled and send a sponsored transaction; with ZeroDev smart wallets you send a user operation and let the paymaster cover gas.
There’s no dedicated React hook — gas sponsorship is configured via extensions, so call these functions directly from your transaction handler. Before sending, canSponsorUserOperation() (ZeroDev) and isEvmGasSponsorshipEnabled() (EVM) let you decide whether to offer a gasless path or fall back to the user paying — and estimateUserOperationGas() / calculateFeeForUserOperation() give you the numbers to show.

What you now build

Smart wallets and sponsorship are configured through extensions and dashboard settings — there is no smart-wallet UI to migrate. What you build is:
  • The smart-wallet display — showing the smart account address and its owner signer.
  • Sponsored vs. self-paid choice — using the canSponsor / isEnabled checks to decide what to offer.
  • Transaction confirmation — sponsored and user-operation transactions confirm through the same confirmation UI you build for any transaction: Transaction confirmation & simulation (Building UI).

Errors you now own

Reference

Each function above has a dedicated reference page:

See also

Last modified on July 27, 2026