Class EmbeddedWalletSdk

Hierarchy

  • EmbeddedWalletSdk

Constructors

Properties

auth: Auth

Used to manage the Auth state of the user.

clientId: string
querier: EmbeddedWalletIframeCommunicator<AuthQuerierTypes>
wallet: EmbeddedWallet

Methods

  • Gets the usr if they are logged in

    Returns Promise<GetUser>

    GetUser - an object to containing various information on the user statuses

    Example

     const user = await thirdwebEmbeddedWallet.getUser();
    switch (user.status) {
    case UserWalletStatus.LOGGED_OUT: {
    // User is logged out, call one of the auth methods on thirdwebEmbeddedWallet.auth to authenticate the user
    break;
    }
    case UserWalletStatus.LOGGED_IN_WALLET_INITIALIZED: {
    // user is logged in and wallet is all set up.
    // You have access to:
    user.status;
    user.authDetails;
    user.walletAddress;
    user.wallet;
    break;
    }
    }

Generated using TypeDoc