0.4.17 • Published 6 months ago

@biconomy/abstractjs-canary v0.4.17

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Biconomy Build License MIT codecov install size

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/abstractjs viem @rhinestone/module-sdk
  1. Basic Usage:
import { toMultichainNexusAccount, mcUSDC } from "@biconomy/abstractjs";
import { base, optimism } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";
import { http } from "viem";
const eoaAccount = privateKeyToAccount(`0x${process.env.PRIVATE_KEY}`)
const mcNexus = await toMultichainNexusAccount({
  chains: [base, optimism],
  transports: [http(), http()],
  signer: eoaAccount
})
const meeClient = await createMeeClient({ account: mcNexus })

const quote = await meeClient.getQuote({
  instructions: [{
    calls: [{ to: "0x...", value: 1n, gasLimit: 100000n }],
    chainId: base.id
  }],
  feeToken: {
    address: mcUSDC.addressOn(base.id),
    chainId: base.id
  }
})

// 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 (v22 or higher)
  • Bun package manager
  • Foundry
  • Yarn (must be 1.1.x, not 3.x). This is necessary because the nexus contracts repo relies on yarn.

Setup:

bun install --frozen-lockfile

Funding test accounts:

# Fund test nexus accounts with native tokens and USDC, using a funded PRIVATE_KEY master account
bun run fund:nexus

Running Tests:

# Run all tests
bun run test

# Run tests in watch mode for a specific subset of tests (by test description)
bun run test:watch -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

0.4.17

6 months ago

0.4.16

6 months ago

0.4.15

7 months ago

0.4.14

7 months ago

0.4.13

8 months ago

0.4.12

8 months ago

0.4.11

8 months ago

0.4.10

8 months ago

0.4.9

8 months ago

0.4.8

8 months ago

0.4.7

8 months ago

0.4.6

8 months ago

0.4.5

8 months ago

0.4.4

8 months ago

0.4.3

8 months ago

0.4.2

8 months ago

0.4.1

8 months ago

0.4.0

8 months ago

0.1.18

8 months ago

0.1.17

9 months ago

0.1.16

9 months ago

0.1.15

9 months ago

0.1.14

9 months ago

0.1.13

9 months ago

0.1.12

9 months ago

0.1.11

9 months ago

0.1.10

9 months ago

0.1.9

9 months ago

0.1.8

11 months ago

0.1.7

11 months ago