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

# Account Functions

> Create and manage multichain smart accounts

## toMultichainNexusAccount

Creates a multichain Nexus smart account that can operate across multiple chains with the same address.

```typescript theme={null}
const account = await toMultichainNexusAccount(options);
```

### Parameters

| Parameter             | Type                      | Required | Description                          |
| --------------------- | ------------------------- | -------- | ------------------------------------ |
| `signer`              | `Account \| WalletClient` | Yes      | The EOA signer that owns the account |
| `chainConfigurations` | `ChainConfiguration[]`    | Yes      | Array of chain configs               |

### ChainConfiguration

| Property         | Type               | Required | Description                |
| ---------------- | ------------------ | -------- | -------------------------- |
| `chain`          | `Chain`            | Yes      | Viem chain object          |
| `transport`      | `Transport`        | Yes      | RPC transport              |
| `version`        | `MeeVersionConfig` | Yes      | MEE version config         |
| `accountAddress` | `Address`          | No       | Override for EIP-7702 mode |

### Returns

`MultichainSmartAccount`

### Example

```typescript theme={null}
import { toMultichainNexusAccount, getMEEVersion, MEEVersion } from "@biconomy/abstractjs";
import { http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base, optimism } from "viem/chains";

const signer = privateKeyToAccount("0x...");

const account = await toMultichainNexusAccount({
  signer,
  chainConfigurations: [
    { chain: base, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) },
    { chain: optimism, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) }
  ]
});
```

### EIP-7702 Mode

For embedded wallets, set `accountAddress` to the EOA address:

```typescript theme={null}
const account = await toMultichainNexusAccount({
  signer,
  chainConfigurations: [
    { 
      chain: base, 
      transport: http(), 
      version: getMEEVersion(MEEVersion.V2_1_0),
      accountAddress: signer.address  // Use EOA directly
    }
  ]
});
```

***

## MultichainSmartAccount Methods

### addressOn

Get the account address on a specific chain.

```typescript theme={null}
const address = account.addressOn(chainId, strict?);
```

| Parameter | Type      | Required | Description                                                        |
| --------- | --------- | -------- | ------------------------------------------------------------------ |
| `chainId` | `number`  | Yes      | Chain ID                                                           |
| `strict`  | `boolean` | No       | Enable strict mode—throws if chain is not in `chainConfigurations` |

Both calls return the **same address**. The `strict` flag is a safety check that throws an error if the requested chain was not defined in your `chainConfigurations`, helping catch configuration mistakes early.

### Example

```typescript theme={null}
const baseAddress = account.addressOn(8453);
const strictAddress = account.addressOn(8453, true);
// Both return the same address
// `true` throws if chain 8453 is not configured
```

***

### buildComposable

Build a composable instruction with support for runtime injection.

```typescript theme={null}
const instruction = await account.buildComposable(options);
```

See [Instructions](/sdk-reference/instructions) for full documentation.

***

### build

Build a simple instruction without composability features.

```typescript theme={null}
const instruction = await account.build(options);
```

See [Instructions](/sdk-reference/instructions) for full documentation.

***

### buildActionPolicy

Build a policy for Smart Session actions (sudo, universal, timeframe, usageLimit, spendingLimits).

```typescript theme={null}
const policy = account.buildActionPolicy(params);
```

See [Smart Sessions – Policies](/sdk-reference/sessions#policies) for full documentation and examples.

***

### buildSessionAction

Build session actions (transfer, transferFrom, approve, custom, or batch) to use with Smart Sessions.

```typescript theme={null}
const sessionAction = account.buildSessionAction(params);
```

See [Smart Sessions – Actions](/sdk-reference/sessions#actions) for full documentation and examples.

***

### deployments

Access individual chain deployments.

```typescript theme={null}
for (const deployment of account.deployments) {
  const isDeployed = await deployment.isDeployed();
  console.log(`Chain ${deployment.chain.id}: ${isDeployed}`);
}
```

***

## toNexusAccount

Creates a single-chain Nexus account. Use for bundler-based flows without MEE.

```typescript theme={null}
const account = await toNexusAccount(options);
```

### Parameters

| Parameter            | Type                 | Required | Description         |
| -------------------- | -------------------- | -------- | ------------------- |
| `signer`             | `Account`            | Yes      | The EOA signer      |
| `chainConfiguration` | `ChainConfiguration` | Yes      | Single chain config |

### Example

```typescript theme={null}
import { toNexusAccount, getMEEVersion, MEEVersion } from "@biconomy/abstractjs";

const account = await toNexusAccount({
  signer,
  chainConfiguration: {
    chain: base,
    transport: http(),
    version: getMEEVersion(MEEVersion.V2_1_0)
  }
});
```
