> For the complete documentation index, see [llms.txt](https://docs.stacks.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacks.co/cookbook/clarity.md).

# Clarity

- [Address Utilities](https://docs.stacks.co/cookbook/clarity/address-utilities.md)
- [Convert BTC to STX address](https://docs.stacks.co/cookbook/clarity/address-utilities/convert-btc-to-stx-address.md)
- [Convert string to principal](https://docs.stacks.co/cookbook/clarity/address-utilities/convert-string-to-principal.md)
- [Derive principal addresses between networks](https://docs.stacks.co/cookbook/clarity/address-utilities/derive-principal-addresses-between-networks.md)
- [Create a random burn address](https://docs.stacks.co/cookbook/clarity/address-utilities/create-a-random-burn-address.md)
- [Data Utility](https://docs.stacks.co/cookbook/clarity/data-utility.md)
- [Filter items from a list](https://docs.stacks.co/cookbook/clarity/data-utility/filter-items-from-a-list.md)
- [Check for duplicates](https://docs.stacks.co/cookbook/clarity/data-utility/check-for-duplicates.md)
- [Return an entry from a map](https://docs.stacks.co/cookbook/clarity/data-utility/return-an-entry-from-a-map.md)
- [Cryptography & Security](https://docs.stacks.co/cookbook/clarity/cryptography-and-security.md)
- [Create sha256 hash clarity](https://docs.stacks.co/cookbook/clarity/cryptography-and-security/create-sha256-hash-clarity.md)
- [Contract post-conditions](https://docs.stacks.co/cookbook/clarity/cryptography-and-security/contract-post-conditions.md)
- [Generate random number](https://docs.stacks.co/cookbook/clarity/cryptography-and-security/generate-random-number.md)
- [Helper function to restrict contract calls](https://docs.stacks.co/cookbook/clarity/cryptography-and-security/helper-function-to-restrict-contract-calls.md)
- [Example Contracts](https://docs.stacks.co/cookbook/clarity/example-contracts.md): How Clarity contracts look in practice
- [Megapont Ape Club NFT](https://docs.stacks.co/cookbook/clarity/example-contracts/megapont-ape-club-nft.md)
- [Smart Wallets](https://docs.stacks.co/cookbook/clarity/example-contracts/smart-wallets.md)
- [Proof of Transfer (PoX)](https://docs.stacks.co/cookbook/clarity/example-contracts/proof-of-transfer-pox.md)
- [Semi Fungible Token](https://docs.stacks.co/cookbook/clarity/example-contracts/semi-fungible-token.md)
- [Send Many](https://docs.stacks.co/cookbook/clarity/example-contracts/send-many.md)
- [ExecutorDAO Framework](https://docs.stacks.co/cookbook/clarity/example-contracts/executordao-framework.md)
- [NFT Marketplace](https://docs.stacks.co/cookbook/clarity/example-contracts/nft-marketplace.md)
- [Ordinals Swap](https://docs.stacks.co/cookbook/clarity/example-contracts/ordinals-swap.md)
- [DeFi Lending](https://docs.stacks.co/cookbook/clarity/example-contracts/defi-lending.md)
- [Non-Fungible token](https://docs.stacks.co/cookbook/clarity/example-contracts/non-fungible-token.md)
- [Fungible Token](https://docs.stacks.co/cookbook/clarity/example-contracts/fungible-token.md)
- [Counter](https://docs.stacks.co/cookbook/clarity/example-contracts/counter.md)


---

# 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.stacks.co/cookbook/clarity.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.
