> For the complete documentation index, see [llms.txt](/llms.txt).

# Using PnP Web Modal SDK

Embedded Wallets provides a comprehensive set of functions to handle authentication, user management, and blockchain interactions in your applications. These functions allow you to implement features like user login, multi-factor authentication, chain switching, and Wallet Services with minimal effort. Each function is designed to handle a specific aspect of Embedded Wallets' functionality, making it easy to integrate into your projects.

## List of functions

tip

For detailed usage, configuration options, and code examples, refer to the dedicated documentation page for each function.

### Authentication functions

| Function Name                                        | Description                                 |
| ---------------------------------------------------- | ------------------------------------------- |
| [connect()](/embedded-wallets/sdk/js/usage/connect/) | Displays the Modal and logs in the user.    |
| [logout()](/embedded-wallets/sdk/js/usage/logout/)   | Logs out the user from the current session. |

### User management functions

| Function Name                                                             | Description                                                   |
| ------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [getUserInfo()](/embedded-wallets/sdk/js/usage/get-user-info/)            | Retrieves the authenticated user's information.               |
| [getAuthTokenInfo()](/embedded-wallets/sdk/js/usage/get-auth-token-info/) | Gets the `idToken` from Web3Auth for authentication purposes. |

### Security functions

| Function Name                                             | Description                                                                        |
| --------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [enableMFA()](/embedded-wallets/sdk/js/usage/enable-mfa/) | Enables Multi-Factor Authentication for the user.                                  |
| [manageMFA()](/embedded-wallets/sdk/js/usage/manage-mfa/) | Redirects the user to manage their MFA settings in the Web3Auth Account Dashboard. |

### Blockchain functions

| Function Name                                                 | Description                                                                              |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `addChain()`                                                  | Adds chain configuration details to the connected adapter.                               |
| [switchChain()](/embedded-wallets/sdk/js/usage/switch-chain/) | Switches to a different blockchain network as per chainId already added to chain config. |

### Wallet Services plugin functions

| Function Name                                                                             | Description                                   |
| ----------------------------------------------------------------------------------------- | --------------------------------------------- |
| [showCheckout()](/embedded-wallets/sdk/js/usage/show-checkout/)                           | Initiates cryptocurrency top-up for the user. |
| [showWalletConnectScanner()](/embedded-wallets/sdk/js/usage/show-wallet-connect-scanner/) | Displays the WalletConnect QR Code Scanner.   |
| [showWalletUI()](/embedded-wallets/sdk/js/usage/show-wallet-ui/)                          | Shows the Embedded Wallet UI.                 |
| [showSwap()](/embedded-wallets/sdk/js/usage/show-swap/)                                   | Displays the swap UI for token exchanges.     |
| `showTransactionConfirmation()`                                                           | Shows the transaction confirmation UI.        |
