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.
toMultichainNexusAccount
Creates a multichain Nexus smart account that can operate across multiple chains with the same address.
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
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:
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.
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
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.
const instruction = await account.buildComposable(options);
See Instructions for full documentation.
build
Build a simple instruction without composability features.
const instruction = await account.build(options);
See Instructions for full documentation.
buildActionPolicy
Build a policy for Smart Session actions (sudo, universal, timeframe, usageLimit, spendingLimits).
const policy = account.buildActionPolicy(params);
See Smart Sessions – Policies for full documentation and examples.
buildSessionAction
Build session actions (transfer, transferFrom, approve, custom, or batch) to use with Smart Sessions.
const sessionAction = account.buildSessionAction(params);
See Smart Sessions – Actions for full documentation and examples.
deployments
Access individual chain deployments.
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.
const account = await toNexusAccount(options);
Parameters
| Parameter | Type | Required | Description |
|---|
signer | Account | Yes | The EOA signer |
chainConfiguration | ChainConfiguration | Yes | Single chain config |
Example
import { toNexusAccount, getMEEVersion, MEEVersion } from "@biconomy/abstractjs";
const account = await toNexusAccount({
signer,
chainConfiguration: {
chain: base,
transport: http(),
version: getMEEVersion(MEEVersion.V2_1_0)
}
});