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

# Direct Messages

> Private 1-on-1 encrypted conversations

## Overview

Direct Messages (DMs) allow you to have private, encrypted conversations with any Ethereum wallet address.

## Starting a DM

<Steps>
  <Step title="Click New Message">
    Click the **+** button in the sidebar
  </Step>

  <Step title="Enter Wallet Address">
    Paste the recipient's full Ethereum address (0x...)
  </Step>

  <Step title="Start Chatting">
    Type your message and send!
  </Step>
</Steps>

## Features

<CardGroup cols={2}>
  <Card title="End-to-End Encryption" icon="lock">
    All DMs are encrypted using FHE
  </Card>

  <Card title="Wallet-Based Identity" icon="wallet">
    No usernames needed - just wallet addresses
  </Card>

  <Card title="Custom Nicknames" icon="pen">
    Rename contacts for easier identification
  </Card>

  <Card title="Self-Destruct Option" icon="bomb">
    Set timers on individual messages
  </Card>
</CardGroup>

## Message Requests

When someone messages you for the first time, you'll see a **message request**:

<Steps>
  <Step title="Receive Request">
    A notification appears in the "Requests" tab
  </Step>

  <Step title="Review Sender">
    Check the sender's wallet address
  </Step>

  <Step title="Accept or Decline">
    Accept to start the conversation, or decline to ignore
  </Step>
</Steps>

<Note>
  Until you accept a request, you cannot see the message content - only that someone wants to message you.
</Note>

## Renaming Contacts

Don't want to see long wallet addresses? Rename your contacts:

1. Right-click on a conversation in the sidebar
2. Select "Rename"
3. Enter a custom name
4. The name is stored locally on your device

<Tip>
  Renamed contacts show as: **Custom Name** `0x1234...5678`
</Tip>

## Conversation View

Each DM shows:

* **Avatar**: Initials from the contact name or wallet
* **Encryption Badge**: "End-to-End Encrypted" indicator
* **Message History**: All encrypted messages in the conversation
* **Input Area**: Type messages, enable self-destruct timers

## Technical Details

### How DMs are Stored

```solidity theme={null}
// On-chain structure
struct DirectMessage {
    address sender;
    uint256 timestamp;
    euint32[] encryptedContent; // FHE encrypted chunks
    uint256 expiresAt; // Self-destruct timestamp (0 = never)
}
```

### Access Control

* Only the sender and recipient can decrypt messages
* The smart contract enforces access control using `TFHE.allow()`
* Decryption requires a cryptographic signature from your wallet
