Skip to content


getAuthDetails returns the details about the authenticated user, specifically all EOA addresses tied to the user's Capsule account.

This method must be called after authenticate. Otherwise, this method will throw an error with the message Not Authenticated.


import { createCapsuleSigner } from "./capsule";

const capsuleSigner = await createCapsuleSigner();

const details = await capsuleSigner.getAuthDetails();
import { sepolia } from "@alchemy/aa-core";
import { CapsuleSigner } from "@alchemy/aa-signers/capsule";
import { Environment } from "@usecapsule/web-sdk";
import { http } from "viem";

export const createCapsuleSigner = async () => {
  // get an API Key by filling out this form:
  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();

  return capsuleSigner;



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.