> ## Documentation Index
> Fetch the complete documentation index at: https://developers.particle.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Web SDK: Universal Accounts

> Reference for the Universal Accounts JS/TS SDK — installation, account modes, and links to per-topic pages.

The **Universal Accounts SDK** provides **chain abstraction** for your app by integrating Universal Accounts. These offer your users a single account, balance, and interaction point across **EVM chains** and **Solana**.

Our SDK integrates with existing connection flows with minimal setup.

> [card] [Learn More About Universal Accounts](https://developers.particle.network/intro/universal-accounts)
>
> What are Universal Accounts, how do they work, and what problems do they solve?

Try Interactive Demo

## Installation

Once your app is set up, install the **Universal Accounts SDK**:

> [!NOTE]
>
> The SDK depends on `ethers.js` internally, but you are not required to use it directly. You can use any provider or signer that fits your setup.

```bash yarn theme={null}
yarn add @particle-network/universal-account-sdk ethers
```

```bash npm theme={null}
npm install @particle-network/universal-account-sdk ethers
```

## Account Modes

Universal Accounts can operate in two modes, depending on your wallet setup and execution environment:

### 7702 Mode (Default)

Within this mode:

* Your user's existing EOA is upgraded to act directly as a Universal Account.
* The EOA address and Universal Account address are the same.
* Assets already held at the user's EOA are immediately usable on their Universal Account—without transferring assets.
* No smart account deployments needed.

This mode provides the lowest friction and is recommended for most applications.

### Smart Account Mode

Within this mode:

* A separate smart account is attached to your user's EOA.
* The smart account has its own address, separate from the EOA.
* Users must transfer assets to the smart account before using it.

This mode exists primarily for compatibility with JSON-RPC wallets.

### Mode Comparison

| Mode | Account Address | Asset Transfer Required | JSON-RPC Support |
| - | - | - | - |
| 7702 (default) | Same as EOA | No | No |
| Smart Account | Separate | Yes | Yes |

## Integration flow

**1. Connect a user's account**

A user logs in by connecting a wallet or via a social login.

**2. Understand account modes**

Universal Accounts support two execution modes. Choosing the right one determines how the user's account behaves.

**3. Initialize Universal Accounts**

Once connected, pass the user's EOA address to the SDK and configure your project details.

**4. Use the UA instance**

Use the returned Universal Account instance to fetch data and send transactions across chains.

When sending a transaction, the SDK creates a **UserOperation** and returns a `rootHash`.\
This hash must be **signed by the connected EOA**, then passed back into `sendTransaction()` to broadcast.

Under the hood, all routing, bridging, and gas abstraction are handled by Particle Network's infrastructure.

## Reference

### Setup

> [card] [Initialization & Configuration](https://developers.particle.network/universal-accounts/ua-reference/web/initialization.md)
>
> Configure project credentials, account mode, and `tradeConfig`.

> [card] [Addresses](https://developers.particle.network/universal-accounts/ua-reference/web/addresses.md)
>
> Retrieve the owner EOA, EVM UA, and Solana UA addresses.

> [card] [Primary Assets & Unified Balance](https://developers.particle.network/universal-accounts/ua-reference/web/balances.md)
>
> Fetch the unified balance and per-chain asset breakdowns.

> [card] [EIP-7702 Compatible Wallets](https://developers.particle.network/universal-accounts/ua-reference/web/eip7702-wallets.md)
>
> Demos and integration notes for Dynamic, Magic, and Privy.

### Transactions

> [card] [Transfer](https://developers.particle.network/universal-accounts/ua-reference/web/transactions/transfer.md)
>
> `createTransferTransaction()` — send tokens cross-chain.

> [card] [Custom Payable](https://developers.particle.network/universal-accounts/ua-reference/web/transactions/custom.md)
>
> `createUniversalTransaction()` — call any contract.

> [card] [Buy](https://developers.particle.network/universal-accounts/ua-reference/web/transactions/buy.md)
>
> `createBuyTransaction()` — buy a token with USD value.

> [card] [Sell](https://developers.particle.network/universal-accounts/ua-reference/web/transactions/sell.md)
>
> `createSellTransaction()` — sell a token into a primary asset.

> [card] [Conversion](https://developers.particle.network/universal-accounts/ua-reference/web/transactions/conversion.md)
>
> `createConvertTransaction()` — convert between primary assets.

> [card] [Solana](https://developers.particle.network/universal-accounts/ua-reference/web/transactions/solana.md)
>
> Send transactions on Solana from any chain's funds.

> [card] [Transaction Preview](https://developers.particle.network/universal-accounts/ua-reference/web/transactions/preview.md)
>
> Inspect fees and token movements before signing.

> [card] [sendTransaction() Response](https://developers.particle.network/universal-accounts/ua-reference/web/transactions/send-response.md)
>
> Full breakdown of the `TransactionResult` object.

### History & Integration

> [card] [Transaction History](https://developers.particle.network/universal-accounts/ua-reference/web/history.md)
>
> Fetch a user's past transactions and details.

> [card] [Particle Connect](https://developers.particle.network/universal-accounts/ua-reference/web/particle-connect.md)
>
> Sign UA transactions with a wallet from Particle Connect.

> [card] [Backend / Server-side](https://developers.particle.network/universal-accounts/ua-reference/web/backend.md)
>
> Use Universal Accounts in Node.js with a private key.

> [card] [UniversalX Registration](https://developers.particle.network/universal-accounts/ua-reference/web/universalx.md)
>
> Register a Universal Account on UniversalX.

## Next steps

> [card] [Quickstart](https://developers.particle.network/universal-accounts/web-quickstart.md)
>
> Build your first Universal Account integration in 5 minutes.

> [card] [FAQ](https://developers.particle.network/universal-accounts/ua-reference/faq.md)
>
> Common questions about the SDK.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.