# Onboarding and Account Access

## 1. Import useWallet hook to access embedded wallet functions

```tsx
import { useWallet } from "@enclavemoney/enclave-wallet-sdk/dist/components/WalletProvider";

export function Page() {
     const {
          isLoggedIn,
          username,
          connect,
          walletSDK,
          disconnect,
     } = useWallet();

     return (
          <div>
               <!-- -->
               {
                    isLoggedIn ? 
                    <div>
                         <button onClick = {() => walletSDK.openWalletModal()}>Welcome {username}</button>
                         <button onClick = {() => disconnect()}>Log Out</button>
                    </div> :
                    <div>
                         <button onClick = {() => connect()}>Log In</button>
                    </div>
               }
          </div>
     )
     
}
```

### 1.a. Login modal after calling connect()

Calling the **connect()** funtion triggers the modal displayed below where user's can continue onboarding

<figure><img src="/files/fq9JGSqSRdeBJU4b9YwR" alt="" width="375"><figcaption></figcaption></figure>

### 1.b. Wallet modal after calling walletSDK.openWalletModal()

<figure><img src="/files/uTTd9Q4dSgnntiTfBIZe" alt="" width="375"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.enclave.money/integrate-with-enclave-money/embedded-wallet/onboarding-and-account-access.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
