createAccount

Prepares a transaction to call the "createAccount" function on the contract.

Example

import { sendTransaction } from "thirdweb";
import { createAccount } from "thirdweb/extensions/erc4337";
const transaction = createAccount({
contract,
admin: ...,
data: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function createAccount(
| { asyncParams: () => Promise<CreateAccountParams> }
>,

Parameters

The options for the "createAccount" function.

Type

| { asyncParams: () => Promise<CreateAccountParams> }
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.