Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@biconomy/sdk

bcnmy1.4kMIT0.0.29TypeScript support: included

SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.

erc-7579, modular smart account, account abstraction, biconomy, sdk

readme

Biconomy License MIT codecov

abstractJS 🚀

Open in GitHub Codespaces

The Biconomy SDK is your all-in-one toolkit for building decentralized applications (dApps) with ERC4337 Account Abstraction and Smart Accounts. It is designed for seamless user experiences and offers non-custodial solutions for user onboarding, sending transactions (userOps), gas sponsorship and much more.

📚 Table of Contents

🛠️ Quickstart

Installation

  1. Add the package:

    bun add @biconomy/sdk viem @rhinestone/module-sdk
  2. Basic Usage: `typescript import { toMultichainNexusAccount, mcUSDC } from "@biconomy/sdk"; import { base, optimism } from "viem/chains"; import { privateKeyToAccount } from "viem/accounts";

const eoaAccount = privateKeyToAccount(0x${process.env.PRIVATE_KEY}) const mcNexus = await toMultichainNexusAccount({ chains: [base, optimism], signer: eoaAccount }) const meeClient = createMeeClient({ account: mcNexus })

const quote = await meeClient.getQuote({ instructions: [{ calls: [{ to: "0x...", value: 1n }], chainId: base.id }], feeToken: { address: mcUSDC.addressOn(base.id), // Token used to pay for the transaction chainId: base.id // Chain where the payment will be processed } })

// Execute the quote and get back a transaction hash // This sends the transaction to the network const { hash } = await meeClient.executeQuote({ quote })


### Testing

**Prerequisites:**
- [Node.js](https://nodejs.org/en/download/package-manager) *(v22 or higher)*
- [Bun](https://bun.sh/) package manager
- [Foundry](https://book.getfoundry.sh/getting-started/installation)
- [Yarn](https://www.npmjs.com/package/yarn) *(must be 1.1.x, not 3.x)*. This is necessary because the nexus contracts repo relies on yarn.

**Setup:**
```bash
bun install --frozen-lockfile

Running Tests:

# Run all tests
bun run test

# Run tests for a specific subset of tests (by test description)
bun run test -t=mee

For detailed information about the testing framework, network configurations, and debugging guidelines, please refer to our Testing Documentation.

Documentation and Resources

For a comprehensive understanding of our project and to contribute effectively, please refer to the following resources:

License

This project is licensed under the MIT License. See the LICENSE file for details

Connect with Biconomy 🍊

Website Telegram Twitter LinkedIn Discord YouTube GitHub

changelog

@biconomy/sdk

0.0.29

Patch Changes

  • AbstractJS rebrand
  • meeNode support
  • useTestBundler

0.0.28

Patch Changes

  • Sudo fallback for empty rules

0.0.27

Patch Changes

  • useRegistry false attestation fix

0.0.26

Patch Changes

  • Remove signature from prepareUserOperation flow

0.0.25

Patch Changes

  • Upgrade smart session and rhinestone sdk version

0.0.24

Patch Changes

  • Remove tenderlyUrl from env vars

0.0.23

Patch Changes

  • Remove isTesting helper from testing framework

0.0.22

Patch Changes

  • Smart sessions enable mode

0.0.21

Patch Changes

  • Add support for token paymaster with helper functions

0.0.20

Patch Changes

  • Counterfactual address helper export

0.0.18

Patch Changes

  • fix window.ethereum

0.0.17

Patch Changes

  • Add mock attestor only for testnets

0.0.16

Patch Changes

  • Add mock attestor and option to include attestors during createAccount

0.0.15

Patch Changes

  • Migrate to Nexus: b4d6ff463bc41dc232292c385bdb76814ca8689c

0.0.14

Patch Changes

  • Add rhintestones attestation address during createAccount

0.0.13

Patch Changes

  • Fix getAddress()

0.0.12

Patch Changes

  • Policy support

0.0.11

Patch Changes

  • Fix WalletClient signer

0.0.10

Patch Changes

  • Added Distributed Session Keys w/ Ownable & Session examples

0.0.9

Patch Changes

  • Added DAN helpers, keyGen + sigGen

0.0.8

Patch Changes

  • Paymaster script fix

0.0.7

Patch Changes

  • Include missing deps

0.0.5

Patch Changes

  • Alter sessions terminology

0.0.4

Patch Changes

  • renamed validator modules

0.0.3

Patch Changes

  • modules dx improvements

0.0.0