Skip to content


authenticate is a method on the CapsuleSigner which leverages the Capsule SDK to authenticate a user.

You must call this method before accessing the other methods available on the CapsuleSigner, such as signing messages or typed data or accessing user details.



import { CapsuleSigner } from "@alchemy/aa-signers/capsule";

const capsuleSigner = new CapsuleSigner({
  env: Environment.DEVELOPMENT,
  apiKey: "CAPSULE_API_KEY",
  walletConfig: {
    chain: sepolia,
    // get your own Alchemy API key at:
    transport: http(`${sepolia.rpcUrls.alchemy.http[0]}/ALCHEMY_API_KEY`),

await capsuleSigner.authenticate();

// after calling `authenticate`, a user must either be created or logged in to perform any signing operations using `capsuleSigner`
// follow the documentation at using `capsuleSigner.inner` to create or login a user



A Promise containing the CapsuleUserInfo, an Record<string, Wallet> where Wallet is an object with the following properties:

  • id: string -- ID of the Capsule Signer.

  • signer: string -- Capsule Signer information.

  • address: string -- [optional] EOA address of the Capsule Signer.

  • publicKey: string -- [optional] Public Key of the Capsule Signer.

  • scheme: WalletScheme -- [optional] either CGGMP or DKLS.