> For the complete documentation index, see [llms.txt](https://numex.gitbook.io/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://numex.gitbook.io/whitepaper/bitcoin-smart-contract.md).

# Bitcoin Smart Contract

The Bitcoin blockchain is a digital distributed transaction ledger of a cross-blockchain computer system network. Its goal is to provide decentralized financial services and allow users to have full control over their digital currencies without the need for third parties. Its scripting language is limited and prioritizes security over programmability, making it challenging for developers to use.

Although Bitcoin (BTC) was the first cryptocurrency to support basic smart contracts, it was not widely associated with smart contract discussions until a few years ago. Like other smart contract platforms, Bitcoin smart contracts ensure trustless transactions settled on the Bitcoin network, leveraging the verified security of Bitcoin to make transaction history more immutable.

Stacks, formerly known as Blockstack, makes Bitcoin smart contracts possible, enabling developers to build Web3 dApps that go beyond Ethereum and other blockchains while benefiting from the security of Bitcoin. Stacks acts as the smart contract layer for Bitcoin, bringing the advantages of smart contracts, trustlessness, and immutability to the Bitcoin blockchain.

Stacks utilizes the Clarity programming language, which offers transparency and scalability, allowing developers to write fully expressive smart contracts to create new applications, use cases, NFT markets, and DeFi applications. NFTs such as music, collectibles, art, and even real estate can be minted through the Bitcoin ecosystem on NFT markets like Gamma, the largest NFT market on Stacks.

Clarity is an open-source, determinable language, meaning you can know exactly what a program will do. It provides developers with a secure way to build complex smart contracts for one of the most secure blockchains in the world. The programming language is human-readable and makes it easier for developers to detect vulnerabilities and potential errors.

NFTs like music, collectibles, art, and even real estate can be minted through the Bitcoin ecosystem on NFT markets like Gamma, the largest NFT market on Stacks.


---

# 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://numex.gitbook.io/whitepaper/bitcoin-smart-contract.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.
