Smart Accounts
A Smart Account is a smart contract that acts as a user’s wallet. Unlike a standard EOA (Externally Owned Account) like MetaMask — controlled by one private key, paid for in the chain’s native token — a Smart Account defines its rules in code: which keys can sign, how gas is paid, who can recover the account.
0xGasless uses the ERC-4337 standard to enable this, with two SDKs depending on where the signing key lives:
| You want… | Use |
|---|---|
| Browser app, user signs from an embedded wallet (no extension) | @0xgasless/core — OxGasClient wraps embedded wallet + smart account |
| Server bot or agent that signs autonomously | @0xgasless/core — OxGasServerWallet (EOA, no smart account needed) |
| Bring-your-own signer (local key, viem, ethers, hardware) | @0xgasless/smart-account — the low-level SDK |
Why use Smart Accounts?
Section titled “Why use Smart Accounts?”EOAs are notoriously difficult for mainstream users:
- Gas. You need ETH to do anything. Want to send USDC? You need ETH first.
- Batching. Approving a token and calling a contract takes two separate transactions, two separate signatures.
- Key loss. If you lose your seed phrase, you lose your wallet — there’s no recovery built into the protocol.
Smart Accounts fix these problems by moving validation and execution into a contract you control:
- Gasless transactions. A Paymaster sponsors gas. Users transact for free.
- Pay gas with ERC-20s. If you don’t sponsor, users can pay gas in USDC instead of ETH.
- Batched transactions. Approve and swap in a single click.
- Session keys. Grant an app permission to act on the user’s behalf for a fixed window without re-signing.
- Account recovery. Set up guardians to restore access if the primary key is lost.
How it works
Section titled “How it works”Instead of broadcasting a normal Ethereum transaction, the user signs a UserOperation — a data structure describing what they want to do.
- The user signs the UserOperation.
- Your app sends it to a Bundler.
- The Bundler groups multiple UserOperations into one normal transaction and submits it to the global EntryPoint contract.
- The EntryPoint validates the signature via the user’s Smart Account.
- If a Paymaster is involved, the EntryPoint charges the Paymaster for gas.
- The EntryPoint tells the Smart Account to execute the call.
User signs Your app Bundler EntryPoint Smart Account────────── ──────── ─────── ────────── ─────────────UserOp ─────────► sendUserOp ───────────► bundles into a tx ─────────► validates sig ──► validateUserOp │ ◄────── OK │ │ (Paymaster?) │ │ ──────────────► executeThe 0xGasless SDKs
Section titled “The 0xGasless SDKs”@0xgasless/core (recommended for browser apps)
Section titled “@0xgasless/core (recommended for browser apps)”OxGasClient from @0xgasless/core ties authentication, the embedded wallet’s KMS signer, smart-account creation, and gasless transactions into one object. Start here if your users live in the browser.
import { OxGasClient } from '@0xgasless/core';
const client = new OxGasClient({ apiKey: 'your-api-key', chainId: 11155111, bundlerUrl: 'https://bundler.0xgasless.com/11155111', paymasterUrl: 'https://paymaster.0xgasless.com/v1/11155111/rpc/your-api-key',});
await client.login();await client.setupSmartAccount();await client.sendTransaction({ to: '0x...', value: 0n, data: '0x' });See Embedded Wallets → Smart Account Integration for the full flow.
Bring-your-own signer
Section titled “Bring-your-own signer”If you already have a signer — privateKeyToAccount from viem, an ethers Wallet, a hardware device — use @0xgasless/smart-account directly to wrap it in an ERC-4337 smart account.
See the Quickstart for the standalone setup.
Next steps
Section titled “Next steps”- Quickstart — deploy your first smart account with a local signer.
- Smart Accounts (deep dive) — what the contract actually does.
- Bundlers — how UserOperations land on-chain.
- Paymasters — how gas sponsorship works.
- Send a Transaction — the single-call flow.
- Batch Transactions — multiple atomic calls in one UserOp.