createAccount
Authenticates the user by either email or passkey account creation flow. Emits events during the process.
Import
import { AlchemySignerWebClient } from "@account-kit/signer";
Usage
import { AlchemySignerWebClient } from "@account-kit/signer";
const client = new AlchemySignerWebClient({
connection: {
apiKey: "your-api-key",
},
iframeConfig: {
iframeContainerId: "signer-iframe-container",
},
});
const account = await client.createAccount({
type: "email",
email: "[email protected]",
});
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.