# Building Smart Contracts

Libre meets developers where they are at. There is no need to learn a new language as Libre supports building in almost all modern and popular programming languages including C++, Typescript, Rust, Go, and Python.

## Full Turing-Complete WASM Smart Contracts

Libre's smart contract layer is built on WebAssembly (WASM), providing a full Turing-complete environment that enables developers to create complex, sophisticated applications. This is a significant advantage over other Bitcoin-focused platforms which typically offer limited or no smart contract capabilities.

With Libre's WASM implementation:

* Execute any computable function or logic
* Develop complex financial applications
* Create custom token standards
* Build decentralized applications with rich functionality
* Implement advanced cryptographic operations

## Interacting with Bitcoin on Libre

One of Libre's most powerful features is the ability to interact with Bitcoin in two distinct ways through smart contracts:

### 1. Unwrapped BTC (Vault System)

Smart contracts can interact with Bitcoin held in the CrossLink vault system without requiring the BTC to be wrapped as a token. This enables:

* Direct collateralization of BTC for lending applications
* Automated vault management
* Liquidation protection mechanisms
* Real-time BTC collateral monitoring
* Withdrawal approval logic based on complex conditions

### 2. Wrapped BTC (Fast BTC)

Smart contracts can also interact with BTC that has been wrapped as a token on Libre, providing:

* Faster transaction processing
* Lower fees for frequent operations
* Simplified integration with other DeFi applications
* Token swaps and trading functionality
* Advanced programmable escrow mechanisms

This dual approach gives developers unprecedented flexibility in how they incorporate Bitcoin into their applications, choosing the method that best suits their specific use case.

## Development Tools

There are online several online IDEs you can use to build on Libre Chain - so you do not have to install any software locally to get started.

For example, any Antelope-based tools will work with Libre, for example:

* [Rust Smart Contract Development Kit](https://github.com/uuosio/rscdk)
* [Python Smart Contract Development Kit](https://github.com/uuosio/pscdk)
* [Typescript Web IDE](https://protonide.com/)
* [AssemblyScript Smart Contract Development Kit](https://github.com/uuosio/ascdk)
* [Go Smart Contract Development Kit](https://github.com/uuosio/gscdk)

You can build smart contracts following this [collection of examples](https://github.com/blockmatic/antelope-contracts-list). Please start on Testnet - where the validators can help you with getting resources and access to the public API servers.


---

# Agent Instructions: 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:

```
GET https://docs.libre.org/libre-docs/platform-docs/building-on-libre/building-smart-contracts-on-libre.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
