createAccount

Authenticates the user by either email or passkey account creation flow. Emits events during the process.

Import

1import { AlchemySignerWebClient } from "@account-kit/signer";

Usage

1import { AlchemySignerWebClient } from "@account-kit/signer";
2
3const client = new AlchemySignerWebClient({
4 connection: {
5 apiKey: "your-api-key",
6 },
7 iframeConfig: {
8 iframeContainerId: "signer-iframe-container",
9 },
10});
11
12const account = await client.createAccount({
13 type: "email",
14 email: "[email protected]",
15});

Parameters

params

CreateAccountParams The parameters for creating an account, including the type (email or passkey) and additional details.

Returns

Promise<SignupResponse> A promise that resolves with the response object containing the account creation result.