Skip to main content
AbstractJS is Biconomy’s TypeScript SDK for building gas-abstracted, cross-chain applications. It provides a viem-inspired API for managing smart accounts and orchestrating transactions.

When to Use AbstractJS

Use AbstractJS when...

  • You need fine-grained control over transactions
  • Building with TypeScript/JavaScript
  • Want to compose custom DeFi flows
  • Need runtime parameter injection

Use Supertransaction API when...

  • Rapid prototyping
  • Non-TypeScript environments
  • Pre-built DeFi integrations
  • Simpler use cases

Core Concepts

Multichain Nexus Account

A smart account that exists across multiple chains with the same address. Supports gas abstraction, batching, and cross-chain orchestration.
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) },
    { chain: arbitrum, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) }
  ]
});

MEE Client

Connects to the Modular Execution Environment—the network that executes your transactions gaslessly across chains.
const meeClient = await createMeeClient({ account });

Instructions

Building blocks for transactions. Can be simple calls or composable operations with runtime values.
const instruction = await account.buildComposable({
  type: "default",
  data: { chainId, to, abi, functionName, args }
});

What You Can Build

FeatureDescription
Gasless TransactionsUsers pay in any ERC-20 token or you sponsor entirely
Batch OperationsMultiple calls in one transaction
Cross-Chain FlowsBridge + swap + deposit with one signature
Runtime InjectionUse actual balances at execution time
Smart SessionsDelegate permissions to agents/bots

Quick Start

npm install @biconomy/abstractjs viem
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 });

Tutorials