> ## 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.

# Self-Destruct Messages

> Messages that automatically disappear after a set time

## Overview

blockmsg allows you to set a **self-destruct timer** on your messages. Once the timer expires, the message becomes permanently unreadable.

<Tip>
  Perfect for sharing sensitive information that shouldn't persist forever.
</Tip>

## Available Timers

| Timer         | Use Case                               |
| ------------- | -------------------------------------- |
| **5 minutes** | Quick codes, PINs, temporary passwords |
| **1 hour**    | Short-term coordination, meeting links |
| **12 hours**  | Day-limited sensitive info             |
| **24 hours**  | Daily updates, temporary credentials   |
| **7 days**    | Weekly reports, time-limited documents |

## How to Send a Self-Destruct Message

<Steps>
  <Step title="Enable Self-Destruct">
    Click "Enable self-destructing messages" in the chat input area
  </Step>

  <Step title="Select Timer">
    Choose your desired expiration time from the options
  </Step>

  <Step title="Compose & Send">
    Type your message and send. The timer starts immediately!
  </Step>
</Steps>

## How It Works

```mermaid theme={null}
sequenceDiagram
    participant Sender
    participant Contract
    participant Recipient
    
    Sender->>Contract: Send encrypted message + expiry time
    Contract->>Contract: Store message with expiry timestamp
    Recipient->>Contract: Request message decryption
    Contract->>Contract: Check if expired
    alt Not Expired
        Contract->>Recipient: Return encrypted data
        Recipient->>Recipient: Decrypt message
    else Expired
        Contract->>Recipient: Return empty (destructed)
    end
```

### Technical Implementation

* **Expiry Timestamp**: Stored on-chain with the message
* **Destruction**: The contract returns empty data after expiry
* **Irreversible**: Cannot be recovered once destructed

<Warning>
  **Self-destructed messages are PERMANENT.** Once the timer expires, the contract returns an empty array and decryption is no longer possible. The encrypted data remains on-chain but becomes meaningless. No one, including blockmsg, can recover it.
</Warning>

## Visual Indicators

When you send or receive a self-destruct message:

* 🟢 **Sent messages**: Show "Self-destruct message sent"
* 🟢 **Received messages**: Show "Reveal before it self-destructs"
* ⚪ **Destructed messages**: Show "This message self-destructed"

## Best Practices

<CardGroup cols={2}>
  <Card title="Don't Wait" icon="clock">
    Open time-sensitive messages as soon as possible
  </Card>

  <Card title="Set Appropriate Times" icon="timer">
    Choose a timer that gives the recipient enough time to read
  </Card>

  <Card title="Confirm Receipt" icon="check">
    Consider asking the recipient to confirm they've read the message
  </Card>

  <Card title="Save Externally" icon="download">
    If you need to keep the info, save it before it destructs
  </Card>
</CardGroup>
