predictModularAccountV2Address

1function predictModularAccountV2Address(params): `0x${string}`;

Defined in: account-kit/smart-contracts/src/ma-v2/account/predictAddress.ts:51

Predicts the address of a modular account V2 based on the provided parameters, which include factory address, salt, and implementation address. This function supports different types of accounts including “SMA”, “MA”, and “WebAuthn”.

Example

1import { predictModularAccountV2Address } from "@account-kit/smart-contracts";
2
3const accountAddress = predictModularAccountV2Address({
4 factoryAddress: "0xFactoryAddress" as Address,
5 implementationAddress: "0xImplementation" as Address,
6 salt: 0n,
7 type: "SMA",
8 ownerAddress: "0xOwner" as Address,
9});

Parameters

ParameterTypeDescription

params

PredictModularAccountV2AddressParams

The parameters for predicting the modular account address, including factoryAddress, salt, implementationAddress, and additional properties based on the account type.

Returns

`0x${string}`

The predicted address for the modular account V2.