Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Helper functions and constants
import { getMeeScanLink } from "@biconomy/abstractjs"; const link = getMeeScanLink(hash);
hash
Hex
string
const { hash } = await meeClient.executeQuote({ quote }); const link = getMeeScanLink(hash); console.log("View transaction:", link); // https://meescan.biconomy.io/tx/0x...
import { getMEEVersion, MEEVersion } from "@biconomy/abstractjs"; const version = getMEEVersion(MEEVersion.V2_1_0);
enum MEEVersion { V2_1_0 = "2.1.0", V2_2_0 = "2.2.0" }
const account = await toMultichainNexusAccount({ signer, chainConfigurations: [ { chain: base, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) } ] });
import { userOp } from "@biconomy/abstractjs"; const ref = userOp(2); // Reference to 3rd instruction (0-indexed)
const quote = await meeClient.getQuote({ instructions: [instruction1, instruction2, instruction3], cleanUps: [ { chainId: 8453, tokenAddress: USDC, recipientAddress: userEOA, dependsOn: [userOp(2)] // Wait for instruction3 } ], feeToken });
import { toFeeToken } from "@biconomy/abstractjs"; const feeToken = toFeeToken({ mcToken: mcUSDC, chainId: 8453 });
const quote = await meeClient.getFusionQuote({ trigger, instructions, feeToken, simulation: { simulate: true, overrides: { tokenOverrides: [ { tokenAddress: USDC, chainId: 8453, balance: parseUnits("1000", 6), accountAddress: account.addressOn(8453, true) } ] } } });
simulate
boolean
overrides
Overrides
tokenOverrides
TokenOverride[]
customOverrides
CustomOverride[]
gasLimitBuffers
Record<number, bigint>
import { DEFAULT_PATHFINDER_URL, DEFAULT_MEE_TESTNET_SPONSORSHIP_PAYMASTER_ACCOUNT, DEFAULT_MEE_TESTNET_SPONSORSHIP_TOKEN_ADDRESS, DEFAULT_MEE_TESTNET_SPONSORSHIP_CHAIN_ID } from "@biconomy/abstractjs";
const NEXUS_V120_SINGLETON = "0x000000004F43C49e93C970E84001853a70923B03";
import type { MeeClient, MultichainSmartAccount, Instruction, FeeTokenInfo, Trigger, Quote, FusionQuote, Receipt, SessionDetails, Condition, RuntimeValue, CleanUp } from "@biconomy/abstractjs";
import { parseUnits, parseEther, formatUnits, encodeFunctionData, decodeFunctionResult, toFunctionSelector, getAbiItem, pad, toHex } from "viem";
try { const { hash } = await meeClient.executeQuote({ quote }); const receipt = await meeClient.waitForSupertransactionReceipt({ hash }); if (receipt.transactionStatus === "MINED_SUCCESS") { console.log("Success!"); } else if (receipt.transactionStatus === "MINED_FAILED") { console.error("Transaction failed on-chain"); receipt.userOps.forEach(op => { console.log(`Chain ${op.chainId}: ${op.executionStatus}`); }); } } catch (error) { if (error.code === "INSUFFICIENT_FUNDS") { console.error("Not enough tokens for gas"); } else if (error.code === "SIMULATION_FAILED") { console.error("Transaction would revert"); } else { throw error; } }