import { createMeeClient, toMultichainNexusAccount, getMEEVersion, MEEVersion } from "@biconomy/abstractjs";
import { http } from "viem";
import { optimism, base } from "viem/chains";
// 1. Create account
const account = await toMultichainNexusAccount({
signer: wallet,
chainConfigurations: [
{ chain: optimism, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) },
{ chain: base, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) }
]
});
// 2. Create client
const meeClient = await createMeeClient({ account });
// 3. Build and execute
const quote = await meeClient.getQuote({
instructions: [/* your calls */],
feeToken: { address: USDC, chainId: base.id }
});
const { hash } = await meeClient.executeQuote({ quote });