Skip to main content
Version: SDK V3

Integration

To use the full potential of the Biconomy Smart Account you will need a bundler url and a paymaster api key. Below is a basic installation and integration for smart accounts in your code.

Installation

First, install the required packages for initializing the Smart Account.


npm install @biconomy/account @biconomy/bundler @biconomy/paymaster @biconomy/common @biconomy/core-types @biconomy/modules

Integration

Now you can simply create smart accounts like this.

  import { ethers } from "ethers";
import { BiconomySmartAccountV2} from "@biconomy/account";

let provider = new ethers.providers.JsonRpcProvider("rpcUrl");
let signer = new ethers.Wallet("private key", provider);

const biconomySmartAccountConfig = {
signer: signer,
chainId: 80002
biconomyPaymasterApiKey: "https://legacy-docs.biconomy.io/dashboard/paymaster",
bundlerUrl: ""
};

const biconomySmartAccount = await BiconomySmartAccountV2.create(
biconomySmartAccountConfig
);

This smart account uses the following default values:

  • ECDSA Validation Module
  • default entry point address for the chainId
  • paymaster instance is created by the SDK

Was this page helpful?