> For the complete documentation index, see [llms.txt](https://docs.warp.green/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.warp.green/developers/warp.green/chia-sending-messages.md).

# Chia - Sending Messages

<figure><img src="/files/UtK4pAI1ol4ynSNSkL25" alt=""><figcaption><p>Overview of the process required to send a message. A coin with the sender puzzle hash outputs a special CREATE_COIN condition that contains details about the message. The resulting coin can be spent in the same transaction, and uses the message toll as a transaction fee.</p></figcaption></figure>

For Chia, sending messages is as simple as creating a coin. Specifically, the 'CREATE\_COIN' condition should contain the following arguments:

* `puzzle_hash`: see below
* `amount`: at least the current per-message toll (1000000000 mojos)
* `memos`: a list of values as defined below
  * `destination_chain`: 3-byte identifier of the chain the message will be relayed to
  * `destination`: identifier (i.e., address) of the contract that will receive the message
  * `contents`: all remaining memo values will be padded to 32 bytes and be used as contents

### Resulting Coin

The resulting coin's id will be used as a nonce, as Chia consensus enforces unique coin ids. The puzzle hash of the said coin should be `a09eb1ea8c6e83c0166801dabcf4a70d361cc7f6d89c4a46bcd400ac57719037`, which corresponds to the following puzzle:

```
(mod (
 my_amount 
)
  (include condition_codes.clib)

  (list
    (list ASSERT_MY_AMOUNT my_amount)
    (list RESERVE_FEE my_amount)
  )
)
```

The puzzle above is responsible for sending the message toll to the block farmer - i.e., use the coin's value as a transaction fee.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.warp.green/developers/warp.green/chia-sending-messages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
