Configuration for initializing the BiconomySmartAccountV2 instance BiconomySmartAccountV2Config.
A promise that resolves to a new instance of BiconomySmartAccountV2.
An error if something is wrong with the smart account instance creation.
import { createClient } from "viem"
import { createSmartAccountClient, BiconomySmartAccountV2 } from "@biconomy/account"
import { createWalletClient, http } from "viem";
import { polygonAmoy } from "viem/chains";
const signer = createWalletClient({
account,
chain: polygonAmoy,
transport: http(),
});
const bundlerUrl = "" // Retrieve bundler url from dashboard
const smartAccountFromStaticCreate = await BiconomySmartAccountV2.create({ signer, bundlerUrl });
// Is the same as...
const smartAccount = await createSmartAccountClient({ signer, bundlerUrl });
Creates a new instance of BiconomySmartAccountV2
This method will create a BiconomySmartAccountV2 instance but will not deploy the Smart Account Deployment of the Smart Account will be donewith the first user operation.