> ## Documentation Index
> Fetch the complete documentation index at: https://heyaven09.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting Your Stellar Wallet to the Aven Dashboard

> Install Freighter for Stellar Testnet, connect it to the Aven dashboard, and authorize the aven-stellar CLI to track time and submit work session reports.

Aven uses the Freighter browser wallet to sign transactions on Stellar. You need Freighter installed and configured for Testnet to use the dashboard — whether you are a client creating streams or a worker submitting session reports. Freighter holds your keys locally; the Aven dashboard never has access to your secret key.

## Requirements

Before connecting to the dashboard, make sure you have:

* [Freighter](https://www.freighter.app/) browser extension installed (Chrome, Firefox, or Brave)
* Freighter configured for **Stellar Testnet** (not Mainnet)
* A funded Testnet account (see setup steps below)

## Setting Up Freighter

<Steps>
  <Step title="Install Freighter">
    Download and install the [Freighter](https://www.freighter.app/) extension from your browser's extension store. Freighter is available for Chrome, Firefox, and Brave.
  </Step>

  <Step title="Create or import a Stellar account">
    Open Freighter and follow the prompts to create a new Stellar account or import an existing one using your secret key or recovery phrase.
  </Step>

  <Step title="Switch the network to Testnet">
    In Freighter, open **Settings** and change the network from Mainnet to **Testnet**. All Aven contracts are currently deployed on Testnet — transactions signed against Mainnet will not work.
  </Step>

  <Step title="Fund your Testnet account with Friendbot">
    Your new Testnet account starts with a zero balance. Fund it for free using the [Stellar Lab Friendbot](https://lab.stellar.org/account/fund):

    ```
    https://lab.stellar.org/account/fund
    ```

    Make sure the network selector in the top-right corner of Stellar Lab is set to **Testnet**. Paste your Stellar public key (`G...`) into the field and click **Get lumens**. Your account will receive 10,000 XLM — enough to cover transaction fees and stream deposits.
  </Step>

  <Step title="Add a USDC trustline (for USDC streams)">
    If you plan to create or receive USDC streams, add a USDC trustline to your account via [Stellar Lab](https://lab.stellar.org) before attempting any USDC transactions. See the [USDC Trustlines](#usdc-trustlines) section below for detailed steps.
  </Step>
</Steps>

## Connecting to the Dashboard

<Steps>
  <Step title="Open the Aven dashboard">
    Navigate to the Aven dashboard URL in your browser. Make sure the Freighter extension is active and unlocked.
  </Step>

  <Step title="Click Connect Wallet">
    Click the **Connect Wallet** button in the top navigation bar.
  </Step>

  <Step title="Approve the connection in Freighter">
    The Freighter popup appears and asks you to approve the connection to the Aven dashboard. Click **Connect** to authorize it.
  </Step>

  <Step title="Your Stellar address appears in the navbar">
    Once connected, your truncated Stellar address is displayed in the navigation bar, confirming you are authenticated. The dashboard fetches your streams and attestation count automatically.
  </Step>

  <Step title="You are now ready to use Aven">
    * **As a client:** you can create streams, pause, resume, cancel, and review work sessions.
    * **As a worker:** you can view streams you are a recipient of, authorize the CLI, and withdraw approved session payments.
  </Step>
</Steps>

## CLI Authorization

Workers use the `aven-stellar` CLI to track time and submit session reports. On first use, the CLI needs a one-time authorization through the dashboard.

<Steps>
  <Step title="Start a session in your Git repository">
    Inside the repository where you will be working, run:

    ```bash theme={null}
    npx aven-stellar start --stream <your-stream-id>
    ```
  </Step>

  <Step title="The CLI opens the Aven dashboard in your browser">
    On first use, the CLI prints a dashboard URL and opens it automatically. Navigate to it if your browser does not open.
  </Step>

  <Step title="Approve the CLI connection with Freighter">
    The dashboard shows an authorization prompt. Connect your Freighter wallet (if not already connected) and approve the CLI authorization request.
  </Step>

  <Step title="A time-limited token is issued to the CLI">
    The dashboard issues a session token that the CLI stores locally in `.aven/`. Subsequent `start` and `stop` commands use this token silently — no further browser interaction is needed until the token expires.
  </Step>

  <Step title="Your secret key is never shared">
    The CLI receives only a time-limited authorization token. It never receives your Stellar secret key, and the dashboard never stores it.
  </Step>
</Steps>

## USDC Trustlines

To send or receive USDC streams, your Stellar account needs a USDC trustline. Without one, the stream contract will reject the transaction with a `trustline entry is missing` error.

<Steps>
  <Step title="Open Stellar Lab">
    Navigate to [Stellar Lab](https://lab.stellar.org) and confirm the network selector in the top-right corner is set to **Testnet**.
  </Step>

  <Step title="Go to Build Transaction">
    In Stellar Lab, click **Build Transaction** in the main navigation. Enter your Stellar public key (`G...`) in the **Source Account** field and click **Fetch next sequence number**.
  </Step>

  <Step title="Add a Change Trust operation">
    Scroll down to the **Operation** section. Set the operation type to **Change Trust**. Fill in the asset details:

    * **Asset code:** `USDC`
    * **Issuer account ID:** `GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5` (Testnet USDC issuer)

    Leave the trust limit blank to allow the maximum balance. Click **Sign transaction** at the bottom.
  </Step>

  <Step title="Sign and submit with Freighter">
    On the signing page, choose **Freighter** as your signing method and approve the transaction in the Freighter popup. Then click **Submit transaction**. Once confirmed, your account can send and receive USDC on Testnet.
  </Step>
</Steps>

<Note>
  Both the stream **sender** and the stream **recipient** must have a USDC trustline before a USDC stream can be created or funds can be withdrawn. If either party is missing a trustline, the transaction will revert with a clear error message.
</Note>

<Warning>
  Aven currently runs on Stellar **Testnet**. Make sure Freighter is set to Testnet before signing any transaction. Mainnet funds cannot be used with Aven and will not be recoverable if sent to a Testnet contract address.
</Warning>

## Disconnecting

To disconnect your wallet, click your address in the navbar and select **Disconnect**. Disconnecting removes the active session from your browser but does not affect any on-chain data. Your streams, work sessions, and attestations remain accessible on-chain and will reappear the next time you connect.
