getAuthDetails
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
.
Usage
example.ts
import { createCapsuleSigner } from "./capsule";
const capsuleSigner = await createCapsuleSigner();
const details = await capsuleSigner.getAuthDetails();
Returns
Promise<CapsuleUserInfo>
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] eitherCGGMP
orDKLS
.